aclocal.m4 revision fda9279d
1fda9279dSmrg# generated automatically by aclocal 1.14.1 -*- Autoconf -*- 2fda9279dSmrg 3fda9279dSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4fda9279dSmrg 5fda9279dSmrg# This file is free software; the Free Software Foundation 6fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 7fda9279dSmrg# with or without modifications, as long as this notice is preserved. 8fda9279dSmrg 9fda9279dSmrg# This program is distributed in the hope that it will be useful, 10fda9279dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11fda9279dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12fda9279dSmrg# PARTICULAR PURPOSE. 13fda9279dSmrg 14fda9279dSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15fda9279dSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16fda9279dSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17fda9279dSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18fda9279dSmrg[m4_warning([this file was generated for autoconf 2.69. 19fda9279dSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20fda9279dSmrgIf you have problems, you may need to regenerate the build system entirely. 21fda9279dSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22fda9279dSmrg 23fda9279dSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24fda9279dSmrg# 25fda9279dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 26fda9279dSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 27fda9279dSmrg# Foundation, Inc. 28fda9279dSmrg# Written by Gordon Matzigkeit, 1996 29fda9279dSmrg# 30fda9279dSmrg# This file is free software; the Free Software Foundation gives 31fda9279dSmrg# unlimited permission to copy and/or distribute it, with or without 32fda9279dSmrg# modifications, as long as this notice is preserved. 33fda9279dSmrg 34fda9279dSmrgm4_define([_LT_COPYING], [dnl 35fda9279dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 36fda9279dSmrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 37fda9279dSmrg# Foundation, Inc. 38fda9279dSmrg# Written by Gordon Matzigkeit, 1996 39fda9279dSmrg# 40fda9279dSmrg# This file is part of GNU Libtool. 41fda9279dSmrg# 42fda9279dSmrg# GNU Libtool is free software; you can redistribute it and/or 43fda9279dSmrg# modify it under the terms of the GNU General Public License as 44fda9279dSmrg# published by the Free Software Foundation; either version 2 of 45fda9279dSmrg# the License, or (at your option) any later version. 46fda9279dSmrg# 47fda9279dSmrg# As a special exception to the GNU General Public License, 48fda9279dSmrg# if you distribute this file as part of a program or library that 49fda9279dSmrg# is built using GNU Libtool, you may include this file under the 50fda9279dSmrg# same distribution terms that you use for the rest of that program. 51fda9279dSmrg# 52fda9279dSmrg# GNU Libtool is distributed in the hope that it will be useful, 53fda9279dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 54fda9279dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 55fda9279dSmrg# GNU General Public License for more details. 56fda9279dSmrg# 57fda9279dSmrg# You should have received a copy of the GNU General Public License 58fda9279dSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 59fda9279dSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 60fda9279dSmrg# obtained by writing to the Free Software Foundation, Inc., 61fda9279dSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62fda9279dSmrg]) 63fda9279dSmrg 64fda9279dSmrg# serial 57 LT_INIT 65fda9279dSmrg 66fda9279dSmrg 67fda9279dSmrg# LT_PREREQ(VERSION) 68fda9279dSmrg# ------------------ 69fda9279dSmrg# Complain and exit if this libtool version is less that VERSION. 70fda9279dSmrgm4_defun([LT_PREREQ], 71fda9279dSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 72fda9279dSmrg [m4_default([$3], 73fda9279dSmrg [m4_fatal([Libtool version $1 or higher is required], 74fda9279dSmrg 63)])], 75fda9279dSmrg [$2])]) 76fda9279dSmrg 77fda9279dSmrg 78fda9279dSmrg# _LT_CHECK_BUILDDIR 79fda9279dSmrg# ------------------ 80fda9279dSmrg# Complain if the absolute build directory name contains unusual characters 81fda9279dSmrgm4_defun([_LT_CHECK_BUILDDIR], 82fda9279dSmrg[case `pwd` in 83fda9279dSmrg *\ * | *\ *) 84fda9279dSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 85fda9279dSmrgesac 86fda9279dSmrg]) 87fda9279dSmrg 88fda9279dSmrg 89fda9279dSmrg# LT_INIT([OPTIONS]) 90fda9279dSmrg# ------------------ 91fda9279dSmrgAC_DEFUN([LT_INIT], 92fda9279dSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 93fda9279dSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 94fda9279dSmrgAC_BEFORE([$0], [LT_LANG])dnl 95fda9279dSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 96fda9279dSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 97fda9279dSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 98fda9279dSmrg 99fda9279dSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 100fda9279dSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 101fda9279dSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 102fda9279dSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 103fda9279dSmrgdnl unless we require an AC_DEFUNed macro: 104fda9279dSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 105fda9279dSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 106fda9279dSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 107fda9279dSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 108fda9279dSmrgm4_require([_LT_PROG_LTMAIN])dnl 109fda9279dSmrg 110fda9279dSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 111fda9279dSmrg 112fda9279dSmrgdnl Parse OPTIONS 113fda9279dSmrg_LT_SET_OPTIONS([$0], [$1]) 114fda9279dSmrg 115fda9279dSmrg# This can be used to rebuild libtool when needed 116fda9279dSmrgLIBTOOL_DEPS="$ltmain" 117fda9279dSmrg 118fda9279dSmrg# Always use our own libtool. 119fda9279dSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 120fda9279dSmrgAC_SUBST(LIBTOOL)dnl 121fda9279dSmrg 122fda9279dSmrg_LT_SETUP 123fda9279dSmrg 124fda9279dSmrg# Only expand once: 125fda9279dSmrgm4_define([LT_INIT]) 126fda9279dSmrg])# LT_INIT 127fda9279dSmrg 128fda9279dSmrg# Old names: 129fda9279dSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 130fda9279dSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 131fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 132fda9279dSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 133fda9279dSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 134fda9279dSmrg 135fda9279dSmrg 136fda9279dSmrg# _LT_CC_BASENAME(CC) 137fda9279dSmrg# ------------------- 138fda9279dSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 139fda9279dSmrgm4_defun([_LT_CC_BASENAME], 140fda9279dSmrg[for cc_temp in $1""; do 141fda9279dSmrg case $cc_temp in 142fda9279dSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 143fda9279dSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 144fda9279dSmrg \-*) ;; 145fda9279dSmrg *) break;; 146fda9279dSmrg esac 147fda9279dSmrgdone 148fda9279dSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 149fda9279dSmrg]) 150fda9279dSmrg 151fda9279dSmrg 152fda9279dSmrg# _LT_FILEUTILS_DEFAULTS 153fda9279dSmrg# ---------------------- 154fda9279dSmrg# It is okay to use these file commands and assume they have been set 155fda9279dSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 156fda9279dSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 157fda9279dSmrg[: ${CP="cp -f"} 158fda9279dSmrg: ${MV="mv -f"} 159fda9279dSmrg: ${RM="rm -f"} 160fda9279dSmrg])# _LT_FILEUTILS_DEFAULTS 161fda9279dSmrg 162fda9279dSmrg 163fda9279dSmrg# _LT_SETUP 164fda9279dSmrg# --------- 165fda9279dSmrgm4_defun([_LT_SETUP], 166fda9279dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 167fda9279dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 168fda9279dSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 169fda9279dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170fda9279dSmrg 171fda9279dSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 172fda9279dSmrgdnl 173fda9279dSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 174fda9279dSmrg_LT_DECL([], [host], [0])dnl 175fda9279dSmrg_LT_DECL([], [host_os], [0])dnl 176fda9279dSmrgdnl 177fda9279dSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 178fda9279dSmrg_LT_DECL([], [build], [0])dnl 179fda9279dSmrg_LT_DECL([], [build_os], [0])dnl 180fda9279dSmrgdnl 181fda9279dSmrgAC_REQUIRE([AC_PROG_CC])dnl 182fda9279dSmrgAC_REQUIRE([LT_PATH_LD])dnl 183fda9279dSmrgAC_REQUIRE([LT_PATH_NM])dnl 184fda9279dSmrgdnl 185fda9279dSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 186fda9279dSmrgtest -z "$LN_S" && LN_S="ln -s" 187fda9279dSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 188fda9279dSmrgdnl 189fda9279dSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 190fda9279dSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 191fda9279dSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 192fda9279dSmrgdnl 193fda9279dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 194fda9279dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 195fda9279dSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 196fda9279dSmrgm4_require([_LT_CMD_RELOAD])dnl 197fda9279dSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 198fda9279dSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 199fda9279dSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 200fda9279dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 201fda9279dSmrgm4_require([_LT_WITH_SYSROOT])dnl 202fda9279dSmrg 203fda9279dSmrg_LT_CONFIG_LIBTOOL_INIT([ 204fda9279dSmrg# See if we are running on zsh, and set the options which allow our 205fda9279dSmrg# commands through without removal of \ escapes INIT. 206fda9279dSmrgif test -n "\${ZSH_VERSION+set}" ; then 207fda9279dSmrg setopt NO_GLOB_SUBST 208fda9279dSmrgfi 209fda9279dSmrg]) 210fda9279dSmrgif test -n "${ZSH_VERSION+set}" ; then 211fda9279dSmrg setopt NO_GLOB_SUBST 212fda9279dSmrgfi 213fda9279dSmrg 214fda9279dSmrg_LT_CHECK_OBJDIR 215fda9279dSmrg 216fda9279dSmrgm4_require([_LT_TAG_COMPILER])dnl 217fda9279dSmrg 218fda9279dSmrgcase $host_os in 219fda9279dSmrgaix3*) 220fda9279dSmrg # AIX sometimes has problems with the GCC collect2 program. For some 221fda9279dSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 222fda9279dSmrg # vanish in a puff of smoke. 223fda9279dSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 224fda9279dSmrg COLLECT_NAMES= 225fda9279dSmrg export COLLECT_NAMES 226fda9279dSmrg fi 227fda9279dSmrg ;; 228fda9279dSmrgesac 229fda9279dSmrg 230fda9279dSmrg# Global variables: 231fda9279dSmrgofile=libtool 232fda9279dSmrgcan_build_shared=yes 233fda9279dSmrg 234fda9279dSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 235fda9279dSmrg# which needs '.lib'). 236fda9279dSmrglibext=a 237fda9279dSmrg 238fda9279dSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 239fda9279dSmrg 240fda9279dSmrgold_CC="$CC" 241fda9279dSmrgold_CFLAGS="$CFLAGS" 242fda9279dSmrg 243fda9279dSmrg# Set sane defaults for various variables 244fda9279dSmrgtest -z "$CC" && CC=cc 245fda9279dSmrgtest -z "$LTCC" && LTCC=$CC 246fda9279dSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 247fda9279dSmrgtest -z "$LD" && LD=ld 248fda9279dSmrgtest -z "$ac_objext" && ac_objext=o 249fda9279dSmrg 250fda9279dSmrg_LT_CC_BASENAME([$compiler]) 251fda9279dSmrg 252fda9279dSmrg# Only perform the check for file, if the check method requires it 253fda9279dSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 254fda9279dSmrgcase $deplibs_check_method in 255fda9279dSmrgfile_magic*) 256fda9279dSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 257fda9279dSmrg _LT_PATH_MAGIC 258fda9279dSmrg fi 259fda9279dSmrg ;; 260fda9279dSmrgesac 261fda9279dSmrg 262fda9279dSmrg# Use C for the default configuration in the libtool script 263fda9279dSmrgLT_SUPPORTED_TAG([CC]) 264fda9279dSmrg_LT_LANG_C_CONFIG 265fda9279dSmrg_LT_LANG_DEFAULT_CONFIG 266fda9279dSmrg_LT_CONFIG_COMMANDS 267fda9279dSmrg])# _LT_SETUP 268fda9279dSmrg 269fda9279dSmrg 270fda9279dSmrg# _LT_PREPARE_SED_QUOTE_VARS 271fda9279dSmrg# -------------------------- 272fda9279dSmrg# Define a few sed substitution that help us do robust quoting. 273fda9279dSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 274fda9279dSmrg[# Backslashify metacharacters that are still active within 275fda9279dSmrg# double-quoted strings. 276fda9279dSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 277fda9279dSmrg 278fda9279dSmrg# Same as above, but do not quote variable references. 279fda9279dSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 280fda9279dSmrg 281fda9279dSmrg# Sed substitution to delay expansion of an escaped shell variable in a 282fda9279dSmrg# double_quote_subst'ed string. 283fda9279dSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 284fda9279dSmrg 285fda9279dSmrg# Sed substitution to delay expansion of an escaped single quote. 286fda9279dSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 287fda9279dSmrg 288fda9279dSmrg# Sed substitution to avoid accidental globbing in evaled expressions 289fda9279dSmrgno_glob_subst='s/\*/\\\*/g' 290fda9279dSmrg]) 291fda9279dSmrg 292fda9279dSmrg# _LT_PROG_LTMAIN 293fda9279dSmrg# --------------- 294fda9279dSmrg# Note that this code is called both from `configure', and `config.status' 295fda9279dSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 296fda9279dSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 297fda9279dSmrg# so we pass a copy along to make sure it has a sensible value anyway. 298fda9279dSmrgm4_defun([_LT_PROG_LTMAIN], 299fda9279dSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 300fda9279dSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 301fda9279dSmrgltmain="$ac_aux_dir/ltmain.sh" 302fda9279dSmrg])# _LT_PROG_LTMAIN 303fda9279dSmrg 304fda9279dSmrg 305fda9279dSmrg 306fda9279dSmrg# So that we can recreate a full libtool script including additional 307fda9279dSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 308fda9279dSmrg# in macros and then make a single call at the end using the `libtool' 309fda9279dSmrg# label. 310fda9279dSmrg 311fda9279dSmrg 312fda9279dSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 313fda9279dSmrg# ---------------------------------------- 314fda9279dSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 315fda9279dSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 316fda9279dSmrg[m4_ifval([$1], 317fda9279dSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 318fda9279dSmrg [$1 319fda9279dSmrg])])]) 320fda9279dSmrg 321fda9279dSmrg# Initialize. 322fda9279dSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 323fda9279dSmrg 324fda9279dSmrg 325fda9279dSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 326fda9279dSmrg# ------------------------------ 327fda9279dSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 328fda9279dSmrgm4_define([_LT_CONFIG_LIBTOOL], 329fda9279dSmrg[m4_ifval([$1], 330fda9279dSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 331fda9279dSmrg [$1 332fda9279dSmrg])])]) 333fda9279dSmrg 334fda9279dSmrg# Initialize. 335fda9279dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 336fda9279dSmrg 337fda9279dSmrg 338fda9279dSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 339fda9279dSmrg# ----------------------------------------------------- 340fda9279dSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 341fda9279dSmrg[_LT_CONFIG_LIBTOOL([$1]) 342fda9279dSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 343fda9279dSmrg]) 344fda9279dSmrg 345fda9279dSmrg 346fda9279dSmrg# _LT_FORMAT_COMMENT([COMMENT]) 347fda9279dSmrg# ----------------------------- 348fda9279dSmrg# Add leading comment marks to the start of each line, and a trailing 349fda9279dSmrg# full-stop to the whole comment if one is not present already. 350fda9279dSmrgm4_define([_LT_FORMAT_COMMENT], 351fda9279dSmrg[m4_ifval([$1], [ 352fda9279dSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 353fda9279dSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 354fda9279dSmrg)]) 355fda9279dSmrg 356fda9279dSmrg 357fda9279dSmrg 358fda9279dSmrg 359fda9279dSmrg 360fda9279dSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 361fda9279dSmrg# ------------------------------------------------------------------- 362fda9279dSmrg# CONFIGNAME is the name given to the value in the libtool script. 363fda9279dSmrg# VARNAME is the (base) name used in the configure script. 364fda9279dSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 365fda9279dSmrg# VARNAME. Any other value will be used directly. 366fda9279dSmrgm4_define([_LT_DECL], 367fda9279dSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 368fda9279dSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 369fda9279dSmrg [m4_ifval([$1], [$1], [$2])]) 370fda9279dSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 371fda9279dSmrg m4_ifval([$4], 372fda9279dSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 373fda9279dSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 374fda9279dSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 375fda9279dSmrg]) 376fda9279dSmrg 377fda9279dSmrg 378fda9279dSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 379fda9279dSmrg# -------------------------------------------------------- 380fda9279dSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 381fda9279dSmrg 382fda9279dSmrg 383fda9279dSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 384fda9279dSmrg# ------------------------------------------------ 385fda9279dSmrgm4_define([lt_decl_tag_varnames], 386fda9279dSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 387fda9279dSmrg 388fda9279dSmrg 389fda9279dSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 390fda9279dSmrg# --------------------------------------------------------- 391fda9279dSmrgm4_define([_lt_decl_filter], 392fda9279dSmrg[m4_case([$#], 393fda9279dSmrg [0], [m4_fatal([$0: too few arguments: $#])], 394fda9279dSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 395fda9279dSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 396fda9279dSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 397fda9279dSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 398fda9279dSmrg]) 399fda9279dSmrg 400fda9279dSmrg 401fda9279dSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 402fda9279dSmrg# -------------------------------------------------- 403fda9279dSmrgm4_define([lt_decl_quote_varnames], 404fda9279dSmrg[_lt_decl_filter([value], [1], $@)]) 405fda9279dSmrg 406fda9279dSmrg 407fda9279dSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 408fda9279dSmrg# --------------------------------------------------- 409fda9279dSmrgm4_define([lt_decl_dquote_varnames], 410fda9279dSmrg[_lt_decl_filter([value], [2], $@)]) 411fda9279dSmrg 412fda9279dSmrg 413fda9279dSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 414fda9279dSmrg# --------------------------------------------------- 415fda9279dSmrgm4_define([lt_decl_varnames_tagged], 416fda9279dSmrg[m4_assert([$# <= 2])dnl 417fda9279dSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 418fda9279dSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 419fda9279dSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 420fda9279dSmrgm4_define([_lt_decl_varnames_tagged], 421fda9279dSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 422fda9279dSmrg 423fda9279dSmrg 424fda9279dSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 425fda9279dSmrg# ------------------------------------------------ 426fda9279dSmrgm4_define([lt_decl_all_varnames], 427fda9279dSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 428fda9279dSmrg m4_if([$2], [], 429fda9279dSmrg m4_quote(lt_decl_varnames), 430fda9279dSmrg m4_quote(m4_shift($@))))[]dnl 431fda9279dSmrg]) 432fda9279dSmrgm4_define([_lt_decl_all_varnames], 433fda9279dSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 434fda9279dSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 435fda9279dSmrg]) 436fda9279dSmrg 437fda9279dSmrg 438fda9279dSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 439fda9279dSmrg# ------------------------------------ 440fda9279dSmrg# Quote a variable value, and forward it to `config.status' so that its 441fda9279dSmrg# declaration there will have the same value as in `configure'. VARNAME 442fda9279dSmrg# must have a single quote delimited value for this to work. 443fda9279dSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 444fda9279dSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 445fda9279dSmrg 446fda9279dSmrg 447fda9279dSmrg# _LT_CONFIG_STATUS_DECLARATIONS 448fda9279dSmrg# ------------------------------ 449fda9279dSmrg# We delimit libtool config variables with single quotes, so when 450fda9279dSmrg# we write them to config.status, we have to be sure to quote all 451fda9279dSmrg# embedded single quotes properly. In configure, this macro expands 452fda9279dSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 453fda9279dSmrg# 454fda9279dSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 455fda9279dSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 456fda9279dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 457fda9279dSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 458fda9279dSmrg 459fda9279dSmrg 460fda9279dSmrg# _LT_LIBTOOL_TAGS 461fda9279dSmrg# ---------------- 462fda9279dSmrg# Output comment and list of tags supported by the script 463fda9279dSmrgm4_defun([_LT_LIBTOOL_TAGS], 464fda9279dSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 465fda9279dSmrgavailable_tags="_LT_TAGS"dnl 466fda9279dSmrg]) 467fda9279dSmrg 468fda9279dSmrg 469fda9279dSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 470fda9279dSmrg# ----------------------------------- 471fda9279dSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 472fda9279dSmrg# expand to a commented shell variable setting: 473fda9279dSmrg# 474fda9279dSmrg# # Some comment about what VAR is for. 475fda9279dSmrg# visible_name=$lt_internal_name 476fda9279dSmrgm4_define([_LT_LIBTOOL_DECLARE], 477fda9279dSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 478fda9279dSmrg [description])))[]dnl 479fda9279dSmrgm4_pushdef([_libtool_name], 480fda9279dSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 481fda9279dSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 482fda9279dSmrg [0], [_libtool_name=[$]$1], 483fda9279dSmrg [1], [_libtool_name=$lt_[]$1], 484fda9279dSmrg [2], [_libtool_name=$lt_[]$1], 485fda9279dSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 486fda9279dSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 487fda9279dSmrg]) 488fda9279dSmrg 489fda9279dSmrg 490fda9279dSmrg# _LT_LIBTOOL_CONFIG_VARS 491fda9279dSmrg# ----------------------- 492fda9279dSmrg# Produce commented declarations of non-tagged libtool config variables 493fda9279dSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 494fda9279dSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 495fda9279dSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 496fda9279dSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 497fda9279dSmrg[m4_foreach([_lt_var], 498fda9279dSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 499fda9279dSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 500fda9279dSmrg 501fda9279dSmrg 502fda9279dSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 503fda9279dSmrg# ------------------------- 504fda9279dSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 505fda9279dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 506fda9279dSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 507fda9279dSmrg 508fda9279dSmrg 509fda9279dSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 510fda9279dSmrg# ------------------------------ 511fda9279dSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 512fda9279dSmrg 513fda9279dSmrg 514fda9279dSmrg# _LT_CONFIG_COMMANDS 515fda9279dSmrg# ------------------- 516fda9279dSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 517fda9279dSmrg# variables for single and double quote escaping we saved from calls 518fda9279dSmrg# to _LT_DECL, we can put quote escaped variables declarations 519fda9279dSmrg# into `config.status', and then the shell code to quote escape them in 520fda9279dSmrg# for loops in `config.status'. Finally, any additional code accumulated 521fda9279dSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 522fda9279dSmrgm4_defun([_LT_CONFIG_COMMANDS], 523fda9279dSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 524fda9279dSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 525fda9279dSmrg dnl instead of duplicating it all over again into config.status, 526fda9279dSmrg dnl then we will have config.status run $CONFIG_LT later, so it 527fda9279dSmrg dnl needs to know what name is stored there: 528fda9279dSmrg [AC_CONFIG_COMMANDS([libtool], 529fda9279dSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 530fda9279dSmrg dnl If the libtool generation code is destined for config.status, 531fda9279dSmrg dnl expand the accumulated commands and init code now: 532fda9279dSmrg [AC_CONFIG_COMMANDS([libtool], 533fda9279dSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 534fda9279dSmrg])#_LT_CONFIG_COMMANDS 535fda9279dSmrg 536fda9279dSmrg 537fda9279dSmrg# Initialize. 538fda9279dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 539fda9279dSmrg[ 540fda9279dSmrg 541fda9279dSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 542fda9279dSmrg# if CDPATH is set. 543fda9279dSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 544fda9279dSmrg 545fda9279dSmrgsed_quote_subst='$sed_quote_subst' 546fda9279dSmrgdouble_quote_subst='$double_quote_subst' 547fda9279dSmrgdelay_variable_subst='$delay_variable_subst' 548fda9279dSmrg_LT_CONFIG_STATUS_DECLARATIONS 549fda9279dSmrgLTCC='$LTCC' 550fda9279dSmrgLTCFLAGS='$LTCFLAGS' 551fda9279dSmrgcompiler='$compiler_DEFAULT' 552fda9279dSmrg 553fda9279dSmrg# A function that is used when there is no print builtin or printf. 554fda9279dSmrgfunc_fallback_echo () 555fda9279dSmrg{ 556fda9279dSmrg eval 'cat <<_LTECHO_EOF 557fda9279dSmrg\$[]1 558fda9279dSmrg_LTECHO_EOF' 559fda9279dSmrg} 560fda9279dSmrg 561fda9279dSmrg# Quote evaled strings. 562fda9279dSmrgfor var in lt_decl_all_varnames([[ \ 563fda9279dSmrg]], lt_decl_quote_varnames); do 564fda9279dSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 565fda9279dSmrg *[[\\\\\\\`\\"\\\$]]*) 566fda9279dSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 567fda9279dSmrg ;; 568fda9279dSmrg *) 569fda9279dSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 570fda9279dSmrg ;; 571fda9279dSmrg esac 572fda9279dSmrgdone 573fda9279dSmrg 574fda9279dSmrg# Double-quote double-evaled strings. 575fda9279dSmrgfor var in lt_decl_all_varnames([[ \ 576fda9279dSmrg]], lt_decl_dquote_varnames); do 577fda9279dSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 578fda9279dSmrg *[[\\\\\\\`\\"\\\$]]*) 579fda9279dSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 580fda9279dSmrg ;; 581fda9279dSmrg *) 582fda9279dSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 583fda9279dSmrg ;; 584fda9279dSmrg esac 585fda9279dSmrgdone 586fda9279dSmrg 587fda9279dSmrg_LT_OUTPUT_LIBTOOL_INIT 588fda9279dSmrg]) 589fda9279dSmrg 590fda9279dSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 591fda9279dSmrg# ------------------------------------ 592fda9279dSmrg# Generate a child script FILE with all initialization necessary to 593fda9279dSmrg# reuse the environment learned by the parent script, and make the 594fda9279dSmrg# file executable. If COMMENT is supplied, it is inserted after the 595fda9279dSmrg# `#!' sequence but before initialization text begins. After this 596fda9279dSmrg# macro, additional text can be appended to FILE to form the body of 597fda9279dSmrg# the child script. The macro ends with non-zero status if the 598fda9279dSmrg# file could not be fully written (such as if the disk is full). 599fda9279dSmrgm4_ifdef([AS_INIT_GENERATED], 600fda9279dSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 601fda9279dSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 602fda9279dSmrg[m4_require([AS_PREPARE])]dnl 603fda9279dSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 604fda9279dSmrg[lt_write_fail=0 605fda9279dSmrgcat >$1 <<_ASEOF || lt_write_fail=1 606fda9279dSmrg#! $SHELL 607fda9279dSmrg# Generated by $as_me. 608fda9279dSmrg$2 609fda9279dSmrgSHELL=\${CONFIG_SHELL-$SHELL} 610fda9279dSmrgexport SHELL 611fda9279dSmrg_ASEOF 612fda9279dSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 613fda9279dSmrgAS_SHELL_SANITIZE 614fda9279dSmrg_AS_PREPARE 615fda9279dSmrgexec AS_MESSAGE_FD>&1 616fda9279dSmrg_ASEOF 617fda9279dSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 618fda9279dSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 619fda9279dSmrg 620fda9279dSmrg# LT_OUTPUT 621fda9279dSmrg# --------- 622fda9279dSmrg# This macro allows early generation of the libtool script (before 623fda9279dSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 624fda9279dSmrg# tests. 625fda9279dSmrgAC_DEFUN([LT_OUTPUT], 626fda9279dSmrg[: ${CONFIG_LT=./config.lt} 627fda9279dSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 628fda9279dSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 629fda9279dSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 630fda9279dSmrg 631fda9279dSmrgcat >>"$CONFIG_LT" <<\_LTEOF 632fda9279dSmrglt_cl_silent=false 633fda9279dSmrgexec AS_MESSAGE_LOG_FD>>config.log 634fda9279dSmrg{ 635fda9279dSmrg echo 636fda9279dSmrg AS_BOX([Running $as_me.]) 637fda9279dSmrg} >&AS_MESSAGE_LOG_FD 638fda9279dSmrg 639fda9279dSmrglt_cl_help="\ 640fda9279dSmrg\`$as_me' creates a local libtool stub from the current configuration, 641fda9279dSmrgfor use in further configure time tests before the real libtool is 642fda9279dSmrggenerated. 643fda9279dSmrg 644fda9279dSmrgUsage: $[0] [[OPTIONS]] 645fda9279dSmrg 646fda9279dSmrg -h, --help print this help, then exit 647fda9279dSmrg -V, --version print version number, then exit 648fda9279dSmrg -q, --quiet do not print progress messages 649fda9279dSmrg -d, --debug don't remove temporary files 650fda9279dSmrg 651fda9279dSmrgReport bugs to <bug-libtool@gnu.org>." 652fda9279dSmrg 653fda9279dSmrglt_cl_version="\ 654fda9279dSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 655fda9279dSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 656fda9279dSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 657fda9279dSmrg 658fda9279dSmrgCopyright (C) 2011 Free Software Foundation, Inc. 659fda9279dSmrgThis config.lt script is free software; the Free Software Foundation 660fda9279dSmrggives unlimited permision to copy, distribute and modify it." 661fda9279dSmrg 662fda9279dSmrgwhile test $[#] != 0 663fda9279dSmrgdo 664fda9279dSmrg case $[1] in 665fda9279dSmrg --version | --v* | -V ) 666fda9279dSmrg echo "$lt_cl_version"; exit 0 ;; 667fda9279dSmrg --help | --h* | -h ) 668fda9279dSmrg echo "$lt_cl_help"; exit 0 ;; 669fda9279dSmrg --debug | --d* | -d ) 670fda9279dSmrg debug=: ;; 671fda9279dSmrg --quiet | --q* | --silent | --s* | -q ) 672fda9279dSmrg lt_cl_silent=: ;; 673fda9279dSmrg 674fda9279dSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 675fda9279dSmrgTry \`$[0] --help' for more information.]) ;; 676fda9279dSmrg 677fda9279dSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 678fda9279dSmrgTry \`$[0] --help' for more information.]) ;; 679fda9279dSmrg esac 680fda9279dSmrg shift 681fda9279dSmrgdone 682fda9279dSmrg 683fda9279dSmrgif $lt_cl_silent; then 684fda9279dSmrg exec AS_MESSAGE_FD>/dev/null 685fda9279dSmrgfi 686fda9279dSmrg_LTEOF 687fda9279dSmrg 688fda9279dSmrgcat >>"$CONFIG_LT" <<_LTEOF 689fda9279dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 690fda9279dSmrg_LTEOF 691fda9279dSmrg 692fda9279dSmrgcat >>"$CONFIG_LT" <<\_LTEOF 693fda9279dSmrgAC_MSG_NOTICE([creating $ofile]) 694fda9279dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 695fda9279dSmrgAS_EXIT(0) 696fda9279dSmrg_LTEOF 697fda9279dSmrgchmod +x "$CONFIG_LT" 698fda9279dSmrg 699fda9279dSmrg# configure is writing to config.log, but config.lt does its own redirection, 700fda9279dSmrg# appending to config.log, which fails on DOS, as config.log is still kept 701fda9279dSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 702fda9279dSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 703fda9279dSmrglt_cl_success=: 704fda9279dSmrgtest "$silent" = yes && 705fda9279dSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 706fda9279dSmrgexec AS_MESSAGE_LOG_FD>/dev/null 707fda9279dSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 708fda9279dSmrgexec AS_MESSAGE_LOG_FD>>config.log 709fda9279dSmrg$lt_cl_success || AS_EXIT(1) 710fda9279dSmrg])# LT_OUTPUT 711fda9279dSmrg 712fda9279dSmrg 713fda9279dSmrg# _LT_CONFIG(TAG) 714fda9279dSmrg# --------------- 715fda9279dSmrg# If TAG is the built-in tag, create an initial libtool script with a 716fda9279dSmrg# default configuration from the untagged config vars. Otherwise add code 717fda9279dSmrg# to config.status for appending the configuration named by TAG from the 718fda9279dSmrg# matching tagged config vars. 719fda9279dSmrgm4_defun([_LT_CONFIG], 720fda9279dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 721fda9279dSmrg_LT_CONFIG_SAVE_COMMANDS([ 722fda9279dSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 723fda9279dSmrg m4_if(_LT_TAG, [C], [ 724fda9279dSmrg # See if we are running on zsh, and set the options which allow our 725fda9279dSmrg # commands through without removal of \ escapes. 726fda9279dSmrg if test -n "${ZSH_VERSION+set}" ; then 727fda9279dSmrg setopt NO_GLOB_SUBST 728fda9279dSmrg fi 729fda9279dSmrg 730fda9279dSmrg cfgfile="${ofile}T" 731fda9279dSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 732fda9279dSmrg $RM "$cfgfile" 733fda9279dSmrg 734fda9279dSmrg cat <<_LT_EOF >> "$cfgfile" 735fda9279dSmrg#! $SHELL 736fda9279dSmrg 737fda9279dSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 738fda9279dSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 739fda9279dSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 740fda9279dSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 741fda9279dSmrg# 742fda9279dSmrg_LT_COPYING 743fda9279dSmrg_LT_LIBTOOL_TAGS 744fda9279dSmrg 745fda9279dSmrg# ### BEGIN LIBTOOL CONFIG 746fda9279dSmrg_LT_LIBTOOL_CONFIG_VARS 747fda9279dSmrg_LT_LIBTOOL_TAG_VARS 748fda9279dSmrg# ### END LIBTOOL CONFIG 749fda9279dSmrg 750fda9279dSmrg_LT_EOF 751fda9279dSmrg 752fda9279dSmrg case $host_os in 753fda9279dSmrg aix3*) 754fda9279dSmrg cat <<\_LT_EOF >> "$cfgfile" 755fda9279dSmrg# AIX sometimes has problems with the GCC collect2 program. For some 756fda9279dSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 757fda9279dSmrg# vanish in a puff of smoke. 758fda9279dSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 759fda9279dSmrg COLLECT_NAMES= 760fda9279dSmrg export COLLECT_NAMES 761fda9279dSmrgfi 762fda9279dSmrg_LT_EOF 763fda9279dSmrg ;; 764fda9279dSmrg esac 765fda9279dSmrg 766fda9279dSmrg _LT_PROG_LTMAIN 767fda9279dSmrg 768fda9279dSmrg # We use sed instead of cat because bash on DJGPP gets confused if 769fda9279dSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 770fda9279dSmrg # text mode, it properly converts lines to CR/LF. This bash problem 771fda9279dSmrg # is reportedly fixed, but why not run on old versions too? 772fda9279dSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 773fda9279dSmrg || (rm -f "$cfgfile"; exit 1) 774fda9279dSmrg 775fda9279dSmrg _LT_PROG_REPLACE_SHELLFNS 776fda9279dSmrg 777fda9279dSmrg mv -f "$cfgfile" "$ofile" || 778fda9279dSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 779fda9279dSmrg chmod +x "$ofile" 780fda9279dSmrg], 781fda9279dSmrg[cat <<_LT_EOF >> "$ofile" 782fda9279dSmrg 783fda9279dSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 784fda9279dSmrgdnl in a comment (ie after a #). 785fda9279dSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 786fda9279dSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 787fda9279dSmrg# ### END LIBTOOL TAG CONFIG: $1 788fda9279dSmrg_LT_EOF 789fda9279dSmrg])dnl /m4_if 790fda9279dSmrg], 791fda9279dSmrg[m4_if([$1], [], [ 792fda9279dSmrg PACKAGE='$PACKAGE' 793fda9279dSmrg VERSION='$VERSION' 794fda9279dSmrg TIMESTAMP='$TIMESTAMP' 795fda9279dSmrg RM='$RM' 796fda9279dSmrg ofile='$ofile'], []) 797fda9279dSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 798fda9279dSmrg])# _LT_CONFIG 799fda9279dSmrg 800fda9279dSmrg 801fda9279dSmrg# LT_SUPPORTED_TAG(TAG) 802fda9279dSmrg# --------------------- 803fda9279dSmrg# Trace this macro to discover what tags are supported by the libtool 804fda9279dSmrg# --tag option, using: 805fda9279dSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 806fda9279dSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 807fda9279dSmrg 808fda9279dSmrg 809fda9279dSmrg# C support is built-in for now 810fda9279dSmrgm4_define([_LT_LANG_C_enabled], []) 811fda9279dSmrgm4_define([_LT_TAGS], []) 812fda9279dSmrg 813fda9279dSmrg 814fda9279dSmrg# LT_LANG(LANG) 815fda9279dSmrg# ------------- 816fda9279dSmrg# Enable libtool support for the given language if not already enabled. 817fda9279dSmrgAC_DEFUN([LT_LANG], 818fda9279dSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 819fda9279dSmrgm4_case([$1], 820fda9279dSmrg [C], [_LT_LANG(C)], 821fda9279dSmrg [C++], [_LT_LANG(CXX)], 822fda9279dSmrg [Go], [_LT_LANG(GO)], 823fda9279dSmrg [Java], [_LT_LANG(GCJ)], 824fda9279dSmrg [Fortran 77], [_LT_LANG(F77)], 825fda9279dSmrg [Fortran], [_LT_LANG(FC)], 826fda9279dSmrg [Windows Resource], [_LT_LANG(RC)], 827fda9279dSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 828fda9279dSmrg [_LT_LANG($1)], 829fda9279dSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 830fda9279dSmrg])# LT_LANG 831fda9279dSmrg 832fda9279dSmrg 833fda9279dSmrg# _LT_LANG(LANGNAME) 834fda9279dSmrg# ------------------ 835fda9279dSmrgm4_defun([_LT_LANG], 836fda9279dSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 837fda9279dSmrg [LT_SUPPORTED_TAG([$1])dnl 838fda9279dSmrg m4_append([_LT_TAGS], [$1 ])dnl 839fda9279dSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 840fda9279dSmrg _LT_LANG_$1_CONFIG($1)])dnl 841fda9279dSmrg])# _LT_LANG 842fda9279dSmrg 843fda9279dSmrg 844fda9279dSmrgm4_ifndef([AC_PROG_GO], [ 845fda9279dSmrg# NOTE: This macro has been submitted for inclusion into # 846fda9279dSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 847fda9279dSmrg# a released version of Autoconf we should remove this # 848fda9279dSmrg# macro and use it instead. # 849fda9279dSmrgm4_defun([AC_PROG_GO], 850fda9279dSmrg[AC_LANG_PUSH(Go)dnl 851fda9279dSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 852fda9279dSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 853fda9279dSmrg_AC_ARG_VAR_LDFLAGS()dnl 854fda9279dSmrgAC_CHECK_TOOL(GOC, gccgo) 855fda9279dSmrgif test -z "$GOC"; then 856fda9279dSmrg if test -n "$ac_tool_prefix"; then 857fda9279dSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 858fda9279dSmrg fi 859fda9279dSmrgfi 860fda9279dSmrgif test -z "$GOC"; then 861fda9279dSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 862fda9279dSmrgfi 863fda9279dSmrg])#m4_defun 864fda9279dSmrg])#m4_ifndef 865fda9279dSmrg 866fda9279dSmrg 867fda9279dSmrg# _LT_LANG_DEFAULT_CONFIG 868fda9279dSmrg# ----------------------- 869fda9279dSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 870fda9279dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 871fda9279dSmrg [LT_LANG(CXX)], 872fda9279dSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 873fda9279dSmrg 874fda9279dSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 875fda9279dSmrg [LT_LANG(F77)], 876fda9279dSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 877fda9279dSmrg 878fda9279dSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 879fda9279dSmrg [LT_LANG(FC)], 880fda9279dSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 881fda9279dSmrg 882fda9279dSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 883fda9279dSmrgdnl pulling things in needlessly. 884fda9279dSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 885fda9279dSmrg [LT_LANG(GCJ)], 886fda9279dSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 887fda9279dSmrg [LT_LANG(GCJ)], 888fda9279dSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 889fda9279dSmrg [LT_LANG(GCJ)], 890fda9279dSmrg [m4_ifdef([AC_PROG_GCJ], 891fda9279dSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 892fda9279dSmrg m4_ifdef([A][M_PROG_GCJ], 893fda9279dSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 894fda9279dSmrg m4_ifdef([LT_PROG_GCJ], 895fda9279dSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 896fda9279dSmrg 897fda9279dSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 898fda9279dSmrg [LT_LANG(GO)], 899fda9279dSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 900fda9279dSmrg 901fda9279dSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 902fda9279dSmrg [LT_LANG(RC)], 903fda9279dSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 904fda9279dSmrg])# _LT_LANG_DEFAULT_CONFIG 905fda9279dSmrg 906fda9279dSmrg# Obsolete macros: 907fda9279dSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 908fda9279dSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 909fda9279dSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 910fda9279dSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 911fda9279dSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 912fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 913fda9279dSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 914fda9279dSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 915fda9279dSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 916fda9279dSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 917fda9279dSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 918fda9279dSmrg 919fda9279dSmrg 920fda9279dSmrg# _LT_TAG_COMPILER 921fda9279dSmrg# ---------------- 922fda9279dSmrgm4_defun([_LT_TAG_COMPILER], 923fda9279dSmrg[AC_REQUIRE([AC_PROG_CC])dnl 924fda9279dSmrg 925fda9279dSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 926fda9279dSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 927fda9279dSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 928fda9279dSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 929fda9279dSmrg 930fda9279dSmrg# If no C compiler was specified, use CC. 931fda9279dSmrgLTCC=${LTCC-"$CC"} 932fda9279dSmrg 933fda9279dSmrg# If no C compiler flags were specified, use CFLAGS. 934fda9279dSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 935fda9279dSmrg 936fda9279dSmrg# Allow CC to be a program name with arguments. 937fda9279dSmrgcompiler=$CC 938fda9279dSmrg])# _LT_TAG_COMPILER 939fda9279dSmrg 940fda9279dSmrg 941fda9279dSmrg# _LT_COMPILER_BOILERPLATE 942fda9279dSmrg# ------------------------ 943fda9279dSmrg# Check for compiler boilerplate output or warnings with 944fda9279dSmrg# the simple compiler test code. 945fda9279dSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 946fda9279dSmrg[m4_require([_LT_DECL_SED])dnl 947fda9279dSmrgac_outfile=conftest.$ac_objext 948fda9279dSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 949fda9279dSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 950fda9279dSmrg_lt_compiler_boilerplate=`cat conftest.err` 951fda9279dSmrg$RM conftest* 952fda9279dSmrg])# _LT_COMPILER_BOILERPLATE 953fda9279dSmrg 954fda9279dSmrg 955fda9279dSmrg# _LT_LINKER_BOILERPLATE 956fda9279dSmrg# ---------------------- 957fda9279dSmrg# Check for linker boilerplate output or warnings with 958fda9279dSmrg# the simple link test code. 959fda9279dSmrgm4_defun([_LT_LINKER_BOILERPLATE], 960fda9279dSmrg[m4_require([_LT_DECL_SED])dnl 961fda9279dSmrgac_outfile=conftest.$ac_objext 962fda9279dSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 963fda9279dSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 964fda9279dSmrg_lt_linker_boilerplate=`cat conftest.err` 965fda9279dSmrg$RM -r conftest* 966fda9279dSmrg])# _LT_LINKER_BOILERPLATE 967fda9279dSmrg 968fda9279dSmrg# _LT_REQUIRED_DARWIN_CHECKS 969fda9279dSmrg# ------------------------- 970fda9279dSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 971fda9279dSmrg case $host_os in 972fda9279dSmrg rhapsody* | darwin*) 973fda9279dSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 974fda9279dSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 975fda9279dSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 976fda9279dSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 977fda9279dSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 978fda9279dSmrg _LT_DECL([], [DSYMUTIL], [1], 979fda9279dSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 980fda9279dSmrg _LT_DECL([], [NMEDIT], [1], 981fda9279dSmrg [Tool to change global to local symbols on Mac OS X]) 982fda9279dSmrg _LT_DECL([], [LIPO], [1], 983fda9279dSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 984fda9279dSmrg _LT_DECL([], [OTOOL], [1], 985fda9279dSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 986fda9279dSmrg _LT_DECL([], [OTOOL64], [1], 987fda9279dSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 988fda9279dSmrg 989fda9279dSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 990fda9279dSmrg [lt_cv_apple_cc_single_mod=no 991fda9279dSmrg if test -z "${LT_MULTI_MODULE}"; then 992fda9279dSmrg # By default we will add the -single_module flag. You can override 993fda9279dSmrg # by either setting the environment variable LT_MULTI_MODULE 994fda9279dSmrg # non-empty at configure time, or by adding -multi_module to the 995fda9279dSmrg # link flags. 996fda9279dSmrg rm -rf libconftest.dylib* 997fda9279dSmrg echo "int foo(void){return 1;}" > conftest.c 998fda9279dSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 999fda9279dSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1000fda9279dSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1001fda9279dSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1002fda9279dSmrg _lt_result=$? 1003fda9279dSmrg # If there is a non-empty error log, and "single_module" 1004fda9279dSmrg # appears in it, assume the flag caused a linker warning 1005fda9279dSmrg if test -s conftest.err && $GREP single_module conftest.err; then 1006fda9279dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1007fda9279dSmrg # Otherwise, if the output was created with a 0 exit code from 1008fda9279dSmrg # the compiler, it worked. 1009fda9279dSmrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 1010fda9279dSmrg lt_cv_apple_cc_single_mod=yes 1011fda9279dSmrg else 1012fda9279dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1013fda9279dSmrg fi 1014fda9279dSmrg rm -rf libconftest.dylib* 1015fda9279dSmrg rm -f conftest.* 1016fda9279dSmrg fi]) 1017fda9279dSmrg 1018fda9279dSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1019fda9279dSmrg [lt_cv_ld_exported_symbols_list], 1020fda9279dSmrg [lt_cv_ld_exported_symbols_list=no 1021fda9279dSmrg save_LDFLAGS=$LDFLAGS 1022fda9279dSmrg echo "_main" > conftest.sym 1023fda9279dSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1024fda9279dSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1025fda9279dSmrg [lt_cv_ld_exported_symbols_list=yes], 1026fda9279dSmrg [lt_cv_ld_exported_symbols_list=no]) 1027fda9279dSmrg LDFLAGS="$save_LDFLAGS" 1028fda9279dSmrg ]) 1029fda9279dSmrg 1030fda9279dSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1031fda9279dSmrg [lt_cv_ld_force_load=no 1032fda9279dSmrg cat > conftest.c << _LT_EOF 1033fda9279dSmrgint forced_loaded() { return 2;} 1034fda9279dSmrg_LT_EOF 1035fda9279dSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1036fda9279dSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1037fda9279dSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1038fda9279dSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1039fda9279dSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1040fda9279dSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1041fda9279dSmrg cat > conftest.c << _LT_EOF 1042fda9279dSmrgint main() { return 0;} 1043fda9279dSmrg_LT_EOF 1044fda9279dSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1045fda9279dSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1046fda9279dSmrg _lt_result=$? 1047fda9279dSmrg if test -s conftest.err && $GREP force_load conftest.err; then 1048fda9279dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1049fda9279dSmrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1050fda9279dSmrg lt_cv_ld_force_load=yes 1051fda9279dSmrg else 1052fda9279dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1053fda9279dSmrg fi 1054fda9279dSmrg rm -f conftest.err libconftest.a conftest conftest.c 1055fda9279dSmrg rm -rf conftest.dSYM 1056fda9279dSmrg ]) 1057fda9279dSmrg case $host_os in 1058fda9279dSmrg rhapsody* | darwin1.[[012]]) 1059fda9279dSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1060fda9279dSmrg darwin1.*) 1061fda9279dSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1062fda9279dSmrg darwin*) # darwin 5.x on 1063fda9279dSmrg # if running on 10.5 or later, the deployment target defaults 1064fda9279dSmrg # to the OS version, if on x86, and 10.4, the deployment 1065fda9279dSmrg # target defaults to 10.4. Don't you love it? 1066fda9279dSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1067fda9279dSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1068fda9279dSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1069fda9279dSmrg 10.[[012]]*) 1070fda9279dSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1071fda9279dSmrg 10.*) 1072fda9279dSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1073fda9279dSmrg esac 1074fda9279dSmrg ;; 1075fda9279dSmrg esac 1076fda9279dSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1077fda9279dSmrg _lt_dar_single_mod='$single_module' 1078fda9279dSmrg fi 1079fda9279dSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1080fda9279dSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1081fda9279dSmrg else 1082fda9279dSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1083fda9279dSmrg fi 1084fda9279dSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1085fda9279dSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1086fda9279dSmrg else 1087fda9279dSmrg _lt_dsymutil= 1088fda9279dSmrg fi 1089fda9279dSmrg ;; 1090fda9279dSmrg esac 1091fda9279dSmrg]) 1092fda9279dSmrg 1093fda9279dSmrg 1094fda9279dSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1095fda9279dSmrg# --------------------------------- 1096fda9279dSmrg# Checks for linker and compiler features on darwin 1097fda9279dSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1098fda9279dSmrg[ 1099fda9279dSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1100fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1101fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1102fda9279dSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1103fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1104fda9279dSmrg if test "$lt_cv_ld_force_load" = "yes"; then 1105fda9279dSmrg _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\"`' 1106fda9279dSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1107fda9279dSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1108fda9279dSmrg else 1109fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1110fda9279dSmrg fi 1111fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1112fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1113fda9279dSmrg case $cc_basename in 1114fda9279dSmrg ifort*) _lt_dar_can_shared=yes ;; 1115fda9279dSmrg *) _lt_dar_can_shared=$GCC ;; 1116fda9279dSmrg esac 1117fda9279dSmrg if test "$_lt_dar_can_shared" = "yes"; then 1118fda9279dSmrg output_verbose_link_cmd=func_echo_all 1119fda9279dSmrg _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}" 1120fda9279dSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1121fda9279dSmrg _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}" 1122fda9279dSmrg _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}" 1123fda9279dSmrg m4_if([$1], [CXX], 1124fda9279dSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1125fda9279dSmrg _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}" 1126fda9279dSmrg _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}" 1127fda9279dSmrg fi 1128fda9279dSmrg],[]) 1129fda9279dSmrg else 1130fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1131fda9279dSmrg fi 1132fda9279dSmrg]) 1133fda9279dSmrg 1134fda9279dSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1135fda9279dSmrg# ---------------------------------- 1136fda9279dSmrg# Links a minimal program and checks the executable 1137fda9279dSmrg# for the system default hardcoded library path. In most cases, 1138fda9279dSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1139fda9279dSmrg# the location of the communication and MPI libs are included too. 1140fda9279dSmrg# If we don't find anything, use the default library path according 1141fda9279dSmrg# to the aix ld manual. 1142fda9279dSmrg# Store the results from the different compilers for each TAGNAME. 1143fda9279dSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 1144fda9279dSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1145fda9279dSmrg[m4_require([_LT_DECL_SED])dnl 1146fda9279dSmrgif test "${lt_cv_aix_libpath+set}" = set; then 1147fda9279dSmrg aix_libpath=$lt_cv_aix_libpath 1148fda9279dSmrgelse 1149fda9279dSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1150fda9279dSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1151fda9279dSmrg lt_aix_libpath_sed='[ 1152fda9279dSmrg /Import File Strings/,/^$/ { 1153fda9279dSmrg /^0/ { 1154fda9279dSmrg s/^0 *\([^ ]*\) *$/\1/ 1155fda9279dSmrg p 1156fda9279dSmrg } 1157fda9279dSmrg }]' 1158fda9279dSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1159fda9279dSmrg # Check for a 64-bit object if we didn't find anything. 1160fda9279dSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1161fda9279dSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1162fda9279dSmrg fi],[]) 1163fda9279dSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1164fda9279dSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1165fda9279dSmrg fi 1166fda9279dSmrg ]) 1167fda9279dSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1168fda9279dSmrgfi 1169fda9279dSmrg])# _LT_SYS_MODULE_PATH_AIX 1170fda9279dSmrg 1171fda9279dSmrg 1172fda9279dSmrg# _LT_SHELL_INIT(ARG) 1173fda9279dSmrg# ------------------- 1174fda9279dSmrgm4_define([_LT_SHELL_INIT], 1175fda9279dSmrg[m4_divert_text([M4SH-INIT], [$1 1176fda9279dSmrg])])# _LT_SHELL_INIT 1177fda9279dSmrg 1178fda9279dSmrg 1179fda9279dSmrg 1180fda9279dSmrg# _LT_PROG_ECHO_BACKSLASH 1181fda9279dSmrg# ----------------------- 1182fda9279dSmrg# Find how we can fake an echo command that does not interpret backslash. 1183fda9279dSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1184fda9279dSmrg# of the generated configure script which will find a shell with a builtin 1185fda9279dSmrg# printf (which we can use as an echo command). 1186fda9279dSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1187fda9279dSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1188fda9279dSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1189fda9279dSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1190fda9279dSmrg 1191fda9279dSmrgAC_MSG_CHECKING([how to print strings]) 1192fda9279dSmrg# Test print first, because it will be a builtin if present. 1193fda9279dSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1194fda9279dSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1195fda9279dSmrg ECHO='print -r --' 1196fda9279dSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1197fda9279dSmrg ECHO='printf %s\n' 1198fda9279dSmrgelse 1199fda9279dSmrg # Use this function as a fallback that always works. 1200fda9279dSmrg func_fallback_echo () 1201fda9279dSmrg { 1202fda9279dSmrg eval 'cat <<_LTECHO_EOF 1203fda9279dSmrg$[]1 1204fda9279dSmrg_LTECHO_EOF' 1205fda9279dSmrg } 1206fda9279dSmrg ECHO='func_fallback_echo' 1207fda9279dSmrgfi 1208fda9279dSmrg 1209fda9279dSmrg# func_echo_all arg... 1210fda9279dSmrg# Invoke $ECHO with all args, space-separated. 1211fda9279dSmrgfunc_echo_all () 1212fda9279dSmrg{ 1213fda9279dSmrg $ECHO "$*" 1214fda9279dSmrg} 1215fda9279dSmrg 1216fda9279dSmrgcase "$ECHO" in 1217fda9279dSmrg printf*) AC_MSG_RESULT([printf]) ;; 1218fda9279dSmrg print*) AC_MSG_RESULT([print -r]) ;; 1219fda9279dSmrg *) AC_MSG_RESULT([cat]) ;; 1220fda9279dSmrgesac 1221fda9279dSmrg 1222fda9279dSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1223fda9279dSmrg[_AS_DETECT_SUGGESTED([ 1224fda9279dSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1225fda9279dSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1226fda9279dSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1227fda9279dSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1228fda9279dSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1229fda9279dSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1230fda9279dSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1231fda9279dSmrg 1232fda9279dSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1233fda9279dSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1234fda9279dSmrg])# _LT_PROG_ECHO_BACKSLASH 1235fda9279dSmrg 1236fda9279dSmrg 1237fda9279dSmrg# _LT_WITH_SYSROOT 1238fda9279dSmrg# ---------------- 1239fda9279dSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1240fda9279dSmrg[AC_MSG_CHECKING([for sysroot]) 1241fda9279dSmrgAC_ARG_WITH([sysroot], 1242fda9279dSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1243fda9279dSmrg (or the compiler's sysroot if not specified).], 1244fda9279dSmrg[], [with_sysroot=no]) 1245fda9279dSmrg 1246fda9279dSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 1247fda9279dSmrgdnl in case the user passed a directory name. 1248fda9279dSmrglt_sysroot= 1249fda9279dSmrgcase ${with_sysroot} in #( 1250fda9279dSmrg yes) 1251fda9279dSmrg if test "$GCC" = yes; then 1252fda9279dSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1253fda9279dSmrg fi 1254fda9279dSmrg ;; #( 1255fda9279dSmrg /*) 1256fda9279dSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1257fda9279dSmrg ;; #( 1258fda9279dSmrg no|'') 1259fda9279dSmrg ;; #( 1260fda9279dSmrg *) 1261fda9279dSmrg AC_MSG_RESULT([${with_sysroot}]) 1262fda9279dSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1263fda9279dSmrg ;; 1264fda9279dSmrgesac 1265fda9279dSmrg 1266fda9279dSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1267fda9279dSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1268fda9279dSmrg[dependent libraries, and in which our libraries should be installed.])]) 1269fda9279dSmrg 1270fda9279dSmrg# _LT_ENABLE_LOCK 1271fda9279dSmrg# --------------- 1272fda9279dSmrgm4_defun([_LT_ENABLE_LOCK], 1273fda9279dSmrg[AC_ARG_ENABLE([libtool-lock], 1274fda9279dSmrg [AS_HELP_STRING([--disable-libtool-lock], 1275fda9279dSmrg [avoid locking (might break parallel builds)])]) 1276fda9279dSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1277fda9279dSmrg 1278fda9279dSmrg# Some flags need to be propagated to the compiler or linker for good 1279fda9279dSmrg# libtool support. 1280fda9279dSmrgcase $host in 1281fda9279dSmrgia64-*-hpux*) 1282fda9279dSmrg # Find out which ABI we are using. 1283fda9279dSmrg echo 'int i;' > conftest.$ac_ext 1284fda9279dSmrg if AC_TRY_EVAL(ac_compile); then 1285fda9279dSmrg case `/usr/bin/file conftest.$ac_objext` in 1286fda9279dSmrg *ELF-32*) 1287fda9279dSmrg HPUX_IA64_MODE="32" 1288fda9279dSmrg ;; 1289fda9279dSmrg *ELF-64*) 1290fda9279dSmrg HPUX_IA64_MODE="64" 1291fda9279dSmrg ;; 1292fda9279dSmrg esac 1293fda9279dSmrg fi 1294fda9279dSmrg rm -rf conftest* 1295fda9279dSmrg ;; 1296fda9279dSmrg*-*-irix6*) 1297fda9279dSmrg # Find out which ABI we are using. 1298fda9279dSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1299fda9279dSmrg if AC_TRY_EVAL(ac_compile); then 1300fda9279dSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1301fda9279dSmrg case `/usr/bin/file conftest.$ac_objext` in 1302fda9279dSmrg *32-bit*) 1303fda9279dSmrg LD="${LD-ld} -melf32bsmip" 1304fda9279dSmrg ;; 1305fda9279dSmrg *N32*) 1306fda9279dSmrg LD="${LD-ld} -melf32bmipn32" 1307fda9279dSmrg ;; 1308fda9279dSmrg *64-bit*) 1309fda9279dSmrg LD="${LD-ld} -melf64bmip" 1310fda9279dSmrg ;; 1311fda9279dSmrg esac 1312fda9279dSmrg else 1313fda9279dSmrg case `/usr/bin/file conftest.$ac_objext` in 1314fda9279dSmrg *32-bit*) 1315fda9279dSmrg LD="${LD-ld} -32" 1316fda9279dSmrg ;; 1317fda9279dSmrg *N32*) 1318fda9279dSmrg LD="${LD-ld} -n32" 1319fda9279dSmrg ;; 1320fda9279dSmrg *64-bit*) 1321fda9279dSmrg LD="${LD-ld} -64" 1322fda9279dSmrg ;; 1323fda9279dSmrg esac 1324fda9279dSmrg fi 1325fda9279dSmrg fi 1326fda9279dSmrg rm -rf conftest* 1327fda9279dSmrg ;; 1328fda9279dSmrg 1329fda9279dSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1330fda9279dSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1331fda9279dSmrg # Find out which ABI we are using. 1332fda9279dSmrg echo 'int i;' > conftest.$ac_ext 1333fda9279dSmrg if AC_TRY_EVAL(ac_compile); then 1334fda9279dSmrg case `/usr/bin/file conftest.o` in 1335fda9279dSmrg *32-bit*) 1336fda9279dSmrg case $host in 1337fda9279dSmrg x86_64-*kfreebsd*-gnu) 1338fda9279dSmrg LD="${LD-ld} -m elf_i386_fbsd" 1339fda9279dSmrg ;; 1340fda9279dSmrg x86_64-*linux*) 1341fda9279dSmrg case `/usr/bin/file conftest.o` in 1342fda9279dSmrg *x86-64*) 1343fda9279dSmrg LD="${LD-ld} -m elf32_x86_64" 1344fda9279dSmrg ;; 1345fda9279dSmrg *) 1346fda9279dSmrg LD="${LD-ld} -m elf_i386" 1347fda9279dSmrg ;; 1348fda9279dSmrg esac 1349fda9279dSmrg ;; 1350fda9279dSmrg powerpc64le-*) 1351fda9279dSmrg LD="${LD-ld} -m elf32lppclinux" 1352fda9279dSmrg ;; 1353fda9279dSmrg powerpc64-*) 1354fda9279dSmrg LD="${LD-ld} -m elf32ppclinux" 1355fda9279dSmrg ;; 1356fda9279dSmrg s390x-*linux*) 1357fda9279dSmrg LD="${LD-ld} -m elf_s390" 1358fda9279dSmrg ;; 1359fda9279dSmrg sparc64-*linux*) 1360fda9279dSmrg LD="${LD-ld} -m elf32_sparc" 1361fda9279dSmrg ;; 1362fda9279dSmrg esac 1363fda9279dSmrg ;; 1364fda9279dSmrg *64-bit*) 1365fda9279dSmrg case $host in 1366fda9279dSmrg x86_64-*kfreebsd*-gnu) 1367fda9279dSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1368fda9279dSmrg ;; 1369fda9279dSmrg x86_64-*linux*) 1370fda9279dSmrg LD="${LD-ld} -m elf_x86_64" 1371fda9279dSmrg ;; 1372fda9279dSmrg powerpcle-*) 1373fda9279dSmrg LD="${LD-ld} -m elf64lppc" 1374fda9279dSmrg ;; 1375fda9279dSmrg powerpc-*) 1376fda9279dSmrg LD="${LD-ld} -m elf64ppc" 1377fda9279dSmrg ;; 1378fda9279dSmrg s390*-*linux*|s390*-*tpf*) 1379fda9279dSmrg LD="${LD-ld} -m elf64_s390" 1380fda9279dSmrg ;; 1381fda9279dSmrg sparc*-*linux*) 1382fda9279dSmrg LD="${LD-ld} -m elf64_sparc" 1383fda9279dSmrg ;; 1384fda9279dSmrg esac 1385fda9279dSmrg ;; 1386fda9279dSmrg esac 1387fda9279dSmrg fi 1388fda9279dSmrg rm -rf conftest* 1389fda9279dSmrg ;; 1390fda9279dSmrg 1391fda9279dSmrg*-*-sco3.2v5*) 1392fda9279dSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1393fda9279dSmrg SAVE_CFLAGS="$CFLAGS" 1394fda9279dSmrg CFLAGS="$CFLAGS -belf" 1395fda9279dSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1396fda9279dSmrg [AC_LANG_PUSH(C) 1397fda9279dSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1398fda9279dSmrg AC_LANG_POP]) 1399fda9279dSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1400fda9279dSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1401fda9279dSmrg CFLAGS="$SAVE_CFLAGS" 1402fda9279dSmrg fi 1403fda9279dSmrg ;; 1404fda9279dSmrg*-*solaris*) 1405fda9279dSmrg # Find out which ABI we are using. 1406fda9279dSmrg echo 'int i;' > conftest.$ac_ext 1407fda9279dSmrg if AC_TRY_EVAL(ac_compile); then 1408fda9279dSmrg case `/usr/bin/file conftest.o` in 1409fda9279dSmrg *64-bit*) 1410fda9279dSmrg case $lt_cv_prog_gnu_ld in 1411fda9279dSmrg yes*) 1412fda9279dSmrg case $host in 1413fda9279dSmrg i?86-*-solaris*) 1414fda9279dSmrg LD="${LD-ld} -m elf_x86_64" 1415fda9279dSmrg ;; 1416fda9279dSmrg sparc*-*-solaris*) 1417fda9279dSmrg LD="${LD-ld} -m elf64_sparc" 1418fda9279dSmrg ;; 1419fda9279dSmrg esac 1420fda9279dSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1421fda9279dSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1422fda9279dSmrg LD="${LD-ld}_sol2" 1423fda9279dSmrg fi 1424fda9279dSmrg ;; 1425fda9279dSmrg *) 1426fda9279dSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1427fda9279dSmrg LD="${LD-ld} -64" 1428fda9279dSmrg fi 1429fda9279dSmrg ;; 1430fda9279dSmrg esac 1431fda9279dSmrg ;; 1432fda9279dSmrg esac 1433fda9279dSmrg fi 1434fda9279dSmrg rm -rf conftest* 1435fda9279dSmrg ;; 1436fda9279dSmrgesac 1437fda9279dSmrg 1438fda9279dSmrgneed_locks="$enable_libtool_lock" 1439fda9279dSmrg])# _LT_ENABLE_LOCK 1440fda9279dSmrg 1441fda9279dSmrg 1442fda9279dSmrg# _LT_PROG_AR 1443fda9279dSmrg# ----------- 1444fda9279dSmrgm4_defun([_LT_PROG_AR], 1445fda9279dSmrg[AC_CHECK_TOOLS(AR, [ar], false) 1446fda9279dSmrg: ${AR=ar} 1447fda9279dSmrg: ${AR_FLAGS=cru} 1448fda9279dSmrg_LT_DECL([], [AR], [1], [The archiver]) 1449fda9279dSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1450fda9279dSmrg 1451fda9279dSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1452fda9279dSmrg [lt_cv_ar_at_file=no 1453fda9279dSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1454fda9279dSmrg [echo conftest.$ac_objext > conftest.lst 1455fda9279dSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1456fda9279dSmrg AC_TRY_EVAL([lt_ar_try]) 1457fda9279dSmrg if test "$ac_status" -eq 0; then 1458fda9279dSmrg # Ensure the archiver fails upon bogus file names. 1459fda9279dSmrg rm -f conftest.$ac_objext libconftest.a 1460fda9279dSmrg AC_TRY_EVAL([lt_ar_try]) 1461fda9279dSmrg if test "$ac_status" -ne 0; then 1462fda9279dSmrg lt_cv_ar_at_file=@ 1463fda9279dSmrg fi 1464fda9279dSmrg fi 1465fda9279dSmrg rm -f conftest.* libconftest.a 1466fda9279dSmrg ]) 1467fda9279dSmrg ]) 1468fda9279dSmrg 1469fda9279dSmrgif test "x$lt_cv_ar_at_file" = xno; then 1470fda9279dSmrg archiver_list_spec= 1471fda9279dSmrgelse 1472fda9279dSmrg archiver_list_spec=$lt_cv_ar_at_file 1473fda9279dSmrgfi 1474fda9279dSmrg_LT_DECL([], [archiver_list_spec], [1], 1475fda9279dSmrg [How to feed a file listing to the archiver]) 1476fda9279dSmrg])# _LT_PROG_AR 1477fda9279dSmrg 1478fda9279dSmrg 1479fda9279dSmrg# _LT_CMD_OLD_ARCHIVE 1480fda9279dSmrg# ------------------- 1481fda9279dSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1482fda9279dSmrg[_LT_PROG_AR 1483fda9279dSmrg 1484fda9279dSmrgAC_CHECK_TOOL(STRIP, strip, :) 1485fda9279dSmrgtest -z "$STRIP" && STRIP=: 1486fda9279dSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1487fda9279dSmrg 1488fda9279dSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1489fda9279dSmrgtest -z "$RANLIB" && RANLIB=: 1490fda9279dSmrg_LT_DECL([], [RANLIB], [1], 1491fda9279dSmrg [Commands used to install an old-style archive]) 1492fda9279dSmrg 1493fda9279dSmrg# Determine commands to create old-style static archives. 1494fda9279dSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1495fda9279dSmrgold_postinstall_cmds='chmod 644 $oldlib' 1496fda9279dSmrgold_postuninstall_cmds= 1497fda9279dSmrg 1498fda9279dSmrgif test -n "$RANLIB"; then 1499fda9279dSmrg case $host_os in 1500fda9279dSmrg openbsd*) 1501fda9279dSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1502fda9279dSmrg ;; 1503fda9279dSmrg *) 1504fda9279dSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1505fda9279dSmrg ;; 1506fda9279dSmrg esac 1507fda9279dSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1508fda9279dSmrgfi 1509fda9279dSmrg 1510fda9279dSmrgcase $host_os in 1511fda9279dSmrg darwin*) 1512fda9279dSmrg lock_old_archive_extraction=yes ;; 1513fda9279dSmrg *) 1514fda9279dSmrg lock_old_archive_extraction=no ;; 1515fda9279dSmrgesac 1516fda9279dSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1517fda9279dSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1518fda9279dSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1519fda9279dSmrg [Commands used to build an old-style archive]) 1520fda9279dSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 1521fda9279dSmrg [Whether to use a lock for old archive extraction]) 1522fda9279dSmrg])# _LT_CMD_OLD_ARCHIVE 1523fda9279dSmrg 1524fda9279dSmrg 1525fda9279dSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1526fda9279dSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1527fda9279dSmrg# ---------------------------------------------------------------- 1528fda9279dSmrg# Check whether the given compiler option works 1529fda9279dSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1530fda9279dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1531fda9279dSmrgm4_require([_LT_DECL_SED])dnl 1532fda9279dSmrgAC_CACHE_CHECK([$1], [$2], 1533fda9279dSmrg [$2=no 1534fda9279dSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1535fda9279dSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1536fda9279dSmrg lt_compiler_flag="$3" 1537fda9279dSmrg # Insert the option either (1) after the last *FLAGS variable, or 1538fda9279dSmrg # (2) before a word containing "conftest.", or (3) at the end. 1539fda9279dSmrg # Note that $ac_compile itself does not contain backslashes and begins 1540fda9279dSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1541fda9279dSmrg # The option is referenced via a variable to avoid confusing sed. 1542fda9279dSmrg lt_compile=`echo "$ac_compile" | $SED \ 1543fda9279dSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1544fda9279dSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1545fda9279dSmrg -e 's:$: $lt_compiler_flag:'` 1546fda9279dSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1547fda9279dSmrg (eval "$lt_compile" 2>conftest.err) 1548fda9279dSmrg ac_status=$? 1549fda9279dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1550fda9279dSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1551fda9279dSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1552fda9279dSmrg # The compiler can only warn and ignore the option if not recognized 1553fda9279dSmrg # So say no if there are warnings other than the usual output. 1554fda9279dSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1555fda9279dSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1556fda9279dSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1557fda9279dSmrg $2=yes 1558fda9279dSmrg fi 1559fda9279dSmrg fi 1560fda9279dSmrg $RM conftest* 1561fda9279dSmrg]) 1562fda9279dSmrg 1563fda9279dSmrgif test x"[$]$2" = xyes; then 1564fda9279dSmrg m4_if([$5], , :, [$5]) 1565fda9279dSmrgelse 1566fda9279dSmrg m4_if([$6], , :, [$6]) 1567fda9279dSmrgfi 1568fda9279dSmrg])# _LT_COMPILER_OPTION 1569fda9279dSmrg 1570fda9279dSmrg# Old name: 1571fda9279dSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1572fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 1573fda9279dSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1574fda9279dSmrg 1575fda9279dSmrg 1576fda9279dSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1577fda9279dSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1578fda9279dSmrg# ---------------------------------------------------- 1579fda9279dSmrg# Check whether the given linker option works 1580fda9279dSmrgAC_DEFUN([_LT_LINKER_OPTION], 1581fda9279dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1582fda9279dSmrgm4_require([_LT_DECL_SED])dnl 1583fda9279dSmrgAC_CACHE_CHECK([$1], [$2], 1584fda9279dSmrg [$2=no 1585fda9279dSmrg save_LDFLAGS="$LDFLAGS" 1586fda9279dSmrg LDFLAGS="$LDFLAGS $3" 1587fda9279dSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1588fda9279dSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1589fda9279dSmrg # The linker can only warn and ignore the option if not recognized 1590fda9279dSmrg # So say no if there are warnings 1591fda9279dSmrg if test -s conftest.err; then 1592fda9279dSmrg # Append any errors to the config.log. 1593fda9279dSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1594fda9279dSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1595fda9279dSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1596fda9279dSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1597fda9279dSmrg $2=yes 1598fda9279dSmrg fi 1599fda9279dSmrg else 1600fda9279dSmrg $2=yes 1601fda9279dSmrg fi 1602fda9279dSmrg fi 1603fda9279dSmrg $RM -r conftest* 1604fda9279dSmrg LDFLAGS="$save_LDFLAGS" 1605fda9279dSmrg]) 1606fda9279dSmrg 1607fda9279dSmrgif test x"[$]$2" = xyes; then 1608fda9279dSmrg m4_if([$4], , :, [$4]) 1609fda9279dSmrgelse 1610fda9279dSmrg m4_if([$5], , :, [$5]) 1611fda9279dSmrgfi 1612fda9279dSmrg])# _LT_LINKER_OPTION 1613fda9279dSmrg 1614fda9279dSmrg# Old name: 1615fda9279dSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1616fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 1617fda9279dSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1618fda9279dSmrg 1619fda9279dSmrg 1620fda9279dSmrg# LT_CMD_MAX_LEN 1621fda9279dSmrg#--------------- 1622fda9279dSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1623fda9279dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1624fda9279dSmrg# find the maximum length of command line arguments 1625fda9279dSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1626fda9279dSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1627fda9279dSmrg i=0 1628fda9279dSmrg teststring="ABCD" 1629fda9279dSmrg 1630fda9279dSmrg case $build_os in 1631fda9279dSmrg msdosdjgpp*) 1632fda9279dSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1633fda9279dSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1634fda9279dSmrg # during glob expansion). Even if it were fixed, the result of this 1635fda9279dSmrg # check would be larger than it should be. 1636fda9279dSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1637fda9279dSmrg ;; 1638fda9279dSmrg 1639fda9279dSmrg gnu*) 1640fda9279dSmrg # Under GNU Hurd, this test is not required because there is 1641fda9279dSmrg # no limit to the length of command line arguments. 1642fda9279dSmrg # Libtool will interpret -1 as no limit whatsoever 1643fda9279dSmrg lt_cv_sys_max_cmd_len=-1; 1644fda9279dSmrg ;; 1645fda9279dSmrg 1646fda9279dSmrg cygwin* | mingw* | cegcc*) 1647fda9279dSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1648fda9279dSmrg # about 5 minutes as the teststring grows exponentially. 1649fda9279dSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1650fda9279dSmrg # you end up with a "frozen" computer, even though with patience 1651fda9279dSmrg # the test eventually succeeds (with a max line length of 256k). 1652fda9279dSmrg # Instead, let's just punt: use the minimum linelength reported by 1653fda9279dSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1654fda9279dSmrg lt_cv_sys_max_cmd_len=8192; 1655fda9279dSmrg ;; 1656fda9279dSmrg 1657fda9279dSmrg mint*) 1658fda9279dSmrg # On MiNT this can take a long time and run out of memory. 1659fda9279dSmrg lt_cv_sys_max_cmd_len=8192; 1660fda9279dSmrg ;; 1661fda9279dSmrg 1662fda9279dSmrg amigaos*) 1663fda9279dSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1664fda9279dSmrg # So we just punt and use a minimum line length of 8192. 1665fda9279dSmrg lt_cv_sys_max_cmd_len=8192; 1666fda9279dSmrg ;; 1667fda9279dSmrg 1668fda9279dSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1669fda9279dSmrg # This has been around since 386BSD, at least. Likely further. 1670fda9279dSmrg if test -x /sbin/sysctl; then 1671fda9279dSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1672fda9279dSmrg elif test -x /usr/sbin/sysctl; then 1673fda9279dSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1674fda9279dSmrg else 1675fda9279dSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1676fda9279dSmrg fi 1677fda9279dSmrg # And add a safety zone 1678fda9279dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1679fda9279dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1680fda9279dSmrg ;; 1681fda9279dSmrg 1682fda9279dSmrg interix*) 1683fda9279dSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1684fda9279dSmrg lt_cv_sys_max_cmd_len=196608 1685fda9279dSmrg ;; 1686fda9279dSmrg 1687fda9279dSmrg os2*) 1688fda9279dSmrg # The test takes a long time on OS/2. 1689fda9279dSmrg lt_cv_sys_max_cmd_len=8192 1690fda9279dSmrg ;; 1691fda9279dSmrg 1692fda9279dSmrg osf*) 1693fda9279dSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1694fda9279dSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1695fda9279dSmrg # nice to cause kernel panics so lets avoid the loop below. 1696fda9279dSmrg # First set a reasonable default. 1697fda9279dSmrg lt_cv_sys_max_cmd_len=16384 1698fda9279dSmrg # 1699fda9279dSmrg if test -x /sbin/sysconfig; then 1700fda9279dSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1701fda9279dSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1702fda9279dSmrg esac 1703fda9279dSmrg fi 1704fda9279dSmrg ;; 1705fda9279dSmrg sco3.2v5*) 1706fda9279dSmrg lt_cv_sys_max_cmd_len=102400 1707fda9279dSmrg ;; 1708fda9279dSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1709fda9279dSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1710fda9279dSmrg if test -n "$kargmax"; then 1711fda9279dSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1712fda9279dSmrg else 1713fda9279dSmrg lt_cv_sys_max_cmd_len=32768 1714fda9279dSmrg fi 1715fda9279dSmrg ;; 1716fda9279dSmrg *) 1717fda9279dSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1718fda9279dSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1719fda9279dSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 1720fda9279dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1721fda9279dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1722fda9279dSmrg else 1723fda9279dSmrg # Make teststring a little bigger before we do anything with it. 1724fda9279dSmrg # a 1K string should be a reasonable start. 1725fda9279dSmrg for i in 1 2 3 4 5 6 7 8 ; do 1726fda9279dSmrg teststring=$teststring$teststring 1727fda9279dSmrg done 1728fda9279dSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1729fda9279dSmrg # If test is not a shell built-in, we'll probably end up computing a 1730fda9279dSmrg # maximum length that is only half of the actual maximum length, but 1731fda9279dSmrg # we can't tell. 1732fda9279dSmrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1733fda9279dSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1734fda9279dSmrg test $i != 17 # 1/2 MB should be enough 1735fda9279dSmrg do 1736fda9279dSmrg i=`expr $i + 1` 1737fda9279dSmrg teststring=$teststring$teststring 1738fda9279dSmrg done 1739fda9279dSmrg # Only check the string length outside the loop. 1740fda9279dSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1741fda9279dSmrg teststring= 1742fda9279dSmrg # Add a significant safety factor because C++ compilers can tack on 1743fda9279dSmrg # massive amounts of additional arguments before passing them to the 1744fda9279dSmrg # linker. It appears as though 1/2 is a usable value. 1745fda9279dSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1746fda9279dSmrg fi 1747fda9279dSmrg ;; 1748fda9279dSmrg esac 1749fda9279dSmrg]) 1750fda9279dSmrgif test -n $lt_cv_sys_max_cmd_len ; then 1751fda9279dSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1752fda9279dSmrgelse 1753fda9279dSmrg AC_MSG_RESULT(none) 1754fda9279dSmrgfi 1755fda9279dSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1756fda9279dSmrg_LT_DECL([], [max_cmd_len], [0], 1757fda9279dSmrg [What is the maximum length of a command?]) 1758fda9279dSmrg])# LT_CMD_MAX_LEN 1759fda9279dSmrg 1760fda9279dSmrg# Old name: 1761fda9279dSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1762fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 1763fda9279dSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1764fda9279dSmrg 1765fda9279dSmrg 1766fda9279dSmrg# _LT_HEADER_DLFCN 1767fda9279dSmrg# ---------------- 1768fda9279dSmrgm4_defun([_LT_HEADER_DLFCN], 1769fda9279dSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1770fda9279dSmrg])# _LT_HEADER_DLFCN 1771fda9279dSmrg 1772fda9279dSmrg 1773fda9279dSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1774fda9279dSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1775fda9279dSmrg# ---------------------------------------------------------------- 1776fda9279dSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1777fda9279dSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1778fda9279dSmrgif test "$cross_compiling" = yes; then : 1779fda9279dSmrg [$4] 1780fda9279dSmrgelse 1781fda9279dSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1782fda9279dSmrg lt_status=$lt_dlunknown 1783fda9279dSmrg cat > conftest.$ac_ext <<_LT_EOF 1784fda9279dSmrg[#line $LINENO "configure" 1785fda9279dSmrg#include "confdefs.h" 1786fda9279dSmrg 1787fda9279dSmrg#if HAVE_DLFCN_H 1788fda9279dSmrg#include <dlfcn.h> 1789fda9279dSmrg#endif 1790fda9279dSmrg 1791fda9279dSmrg#include <stdio.h> 1792fda9279dSmrg 1793fda9279dSmrg#ifdef RTLD_GLOBAL 1794fda9279dSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1795fda9279dSmrg#else 1796fda9279dSmrg# ifdef DL_GLOBAL 1797fda9279dSmrg# define LT_DLGLOBAL DL_GLOBAL 1798fda9279dSmrg# else 1799fda9279dSmrg# define LT_DLGLOBAL 0 1800fda9279dSmrg# endif 1801fda9279dSmrg#endif 1802fda9279dSmrg 1803fda9279dSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1804fda9279dSmrg find out it does not work in some platform. */ 1805fda9279dSmrg#ifndef LT_DLLAZY_OR_NOW 1806fda9279dSmrg# ifdef RTLD_LAZY 1807fda9279dSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1808fda9279dSmrg# else 1809fda9279dSmrg# ifdef DL_LAZY 1810fda9279dSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1811fda9279dSmrg# else 1812fda9279dSmrg# ifdef RTLD_NOW 1813fda9279dSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1814fda9279dSmrg# else 1815fda9279dSmrg# ifdef DL_NOW 1816fda9279dSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1817fda9279dSmrg# else 1818fda9279dSmrg# define LT_DLLAZY_OR_NOW 0 1819fda9279dSmrg# endif 1820fda9279dSmrg# endif 1821fda9279dSmrg# endif 1822fda9279dSmrg# endif 1823fda9279dSmrg#endif 1824fda9279dSmrg 1825fda9279dSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 1826fda9279dSmrg correspondingly for the symbols needed. */ 1827fda9279dSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1828fda9279dSmrgint fnord () __attribute__((visibility("default"))); 1829fda9279dSmrg#endif 1830fda9279dSmrg 1831fda9279dSmrgint fnord () { return 42; } 1832fda9279dSmrgint main () 1833fda9279dSmrg{ 1834fda9279dSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1835fda9279dSmrg int status = $lt_dlunknown; 1836fda9279dSmrg 1837fda9279dSmrg if (self) 1838fda9279dSmrg { 1839fda9279dSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1840fda9279dSmrg else 1841fda9279dSmrg { 1842fda9279dSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1843fda9279dSmrg else puts (dlerror ()); 1844fda9279dSmrg } 1845fda9279dSmrg /* dlclose (self); */ 1846fda9279dSmrg } 1847fda9279dSmrg else 1848fda9279dSmrg puts (dlerror ()); 1849fda9279dSmrg 1850fda9279dSmrg return status; 1851fda9279dSmrg}] 1852fda9279dSmrg_LT_EOF 1853fda9279dSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1854fda9279dSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1855fda9279dSmrg lt_status=$? 1856fda9279dSmrg case x$lt_status in 1857fda9279dSmrg x$lt_dlno_uscore) $1 ;; 1858fda9279dSmrg x$lt_dlneed_uscore) $2 ;; 1859fda9279dSmrg x$lt_dlunknown|x*) $3 ;; 1860fda9279dSmrg esac 1861fda9279dSmrg else : 1862fda9279dSmrg # compilation failed 1863fda9279dSmrg $3 1864fda9279dSmrg fi 1865fda9279dSmrgfi 1866fda9279dSmrgrm -fr conftest* 1867fda9279dSmrg])# _LT_TRY_DLOPEN_SELF 1868fda9279dSmrg 1869fda9279dSmrg 1870fda9279dSmrg# LT_SYS_DLOPEN_SELF 1871fda9279dSmrg# ------------------ 1872fda9279dSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1873fda9279dSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1874fda9279dSmrgif test "x$enable_dlopen" != xyes; then 1875fda9279dSmrg enable_dlopen=unknown 1876fda9279dSmrg enable_dlopen_self=unknown 1877fda9279dSmrg enable_dlopen_self_static=unknown 1878fda9279dSmrgelse 1879fda9279dSmrg lt_cv_dlopen=no 1880fda9279dSmrg lt_cv_dlopen_libs= 1881fda9279dSmrg 1882fda9279dSmrg case $host_os in 1883fda9279dSmrg beos*) 1884fda9279dSmrg lt_cv_dlopen="load_add_on" 1885fda9279dSmrg lt_cv_dlopen_libs= 1886fda9279dSmrg lt_cv_dlopen_self=yes 1887fda9279dSmrg ;; 1888fda9279dSmrg 1889fda9279dSmrg mingw* | pw32* | cegcc*) 1890fda9279dSmrg lt_cv_dlopen="LoadLibrary" 1891fda9279dSmrg lt_cv_dlopen_libs= 1892fda9279dSmrg ;; 1893fda9279dSmrg 1894fda9279dSmrg cygwin*) 1895fda9279dSmrg lt_cv_dlopen="dlopen" 1896fda9279dSmrg lt_cv_dlopen_libs= 1897fda9279dSmrg ;; 1898fda9279dSmrg 1899fda9279dSmrg darwin*) 1900fda9279dSmrg # if libdl is installed we need to link against it 1901fda9279dSmrg AC_CHECK_LIB([dl], [dlopen], 1902fda9279dSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1903fda9279dSmrg lt_cv_dlopen="dyld" 1904fda9279dSmrg lt_cv_dlopen_libs= 1905fda9279dSmrg lt_cv_dlopen_self=yes 1906fda9279dSmrg ]) 1907fda9279dSmrg ;; 1908fda9279dSmrg 1909fda9279dSmrg *) 1910fda9279dSmrg AC_CHECK_FUNC([shl_load], 1911fda9279dSmrg [lt_cv_dlopen="shl_load"], 1912fda9279dSmrg [AC_CHECK_LIB([dld], [shl_load], 1913fda9279dSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1914fda9279dSmrg [AC_CHECK_FUNC([dlopen], 1915fda9279dSmrg [lt_cv_dlopen="dlopen"], 1916fda9279dSmrg [AC_CHECK_LIB([dl], [dlopen], 1917fda9279dSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1918fda9279dSmrg [AC_CHECK_LIB([svld], [dlopen], 1919fda9279dSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1920fda9279dSmrg [AC_CHECK_LIB([dld], [dld_link], 1921fda9279dSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1922fda9279dSmrg ]) 1923fda9279dSmrg ]) 1924fda9279dSmrg ]) 1925fda9279dSmrg ]) 1926fda9279dSmrg ]) 1927fda9279dSmrg ;; 1928fda9279dSmrg esac 1929fda9279dSmrg 1930fda9279dSmrg if test "x$lt_cv_dlopen" != xno; then 1931fda9279dSmrg enable_dlopen=yes 1932fda9279dSmrg else 1933fda9279dSmrg enable_dlopen=no 1934fda9279dSmrg fi 1935fda9279dSmrg 1936fda9279dSmrg case $lt_cv_dlopen in 1937fda9279dSmrg dlopen) 1938fda9279dSmrg save_CPPFLAGS="$CPPFLAGS" 1939fda9279dSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1940fda9279dSmrg 1941fda9279dSmrg save_LDFLAGS="$LDFLAGS" 1942fda9279dSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1943fda9279dSmrg 1944fda9279dSmrg save_LIBS="$LIBS" 1945fda9279dSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1946fda9279dSmrg 1947fda9279dSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 1948fda9279dSmrg lt_cv_dlopen_self, [dnl 1949fda9279dSmrg _LT_TRY_DLOPEN_SELF( 1950fda9279dSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1951fda9279dSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1952fda9279dSmrg ]) 1953fda9279dSmrg 1954fda9279dSmrg if test "x$lt_cv_dlopen_self" = xyes; then 1955fda9279dSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1956fda9279dSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1957fda9279dSmrg lt_cv_dlopen_self_static, [dnl 1958fda9279dSmrg _LT_TRY_DLOPEN_SELF( 1959fda9279dSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1960fda9279dSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1961fda9279dSmrg ]) 1962fda9279dSmrg fi 1963fda9279dSmrg 1964fda9279dSmrg CPPFLAGS="$save_CPPFLAGS" 1965fda9279dSmrg LDFLAGS="$save_LDFLAGS" 1966fda9279dSmrg LIBS="$save_LIBS" 1967fda9279dSmrg ;; 1968fda9279dSmrg esac 1969fda9279dSmrg 1970fda9279dSmrg case $lt_cv_dlopen_self in 1971fda9279dSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1972fda9279dSmrg *) enable_dlopen_self=unknown ;; 1973fda9279dSmrg esac 1974fda9279dSmrg 1975fda9279dSmrg case $lt_cv_dlopen_self_static in 1976fda9279dSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1977fda9279dSmrg *) enable_dlopen_self_static=unknown ;; 1978fda9279dSmrg esac 1979fda9279dSmrgfi 1980fda9279dSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1981fda9279dSmrg [Whether dlopen is supported]) 1982fda9279dSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1983fda9279dSmrg [Whether dlopen of programs is supported]) 1984fda9279dSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1985fda9279dSmrg [Whether dlopen of statically linked programs is supported]) 1986fda9279dSmrg])# LT_SYS_DLOPEN_SELF 1987fda9279dSmrg 1988fda9279dSmrg# Old name: 1989fda9279dSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1990fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 1991fda9279dSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1992fda9279dSmrg 1993fda9279dSmrg 1994fda9279dSmrg# _LT_COMPILER_C_O([TAGNAME]) 1995fda9279dSmrg# --------------------------- 1996fda9279dSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 1997fda9279dSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1998fda9279dSmrgm4_defun([_LT_COMPILER_C_O], 1999fda9279dSmrg[m4_require([_LT_DECL_SED])dnl 2000fda9279dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2001fda9279dSmrgm4_require([_LT_TAG_COMPILER])dnl 2002fda9279dSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2003fda9279dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2004fda9279dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2005fda9279dSmrg $RM -r conftest 2>/dev/null 2006fda9279dSmrg mkdir conftest 2007fda9279dSmrg cd conftest 2008fda9279dSmrg mkdir out 2009fda9279dSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2010fda9279dSmrg 2011fda9279dSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2012fda9279dSmrg # Insert the option either (1) after the last *FLAGS variable, or 2013fda9279dSmrg # (2) before a word containing "conftest.", or (3) at the end. 2014fda9279dSmrg # Note that $ac_compile itself does not contain backslashes and begins 2015fda9279dSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2016fda9279dSmrg lt_compile=`echo "$ac_compile" | $SED \ 2017fda9279dSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2018fda9279dSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2019fda9279dSmrg -e 's:$: $lt_compiler_flag:'` 2020fda9279dSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2021fda9279dSmrg (eval "$lt_compile" 2>out/conftest.err) 2022fda9279dSmrg ac_status=$? 2023fda9279dSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2024fda9279dSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2025fda9279dSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2026fda9279dSmrg then 2027fda9279dSmrg # The compiler can only warn and ignore the option if not recognized 2028fda9279dSmrg # So say no if there are warnings 2029fda9279dSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2030fda9279dSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2031fda9279dSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2032fda9279dSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2033fda9279dSmrg fi 2034fda9279dSmrg fi 2035fda9279dSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2036fda9279dSmrg $RM conftest* 2037fda9279dSmrg # SGI C++ compiler will create directory out/ii_files/ for 2038fda9279dSmrg # template instantiation 2039fda9279dSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2040fda9279dSmrg $RM out/* && rmdir out 2041fda9279dSmrg cd .. 2042fda9279dSmrg $RM -r conftest 2043fda9279dSmrg $RM conftest* 2044fda9279dSmrg]) 2045fda9279dSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2046fda9279dSmrg [Does compiler simultaneously support -c and -o options?]) 2047fda9279dSmrg])# _LT_COMPILER_C_O 2048fda9279dSmrg 2049fda9279dSmrg 2050fda9279dSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2051fda9279dSmrg# ---------------------------------- 2052fda9279dSmrg# Check to see if we can do hard links to lock some files if needed 2053fda9279dSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2054fda9279dSmrg[m4_require([_LT_ENABLE_LOCK])dnl 2055fda9279dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2056fda9279dSmrg_LT_COMPILER_C_O([$1]) 2057fda9279dSmrg 2058fda9279dSmrghard_links="nottested" 2059fda9279dSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2060fda9279dSmrg # do not overwrite the value of need_locks provided by the user 2061fda9279dSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2062fda9279dSmrg hard_links=yes 2063fda9279dSmrg $RM conftest* 2064fda9279dSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2065fda9279dSmrg touch conftest.a 2066fda9279dSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2067fda9279dSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2068fda9279dSmrg AC_MSG_RESULT([$hard_links]) 2069fda9279dSmrg if test "$hard_links" = no; then 2070fda9279dSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2071fda9279dSmrg need_locks=warn 2072fda9279dSmrg fi 2073fda9279dSmrgelse 2074fda9279dSmrg need_locks=no 2075fda9279dSmrgfi 2076fda9279dSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2077fda9279dSmrg])# _LT_COMPILER_FILE_LOCKS 2078fda9279dSmrg 2079fda9279dSmrg 2080fda9279dSmrg# _LT_CHECK_OBJDIR 2081fda9279dSmrg# ---------------- 2082fda9279dSmrgm4_defun([_LT_CHECK_OBJDIR], 2083fda9279dSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2084fda9279dSmrg[rm -f .libs 2>/dev/null 2085fda9279dSmrgmkdir .libs 2>/dev/null 2086fda9279dSmrgif test -d .libs; then 2087fda9279dSmrg lt_cv_objdir=.libs 2088fda9279dSmrgelse 2089fda9279dSmrg # MS-DOS does not allow filenames that begin with a dot. 2090fda9279dSmrg lt_cv_objdir=_libs 2091fda9279dSmrgfi 2092fda9279dSmrgrmdir .libs 2>/dev/null]) 2093fda9279dSmrgobjdir=$lt_cv_objdir 2094fda9279dSmrg_LT_DECL([], [objdir], [0], 2095fda9279dSmrg [The name of the directory that contains temporary libtool files])dnl 2096fda9279dSmrgm4_pattern_allow([LT_OBJDIR])dnl 2097fda9279dSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2098fda9279dSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2099fda9279dSmrg])# _LT_CHECK_OBJDIR 2100fda9279dSmrg 2101fda9279dSmrg 2102fda9279dSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2103fda9279dSmrg# -------------------------------------- 2104fda9279dSmrg# Check hardcoding attributes. 2105fda9279dSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2106fda9279dSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2107fda9279dSmrg_LT_TAGVAR(hardcode_action, $1)= 2108fda9279dSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2109fda9279dSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2110fda9279dSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2111fda9279dSmrg 2112fda9279dSmrg # We can hardcode non-existent directories. 2113fda9279dSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2114fda9279dSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2115fda9279dSmrg # have to relink, otherwise we might link with an installed library 2116fda9279dSmrg # when we should be linking with a yet-to-be-installed one 2117fda9279dSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2118fda9279dSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2119fda9279dSmrg # Linking always hardcodes the temporary library directory. 2120fda9279dSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2121fda9279dSmrg else 2122fda9279dSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2123fda9279dSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 2124fda9279dSmrg fi 2125fda9279dSmrgelse 2126fda9279dSmrg # We cannot hardcode anything, or else we can only hardcode existing 2127fda9279dSmrg # directories. 2128fda9279dSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2129fda9279dSmrgfi 2130fda9279dSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2131fda9279dSmrg 2132fda9279dSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2133fda9279dSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2134fda9279dSmrg # Fast installation is not supported 2135fda9279dSmrg enable_fast_install=no 2136fda9279dSmrgelif test "$shlibpath_overrides_runpath" = yes || 2137fda9279dSmrg test "$enable_shared" = no; then 2138fda9279dSmrg # Fast installation is not necessary 2139fda9279dSmrg enable_fast_install=needless 2140fda9279dSmrgfi 2141fda9279dSmrg_LT_TAGDECL([], [hardcode_action], [0], 2142fda9279dSmrg [How to hardcode a shared library path into an executable]) 2143fda9279dSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2144fda9279dSmrg 2145fda9279dSmrg 2146fda9279dSmrg# _LT_CMD_STRIPLIB 2147fda9279dSmrg# ---------------- 2148fda9279dSmrgm4_defun([_LT_CMD_STRIPLIB], 2149fda9279dSmrg[m4_require([_LT_DECL_EGREP]) 2150fda9279dSmrgstriplib= 2151fda9279dSmrgold_striplib= 2152fda9279dSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2153fda9279dSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2154fda9279dSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2155fda9279dSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2156fda9279dSmrg AC_MSG_RESULT([yes]) 2157fda9279dSmrgelse 2158fda9279dSmrg# FIXME - insert some real tests, host_os isn't really good enough 2159fda9279dSmrg case $host_os in 2160fda9279dSmrg darwin*) 2161fda9279dSmrg if test -n "$STRIP" ; then 2162fda9279dSmrg striplib="$STRIP -x" 2163fda9279dSmrg old_striplib="$STRIP -S" 2164fda9279dSmrg AC_MSG_RESULT([yes]) 2165fda9279dSmrg else 2166fda9279dSmrg AC_MSG_RESULT([no]) 2167fda9279dSmrg fi 2168fda9279dSmrg ;; 2169fda9279dSmrg *) 2170fda9279dSmrg AC_MSG_RESULT([no]) 2171fda9279dSmrg ;; 2172fda9279dSmrg esac 2173fda9279dSmrgfi 2174fda9279dSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2175fda9279dSmrg_LT_DECL([], [striplib], [1]) 2176fda9279dSmrg])# _LT_CMD_STRIPLIB 2177fda9279dSmrg 2178fda9279dSmrg 2179fda9279dSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2180fda9279dSmrg# ----------------------------- 2181fda9279dSmrg# PORTME Fill in your ld.so characteristics 2182fda9279dSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2183fda9279dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2184fda9279dSmrgm4_require([_LT_DECL_EGREP])dnl 2185fda9279dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2186fda9279dSmrgm4_require([_LT_DECL_OBJDUMP])dnl 2187fda9279dSmrgm4_require([_LT_DECL_SED])dnl 2188fda9279dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2189fda9279dSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2190fda9279dSmrgm4_if([$1], 2191fda9279dSmrg [], [ 2192fda9279dSmrgif test "$GCC" = yes; then 2193fda9279dSmrg case $host_os in 2194fda9279dSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2195fda9279dSmrg *) lt_awk_arg="/^libraries:/" ;; 2196fda9279dSmrg esac 2197fda9279dSmrg case $host_os in 2198fda9279dSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2199fda9279dSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2200fda9279dSmrg esac 2201fda9279dSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2202fda9279dSmrg case $lt_search_path_spec in 2203fda9279dSmrg *\;*) 2204fda9279dSmrg # if the path contains ";" then we assume it to be the separator 2205fda9279dSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2206fda9279dSmrg # assumed that no part of a normal pathname contains ";" but that should 2207fda9279dSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2208fda9279dSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2209fda9279dSmrg ;; 2210fda9279dSmrg *) 2211fda9279dSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2212fda9279dSmrg ;; 2213fda9279dSmrg esac 2214fda9279dSmrg # Ok, now we have the path, separated by spaces, we can step through it 2215fda9279dSmrg # and add multilib dir if necessary. 2216fda9279dSmrg lt_tmp_lt_search_path_spec= 2217fda9279dSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2218fda9279dSmrg for lt_sys_path in $lt_search_path_spec; do 2219fda9279dSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2220fda9279dSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2221fda9279dSmrg else 2222fda9279dSmrg test -d "$lt_sys_path" && \ 2223fda9279dSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2224fda9279dSmrg fi 2225fda9279dSmrg done 2226fda9279dSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2227fda9279dSmrgBEGIN {RS=" "; FS="/|\n";} { 2228fda9279dSmrg lt_foo=""; 2229fda9279dSmrg lt_count=0; 2230fda9279dSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2231fda9279dSmrg if ($lt_i != "" && $lt_i != ".") { 2232fda9279dSmrg if ($lt_i == "..") { 2233fda9279dSmrg lt_count++; 2234fda9279dSmrg } else { 2235fda9279dSmrg if (lt_count == 0) { 2236fda9279dSmrg lt_foo="/" $lt_i lt_foo; 2237fda9279dSmrg } else { 2238fda9279dSmrg lt_count--; 2239fda9279dSmrg } 2240fda9279dSmrg } 2241fda9279dSmrg } 2242fda9279dSmrg } 2243fda9279dSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2244fda9279dSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2245fda9279dSmrg}'` 2246fda9279dSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 2247fda9279dSmrg # for these hosts. 2248fda9279dSmrg case $host_os in 2249fda9279dSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2250fda9279dSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2251fda9279dSmrg esac 2252fda9279dSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2253fda9279dSmrgelse 2254fda9279dSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2255fda9279dSmrgfi]) 2256fda9279dSmrglibrary_names_spec= 2257fda9279dSmrglibname_spec='lib$name' 2258fda9279dSmrgsoname_spec= 2259fda9279dSmrgshrext_cmds=".so" 2260fda9279dSmrgpostinstall_cmds= 2261fda9279dSmrgpostuninstall_cmds= 2262fda9279dSmrgfinish_cmds= 2263fda9279dSmrgfinish_eval= 2264fda9279dSmrgshlibpath_var= 2265fda9279dSmrgshlibpath_overrides_runpath=unknown 2266fda9279dSmrgversion_type=none 2267fda9279dSmrgdynamic_linker="$host_os ld.so" 2268fda9279dSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2269fda9279dSmrgneed_lib_prefix=unknown 2270fda9279dSmrghardcode_into_libs=no 2271fda9279dSmrg 2272fda9279dSmrg# when you set need_version to no, make sure it does not cause -set_version 2273fda9279dSmrg# flags to be left without arguments 2274fda9279dSmrgneed_version=unknown 2275fda9279dSmrg 2276fda9279dSmrgcase $host_os in 2277fda9279dSmrgaix3*) 2278fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2279fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2280fda9279dSmrg shlibpath_var=LIBPATH 2281fda9279dSmrg 2282fda9279dSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2283fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2284fda9279dSmrg ;; 2285fda9279dSmrg 2286fda9279dSmrgaix[[4-9]]*) 2287fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2288fda9279dSmrg need_lib_prefix=no 2289fda9279dSmrg need_version=no 2290fda9279dSmrg hardcode_into_libs=yes 2291fda9279dSmrg if test "$host_cpu" = ia64; then 2292fda9279dSmrg # AIX 5 supports IA64 2293fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2294fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2295fda9279dSmrg else 2296fda9279dSmrg # With GCC up to 2.95.x, collect2 would create an import file 2297fda9279dSmrg # for dependence libraries. The import file would start with 2298fda9279dSmrg # the line `#! .'. This would cause the generated library to 2299fda9279dSmrg # depend on `.', always an invalid library. This was fixed in 2300fda9279dSmrg # development snapshots of GCC prior to 3.0. 2301fda9279dSmrg case $host_os in 2302fda9279dSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2303fda9279dSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2304fda9279dSmrg echo ' yes ' 2305fda9279dSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2306fda9279dSmrg : 2307fda9279dSmrg else 2308fda9279dSmrg can_build_shared=no 2309fda9279dSmrg fi 2310fda9279dSmrg ;; 2311fda9279dSmrg esac 2312fda9279dSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2313fda9279dSmrg # soname into executable. Probably we can add versioning support to 2314fda9279dSmrg # collect2, so additional links can be useful in future. 2315fda9279dSmrg if test "$aix_use_runtimelinking" = yes; then 2316fda9279dSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2317fda9279dSmrg # instead of lib<name>.a to let people know that these are not 2318fda9279dSmrg # typical AIX shared libraries. 2319fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2320fda9279dSmrg else 2321fda9279dSmrg # We preserve .a as extension for shared libraries through AIX4.2 2322fda9279dSmrg # and later when we are not doing run time linking. 2323fda9279dSmrg library_names_spec='${libname}${release}.a $libname.a' 2324fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2325fda9279dSmrg fi 2326fda9279dSmrg shlibpath_var=LIBPATH 2327fda9279dSmrg fi 2328fda9279dSmrg ;; 2329fda9279dSmrg 2330fda9279dSmrgamigaos*) 2331fda9279dSmrg case $host_cpu in 2332fda9279dSmrg powerpc) 2333fda9279dSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2334fda9279dSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2335fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2336fda9279dSmrg ;; 2337fda9279dSmrg m68k) 2338fda9279dSmrg library_names_spec='$libname.ixlibrary $libname.a' 2339fda9279dSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2340fda9279dSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 2341fda9279dSmrg ;; 2342fda9279dSmrg esac 2343fda9279dSmrg ;; 2344fda9279dSmrg 2345fda9279dSmrgbeos*) 2346fda9279dSmrg library_names_spec='${libname}${shared_ext}' 2347fda9279dSmrg dynamic_linker="$host_os ld.so" 2348fda9279dSmrg shlibpath_var=LIBRARY_PATH 2349fda9279dSmrg ;; 2350fda9279dSmrg 2351fda9279dSmrgbsdi[[45]]*) 2352fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2353fda9279dSmrg need_version=no 2354fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2355fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2356fda9279dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2357fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2358fda9279dSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2359fda9279dSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2360fda9279dSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2361fda9279dSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2362fda9279dSmrg # libtool to hard-code these into programs 2363fda9279dSmrg ;; 2364fda9279dSmrg 2365fda9279dSmrgcygwin* | mingw* | pw32* | cegcc*) 2366fda9279dSmrg version_type=windows 2367fda9279dSmrg shrext_cmds=".dll" 2368fda9279dSmrg need_version=no 2369fda9279dSmrg need_lib_prefix=no 2370fda9279dSmrg 2371fda9279dSmrg case $GCC,$cc_basename in 2372fda9279dSmrg yes,*) 2373fda9279dSmrg # gcc 2374fda9279dSmrg library_names_spec='$libname.dll.a' 2375fda9279dSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2376fda9279dSmrg postinstall_cmds='base_file=`basename \${file}`~ 2377fda9279dSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2378fda9279dSmrg dldir=$destdir/`dirname \$dlpath`~ 2379fda9279dSmrg test -d \$dldir || mkdir -p \$dldir~ 2380fda9279dSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2381fda9279dSmrg chmod a+x \$dldir/$dlname~ 2382fda9279dSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2383fda9279dSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2384fda9279dSmrg fi' 2385fda9279dSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2386fda9279dSmrg dlpath=$dir/\$dldll~ 2387fda9279dSmrg $RM \$dlpath' 2388fda9279dSmrg shlibpath_overrides_runpath=yes 2389fda9279dSmrg 2390fda9279dSmrg case $host_os in 2391fda9279dSmrg cygwin*) 2392fda9279dSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2393fda9279dSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2394fda9279dSmrgm4_if([$1], [],[ 2395fda9279dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2396fda9279dSmrg ;; 2397fda9279dSmrg mingw* | cegcc*) 2398fda9279dSmrg # MinGW DLLs use traditional 'lib' prefix 2399fda9279dSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2400fda9279dSmrg ;; 2401fda9279dSmrg pw32*) 2402fda9279dSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2403fda9279dSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2404fda9279dSmrg ;; 2405fda9279dSmrg esac 2406fda9279dSmrg dynamic_linker='Win32 ld.exe' 2407fda9279dSmrg ;; 2408fda9279dSmrg 2409fda9279dSmrg *,cl*) 2410fda9279dSmrg # Native MSVC 2411fda9279dSmrg libname_spec='$name' 2412fda9279dSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2413fda9279dSmrg library_names_spec='${libname}.dll.lib' 2414fda9279dSmrg 2415fda9279dSmrg case $build_os in 2416fda9279dSmrg mingw*) 2417fda9279dSmrg sys_lib_search_path_spec= 2418fda9279dSmrg lt_save_ifs=$IFS 2419fda9279dSmrg IFS=';' 2420fda9279dSmrg for lt_path in $LIB 2421fda9279dSmrg do 2422fda9279dSmrg IFS=$lt_save_ifs 2423fda9279dSmrg # Let DOS variable expansion print the short 8.3 style file name. 2424fda9279dSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2425fda9279dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2426fda9279dSmrg done 2427fda9279dSmrg IFS=$lt_save_ifs 2428fda9279dSmrg # Convert to MSYS style. 2429fda9279dSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2430fda9279dSmrg ;; 2431fda9279dSmrg cygwin*) 2432fda9279dSmrg # Convert to unix form, then to dos form, then back to unix form 2433fda9279dSmrg # but this time dos style (no spaces!) so that the unix form looks 2434fda9279dSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 2435fda9279dSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2436fda9279dSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2437fda9279dSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2438fda9279dSmrg ;; 2439fda9279dSmrg *) 2440fda9279dSmrg sys_lib_search_path_spec="$LIB" 2441fda9279dSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2442fda9279dSmrg # It is most probably a Windows format PATH. 2443fda9279dSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2444fda9279dSmrg else 2445fda9279dSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2446fda9279dSmrg fi 2447fda9279dSmrg # FIXME: find the short name or the path components, as spaces are 2448fda9279dSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 2449fda9279dSmrg ;; 2450fda9279dSmrg esac 2451fda9279dSmrg 2452fda9279dSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2453fda9279dSmrg postinstall_cmds='base_file=`basename \${file}`~ 2454fda9279dSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2455fda9279dSmrg dldir=$destdir/`dirname \$dlpath`~ 2456fda9279dSmrg test -d \$dldir || mkdir -p \$dldir~ 2457fda9279dSmrg $install_prog $dir/$dlname \$dldir/$dlname' 2458fda9279dSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2459fda9279dSmrg dlpath=$dir/\$dldll~ 2460fda9279dSmrg $RM \$dlpath' 2461fda9279dSmrg shlibpath_overrides_runpath=yes 2462fda9279dSmrg dynamic_linker='Win32 link.exe' 2463fda9279dSmrg ;; 2464fda9279dSmrg 2465fda9279dSmrg *) 2466fda9279dSmrg # Assume MSVC wrapper 2467fda9279dSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2468fda9279dSmrg dynamic_linker='Win32 ld.exe' 2469fda9279dSmrg ;; 2470fda9279dSmrg esac 2471fda9279dSmrg # FIXME: first we should search . and the directory the executable is in 2472fda9279dSmrg shlibpath_var=PATH 2473fda9279dSmrg ;; 2474fda9279dSmrg 2475fda9279dSmrgdarwin* | rhapsody*) 2476fda9279dSmrg dynamic_linker="$host_os dyld" 2477fda9279dSmrg version_type=darwin 2478fda9279dSmrg need_lib_prefix=no 2479fda9279dSmrg need_version=no 2480fda9279dSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2481fda9279dSmrg soname_spec='${libname}${release}${major}$shared_ext' 2482fda9279dSmrg shlibpath_overrides_runpath=yes 2483fda9279dSmrg shlibpath_var=DYLD_LIBRARY_PATH 2484fda9279dSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2485fda9279dSmrgm4_if([$1], [],[ 2486fda9279dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2487fda9279dSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2488fda9279dSmrg ;; 2489fda9279dSmrg 2490fda9279dSmrgdgux*) 2491fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2492fda9279dSmrg need_lib_prefix=no 2493fda9279dSmrg need_version=no 2494fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2495fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2496fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2497fda9279dSmrg ;; 2498fda9279dSmrg 2499fda9279dSmrgfreebsd* | dragonfly*) 2500fda9279dSmrg # DragonFly does not have aout. When/if they implement a new 2501fda9279dSmrg # versioning mechanism, adjust this. 2502fda9279dSmrg if test -x /usr/bin/objformat; then 2503fda9279dSmrg objformat=`/usr/bin/objformat` 2504fda9279dSmrg else 2505fda9279dSmrg case $host_os in 2506fda9279dSmrg freebsd[[23]].*) objformat=aout ;; 2507fda9279dSmrg *) objformat=elf ;; 2508fda9279dSmrg esac 2509fda9279dSmrg fi 2510fda9279dSmrg version_type=freebsd-$objformat 2511fda9279dSmrg case $version_type in 2512fda9279dSmrg freebsd-elf*) 2513fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2514fda9279dSmrg need_version=no 2515fda9279dSmrg need_lib_prefix=no 2516fda9279dSmrg ;; 2517fda9279dSmrg freebsd-*) 2518fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2519fda9279dSmrg need_version=yes 2520fda9279dSmrg ;; 2521fda9279dSmrg esac 2522fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2523fda9279dSmrg case $host_os in 2524fda9279dSmrg freebsd2.*) 2525fda9279dSmrg shlibpath_overrides_runpath=yes 2526fda9279dSmrg ;; 2527fda9279dSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2528fda9279dSmrg shlibpath_overrides_runpath=yes 2529fda9279dSmrg hardcode_into_libs=yes 2530fda9279dSmrg ;; 2531fda9279dSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2532fda9279dSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2533fda9279dSmrg shlibpath_overrides_runpath=no 2534fda9279dSmrg hardcode_into_libs=yes 2535fda9279dSmrg ;; 2536fda9279dSmrg *) # from 4.6 on, and DragonFly 2537fda9279dSmrg shlibpath_overrides_runpath=yes 2538fda9279dSmrg hardcode_into_libs=yes 2539fda9279dSmrg ;; 2540fda9279dSmrg esac 2541fda9279dSmrg ;; 2542fda9279dSmrg 2543fda9279dSmrghaiku*) 2544fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2545fda9279dSmrg need_lib_prefix=no 2546fda9279dSmrg need_version=no 2547fda9279dSmrg dynamic_linker="$host_os runtime_loader" 2548fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2549fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2550fda9279dSmrg shlibpath_var=LIBRARY_PATH 2551fda9279dSmrg shlibpath_overrides_runpath=yes 2552fda9279dSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2553fda9279dSmrg hardcode_into_libs=yes 2554fda9279dSmrg ;; 2555fda9279dSmrg 2556fda9279dSmrghpux9* | hpux10* | hpux11*) 2557fda9279dSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2558fda9279dSmrg # link against other versions. 2559fda9279dSmrg version_type=sunos 2560fda9279dSmrg need_lib_prefix=no 2561fda9279dSmrg need_version=no 2562fda9279dSmrg case $host_cpu in 2563fda9279dSmrg ia64*) 2564fda9279dSmrg shrext_cmds='.so' 2565fda9279dSmrg hardcode_into_libs=yes 2566fda9279dSmrg dynamic_linker="$host_os dld.so" 2567fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2568fda9279dSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2569fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2570fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2571fda9279dSmrg if test "X$HPUX_IA64_MODE" = X32; then 2572fda9279dSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2573fda9279dSmrg else 2574fda9279dSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2575fda9279dSmrg fi 2576fda9279dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2577fda9279dSmrg ;; 2578fda9279dSmrg hppa*64*) 2579fda9279dSmrg shrext_cmds='.sl' 2580fda9279dSmrg hardcode_into_libs=yes 2581fda9279dSmrg dynamic_linker="$host_os dld.sl" 2582fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2583fda9279dSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2584fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2585fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2586fda9279dSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2587fda9279dSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2588fda9279dSmrg ;; 2589fda9279dSmrg *) 2590fda9279dSmrg shrext_cmds='.sl' 2591fda9279dSmrg dynamic_linker="$host_os dld.sl" 2592fda9279dSmrg shlibpath_var=SHLIB_PATH 2593fda9279dSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2594fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2595fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2596fda9279dSmrg ;; 2597fda9279dSmrg esac 2598fda9279dSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2599fda9279dSmrg postinstall_cmds='chmod 555 $lib' 2600fda9279dSmrg # or fails outright, so override atomically: 2601fda9279dSmrg install_override_mode=555 2602fda9279dSmrg ;; 2603fda9279dSmrg 2604fda9279dSmrginterix[[3-9]]*) 2605fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2606fda9279dSmrg need_lib_prefix=no 2607fda9279dSmrg need_version=no 2608fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2609fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2610fda9279dSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2611fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2612fda9279dSmrg shlibpath_overrides_runpath=no 2613fda9279dSmrg hardcode_into_libs=yes 2614fda9279dSmrg ;; 2615fda9279dSmrg 2616fda9279dSmrgirix5* | irix6* | nonstopux*) 2617fda9279dSmrg case $host_os in 2618fda9279dSmrg nonstopux*) version_type=nonstopux ;; 2619fda9279dSmrg *) 2620fda9279dSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2621fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2622fda9279dSmrg else 2623fda9279dSmrg version_type=irix 2624fda9279dSmrg fi ;; 2625fda9279dSmrg esac 2626fda9279dSmrg need_lib_prefix=no 2627fda9279dSmrg need_version=no 2628fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2629fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2630fda9279dSmrg case $host_os in 2631fda9279dSmrg irix5* | nonstopux*) 2632fda9279dSmrg libsuff= shlibsuff= 2633fda9279dSmrg ;; 2634fda9279dSmrg *) 2635fda9279dSmrg case $LD in # libtool.m4 will add one of these switches to LD 2636fda9279dSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2637fda9279dSmrg libsuff= shlibsuff= libmagic=32-bit;; 2638fda9279dSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2639fda9279dSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2640fda9279dSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2641fda9279dSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2642fda9279dSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2643fda9279dSmrg esac 2644fda9279dSmrg ;; 2645fda9279dSmrg esac 2646fda9279dSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2647fda9279dSmrg shlibpath_overrides_runpath=no 2648fda9279dSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2649fda9279dSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2650fda9279dSmrg hardcode_into_libs=yes 2651fda9279dSmrg ;; 2652fda9279dSmrg 2653fda9279dSmrg# No shared lib support for Linux oldld, aout, or coff. 2654fda9279dSmrglinux*oldld* | linux*aout* | linux*coff*) 2655fda9279dSmrg dynamic_linker=no 2656fda9279dSmrg ;; 2657fda9279dSmrg 2658fda9279dSmrg# This must be glibc/ELF. 2659fda9279dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2660fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2661fda9279dSmrg need_lib_prefix=no 2662fda9279dSmrg need_version=no 2663fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2664fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2665fda9279dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2666fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2667fda9279dSmrg shlibpath_overrides_runpath=no 2668fda9279dSmrg 2669fda9279dSmrg # Some binutils ld are patched to set DT_RUNPATH 2670fda9279dSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2671fda9279dSmrg [lt_cv_shlibpath_overrides_runpath=no 2672fda9279dSmrg save_LDFLAGS=$LDFLAGS 2673fda9279dSmrg save_libdir=$libdir 2674fda9279dSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2675fda9279dSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2676fda9279dSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2677fda9279dSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2678fda9279dSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2679fda9279dSmrg LDFLAGS=$save_LDFLAGS 2680fda9279dSmrg libdir=$save_libdir 2681fda9279dSmrg ]) 2682fda9279dSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2683fda9279dSmrg 2684fda9279dSmrg # This implies no fast_install, which is unacceptable. 2685fda9279dSmrg # Some rework will be needed to allow for fast_install 2686fda9279dSmrg # before this can be enabled. 2687fda9279dSmrg hardcode_into_libs=yes 2688fda9279dSmrg 2689fda9279dSmrg # Append ld.so.conf contents to the search path 2690fda9279dSmrg if test -f /etc/ld.so.conf; then 2691fda9279dSmrg 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' ' '` 2692fda9279dSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2693fda9279dSmrg fi 2694fda9279dSmrg 2695fda9279dSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2696fda9279dSmrg # powerpc, because MkLinux only supported shared libraries with the 2697fda9279dSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2698fda9279dSmrg # most powerpc-linux boxes support dynamic linking these days and 2699fda9279dSmrg # people can always --disable-shared, the test was removed, and we 2700fda9279dSmrg # assume the GNU/Linux dynamic linker is in use. 2701fda9279dSmrg dynamic_linker='GNU/Linux ld.so' 2702fda9279dSmrg ;; 2703fda9279dSmrg 2704fda9279dSmrgnetbsdelf*-gnu) 2705fda9279dSmrg version_type=linux 2706fda9279dSmrg need_lib_prefix=no 2707fda9279dSmrg need_version=no 2708fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2709fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2710fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2711fda9279dSmrg shlibpath_overrides_runpath=no 2712fda9279dSmrg hardcode_into_libs=yes 2713fda9279dSmrg dynamic_linker='NetBSD ld.elf_so' 2714fda9279dSmrg ;; 2715fda9279dSmrg 2716fda9279dSmrgnetbsd*) 2717fda9279dSmrg version_type=sunos 2718fda9279dSmrg need_lib_prefix=no 2719fda9279dSmrg need_version=no 2720fda9279dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2721fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2722fda9279dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2723fda9279dSmrg dynamic_linker='NetBSD (a.out) ld.so' 2724fda9279dSmrg else 2725fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2726fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2727fda9279dSmrg dynamic_linker='NetBSD ld.elf_so' 2728fda9279dSmrg fi 2729fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2730fda9279dSmrg shlibpath_overrides_runpath=yes 2731fda9279dSmrg hardcode_into_libs=yes 2732fda9279dSmrg ;; 2733fda9279dSmrg 2734fda9279dSmrgnewsos6) 2735fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2736fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2737fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2738fda9279dSmrg shlibpath_overrides_runpath=yes 2739fda9279dSmrg ;; 2740fda9279dSmrg 2741fda9279dSmrg*nto* | *qnx*) 2742fda9279dSmrg version_type=qnx 2743fda9279dSmrg need_lib_prefix=no 2744fda9279dSmrg need_version=no 2745fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2746fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2747fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2748fda9279dSmrg shlibpath_overrides_runpath=no 2749fda9279dSmrg hardcode_into_libs=yes 2750fda9279dSmrg dynamic_linker='ldqnx.so' 2751fda9279dSmrg ;; 2752fda9279dSmrg 2753fda9279dSmrgopenbsd*) 2754fda9279dSmrg version_type=sunos 2755fda9279dSmrg sys_lib_dlsearch_path_spec="/usr/lib" 2756fda9279dSmrg need_lib_prefix=no 2757fda9279dSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2758fda9279dSmrg case $host_os in 2759fda9279dSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2760fda9279dSmrg *) need_version=no ;; 2761fda9279dSmrg esac 2762fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2763fda9279dSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2764fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2765fda9279dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2766fda9279dSmrg case $host_os in 2767fda9279dSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 2768fda9279dSmrg shlibpath_overrides_runpath=no 2769fda9279dSmrg ;; 2770fda9279dSmrg *) 2771fda9279dSmrg shlibpath_overrides_runpath=yes 2772fda9279dSmrg ;; 2773fda9279dSmrg esac 2774fda9279dSmrg else 2775fda9279dSmrg shlibpath_overrides_runpath=yes 2776fda9279dSmrg fi 2777fda9279dSmrg ;; 2778fda9279dSmrg 2779fda9279dSmrgos2*) 2780fda9279dSmrg libname_spec='$name' 2781fda9279dSmrg shrext_cmds=".dll" 2782fda9279dSmrg need_lib_prefix=no 2783fda9279dSmrg library_names_spec='$libname${shared_ext} $libname.a' 2784fda9279dSmrg dynamic_linker='OS/2 ld.exe' 2785fda9279dSmrg shlibpath_var=LIBPATH 2786fda9279dSmrg ;; 2787fda9279dSmrg 2788fda9279dSmrgosf3* | osf4* | osf5*) 2789fda9279dSmrg version_type=osf 2790fda9279dSmrg need_lib_prefix=no 2791fda9279dSmrg need_version=no 2792fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2793fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2794fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2795fda9279dSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2796fda9279dSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2797fda9279dSmrg ;; 2798fda9279dSmrg 2799fda9279dSmrgrdos*) 2800fda9279dSmrg dynamic_linker=no 2801fda9279dSmrg ;; 2802fda9279dSmrg 2803fda9279dSmrgsolaris*) 2804fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2805fda9279dSmrg need_lib_prefix=no 2806fda9279dSmrg need_version=no 2807fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2808fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2809fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2810fda9279dSmrg shlibpath_overrides_runpath=yes 2811fda9279dSmrg hardcode_into_libs=yes 2812fda9279dSmrg # ldd complains unless libraries are executable 2813fda9279dSmrg postinstall_cmds='chmod +x $lib' 2814fda9279dSmrg ;; 2815fda9279dSmrg 2816fda9279dSmrgsunos4*) 2817fda9279dSmrg version_type=sunos 2818fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2819fda9279dSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2820fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2821fda9279dSmrg shlibpath_overrides_runpath=yes 2822fda9279dSmrg if test "$with_gnu_ld" = yes; then 2823fda9279dSmrg need_lib_prefix=no 2824fda9279dSmrg fi 2825fda9279dSmrg need_version=yes 2826fda9279dSmrg ;; 2827fda9279dSmrg 2828fda9279dSmrgsysv4 | sysv4.3*) 2829fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2830fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2831fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2832fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2833fda9279dSmrg case $host_vendor in 2834fda9279dSmrg sni) 2835fda9279dSmrg shlibpath_overrides_runpath=no 2836fda9279dSmrg need_lib_prefix=no 2837fda9279dSmrg runpath_var=LD_RUN_PATH 2838fda9279dSmrg ;; 2839fda9279dSmrg siemens) 2840fda9279dSmrg need_lib_prefix=no 2841fda9279dSmrg ;; 2842fda9279dSmrg motorola) 2843fda9279dSmrg need_lib_prefix=no 2844fda9279dSmrg need_version=no 2845fda9279dSmrg shlibpath_overrides_runpath=no 2846fda9279dSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2847fda9279dSmrg ;; 2848fda9279dSmrg esac 2849fda9279dSmrg ;; 2850fda9279dSmrg 2851fda9279dSmrgsysv4*MP*) 2852fda9279dSmrg if test -d /usr/nec ;then 2853fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2854fda9279dSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2855fda9279dSmrg soname_spec='$libname${shared_ext}.$major' 2856fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2857fda9279dSmrg fi 2858fda9279dSmrg ;; 2859fda9279dSmrg 2860fda9279dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2861fda9279dSmrg version_type=freebsd-elf 2862fda9279dSmrg need_lib_prefix=no 2863fda9279dSmrg need_version=no 2864fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2865fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2866fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2867fda9279dSmrg shlibpath_overrides_runpath=yes 2868fda9279dSmrg hardcode_into_libs=yes 2869fda9279dSmrg if test "$with_gnu_ld" = yes; then 2870fda9279dSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2871fda9279dSmrg else 2872fda9279dSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2873fda9279dSmrg case $host_os in 2874fda9279dSmrg sco3.2v5*) 2875fda9279dSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2876fda9279dSmrg ;; 2877fda9279dSmrg esac 2878fda9279dSmrg fi 2879fda9279dSmrg sys_lib_dlsearch_path_spec='/usr/lib' 2880fda9279dSmrg ;; 2881fda9279dSmrg 2882fda9279dSmrgtpf*) 2883fda9279dSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2884fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2885fda9279dSmrg need_lib_prefix=no 2886fda9279dSmrg need_version=no 2887fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2888fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2889fda9279dSmrg shlibpath_overrides_runpath=no 2890fda9279dSmrg hardcode_into_libs=yes 2891fda9279dSmrg ;; 2892fda9279dSmrg 2893fda9279dSmrguts4*) 2894fda9279dSmrg version_type=linux # correct to gnu/linux during the next big refactor 2895fda9279dSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2896fda9279dSmrg soname_spec='${libname}${release}${shared_ext}$major' 2897fda9279dSmrg shlibpath_var=LD_LIBRARY_PATH 2898fda9279dSmrg ;; 2899fda9279dSmrg 2900fda9279dSmrg*) 2901fda9279dSmrg dynamic_linker=no 2902fda9279dSmrg ;; 2903fda9279dSmrgesac 2904fda9279dSmrgAC_MSG_RESULT([$dynamic_linker]) 2905fda9279dSmrgtest "$dynamic_linker" = no && can_build_shared=no 2906fda9279dSmrg 2907fda9279dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2908fda9279dSmrgif test "$GCC" = yes; then 2909fda9279dSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2910fda9279dSmrgfi 2911fda9279dSmrg 2912fda9279dSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2913fda9279dSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2914fda9279dSmrgfi 2915fda9279dSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2916fda9279dSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2917fda9279dSmrgfi 2918fda9279dSmrg 2919fda9279dSmrg_LT_DECL([], [variables_saved_for_relink], [1], 2920fda9279dSmrg [Variables whose values should be saved in libtool wrapper scripts and 2921fda9279dSmrg restored at link time]) 2922fda9279dSmrg_LT_DECL([], [need_lib_prefix], [0], 2923fda9279dSmrg [Do we need the "lib" prefix for modules?]) 2924fda9279dSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2925fda9279dSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2926fda9279dSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2927fda9279dSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2928fda9279dSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2929fda9279dSmrg [Is shlibpath searched before the hard-coded library search path?]) 2930fda9279dSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2931fda9279dSmrg_LT_DECL([], [library_names_spec], [1], 2932fda9279dSmrg [[List of archive names. First name is the real one, the rest are links. 2933fda9279dSmrg The last name is the one that the linker finds with -lNAME]]) 2934fda9279dSmrg_LT_DECL([], [soname_spec], [1], 2935fda9279dSmrg [[The coded name of the library, if different from the real name]]) 2936fda9279dSmrg_LT_DECL([], [install_override_mode], [1], 2937fda9279dSmrg [Permission mode override for installation of shared libraries]) 2938fda9279dSmrg_LT_DECL([], [postinstall_cmds], [2], 2939fda9279dSmrg [Command to use after installation of a shared archive]) 2940fda9279dSmrg_LT_DECL([], [postuninstall_cmds], [2], 2941fda9279dSmrg [Command to use after uninstallation of a shared archive]) 2942fda9279dSmrg_LT_DECL([], [finish_cmds], [2], 2943fda9279dSmrg [Commands used to finish a libtool library installation in a directory]) 2944fda9279dSmrg_LT_DECL([], [finish_eval], [1], 2945fda9279dSmrg [[As "finish_cmds", except a single script fragment to be evaled but 2946fda9279dSmrg not shown]]) 2947fda9279dSmrg_LT_DECL([], [hardcode_into_libs], [0], 2948fda9279dSmrg [Whether we should hardcode library paths into libraries]) 2949fda9279dSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2950fda9279dSmrg [Compile-time system search path for libraries]) 2951fda9279dSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2952fda9279dSmrg [Run-time system search path for libraries]) 2953fda9279dSmrg])# _LT_SYS_DYNAMIC_LINKER 2954fda9279dSmrg 2955fda9279dSmrg 2956fda9279dSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 2957fda9279dSmrg# -------------------------- 2958fda9279dSmrg# find a file program which can recognize shared library 2959fda9279dSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2960fda9279dSmrg[m4_require([_LT_DECL_EGREP])dnl 2961fda9279dSmrgAC_MSG_CHECKING([for $1]) 2962fda9279dSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2963fda9279dSmrg[case $MAGIC_CMD in 2964fda9279dSmrg[[\\/*] | ?:[\\/]*]) 2965fda9279dSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2966fda9279dSmrg ;; 2967fda9279dSmrg*) 2968fda9279dSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2969fda9279dSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2970fda9279dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2971fda9279dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2972fda9279dSmrgdnl not every word. This closes a longstanding sh security hole. 2973fda9279dSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2974fda9279dSmrg for ac_dir in $ac_dummy; do 2975fda9279dSmrg IFS="$lt_save_ifs" 2976fda9279dSmrg test -z "$ac_dir" && ac_dir=. 2977fda9279dSmrg if test -f $ac_dir/$1; then 2978fda9279dSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2979fda9279dSmrg if test -n "$file_magic_test_file"; then 2980fda9279dSmrg case $deplibs_check_method in 2981fda9279dSmrg "file_magic "*) 2982fda9279dSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2983fda9279dSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2984fda9279dSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2985fda9279dSmrg $EGREP "$file_magic_regex" > /dev/null; then 2986fda9279dSmrg : 2987fda9279dSmrg else 2988fda9279dSmrg cat <<_LT_EOF 1>&2 2989fda9279dSmrg 2990fda9279dSmrg*** Warning: the command libtool uses to detect shared libraries, 2991fda9279dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2992fda9279dSmrg*** The result is that libtool may fail to recognize shared libraries 2993fda9279dSmrg*** as such. This will affect the creation of libtool libraries that 2994fda9279dSmrg*** depend on shared libraries, but programs linked with such libtool 2995fda9279dSmrg*** libraries will work regardless of this problem. Nevertheless, you 2996fda9279dSmrg*** may want to report the problem to your system manager and/or to 2997fda9279dSmrg*** bug-libtool@gnu.org 2998fda9279dSmrg 2999fda9279dSmrg_LT_EOF 3000fda9279dSmrg fi ;; 3001fda9279dSmrg esac 3002fda9279dSmrg fi 3003fda9279dSmrg break 3004fda9279dSmrg fi 3005fda9279dSmrg done 3006fda9279dSmrg IFS="$lt_save_ifs" 3007fda9279dSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 3008fda9279dSmrg ;; 3009fda9279dSmrgesac]) 3010fda9279dSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 3011fda9279dSmrgif test -n "$MAGIC_CMD"; then 3012fda9279dSmrg AC_MSG_RESULT($MAGIC_CMD) 3013fda9279dSmrgelse 3014fda9279dSmrg AC_MSG_RESULT(no) 3015fda9279dSmrgfi 3016fda9279dSmrg_LT_DECL([], [MAGIC_CMD], [0], 3017fda9279dSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3018fda9279dSmrg])# _LT_PATH_TOOL_PREFIX 3019fda9279dSmrg 3020fda9279dSmrg# Old name: 3021fda9279dSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3022fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 3023fda9279dSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3024fda9279dSmrg 3025fda9279dSmrg 3026fda9279dSmrg# _LT_PATH_MAGIC 3027fda9279dSmrg# -------------- 3028fda9279dSmrg# find a file program which can recognize a shared library 3029fda9279dSmrgm4_defun([_LT_PATH_MAGIC], 3030fda9279dSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3031fda9279dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3032fda9279dSmrg if test -n "$ac_tool_prefix"; then 3033fda9279dSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3034fda9279dSmrg else 3035fda9279dSmrg MAGIC_CMD=: 3036fda9279dSmrg fi 3037fda9279dSmrgfi 3038fda9279dSmrg])# _LT_PATH_MAGIC 3039fda9279dSmrg 3040fda9279dSmrg 3041fda9279dSmrg# LT_PATH_LD 3042fda9279dSmrg# ---------- 3043fda9279dSmrg# find the pathname to the GNU or non-GNU linker 3044fda9279dSmrgAC_DEFUN([LT_PATH_LD], 3045fda9279dSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3046fda9279dSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3047fda9279dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3048fda9279dSmrgm4_require([_LT_DECL_SED])dnl 3049fda9279dSmrgm4_require([_LT_DECL_EGREP])dnl 3050fda9279dSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3051fda9279dSmrg 3052fda9279dSmrgAC_ARG_WITH([gnu-ld], 3053fda9279dSmrg [AS_HELP_STRING([--with-gnu-ld], 3054fda9279dSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3055fda9279dSmrg [test "$withval" = no || with_gnu_ld=yes], 3056fda9279dSmrg [with_gnu_ld=no])dnl 3057fda9279dSmrg 3058fda9279dSmrgac_prog=ld 3059fda9279dSmrgif test "$GCC" = yes; then 3060fda9279dSmrg # Check if gcc -print-prog-name=ld gives a path. 3061fda9279dSmrg AC_MSG_CHECKING([for ld used by $CC]) 3062fda9279dSmrg case $host in 3063fda9279dSmrg *-*-mingw*) 3064fda9279dSmrg # gcc leaves a trailing carriage return which upsets mingw 3065fda9279dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3066fda9279dSmrg *) 3067fda9279dSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3068fda9279dSmrg esac 3069fda9279dSmrg case $ac_prog in 3070fda9279dSmrg # Accept absolute paths. 3071fda9279dSmrg [[\\/]]* | ?:[[\\/]]*) 3072fda9279dSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3073fda9279dSmrg # Canonicalize the pathname of ld 3074fda9279dSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3075fda9279dSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3076fda9279dSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3077fda9279dSmrg done 3078fda9279dSmrg test -z "$LD" && LD="$ac_prog" 3079fda9279dSmrg ;; 3080fda9279dSmrg "") 3081fda9279dSmrg # If it fails, then pretend we aren't using GCC. 3082fda9279dSmrg ac_prog=ld 3083fda9279dSmrg ;; 3084fda9279dSmrg *) 3085fda9279dSmrg # If it is relative, then search for the first ld in PATH. 3086fda9279dSmrg with_gnu_ld=unknown 3087fda9279dSmrg ;; 3088fda9279dSmrg esac 3089fda9279dSmrgelif test "$with_gnu_ld" = yes; then 3090fda9279dSmrg AC_MSG_CHECKING([for GNU ld]) 3091fda9279dSmrgelse 3092fda9279dSmrg AC_MSG_CHECKING([for non-GNU ld]) 3093fda9279dSmrgfi 3094fda9279dSmrgAC_CACHE_VAL(lt_cv_path_LD, 3095fda9279dSmrg[if test -z "$LD"; then 3096fda9279dSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3097fda9279dSmrg for ac_dir in $PATH; do 3098fda9279dSmrg IFS="$lt_save_ifs" 3099fda9279dSmrg test -z "$ac_dir" && ac_dir=. 3100fda9279dSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3101fda9279dSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 3102fda9279dSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3103fda9279dSmrg # but apparently some variants of GNU ld only accept -v. 3104fda9279dSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3105fda9279dSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3106fda9279dSmrg *GNU* | *'with BFD'*) 3107fda9279dSmrg test "$with_gnu_ld" != no && break 3108fda9279dSmrg ;; 3109fda9279dSmrg *) 3110fda9279dSmrg test "$with_gnu_ld" != yes && break 3111fda9279dSmrg ;; 3112fda9279dSmrg esac 3113fda9279dSmrg fi 3114fda9279dSmrg done 3115fda9279dSmrg IFS="$lt_save_ifs" 3116fda9279dSmrgelse 3117fda9279dSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 3118fda9279dSmrgfi]) 3119fda9279dSmrgLD="$lt_cv_path_LD" 3120fda9279dSmrgif test -n "$LD"; then 3121fda9279dSmrg AC_MSG_RESULT($LD) 3122fda9279dSmrgelse 3123fda9279dSmrg AC_MSG_RESULT(no) 3124fda9279dSmrgfi 3125fda9279dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3126fda9279dSmrg_LT_PATH_LD_GNU 3127fda9279dSmrgAC_SUBST([LD]) 3128fda9279dSmrg 3129fda9279dSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3130fda9279dSmrg])# LT_PATH_LD 3131fda9279dSmrg 3132fda9279dSmrg# Old names: 3133fda9279dSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3134fda9279dSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3135fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 3136fda9279dSmrgdnl AC_DEFUN([AM_PROG_LD], []) 3137fda9279dSmrgdnl AC_DEFUN([AC_PROG_LD], []) 3138fda9279dSmrg 3139fda9279dSmrg 3140fda9279dSmrg# _LT_PATH_LD_GNU 3141fda9279dSmrg#- -------------- 3142fda9279dSmrgm4_defun([_LT_PATH_LD_GNU], 3143fda9279dSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3144fda9279dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3145fda9279dSmrgcase `$LD -v 2>&1 </dev/null` in 3146fda9279dSmrg*GNU* | *'with BFD'*) 3147fda9279dSmrg lt_cv_prog_gnu_ld=yes 3148fda9279dSmrg ;; 3149fda9279dSmrg*) 3150fda9279dSmrg lt_cv_prog_gnu_ld=no 3151fda9279dSmrg ;; 3152fda9279dSmrgesac]) 3153fda9279dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3154fda9279dSmrg])# _LT_PATH_LD_GNU 3155fda9279dSmrg 3156fda9279dSmrg 3157fda9279dSmrg# _LT_CMD_RELOAD 3158fda9279dSmrg# -------------- 3159fda9279dSmrg# find reload flag for linker 3160fda9279dSmrg# -- PORTME Some linkers may need a different reload flag. 3161fda9279dSmrgm4_defun([_LT_CMD_RELOAD], 3162fda9279dSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3163fda9279dSmrg lt_cv_ld_reload_flag, 3164fda9279dSmrg [lt_cv_ld_reload_flag='-r']) 3165fda9279dSmrgreload_flag=$lt_cv_ld_reload_flag 3166fda9279dSmrgcase $reload_flag in 3167fda9279dSmrg"" | " "*) ;; 3168fda9279dSmrg*) reload_flag=" $reload_flag" ;; 3169fda9279dSmrgesac 3170fda9279dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3171fda9279dSmrgcase $host_os in 3172fda9279dSmrg cygwin* | mingw* | pw32* | cegcc*) 3173fda9279dSmrg if test "$GCC" != yes; then 3174fda9279dSmrg reload_cmds=false 3175fda9279dSmrg fi 3176fda9279dSmrg ;; 3177fda9279dSmrg darwin*) 3178fda9279dSmrg if test "$GCC" = yes; then 3179fda9279dSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3180fda9279dSmrg else 3181fda9279dSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3182fda9279dSmrg fi 3183fda9279dSmrg ;; 3184fda9279dSmrgesac 3185fda9279dSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3186fda9279dSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3187fda9279dSmrg])# _LT_CMD_RELOAD 3188fda9279dSmrg 3189fda9279dSmrg 3190fda9279dSmrg# _LT_CHECK_MAGIC_METHOD 3191fda9279dSmrg# ---------------------- 3192fda9279dSmrg# how to check for library dependencies 3193fda9279dSmrg# -- PORTME fill in with the dynamic library characteristics 3194fda9279dSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3195fda9279dSmrg[m4_require([_LT_DECL_EGREP]) 3196fda9279dSmrgm4_require([_LT_DECL_OBJDUMP]) 3197fda9279dSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3198fda9279dSmrglt_cv_deplibs_check_method, 3199fda9279dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3200fda9279dSmrglt_cv_file_magic_test_file= 3201fda9279dSmrglt_cv_deplibs_check_method='unknown' 3202fda9279dSmrg# Need to set the preceding variable on all platforms that support 3203fda9279dSmrg# interlibrary dependencies. 3204fda9279dSmrg# 'none' -- dependencies not supported. 3205fda9279dSmrg# `unknown' -- same as none, but documents that we really don't know. 3206fda9279dSmrg# 'pass_all' -- all dependencies passed with no checks. 3207fda9279dSmrg# 'test_compile' -- check by making test program. 3208fda9279dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3209fda9279dSmrg# which responds to the $file_magic_cmd with a given extended regex. 3210fda9279dSmrg# If you have `file' or equivalent on your system and you're not sure 3211fda9279dSmrg# whether `pass_all' will *always* work, you probably want this one. 3212fda9279dSmrg 3213fda9279dSmrgcase $host_os in 3214fda9279dSmrgaix[[4-9]]*) 3215fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3216fda9279dSmrg ;; 3217fda9279dSmrg 3218fda9279dSmrgbeos*) 3219fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3220fda9279dSmrg ;; 3221fda9279dSmrg 3222fda9279dSmrgbsdi[[45]]*) 3223fda9279dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3224fda9279dSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3225fda9279dSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3226fda9279dSmrg ;; 3227fda9279dSmrg 3228fda9279dSmrgcygwin*) 3229fda9279dSmrg # func_win32_libid is a shell function defined in ltmain.sh 3230fda9279dSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3231fda9279dSmrg lt_cv_file_magic_cmd='func_win32_libid' 3232fda9279dSmrg ;; 3233fda9279dSmrg 3234fda9279dSmrgmingw* | pw32*) 3235fda9279dSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3236fda9279dSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3237fda9279dSmrg # unless we find 'file', for example because we are cross-compiling. 3238fda9279dSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3239fda9279dSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3240fda9279dSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3241fda9279dSmrg lt_cv_file_magic_cmd='func_win32_libid' 3242fda9279dSmrg else 3243fda9279dSmrg # Keep this pattern in sync with the one in func_win32_libid. 3244fda9279dSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3245fda9279dSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3246fda9279dSmrg fi 3247fda9279dSmrg ;; 3248fda9279dSmrg 3249fda9279dSmrgcegcc*) 3250fda9279dSmrg # use the weaker test based on 'objdump'. See mingw*. 3251fda9279dSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3252fda9279dSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3253fda9279dSmrg ;; 3254fda9279dSmrg 3255fda9279dSmrgdarwin* | rhapsody*) 3256fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3257fda9279dSmrg ;; 3258fda9279dSmrg 3259fda9279dSmrgfreebsd* | dragonfly*) 3260fda9279dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3261fda9279dSmrg case $host_cpu in 3262fda9279dSmrg i*86 ) 3263fda9279dSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3264fda9279dSmrg # Let's accept both of them until this is cleared up. 3265fda9279dSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3266fda9279dSmrg lt_cv_file_magic_cmd=/usr/bin/file 3267fda9279dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3268fda9279dSmrg ;; 3269fda9279dSmrg esac 3270fda9279dSmrg else 3271fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3272fda9279dSmrg fi 3273fda9279dSmrg ;; 3274fda9279dSmrg 3275fda9279dSmrghaiku*) 3276fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3277fda9279dSmrg ;; 3278fda9279dSmrg 3279fda9279dSmrghpux10.20* | hpux11*) 3280fda9279dSmrg lt_cv_file_magic_cmd=/usr/bin/file 3281fda9279dSmrg case $host_cpu in 3282fda9279dSmrg ia64*) 3283fda9279dSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3284fda9279dSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3285fda9279dSmrg ;; 3286fda9279dSmrg hppa*64*) 3287fda9279dSmrg [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]'] 3288fda9279dSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3289fda9279dSmrg ;; 3290fda9279dSmrg *) 3291fda9279dSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3292fda9279dSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3293fda9279dSmrg ;; 3294fda9279dSmrg esac 3295fda9279dSmrg ;; 3296fda9279dSmrg 3297fda9279dSmrginterix[[3-9]]*) 3298fda9279dSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3299fda9279dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3300fda9279dSmrg ;; 3301fda9279dSmrg 3302fda9279dSmrgirix5* | irix6* | nonstopux*) 3303fda9279dSmrg case $LD in 3304fda9279dSmrg *-32|*"-32 ") libmagic=32-bit;; 3305fda9279dSmrg *-n32|*"-n32 ") libmagic=N32;; 3306fda9279dSmrg *-64|*"-64 ") libmagic=64-bit;; 3307fda9279dSmrg *) libmagic=never-match;; 3308fda9279dSmrg esac 3309fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3310fda9279dSmrg ;; 3311fda9279dSmrg 3312fda9279dSmrg# This must be glibc/ELF. 3313fda9279dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3314fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3315fda9279dSmrg ;; 3316fda9279dSmrg 3317fda9279dSmrgnetbsd* | netbsdelf*-gnu) 3318fda9279dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3319fda9279dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3320fda9279dSmrg else 3321fda9279dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3322fda9279dSmrg fi 3323fda9279dSmrg ;; 3324fda9279dSmrg 3325fda9279dSmrgnewos6*) 3326fda9279dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3327fda9279dSmrg lt_cv_file_magic_cmd=/usr/bin/file 3328fda9279dSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3329fda9279dSmrg ;; 3330fda9279dSmrg 3331fda9279dSmrg*nto* | *qnx*) 3332fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3333fda9279dSmrg ;; 3334fda9279dSmrg 3335fda9279dSmrgopenbsd*) 3336fda9279dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3337fda9279dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3338fda9279dSmrg else 3339fda9279dSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3340fda9279dSmrg fi 3341fda9279dSmrg ;; 3342fda9279dSmrg 3343fda9279dSmrgosf3* | osf4* | osf5*) 3344fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3345fda9279dSmrg ;; 3346fda9279dSmrg 3347fda9279dSmrgrdos*) 3348fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3349fda9279dSmrg ;; 3350fda9279dSmrg 3351fda9279dSmrgsolaris*) 3352fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3353fda9279dSmrg ;; 3354fda9279dSmrg 3355fda9279dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3356fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3357fda9279dSmrg ;; 3358fda9279dSmrg 3359fda9279dSmrgsysv4 | sysv4.3*) 3360fda9279dSmrg case $host_vendor in 3361fda9279dSmrg motorola) 3362fda9279dSmrg 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]]' 3363fda9279dSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3364fda9279dSmrg ;; 3365fda9279dSmrg ncr) 3366fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3367fda9279dSmrg ;; 3368fda9279dSmrg sequent) 3369fda9279dSmrg lt_cv_file_magic_cmd='/bin/file' 3370fda9279dSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3371fda9279dSmrg ;; 3372fda9279dSmrg sni) 3373fda9279dSmrg lt_cv_file_magic_cmd='/bin/file' 3374fda9279dSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3375fda9279dSmrg lt_cv_file_magic_test_file=/lib/libc.so 3376fda9279dSmrg ;; 3377fda9279dSmrg siemens) 3378fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3379fda9279dSmrg ;; 3380fda9279dSmrg pc) 3381fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3382fda9279dSmrg ;; 3383fda9279dSmrg esac 3384fda9279dSmrg ;; 3385fda9279dSmrg 3386fda9279dSmrgtpf*) 3387fda9279dSmrg lt_cv_deplibs_check_method=pass_all 3388fda9279dSmrg ;; 3389fda9279dSmrgesac 3390fda9279dSmrg]) 3391fda9279dSmrg 3392fda9279dSmrgfile_magic_glob= 3393fda9279dSmrgwant_nocaseglob=no 3394fda9279dSmrgif test "$build" = "$host"; then 3395fda9279dSmrg case $host_os in 3396fda9279dSmrg mingw* | pw32*) 3397fda9279dSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3398fda9279dSmrg want_nocaseglob=yes 3399fda9279dSmrg else 3400fda9279dSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3401fda9279dSmrg fi 3402fda9279dSmrg ;; 3403fda9279dSmrg esac 3404fda9279dSmrgfi 3405fda9279dSmrg 3406fda9279dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3407fda9279dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3408fda9279dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3409fda9279dSmrg 3410fda9279dSmrg_LT_DECL([], [deplibs_check_method], [1], 3411fda9279dSmrg [Method to check whether dependent libraries are shared objects]) 3412fda9279dSmrg_LT_DECL([], [file_magic_cmd], [1], 3413fda9279dSmrg [Command to use when deplibs_check_method = "file_magic"]) 3414fda9279dSmrg_LT_DECL([], [file_magic_glob], [1], 3415fda9279dSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 3416fda9279dSmrg_LT_DECL([], [want_nocaseglob], [1], 3417fda9279dSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3418fda9279dSmrg])# _LT_CHECK_MAGIC_METHOD 3419fda9279dSmrg 3420fda9279dSmrg 3421fda9279dSmrg# LT_PATH_NM 3422fda9279dSmrg# ---------- 3423fda9279dSmrg# find the pathname to a BSD- or MS-compatible name lister 3424fda9279dSmrgAC_DEFUN([LT_PATH_NM], 3425fda9279dSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3426fda9279dSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3427fda9279dSmrg[if test -n "$NM"; then 3428fda9279dSmrg # Let the user override the test. 3429fda9279dSmrg lt_cv_path_NM="$NM" 3430fda9279dSmrgelse 3431fda9279dSmrg lt_nm_to_check="${ac_tool_prefix}nm" 3432fda9279dSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3433fda9279dSmrg lt_nm_to_check="$lt_nm_to_check nm" 3434fda9279dSmrg fi 3435fda9279dSmrg for lt_tmp_nm in $lt_nm_to_check; do 3436fda9279dSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3437fda9279dSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3438fda9279dSmrg IFS="$lt_save_ifs" 3439fda9279dSmrg test -z "$ac_dir" && ac_dir=. 3440fda9279dSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 3441fda9279dSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3442fda9279dSmrg # Check to see if the nm accepts a BSD-compat flag. 3443fda9279dSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3444fda9279dSmrg # nm: unknown option "B" ignored 3445fda9279dSmrg # Tru64's nm complains that /dev/null is an invalid object file 3446fda9279dSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3447fda9279dSmrg */dev/null* | *'Invalid file or object type'*) 3448fda9279dSmrg lt_cv_path_NM="$tmp_nm -B" 3449fda9279dSmrg break 3450fda9279dSmrg ;; 3451fda9279dSmrg *) 3452fda9279dSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3453fda9279dSmrg */dev/null*) 3454fda9279dSmrg lt_cv_path_NM="$tmp_nm -p" 3455fda9279dSmrg break 3456fda9279dSmrg ;; 3457fda9279dSmrg *) 3458fda9279dSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3459fda9279dSmrg continue # so that we can try to find one that supports BSD flags 3460fda9279dSmrg ;; 3461fda9279dSmrg esac 3462fda9279dSmrg ;; 3463fda9279dSmrg esac 3464fda9279dSmrg fi 3465fda9279dSmrg done 3466fda9279dSmrg IFS="$lt_save_ifs" 3467fda9279dSmrg done 3468fda9279dSmrg : ${lt_cv_path_NM=no} 3469fda9279dSmrgfi]) 3470fda9279dSmrgif test "$lt_cv_path_NM" != "no"; then 3471fda9279dSmrg NM="$lt_cv_path_NM" 3472fda9279dSmrgelse 3473fda9279dSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3474fda9279dSmrg if test -n "$DUMPBIN"; then : 3475fda9279dSmrg # Let the user override the test. 3476fda9279dSmrg else 3477fda9279dSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3478fda9279dSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3479fda9279dSmrg *COFF*) 3480fda9279dSmrg DUMPBIN="$DUMPBIN -symbols" 3481fda9279dSmrg ;; 3482fda9279dSmrg *) 3483fda9279dSmrg DUMPBIN=: 3484fda9279dSmrg ;; 3485fda9279dSmrg esac 3486fda9279dSmrg fi 3487fda9279dSmrg AC_SUBST([DUMPBIN]) 3488fda9279dSmrg if test "$DUMPBIN" != ":"; then 3489fda9279dSmrg NM="$DUMPBIN" 3490fda9279dSmrg fi 3491fda9279dSmrgfi 3492fda9279dSmrgtest -z "$NM" && NM=nm 3493fda9279dSmrgAC_SUBST([NM]) 3494fda9279dSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3495fda9279dSmrg 3496fda9279dSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3497fda9279dSmrg [lt_cv_nm_interface="BSD nm" 3498fda9279dSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3499fda9279dSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3500fda9279dSmrg (eval "$ac_compile" 2>conftest.err) 3501fda9279dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3502fda9279dSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3503fda9279dSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3504fda9279dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3505fda9279dSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3506fda9279dSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3507fda9279dSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3508fda9279dSmrg lt_cv_nm_interface="MS dumpbin" 3509fda9279dSmrg fi 3510fda9279dSmrg rm -f conftest*]) 3511fda9279dSmrg])# LT_PATH_NM 3512fda9279dSmrg 3513fda9279dSmrg# Old names: 3514fda9279dSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3515fda9279dSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3516fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 3517fda9279dSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3518fda9279dSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3519fda9279dSmrg 3520fda9279dSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3521fda9279dSmrg# -------------------------------- 3522fda9279dSmrg# how to determine the name of the shared library 3523fda9279dSmrg# associated with a specific link library. 3524fda9279dSmrg# -- PORTME fill in with the dynamic library characteristics 3525fda9279dSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3526fda9279dSmrg[m4_require([_LT_DECL_EGREP]) 3527fda9279dSmrgm4_require([_LT_DECL_OBJDUMP]) 3528fda9279dSmrgm4_require([_LT_DECL_DLLTOOL]) 3529fda9279dSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3530fda9279dSmrglt_cv_sharedlib_from_linklib_cmd, 3531fda9279dSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3532fda9279dSmrg 3533fda9279dSmrgcase $host_os in 3534fda9279dSmrgcygwin* | mingw* | pw32* | cegcc*) 3535fda9279dSmrg # two different shell functions defined in ltmain.sh 3536fda9279dSmrg # decide which to use based on capabilities of $DLLTOOL 3537fda9279dSmrg case `$DLLTOOL --help 2>&1` in 3538fda9279dSmrg *--identify-strict*) 3539fda9279dSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3540fda9279dSmrg ;; 3541fda9279dSmrg *) 3542fda9279dSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3543fda9279dSmrg ;; 3544fda9279dSmrg esac 3545fda9279dSmrg ;; 3546fda9279dSmrg*) 3547fda9279dSmrg # fallback: assume linklib IS sharedlib 3548fda9279dSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3549fda9279dSmrg ;; 3550fda9279dSmrgesac 3551fda9279dSmrg]) 3552fda9279dSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3553fda9279dSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3554fda9279dSmrg 3555fda9279dSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3556fda9279dSmrg [Command to associate shared and link libraries]) 3557fda9279dSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3558fda9279dSmrg 3559fda9279dSmrg 3560fda9279dSmrg# _LT_PATH_MANIFEST_TOOL 3561fda9279dSmrg# ---------------------- 3562fda9279dSmrg# locate the manifest tool 3563fda9279dSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3564fda9279dSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3565fda9279dSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3566fda9279dSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3567fda9279dSmrg [lt_cv_path_mainfest_tool=no 3568fda9279dSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3569fda9279dSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3570fda9279dSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3571fda9279dSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3572fda9279dSmrg lt_cv_path_mainfest_tool=yes 3573fda9279dSmrg fi 3574fda9279dSmrg rm -f conftest*]) 3575fda9279dSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3576fda9279dSmrg MANIFEST_TOOL=: 3577fda9279dSmrgfi 3578fda9279dSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3579fda9279dSmrg])# _LT_PATH_MANIFEST_TOOL 3580fda9279dSmrg 3581fda9279dSmrg 3582fda9279dSmrg# LT_LIB_M 3583fda9279dSmrg# -------- 3584fda9279dSmrg# check for math library 3585fda9279dSmrgAC_DEFUN([LT_LIB_M], 3586fda9279dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3587fda9279dSmrgLIBM= 3588fda9279dSmrgcase $host in 3589fda9279dSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3590fda9279dSmrg # These system don't have libm, or don't need it 3591fda9279dSmrg ;; 3592fda9279dSmrg*-ncr-sysv4.3*) 3593fda9279dSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3594fda9279dSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3595fda9279dSmrg ;; 3596fda9279dSmrg*) 3597fda9279dSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3598fda9279dSmrg ;; 3599fda9279dSmrgesac 3600fda9279dSmrgAC_SUBST([LIBM]) 3601fda9279dSmrg])# LT_LIB_M 3602fda9279dSmrg 3603fda9279dSmrg# Old name: 3604fda9279dSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3605fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 3606fda9279dSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3607fda9279dSmrg 3608fda9279dSmrg 3609fda9279dSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3610fda9279dSmrg# ------------------------------- 3611fda9279dSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3612fda9279dSmrg[m4_require([_LT_TAG_COMPILER])dnl 3613fda9279dSmrg 3614fda9279dSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3615fda9279dSmrg 3616fda9279dSmrgif test "$GCC" = yes; then 3617fda9279dSmrg case $cc_basename in 3618fda9279dSmrg nvcc*) 3619fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3620fda9279dSmrg *) 3621fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3622fda9279dSmrg esac 3623fda9279dSmrg 3624fda9279dSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3625fda9279dSmrg lt_cv_prog_compiler_rtti_exceptions, 3626fda9279dSmrg [-fno-rtti -fno-exceptions], [], 3627fda9279dSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3628fda9279dSmrgfi 3629fda9279dSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3630fda9279dSmrg [Compiler flag to turn off builtin functions]) 3631fda9279dSmrg])# _LT_COMPILER_NO_RTTI 3632fda9279dSmrg 3633fda9279dSmrg 3634fda9279dSmrg# _LT_CMD_GLOBAL_SYMBOLS 3635fda9279dSmrg# ---------------------- 3636fda9279dSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3637fda9279dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3638fda9279dSmrgAC_REQUIRE([AC_PROG_CC])dnl 3639fda9279dSmrgAC_REQUIRE([AC_PROG_AWK])dnl 3640fda9279dSmrgAC_REQUIRE([LT_PATH_NM])dnl 3641fda9279dSmrgAC_REQUIRE([LT_PATH_LD])dnl 3642fda9279dSmrgm4_require([_LT_DECL_SED])dnl 3643fda9279dSmrgm4_require([_LT_DECL_EGREP])dnl 3644fda9279dSmrgm4_require([_LT_TAG_COMPILER])dnl 3645fda9279dSmrg 3646fda9279dSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3647fda9279dSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3648fda9279dSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3649fda9279dSmrg[ 3650fda9279dSmrg# These are sane defaults that work on at least a few old systems. 3651fda9279dSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3652fda9279dSmrg 3653fda9279dSmrg# Character class describing NM global symbol codes. 3654fda9279dSmrgsymcode='[[BCDEGRST]]' 3655fda9279dSmrg 3656fda9279dSmrg# Regexp to match symbols that can be accessed directly from C. 3657fda9279dSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3658fda9279dSmrg 3659fda9279dSmrg# Define system-specific variables. 3660fda9279dSmrgcase $host_os in 3661fda9279dSmrgaix*) 3662fda9279dSmrg symcode='[[BCDT]]' 3663fda9279dSmrg ;; 3664fda9279dSmrgcygwin* | mingw* | pw32* | cegcc*) 3665fda9279dSmrg symcode='[[ABCDGISTW]]' 3666fda9279dSmrg ;; 3667fda9279dSmrghpux*) 3668fda9279dSmrg if test "$host_cpu" = ia64; then 3669fda9279dSmrg symcode='[[ABCDEGRST]]' 3670fda9279dSmrg fi 3671fda9279dSmrg ;; 3672fda9279dSmrgirix* | nonstopux*) 3673fda9279dSmrg symcode='[[BCDEGRST]]' 3674fda9279dSmrg ;; 3675fda9279dSmrgosf*) 3676fda9279dSmrg symcode='[[BCDEGQRST]]' 3677fda9279dSmrg ;; 3678fda9279dSmrgsolaris*) 3679fda9279dSmrg symcode='[[BDRT]]' 3680fda9279dSmrg ;; 3681fda9279dSmrgsco3.2v5*) 3682fda9279dSmrg symcode='[[DT]]' 3683fda9279dSmrg ;; 3684fda9279dSmrgsysv4.2uw2*) 3685fda9279dSmrg symcode='[[DT]]' 3686fda9279dSmrg ;; 3687fda9279dSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3688fda9279dSmrg symcode='[[ABDT]]' 3689fda9279dSmrg ;; 3690fda9279dSmrgsysv4) 3691fda9279dSmrg symcode='[[DFNSTU]]' 3692fda9279dSmrg ;; 3693fda9279dSmrgesac 3694fda9279dSmrg 3695fda9279dSmrg# If we're using GNU nm, then use its standard symbol codes. 3696fda9279dSmrgcase `$NM -V 2>&1` in 3697fda9279dSmrg*GNU* | *'with BFD'*) 3698fda9279dSmrg symcode='[[ABCDGIRSTW]]' ;; 3699fda9279dSmrgesac 3700fda9279dSmrg 3701fda9279dSmrg# Transform an extracted symbol line into a proper C declaration. 3702fda9279dSmrg# Some systems (esp. on ia64) link data and code symbols differently, 3703fda9279dSmrg# so use this general approach. 3704fda9279dSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3705fda9279dSmrg 3706fda9279dSmrg# Transform an extracted symbol line into symbol name and symbol address 3707fda9279dSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3708fda9279dSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 3709fda9279dSmrg 3710fda9279dSmrg# Handle CRLF in mingw tool chain 3711fda9279dSmrgopt_cr= 3712fda9279dSmrgcase $build_os in 3713fda9279dSmrgmingw*) 3714fda9279dSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3715fda9279dSmrg ;; 3716fda9279dSmrgesac 3717fda9279dSmrg 3718fda9279dSmrg# Try without a prefix underscore, then with it. 3719fda9279dSmrgfor ac_symprfx in "" "_"; do 3720fda9279dSmrg 3721fda9279dSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3722fda9279dSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3723fda9279dSmrg 3724fda9279dSmrg # Write the raw and C identifiers. 3725fda9279dSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3726fda9279dSmrg # Fake it for dumpbin and say T for any non-static function 3727fda9279dSmrg # and D for any global variable. 3728fda9279dSmrg # Also find C++ and __fastcall symbols from MSVC++, 3729fda9279dSmrg # which start with @ or ?. 3730fda9279dSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3731fda9279dSmrg" {last_section=section; section=\$ 3};"\ 3732fda9279dSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3733fda9279dSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3734fda9279dSmrg" \$ 0!~/External *\|/{next};"\ 3735fda9279dSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3736fda9279dSmrg" {if(hide[section]) next};"\ 3737fda9279dSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3738fda9279dSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3739fda9279dSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3740fda9279dSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3741fda9279dSmrg" ' prfx=^$ac_symprfx]" 3742fda9279dSmrg else 3743fda9279dSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3744fda9279dSmrg fi 3745fda9279dSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3746fda9279dSmrg 3747fda9279dSmrg # Check to see that the pipe works correctly. 3748fda9279dSmrg pipe_works=no 3749fda9279dSmrg 3750fda9279dSmrg rm -f conftest* 3751fda9279dSmrg cat > conftest.$ac_ext <<_LT_EOF 3752fda9279dSmrg#ifdef __cplusplus 3753fda9279dSmrgextern "C" { 3754fda9279dSmrg#endif 3755fda9279dSmrgchar nm_test_var; 3756fda9279dSmrgvoid nm_test_func(void); 3757fda9279dSmrgvoid nm_test_func(void){} 3758fda9279dSmrg#ifdef __cplusplus 3759fda9279dSmrg} 3760fda9279dSmrg#endif 3761fda9279dSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 3762fda9279dSmrg_LT_EOF 3763fda9279dSmrg 3764fda9279dSmrg if AC_TRY_EVAL(ac_compile); then 3765fda9279dSmrg # Now try to grab the symbols. 3766fda9279dSmrg nlist=conftest.nm 3767fda9279dSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3768fda9279dSmrg # Try sorting and uniquifying the output. 3769fda9279dSmrg if sort "$nlist" | uniq > "$nlist"T; then 3770fda9279dSmrg mv -f "$nlist"T "$nlist" 3771fda9279dSmrg else 3772fda9279dSmrg rm -f "$nlist"T 3773fda9279dSmrg fi 3774fda9279dSmrg 3775fda9279dSmrg # Make sure that we snagged all the symbols we need. 3776fda9279dSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3777fda9279dSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3778fda9279dSmrg cat <<_LT_EOF > conftest.$ac_ext 3779fda9279dSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3780fda9279dSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3781fda9279dSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3782fda9279dSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3783fda9279dSmrg# define LT@&t@_DLSYM_CONST 3784fda9279dSmrg#elif defined(__osf__) 3785fda9279dSmrg/* This system does not cope well with relocations in const data. */ 3786fda9279dSmrg# define LT@&t@_DLSYM_CONST 3787fda9279dSmrg#else 3788fda9279dSmrg# define LT@&t@_DLSYM_CONST const 3789fda9279dSmrg#endif 3790fda9279dSmrg 3791fda9279dSmrg#ifdef __cplusplus 3792fda9279dSmrgextern "C" { 3793fda9279dSmrg#endif 3794fda9279dSmrg 3795fda9279dSmrg_LT_EOF 3796fda9279dSmrg # Now generate the symbol file. 3797fda9279dSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3798fda9279dSmrg 3799fda9279dSmrg cat <<_LT_EOF >> conftest.$ac_ext 3800fda9279dSmrg 3801fda9279dSmrg/* The mapping between symbol names and symbols. */ 3802fda9279dSmrgLT@&t@_DLSYM_CONST struct { 3803fda9279dSmrg const char *name; 3804fda9279dSmrg void *address; 3805fda9279dSmrg} 3806fda9279dSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3807fda9279dSmrg{ 3808fda9279dSmrg { "@PROGRAM@", (void *) 0 }, 3809fda9279dSmrg_LT_EOF 3810fda9279dSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3811fda9279dSmrg cat <<\_LT_EOF >> conftest.$ac_ext 3812fda9279dSmrg {0, (void *) 0} 3813fda9279dSmrg}; 3814fda9279dSmrg 3815fda9279dSmrg/* This works around a problem in FreeBSD linker */ 3816fda9279dSmrg#ifdef FREEBSD_WORKAROUND 3817fda9279dSmrgstatic const void *lt_preloaded_setup() { 3818fda9279dSmrg return lt__PROGRAM__LTX_preloaded_symbols; 3819fda9279dSmrg} 3820fda9279dSmrg#endif 3821fda9279dSmrg 3822fda9279dSmrg#ifdef __cplusplus 3823fda9279dSmrg} 3824fda9279dSmrg#endif 3825fda9279dSmrg_LT_EOF 3826fda9279dSmrg # Now try linking the two files. 3827fda9279dSmrg mv conftest.$ac_objext conftstm.$ac_objext 3828fda9279dSmrg lt_globsym_save_LIBS=$LIBS 3829fda9279dSmrg lt_globsym_save_CFLAGS=$CFLAGS 3830fda9279dSmrg LIBS="conftstm.$ac_objext" 3831fda9279dSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3832fda9279dSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3833fda9279dSmrg pipe_works=yes 3834fda9279dSmrg fi 3835fda9279dSmrg LIBS=$lt_globsym_save_LIBS 3836fda9279dSmrg CFLAGS=$lt_globsym_save_CFLAGS 3837fda9279dSmrg else 3838fda9279dSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3839fda9279dSmrg fi 3840fda9279dSmrg else 3841fda9279dSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3842fda9279dSmrg fi 3843fda9279dSmrg else 3844fda9279dSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3845fda9279dSmrg fi 3846fda9279dSmrg else 3847fda9279dSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3848fda9279dSmrg cat conftest.$ac_ext >&5 3849fda9279dSmrg fi 3850fda9279dSmrg rm -rf conftest* conftst* 3851fda9279dSmrg 3852fda9279dSmrg # Do not use the global_symbol_pipe unless it works. 3853fda9279dSmrg if test "$pipe_works" = yes; then 3854fda9279dSmrg break 3855fda9279dSmrg else 3856fda9279dSmrg lt_cv_sys_global_symbol_pipe= 3857fda9279dSmrg fi 3858fda9279dSmrgdone 3859fda9279dSmrg]) 3860fda9279dSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3861fda9279dSmrg lt_cv_sys_global_symbol_to_cdecl= 3862fda9279dSmrgfi 3863fda9279dSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3864fda9279dSmrg AC_MSG_RESULT(failed) 3865fda9279dSmrgelse 3866fda9279dSmrg AC_MSG_RESULT(ok) 3867fda9279dSmrgfi 3868fda9279dSmrg 3869fda9279dSmrg# Response file support. 3870fda9279dSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3871fda9279dSmrg nm_file_list_spec='@' 3872fda9279dSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3873fda9279dSmrg nm_file_list_spec='@' 3874fda9279dSmrgfi 3875fda9279dSmrg 3876fda9279dSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3877fda9279dSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 3878fda9279dSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3879fda9279dSmrg [Transform the output of nm in a proper C declaration]) 3880fda9279dSmrg_LT_DECL([global_symbol_to_c_name_address], 3881fda9279dSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3882fda9279dSmrg [Transform the output of nm in a C name address pair]) 3883fda9279dSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3884fda9279dSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3885fda9279dSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3886fda9279dSmrg_LT_DECL([], [nm_file_list_spec], [1], 3887fda9279dSmrg [Specify filename containing input files for $NM]) 3888fda9279dSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 3889fda9279dSmrg 3890fda9279dSmrg 3891fda9279dSmrg# _LT_COMPILER_PIC([TAGNAME]) 3892fda9279dSmrg# --------------------------- 3893fda9279dSmrgm4_defun([_LT_COMPILER_PIC], 3894fda9279dSmrg[m4_require([_LT_TAG_COMPILER])dnl 3895fda9279dSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3896fda9279dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3897fda9279dSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3898fda9279dSmrg 3899fda9279dSmrgm4_if([$1], [CXX], [ 3900fda9279dSmrg # C++ specific cases for pic, static, wl, etc. 3901fda9279dSmrg if test "$GXX" = yes; then 3902fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3903fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3904fda9279dSmrg 3905fda9279dSmrg case $host_os in 3906fda9279dSmrg aix*) 3907fda9279dSmrg # All AIX code is PIC. 3908fda9279dSmrg if test "$host_cpu" = ia64; then 3909fda9279dSmrg # AIX 5 now supports IA64 processor 3910fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3911fda9279dSmrg fi 3912fda9279dSmrg ;; 3913fda9279dSmrg 3914fda9279dSmrg amigaos*) 3915fda9279dSmrg case $host_cpu in 3916fda9279dSmrg powerpc) 3917fda9279dSmrg # see comment about AmigaOS4 .so support 3918fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3919fda9279dSmrg ;; 3920fda9279dSmrg m68k) 3921fda9279dSmrg # FIXME: we need at least 68020 code to build shared libraries, but 3922fda9279dSmrg # adding the `-m68020' flag to GCC prevents building anything better, 3923fda9279dSmrg # like `-m68040'. 3924fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3925fda9279dSmrg ;; 3926fda9279dSmrg esac 3927fda9279dSmrg ;; 3928fda9279dSmrg 3929fda9279dSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3930fda9279dSmrg # PIC is the default for these OSes. 3931fda9279dSmrg ;; 3932fda9279dSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3933fda9279dSmrg # This hack is so that the source file can tell whether it is being 3934fda9279dSmrg # built for inclusion in a dll (and should export symbols for example). 3935fda9279dSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3936fda9279dSmrg # (--disable-auto-import) libraries 3937fda9279dSmrg m4_if([$1], [GCJ], [], 3938fda9279dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3939fda9279dSmrg ;; 3940fda9279dSmrg darwin* | rhapsody*) 3941fda9279dSmrg # PIC is the default on this platform 3942fda9279dSmrg # Common symbols not allowed in MH_DYLIB files 3943fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3944fda9279dSmrg ;; 3945fda9279dSmrg *djgpp*) 3946fda9279dSmrg # DJGPP does not support shared libraries at all 3947fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3948fda9279dSmrg ;; 3949fda9279dSmrg haiku*) 3950fda9279dSmrg # PIC is the default for Haiku. 3951fda9279dSmrg # The "-static" flag exists, but is broken. 3952fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3953fda9279dSmrg ;; 3954fda9279dSmrg interix[[3-9]]*) 3955fda9279dSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3956fda9279dSmrg # Instead, we relocate shared libraries at runtime. 3957fda9279dSmrg ;; 3958fda9279dSmrg sysv4*MP*) 3959fda9279dSmrg if test -d /usr/nec; then 3960fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3961fda9279dSmrg fi 3962fda9279dSmrg ;; 3963fda9279dSmrg hpux*) 3964fda9279dSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3965fda9279dSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3966fda9279dSmrg # sets the default TLS model and affects inlining. 3967fda9279dSmrg case $host_cpu in 3968fda9279dSmrg hppa*64*) 3969fda9279dSmrg ;; 3970fda9279dSmrg *) 3971fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3972fda9279dSmrg ;; 3973fda9279dSmrg esac 3974fda9279dSmrg ;; 3975fda9279dSmrg *qnx* | *nto*) 3976fda9279dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3977fda9279dSmrg # it will coredump. 3978fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3979fda9279dSmrg ;; 3980fda9279dSmrg *) 3981fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3982fda9279dSmrg ;; 3983fda9279dSmrg esac 3984fda9279dSmrg else 3985fda9279dSmrg case $host_os in 3986fda9279dSmrg aix[[4-9]]*) 3987fda9279dSmrg # All AIX code is PIC. 3988fda9279dSmrg if test "$host_cpu" = ia64; then 3989fda9279dSmrg # AIX 5 now supports IA64 processor 3990fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3991fda9279dSmrg else 3992fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3993fda9279dSmrg fi 3994fda9279dSmrg ;; 3995fda9279dSmrg chorus*) 3996fda9279dSmrg case $cc_basename in 3997fda9279dSmrg cxch68*) 3998fda9279dSmrg # Green Hills C++ Compiler 3999fda9279dSmrg # _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" 4000fda9279dSmrg ;; 4001fda9279dSmrg esac 4002fda9279dSmrg ;; 4003fda9279dSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4004fda9279dSmrg # This hack is so that the source file can tell whether it is being 4005fda9279dSmrg # built for inclusion in a dll (and should export symbols for example). 4006fda9279dSmrg m4_if([$1], [GCJ], [], 4007fda9279dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4008fda9279dSmrg ;; 4009fda9279dSmrg dgux*) 4010fda9279dSmrg case $cc_basename in 4011fda9279dSmrg ec++*) 4012fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4013fda9279dSmrg ;; 4014fda9279dSmrg ghcx*) 4015fda9279dSmrg # Green Hills C++ Compiler 4016fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4017fda9279dSmrg ;; 4018fda9279dSmrg *) 4019fda9279dSmrg ;; 4020fda9279dSmrg esac 4021fda9279dSmrg ;; 4022fda9279dSmrg freebsd* | dragonfly*) 4023fda9279dSmrg # FreeBSD uses GNU C++ 4024fda9279dSmrg ;; 4025fda9279dSmrg hpux9* | hpux10* | hpux11*) 4026fda9279dSmrg case $cc_basename in 4027fda9279dSmrg CC*) 4028fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4029fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4030fda9279dSmrg if test "$host_cpu" != ia64; then 4031fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4032fda9279dSmrg fi 4033fda9279dSmrg ;; 4034fda9279dSmrg aCC*) 4035fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4036fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4037fda9279dSmrg case $host_cpu in 4038fda9279dSmrg hppa*64*|ia64*) 4039fda9279dSmrg # +Z the default 4040fda9279dSmrg ;; 4041fda9279dSmrg *) 4042fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4043fda9279dSmrg ;; 4044fda9279dSmrg esac 4045fda9279dSmrg ;; 4046fda9279dSmrg *) 4047fda9279dSmrg ;; 4048fda9279dSmrg esac 4049fda9279dSmrg ;; 4050fda9279dSmrg interix*) 4051fda9279dSmrg # This is c89, which is MS Visual C++ (no shared libs) 4052fda9279dSmrg # Anyone wants to do a port? 4053fda9279dSmrg ;; 4054fda9279dSmrg irix5* | irix6* | nonstopux*) 4055fda9279dSmrg case $cc_basename in 4056fda9279dSmrg CC*) 4057fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4058fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4059fda9279dSmrg # CC pic flag -KPIC is the default. 4060fda9279dSmrg ;; 4061fda9279dSmrg *) 4062fda9279dSmrg ;; 4063fda9279dSmrg esac 4064fda9279dSmrg ;; 4065fda9279dSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4066fda9279dSmrg case $cc_basename in 4067fda9279dSmrg KCC*) 4068fda9279dSmrg # KAI C++ Compiler 4069fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4070fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4071fda9279dSmrg ;; 4072fda9279dSmrg ecpc* ) 4073fda9279dSmrg # old Intel C++ for x86_64 which still supported -KPIC. 4074fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4075fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4076fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4077fda9279dSmrg ;; 4078fda9279dSmrg icpc* ) 4079fda9279dSmrg # Intel C++, used to be incompatible with GCC. 4080fda9279dSmrg # ICC 10 doesn't accept -KPIC any more. 4081fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4082fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4083fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4084fda9279dSmrg ;; 4085fda9279dSmrg pgCC* | pgcpp*) 4086fda9279dSmrg # Portland Group C++ compiler 4087fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4088fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4089fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4090fda9279dSmrg ;; 4091fda9279dSmrg cxx*) 4092fda9279dSmrg # Compaq C++ 4093fda9279dSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4094fda9279dSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4095fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4096fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4097fda9279dSmrg ;; 4098fda9279dSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4099fda9279dSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4100fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4101fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4102fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4103fda9279dSmrg ;; 4104fda9279dSmrg *) 4105fda9279dSmrg case `$CC -V 2>&1 | sed 5q` in 4106fda9279dSmrg *Sun\ C*) 4107fda9279dSmrg # Sun C++ 5.9 4108fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4109fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4110fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4111fda9279dSmrg ;; 4112fda9279dSmrg esac 4113fda9279dSmrg ;; 4114fda9279dSmrg esac 4115fda9279dSmrg ;; 4116fda9279dSmrg lynxos*) 4117fda9279dSmrg ;; 4118fda9279dSmrg m88k*) 4119fda9279dSmrg ;; 4120fda9279dSmrg mvs*) 4121fda9279dSmrg case $cc_basename in 4122fda9279dSmrg cxx*) 4123fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4124fda9279dSmrg ;; 4125fda9279dSmrg *) 4126fda9279dSmrg ;; 4127fda9279dSmrg esac 4128fda9279dSmrg ;; 4129fda9279dSmrg netbsd* | netbsdelf*-gnu) 4130fda9279dSmrg ;; 4131fda9279dSmrg *qnx* | *nto*) 4132fda9279dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4133fda9279dSmrg # it will coredump. 4134fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4135fda9279dSmrg ;; 4136fda9279dSmrg osf3* | osf4* | osf5*) 4137fda9279dSmrg case $cc_basename in 4138fda9279dSmrg KCC*) 4139fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4140fda9279dSmrg ;; 4141fda9279dSmrg RCC*) 4142fda9279dSmrg # Rational C++ 2.4.1 4143fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4144fda9279dSmrg ;; 4145fda9279dSmrg cxx*) 4146fda9279dSmrg # Digital/Compaq C++ 4147fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4148fda9279dSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4149fda9279dSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4150fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4151fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4152fda9279dSmrg ;; 4153fda9279dSmrg *) 4154fda9279dSmrg ;; 4155fda9279dSmrg esac 4156fda9279dSmrg ;; 4157fda9279dSmrg psos*) 4158fda9279dSmrg ;; 4159fda9279dSmrg solaris*) 4160fda9279dSmrg case $cc_basename in 4161fda9279dSmrg CC* | sunCC*) 4162fda9279dSmrg # Sun C++ 4.2, 5.x and Centerline C++ 4163fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4164fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4165fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4166fda9279dSmrg ;; 4167fda9279dSmrg gcx*) 4168fda9279dSmrg # Green Hills C++ Compiler 4169fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4170fda9279dSmrg ;; 4171fda9279dSmrg *) 4172fda9279dSmrg ;; 4173fda9279dSmrg esac 4174fda9279dSmrg ;; 4175fda9279dSmrg sunos4*) 4176fda9279dSmrg case $cc_basename in 4177fda9279dSmrg CC*) 4178fda9279dSmrg # Sun C++ 4.x 4179fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4180fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4181fda9279dSmrg ;; 4182fda9279dSmrg lcc*) 4183fda9279dSmrg # Lucid 4184fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4185fda9279dSmrg ;; 4186fda9279dSmrg *) 4187fda9279dSmrg ;; 4188fda9279dSmrg esac 4189fda9279dSmrg ;; 4190fda9279dSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4191fda9279dSmrg case $cc_basename in 4192fda9279dSmrg CC*) 4193fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4194fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4195fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4196fda9279dSmrg ;; 4197fda9279dSmrg esac 4198fda9279dSmrg ;; 4199fda9279dSmrg tandem*) 4200fda9279dSmrg case $cc_basename in 4201fda9279dSmrg NCC*) 4202fda9279dSmrg # NonStop-UX NCC 3.20 4203fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4204fda9279dSmrg ;; 4205fda9279dSmrg *) 4206fda9279dSmrg ;; 4207fda9279dSmrg esac 4208fda9279dSmrg ;; 4209fda9279dSmrg vxworks*) 4210fda9279dSmrg ;; 4211fda9279dSmrg *) 4212fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4213fda9279dSmrg ;; 4214fda9279dSmrg esac 4215fda9279dSmrg fi 4216fda9279dSmrg], 4217fda9279dSmrg[ 4218fda9279dSmrg if test "$GCC" = yes; then 4219fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4220fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4221fda9279dSmrg 4222fda9279dSmrg case $host_os in 4223fda9279dSmrg aix*) 4224fda9279dSmrg # All AIX code is PIC. 4225fda9279dSmrg if test "$host_cpu" = ia64; then 4226fda9279dSmrg # AIX 5 now supports IA64 processor 4227fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4228fda9279dSmrg fi 4229fda9279dSmrg ;; 4230fda9279dSmrg 4231fda9279dSmrg amigaos*) 4232fda9279dSmrg case $host_cpu in 4233fda9279dSmrg powerpc) 4234fda9279dSmrg # see comment about AmigaOS4 .so support 4235fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4236fda9279dSmrg ;; 4237fda9279dSmrg m68k) 4238fda9279dSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4239fda9279dSmrg # adding the `-m68020' flag to GCC prevents building anything better, 4240fda9279dSmrg # like `-m68040'. 4241fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4242fda9279dSmrg ;; 4243fda9279dSmrg esac 4244fda9279dSmrg ;; 4245fda9279dSmrg 4246fda9279dSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4247fda9279dSmrg # PIC is the default for these OSes. 4248fda9279dSmrg ;; 4249fda9279dSmrg 4250fda9279dSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4251fda9279dSmrg # This hack is so that the source file can tell whether it is being 4252fda9279dSmrg # built for inclusion in a dll (and should export symbols for example). 4253fda9279dSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4254fda9279dSmrg # (--disable-auto-import) libraries 4255fda9279dSmrg m4_if([$1], [GCJ], [], 4256fda9279dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4257fda9279dSmrg ;; 4258fda9279dSmrg 4259fda9279dSmrg darwin* | rhapsody*) 4260fda9279dSmrg # PIC is the default on this platform 4261fda9279dSmrg # Common symbols not allowed in MH_DYLIB files 4262fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4263fda9279dSmrg ;; 4264fda9279dSmrg 4265fda9279dSmrg haiku*) 4266fda9279dSmrg # PIC is the default for Haiku. 4267fda9279dSmrg # The "-static" flag exists, but is broken. 4268fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4269fda9279dSmrg ;; 4270fda9279dSmrg 4271fda9279dSmrg hpux*) 4272fda9279dSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4273fda9279dSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4274fda9279dSmrg # sets the default TLS model and affects inlining. 4275fda9279dSmrg case $host_cpu in 4276fda9279dSmrg hppa*64*) 4277fda9279dSmrg # +Z the default 4278fda9279dSmrg ;; 4279fda9279dSmrg *) 4280fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4281fda9279dSmrg ;; 4282fda9279dSmrg esac 4283fda9279dSmrg ;; 4284fda9279dSmrg 4285fda9279dSmrg interix[[3-9]]*) 4286fda9279dSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4287fda9279dSmrg # Instead, we relocate shared libraries at runtime. 4288fda9279dSmrg ;; 4289fda9279dSmrg 4290fda9279dSmrg msdosdjgpp*) 4291fda9279dSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4292fda9279dSmrg # on systems that don't support them. 4293fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4294fda9279dSmrg enable_shared=no 4295fda9279dSmrg ;; 4296fda9279dSmrg 4297fda9279dSmrg *nto* | *qnx*) 4298fda9279dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4299fda9279dSmrg # it will coredump. 4300fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4301fda9279dSmrg ;; 4302fda9279dSmrg 4303fda9279dSmrg sysv4*MP*) 4304fda9279dSmrg if test -d /usr/nec; then 4305fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4306fda9279dSmrg fi 4307fda9279dSmrg ;; 4308fda9279dSmrg 4309fda9279dSmrg *) 4310fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4311fda9279dSmrg ;; 4312fda9279dSmrg esac 4313fda9279dSmrg 4314fda9279dSmrg case $cc_basename in 4315fda9279dSmrg nvcc*) # Cuda Compiler Driver 2.2 4316fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4317fda9279dSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4318fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4319fda9279dSmrg fi 4320fda9279dSmrg ;; 4321fda9279dSmrg esac 4322fda9279dSmrg else 4323fda9279dSmrg # PORTME Check for flag to pass linker flags through the system compiler. 4324fda9279dSmrg case $host_os in 4325fda9279dSmrg aix*) 4326fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4327fda9279dSmrg if test "$host_cpu" = ia64; then 4328fda9279dSmrg # AIX 5 now supports IA64 processor 4329fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4330fda9279dSmrg else 4331fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4332fda9279dSmrg fi 4333fda9279dSmrg ;; 4334fda9279dSmrg 4335fda9279dSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4336fda9279dSmrg # This hack is so that the source file can tell whether it is being 4337fda9279dSmrg # built for inclusion in a dll (and should export symbols for example). 4338fda9279dSmrg m4_if([$1], [GCJ], [], 4339fda9279dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4340fda9279dSmrg ;; 4341fda9279dSmrg 4342fda9279dSmrg hpux9* | hpux10* | hpux11*) 4343fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4344fda9279dSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4345fda9279dSmrg # not for PA HP-UX. 4346fda9279dSmrg case $host_cpu in 4347fda9279dSmrg hppa*64*|ia64*) 4348fda9279dSmrg # +Z the default 4349fda9279dSmrg ;; 4350fda9279dSmrg *) 4351fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4352fda9279dSmrg ;; 4353fda9279dSmrg esac 4354fda9279dSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4355fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4356fda9279dSmrg ;; 4357fda9279dSmrg 4358fda9279dSmrg irix5* | irix6* | nonstopux*) 4359fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4360fda9279dSmrg # PIC (with -KPIC) is the default. 4361fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4362fda9279dSmrg ;; 4363fda9279dSmrg 4364fda9279dSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4365fda9279dSmrg case $cc_basename in 4366fda9279dSmrg # old Intel for x86_64 which still supported -KPIC. 4367fda9279dSmrg ecc*) 4368fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4369fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4370fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4371fda9279dSmrg ;; 4372fda9279dSmrg # icc used to be incompatible with GCC. 4373fda9279dSmrg # ICC 10 doesn't accept -KPIC any more. 4374fda9279dSmrg icc* | ifort*) 4375fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4376fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4377fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4378fda9279dSmrg ;; 4379fda9279dSmrg # Lahey Fortran 8.1. 4380fda9279dSmrg lf95*) 4381fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4382fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4383fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4384fda9279dSmrg ;; 4385fda9279dSmrg nagfor*) 4386fda9279dSmrg # NAG Fortran compiler 4387fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4388fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4389fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4390fda9279dSmrg ;; 4391fda9279dSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4392fda9279dSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 4393fda9279dSmrg # which looks to be a dead project) 4394fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4395fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4396fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4397fda9279dSmrg ;; 4398fda9279dSmrg ccc*) 4399fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4400fda9279dSmrg # All Alpha code is PIC. 4401fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4402fda9279dSmrg ;; 4403fda9279dSmrg xl* | bgxl* | bgf* | mpixl*) 4404fda9279dSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4405fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4406fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4407fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4408fda9279dSmrg ;; 4409fda9279dSmrg *) 4410fda9279dSmrg case `$CC -V 2>&1 | sed 5q` in 4411fda9279dSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4412fda9279dSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4413fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4414fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4415fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4416fda9279dSmrg ;; 4417fda9279dSmrg *Sun\ F* | *Sun*Fortran*) 4418fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4419fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4420fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4421fda9279dSmrg ;; 4422fda9279dSmrg *Sun\ C*) 4423fda9279dSmrg # Sun C 5.9 4424fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4425fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4426fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4427fda9279dSmrg ;; 4428fda9279dSmrg *Intel*\ [[CF]]*Compiler*) 4429fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4430fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4431fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4432fda9279dSmrg ;; 4433fda9279dSmrg *Portland\ Group*) 4434fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4435fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4436fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4437fda9279dSmrg ;; 4438fda9279dSmrg esac 4439fda9279dSmrg ;; 4440fda9279dSmrg esac 4441fda9279dSmrg ;; 4442fda9279dSmrg 4443fda9279dSmrg newsos6) 4444fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4445fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4446fda9279dSmrg ;; 4447fda9279dSmrg 4448fda9279dSmrg *nto* | *qnx*) 4449fda9279dSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4450fda9279dSmrg # it will coredump. 4451fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4452fda9279dSmrg ;; 4453fda9279dSmrg 4454fda9279dSmrg osf3* | osf4* | osf5*) 4455fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4456fda9279dSmrg # All OSF/1 code is PIC. 4457fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4458fda9279dSmrg ;; 4459fda9279dSmrg 4460fda9279dSmrg rdos*) 4461fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4462fda9279dSmrg ;; 4463fda9279dSmrg 4464fda9279dSmrg solaris*) 4465fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4466fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4467fda9279dSmrg case $cc_basename in 4468fda9279dSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4469fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4470fda9279dSmrg *) 4471fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4472fda9279dSmrg esac 4473fda9279dSmrg ;; 4474fda9279dSmrg 4475fda9279dSmrg sunos4*) 4476fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4477fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4478fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4479fda9279dSmrg ;; 4480fda9279dSmrg 4481fda9279dSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 4482fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4483fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4484fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4485fda9279dSmrg ;; 4486fda9279dSmrg 4487fda9279dSmrg sysv4*MP*) 4488fda9279dSmrg if test -d /usr/nec ;then 4489fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4490fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4491fda9279dSmrg fi 4492fda9279dSmrg ;; 4493fda9279dSmrg 4494fda9279dSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4495fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4496fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4497fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4498fda9279dSmrg ;; 4499fda9279dSmrg 4500fda9279dSmrg unicos*) 4501fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4502fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4503fda9279dSmrg ;; 4504fda9279dSmrg 4505fda9279dSmrg uts4*) 4506fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4507fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4508fda9279dSmrg ;; 4509fda9279dSmrg 4510fda9279dSmrg *) 4511fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4512fda9279dSmrg ;; 4513fda9279dSmrg esac 4514fda9279dSmrg fi 4515fda9279dSmrg]) 4516fda9279dSmrgcase $host_os in 4517fda9279dSmrg # For platforms which do not support PIC, -DPIC is meaningless: 4518fda9279dSmrg *djgpp*) 4519fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4520fda9279dSmrg ;; 4521fda9279dSmrg *) 4522fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4523fda9279dSmrg ;; 4524fda9279dSmrgesac 4525fda9279dSmrg 4526fda9279dSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4527fda9279dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4528fda9279dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4529fda9279dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4530fda9279dSmrg 4531fda9279dSmrg# 4532fda9279dSmrg# Check to make sure the PIC flag actually works. 4533fda9279dSmrg# 4534fda9279dSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4535fda9279dSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4536fda9279dSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4537fda9279dSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4538fda9279dSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4539fda9279dSmrg "" | " "*) ;; 4540fda9279dSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4541fda9279dSmrg esac], 4542fda9279dSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4543fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4544fda9279dSmrgfi 4545fda9279dSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4546fda9279dSmrg [Additional compiler flags for building library objects]) 4547fda9279dSmrg 4548fda9279dSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4549fda9279dSmrg [How to pass a linker flag through the compiler]) 4550fda9279dSmrg# 4551fda9279dSmrg# Check to make sure the static flag actually works. 4552fda9279dSmrg# 4553fda9279dSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4554fda9279dSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4555fda9279dSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4556fda9279dSmrg $lt_tmp_static_flag, 4557fda9279dSmrg [], 4558fda9279dSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4559fda9279dSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4560fda9279dSmrg [Compiler flag to prevent dynamic linking]) 4561fda9279dSmrg])# _LT_COMPILER_PIC 4562fda9279dSmrg 4563fda9279dSmrg 4564fda9279dSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 4565fda9279dSmrg# ---------------------------- 4566fda9279dSmrg# See if the linker supports building shared libraries. 4567fda9279dSmrgm4_defun([_LT_LINKER_SHLIBS], 4568fda9279dSmrg[AC_REQUIRE([LT_PATH_LD])dnl 4569fda9279dSmrgAC_REQUIRE([LT_PATH_NM])dnl 4570fda9279dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4571fda9279dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4572fda9279dSmrgm4_require([_LT_DECL_EGREP])dnl 4573fda9279dSmrgm4_require([_LT_DECL_SED])dnl 4574fda9279dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4575fda9279dSmrgm4_require([_LT_TAG_COMPILER])dnl 4576fda9279dSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4577fda9279dSmrgm4_if([$1], [CXX], [ 4578fda9279dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4579fda9279dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4580fda9279dSmrg case $host_os in 4581fda9279dSmrg aix[[4-9]]*) 4582fda9279dSmrg # If we're using GNU nm, then we don't want the "-C" option. 4583fda9279dSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4584fda9279dSmrg # Also, AIX nm treats weak defined symbols like other global defined 4585fda9279dSmrg # symbols, whereas GNU nm marks them as "W". 4586fda9279dSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4587fda9279dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4588fda9279dSmrg else 4589fda9279dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4590fda9279dSmrg fi 4591fda9279dSmrg ;; 4592fda9279dSmrg pw32*) 4593fda9279dSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4594fda9279dSmrg ;; 4595fda9279dSmrg cygwin* | mingw* | cegcc*) 4596fda9279dSmrg case $cc_basename in 4597fda9279dSmrg cl*) 4598fda9279dSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4599fda9279dSmrg ;; 4600fda9279dSmrg *) 4601fda9279dSmrg _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' 4602fda9279dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4603fda9279dSmrg ;; 4604fda9279dSmrg esac 4605fda9279dSmrg ;; 4606fda9279dSmrg linux* | k*bsd*-gnu | gnu*) 4607fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=no 4608fda9279dSmrg ;; 4609fda9279dSmrg *) 4610fda9279dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4611fda9279dSmrg ;; 4612fda9279dSmrg esac 4613fda9279dSmrg], [ 4614fda9279dSmrg runpath_var= 4615fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 4616fda9279dSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4617fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)= 4618fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4619fda9279dSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 4620fda9279dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4621fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4622fda9279dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4623fda9279dSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 4624fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4625fda9279dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4626fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4627fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4628fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4629fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4630fda9279dSmrg _LT_TAGVAR(inherit_rpath, $1)=no 4631fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4632fda9279dSmrg _LT_TAGVAR(module_cmds, $1)= 4633fda9279dSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 4634fda9279dSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4635fda9279dSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4636fda9279dSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4637fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4638fda9279dSmrg # include_expsyms should be a list of space-separated symbols to be *always* 4639fda9279dSmrg # included in the symbol list 4640fda9279dSmrg _LT_TAGVAR(include_expsyms, $1)= 4641fda9279dSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 4642fda9279dSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4643fda9279dSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4644fda9279dSmrg # as well as any symbol that contains `d'. 4645fda9279dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4646fda9279dSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4647fda9279dSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 4648fda9279dSmrg # the symbol is explicitly referenced. Since portable code cannot 4649fda9279dSmrg # rely on this symbol name, it's probably fine to never include it in 4650fda9279dSmrg # preloaded symbol tables. 4651fda9279dSmrg # Exclude shared library initialization/finalization symbols. 4652fda9279dSmrgdnl Note also adjust exclude_expsyms for C++ above. 4653fda9279dSmrg extract_expsyms_cmds= 4654fda9279dSmrg 4655fda9279dSmrg case $host_os in 4656fda9279dSmrg cygwin* | mingw* | pw32* | cegcc*) 4657fda9279dSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4658fda9279dSmrg # When not using gcc, we currently assume that we are using 4659fda9279dSmrg # Microsoft Visual C++. 4660fda9279dSmrg if test "$GCC" != yes; then 4661fda9279dSmrg with_gnu_ld=no 4662fda9279dSmrg fi 4663fda9279dSmrg ;; 4664fda9279dSmrg interix*) 4665fda9279dSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4666fda9279dSmrg with_gnu_ld=yes 4667fda9279dSmrg ;; 4668fda9279dSmrg openbsd*) 4669fda9279dSmrg with_gnu_ld=no 4670fda9279dSmrg ;; 4671fda9279dSmrg linux* | k*bsd*-gnu | gnu*) 4672fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=no 4673fda9279dSmrg ;; 4674fda9279dSmrg esac 4675fda9279dSmrg 4676fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 4677fda9279dSmrg 4678fda9279dSmrg # On some targets, GNU ld is compatible enough with the native linker 4679fda9279dSmrg # that we're better off using the native interface for both. 4680fda9279dSmrg lt_use_gnu_ld_interface=no 4681fda9279dSmrg if test "$with_gnu_ld" = yes; then 4682fda9279dSmrg case $host_os in 4683fda9279dSmrg aix*) 4684fda9279dSmrg # The AIX port of GNU ld has always aspired to compatibility 4685fda9279dSmrg # with the native linker. However, as the warning in the GNU ld 4686fda9279dSmrg # block says, versions before 2.19.5* couldn't really create working 4687fda9279dSmrg # shared libraries, regardless of the interface used. 4688fda9279dSmrg case `$LD -v 2>&1` in 4689fda9279dSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4690fda9279dSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4691fda9279dSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4692fda9279dSmrg *) 4693fda9279dSmrg lt_use_gnu_ld_interface=yes 4694fda9279dSmrg ;; 4695fda9279dSmrg esac 4696fda9279dSmrg ;; 4697fda9279dSmrg *) 4698fda9279dSmrg lt_use_gnu_ld_interface=yes 4699fda9279dSmrg ;; 4700fda9279dSmrg esac 4701fda9279dSmrg fi 4702fda9279dSmrg 4703fda9279dSmrg if test "$lt_use_gnu_ld_interface" = yes; then 4704fda9279dSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 4705fda9279dSmrg wlarc='${wl}' 4706fda9279dSmrg 4707fda9279dSmrg # Set some defaults for GNU ld with shared library support. These 4708fda9279dSmrg # are reset later if shared libraries are not supported. Putting them 4709fda9279dSmrg # here allows them to be overridden if necessary. 4710fda9279dSmrg runpath_var=LD_RUN_PATH 4711fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4712fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4713fda9279dSmrg # ancient GNU ld didn't support --whole-archive et. al. 4714fda9279dSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4715fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4716fda9279dSmrg else 4717fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4718fda9279dSmrg fi 4719fda9279dSmrg supports_anon_versioning=no 4720fda9279dSmrg case `$LD -v 2>&1` in 4721fda9279dSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 4722fda9279dSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4723fda9279dSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4724fda9279dSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4725fda9279dSmrg *\ 2.11.*) ;; # other 2.11 versions 4726fda9279dSmrg *) supports_anon_versioning=yes ;; 4727fda9279dSmrg esac 4728fda9279dSmrg 4729fda9279dSmrg # See if GNU ld supports shared libraries. 4730fda9279dSmrg case $host_os in 4731fda9279dSmrg aix[[3-9]]*) 4732fda9279dSmrg # On AIX/PPC, the GNU linker is very broken 4733fda9279dSmrg if test "$host_cpu" != ia64; then 4734fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4735fda9279dSmrg cat <<_LT_EOF 1>&2 4736fda9279dSmrg 4737fda9279dSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 4738fda9279dSmrg*** to be unable to reliably create shared libraries on AIX. 4739fda9279dSmrg*** Therefore, libtool is disabling shared libraries support. If you 4740fda9279dSmrg*** really care for shared libraries, you may want to install binutils 4741fda9279dSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4742fda9279dSmrg*** You will then need to restart the configuration process. 4743fda9279dSmrg 4744fda9279dSmrg_LT_EOF 4745fda9279dSmrg fi 4746fda9279dSmrg ;; 4747fda9279dSmrg 4748fda9279dSmrg amigaos*) 4749fda9279dSmrg case $host_cpu in 4750fda9279dSmrg powerpc) 4751fda9279dSmrg # see comment about AmigaOS4 .so support 4752fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4753fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4754fda9279dSmrg ;; 4755fda9279dSmrg m68k) 4756fda9279dSmrg _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)' 4757fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4758fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4759fda9279dSmrg ;; 4760fda9279dSmrg esac 4761fda9279dSmrg ;; 4762fda9279dSmrg 4763fda9279dSmrg beos*) 4764fda9279dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4765fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4766fda9279dSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4767fda9279dSmrg # support --undefined. This deserves some investigation. FIXME 4768fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4769fda9279dSmrg else 4770fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4771fda9279dSmrg fi 4772fda9279dSmrg ;; 4773fda9279dSmrg 4774fda9279dSmrg cygwin* | mingw* | pw32* | cegcc*) 4775fda9279dSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4776fda9279dSmrg # as there is no search path for DLLs. 4777fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4778fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4779fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4780fda9279dSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4781fda9279dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4782fda9279dSmrg _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' 4783fda9279dSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4784fda9279dSmrg 4785fda9279dSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4786fda9279dSmrg _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' 4787fda9279dSmrg # If the export-symbols file already is a .def file (1st line 4788fda9279dSmrg # is EXPORTS), use it as is; otherwise, prepend... 4789fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4790fda9279dSmrg cp $export_symbols $output_objdir/$soname.def; 4791fda9279dSmrg else 4792fda9279dSmrg echo EXPORTS > $output_objdir/$soname.def; 4793fda9279dSmrg cat $export_symbols >> $output_objdir/$soname.def; 4794fda9279dSmrg fi~ 4795fda9279dSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4796fda9279dSmrg else 4797fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4798fda9279dSmrg fi 4799fda9279dSmrg ;; 4800fda9279dSmrg 4801fda9279dSmrg haiku*) 4802fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4803fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4804fda9279dSmrg ;; 4805fda9279dSmrg 4806fda9279dSmrg interix[[3-9]]*) 4807fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4808fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4809fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4810fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4811fda9279dSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4812fda9279dSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4813fda9279dSmrg # default) and relocated if they conflict, which is a slow very memory 4814fda9279dSmrg # consuming and fragmenting process. To avoid this, we pick a random, 4815fda9279dSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4816fda9279dSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4817fda9279dSmrg _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' 4818fda9279dSmrg _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' 4819fda9279dSmrg ;; 4820fda9279dSmrg 4821fda9279dSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4822fda9279dSmrg tmp_diet=no 4823fda9279dSmrg if test "$host_os" = linux-dietlibc; then 4824fda9279dSmrg case $cc_basename in 4825fda9279dSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4826fda9279dSmrg esac 4827fda9279dSmrg fi 4828fda9279dSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4829fda9279dSmrg && test "$tmp_diet" = no 4830fda9279dSmrg then 4831fda9279dSmrg tmp_addflag=' $pic_flag' 4832fda9279dSmrg tmp_sharedflag='-shared' 4833fda9279dSmrg case $cc_basename,$host_cpu in 4834fda9279dSmrg pgcc*) # Portland Group C compiler 4835fda9279dSmrg _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' 4836fda9279dSmrg tmp_addflag=' $pic_flag' 4837fda9279dSmrg ;; 4838fda9279dSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 4839fda9279dSmrg # Portland Group f77 and f90 compilers 4840fda9279dSmrg _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' 4841fda9279dSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 4842fda9279dSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4843fda9279dSmrg tmp_addflag=' -i_dynamic' ;; 4844fda9279dSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4845fda9279dSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4846fda9279dSmrg ifc* | ifort*) # Intel Fortran compiler 4847fda9279dSmrg tmp_addflag=' -nofor_main' ;; 4848fda9279dSmrg lf95*) # Lahey Fortran 8.1 4849fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4850fda9279dSmrg tmp_sharedflag='--shared' ;; 4851fda9279dSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4852fda9279dSmrg tmp_sharedflag='-qmkshrobj' 4853fda9279dSmrg tmp_addflag= ;; 4854fda9279dSmrg nvcc*) # Cuda Compiler Driver 2.2 4855fda9279dSmrg _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' 4856fda9279dSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4857fda9279dSmrg ;; 4858fda9279dSmrg esac 4859fda9279dSmrg case `$CC -V 2>&1 | sed 5q` in 4860fda9279dSmrg *Sun\ C*) # Sun C 5.9 4861fda9279dSmrg _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' 4862fda9279dSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4863fda9279dSmrg tmp_sharedflag='-G' ;; 4864fda9279dSmrg *Sun\ F*) # Sun Fortran 8.3 4865fda9279dSmrg tmp_sharedflag='-G' ;; 4866fda9279dSmrg esac 4867fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4868fda9279dSmrg 4869fda9279dSmrg if test "x$supports_anon_versioning" = xyes; then 4870fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4871fda9279dSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4872fda9279dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4873fda9279dSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4874fda9279dSmrg fi 4875fda9279dSmrg 4876fda9279dSmrg case $cc_basename in 4877fda9279dSmrg xlf* | bgf* | bgxlf* | mpixlf*) 4878fda9279dSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4879fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4880fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4881fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4882fda9279dSmrg if test "x$supports_anon_versioning" = xyes; then 4883fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4884fda9279dSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4885fda9279dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4886fda9279dSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4887fda9279dSmrg fi 4888fda9279dSmrg ;; 4889fda9279dSmrg esac 4890fda9279dSmrg else 4891fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4892fda9279dSmrg fi 4893fda9279dSmrg ;; 4894fda9279dSmrg 4895fda9279dSmrg netbsd* | netbsdelf*-gnu) 4896fda9279dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4897fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4898fda9279dSmrg wlarc= 4899fda9279dSmrg else 4900fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4901fda9279dSmrg _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' 4902fda9279dSmrg fi 4903fda9279dSmrg ;; 4904fda9279dSmrg 4905fda9279dSmrg solaris*) 4906fda9279dSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4907fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4908fda9279dSmrg cat <<_LT_EOF 1>&2 4909fda9279dSmrg 4910fda9279dSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4911fda9279dSmrg*** create shared libraries on Solaris systems. Therefore, libtool 4912fda9279dSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4913fda9279dSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 4914fda9279dSmrg*** your PATH or compiler configuration so that the native linker is 4915fda9279dSmrg*** used, and then restart. 4916fda9279dSmrg 4917fda9279dSmrg_LT_EOF 4918fda9279dSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4919fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4920fda9279dSmrg _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' 4921fda9279dSmrg else 4922fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4923fda9279dSmrg fi 4924fda9279dSmrg ;; 4925fda9279dSmrg 4926fda9279dSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4927fda9279dSmrg case `$LD -v 2>&1` in 4928fda9279dSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4929fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4930fda9279dSmrg cat <<_LT_EOF 1>&2 4931fda9279dSmrg 4932fda9279dSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4933fda9279dSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4934fda9279dSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4935fda9279dSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4936fda9279dSmrg*** your PATH or compiler configuration so that the native linker is 4937fda9279dSmrg*** used, and then restart. 4938fda9279dSmrg 4939fda9279dSmrg_LT_EOF 4940fda9279dSmrg ;; 4941fda9279dSmrg *) 4942fda9279dSmrg # For security reasons, it is highly recommended that you always 4943fda9279dSmrg # use absolute paths for naming shared libraries, and exclude the 4944fda9279dSmrg # DT_RUNPATH tag from executables and libraries. But doing so 4945fda9279dSmrg # requires that you compile everything twice, which is a pain. 4946fda9279dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4947fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4948fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4949fda9279dSmrg _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' 4950fda9279dSmrg else 4951fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4952fda9279dSmrg fi 4953fda9279dSmrg ;; 4954fda9279dSmrg esac 4955fda9279dSmrg ;; 4956fda9279dSmrg 4957fda9279dSmrg sunos4*) 4958fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4959fda9279dSmrg wlarc= 4960fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4961fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4962fda9279dSmrg ;; 4963fda9279dSmrg 4964fda9279dSmrg *) 4965fda9279dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4966fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4967fda9279dSmrg _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' 4968fda9279dSmrg else 4969fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4970fda9279dSmrg fi 4971fda9279dSmrg ;; 4972fda9279dSmrg esac 4973fda9279dSmrg 4974fda9279dSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4975fda9279dSmrg runpath_var= 4976fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4977fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4978fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4979fda9279dSmrg fi 4980fda9279dSmrg else 4981fda9279dSmrg # PORTME fill in a description of your system's linker (not GNU ld) 4982fda9279dSmrg case $host_os in 4983fda9279dSmrg aix3*) 4984fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4985fda9279dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 4986fda9279dSmrg _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' 4987fda9279dSmrg # Note: this linker hardcodes the directories in LIBPATH if there 4988fda9279dSmrg # are no directories specified by -L. 4989fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4990fda9279dSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4991fda9279dSmrg # Neither direct hardcoding nor static linking is supported with a 4992fda9279dSmrg # broken collect2. 4993fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4994fda9279dSmrg fi 4995fda9279dSmrg ;; 4996fda9279dSmrg 4997fda9279dSmrg aix[[4-9]]*) 4998fda9279dSmrg if test "$host_cpu" = ia64; then 4999fda9279dSmrg # On IA64, the linker does run time linking by default, so we don't 5000fda9279dSmrg # have to do anything special. 5001fda9279dSmrg aix_use_runtimelinking=no 5002fda9279dSmrg exp_sym_flag='-Bexport' 5003fda9279dSmrg no_entry_flag="" 5004fda9279dSmrg else 5005fda9279dSmrg # If we're using GNU nm, then we don't want the "-C" option. 5006fda9279dSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5007fda9279dSmrg # Also, AIX nm treats weak defined symbols like other global 5008fda9279dSmrg # defined symbols, whereas GNU nm marks them as "W". 5009fda9279dSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5010fda9279dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 5011fda9279dSmrg else 5012fda9279dSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 5013fda9279dSmrg fi 5014fda9279dSmrg aix_use_runtimelinking=no 5015fda9279dSmrg 5016fda9279dSmrg # Test if we are trying to use run time linking or normal 5017fda9279dSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5018fda9279dSmrg # need to do runtime linking. 5019fda9279dSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5020fda9279dSmrg for ld_flag in $LDFLAGS; do 5021fda9279dSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5022fda9279dSmrg aix_use_runtimelinking=yes 5023fda9279dSmrg break 5024fda9279dSmrg fi 5025fda9279dSmrg done 5026fda9279dSmrg ;; 5027fda9279dSmrg esac 5028fda9279dSmrg 5029fda9279dSmrg exp_sym_flag='-bexport' 5030fda9279dSmrg no_entry_flag='-bnoentry' 5031fda9279dSmrg fi 5032fda9279dSmrg 5033fda9279dSmrg # When large executables or shared objects are built, AIX ld can 5034fda9279dSmrg # have problems creating the table of contents. If linking a library 5035fda9279dSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5036fda9279dSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5037fda9279dSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5038fda9279dSmrg 5039fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='' 5040fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5041fda9279dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5042fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5043fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5044fda9279dSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5045fda9279dSmrg 5046fda9279dSmrg if test "$GCC" = yes; then 5047fda9279dSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5048fda9279dSmrg # We only want to do this on AIX 4.2 and lower, the check 5049fda9279dSmrg # below for broken collect2 doesn't work under 4.3+ 5050fda9279dSmrg collect2name=`${CC} -print-prog-name=collect2` 5051fda9279dSmrg if test -f "$collect2name" && 5052fda9279dSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5053fda9279dSmrg then 5054fda9279dSmrg # We have reworked collect2 5055fda9279dSmrg : 5056fda9279dSmrg else 5057fda9279dSmrg # We have old collect2 5058fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5059fda9279dSmrg # It fails to find uninstalled libraries when the uninstalled 5060fda9279dSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5061fda9279dSmrg # to unsupported forces relinking 5062fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5063fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5064fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5065fda9279dSmrg fi 5066fda9279dSmrg ;; 5067fda9279dSmrg esac 5068fda9279dSmrg shared_flag='-shared' 5069fda9279dSmrg if test "$aix_use_runtimelinking" = yes; then 5070fda9279dSmrg shared_flag="$shared_flag "'${wl}-G' 5071fda9279dSmrg fi 5072fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=no 5073fda9279dSmrg else 5074fda9279dSmrg # not using gcc 5075fda9279dSmrg if test "$host_cpu" = ia64; then 5076fda9279dSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5077fda9279dSmrg # chokes on -Wl,-G. The following line is correct: 5078fda9279dSmrg shared_flag='-G' 5079fda9279dSmrg else 5080fda9279dSmrg if test "$aix_use_runtimelinking" = yes; then 5081fda9279dSmrg shared_flag='${wl}-G' 5082fda9279dSmrg else 5083fda9279dSmrg shared_flag='${wl}-bM:SRE' 5084fda9279dSmrg fi 5085fda9279dSmrg fi 5086fda9279dSmrg fi 5087fda9279dSmrg 5088fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5089fda9279dSmrg # It seems that -bexpall does not export symbols beginning with 5090fda9279dSmrg # underscore (_), so it is better to generate a list of symbols to export. 5091fda9279dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5092fda9279dSmrg if test "$aix_use_runtimelinking" = yes; then 5093fda9279dSmrg # Warning - without using the other runtime loading flags (-brtl), 5094fda9279dSmrg # -berok will link without error, but may produce a broken library. 5095fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5096fda9279dSmrg # Determine the default libpath from the value encoded in an 5097fda9279dSmrg # empty executable. 5098fda9279dSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5099fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5100fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5101fda9279dSmrg else 5102fda9279dSmrg if test "$host_cpu" = ia64; then 5103fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5104fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5105fda9279dSmrg _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" 5106fda9279dSmrg else 5107fda9279dSmrg # Determine the default libpath from the value encoded in an 5108fda9279dSmrg # empty executable. 5109fda9279dSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5110fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5111fda9279dSmrg # Warning - without using the other run time loading flags, 5112fda9279dSmrg # -berok will link without error, but may produce a broken library. 5113fda9279dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5114fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5115fda9279dSmrg if test "$with_gnu_ld" = yes; then 5116fda9279dSmrg # We only use this code for GNU lds that support --whole-archive. 5117fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5118fda9279dSmrg else 5119fda9279dSmrg # Exported symbols can be pulled into shared objects from archives 5120fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5121fda9279dSmrg fi 5122fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5123fda9279dSmrg # This is similar to how AIX traditionally builds its shared libraries. 5124fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 5125fda9279dSmrg fi 5126fda9279dSmrg fi 5127fda9279dSmrg ;; 5128fda9279dSmrg 5129fda9279dSmrg amigaos*) 5130fda9279dSmrg case $host_cpu in 5131fda9279dSmrg powerpc) 5132fda9279dSmrg # see comment about AmigaOS4 .so support 5133fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5134fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5135fda9279dSmrg ;; 5136fda9279dSmrg m68k) 5137fda9279dSmrg _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)' 5138fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5139fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5140fda9279dSmrg ;; 5141fda9279dSmrg esac 5142fda9279dSmrg ;; 5143fda9279dSmrg 5144fda9279dSmrg bsdi[[45]]*) 5145fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5146fda9279dSmrg ;; 5147fda9279dSmrg 5148fda9279dSmrg cygwin* | mingw* | pw32* | cegcc*) 5149fda9279dSmrg # When not using gcc, we currently assume that we are using 5150fda9279dSmrg # Microsoft Visual C++. 5151fda9279dSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5152fda9279dSmrg # no search path for DLLs. 5153fda9279dSmrg case $cc_basename in 5154fda9279dSmrg cl*) 5155fda9279dSmrg # Native MSVC 5156fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5157fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5158fda9279dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5159fda9279dSmrg _LT_TAGVAR(file_list_spec, $1)='@' 5160fda9279dSmrg # Tell ltmain to make .lib files, not .a files. 5161fda9279dSmrg libext=lib 5162fda9279dSmrg # Tell ltmain to make .dll files, not .so files. 5163fda9279dSmrg shrext_cmds=".dll" 5164fda9279dSmrg # FIXME: Setting linknames here is a bad hack. 5165fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5166fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5167fda9279dSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5168fda9279dSmrg else 5169fda9279dSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5170fda9279dSmrg fi~ 5171fda9279dSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5172fda9279dSmrg linknames=' 5173fda9279dSmrg # The linker will not automatically build a static lib if we build a DLL. 5174fda9279dSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5175fda9279dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5176fda9279dSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5177fda9279dSmrg _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' 5178fda9279dSmrg # Don't use ranlib 5179fda9279dSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5180fda9279dSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5181fda9279dSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5182fda9279dSmrg case $lt_outputfile in 5183fda9279dSmrg *.exe|*.EXE) ;; 5184fda9279dSmrg *) 5185fda9279dSmrg lt_outputfile="$lt_outputfile.exe" 5186fda9279dSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5187fda9279dSmrg ;; 5188fda9279dSmrg esac~ 5189fda9279dSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5190fda9279dSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5191fda9279dSmrg $RM "$lt_outputfile.manifest"; 5192fda9279dSmrg fi' 5193fda9279dSmrg ;; 5194fda9279dSmrg *) 5195fda9279dSmrg # Assume MSVC wrapper 5196fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5197fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5198fda9279dSmrg # Tell ltmain to make .lib files, not .a files. 5199fda9279dSmrg libext=lib 5200fda9279dSmrg # Tell ltmain to make .dll files, not .so files. 5201fda9279dSmrg shrext_cmds=".dll" 5202fda9279dSmrg # FIXME: Setting linknames here is a bad hack. 5203fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5204fda9279dSmrg # The linker will automatically build a .lib file if we build a DLL. 5205fda9279dSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5206fda9279dSmrg # FIXME: Should let the user specify the lib program. 5207fda9279dSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5208fda9279dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5209fda9279dSmrg ;; 5210fda9279dSmrg esac 5211fda9279dSmrg ;; 5212fda9279dSmrg 5213fda9279dSmrg darwin* | rhapsody*) 5214fda9279dSmrg _LT_DARWIN_LINKER_FEATURES($1) 5215fda9279dSmrg ;; 5216fda9279dSmrg 5217fda9279dSmrg dgux*) 5218fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5219fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5220fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5221fda9279dSmrg ;; 5222fda9279dSmrg 5223fda9279dSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5224fda9279dSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 5225fda9279dSmrg # does not break anything, and helps significantly (at the cost of a little 5226fda9279dSmrg # extra space). 5227fda9279dSmrg freebsd2.2*) 5228fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5229fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5230fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5231fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5232fda9279dSmrg ;; 5233fda9279dSmrg 5234fda9279dSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5235fda9279dSmrg freebsd2.*) 5236fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5237fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5238fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5239fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5240fda9279dSmrg ;; 5241fda9279dSmrg 5242fda9279dSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5243fda9279dSmrg freebsd* | dragonfly*) 5244fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5245fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5246fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5247fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5248fda9279dSmrg ;; 5249fda9279dSmrg 5250fda9279dSmrg hpux9*) 5251fda9279dSmrg if test "$GCC" = yes; then 5252fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5253fda9279dSmrg else 5254fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5255fda9279dSmrg fi 5256fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5257fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5258fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5259fda9279dSmrg 5260fda9279dSmrg # hardcode_minus_L: Not really in the search PATH, 5261fda9279dSmrg # but as the default location of the library. 5262fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5263fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5264fda9279dSmrg ;; 5265fda9279dSmrg 5266fda9279dSmrg hpux10*) 5267fda9279dSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5268fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5269fda9279dSmrg else 5270fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5271fda9279dSmrg fi 5272fda9279dSmrg if test "$with_gnu_ld" = no; then 5273fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5274fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5275fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5276fda9279dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5277fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5278fda9279dSmrg # hardcode_minus_L: Not really in the search PATH, 5279fda9279dSmrg # but as the default location of the library. 5280fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5281fda9279dSmrg fi 5282fda9279dSmrg ;; 5283fda9279dSmrg 5284fda9279dSmrg hpux11*) 5285fda9279dSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5286fda9279dSmrg case $host_cpu in 5287fda9279dSmrg hppa*64*) 5288fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5289fda9279dSmrg ;; 5290fda9279dSmrg ia64*) 5291fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5292fda9279dSmrg ;; 5293fda9279dSmrg *) 5294fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5295fda9279dSmrg ;; 5296fda9279dSmrg esac 5297fda9279dSmrg else 5298fda9279dSmrg case $host_cpu in 5299fda9279dSmrg hppa*64*) 5300fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5301fda9279dSmrg ;; 5302fda9279dSmrg ia64*) 5303fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5304fda9279dSmrg ;; 5305fda9279dSmrg *) 5306fda9279dSmrg m4_if($1, [], [ 5307fda9279dSmrg # Older versions of the 11.00 compiler do not understand -b yet 5308fda9279dSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5309fda9279dSmrg _LT_LINKER_OPTION([if $CC understands -b], 5310fda9279dSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5311fda9279dSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5312fda9279dSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5313fda9279dSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5314fda9279dSmrg ;; 5315fda9279dSmrg esac 5316fda9279dSmrg fi 5317fda9279dSmrg if test "$with_gnu_ld" = no; then 5318fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5319fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5320fda9279dSmrg 5321fda9279dSmrg case $host_cpu in 5322fda9279dSmrg hppa*64*|ia64*) 5323fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5324fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5325fda9279dSmrg ;; 5326fda9279dSmrg *) 5327fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5328fda9279dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5329fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5330fda9279dSmrg 5331fda9279dSmrg # hardcode_minus_L: Not really in the search PATH, 5332fda9279dSmrg # but as the default location of the library. 5333fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5334fda9279dSmrg ;; 5335fda9279dSmrg esac 5336fda9279dSmrg fi 5337fda9279dSmrg ;; 5338fda9279dSmrg 5339fda9279dSmrg irix5* | irix6* | nonstopux*) 5340fda9279dSmrg if test "$GCC" = yes; then 5341fda9279dSmrg _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' 5342fda9279dSmrg # Try to use the -exported_symbol ld option, if it does not 5343fda9279dSmrg # work, assume that -exports_file does not work either and 5344fda9279dSmrg # implicitly export all symbols. 5345fda9279dSmrg # This should be the same for all languages, so no per-tag cache variable. 5346fda9279dSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5347fda9279dSmrg [lt_cv_irix_exported_symbol], 5348fda9279dSmrg [save_LDFLAGS="$LDFLAGS" 5349fda9279dSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5350fda9279dSmrg AC_LINK_IFELSE( 5351fda9279dSmrg [AC_LANG_SOURCE( 5352fda9279dSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5353fda9279dSmrg [C++], [[int foo (void) { return 0; }]], 5354fda9279dSmrg [Fortran 77], [[ 5355fda9279dSmrg subroutine foo 5356fda9279dSmrg end]], 5357fda9279dSmrg [Fortran], [[ 5358fda9279dSmrg subroutine foo 5359fda9279dSmrg end]])])], 5360fda9279dSmrg [lt_cv_irix_exported_symbol=yes], 5361fda9279dSmrg [lt_cv_irix_exported_symbol=no]) 5362fda9279dSmrg LDFLAGS="$save_LDFLAGS"]) 5363fda9279dSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 5364fda9279dSmrg _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' 5365fda9279dSmrg fi 5366fda9279dSmrg else 5367fda9279dSmrg _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' 5368fda9279dSmrg _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' 5369fda9279dSmrg fi 5370fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5371fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5372fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5373fda9279dSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 5374fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5375fda9279dSmrg ;; 5376fda9279dSmrg 5377fda9279dSmrg netbsd* | netbsdelf*-gnu) 5378fda9279dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5379fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5380fda9279dSmrg else 5381fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5382fda9279dSmrg fi 5383fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5384fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5385fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5386fda9279dSmrg ;; 5387fda9279dSmrg 5388fda9279dSmrg newsos6) 5389fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5390fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5391fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5392fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5393fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5394fda9279dSmrg ;; 5395fda9279dSmrg 5396fda9279dSmrg *nto* | *qnx*) 5397fda9279dSmrg ;; 5398fda9279dSmrg 5399fda9279dSmrg openbsd*) 5400fda9279dSmrg if test -f /usr/libexec/ld.so; then 5401fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5402fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5403fda9279dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5404fda9279dSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5405fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5406fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5407fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5408fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5409fda9279dSmrg else 5410fda9279dSmrg case $host_os in 5411fda9279dSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5412fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5413fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5414fda9279dSmrg ;; 5415fda9279dSmrg *) 5416fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5417fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5418fda9279dSmrg ;; 5419fda9279dSmrg esac 5420fda9279dSmrg fi 5421fda9279dSmrg else 5422fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5423fda9279dSmrg fi 5424fda9279dSmrg ;; 5425fda9279dSmrg 5426fda9279dSmrg os2*) 5427fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5428fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5429fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5430fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 5431fda9279dSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5432fda9279dSmrg ;; 5433fda9279dSmrg 5434fda9279dSmrg osf3*) 5435fda9279dSmrg if test "$GCC" = yes; then 5436fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5437fda9279dSmrg _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' 5438fda9279dSmrg else 5439fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5440fda9279dSmrg _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' 5441fda9279dSmrg fi 5442fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5443fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5444fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5445fda9279dSmrg ;; 5446fda9279dSmrg 5447fda9279dSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5448fda9279dSmrg if test "$GCC" = yes; then 5449fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5450fda9279dSmrg _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' 5451fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5452fda9279dSmrg else 5453fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5454fda9279dSmrg _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' 5455fda9279dSmrg _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~ 5456fda9279dSmrg $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' 5457fda9279dSmrg 5458fda9279dSmrg # Both c and cxx compiler support -rpath directly 5459fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5460fda9279dSmrg fi 5461fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5462fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5463fda9279dSmrg ;; 5464fda9279dSmrg 5465fda9279dSmrg solaris*) 5466fda9279dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5467fda9279dSmrg if test "$GCC" = yes; then 5468fda9279dSmrg wlarc='${wl}' 5469fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5470fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5471fda9279dSmrg $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' 5472fda9279dSmrg else 5473fda9279dSmrg case `$CC -V 2>&1` in 5474fda9279dSmrg *"Compilers 5.0"*) 5475fda9279dSmrg wlarc='' 5476fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5477fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5478fda9279dSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5479fda9279dSmrg ;; 5480fda9279dSmrg *) 5481fda9279dSmrg wlarc='${wl}' 5482fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5483fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5484fda9279dSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5485fda9279dSmrg ;; 5486fda9279dSmrg esac 5487fda9279dSmrg fi 5488fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5489fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5490fda9279dSmrg case $host_os in 5491fda9279dSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5492fda9279dSmrg *) 5493fda9279dSmrg # The compiler driver will combine and reorder linker options, 5494fda9279dSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 5495fda9279dSmrg # but is careful enough not to reorder. 5496fda9279dSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5497fda9279dSmrg if test "$GCC" = yes; then 5498fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5499fda9279dSmrg else 5500fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5501fda9279dSmrg fi 5502fda9279dSmrg ;; 5503fda9279dSmrg esac 5504fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5505fda9279dSmrg ;; 5506fda9279dSmrg 5507fda9279dSmrg sunos4*) 5508fda9279dSmrg if test "x$host_vendor" = xsequent; then 5509fda9279dSmrg # Use $CC to link under sequent, because it throws in some extra .o 5510fda9279dSmrg # files that make .init and .fini sections work. 5511fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5512fda9279dSmrg else 5513fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5514fda9279dSmrg fi 5515fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5516fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5517fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5518fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5519fda9279dSmrg ;; 5520fda9279dSmrg 5521fda9279dSmrg sysv4) 5522fda9279dSmrg case $host_vendor in 5523fda9279dSmrg sni) 5524fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5525fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5526fda9279dSmrg ;; 5527fda9279dSmrg siemens) 5528fda9279dSmrg ## LD is ld it makes a PLAMLIB 5529fda9279dSmrg ## CC just makes a GrossModule. 5530fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5531fda9279dSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5532fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5533fda9279dSmrg ;; 5534fda9279dSmrg motorola) 5535fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5536fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5537fda9279dSmrg ;; 5538fda9279dSmrg esac 5539fda9279dSmrg runpath_var='LD_RUN_PATH' 5540fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5541fda9279dSmrg ;; 5542fda9279dSmrg 5543fda9279dSmrg sysv4.3*) 5544fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5545fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5546fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5547fda9279dSmrg ;; 5548fda9279dSmrg 5549fda9279dSmrg sysv4*MP*) 5550fda9279dSmrg if test -d /usr/nec; then 5551fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5552fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5553fda9279dSmrg runpath_var=LD_RUN_PATH 5554fda9279dSmrg hardcode_runpath_var=yes 5555fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5556fda9279dSmrg fi 5557fda9279dSmrg ;; 5558fda9279dSmrg 5559fda9279dSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5560fda9279dSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5561fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5562fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5563fda9279dSmrg runpath_var='LD_RUN_PATH' 5564fda9279dSmrg 5565fda9279dSmrg if test "$GCC" = yes; then 5566fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5567fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5568fda9279dSmrg else 5569fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5570fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5571fda9279dSmrg fi 5572fda9279dSmrg ;; 5573fda9279dSmrg 5574fda9279dSmrg sysv5* | sco3.2v5* | sco5v6*) 5575fda9279dSmrg # Note: We can NOT use -z defs as we might desire, because we do not 5576fda9279dSmrg # link with -lc, and that would cause any symbols used from libc to 5577fda9279dSmrg # always be unresolved, which means just about no library would 5578fda9279dSmrg # ever link correctly. If we're not using GNU ld we use -z text 5579fda9279dSmrg # though, which does catch some bad symbols but isn't as heavy-handed 5580fda9279dSmrg # as -z defs. 5581fda9279dSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5582fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5583fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5584fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5585fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5586fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5587fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5588fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5589fda9279dSmrg runpath_var='LD_RUN_PATH' 5590fda9279dSmrg 5591fda9279dSmrg if test "$GCC" = yes; then 5592fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5593fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5594fda9279dSmrg else 5595fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5596fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5597fda9279dSmrg fi 5598fda9279dSmrg ;; 5599fda9279dSmrg 5600fda9279dSmrg uts4*) 5601fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5602fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5603fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5604fda9279dSmrg ;; 5605fda9279dSmrg 5606fda9279dSmrg *) 5607fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5608fda9279dSmrg ;; 5609fda9279dSmrg esac 5610fda9279dSmrg 5611fda9279dSmrg if test x$host_vendor = xsni; then 5612fda9279dSmrg case $host in 5613fda9279dSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5614fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5615fda9279dSmrg ;; 5616fda9279dSmrg esac 5617fda9279dSmrg fi 5618fda9279dSmrg fi 5619fda9279dSmrg]) 5620fda9279dSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5621fda9279dSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5622fda9279dSmrg 5623fda9279dSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5624fda9279dSmrg 5625fda9279dSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5626fda9279dSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5627fda9279dSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 5628fda9279dSmrg [The commands to extract the exported symbol list from a shared archive]) 5629fda9279dSmrg 5630fda9279dSmrg# 5631fda9279dSmrg# Do we need to explicitly link libc? 5632fda9279dSmrg# 5633fda9279dSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5634fda9279dSmrgx|xyes) 5635fda9279dSmrg # Assume -lc should be added 5636fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5637fda9279dSmrg 5638fda9279dSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5639fda9279dSmrg case $_LT_TAGVAR(archive_cmds, $1) in 5640fda9279dSmrg *'~'*) 5641fda9279dSmrg # FIXME: we may have to deal with multi-command sequences. 5642fda9279dSmrg ;; 5643fda9279dSmrg '$CC '*) 5644fda9279dSmrg # Test whether the compiler implicitly links with -lc since on some 5645fda9279dSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5646fda9279dSmrg # to ld, don't add -lc before -lgcc. 5647fda9279dSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5648fda9279dSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5649fda9279dSmrg [$RM conftest* 5650fda9279dSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5651fda9279dSmrg 5652fda9279dSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5653fda9279dSmrg soname=conftest 5654fda9279dSmrg lib=conftest 5655fda9279dSmrg libobjs=conftest.$ac_objext 5656fda9279dSmrg deplibs= 5657fda9279dSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5658fda9279dSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5659fda9279dSmrg compiler_flags=-v 5660fda9279dSmrg linker_flags=-v 5661fda9279dSmrg verstring= 5662fda9279dSmrg output_objdir=. 5663fda9279dSmrg libname=conftest 5664fda9279dSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5665fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 5666fda9279dSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5667fda9279dSmrg then 5668fda9279dSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5669fda9279dSmrg else 5670fda9279dSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5671fda9279dSmrg fi 5672fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5673fda9279dSmrg else 5674fda9279dSmrg cat conftest.err 1>&5 5675fda9279dSmrg fi 5676fda9279dSmrg $RM conftest* 5677fda9279dSmrg ]) 5678fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5679fda9279dSmrg ;; 5680fda9279dSmrg esac 5681fda9279dSmrg fi 5682fda9279dSmrg ;; 5683fda9279dSmrgesac 5684fda9279dSmrg 5685fda9279dSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5686fda9279dSmrg [Whether or not to add -lc for building shared libraries]) 5687fda9279dSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5688fda9279dSmrg [enable_shared_with_static_runtimes], [0], 5689fda9279dSmrg [Whether or not to disallow shared libs when runtime libs are static]) 5690fda9279dSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5691fda9279dSmrg [Compiler flag to allow reflexive dlopens]) 5692fda9279dSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5693fda9279dSmrg [Compiler flag to generate shared objects directly from archives]) 5694fda9279dSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 5695fda9279dSmrg [Whether the compiler copes with passing no objects directly]) 5696fda9279dSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5697fda9279dSmrg [Create an old-style archive from a shared archive]) 5698fda9279dSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5699fda9279dSmrg [Create a temporary old-style archive to link instead of a shared archive]) 5700fda9279dSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5701fda9279dSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5702fda9279dSmrg_LT_TAGDECL([], [module_cmds], [2], 5703fda9279dSmrg [Commands used to build a loadable module if different from building 5704fda9279dSmrg a shared archive.]) 5705fda9279dSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5706fda9279dSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 5707fda9279dSmrg [Whether we are building with GNU ld or not]) 5708fda9279dSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5709fda9279dSmrg [Flag that allows shared libraries with undefined symbols to be built]) 5710fda9279dSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 5711fda9279dSmrg [Flag that enforces no undefined symbols]) 5712fda9279dSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5713fda9279dSmrg [Flag to hardcode $libdir into a binary during linking. 5714fda9279dSmrg This must work even if $libdir does not exist]) 5715fda9279dSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5716fda9279dSmrg [Whether we need a single "-rpath" flag with a separated argument]) 5717fda9279dSmrg_LT_TAGDECL([], [hardcode_direct], [0], 5718fda9279dSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5719fda9279dSmrg DIR into the resulting binary]) 5720fda9279dSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5721fda9279dSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5722fda9279dSmrg DIR into the resulting binary and the resulting library dependency is 5723fda9279dSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5724fda9279dSmrg library is relocated]) 5725fda9279dSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5726fda9279dSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5727fda9279dSmrg into the resulting binary]) 5728fda9279dSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5729fda9279dSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5730fda9279dSmrg into the resulting binary]) 5731fda9279dSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 5732fda9279dSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 5733fda9279dSmrg into the library and all subsequent libraries and executables linked 5734fda9279dSmrg against it]) 5735fda9279dSmrg_LT_TAGDECL([], [inherit_rpath], [0], 5736fda9279dSmrg [Set to yes if linker adds runtime paths of dependent libraries 5737fda9279dSmrg to runtime path list]) 5738fda9279dSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 5739fda9279dSmrg [Whether libtool must link a program against all its dependency libraries]) 5740fda9279dSmrg_LT_TAGDECL([], [always_export_symbols], [0], 5741fda9279dSmrg [Set to "yes" if exported symbols are required]) 5742fda9279dSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5743fda9279dSmrg [The commands to list exported symbols]) 5744fda9279dSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 5745fda9279dSmrg [Symbols that should not be listed in the preloaded symbols]) 5746fda9279dSmrg_LT_TAGDECL([], [include_expsyms], [1], 5747fda9279dSmrg [Symbols that must always be exported]) 5748fda9279dSmrg_LT_TAGDECL([], [prelink_cmds], [2], 5749fda9279dSmrg [Commands necessary for linking programs (against libraries) with templates]) 5750fda9279dSmrg_LT_TAGDECL([], [postlink_cmds], [2], 5751fda9279dSmrg [Commands necessary for finishing linking programs]) 5752fda9279dSmrg_LT_TAGDECL([], [file_list_spec], [1], 5753fda9279dSmrg [Specify filename containing input files]) 5754fda9279dSmrgdnl FIXME: Not yet implemented 5755fda9279dSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5756fda9279dSmrgdnl [Compiler flag to generate thread safe objects]) 5757fda9279dSmrg])# _LT_LINKER_SHLIBS 5758fda9279dSmrg 5759fda9279dSmrg 5760fda9279dSmrg# _LT_LANG_C_CONFIG([TAG]) 5761fda9279dSmrg# ------------------------ 5762fda9279dSmrg# Ensure that the configuration variables for a C compiler are suitably 5763fda9279dSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5764fda9279dSmrg# the compiler configuration to `libtool'. 5765fda9279dSmrgm4_defun([_LT_LANG_C_CONFIG], 5766fda9279dSmrg[m4_require([_LT_DECL_EGREP])dnl 5767fda9279dSmrglt_save_CC="$CC" 5768fda9279dSmrgAC_LANG_PUSH(C) 5769fda9279dSmrg 5770fda9279dSmrg# Source file extension for C test sources. 5771fda9279dSmrgac_ext=c 5772fda9279dSmrg 5773fda9279dSmrg# Object file extension for compiled C test sources. 5774fda9279dSmrgobjext=o 5775fda9279dSmrg_LT_TAGVAR(objext, $1)=$objext 5776fda9279dSmrg 5777fda9279dSmrg# Code to be used in simple compile tests 5778fda9279dSmrglt_simple_compile_test_code="int some_variable = 0;" 5779fda9279dSmrg 5780fda9279dSmrg# Code to be used in simple link tests 5781fda9279dSmrglt_simple_link_test_code='int main(){return(0);}' 5782fda9279dSmrg 5783fda9279dSmrg_LT_TAG_COMPILER 5784fda9279dSmrg# Save the default compiler, since it gets overwritten when the other 5785fda9279dSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5786fda9279dSmrgcompiler_DEFAULT=$CC 5787fda9279dSmrg 5788fda9279dSmrg# save warnings/boilerplate of simple test code 5789fda9279dSmrg_LT_COMPILER_BOILERPLATE 5790fda9279dSmrg_LT_LINKER_BOILERPLATE 5791fda9279dSmrg 5792fda9279dSmrgif test -n "$compiler"; then 5793fda9279dSmrg _LT_COMPILER_NO_RTTI($1) 5794fda9279dSmrg _LT_COMPILER_PIC($1) 5795fda9279dSmrg _LT_COMPILER_C_O($1) 5796fda9279dSmrg _LT_COMPILER_FILE_LOCKS($1) 5797fda9279dSmrg _LT_LINKER_SHLIBS($1) 5798fda9279dSmrg _LT_SYS_DYNAMIC_LINKER($1) 5799fda9279dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 5800fda9279dSmrg LT_SYS_DLOPEN_SELF 5801fda9279dSmrg _LT_CMD_STRIPLIB 5802fda9279dSmrg 5803fda9279dSmrg # Report which library types will actually be built 5804fda9279dSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5805fda9279dSmrg AC_MSG_RESULT([$can_build_shared]) 5806fda9279dSmrg 5807fda9279dSmrg AC_MSG_CHECKING([whether to build shared libraries]) 5808fda9279dSmrg test "$can_build_shared" = "no" && enable_shared=no 5809fda9279dSmrg 5810fda9279dSmrg # On AIX, shared libraries and static libraries use the same namespace, and 5811fda9279dSmrg # are all built from PIC. 5812fda9279dSmrg case $host_os in 5813fda9279dSmrg aix3*) 5814fda9279dSmrg test "$enable_shared" = yes && enable_static=no 5815fda9279dSmrg if test -n "$RANLIB"; then 5816fda9279dSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5817fda9279dSmrg postinstall_cmds='$RANLIB $lib' 5818fda9279dSmrg fi 5819fda9279dSmrg ;; 5820fda9279dSmrg 5821fda9279dSmrg aix[[4-9]]*) 5822fda9279dSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5823fda9279dSmrg test "$enable_shared" = yes && enable_static=no 5824fda9279dSmrg fi 5825fda9279dSmrg ;; 5826fda9279dSmrg esac 5827fda9279dSmrg AC_MSG_RESULT([$enable_shared]) 5828fda9279dSmrg 5829fda9279dSmrg AC_MSG_CHECKING([whether to build static libraries]) 5830fda9279dSmrg # Make sure either enable_shared or enable_static is yes. 5831fda9279dSmrg test "$enable_shared" = yes || enable_static=yes 5832fda9279dSmrg AC_MSG_RESULT([$enable_static]) 5833fda9279dSmrg 5834fda9279dSmrg _LT_CONFIG($1) 5835fda9279dSmrgfi 5836fda9279dSmrgAC_LANG_POP 5837fda9279dSmrgCC="$lt_save_CC" 5838fda9279dSmrg])# _LT_LANG_C_CONFIG 5839fda9279dSmrg 5840fda9279dSmrg 5841fda9279dSmrg# _LT_LANG_CXX_CONFIG([TAG]) 5842fda9279dSmrg# -------------------------- 5843fda9279dSmrg# Ensure that the configuration variables for a C++ compiler are suitably 5844fda9279dSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5845fda9279dSmrg# the compiler configuration to `libtool'. 5846fda9279dSmrgm4_defun([_LT_LANG_CXX_CONFIG], 5847fda9279dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5848fda9279dSmrgm4_require([_LT_DECL_EGREP])dnl 5849fda9279dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5850fda9279dSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5851fda9279dSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5852fda9279dSmrg (test "X$CXX" != "Xg++"))) ; then 5853fda9279dSmrg AC_PROG_CXXCPP 5854fda9279dSmrgelse 5855fda9279dSmrg _lt_caught_CXX_error=yes 5856fda9279dSmrgfi 5857fda9279dSmrg 5858fda9279dSmrgAC_LANG_PUSH(C++) 5859fda9279dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5860fda9279dSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 5861fda9279dSmrg_LT_TAGVAR(always_export_symbols, $1)=no 5862fda9279dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5863fda9279dSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 5864fda9279dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5865fda9279dSmrg_LT_TAGVAR(hardcode_direct, $1)=no 5866fda9279dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5867fda9279dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5868fda9279dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5869fda9279dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5870fda9279dSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5871fda9279dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 5872fda9279dSmrg_LT_TAGVAR(inherit_rpath, $1)=no 5873fda9279dSmrg_LT_TAGVAR(module_cmds, $1)= 5874fda9279dSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 5875fda9279dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5876fda9279dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5877fda9279dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5878fda9279dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5879fda9279dSmrg_LT_TAGVAR(no_undefined_flag, $1)= 5880fda9279dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5881fda9279dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5882fda9279dSmrg 5883fda9279dSmrg# Source file extension for C++ test sources. 5884fda9279dSmrgac_ext=cpp 5885fda9279dSmrg 5886fda9279dSmrg# Object file extension for compiled C++ test sources. 5887fda9279dSmrgobjext=o 5888fda9279dSmrg_LT_TAGVAR(objext, $1)=$objext 5889fda9279dSmrg 5890fda9279dSmrg# No sense in running all these tests if we already determined that 5891fda9279dSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 5892fda9279dSmrg# are currently assumed to apply to all compilers on this platform, 5893fda9279dSmrg# and will be corrupted by setting them based on a non-working compiler. 5894fda9279dSmrgif test "$_lt_caught_CXX_error" != yes; then 5895fda9279dSmrg # Code to be used in simple compile tests 5896fda9279dSmrg lt_simple_compile_test_code="int some_variable = 0;" 5897fda9279dSmrg 5898fda9279dSmrg # Code to be used in simple link tests 5899fda9279dSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5900fda9279dSmrg 5901fda9279dSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5902fda9279dSmrg _LT_TAG_COMPILER 5903fda9279dSmrg 5904fda9279dSmrg # save warnings/boilerplate of simple test code 5905fda9279dSmrg _LT_COMPILER_BOILERPLATE 5906fda9279dSmrg _LT_LINKER_BOILERPLATE 5907fda9279dSmrg 5908fda9279dSmrg # Allow CC to be a program name with arguments. 5909fda9279dSmrg lt_save_CC=$CC 5910fda9279dSmrg lt_save_CFLAGS=$CFLAGS 5911fda9279dSmrg lt_save_LD=$LD 5912fda9279dSmrg lt_save_GCC=$GCC 5913fda9279dSmrg GCC=$GXX 5914fda9279dSmrg lt_save_with_gnu_ld=$with_gnu_ld 5915fda9279dSmrg lt_save_path_LD=$lt_cv_path_LD 5916fda9279dSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5917fda9279dSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5918fda9279dSmrg else 5919fda9279dSmrg $as_unset lt_cv_prog_gnu_ld 5920fda9279dSmrg fi 5921fda9279dSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 5922fda9279dSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 5923fda9279dSmrg else 5924fda9279dSmrg $as_unset lt_cv_path_LD 5925fda9279dSmrg fi 5926fda9279dSmrg test -z "${LDCXX+set}" || LD=$LDCXX 5927fda9279dSmrg CC=${CXX-"c++"} 5928fda9279dSmrg CFLAGS=$CXXFLAGS 5929fda9279dSmrg compiler=$CC 5930fda9279dSmrg _LT_TAGVAR(compiler, $1)=$CC 5931fda9279dSmrg _LT_CC_BASENAME([$compiler]) 5932fda9279dSmrg 5933fda9279dSmrg if test -n "$compiler"; then 5934fda9279dSmrg # We don't want -fno-exception when compiling C++ code, so set the 5935fda9279dSmrg # no_builtin_flag separately 5936fda9279dSmrg if test "$GXX" = yes; then 5937fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5938fda9279dSmrg else 5939fda9279dSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5940fda9279dSmrg fi 5941fda9279dSmrg 5942fda9279dSmrg if test "$GXX" = yes; then 5943fda9279dSmrg # Set up default GNU C++ configuration 5944fda9279dSmrg 5945fda9279dSmrg LT_PATH_LD 5946fda9279dSmrg 5947fda9279dSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5948fda9279dSmrg # archiving commands below assume that GNU ld is being used. 5949fda9279dSmrg if test "$with_gnu_ld" = yes; then 5950fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5951fda9279dSmrg _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' 5952fda9279dSmrg 5953fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5954fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5955fda9279dSmrg 5956fda9279dSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5957fda9279dSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5958fda9279dSmrg # investigate it a little bit more. (MM) 5959fda9279dSmrg wlarc='${wl}' 5960fda9279dSmrg 5961fda9279dSmrg # ancient GNU ld didn't support --whole-archive et. al. 5962fda9279dSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5963fda9279dSmrg $GREP 'no-whole-archive' > /dev/null; then 5964fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5965fda9279dSmrg else 5966fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5967fda9279dSmrg fi 5968fda9279dSmrg else 5969fda9279dSmrg with_gnu_ld=no 5970fda9279dSmrg wlarc= 5971fda9279dSmrg 5972fda9279dSmrg # A generic and very simple default shared library creation 5973fda9279dSmrg # command for GNU C++ for the case where it uses the native 5974fda9279dSmrg # linker, instead of GNU ld. If possible, this setting should 5975fda9279dSmrg # overridden to take advantage of the native linker features on 5976fda9279dSmrg # the platform it is being used on. 5977fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5978fda9279dSmrg fi 5979fda9279dSmrg 5980fda9279dSmrg # Commands to make compiler produce verbose output that lists 5981fda9279dSmrg # what "hidden" libraries, object files and flags are used when 5982fda9279dSmrg # linking a shared library. 5983fda9279dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5984fda9279dSmrg 5985fda9279dSmrg else 5986fda9279dSmrg GXX=no 5987fda9279dSmrg with_gnu_ld=no 5988fda9279dSmrg wlarc= 5989fda9279dSmrg fi 5990fda9279dSmrg 5991fda9279dSmrg # PORTME: fill in a description of your system's C++ link characteristics 5992fda9279dSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5993fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5994fda9279dSmrg case $host_os in 5995fda9279dSmrg aix3*) 5996fda9279dSmrg # FIXME: insert proper C++ library support 5997fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5998fda9279dSmrg ;; 5999fda9279dSmrg aix[[4-9]]*) 6000fda9279dSmrg if test "$host_cpu" = ia64; then 6001fda9279dSmrg # On IA64, the linker does run time linking by default, so we don't 6002fda9279dSmrg # have to do anything special. 6003fda9279dSmrg aix_use_runtimelinking=no 6004fda9279dSmrg exp_sym_flag='-Bexport' 6005fda9279dSmrg no_entry_flag="" 6006fda9279dSmrg else 6007fda9279dSmrg aix_use_runtimelinking=no 6008fda9279dSmrg 6009fda9279dSmrg # Test if we are trying to use run time linking or normal 6010fda9279dSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6011fda9279dSmrg # need to do runtime linking. 6012fda9279dSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6013fda9279dSmrg for ld_flag in $LDFLAGS; do 6014fda9279dSmrg case $ld_flag in 6015fda9279dSmrg *-brtl*) 6016fda9279dSmrg aix_use_runtimelinking=yes 6017fda9279dSmrg break 6018fda9279dSmrg ;; 6019fda9279dSmrg esac 6020fda9279dSmrg done 6021fda9279dSmrg ;; 6022fda9279dSmrg esac 6023fda9279dSmrg 6024fda9279dSmrg exp_sym_flag='-bexport' 6025fda9279dSmrg no_entry_flag='-bnoentry' 6026fda9279dSmrg fi 6027fda9279dSmrg 6028fda9279dSmrg # When large executables or shared objects are built, AIX ld can 6029fda9279dSmrg # have problems creating the table of contents. If linking a library 6030fda9279dSmrg # or program results in "error TOC overflow" add -mminimal-toc to 6031fda9279dSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6032fda9279dSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6033fda9279dSmrg 6034fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='' 6035fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6036fda9279dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6037fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6038fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6039fda9279dSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6040fda9279dSmrg 6041fda9279dSmrg if test "$GXX" = yes; then 6042fda9279dSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6043fda9279dSmrg # We only want to do this on AIX 4.2 and lower, the check 6044fda9279dSmrg # below for broken collect2 doesn't work under 4.3+ 6045fda9279dSmrg collect2name=`${CC} -print-prog-name=collect2` 6046fda9279dSmrg if test -f "$collect2name" && 6047fda9279dSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6048fda9279dSmrg then 6049fda9279dSmrg # We have reworked collect2 6050fda9279dSmrg : 6051fda9279dSmrg else 6052fda9279dSmrg # We have old collect2 6053fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6054fda9279dSmrg # It fails to find uninstalled libraries when the uninstalled 6055fda9279dSmrg # path is not listed in the libpath. Setting hardcode_minus_L 6056fda9279dSmrg # to unsupported forces relinking 6057fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6058fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6059fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6060fda9279dSmrg fi 6061fda9279dSmrg esac 6062fda9279dSmrg shared_flag='-shared' 6063fda9279dSmrg if test "$aix_use_runtimelinking" = yes; then 6064fda9279dSmrg shared_flag="$shared_flag "'${wl}-G' 6065fda9279dSmrg fi 6066fda9279dSmrg else 6067fda9279dSmrg # not using gcc 6068fda9279dSmrg if test "$host_cpu" = ia64; then 6069fda9279dSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6070fda9279dSmrg # chokes on -Wl,-G. The following line is correct: 6071fda9279dSmrg shared_flag='-G' 6072fda9279dSmrg else 6073fda9279dSmrg if test "$aix_use_runtimelinking" = yes; then 6074fda9279dSmrg shared_flag='${wl}-G' 6075fda9279dSmrg else 6076fda9279dSmrg shared_flag='${wl}-bM:SRE' 6077fda9279dSmrg fi 6078fda9279dSmrg fi 6079fda9279dSmrg fi 6080fda9279dSmrg 6081fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6082fda9279dSmrg # It seems that -bexpall does not export symbols beginning with 6083fda9279dSmrg # underscore (_), so it is better to generate a list of symbols to 6084fda9279dSmrg # export. 6085fda9279dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6086fda9279dSmrg if test "$aix_use_runtimelinking" = yes; then 6087fda9279dSmrg # Warning - without using the other runtime loading flags (-brtl), 6088fda9279dSmrg # -berok will link without error, but may produce a broken library. 6089fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6090fda9279dSmrg # Determine the default libpath from the value encoded in an empty 6091fda9279dSmrg # executable. 6092fda9279dSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6093fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6094fda9279dSmrg 6095fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 6096fda9279dSmrg else 6097fda9279dSmrg if test "$host_cpu" = ia64; then 6098fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6099fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6100fda9279dSmrg _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" 6101fda9279dSmrg else 6102fda9279dSmrg # Determine the default libpath from the value encoded in an 6103fda9279dSmrg # empty executable. 6104fda9279dSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6105fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6106fda9279dSmrg # Warning - without using the other run time loading flags, 6107fda9279dSmrg # -berok will link without error, but may produce a broken library. 6108fda9279dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6109fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6110fda9279dSmrg if test "$with_gnu_ld" = yes; then 6111fda9279dSmrg # We only use this code for GNU lds that support --whole-archive. 6112fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6113fda9279dSmrg else 6114fda9279dSmrg # Exported symbols can be pulled into shared objects from archives 6115fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6116fda9279dSmrg fi 6117fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6118fda9279dSmrg # This is similar to how AIX traditionally builds its shared 6119fda9279dSmrg # libraries. 6120fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 6121fda9279dSmrg fi 6122fda9279dSmrg fi 6123fda9279dSmrg ;; 6124fda9279dSmrg 6125fda9279dSmrg beos*) 6126fda9279dSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6127fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6128fda9279dSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6129fda9279dSmrg # support --undefined. This deserves some investigation. FIXME 6130fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6131fda9279dSmrg else 6132fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6133fda9279dSmrg fi 6134fda9279dSmrg ;; 6135fda9279dSmrg 6136fda9279dSmrg chorus*) 6137fda9279dSmrg case $cc_basename in 6138fda9279dSmrg *) 6139fda9279dSmrg # FIXME: insert proper C++ library support 6140fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6141fda9279dSmrg ;; 6142fda9279dSmrg esac 6143fda9279dSmrg ;; 6144fda9279dSmrg 6145fda9279dSmrg cygwin* | mingw* | pw32* | cegcc*) 6146fda9279dSmrg case $GXX,$cc_basename in 6147fda9279dSmrg ,cl* | no,cl*) 6148fda9279dSmrg # Native MSVC 6149fda9279dSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6150fda9279dSmrg # no search path for DLLs. 6151fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6152fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6153fda9279dSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6154fda9279dSmrg _LT_TAGVAR(file_list_spec, $1)='@' 6155fda9279dSmrg # Tell ltmain to make .lib files, not .a files. 6156fda9279dSmrg libext=lib 6157fda9279dSmrg # Tell ltmain to make .dll files, not .so files. 6158fda9279dSmrg shrext_cmds=".dll" 6159fda9279dSmrg # FIXME: Setting linknames here is a bad hack. 6160fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6161fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6162fda9279dSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6163fda9279dSmrg else 6164fda9279dSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6165fda9279dSmrg fi~ 6166fda9279dSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6167fda9279dSmrg linknames=' 6168fda9279dSmrg # The linker will not automatically build a static lib if we build a DLL. 6169fda9279dSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6170fda9279dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6171fda9279dSmrg # Don't use ranlib 6172fda9279dSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6173fda9279dSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6174fda9279dSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6175fda9279dSmrg case $lt_outputfile in 6176fda9279dSmrg *.exe|*.EXE) ;; 6177fda9279dSmrg *) 6178fda9279dSmrg lt_outputfile="$lt_outputfile.exe" 6179fda9279dSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6180fda9279dSmrg ;; 6181fda9279dSmrg esac~ 6182fda9279dSmrg func_to_tool_file "$lt_outputfile"~ 6183fda9279dSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6184fda9279dSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6185fda9279dSmrg $RM "$lt_outputfile.manifest"; 6186fda9279dSmrg fi' 6187fda9279dSmrg ;; 6188fda9279dSmrg *) 6189fda9279dSmrg # g++ 6190fda9279dSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6191fda9279dSmrg # as there is no search path for DLLs. 6192fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6193fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6194fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6195fda9279dSmrg _LT_TAGVAR(always_export_symbols, $1)=no 6196fda9279dSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6197fda9279dSmrg 6198fda9279dSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6199fda9279dSmrg _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' 6200fda9279dSmrg # If the export-symbols file already is a .def file (1st line 6201fda9279dSmrg # is EXPORTS), use it as is; otherwise, prepend... 6202fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6203fda9279dSmrg cp $export_symbols $output_objdir/$soname.def; 6204fda9279dSmrg else 6205fda9279dSmrg echo EXPORTS > $output_objdir/$soname.def; 6206fda9279dSmrg cat $export_symbols >> $output_objdir/$soname.def; 6207fda9279dSmrg fi~ 6208fda9279dSmrg $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' 6209fda9279dSmrg else 6210fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6211fda9279dSmrg fi 6212fda9279dSmrg ;; 6213fda9279dSmrg esac 6214fda9279dSmrg ;; 6215fda9279dSmrg darwin* | rhapsody*) 6216fda9279dSmrg _LT_DARWIN_LINKER_FEATURES($1) 6217fda9279dSmrg ;; 6218fda9279dSmrg 6219fda9279dSmrg dgux*) 6220fda9279dSmrg case $cc_basename in 6221fda9279dSmrg ec++*) 6222fda9279dSmrg # FIXME: insert proper C++ library support 6223fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6224fda9279dSmrg ;; 6225fda9279dSmrg ghcx*) 6226fda9279dSmrg # Green Hills C++ Compiler 6227fda9279dSmrg # FIXME: insert proper C++ library support 6228fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6229fda9279dSmrg ;; 6230fda9279dSmrg *) 6231fda9279dSmrg # FIXME: insert proper C++ library support 6232fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6233fda9279dSmrg ;; 6234fda9279dSmrg esac 6235fda9279dSmrg ;; 6236fda9279dSmrg 6237fda9279dSmrg freebsd2.*) 6238fda9279dSmrg # C++ shared libraries reported to be fairly broken before 6239fda9279dSmrg # switch to ELF 6240fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6241fda9279dSmrg ;; 6242fda9279dSmrg 6243fda9279dSmrg freebsd-elf*) 6244fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6245fda9279dSmrg ;; 6246fda9279dSmrg 6247fda9279dSmrg freebsd* | dragonfly*) 6248fda9279dSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6249fda9279dSmrg # conventions 6250fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6251fda9279dSmrg ;; 6252fda9279dSmrg 6253fda9279dSmrg haiku*) 6254fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6255fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6256fda9279dSmrg ;; 6257fda9279dSmrg 6258fda9279dSmrg hpux9*) 6259fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6260fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6261fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6262fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6263fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6264fda9279dSmrg # but as the default 6265fda9279dSmrg # location of the library. 6266fda9279dSmrg 6267fda9279dSmrg case $cc_basename in 6268fda9279dSmrg CC*) 6269fda9279dSmrg # FIXME: insert proper C++ library support 6270fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6271fda9279dSmrg ;; 6272fda9279dSmrg aCC*) 6273fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6274fda9279dSmrg # Commands to make compiler produce verbose output that lists 6275fda9279dSmrg # what "hidden" libraries, object files and flags are used when 6276fda9279dSmrg # linking a shared library. 6277fda9279dSmrg # 6278fda9279dSmrg # There doesn't appear to be a way to prevent this compiler from 6279fda9279dSmrg # explicitly linking system object files so we need to strip them 6280fda9279dSmrg # from the output so that they don't get included in the library 6281fda9279dSmrg # dependencies. 6282fda9279dSmrg 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"' 6283fda9279dSmrg ;; 6284fda9279dSmrg *) 6285fda9279dSmrg if test "$GXX" = yes; then 6286fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6287fda9279dSmrg else 6288fda9279dSmrg # FIXME: insert proper C++ library support 6289fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6290fda9279dSmrg fi 6291fda9279dSmrg ;; 6292fda9279dSmrg esac 6293fda9279dSmrg ;; 6294fda9279dSmrg 6295fda9279dSmrg hpux10*|hpux11*) 6296fda9279dSmrg if test $with_gnu_ld = no; then 6297fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6298fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6299fda9279dSmrg 6300fda9279dSmrg case $host_cpu in 6301fda9279dSmrg hppa*64*|ia64*) 6302fda9279dSmrg ;; 6303fda9279dSmrg *) 6304fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6305fda9279dSmrg ;; 6306fda9279dSmrg esac 6307fda9279dSmrg fi 6308fda9279dSmrg case $host_cpu in 6309fda9279dSmrg hppa*64*|ia64*) 6310fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6311fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6312fda9279dSmrg ;; 6313fda9279dSmrg *) 6314fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6315fda9279dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6316fda9279dSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6317fda9279dSmrg # but as the default 6318fda9279dSmrg # location of the library. 6319fda9279dSmrg ;; 6320fda9279dSmrg esac 6321fda9279dSmrg 6322fda9279dSmrg case $cc_basename in 6323fda9279dSmrg CC*) 6324fda9279dSmrg # FIXME: insert proper C++ library support 6325fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6326fda9279dSmrg ;; 6327fda9279dSmrg aCC*) 6328fda9279dSmrg case $host_cpu in 6329fda9279dSmrg hppa*64*) 6330fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6331fda9279dSmrg ;; 6332fda9279dSmrg ia64*) 6333fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6334fda9279dSmrg ;; 6335fda9279dSmrg *) 6336fda9279dSmrg _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' 6337fda9279dSmrg ;; 6338fda9279dSmrg esac 6339fda9279dSmrg # Commands to make compiler produce verbose output that lists 6340fda9279dSmrg # what "hidden" libraries, object files and flags are used when 6341fda9279dSmrg # linking a shared library. 6342fda9279dSmrg # 6343fda9279dSmrg # There doesn't appear to be a way to prevent this compiler from 6344fda9279dSmrg # explicitly linking system object files so we need to strip them 6345fda9279dSmrg # from the output so that they don't get included in the library 6346fda9279dSmrg # dependencies. 6347fda9279dSmrg 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"' 6348fda9279dSmrg ;; 6349fda9279dSmrg *) 6350fda9279dSmrg if test "$GXX" = yes; then 6351fda9279dSmrg if test $with_gnu_ld = no; then 6352fda9279dSmrg case $host_cpu in 6353fda9279dSmrg hppa*64*) 6354fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6355fda9279dSmrg ;; 6356fda9279dSmrg ia64*) 6357fda9279dSmrg _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' 6358fda9279dSmrg ;; 6359fda9279dSmrg *) 6360fda9279dSmrg _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' 6361fda9279dSmrg ;; 6362fda9279dSmrg esac 6363fda9279dSmrg fi 6364fda9279dSmrg else 6365fda9279dSmrg # FIXME: insert proper C++ library support 6366fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6367fda9279dSmrg fi 6368fda9279dSmrg ;; 6369fda9279dSmrg esac 6370fda9279dSmrg ;; 6371fda9279dSmrg 6372fda9279dSmrg interix[[3-9]]*) 6373fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6374fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6375fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6376fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6377fda9279dSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6378fda9279dSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6379fda9279dSmrg # default) and relocated if they conflict, which is a slow very memory 6380fda9279dSmrg # consuming and fragmenting process. To avoid this, we pick a random, 6381fda9279dSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6382fda9279dSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6383fda9279dSmrg _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' 6384fda9279dSmrg _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' 6385fda9279dSmrg ;; 6386fda9279dSmrg irix5* | irix6*) 6387fda9279dSmrg case $cc_basename in 6388fda9279dSmrg CC*) 6389fda9279dSmrg # SGI C++ 6390fda9279dSmrg _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' 6391fda9279dSmrg 6392fda9279dSmrg # Archives containing C++ object files must be created using 6393fda9279dSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6394fda9279dSmrg # necessary to make sure instantiated templates are included 6395fda9279dSmrg # in the archive. 6396fda9279dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6397fda9279dSmrg ;; 6398fda9279dSmrg *) 6399fda9279dSmrg if test "$GXX" = yes; then 6400fda9279dSmrg if test "$with_gnu_ld" = no; then 6401fda9279dSmrg _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' 6402fda9279dSmrg else 6403fda9279dSmrg _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' 6404fda9279dSmrg fi 6405fda9279dSmrg fi 6406fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6407fda9279dSmrg ;; 6408fda9279dSmrg esac 6409fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6410fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6411fda9279dSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 6412fda9279dSmrg ;; 6413fda9279dSmrg 6414fda9279dSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6415fda9279dSmrg case $cc_basename in 6416fda9279dSmrg KCC*) 6417fda9279dSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6418fda9279dSmrg 6419fda9279dSmrg # KCC will only create a shared library if the output file 6420fda9279dSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6421fda9279dSmrg # to its proper name (with version) after linking. 6422fda9279dSmrg _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' 6423fda9279dSmrg _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' 6424fda9279dSmrg # Commands to make compiler produce verbose output that lists 6425fda9279dSmrg # what "hidden" libraries, object files and flags are used when 6426fda9279dSmrg # linking a shared library. 6427fda9279dSmrg # 6428fda9279dSmrg # There doesn't appear to be a way to prevent this compiler from 6429fda9279dSmrg # explicitly linking system object files so we need to strip them 6430fda9279dSmrg # from the output so that they don't get included in the library 6431fda9279dSmrg # dependencies. 6432fda9279dSmrg 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"' 6433fda9279dSmrg 6434fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6435fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6436fda9279dSmrg 6437fda9279dSmrg # Archives containing C++ object files must be created using 6438fda9279dSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6439fda9279dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6440fda9279dSmrg ;; 6441fda9279dSmrg icpc* | ecpc* ) 6442fda9279dSmrg # Intel C++ 6443fda9279dSmrg with_gnu_ld=yes 6444fda9279dSmrg # version 8.0 and above of icpc choke on multiply defined symbols 6445fda9279dSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6446fda9279dSmrg # earlier do not add the objects themselves. 6447fda9279dSmrg case `$CC -V 2>&1` in 6448fda9279dSmrg *"Version 7."*) 6449fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6450fda9279dSmrg _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' 6451fda9279dSmrg ;; 6452fda9279dSmrg *) # Version 8.0 or newer 6453fda9279dSmrg tmp_idyn= 6454fda9279dSmrg case $host_cpu in 6455fda9279dSmrg ia64*) tmp_idyn=' -i_dynamic';; 6456fda9279dSmrg esac 6457fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6458fda9279dSmrg _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' 6459fda9279dSmrg ;; 6460fda9279dSmrg esac 6461fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6462fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6463fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6464fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6465fda9279dSmrg ;; 6466fda9279dSmrg pgCC* | pgcpp*) 6467fda9279dSmrg # Portland Group C++ compiler 6468fda9279dSmrg case `$CC -V` in 6469fda9279dSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6470fda9279dSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6471fda9279dSmrg rm -rf $tpldir~ 6472fda9279dSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6473fda9279dSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6474fda9279dSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6475fda9279dSmrg rm -rf $tpldir~ 6476fda9279dSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6477fda9279dSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6478fda9279dSmrg $RANLIB $oldlib' 6479fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6480fda9279dSmrg rm -rf $tpldir~ 6481fda9279dSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6482fda9279dSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6483fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6484fda9279dSmrg rm -rf $tpldir~ 6485fda9279dSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6486fda9279dSmrg $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' 6487fda9279dSmrg ;; 6488fda9279dSmrg *) # Version 6 and above use weak symbols 6489fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6490fda9279dSmrg _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' 6491fda9279dSmrg ;; 6492fda9279dSmrg esac 6493fda9279dSmrg 6494fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6495fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6496fda9279dSmrg _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' 6497fda9279dSmrg ;; 6498fda9279dSmrg cxx*) 6499fda9279dSmrg # Compaq C++ 6500fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6501fda9279dSmrg _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' 6502fda9279dSmrg 6503fda9279dSmrg runpath_var=LD_RUN_PATH 6504fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6505fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6506fda9279dSmrg 6507fda9279dSmrg # Commands to make compiler produce verbose output that lists 6508fda9279dSmrg # what "hidden" libraries, object files and flags are used when 6509fda9279dSmrg # linking a shared library. 6510fda9279dSmrg # 6511fda9279dSmrg # There doesn't appear to be a way to prevent this compiler from 6512fda9279dSmrg # explicitly linking system object files so we need to strip them 6513fda9279dSmrg # from the output so that they don't get included in the library 6514fda9279dSmrg # dependencies. 6515fda9279dSmrg 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' 6516fda9279dSmrg ;; 6517fda9279dSmrg xl* | mpixl* | bgxl*) 6518fda9279dSmrg # IBM XL 8.0 on PPC, with GNU ld 6519fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6520fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6521fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6522fda9279dSmrg if test "x$supports_anon_versioning" = xyes; then 6523fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6524fda9279dSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6525fda9279dSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6526fda9279dSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6527fda9279dSmrg fi 6528fda9279dSmrg ;; 6529fda9279dSmrg *) 6530fda9279dSmrg case `$CC -V 2>&1 | sed 5q` in 6531fda9279dSmrg *Sun\ C*) 6532fda9279dSmrg # Sun C++ 5.9 6533fda9279dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6534fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6535fda9279dSmrg _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' 6536fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6537fda9279dSmrg _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' 6538fda9279dSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6539fda9279dSmrg 6540fda9279dSmrg # Not sure whether something based on 6541fda9279dSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6542fda9279dSmrg # would be better. 6543fda9279dSmrg output_verbose_link_cmd='func_echo_all' 6544fda9279dSmrg 6545fda9279dSmrg # Archives containing C++ object files must be created using 6546fda9279dSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6547fda9279dSmrg # necessary to make sure instantiated templates are included 6548fda9279dSmrg # in the archive. 6549fda9279dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6550fda9279dSmrg ;; 6551fda9279dSmrg esac 6552fda9279dSmrg ;; 6553fda9279dSmrg esac 6554fda9279dSmrg ;; 6555fda9279dSmrg 6556fda9279dSmrg lynxos*) 6557fda9279dSmrg # FIXME: insert proper C++ library support 6558fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6559fda9279dSmrg ;; 6560fda9279dSmrg 6561fda9279dSmrg m88k*) 6562fda9279dSmrg # FIXME: insert proper C++ library support 6563fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6564fda9279dSmrg ;; 6565fda9279dSmrg 6566fda9279dSmrg mvs*) 6567fda9279dSmrg case $cc_basename in 6568fda9279dSmrg cxx*) 6569fda9279dSmrg # FIXME: insert proper C++ library support 6570fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6571fda9279dSmrg ;; 6572fda9279dSmrg *) 6573fda9279dSmrg # FIXME: insert proper C++ library support 6574fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6575fda9279dSmrg ;; 6576fda9279dSmrg esac 6577fda9279dSmrg ;; 6578fda9279dSmrg 6579fda9279dSmrg netbsd*) 6580fda9279dSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6581fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6582fda9279dSmrg wlarc= 6583fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6584fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6585fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6586fda9279dSmrg fi 6587fda9279dSmrg # Workaround some broken pre-1.5 toolchains 6588fda9279dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6589fda9279dSmrg ;; 6590fda9279dSmrg 6591fda9279dSmrg *nto* | *qnx*) 6592fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6593fda9279dSmrg ;; 6594fda9279dSmrg 6595fda9279dSmrg openbsd2*) 6596fda9279dSmrg # C++ shared libraries are fairly broken 6597fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6598fda9279dSmrg ;; 6599fda9279dSmrg 6600fda9279dSmrg openbsd*) 6601fda9279dSmrg if test -f /usr/libexec/ld.so; then 6602fda9279dSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6603fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6604fda9279dSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6605fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6606fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6607fda9279dSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6608fda9279dSmrg _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' 6609fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6610fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6611fda9279dSmrg fi 6612fda9279dSmrg output_verbose_link_cmd=func_echo_all 6613fda9279dSmrg else 6614fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6615fda9279dSmrg fi 6616fda9279dSmrg ;; 6617fda9279dSmrg 6618fda9279dSmrg osf3* | osf4* | osf5*) 6619fda9279dSmrg case $cc_basename in 6620fda9279dSmrg KCC*) 6621fda9279dSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6622fda9279dSmrg 6623fda9279dSmrg # KCC will only create a shared library if the output file 6624fda9279dSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6625fda9279dSmrg # to its proper name (with version) after linking. 6626fda9279dSmrg _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' 6627fda9279dSmrg 6628fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6629fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6630fda9279dSmrg 6631fda9279dSmrg # Archives containing C++ object files must be created using 6632fda9279dSmrg # the KAI C++ compiler. 6633fda9279dSmrg case $host in 6634fda9279dSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6635fda9279dSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6636fda9279dSmrg esac 6637fda9279dSmrg ;; 6638fda9279dSmrg RCC*) 6639fda9279dSmrg # Rational C++ 2.4.1 6640fda9279dSmrg # FIXME: insert proper C++ library support 6641fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6642fda9279dSmrg ;; 6643fda9279dSmrg cxx*) 6644fda9279dSmrg case $host in 6645fda9279dSmrg osf3*) 6646fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6647fda9279dSmrg _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' 6648fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6649fda9279dSmrg ;; 6650fda9279dSmrg *) 6651fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6652fda9279dSmrg _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' 6653fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6654fda9279dSmrg echo "-hidden">> $lib.exp~ 6655fda9279dSmrg $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~ 6656fda9279dSmrg $RM $lib.exp' 6657fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6658fda9279dSmrg ;; 6659fda9279dSmrg esac 6660fda9279dSmrg 6661fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6662fda9279dSmrg 6663fda9279dSmrg # Commands to make compiler produce verbose output that lists 6664fda9279dSmrg # what "hidden" libraries, object files and flags are used when 6665fda9279dSmrg # linking a shared library. 6666fda9279dSmrg # 6667fda9279dSmrg # There doesn't appear to be a way to prevent this compiler from 6668fda9279dSmrg # explicitly linking system object files so we need to strip them 6669fda9279dSmrg # from the output so that they don't get included in the library 6670fda9279dSmrg # dependencies. 6671fda9279dSmrg 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"' 6672fda9279dSmrg ;; 6673fda9279dSmrg *) 6674fda9279dSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6675fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6676fda9279dSmrg case $host in 6677fda9279dSmrg osf3*) 6678fda9279dSmrg _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' 6679fda9279dSmrg ;; 6680fda9279dSmrg *) 6681fda9279dSmrg _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' 6682fda9279dSmrg ;; 6683fda9279dSmrg esac 6684fda9279dSmrg 6685fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6686fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6687fda9279dSmrg 6688fda9279dSmrg # Commands to make compiler produce verbose output that lists 6689fda9279dSmrg # what "hidden" libraries, object files and flags are used when 6690fda9279dSmrg # linking a shared library. 6691fda9279dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6692fda9279dSmrg 6693fda9279dSmrg else 6694fda9279dSmrg # FIXME: insert proper C++ library support 6695fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6696fda9279dSmrg fi 6697fda9279dSmrg ;; 6698fda9279dSmrg esac 6699fda9279dSmrg ;; 6700fda9279dSmrg 6701fda9279dSmrg psos*) 6702fda9279dSmrg # FIXME: insert proper C++ library support 6703fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6704fda9279dSmrg ;; 6705fda9279dSmrg 6706fda9279dSmrg sunos4*) 6707fda9279dSmrg case $cc_basename in 6708fda9279dSmrg CC*) 6709fda9279dSmrg # Sun C++ 4.x 6710fda9279dSmrg # FIXME: insert proper C++ library support 6711fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6712fda9279dSmrg ;; 6713fda9279dSmrg lcc*) 6714fda9279dSmrg # Lucid 6715fda9279dSmrg # FIXME: insert proper C++ library support 6716fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6717fda9279dSmrg ;; 6718fda9279dSmrg *) 6719fda9279dSmrg # FIXME: insert proper C++ library support 6720fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6721fda9279dSmrg ;; 6722fda9279dSmrg esac 6723fda9279dSmrg ;; 6724fda9279dSmrg 6725fda9279dSmrg solaris*) 6726fda9279dSmrg case $cc_basename in 6727fda9279dSmrg CC* | sunCC*) 6728fda9279dSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6729fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6730fda9279dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6731fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6732fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6733fda9279dSmrg $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' 6734fda9279dSmrg 6735fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6736fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6737fda9279dSmrg case $host_os in 6738fda9279dSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6739fda9279dSmrg *) 6740fda9279dSmrg # The compiler driver will combine and reorder linker options, 6741fda9279dSmrg # but understands `-z linker_flag'. 6742fda9279dSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6743fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6744fda9279dSmrg ;; 6745fda9279dSmrg esac 6746fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6747fda9279dSmrg 6748fda9279dSmrg output_verbose_link_cmd='func_echo_all' 6749fda9279dSmrg 6750fda9279dSmrg # Archives containing C++ object files must be created using 6751fda9279dSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6752fda9279dSmrg # necessary to make sure instantiated templates are included 6753fda9279dSmrg # in the archive. 6754fda9279dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6755fda9279dSmrg ;; 6756fda9279dSmrg gcx*) 6757fda9279dSmrg # Green Hills C++ Compiler 6758fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6759fda9279dSmrg 6760fda9279dSmrg # The C++ compiler must be used to create the archive. 6761fda9279dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6762fda9279dSmrg ;; 6763fda9279dSmrg *) 6764fda9279dSmrg # GNU C++ compiler with Solaris linker 6765fda9279dSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6766fda9279dSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6767fda9279dSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6768fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6769fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6770fda9279dSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6771fda9279dSmrg 6772fda9279dSmrg # Commands to make compiler produce verbose output that lists 6773fda9279dSmrg # what "hidden" libraries, object files and flags are used when 6774fda9279dSmrg # linking a shared library. 6775fda9279dSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6776fda9279dSmrg else 6777fda9279dSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6778fda9279dSmrg # platform. 6779fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6780fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6781fda9279dSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6782fda9279dSmrg 6783fda9279dSmrg # Commands to make compiler produce verbose output that lists 6784fda9279dSmrg # what "hidden" libraries, object files and flags are used when 6785fda9279dSmrg # linking a shared library. 6786fda9279dSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6787fda9279dSmrg fi 6788fda9279dSmrg 6789fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6790fda9279dSmrg case $host_os in 6791fda9279dSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6792fda9279dSmrg *) 6793fda9279dSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6794fda9279dSmrg ;; 6795fda9279dSmrg esac 6796fda9279dSmrg fi 6797fda9279dSmrg ;; 6798fda9279dSmrg esac 6799fda9279dSmrg ;; 6800fda9279dSmrg 6801fda9279dSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6802fda9279dSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6803fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6804fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6805fda9279dSmrg runpath_var='LD_RUN_PATH' 6806fda9279dSmrg 6807fda9279dSmrg case $cc_basename in 6808fda9279dSmrg CC*) 6809fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6810fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6811fda9279dSmrg ;; 6812fda9279dSmrg *) 6813fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6814fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6815fda9279dSmrg ;; 6816fda9279dSmrg esac 6817fda9279dSmrg ;; 6818fda9279dSmrg 6819fda9279dSmrg sysv5* | sco3.2v5* | sco5v6*) 6820fda9279dSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6821fda9279dSmrg # link with -lc, and that would cause any symbols used from libc to 6822fda9279dSmrg # always be unresolved, which means just about no library would 6823fda9279dSmrg # ever link correctly. If we're not using GNU ld we use -z text 6824fda9279dSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6825fda9279dSmrg # as -z defs. 6826fda9279dSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6827fda9279dSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6828fda9279dSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6829fda9279dSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6830fda9279dSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6831fda9279dSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6832fda9279dSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6833fda9279dSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6834fda9279dSmrg runpath_var='LD_RUN_PATH' 6835fda9279dSmrg 6836fda9279dSmrg case $cc_basename in 6837fda9279dSmrg CC*) 6838fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6839fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6840fda9279dSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6841fda9279dSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6842fda9279dSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6843fda9279dSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 6844fda9279dSmrg ;; 6845fda9279dSmrg *) 6846fda9279dSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6847fda9279dSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6848fda9279dSmrg ;; 6849fda9279dSmrg esac 6850fda9279dSmrg ;; 6851fda9279dSmrg 6852fda9279dSmrg tandem*) 6853fda9279dSmrg case $cc_basename in 6854fda9279dSmrg NCC*) 6855fda9279dSmrg # NonStop-UX NCC 3.20 6856fda9279dSmrg # FIXME: insert proper C++ library support 6857fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6858fda9279dSmrg ;; 6859fda9279dSmrg *) 6860fda9279dSmrg # FIXME: insert proper C++ library support 6861fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6862fda9279dSmrg ;; 6863fda9279dSmrg esac 6864fda9279dSmrg ;; 6865fda9279dSmrg 6866fda9279dSmrg vxworks*) 6867fda9279dSmrg # FIXME: insert proper C++ library support 6868fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6869fda9279dSmrg ;; 6870fda9279dSmrg 6871fda9279dSmrg *) 6872fda9279dSmrg # FIXME: insert proper C++ library support 6873fda9279dSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6874fda9279dSmrg ;; 6875fda9279dSmrg esac 6876fda9279dSmrg 6877fda9279dSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6878fda9279dSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6879fda9279dSmrg 6880fda9279dSmrg _LT_TAGVAR(GCC, $1)="$GXX" 6881fda9279dSmrg _LT_TAGVAR(LD, $1)="$LD" 6882fda9279dSmrg 6883fda9279dSmrg ## CAVEAT EMPTOR: 6884fda9279dSmrg ## There is no encapsulation within the following macros, do not change 6885fda9279dSmrg ## the running order or otherwise move them around unless you know exactly 6886fda9279dSmrg ## what you are doing... 6887fda9279dSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 6888fda9279dSmrg _LT_COMPILER_PIC($1) 6889fda9279dSmrg _LT_COMPILER_C_O($1) 6890fda9279dSmrg _LT_COMPILER_FILE_LOCKS($1) 6891fda9279dSmrg _LT_LINKER_SHLIBS($1) 6892fda9279dSmrg _LT_SYS_DYNAMIC_LINKER($1) 6893fda9279dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6894fda9279dSmrg 6895fda9279dSmrg _LT_CONFIG($1) 6896fda9279dSmrg fi # test -n "$compiler" 6897fda9279dSmrg 6898fda9279dSmrg CC=$lt_save_CC 6899fda9279dSmrg CFLAGS=$lt_save_CFLAGS 6900fda9279dSmrg LDCXX=$LD 6901fda9279dSmrg LD=$lt_save_LD 6902fda9279dSmrg GCC=$lt_save_GCC 6903fda9279dSmrg with_gnu_ld=$lt_save_with_gnu_ld 6904fda9279dSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 6905fda9279dSmrg lt_cv_path_LD=$lt_save_path_LD 6906fda9279dSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6907fda9279dSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6908fda9279dSmrgfi # test "$_lt_caught_CXX_error" != yes 6909fda9279dSmrg 6910fda9279dSmrgAC_LANG_POP 6911fda9279dSmrg])# _LT_LANG_CXX_CONFIG 6912fda9279dSmrg 6913fda9279dSmrg 6914fda9279dSmrg# _LT_FUNC_STRIPNAME_CNF 6915fda9279dSmrg# ---------------------- 6916fda9279dSmrg# func_stripname_cnf prefix suffix name 6917fda9279dSmrg# strip PREFIX and SUFFIX off of NAME. 6918fda9279dSmrg# PREFIX and SUFFIX must not contain globbing or regex special 6919fda9279dSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6920fda9279dSmrg# dot (in which case that matches only a dot). 6921fda9279dSmrg# 6922fda9279dSmrg# This function is identical to the (non-XSI) version of func_stripname, 6923fda9279dSmrg# except this one can be used by m4 code that may be executed by configure, 6924fda9279dSmrg# rather than the libtool script. 6925fda9279dSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6926fda9279dSmrgAC_REQUIRE([_LT_DECL_SED]) 6927fda9279dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6928fda9279dSmrgfunc_stripname_cnf () 6929fda9279dSmrg{ 6930fda9279dSmrg case ${2} in 6931fda9279dSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6932fda9279dSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6933fda9279dSmrg esac 6934fda9279dSmrg} # func_stripname_cnf 6935fda9279dSmrg])# _LT_FUNC_STRIPNAME_CNF 6936fda9279dSmrg 6937fda9279dSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6938fda9279dSmrg# --------------------------------- 6939fda9279dSmrg# Figure out "hidden" library dependencies from verbose 6940fda9279dSmrg# compiler output when linking a shared library. 6941fda9279dSmrg# Parse the compiler output and extract the necessary 6942fda9279dSmrg# objects, libraries and library flags. 6943fda9279dSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6944fda9279dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6945fda9279dSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6946fda9279dSmrg# Dependencies to place before and after the object being linked: 6947fda9279dSmrg_LT_TAGVAR(predep_objects, $1)= 6948fda9279dSmrg_LT_TAGVAR(postdep_objects, $1)= 6949fda9279dSmrg_LT_TAGVAR(predeps, $1)= 6950fda9279dSmrg_LT_TAGVAR(postdeps, $1)= 6951fda9279dSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6952fda9279dSmrg 6953fda9279dSmrgdnl we can't use the lt_simple_compile_test_code here, 6954fda9279dSmrgdnl because it contains code intended for an executable, 6955fda9279dSmrgdnl not a library. It's possible we should let each 6956fda9279dSmrgdnl tag define a new lt_????_link_test_code variable, 6957fda9279dSmrgdnl but it's only used here... 6958fda9279dSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6959fda9279dSmrgint a; 6960fda9279dSmrgvoid foo (void) { a = 0; } 6961fda9279dSmrg_LT_EOF 6962fda9279dSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6963fda9279dSmrgclass Foo 6964fda9279dSmrg{ 6965fda9279dSmrgpublic: 6966fda9279dSmrg Foo (void) { a = 0; } 6967fda9279dSmrgprivate: 6968fda9279dSmrg int a; 6969fda9279dSmrg}; 6970fda9279dSmrg_LT_EOF 6971fda9279dSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6972fda9279dSmrg subroutine foo 6973fda9279dSmrg implicit none 6974fda9279dSmrg integer*4 a 6975fda9279dSmrg a=0 6976fda9279dSmrg return 6977fda9279dSmrg end 6978fda9279dSmrg_LT_EOF 6979fda9279dSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6980fda9279dSmrg subroutine foo 6981fda9279dSmrg implicit none 6982fda9279dSmrg integer a 6983fda9279dSmrg a=0 6984fda9279dSmrg return 6985fda9279dSmrg end 6986fda9279dSmrg_LT_EOF 6987fda9279dSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6988fda9279dSmrgpublic class foo { 6989fda9279dSmrg private int a; 6990fda9279dSmrg public void bar (void) { 6991fda9279dSmrg a = 0; 6992fda9279dSmrg } 6993fda9279dSmrg}; 6994fda9279dSmrg_LT_EOF 6995fda9279dSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6996fda9279dSmrgpackage foo 6997fda9279dSmrgfunc foo() { 6998fda9279dSmrg} 6999fda9279dSmrg_LT_EOF 7000fda9279dSmrg]) 7001fda9279dSmrg 7002fda9279dSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 7003fda9279dSmrgcase "$CC $CFLAGS " in #( 7004fda9279dSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7005fda9279dSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7006fda9279dSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7007fda9279dSmrgesac 7008fda9279dSmrg 7009fda9279dSmrgdnl Parse the compiler output and extract the necessary 7010fda9279dSmrgdnl objects, libraries and library flags. 7011fda9279dSmrgif AC_TRY_EVAL(ac_compile); then 7012fda9279dSmrg # Parse the compiler output and extract the necessary 7013fda9279dSmrg # objects, libraries and library flags. 7014fda9279dSmrg 7015fda9279dSmrg # Sentinel used to keep track of whether or not we are before 7016fda9279dSmrg # the conftest object file. 7017fda9279dSmrg pre_test_object_deps_done=no 7018fda9279dSmrg 7019fda9279dSmrg for p in `eval "$output_verbose_link_cmd"`; do 7020fda9279dSmrg case ${prev}${p} in 7021fda9279dSmrg 7022fda9279dSmrg -L* | -R* | -l*) 7023fda9279dSmrg # Some compilers place space between "-{L,R}" and the path. 7024fda9279dSmrg # Remove the space. 7025fda9279dSmrg if test $p = "-L" || 7026fda9279dSmrg test $p = "-R"; then 7027fda9279dSmrg prev=$p 7028fda9279dSmrg continue 7029fda9279dSmrg fi 7030fda9279dSmrg 7031fda9279dSmrg # Expand the sysroot to ease extracting the directories later. 7032fda9279dSmrg if test -z "$prev"; then 7033fda9279dSmrg case $p in 7034fda9279dSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7035fda9279dSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7036fda9279dSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7037fda9279dSmrg esac 7038fda9279dSmrg fi 7039fda9279dSmrg case $p in 7040fda9279dSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7041fda9279dSmrg esac 7042fda9279dSmrg if test "$pre_test_object_deps_done" = no; then 7043fda9279dSmrg case ${prev} in 7044fda9279dSmrg -L | -R) 7045fda9279dSmrg # Internal compiler library paths should come after those 7046fda9279dSmrg # provided the user. The postdeps already come after the 7047fda9279dSmrg # user supplied libs so there is no need to process them. 7048fda9279dSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7049fda9279dSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 7050fda9279dSmrg else 7051fda9279dSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 7052fda9279dSmrg fi 7053fda9279dSmrg ;; 7054fda9279dSmrg # The "-l" case would never come before the object being 7055fda9279dSmrg # linked, so don't bother handling this case. 7056fda9279dSmrg esac 7057fda9279dSmrg else 7058fda9279dSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7059fda9279dSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 7060fda9279dSmrg else 7061fda9279dSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 7062fda9279dSmrg fi 7063fda9279dSmrg fi 7064fda9279dSmrg prev= 7065fda9279dSmrg ;; 7066fda9279dSmrg 7067fda9279dSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 7068fda9279dSmrg *.$objext) 7069fda9279dSmrg # This assumes that the test object file only shows up 7070fda9279dSmrg # once in the compiler output. 7071fda9279dSmrg if test "$p" = "conftest.$objext"; then 7072fda9279dSmrg pre_test_object_deps_done=yes 7073fda9279dSmrg continue 7074fda9279dSmrg fi 7075fda9279dSmrg 7076fda9279dSmrg if test "$pre_test_object_deps_done" = no; then 7077fda9279dSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7078fda9279dSmrg _LT_TAGVAR(predep_objects, $1)="$p" 7079fda9279dSmrg else 7080fda9279dSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7081fda9279dSmrg fi 7082fda9279dSmrg else 7083fda9279dSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7084fda9279dSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 7085fda9279dSmrg else 7086fda9279dSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7087fda9279dSmrg fi 7088fda9279dSmrg fi 7089fda9279dSmrg ;; 7090fda9279dSmrg 7091fda9279dSmrg *) ;; # Ignore the rest. 7092fda9279dSmrg 7093fda9279dSmrg esac 7094fda9279dSmrg done 7095fda9279dSmrg 7096fda9279dSmrg # Clean up. 7097fda9279dSmrg rm -f a.out a.exe 7098fda9279dSmrgelse 7099fda9279dSmrg echo "libtool.m4: error: problem compiling $1 test program" 7100fda9279dSmrgfi 7101fda9279dSmrg 7102fda9279dSmrg$RM -f confest.$objext 7103fda9279dSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7104fda9279dSmrg 7105fda9279dSmrg# PORTME: override above test on systems where it is broken 7106fda9279dSmrgm4_if([$1], [CXX], 7107fda9279dSmrg[case $host_os in 7108fda9279dSmrginterix[[3-9]]*) 7109fda9279dSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7110fda9279dSmrg # hack all around it, let's just trust "g++" to DTRT. 7111fda9279dSmrg _LT_TAGVAR(predep_objects,$1)= 7112fda9279dSmrg _LT_TAGVAR(postdep_objects,$1)= 7113fda9279dSmrg _LT_TAGVAR(postdeps,$1)= 7114fda9279dSmrg ;; 7115fda9279dSmrg 7116fda9279dSmrglinux*) 7117fda9279dSmrg case `$CC -V 2>&1 | sed 5q` in 7118fda9279dSmrg *Sun\ C*) 7119fda9279dSmrg # Sun C++ 5.9 7120fda9279dSmrg 7121fda9279dSmrg # The more standards-conforming stlport4 library is 7122fda9279dSmrg # incompatible with the Cstd library. Avoid specifying 7123fda9279dSmrg # it if it's in CXXFLAGS. Ignore libCrun as 7124fda9279dSmrg # -library=stlport4 depends on it. 7125fda9279dSmrg case " $CXX $CXXFLAGS " in 7126fda9279dSmrg *" -library=stlport4 "*) 7127fda9279dSmrg solaris_use_stlport4=yes 7128fda9279dSmrg ;; 7129fda9279dSmrg esac 7130fda9279dSmrg 7131fda9279dSmrg if test "$solaris_use_stlport4" != yes; then 7132fda9279dSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7133fda9279dSmrg fi 7134fda9279dSmrg ;; 7135fda9279dSmrg esac 7136fda9279dSmrg ;; 7137fda9279dSmrg 7138fda9279dSmrgsolaris*) 7139fda9279dSmrg case $cc_basename in 7140fda9279dSmrg CC* | sunCC*) 7141fda9279dSmrg # The more standards-conforming stlport4 library is 7142fda9279dSmrg # incompatible with the Cstd library. Avoid specifying 7143fda9279dSmrg # it if it's in CXXFLAGS. Ignore libCrun as 7144fda9279dSmrg # -library=stlport4 depends on it. 7145fda9279dSmrg case " $CXX $CXXFLAGS " in 7146fda9279dSmrg *" -library=stlport4 "*) 7147fda9279dSmrg solaris_use_stlport4=yes 7148fda9279dSmrg ;; 7149fda9279dSmrg esac 7150fda9279dSmrg 7151fda9279dSmrg # Adding this requires a known-good setup of shared libraries for 7152fda9279dSmrg # Sun compiler versions before 5.6, else PIC objects from an old 7153fda9279dSmrg # archive will be linked into the output, leading to subtle bugs. 7154fda9279dSmrg if test "$solaris_use_stlport4" != yes; then 7155fda9279dSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7156fda9279dSmrg fi 7157fda9279dSmrg ;; 7158fda9279dSmrg esac 7159fda9279dSmrg ;; 7160fda9279dSmrgesac 7161fda9279dSmrg]) 7162fda9279dSmrg 7163fda9279dSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 7164fda9279dSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7165fda9279dSmrgesac 7166fda9279dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7167fda9279dSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7168fda9279dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7169fda9279dSmrgfi 7170fda9279dSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7171fda9279dSmrg [The directories searched by this compiler when creating a shared library]) 7172fda9279dSmrg_LT_TAGDECL([], [predep_objects], [1], 7173fda9279dSmrg [Dependencies to place before and after the objects being linked to 7174fda9279dSmrg create a shared library]) 7175fda9279dSmrg_LT_TAGDECL([], [postdep_objects], [1]) 7176fda9279dSmrg_LT_TAGDECL([], [predeps], [1]) 7177fda9279dSmrg_LT_TAGDECL([], [postdeps], [1]) 7178fda9279dSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7179fda9279dSmrg [The library search path used internally by the compiler when linking 7180fda9279dSmrg a shared library]) 7181fda9279dSmrg])# _LT_SYS_HIDDEN_LIBDEPS 7182fda9279dSmrg 7183fda9279dSmrg 7184fda9279dSmrg# _LT_LANG_F77_CONFIG([TAG]) 7185fda9279dSmrg# -------------------------- 7186fda9279dSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 7187fda9279dSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7188fda9279dSmrg# to write the compiler configuration to `libtool'. 7189fda9279dSmrgm4_defun([_LT_LANG_F77_CONFIG], 7190fda9279dSmrg[AC_LANG_PUSH(Fortran 77) 7191fda9279dSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 7192fda9279dSmrg _lt_disable_F77=yes 7193fda9279dSmrgfi 7194fda9279dSmrg 7195fda9279dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7196fda9279dSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7197fda9279dSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7198fda9279dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7199fda9279dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7200fda9279dSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7201fda9279dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7202fda9279dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7203fda9279dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7204fda9279dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7205fda9279dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7206fda9279dSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7207fda9279dSmrg_LT_TAGVAR(module_cmds, $1)= 7208fda9279dSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7209fda9279dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7210fda9279dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7211fda9279dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7212fda9279dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7213fda9279dSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7214fda9279dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7215fda9279dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7216fda9279dSmrg 7217fda9279dSmrg# Source file extension for f77 test sources. 7218fda9279dSmrgac_ext=f 7219fda9279dSmrg 7220fda9279dSmrg# Object file extension for compiled f77 test sources. 7221fda9279dSmrgobjext=o 7222fda9279dSmrg_LT_TAGVAR(objext, $1)=$objext 7223fda9279dSmrg 7224fda9279dSmrg# No sense in running all these tests if we already determined that 7225fda9279dSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 7226fda9279dSmrg# are currently assumed to apply to all compilers on this platform, 7227fda9279dSmrg# and will be corrupted by setting them based on a non-working compiler. 7228fda9279dSmrgif test "$_lt_disable_F77" != yes; then 7229fda9279dSmrg # Code to be used in simple compile tests 7230fda9279dSmrg lt_simple_compile_test_code="\ 7231fda9279dSmrg subroutine t 7232fda9279dSmrg return 7233fda9279dSmrg end 7234fda9279dSmrg" 7235fda9279dSmrg 7236fda9279dSmrg # Code to be used in simple link tests 7237fda9279dSmrg lt_simple_link_test_code="\ 7238fda9279dSmrg program t 7239fda9279dSmrg end 7240fda9279dSmrg" 7241fda9279dSmrg 7242fda9279dSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7243fda9279dSmrg _LT_TAG_COMPILER 7244fda9279dSmrg 7245fda9279dSmrg # save warnings/boilerplate of simple test code 7246fda9279dSmrg _LT_COMPILER_BOILERPLATE 7247fda9279dSmrg _LT_LINKER_BOILERPLATE 7248fda9279dSmrg 7249fda9279dSmrg # Allow CC to be a program name with arguments. 7250fda9279dSmrg lt_save_CC="$CC" 7251fda9279dSmrg lt_save_GCC=$GCC 7252fda9279dSmrg lt_save_CFLAGS=$CFLAGS 7253fda9279dSmrg CC=${F77-"f77"} 7254fda9279dSmrg CFLAGS=$FFLAGS 7255fda9279dSmrg compiler=$CC 7256fda9279dSmrg _LT_TAGVAR(compiler, $1)=$CC 7257fda9279dSmrg _LT_CC_BASENAME([$compiler]) 7258fda9279dSmrg GCC=$G77 7259fda9279dSmrg if test -n "$compiler"; then 7260fda9279dSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7261fda9279dSmrg AC_MSG_RESULT([$can_build_shared]) 7262fda9279dSmrg 7263fda9279dSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7264fda9279dSmrg test "$can_build_shared" = "no" && enable_shared=no 7265fda9279dSmrg 7266fda9279dSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7267fda9279dSmrg # are all built from PIC. 7268fda9279dSmrg case $host_os in 7269fda9279dSmrg aix3*) 7270fda9279dSmrg test "$enable_shared" = yes && enable_static=no 7271fda9279dSmrg if test -n "$RANLIB"; then 7272fda9279dSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7273fda9279dSmrg postinstall_cmds='$RANLIB $lib' 7274fda9279dSmrg fi 7275fda9279dSmrg ;; 7276fda9279dSmrg aix[[4-9]]*) 7277fda9279dSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7278fda9279dSmrg test "$enable_shared" = yes && enable_static=no 7279fda9279dSmrg fi 7280fda9279dSmrg ;; 7281fda9279dSmrg esac 7282fda9279dSmrg AC_MSG_RESULT([$enable_shared]) 7283fda9279dSmrg 7284fda9279dSmrg AC_MSG_CHECKING([whether to build static libraries]) 7285fda9279dSmrg # Make sure either enable_shared or enable_static is yes. 7286fda9279dSmrg test "$enable_shared" = yes || enable_static=yes 7287fda9279dSmrg AC_MSG_RESULT([$enable_static]) 7288fda9279dSmrg 7289fda9279dSmrg _LT_TAGVAR(GCC, $1)="$G77" 7290fda9279dSmrg _LT_TAGVAR(LD, $1)="$LD" 7291fda9279dSmrg 7292fda9279dSmrg ## CAVEAT EMPTOR: 7293fda9279dSmrg ## There is no encapsulation within the following macros, do not change 7294fda9279dSmrg ## the running order or otherwise move them around unless you know exactly 7295fda9279dSmrg ## what you are doing... 7296fda9279dSmrg _LT_COMPILER_PIC($1) 7297fda9279dSmrg _LT_COMPILER_C_O($1) 7298fda9279dSmrg _LT_COMPILER_FILE_LOCKS($1) 7299fda9279dSmrg _LT_LINKER_SHLIBS($1) 7300fda9279dSmrg _LT_SYS_DYNAMIC_LINKER($1) 7301fda9279dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7302fda9279dSmrg 7303fda9279dSmrg _LT_CONFIG($1) 7304fda9279dSmrg fi # test -n "$compiler" 7305fda9279dSmrg 7306fda9279dSmrg GCC=$lt_save_GCC 7307fda9279dSmrg CC="$lt_save_CC" 7308fda9279dSmrg CFLAGS="$lt_save_CFLAGS" 7309fda9279dSmrgfi # test "$_lt_disable_F77" != yes 7310fda9279dSmrg 7311fda9279dSmrgAC_LANG_POP 7312fda9279dSmrg])# _LT_LANG_F77_CONFIG 7313fda9279dSmrg 7314fda9279dSmrg 7315fda9279dSmrg# _LT_LANG_FC_CONFIG([TAG]) 7316fda9279dSmrg# ------------------------- 7317fda9279dSmrg# Ensure that the configuration variables for a Fortran compiler are 7318fda9279dSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7319fda9279dSmrg# to write the compiler configuration to `libtool'. 7320fda9279dSmrgm4_defun([_LT_LANG_FC_CONFIG], 7321fda9279dSmrg[AC_LANG_PUSH(Fortran) 7322fda9279dSmrg 7323fda9279dSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 7324fda9279dSmrg _lt_disable_FC=yes 7325fda9279dSmrgfi 7326fda9279dSmrg 7327fda9279dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7328fda9279dSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7329fda9279dSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7330fda9279dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7331fda9279dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7332fda9279dSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7333fda9279dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7334fda9279dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7335fda9279dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7336fda9279dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7337fda9279dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7338fda9279dSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7339fda9279dSmrg_LT_TAGVAR(module_cmds, $1)= 7340fda9279dSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7341fda9279dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7342fda9279dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7343fda9279dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7344fda9279dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7345fda9279dSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7346fda9279dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7347fda9279dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7348fda9279dSmrg 7349fda9279dSmrg# Source file extension for fc test sources. 7350fda9279dSmrgac_ext=${ac_fc_srcext-f} 7351fda9279dSmrg 7352fda9279dSmrg# Object file extension for compiled fc test sources. 7353fda9279dSmrgobjext=o 7354fda9279dSmrg_LT_TAGVAR(objext, $1)=$objext 7355fda9279dSmrg 7356fda9279dSmrg# No sense in running all these tests if we already determined that 7357fda9279dSmrg# the FC compiler isn't working. Some variables (like enable_shared) 7358fda9279dSmrg# are currently assumed to apply to all compilers on this platform, 7359fda9279dSmrg# and will be corrupted by setting them based on a non-working compiler. 7360fda9279dSmrgif test "$_lt_disable_FC" != yes; then 7361fda9279dSmrg # Code to be used in simple compile tests 7362fda9279dSmrg lt_simple_compile_test_code="\ 7363fda9279dSmrg subroutine t 7364fda9279dSmrg return 7365fda9279dSmrg end 7366fda9279dSmrg" 7367fda9279dSmrg 7368fda9279dSmrg # Code to be used in simple link tests 7369fda9279dSmrg lt_simple_link_test_code="\ 7370fda9279dSmrg program t 7371fda9279dSmrg end 7372fda9279dSmrg" 7373fda9279dSmrg 7374fda9279dSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7375fda9279dSmrg _LT_TAG_COMPILER 7376fda9279dSmrg 7377fda9279dSmrg # save warnings/boilerplate of simple test code 7378fda9279dSmrg _LT_COMPILER_BOILERPLATE 7379fda9279dSmrg _LT_LINKER_BOILERPLATE 7380fda9279dSmrg 7381fda9279dSmrg # Allow CC to be a program name with arguments. 7382fda9279dSmrg lt_save_CC="$CC" 7383fda9279dSmrg lt_save_GCC=$GCC 7384fda9279dSmrg lt_save_CFLAGS=$CFLAGS 7385fda9279dSmrg CC=${FC-"f95"} 7386fda9279dSmrg CFLAGS=$FCFLAGS 7387fda9279dSmrg compiler=$CC 7388fda9279dSmrg GCC=$ac_cv_fc_compiler_gnu 7389fda9279dSmrg 7390fda9279dSmrg _LT_TAGVAR(compiler, $1)=$CC 7391fda9279dSmrg _LT_CC_BASENAME([$compiler]) 7392fda9279dSmrg 7393fda9279dSmrg if test -n "$compiler"; then 7394fda9279dSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7395fda9279dSmrg AC_MSG_RESULT([$can_build_shared]) 7396fda9279dSmrg 7397fda9279dSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7398fda9279dSmrg test "$can_build_shared" = "no" && enable_shared=no 7399fda9279dSmrg 7400fda9279dSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7401fda9279dSmrg # are all built from PIC. 7402fda9279dSmrg case $host_os in 7403fda9279dSmrg aix3*) 7404fda9279dSmrg test "$enable_shared" = yes && enable_static=no 7405fda9279dSmrg if test -n "$RANLIB"; then 7406fda9279dSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7407fda9279dSmrg postinstall_cmds='$RANLIB $lib' 7408fda9279dSmrg fi 7409fda9279dSmrg ;; 7410fda9279dSmrg aix[[4-9]]*) 7411fda9279dSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7412fda9279dSmrg test "$enable_shared" = yes && enable_static=no 7413fda9279dSmrg fi 7414fda9279dSmrg ;; 7415fda9279dSmrg esac 7416fda9279dSmrg AC_MSG_RESULT([$enable_shared]) 7417fda9279dSmrg 7418fda9279dSmrg AC_MSG_CHECKING([whether to build static libraries]) 7419fda9279dSmrg # Make sure either enable_shared or enable_static is yes. 7420fda9279dSmrg test "$enable_shared" = yes || enable_static=yes 7421fda9279dSmrg AC_MSG_RESULT([$enable_static]) 7422fda9279dSmrg 7423fda9279dSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7424fda9279dSmrg _LT_TAGVAR(LD, $1)="$LD" 7425fda9279dSmrg 7426fda9279dSmrg ## CAVEAT EMPTOR: 7427fda9279dSmrg ## There is no encapsulation within the following macros, do not change 7428fda9279dSmrg ## the running order or otherwise move them around unless you know exactly 7429fda9279dSmrg ## what you are doing... 7430fda9279dSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7431fda9279dSmrg _LT_COMPILER_PIC($1) 7432fda9279dSmrg _LT_COMPILER_C_O($1) 7433fda9279dSmrg _LT_COMPILER_FILE_LOCKS($1) 7434fda9279dSmrg _LT_LINKER_SHLIBS($1) 7435fda9279dSmrg _LT_SYS_DYNAMIC_LINKER($1) 7436fda9279dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7437fda9279dSmrg 7438fda9279dSmrg _LT_CONFIG($1) 7439fda9279dSmrg fi # test -n "$compiler" 7440fda9279dSmrg 7441fda9279dSmrg GCC=$lt_save_GCC 7442fda9279dSmrg CC=$lt_save_CC 7443fda9279dSmrg CFLAGS=$lt_save_CFLAGS 7444fda9279dSmrgfi # test "$_lt_disable_FC" != yes 7445fda9279dSmrg 7446fda9279dSmrgAC_LANG_POP 7447fda9279dSmrg])# _LT_LANG_FC_CONFIG 7448fda9279dSmrg 7449fda9279dSmrg 7450fda9279dSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 7451fda9279dSmrg# -------------------------- 7452fda9279dSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7453fda9279dSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7454fda9279dSmrg# to write the compiler configuration to `libtool'. 7455fda9279dSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 7456fda9279dSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7457fda9279dSmrgAC_LANG_SAVE 7458fda9279dSmrg 7459fda9279dSmrg# Source file extension for Java test sources. 7460fda9279dSmrgac_ext=java 7461fda9279dSmrg 7462fda9279dSmrg# Object file extension for compiled Java test sources. 7463fda9279dSmrgobjext=o 7464fda9279dSmrg_LT_TAGVAR(objext, $1)=$objext 7465fda9279dSmrg 7466fda9279dSmrg# Code to be used in simple compile tests 7467fda9279dSmrglt_simple_compile_test_code="class foo {}" 7468fda9279dSmrg 7469fda9279dSmrg# Code to be used in simple link tests 7470fda9279dSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7471fda9279dSmrg 7472fda9279dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7473fda9279dSmrg_LT_TAG_COMPILER 7474fda9279dSmrg 7475fda9279dSmrg# save warnings/boilerplate of simple test code 7476fda9279dSmrg_LT_COMPILER_BOILERPLATE 7477fda9279dSmrg_LT_LINKER_BOILERPLATE 7478fda9279dSmrg 7479fda9279dSmrg# Allow CC to be a program name with arguments. 7480fda9279dSmrglt_save_CC=$CC 7481fda9279dSmrglt_save_CFLAGS=$CFLAGS 7482fda9279dSmrglt_save_GCC=$GCC 7483fda9279dSmrgGCC=yes 7484fda9279dSmrgCC=${GCJ-"gcj"} 7485fda9279dSmrgCFLAGS=$GCJFLAGS 7486fda9279dSmrgcompiler=$CC 7487fda9279dSmrg_LT_TAGVAR(compiler, $1)=$CC 7488fda9279dSmrg_LT_TAGVAR(LD, $1)="$LD" 7489fda9279dSmrg_LT_CC_BASENAME([$compiler]) 7490fda9279dSmrg 7491fda9279dSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7492fda9279dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7493fda9279dSmrg 7494fda9279dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7495fda9279dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7496fda9279dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7497fda9279dSmrg 7498fda9279dSmrgif test -n "$compiler"; then 7499fda9279dSmrg _LT_COMPILER_NO_RTTI($1) 7500fda9279dSmrg _LT_COMPILER_PIC($1) 7501fda9279dSmrg _LT_COMPILER_C_O($1) 7502fda9279dSmrg _LT_COMPILER_FILE_LOCKS($1) 7503fda9279dSmrg _LT_LINKER_SHLIBS($1) 7504fda9279dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7505fda9279dSmrg 7506fda9279dSmrg _LT_CONFIG($1) 7507fda9279dSmrgfi 7508fda9279dSmrg 7509fda9279dSmrgAC_LANG_RESTORE 7510fda9279dSmrg 7511fda9279dSmrgGCC=$lt_save_GCC 7512fda9279dSmrgCC=$lt_save_CC 7513fda9279dSmrgCFLAGS=$lt_save_CFLAGS 7514fda9279dSmrg])# _LT_LANG_GCJ_CONFIG 7515fda9279dSmrg 7516fda9279dSmrg 7517fda9279dSmrg# _LT_LANG_GO_CONFIG([TAG]) 7518fda9279dSmrg# -------------------------- 7519fda9279dSmrg# Ensure that the configuration variables for the GNU Go compiler 7520fda9279dSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7521fda9279dSmrg# to write the compiler configuration to `libtool'. 7522fda9279dSmrgm4_defun([_LT_LANG_GO_CONFIG], 7523fda9279dSmrg[AC_REQUIRE([LT_PROG_GO])dnl 7524fda9279dSmrgAC_LANG_SAVE 7525fda9279dSmrg 7526fda9279dSmrg# Source file extension for Go test sources. 7527fda9279dSmrgac_ext=go 7528fda9279dSmrg 7529fda9279dSmrg# Object file extension for compiled Go test sources. 7530fda9279dSmrgobjext=o 7531fda9279dSmrg_LT_TAGVAR(objext, $1)=$objext 7532fda9279dSmrg 7533fda9279dSmrg# Code to be used in simple compile tests 7534fda9279dSmrglt_simple_compile_test_code="package main; func main() { }" 7535fda9279dSmrg 7536fda9279dSmrg# Code to be used in simple link tests 7537fda9279dSmrglt_simple_link_test_code='package main; func main() { }' 7538fda9279dSmrg 7539fda9279dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7540fda9279dSmrg_LT_TAG_COMPILER 7541fda9279dSmrg 7542fda9279dSmrg# save warnings/boilerplate of simple test code 7543fda9279dSmrg_LT_COMPILER_BOILERPLATE 7544fda9279dSmrg_LT_LINKER_BOILERPLATE 7545fda9279dSmrg 7546fda9279dSmrg# Allow CC to be a program name with arguments. 7547fda9279dSmrglt_save_CC=$CC 7548fda9279dSmrglt_save_CFLAGS=$CFLAGS 7549fda9279dSmrglt_save_GCC=$GCC 7550fda9279dSmrgGCC=yes 7551fda9279dSmrgCC=${GOC-"gccgo"} 7552fda9279dSmrgCFLAGS=$GOFLAGS 7553fda9279dSmrgcompiler=$CC 7554fda9279dSmrg_LT_TAGVAR(compiler, $1)=$CC 7555fda9279dSmrg_LT_TAGVAR(LD, $1)="$LD" 7556fda9279dSmrg_LT_CC_BASENAME([$compiler]) 7557fda9279dSmrg 7558fda9279dSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 7559fda9279dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7560fda9279dSmrg 7561fda9279dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7562fda9279dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7563fda9279dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7564fda9279dSmrg 7565fda9279dSmrgif test -n "$compiler"; then 7566fda9279dSmrg _LT_COMPILER_NO_RTTI($1) 7567fda9279dSmrg _LT_COMPILER_PIC($1) 7568fda9279dSmrg _LT_COMPILER_C_O($1) 7569fda9279dSmrg _LT_COMPILER_FILE_LOCKS($1) 7570fda9279dSmrg _LT_LINKER_SHLIBS($1) 7571fda9279dSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7572fda9279dSmrg 7573fda9279dSmrg _LT_CONFIG($1) 7574fda9279dSmrgfi 7575fda9279dSmrg 7576fda9279dSmrgAC_LANG_RESTORE 7577fda9279dSmrg 7578fda9279dSmrgGCC=$lt_save_GCC 7579fda9279dSmrgCC=$lt_save_CC 7580fda9279dSmrgCFLAGS=$lt_save_CFLAGS 7581fda9279dSmrg])# _LT_LANG_GO_CONFIG 7582fda9279dSmrg 7583fda9279dSmrg 7584fda9279dSmrg# _LT_LANG_RC_CONFIG([TAG]) 7585fda9279dSmrg# ------------------------- 7586fda9279dSmrg# Ensure that the configuration variables for the Windows resource compiler 7587fda9279dSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7588fda9279dSmrg# to write the compiler configuration to `libtool'. 7589fda9279dSmrgm4_defun([_LT_LANG_RC_CONFIG], 7590fda9279dSmrg[AC_REQUIRE([LT_PROG_RC])dnl 7591fda9279dSmrgAC_LANG_SAVE 7592fda9279dSmrg 7593fda9279dSmrg# Source file extension for RC test sources. 7594fda9279dSmrgac_ext=rc 7595fda9279dSmrg 7596fda9279dSmrg# Object file extension for compiled RC test sources. 7597fda9279dSmrgobjext=o 7598fda9279dSmrg_LT_TAGVAR(objext, $1)=$objext 7599fda9279dSmrg 7600fda9279dSmrg# Code to be used in simple compile tests 7601fda9279dSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7602fda9279dSmrg 7603fda9279dSmrg# Code to be used in simple link tests 7604fda9279dSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 7605fda9279dSmrg 7606fda9279dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7607fda9279dSmrg_LT_TAG_COMPILER 7608fda9279dSmrg 7609fda9279dSmrg# save warnings/boilerplate of simple test code 7610fda9279dSmrg_LT_COMPILER_BOILERPLATE 7611fda9279dSmrg_LT_LINKER_BOILERPLATE 7612fda9279dSmrg 7613fda9279dSmrg# Allow CC to be a program name with arguments. 7614fda9279dSmrglt_save_CC="$CC" 7615fda9279dSmrglt_save_CFLAGS=$CFLAGS 7616fda9279dSmrglt_save_GCC=$GCC 7617fda9279dSmrgGCC= 7618fda9279dSmrgCC=${RC-"windres"} 7619fda9279dSmrgCFLAGS= 7620fda9279dSmrgcompiler=$CC 7621fda9279dSmrg_LT_TAGVAR(compiler, $1)=$CC 7622fda9279dSmrg_LT_CC_BASENAME([$compiler]) 7623fda9279dSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7624fda9279dSmrg 7625fda9279dSmrgif test -n "$compiler"; then 7626fda9279dSmrg : 7627fda9279dSmrg _LT_CONFIG($1) 7628fda9279dSmrgfi 7629fda9279dSmrg 7630fda9279dSmrgGCC=$lt_save_GCC 7631fda9279dSmrgAC_LANG_RESTORE 7632fda9279dSmrgCC=$lt_save_CC 7633fda9279dSmrgCFLAGS=$lt_save_CFLAGS 7634fda9279dSmrg])# _LT_LANG_RC_CONFIG 7635fda9279dSmrg 7636fda9279dSmrg 7637fda9279dSmrg# LT_PROG_GCJ 7638fda9279dSmrg# ----------- 7639fda9279dSmrgAC_DEFUN([LT_PROG_GCJ], 7640fda9279dSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7641fda9279dSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7642fda9279dSmrg [AC_CHECK_TOOL(GCJ, gcj,) 7643fda9279dSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7644fda9279dSmrg AC_SUBST(GCJFLAGS)])])[]dnl 7645fda9279dSmrg]) 7646fda9279dSmrg 7647fda9279dSmrg# Old name: 7648fda9279dSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7649fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 7650fda9279dSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7651fda9279dSmrg 7652fda9279dSmrg 7653fda9279dSmrg# LT_PROG_GO 7654fda9279dSmrg# ---------- 7655fda9279dSmrgAC_DEFUN([LT_PROG_GO], 7656fda9279dSmrg[AC_CHECK_TOOL(GOC, gccgo,) 7657fda9279dSmrg]) 7658fda9279dSmrg 7659fda9279dSmrg 7660fda9279dSmrg# LT_PROG_RC 7661fda9279dSmrg# ---------- 7662fda9279dSmrgAC_DEFUN([LT_PROG_RC], 7663fda9279dSmrg[AC_CHECK_TOOL(RC, windres,) 7664fda9279dSmrg]) 7665fda9279dSmrg 7666fda9279dSmrg# Old name: 7667fda9279dSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7668fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 7669fda9279dSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7670fda9279dSmrg 7671fda9279dSmrg 7672fda9279dSmrg# _LT_DECL_EGREP 7673fda9279dSmrg# -------------- 7674fda9279dSmrg# If we don't have a new enough Autoconf to choose the best grep 7675fda9279dSmrg# available, choose the one first in the user's PATH. 7676fda9279dSmrgm4_defun([_LT_DECL_EGREP], 7677fda9279dSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7678fda9279dSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7679fda9279dSmrgtest -z "$GREP" && GREP=grep 7680fda9279dSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7681fda9279dSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7682fda9279dSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7683fda9279dSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7684fda9279dSmrgAC_SUBST([GREP]) 7685fda9279dSmrg]) 7686fda9279dSmrg 7687fda9279dSmrg 7688fda9279dSmrg# _LT_DECL_OBJDUMP 7689fda9279dSmrg# -------------- 7690fda9279dSmrg# If we don't have a new enough Autoconf to choose the best objdump 7691fda9279dSmrg# available, choose the one first in the user's PATH. 7692fda9279dSmrgm4_defun([_LT_DECL_OBJDUMP], 7693fda9279dSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7694fda9279dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7695fda9279dSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7696fda9279dSmrgAC_SUBST([OBJDUMP]) 7697fda9279dSmrg]) 7698fda9279dSmrg 7699fda9279dSmrg# _LT_DECL_DLLTOOL 7700fda9279dSmrg# ---------------- 7701fda9279dSmrg# Ensure DLLTOOL variable is set. 7702fda9279dSmrgm4_defun([_LT_DECL_DLLTOOL], 7703fda9279dSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7704fda9279dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7705fda9279dSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7706fda9279dSmrgAC_SUBST([DLLTOOL]) 7707fda9279dSmrg]) 7708fda9279dSmrg 7709fda9279dSmrg# _LT_DECL_SED 7710fda9279dSmrg# ------------ 7711fda9279dSmrg# Check for a fully-functional sed program, that truncates 7712fda9279dSmrg# as few characters as possible. Prefer GNU sed if found. 7713fda9279dSmrgm4_defun([_LT_DECL_SED], 7714fda9279dSmrg[AC_PROG_SED 7715fda9279dSmrgtest -z "$SED" && SED=sed 7716fda9279dSmrgXsed="$SED -e 1s/^X//" 7717fda9279dSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7718fda9279dSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7719fda9279dSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7720fda9279dSmrg])# _LT_DECL_SED 7721fda9279dSmrg 7722fda9279dSmrgm4_ifndef([AC_PROG_SED], [ 7723fda9279dSmrg# NOTE: This macro has been submitted for inclusion into # 7724fda9279dSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7725fda9279dSmrg# a released version of Autoconf we should remove this # 7726fda9279dSmrg# macro and use it instead. # 7727fda9279dSmrg 7728fda9279dSmrgm4_defun([AC_PROG_SED], 7729fda9279dSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7730fda9279dSmrgAC_CACHE_VAL(lt_cv_path_SED, 7731fda9279dSmrg[# Loop through the user's path and test for sed and gsed. 7732fda9279dSmrg# Then use that list of sed's as ones to test for truncation. 7733fda9279dSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7734fda9279dSmrgfor as_dir in $PATH 7735fda9279dSmrgdo 7736fda9279dSmrg IFS=$as_save_IFS 7737fda9279dSmrg test -z "$as_dir" && as_dir=. 7738fda9279dSmrg for lt_ac_prog in sed gsed; do 7739fda9279dSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7740fda9279dSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7741fda9279dSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7742fda9279dSmrg fi 7743fda9279dSmrg done 7744fda9279dSmrg done 7745fda9279dSmrgdone 7746fda9279dSmrgIFS=$as_save_IFS 7747fda9279dSmrglt_ac_max=0 7748fda9279dSmrglt_ac_count=0 7749fda9279dSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7750fda9279dSmrg# along with /bin/sed that truncates output. 7751fda9279dSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7752fda9279dSmrg test ! -f $lt_ac_sed && continue 7753fda9279dSmrg cat /dev/null > conftest.in 7754fda9279dSmrg lt_ac_count=0 7755fda9279dSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7756fda9279dSmrg # Check for GNU sed and select it if it is found. 7757fda9279dSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7758fda9279dSmrg lt_cv_path_SED=$lt_ac_sed 7759fda9279dSmrg break 7760fda9279dSmrg fi 7761fda9279dSmrg while true; do 7762fda9279dSmrg cat conftest.in conftest.in >conftest.tmp 7763fda9279dSmrg mv conftest.tmp conftest.in 7764fda9279dSmrg cp conftest.in conftest.nl 7765fda9279dSmrg echo >>conftest.nl 7766fda9279dSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7767fda9279dSmrg cmp -s conftest.out conftest.nl || break 7768fda9279dSmrg # 10000 chars as input seems more than enough 7769fda9279dSmrg test $lt_ac_count -gt 10 && break 7770fda9279dSmrg lt_ac_count=`expr $lt_ac_count + 1` 7771fda9279dSmrg if test $lt_ac_count -gt $lt_ac_max; then 7772fda9279dSmrg lt_ac_max=$lt_ac_count 7773fda9279dSmrg lt_cv_path_SED=$lt_ac_sed 7774fda9279dSmrg fi 7775fda9279dSmrg done 7776fda9279dSmrgdone 7777fda9279dSmrg]) 7778fda9279dSmrgSED=$lt_cv_path_SED 7779fda9279dSmrgAC_SUBST([SED]) 7780fda9279dSmrgAC_MSG_RESULT([$SED]) 7781fda9279dSmrg])#AC_PROG_SED 7782fda9279dSmrg])#m4_ifndef 7783fda9279dSmrg 7784fda9279dSmrg# Old name: 7785fda9279dSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7786fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 7787fda9279dSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7788fda9279dSmrg 7789fda9279dSmrg 7790fda9279dSmrg# _LT_CHECK_SHELL_FEATURES 7791fda9279dSmrg# ------------------------ 7792fda9279dSmrg# Find out whether the shell is Bourne or XSI compatible, 7793fda9279dSmrg# or has some other useful features. 7794fda9279dSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7795fda9279dSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7796fda9279dSmrg# Try some XSI features 7797fda9279dSmrgxsi_shell=no 7798fda9279dSmrg( _lt_dummy="a/b/c" 7799fda9279dSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7800fda9279dSmrg = c,a/b,b/c, \ 7801fda9279dSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7802fda9279dSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7803fda9279dSmrg && xsi_shell=yes 7804fda9279dSmrgAC_MSG_RESULT([$xsi_shell]) 7805fda9279dSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7806fda9279dSmrg 7807fda9279dSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7808fda9279dSmrglt_shell_append=no 7809fda9279dSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7810fda9279dSmrg >/dev/null 2>&1 \ 7811fda9279dSmrg && lt_shell_append=yes 7812fda9279dSmrgAC_MSG_RESULT([$lt_shell_append]) 7813fda9279dSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7814fda9279dSmrg 7815fda9279dSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7816fda9279dSmrg lt_unset=unset 7817fda9279dSmrgelse 7818fda9279dSmrg lt_unset=false 7819fda9279dSmrgfi 7820fda9279dSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7821fda9279dSmrg 7822fda9279dSmrg# test EBCDIC or ASCII 7823fda9279dSmrgcase `echo X|tr X '\101'` in 7824fda9279dSmrg A) # ASCII based system 7825fda9279dSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7826fda9279dSmrg lt_SP2NL='tr \040 \012' 7827fda9279dSmrg lt_NL2SP='tr \015\012 \040\040' 7828fda9279dSmrg ;; 7829fda9279dSmrg *) # EBCDIC based system 7830fda9279dSmrg lt_SP2NL='tr \100 \n' 7831fda9279dSmrg lt_NL2SP='tr \r\n \100\100' 7832fda9279dSmrg ;; 7833fda9279dSmrgesac 7834fda9279dSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7835fda9279dSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7836fda9279dSmrg])# _LT_CHECK_SHELL_FEATURES 7837fda9279dSmrg 7838fda9279dSmrg 7839fda9279dSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7840fda9279dSmrg# ------------------------------------------------------ 7841fda9279dSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7842fda9279dSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7843fda9279dSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7844fda9279dSmrg[dnl { 7845fda9279dSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7846fda9279dSmrg$1 ()\ 7847fda9279dSmrg{\ 7848fda9279dSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7849fda9279dSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7850fda9279dSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7851fda9279dSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7852fda9279dSmrgtest 0 -eq $? || _lt_function_replace_fail=: 7853fda9279dSmrg]) 7854fda9279dSmrg 7855fda9279dSmrg 7856fda9279dSmrg# _LT_PROG_REPLACE_SHELLFNS 7857fda9279dSmrg# ------------------------- 7858fda9279dSmrg# Replace existing portable implementations of several shell functions with 7859fda9279dSmrg# equivalent extended shell implementations where those features are available.. 7860fda9279dSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7861fda9279dSmrg[if test x"$xsi_shell" = xyes; then 7862fda9279dSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7863fda9279dSmrg case ${1} in 7864fda9279dSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7865fda9279dSmrg * ) func_dirname_result="${3}" ;; 7866fda9279dSmrg esac]) 7867fda9279dSmrg 7868fda9279dSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7869fda9279dSmrg func_basename_result="${1##*/}"]) 7870fda9279dSmrg 7871fda9279dSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7872fda9279dSmrg case ${1} in 7873fda9279dSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7874fda9279dSmrg * ) func_dirname_result="${3}" ;; 7875fda9279dSmrg esac 7876fda9279dSmrg func_basename_result="${1##*/}"]) 7877fda9279dSmrg 7878fda9279dSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7879fda9279dSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7880fda9279dSmrg # positional parameters, so assign one to ordinary parameter first. 7881fda9279dSmrg func_stripname_result=${3} 7882fda9279dSmrg func_stripname_result=${func_stripname_result#"${1}"} 7883fda9279dSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 7884fda9279dSmrg 7885fda9279dSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7886fda9279dSmrg func_split_long_opt_name=${1%%=*} 7887fda9279dSmrg func_split_long_opt_arg=${1#*=}]) 7888fda9279dSmrg 7889fda9279dSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7890fda9279dSmrg func_split_short_opt_arg=${1#??} 7891fda9279dSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7892fda9279dSmrg 7893fda9279dSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7894fda9279dSmrg case ${1} in 7895fda9279dSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7896fda9279dSmrg *) func_lo2o_result=${1} ;; 7897fda9279dSmrg esac]) 7898fda9279dSmrg 7899fda9279dSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7900fda9279dSmrg 7901fda9279dSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7902fda9279dSmrg 7903fda9279dSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7904fda9279dSmrgfi 7905fda9279dSmrg 7906fda9279dSmrgif test x"$lt_shell_append" = xyes; then 7907fda9279dSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7908fda9279dSmrg 7909fda9279dSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7910fda9279dSmrg func_quote_for_eval "${2}" 7911fda9279dSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7912fda9279dSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7913fda9279dSmrg 7914fda9279dSmrg # Save a `func_append' function call where possible by direct use of '+=' 7915fda9279dSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7916fda9279dSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7917fda9279dSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7918fda9279dSmrg test 0 -eq $? || _lt_function_replace_fail=: 7919fda9279dSmrgelse 7920fda9279dSmrg # Save a `func_append' function call even when '+=' is not available 7921fda9279dSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7922fda9279dSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7923fda9279dSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7924fda9279dSmrg test 0 -eq $? || _lt_function_replace_fail=: 7925fda9279dSmrgfi 7926fda9279dSmrg 7927fda9279dSmrgif test x"$_lt_function_replace_fail" = x":"; then 7928fda9279dSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7929fda9279dSmrgfi 7930fda9279dSmrg]) 7931fda9279dSmrg 7932fda9279dSmrg# _LT_PATH_CONVERSION_FUNCTIONS 7933fda9279dSmrg# ----------------------------- 7934fda9279dSmrg# Determine which file name conversion functions should be used by 7935fda9279dSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7936fda9279dSmrg# for certain cross-compile configurations and native mingw. 7937fda9279dSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7938fda9279dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7939fda9279dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7940fda9279dSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7941fda9279dSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7942fda9279dSmrg[case $host in 7943fda9279dSmrg *-*-mingw* ) 7944fda9279dSmrg case $build in 7945fda9279dSmrg *-*-mingw* ) # actually msys 7946fda9279dSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7947fda9279dSmrg ;; 7948fda9279dSmrg *-*-cygwin* ) 7949fda9279dSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7950fda9279dSmrg ;; 7951fda9279dSmrg * ) # otherwise, assume *nix 7952fda9279dSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7953fda9279dSmrg ;; 7954fda9279dSmrg esac 7955fda9279dSmrg ;; 7956fda9279dSmrg *-*-cygwin* ) 7957fda9279dSmrg case $build in 7958fda9279dSmrg *-*-mingw* ) # actually msys 7959fda9279dSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7960fda9279dSmrg ;; 7961fda9279dSmrg *-*-cygwin* ) 7962fda9279dSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 7963fda9279dSmrg ;; 7964fda9279dSmrg * ) # otherwise, assume *nix 7965fda9279dSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7966fda9279dSmrg ;; 7967fda9279dSmrg esac 7968fda9279dSmrg ;; 7969fda9279dSmrg * ) # unhandled hosts (and "normal" native builds) 7970fda9279dSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 7971fda9279dSmrg ;; 7972fda9279dSmrgesac 7973fda9279dSmrg]) 7974fda9279dSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7975fda9279dSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7976fda9279dSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7977fda9279dSmrg [0], [convert $build file names to $host format])dnl 7978fda9279dSmrg 7979fda9279dSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7980fda9279dSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7981fda9279dSmrg[#assume ordinary cross tools, or native build. 7982fda9279dSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 7983fda9279dSmrgcase $host in 7984fda9279dSmrg *-*-mingw* ) 7985fda9279dSmrg case $build in 7986fda9279dSmrg *-*-mingw* ) # actually msys 7987fda9279dSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7988fda9279dSmrg ;; 7989fda9279dSmrg esac 7990fda9279dSmrg ;; 7991fda9279dSmrgesac 7992fda9279dSmrg]) 7993fda9279dSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7994fda9279dSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7995fda9279dSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7996fda9279dSmrg [0], [convert $build files to toolchain format])dnl 7997fda9279dSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 7998fda9279dSmrg 7999fda9279dSmrg# Helper functions for option handling. -*- Autoconf -*- 8000fda9279dSmrg# 8001fda9279dSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 8002fda9279dSmrg# Inc. 8003fda9279dSmrg# Written by Gary V. Vaughan, 2004 8004fda9279dSmrg# 8005fda9279dSmrg# This file is free software; the Free Software Foundation gives 8006fda9279dSmrg# unlimited permission to copy and/or distribute it, with or without 8007fda9279dSmrg# modifications, as long as this notice is preserved. 8008fda9279dSmrg 8009fda9279dSmrg# serial 7 ltoptions.m4 8010fda9279dSmrg 8011fda9279dSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8012fda9279dSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8013fda9279dSmrg 8014fda9279dSmrg 8015fda9279dSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8016fda9279dSmrg# ------------------------------------------ 8017fda9279dSmrgm4_define([_LT_MANGLE_OPTION], 8018fda9279dSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8019fda9279dSmrg 8020fda9279dSmrg 8021fda9279dSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8022fda9279dSmrg# --------------------------------------- 8023fda9279dSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8024fda9279dSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8025fda9279dSmrg# saved as a flag. 8026fda9279dSmrgm4_define([_LT_SET_OPTION], 8027fda9279dSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8028fda9279dSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8029fda9279dSmrg _LT_MANGLE_DEFUN([$1], [$2]), 8030fda9279dSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 8031fda9279dSmrg]) 8032fda9279dSmrg 8033fda9279dSmrg 8034fda9279dSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8035fda9279dSmrg# ------------------------------------------------------------ 8036fda9279dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8037fda9279dSmrgm4_define([_LT_IF_OPTION], 8038fda9279dSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8039fda9279dSmrg 8040fda9279dSmrg 8041fda9279dSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8042fda9279dSmrg# ------------------------------------------------------- 8043fda9279dSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8044fda9279dSmrg# are set. 8045fda9279dSmrgm4_define([_LT_UNLESS_OPTIONS], 8046fda9279dSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8047fda9279dSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8048fda9279dSmrg [m4_define([$0_found])])])[]dnl 8049fda9279dSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8050fda9279dSmrg])[]dnl 8051fda9279dSmrg]) 8052fda9279dSmrg 8053fda9279dSmrg 8054fda9279dSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8055fda9279dSmrg# ---------------------------------------- 8056fda9279dSmrg# OPTION-LIST is a space-separated list of Libtool options associated 8057fda9279dSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8058fda9279dSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8059fda9279dSmrg# the unknown option and exit. 8060fda9279dSmrgm4_defun([_LT_SET_OPTIONS], 8061fda9279dSmrg[# Set options 8062fda9279dSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8063fda9279dSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 8064fda9279dSmrg 8065fda9279dSmrgm4_if([$1],[LT_INIT],[ 8066fda9279dSmrg dnl 8067fda9279dSmrg dnl Simply set some default values (i.e off) if boolean options were not 8068fda9279dSmrg dnl specified: 8069fda9279dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8070fda9279dSmrg ]) 8071fda9279dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8072fda9279dSmrg ]) 8073fda9279dSmrg dnl 8074fda9279dSmrg dnl If no reference was made to various pairs of opposing options, then 8075fda9279dSmrg dnl we run the default mode handler for the pair. For example, if neither 8076fda9279dSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 8077fda9279dSmrg dnl archives by default: 8078fda9279dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8079fda9279dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8080fda9279dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8081fda9279dSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8082fda9279dSmrg [_LT_ENABLE_FAST_INSTALL]) 8083fda9279dSmrg ]) 8084fda9279dSmrg])# _LT_SET_OPTIONS 8085fda9279dSmrg 8086fda9279dSmrg 8087fda9279dSmrg 8088fda9279dSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8089fda9279dSmrg# ----------------------------------------- 8090fda9279dSmrgm4_define([_LT_MANGLE_DEFUN], 8091fda9279dSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8092fda9279dSmrg 8093fda9279dSmrg 8094fda9279dSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8095fda9279dSmrg# ----------------------------------------------- 8096fda9279dSmrgm4_define([LT_OPTION_DEFINE], 8097fda9279dSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8098fda9279dSmrg])# LT_OPTION_DEFINE 8099fda9279dSmrg 8100fda9279dSmrg 8101fda9279dSmrg# dlopen 8102fda9279dSmrg# ------ 8103fda9279dSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8104fda9279dSmrg]) 8105fda9279dSmrg 8106fda9279dSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8107fda9279dSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8108fda9279dSmrgAC_DIAGNOSE([obsolete], 8109fda9279dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8110fda9279dSmrgput the `dlopen' option into LT_INIT's first parameter.]) 8111fda9279dSmrg]) 8112fda9279dSmrg 8113fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 8114fda9279dSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8115fda9279dSmrg 8116fda9279dSmrg 8117fda9279dSmrg# win32-dll 8118fda9279dSmrg# --------- 8119fda9279dSmrg# Declare package support for building win32 dll's. 8120fda9279dSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8121fda9279dSmrg[enable_win32_dll=yes 8122fda9279dSmrg 8123fda9279dSmrgcase $host in 8124fda9279dSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8125fda9279dSmrg AC_CHECK_TOOL(AS, as, false) 8126fda9279dSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8127fda9279dSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8128fda9279dSmrg ;; 8129fda9279dSmrgesac 8130fda9279dSmrg 8131fda9279dSmrgtest -z "$AS" && AS=as 8132fda9279dSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8133fda9279dSmrg 8134fda9279dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8135fda9279dSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8136fda9279dSmrg 8137fda9279dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8138fda9279dSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8139fda9279dSmrg])# win32-dll 8140fda9279dSmrg 8141fda9279dSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8142fda9279dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8143fda9279dSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8144fda9279dSmrgAC_DIAGNOSE([obsolete], 8145fda9279dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8146fda9279dSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 8147fda9279dSmrg]) 8148fda9279dSmrg 8149fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 8150fda9279dSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8151fda9279dSmrg 8152fda9279dSmrg 8153fda9279dSmrg# _LT_ENABLE_SHARED([DEFAULT]) 8154fda9279dSmrg# ---------------------------- 8155fda9279dSmrg# implement the --enable-shared flag, and supports the `shared' and 8156fda9279dSmrg# `disable-shared' LT_INIT options. 8157fda9279dSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8158fda9279dSmrgm4_define([_LT_ENABLE_SHARED], 8159fda9279dSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8160fda9279dSmrgAC_ARG_ENABLE([shared], 8161fda9279dSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8162fda9279dSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8163fda9279dSmrg [p=${PACKAGE-default} 8164fda9279dSmrg case $enableval in 8165fda9279dSmrg yes) enable_shared=yes ;; 8166fda9279dSmrg no) enable_shared=no ;; 8167fda9279dSmrg *) 8168fda9279dSmrg enable_shared=no 8169fda9279dSmrg # Look at the argument we got. We use all the common list separators. 8170fda9279dSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8171fda9279dSmrg for pkg in $enableval; do 8172fda9279dSmrg IFS="$lt_save_ifs" 8173fda9279dSmrg if test "X$pkg" = "X$p"; then 8174fda9279dSmrg enable_shared=yes 8175fda9279dSmrg fi 8176fda9279dSmrg done 8177fda9279dSmrg IFS="$lt_save_ifs" 8178fda9279dSmrg ;; 8179fda9279dSmrg esac], 8180fda9279dSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8181fda9279dSmrg 8182fda9279dSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8183fda9279dSmrg [Whether or not to build shared libraries]) 8184fda9279dSmrg])# _LT_ENABLE_SHARED 8185fda9279dSmrg 8186fda9279dSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8187fda9279dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8188fda9279dSmrg 8189fda9279dSmrg# Old names: 8190fda9279dSmrgAC_DEFUN([AC_ENABLE_SHARED], 8191fda9279dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8192fda9279dSmrg]) 8193fda9279dSmrg 8194fda9279dSmrgAC_DEFUN([AC_DISABLE_SHARED], 8195fda9279dSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8196fda9279dSmrg]) 8197fda9279dSmrg 8198fda9279dSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8199fda9279dSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8200fda9279dSmrg 8201fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 8202fda9279dSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8203fda9279dSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8204fda9279dSmrg 8205fda9279dSmrg 8206fda9279dSmrg 8207fda9279dSmrg# _LT_ENABLE_STATIC([DEFAULT]) 8208fda9279dSmrg# ---------------------------- 8209fda9279dSmrg# implement the --enable-static flag, and support the `static' and 8210fda9279dSmrg# `disable-static' LT_INIT options. 8211fda9279dSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8212fda9279dSmrgm4_define([_LT_ENABLE_STATIC], 8213fda9279dSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8214fda9279dSmrgAC_ARG_ENABLE([static], 8215fda9279dSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8216fda9279dSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8217fda9279dSmrg [p=${PACKAGE-default} 8218fda9279dSmrg case $enableval in 8219fda9279dSmrg yes) enable_static=yes ;; 8220fda9279dSmrg no) enable_static=no ;; 8221fda9279dSmrg *) 8222fda9279dSmrg enable_static=no 8223fda9279dSmrg # Look at the argument we got. We use all the common list separators. 8224fda9279dSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8225fda9279dSmrg for pkg in $enableval; do 8226fda9279dSmrg IFS="$lt_save_ifs" 8227fda9279dSmrg if test "X$pkg" = "X$p"; then 8228fda9279dSmrg enable_static=yes 8229fda9279dSmrg fi 8230fda9279dSmrg done 8231fda9279dSmrg IFS="$lt_save_ifs" 8232fda9279dSmrg ;; 8233fda9279dSmrg esac], 8234fda9279dSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8235fda9279dSmrg 8236fda9279dSmrg _LT_DECL([build_old_libs], [enable_static], [0], 8237fda9279dSmrg [Whether or not to build static libraries]) 8238fda9279dSmrg])# _LT_ENABLE_STATIC 8239fda9279dSmrg 8240fda9279dSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8241fda9279dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8242fda9279dSmrg 8243fda9279dSmrg# Old names: 8244fda9279dSmrgAC_DEFUN([AC_ENABLE_STATIC], 8245fda9279dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8246fda9279dSmrg]) 8247fda9279dSmrg 8248fda9279dSmrgAC_DEFUN([AC_DISABLE_STATIC], 8249fda9279dSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8250fda9279dSmrg]) 8251fda9279dSmrg 8252fda9279dSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8253fda9279dSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8254fda9279dSmrg 8255fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 8256fda9279dSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8257fda9279dSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8258fda9279dSmrg 8259fda9279dSmrg 8260fda9279dSmrg 8261fda9279dSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8262fda9279dSmrg# ---------------------------------- 8263fda9279dSmrg# implement the --enable-fast-install flag, and support the `fast-install' 8264fda9279dSmrg# and `disable-fast-install' LT_INIT options. 8265fda9279dSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8266fda9279dSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 8267fda9279dSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8268fda9279dSmrgAC_ARG_ENABLE([fast-install], 8269fda9279dSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8270fda9279dSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8271fda9279dSmrg [p=${PACKAGE-default} 8272fda9279dSmrg case $enableval in 8273fda9279dSmrg yes) enable_fast_install=yes ;; 8274fda9279dSmrg no) enable_fast_install=no ;; 8275fda9279dSmrg *) 8276fda9279dSmrg enable_fast_install=no 8277fda9279dSmrg # Look at the argument we got. We use all the common list separators. 8278fda9279dSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8279fda9279dSmrg for pkg in $enableval; do 8280fda9279dSmrg IFS="$lt_save_ifs" 8281fda9279dSmrg if test "X$pkg" = "X$p"; then 8282fda9279dSmrg enable_fast_install=yes 8283fda9279dSmrg fi 8284fda9279dSmrg done 8285fda9279dSmrg IFS="$lt_save_ifs" 8286fda9279dSmrg ;; 8287fda9279dSmrg esac], 8288fda9279dSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8289fda9279dSmrg 8290fda9279dSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 8291fda9279dSmrg [Whether or not to optimize for fast installation])dnl 8292fda9279dSmrg])# _LT_ENABLE_FAST_INSTALL 8293fda9279dSmrg 8294fda9279dSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8295fda9279dSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8296fda9279dSmrg 8297fda9279dSmrg# Old names: 8298fda9279dSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8299fda9279dSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8300fda9279dSmrgAC_DIAGNOSE([obsolete], 8301fda9279dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8302fda9279dSmrgthe `fast-install' option into LT_INIT's first parameter.]) 8303fda9279dSmrg]) 8304fda9279dSmrg 8305fda9279dSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8306fda9279dSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8307fda9279dSmrgAC_DIAGNOSE([obsolete], 8308fda9279dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8309fda9279dSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 8310fda9279dSmrg]) 8311fda9279dSmrg 8312fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 8313fda9279dSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8314fda9279dSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8315fda9279dSmrg 8316fda9279dSmrg 8317fda9279dSmrg# _LT_WITH_PIC([MODE]) 8318fda9279dSmrg# -------------------- 8319fda9279dSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8320fda9279dSmrg# LT_INIT options. 8321fda9279dSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8322fda9279dSmrgm4_define([_LT_WITH_PIC], 8323fda9279dSmrg[AC_ARG_WITH([pic], 8324fda9279dSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8325fda9279dSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8326fda9279dSmrg [lt_p=${PACKAGE-default} 8327fda9279dSmrg case $withval in 8328fda9279dSmrg yes|no) pic_mode=$withval ;; 8329fda9279dSmrg *) 8330fda9279dSmrg pic_mode=default 8331fda9279dSmrg # Look at the argument we got. We use all the common list separators. 8332fda9279dSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8333fda9279dSmrg for lt_pkg in $withval; do 8334fda9279dSmrg IFS="$lt_save_ifs" 8335fda9279dSmrg if test "X$lt_pkg" = "X$lt_p"; then 8336fda9279dSmrg pic_mode=yes 8337fda9279dSmrg fi 8338fda9279dSmrg done 8339fda9279dSmrg IFS="$lt_save_ifs" 8340fda9279dSmrg ;; 8341fda9279dSmrg esac], 8342fda9279dSmrg [pic_mode=default]) 8343fda9279dSmrg 8344fda9279dSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8345fda9279dSmrg 8346fda9279dSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8347fda9279dSmrg])# _LT_WITH_PIC 8348fda9279dSmrg 8349fda9279dSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8350fda9279dSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8351fda9279dSmrg 8352fda9279dSmrg# Old name: 8353fda9279dSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8354fda9279dSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8355fda9279dSmrgAC_DIAGNOSE([obsolete], 8356fda9279dSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8357fda9279dSmrgput the `pic-only' option into LT_INIT's first parameter.]) 8358fda9279dSmrg]) 8359fda9279dSmrg 8360fda9279dSmrgdnl aclocal-1.4 backwards compatibility: 8361fda9279dSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8362fda9279dSmrg 8363fda9279dSmrg 8364fda9279dSmrgm4_define([_LTDL_MODE], []) 8365fda9279dSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8366fda9279dSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8367fda9279dSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8368fda9279dSmrg [m4_define([_LTDL_MODE], [recursive])]) 8369fda9279dSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8370fda9279dSmrg [m4_define([_LTDL_MODE], [subproject])]) 8371fda9279dSmrg 8372fda9279dSmrgm4_define([_LTDL_TYPE], []) 8373fda9279dSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8374fda9279dSmrg [m4_define([_LTDL_TYPE], [installable])]) 8375fda9279dSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8376fda9279dSmrg [m4_define([_LTDL_TYPE], [convenience])]) 8377fda9279dSmrg 8378fda9279dSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8379fda9279dSmrg# 8380fda9279dSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8381fda9279dSmrg# Written by Gary V. Vaughan, 2004 8382fda9279dSmrg# 8383fda9279dSmrg# This file is free software; the Free Software Foundation gives 8384fda9279dSmrg# unlimited permission to copy and/or distribute it, with or without 8385fda9279dSmrg# modifications, as long as this notice is preserved. 8386fda9279dSmrg 8387fda9279dSmrg# serial 6 ltsugar.m4 8388fda9279dSmrg 8389fda9279dSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8390fda9279dSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8391fda9279dSmrg 8392fda9279dSmrg 8393fda9279dSmrg# lt_join(SEP, ARG1, [ARG2...]) 8394fda9279dSmrg# ----------------------------- 8395fda9279dSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8396fda9279dSmrg# associated separator. 8397fda9279dSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8398fda9279dSmrg# versions in m4sugar had bugs. 8399fda9279dSmrgm4_define([lt_join], 8400fda9279dSmrg[m4_if([$#], [1], [], 8401fda9279dSmrg [$#], [2], [[$2]], 8402fda9279dSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8403fda9279dSmrgm4_define([_lt_join], 8404fda9279dSmrg[m4_if([$#$2], [2], [], 8405fda9279dSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8406fda9279dSmrg 8407fda9279dSmrg 8408fda9279dSmrg# lt_car(LIST) 8409fda9279dSmrg# lt_cdr(LIST) 8410fda9279dSmrg# ------------ 8411fda9279dSmrg# Manipulate m4 lists. 8412fda9279dSmrg# These macros are necessary as long as will still need to support 8413fda9279dSmrg# Autoconf-2.59 which quotes differently. 8414fda9279dSmrgm4_define([lt_car], [[$1]]) 8415fda9279dSmrgm4_define([lt_cdr], 8416fda9279dSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8417fda9279dSmrg [$#], 1, [], 8418fda9279dSmrg [m4_dquote(m4_shift($@))])]) 8419fda9279dSmrgm4_define([lt_unquote], $1) 8420fda9279dSmrg 8421fda9279dSmrg 8422fda9279dSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8423fda9279dSmrg# ------------------------------------------ 8424fda9279dSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8425fda9279dSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8426fda9279dSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8427fda9279dSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8428fda9279dSmrg# than defined and empty). 8429fda9279dSmrg# 8430fda9279dSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8431fda9279dSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8432fda9279dSmrgm4_define([lt_append], 8433fda9279dSmrg[m4_define([$1], 8434fda9279dSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8435fda9279dSmrg 8436fda9279dSmrg 8437fda9279dSmrg 8438fda9279dSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8439fda9279dSmrg# ---------------------------------------------------------- 8440fda9279dSmrg# Produce a SEP delimited list of all paired combinations of elements of 8441fda9279dSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8442fda9279dSmrg# has the form PREFIXmINFIXSUFFIXn. 8443fda9279dSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8444fda9279dSmrgm4_define([lt_combine], 8445fda9279dSmrg[m4_if(m4_eval([$# > 3]), [1], 8446fda9279dSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8447fda9279dSmrg[[m4_foreach([_Lt_prefix], [$2], 8448fda9279dSmrg [m4_foreach([_Lt_suffix], 8449fda9279dSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8450fda9279dSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8451fda9279dSmrg 8452fda9279dSmrg 8453fda9279dSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8454fda9279dSmrg# ----------------------------------------------------------------------- 8455fda9279dSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8456fda9279dSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8457fda9279dSmrgm4_define([lt_if_append_uniq], 8458fda9279dSmrg[m4_ifdef([$1], 8459fda9279dSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8460fda9279dSmrg [lt_append([$1], [$2], [$3])$4], 8461fda9279dSmrg [$5])], 8462fda9279dSmrg [lt_append([$1], [$2], [$3])$4])]) 8463fda9279dSmrg 8464fda9279dSmrg 8465fda9279dSmrg# lt_dict_add(DICT, KEY, VALUE) 8466fda9279dSmrg# ----------------------------- 8467fda9279dSmrgm4_define([lt_dict_add], 8468fda9279dSmrg[m4_define([$1($2)], [$3])]) 8469fda9279dSmrg 8470fda9279dSmrg 8471fda9279dSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8472fda9279dSmrg# -------------------------------------------- 8473fda9279dSmrgm4_define([lt_dict_add_subkey], 8474fda9279dSmrg[m4_define([$1($2:$3)], [$4])]) 8475fda9279dSmrg 8476fda9279dSmrg 8477fda9279dSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8478fda9279dSmrg# ---------------------------------- 8479fda9279dSmrgm4_define([lt_dict_fetch], 8480fda9279dSmrg[m4_ifval([$3], 8481fda9279dSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8482fda9279dSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8483fda9279dSmrg 8484fda9279dSmrg 8485fda9279dSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8486fda9279dSmrg# ----------------------------------------------------------------- 8487fda9279dSmrgm4_define([lt_if_dict_fetch], 8488fda9279dSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8489fda9279dSmrg [$5], 8490fda9279dSmrg [$6])]) 8491fda9279dSmrg 8492fda9279dSmrg 8493fda9279dSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8494fda9279dSmrg# -------------------------------------------------------------- 8495fda9279dSmrgm4_define([lt_dict_filter], 8496fda9279dSmrg[m4_if([$5], [], [], 8497fda9279dSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8498fda9279dSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8499fda9279dSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8500fda9279dSmrg]) 8501fda9279dSmrg 8502fda9279dSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8503fda9279dSmrg# 8504fda9279dSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 8505fda9279dSmrg# Written by Scott James Remnant, 2004 8506fda9279dSmrg# 8507fda9279dSmrg# This file is free software; the Free Software Foundation gives 8508fda9279dSmrg# unlimited permission to copy and/or distribute it, with or without 8509fda9279dSmrg# modifications, as long as this notice is preserved. 8510fda9279dSmrg 8511fda9279dSmrg# @configure_input@ 8512fda9279dSmrg 8513fda9279dSmrg# serial 3337 ltversion.m4 8514fda9279dSmrg# This file is part of GNU Libtool 8515fda9279dSmrg 8516fda9279dSmrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 8517fda9279dSmrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 8518fda9279dSmrg 8519fda9279dSmrgAC_DEFUN([LTVERSION_VERSION], 8520fda9279dSmrg[macro_version='2.4.2' 8521fda9279dSmrgmacro_revision='1.3337' 8522fda9279dSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8523fda9279dSmrg_LT_DECL(, macro_revision, 0) 8524fda9279dSmrg]) 8525fda9279dSmrg 8526fda9279dSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8527fda9279dSmrg# 8528fda9279dSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8529fda9279dSmrg# Written by Scott James Remnant, 2004. 8530fda9279dSmrg# 8531fda9279dSmrg# This file is free software; the Free Software Foundation gives 8532fda9279dSmrg# unlimited permission to copy and/or distribute it, with or without 8533fda9279dSmrg# modifications, as long as this notice is preserved. 8534fda9279dSmrg 8535fda9279dSmrg# serial 5 lt~obsolete.m4 8536fda9279dSmrg 8537fda9279dSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 8538fda9279dSmrg# 8539fda9279dSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8540fda9279dSmrg# which have later been changed to m4_define as they aren't part of the 8541fda9279dSmrg# exported API, or moved to Autoconf or Automake where they belong. 8542fda9279dSmrg# 8543fda9279dSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8544fda9279dSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8545fda9279dSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 8546fda9279dSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8547fda9279dSmrg# and doesn't know about Autoconf macros at all.) 8548fda9279dSmrg# 8549fda9279dSmrg# So we provide this file, which has a silly filename so it's always 8550fda9279dSmrg# included after everything else. This provides aclocal with the 8551fda9279dSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8552fda9279dSmrg# because those macros already exist, or will be overwritten later. 8553fda9279dSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8554fda9279dSmrg# 8555fda9279dSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8556fda9279dSmrg# Yes, that means every name once taken will need to remain here until 8557fda9279dSmrg# we give up compatibility with versions before 1.7, at which point 8558fda9279dSmrg# we need to keep only those names which we still refer to. 8559fda9279dSmrg 8560fda9279dSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8561fda9279dSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8562fda9279dSmrg 8563fda9279dSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8564fda9279dSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8565fda9279dSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8566fda9279dSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8567fda9279dSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8568fda9279dSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8569fda9279dSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8570fda9279dSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8571fda9279dSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8572fda9279dSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8573fda9279dSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8574fda9279dSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8575fda9279dSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8576fda9279dSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8577fda9279dSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8578fda9279dSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8579fda9279dSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8580fda9279dSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8581fda9279dSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8582fda9279dSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8583fda9279dSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8584fda9279dSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8585fda9279dSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8586fda9279dSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8587fda9279dSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8588fda9279dSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8589fda9279dSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8590fda9279dSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8591fda9279dSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8592fda9279dSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8593fda9279dSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8594fda9279dSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8595fda9279dSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8596fda9279dSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8597fda9279dSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8598fda9279dSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8599fda9279dSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8600fda9279dSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8601fda9279dSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8602fda9279dSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8603fda9279dSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8604fda9279dSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8605fda9279dSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8606fda9279dSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8607fda9279dSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8608fda9279dSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8609fda9279dSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8610fda9279dSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8611fda9279dSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8612fda9279dSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8613fda9279dSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8614fda9279dSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8615fda9279dSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8616fda9279dSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8617fda9279dSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8618fda9279dSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8619fda9279dSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8620fda9279dSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8621fda9279dSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8622fda9279dSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8623fda9279dSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8624fda9279dSmrg 8625fda9279dSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8626fda9279dSmrg# serial 1 (pkg-config-0.24) 8627fda9279dSmrg# 8628fda9279dSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8629fda9279dSmrg# 8630fda9279dSmrg# This program is free software; you can redistribute it and/or modify 8631fda9279dSmrg# it under the terms of the GNU General Public License as published by 8632fda9279dSmrg# the Free Software Foundation; either version 2 of the License, or 8633fda9279dSmrg# (at your option) any later version. 8634fda9279dSmrg# 8635fda9279dSmrg# This program is distributed in the hope that it will be useful, but 8636fda9279dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 8637fda9279dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8638fda9279dSmrg# General Public License for more details. 8639fda9279dSmrg# 8640fda9279dSmrg# You should have received a copy of the GNU General Public License 8641fda9279dSmrg# along with this program; if not, write to the Free Software 8642fda9279dSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8643fda9279dSmrg# 8644fda9279dSmrg# As a special exception to the GNU General Public License, if you 8645fda9279dSmrg# distribute this file as part of a program that contains a 8646fda9279dSmrg# configuration script generated by Autoconf, you may include it under 8647fda9279dSmrg# the same distribution terms that you use for the rest of that program. 8648fda9279dSmrg 8649fda9279dSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8650fda9279dSmrg# ---------------------------------- 8651fda9279dSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 8652fda9279dSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8653fda9279dSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 8654fda9279dSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 8655fda9279dSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8656fda9279dSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8657fda9279dSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8658fda9279dSmrg 8659fda9279dSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8660fda9279dSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8661fda9279dSmrgfi 8662fda9279dSmrgif test -n "$PKG_CONFIG"; then 8663fda9279dSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 8664fda9279dSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8665fda9279dSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8666fda9279dSmrg AC_MSG_RESULT([yes]) 8667fda9279dSmrg else 8668fda9279dSmrg AC_MSG_RESULT([no]) 8669fda9279dSmrg PKG_CONFIG="" 8670fda9279dSmrg fi 8671fda9279dSmrgfi[]dnl 8672fda9279dSmrg])# PKG_PROG_PKG_CONFIG 8673fda9279dSmrg 8674fda9279dSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8675fda9279dSmrg# 8676fda9279dSmrg# Check to see whether a particular set of modules exists. Similar 8677fda9279dSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8678fda9279dSmrg# 8679fda9279dSmrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8680fda9279dSmrg# only at the first occurence in configure.ac, so if the first place 8681fda9279dSmrg# it's called might be skipped (such as if it is within an "if", you 8682fda9279dSmrg# have to call PKG_CHECK_EXISTS manually 8683fda9279dSmrg# -------------------------------------------------------------- 8684fda9279dSmrgAC_DEFUN([PKG_CHECK_EXISTS], 8685fda9279dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8686fda9279dSmrgif test -n "$PKG_CONFIG" && \ 8687fda9279dSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8688fda9279dSmrg m4_default([$2], [:]) 8689fda9279dSmrgm4_ifvaln([$3], [else 8690fda9279dSmrg $3])dnl 8691fda9279dSmrgfi]) 8692fda9279dSmrg 8693fda9279dSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8694fda9279dSmrg# --------------------------------------------- 8695fda9279dSmrgm4_define([_PKG_CONFIG], 8696fda9279dSmrg[if test -n "$$1"; then 8697fda9279dSmrg pkg_cv_[]$1="$$1" 8698fda9279dSmrg elif test -n "$PKG_CONFIG"; then 8699fda9279dSmrg PKG_CHECK_EXISTS([$3], 8700fda9279dSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 8701fda9279dSmrg test "x$?" != "x0" && pkg_failed=yes ], 8702fda9279dSmrg [pkg_failed=yes]) 8703fda9279dSmrg else 8704fda9279dSmrg pkg_failed=untried 8705fda9279dSmrgfi[]dnl 8706fda9279dSmrg])# _PKG_CONFIG 8707fda9279dSmrg 8708fda9279dSmrg# _PKG_SHORT_ERRORS_SUPPORTED 8709fda9279dSmrg# ----------------------------- 8710fda9279dSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8711fda9279dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8712fda9279dSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8713fda9279dSmrg _pkg_short_errors_supported=yes 8714fda9279dSmrgelse 8715fda9279dSmrg _pkg_short_errors_supported=no 8716fda9279dSmrgfi[]dnl 8717fda9279dSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 8718fda9279dSmrg 8719fda9279dSmrg 8720fda9279dSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8721fda9279dSmrg# [ACTION-IF-NOT-FOUND]) 8722fda9279dSmrg# 8723fda9279dSmrg# 8724fda9279dSmrg# Note that if there is a possibility the first call to 8725fda9279dSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8726fda9279dSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8727fda9279dSmrg# 8728fda9279dSmrg# 8729fda9279dSmrg# -------------------------------------------------------------- 8730fda9279dSmrgAC_DEFUN([PKG_CHECK_MODULES], 8731fda9279dSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8732fda9279dSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8733fda9279dSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8734fda9279dSmrg 8735fda9279dSmrgpkg_failed=no 8736fda9279dSmrgAC_MSG_CHECKING([for $1]) 8737fda9279dSmrg 8738fda9279dSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8739fda9279dSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8740fda9279dSmrg 8741fda9279dSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8742fda9279dSmrgand $1[]_LIBS to avoid the need to call pkg-config. 8743fda9279dSmrgSee the pkg-config man page for more details.]) 8744fda9279dSmrg 8745fda9279dSmrgif test $pkg_failed = yes; then 8746fda9279dSmrg AC_MSG_RESULT([no]) 8747fda9279dSmrg _PKG_SHORT_ERRORS_SUPPORTED 8748fda9279dSmrg if test $_pkg_short_errors_supported = yes; then 8749fda9279dSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 8750fda9279dSmrg else 8751fda9279dSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 8752fda9279dSmrg fi 8753fda9279dSmrg # Put the nasty error message in config.log where it belongs 8754fda9279dSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8755fda9279dSmrg 8756fda9279dSmrg m4_default([$4], [AC_MSG_ERROR( 8757fda9279dSmrg[Package requirements ($2) were not met: 8758fda9279dSmrg 8759fda9279dSmrg$$1_PKG_ERRORS 8760fda9279dSmrg 8761fda9279dSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8762fda9279dSmrginstalled software in a non-standard prefix. 8763fda9279dSmrg 8764fda9279dSmrg_PKG_TEXT])[]dnl 8765fda9279dSmrg ]) 8766fda9279dSmrgelif test $pkg_failed = untried; then 8767fda9279dSmrg AC_MSG_RESULT([no]) 8768fda9279dSmrg m4_default([$4], [AC_MSG_FAILURE( 8769fda9279dSmrg[The pkg-config script could not be found or is too old. Make sure it 8770fda9279dSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 8771fda9279dSmrgpath to pkg-config. 8772fda9279dSmrg 8773fda9279dSmrg_PKG_TEXT 8774fda9279dSmrg 8775fda9279dSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 8776fda9279dSmrg ]) 8777fda9279dSmrgelse 8778fda9279dSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8779fda9279dSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8780fda9279dSmrg AC_MSG_RESULT([yes]) 8781fda9279dSmrg $3 8782fda9279dSmrgfi[]dnl 8783fda9279dSmrg])# PKG_CHECK_MODULES 8784fda9279dSmrg 8785fda9279dSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 8786fda9279dSmrgdnl 8787fda9279dSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 8788fda9279dSmrgdnl 8789fda9279dSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 8790fda9279dSmrgdnl copy of this software and associated documentation files (the "Software"), 8791fda9279dSmrgdnl to deal in the Software without restriction, including without limitation 8792fda9279dSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 8793fda9279dSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 8794fda9279dSmrgdnl Software is furnished to do so, subject to the following conditions: 8795fda9279dSmrgdnl 8796fda9279dSmrgdnl The above copyright notice and this permission notice (including the next 8797fda9279dSmrgdnl paragraph) shall be included in all copies or substantial portions of the 8798fda9279dSmrgdnl Software. 8799fda9279dSmrgdnl 8800fda9279dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 8801fda9279dSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 8802fda9279dSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 8803fda9279dSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 8804fda9279dSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 8805fda9279dSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 8806fda9279dSmrgdnl DEALINGS IN THE SOFTWARE. 8807fda9279dSmrg 8808fda9279dSmrg# XORG_MACROS_VERSION(required-version) 8809fda9279dSmrg# ------------------------------------- 8810fda9279dSmrg# Minimum version: 1.1.0 8811fda9279dSmrg# 8812fda9279dSmrg# If you're using a macro added in Version 1.1 or newer, include this in 8813fda9279dSmrg# your configure.ac with the minimum required version, such as: 8814fda9279dSmrg# XORG_MACROS_VERSION(1.1) 8815fda9279dSmrg# 8816fda9279dSmrg# To ensure that this macro is defined, also add: 8817fda9279dSmrg# m4_ifndef([XORG_MACROS_VERSION], 8818fda9279dSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8819fda9279dSmrg# 8820fda9279dSmrg# 8821fda9279dSmrg# See the "minimum version" comment for each macro you use to see what 8822fda9279dSmrg# version you require. 8823fda9279dSmrgm4_defun([XORG_MACROS_VERSION],[ 8824fda9279dSmrgm4_define([vers_have], [1.17]) 8825fda9279dSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 8826fda9279dSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 8827fda9279dSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 8828fda9279dSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 8829fda9279dSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 8830fda9279dSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 8831fda9279dSmrgm4_undefine([vers_have]) 8832fda9279dSmrgm4_undefine([maj_have]) 8833fda9279dSmrgm4_undefine([maj_needed]) 8834fda9279dSmrg]) # XORG_MACROS_VERSION 8835fda9279dSmrg 8836fda9279dSmrg# XORG_PROG_RAWCPP() 8837fda9279dSmrg# ------------------ 8838fda9279dSmrg# Minimum version: 1.0.0 8839fda9279dSmrg# 8840fda9279dSmrg# Find cpp program and necessary flags for use in pre-processing text files 8841fda9279dSmrg# such as man pages and config files 8842fda9279dSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 8843fda9279dSmrgAC_REQUIRE([AC_PROG_CPP]) 8844fda9279dSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 8845fda9279dSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8846fda9279dSmrg 8847fda9279dSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 8848fda9279dSmrg# which is not the best choice for supporting other OS'es, but covers most 8849fda9279dSmrg# of the ones we need for now. 8850fda9279dSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8851fda9279dSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 8852fda9279dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8853fda9279dSmrg AC_MSG_RESULT([no]) 8854fda9279dSmrgelse 8855fda9279dSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8856fda9279dSmrg RAWCPPFLAGS=-undef 8857fda9279dSmrg AC_MSG_RESULT([yes]) 8858fda9279dSmrg # under Cygwin unix is still defined even with -undef 8859fda9279dSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8860fda9279dSmrg RAWCPPFLAGS="-undef -ansi" 8861fda9279dSmrg AC_MSG_RESULT([yes, with -ansi]) 8862fda9279dSmrg else 8863fda9279dSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8864fda9279dSmrg fi 8865fda9279dSmrgfi 8866fda9279dSmrgrm -f conftest.$ac_ext 8867fda9279dSmrg 8868fda9279dSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8869fda9279dSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 8870fda9279dSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8871fda9279dSmrg AC_MSG_RESULT([no]) 8872fda9279dSmrgelse 8873fda9279dSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8874fda9279dSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 8875fda9279dSmrg AC_MSG_RESULT([yes]) 8876fda9279dSmrg else 8877fda9279dSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8878fda9279dSmrg fi 8879fda9279dSmrgfi 8880fda9279dSmrgrm -f conftest.$ac_ext 8881fda9279dSmrgAC_SUBST(RAWCPPFLAGS) 8882fda9279dSmrg]) # XORG_PROG_RAWCPP 8883fda9279dSmrg 8884fda9279dSmrg# XORG_MANPAGE_SECTIONS() 8885fda9279dSmrg# ----------------------- 8886fda9279dSmrg# Minimum version: 1.0.0 8887fda9279dSmrg# 8888fda9279dSmrg# Determine which sections man pages go in for the different man page types 8889fda9279dSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8890fda9279dSmrg# Not sure if there's any better way than just hardcoding by OS name. 8891fda9279dSmrg# Override default settings by setting environment variables 8892fda9279dSmrg# Added MAN_SUBSTS in version 1.8 8893fda9279dSmrg# Added AC_PROG_SED in version 1.8 8894fda9279dSmrg 8895fda9279dSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 8896fda9279dSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 8897fda9279dSmrgAC_REQUIRE([AC_PROG_SED]) 8898fda9279dSmrg 8899fda9279dSmrgif test x$APP_MAN_SUFFIX = x ; then 8900fda9279dSmrg APP_MAN_SUFFIX=1 8901fda9279dSmrgfi 8902fda9279dSmrgif test x$APP_MAN_DIR = x ; then 8903fda9279dSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8904fda9279dSmrgfi 8905fda9279dSmrg 8906fda9279dSmrgif test x$LIB_MAN_SUFFIX = x ; then 8907fda9279dSmrg LIB_MAN_SUFFIX=3 8908fda9279dSmrgfi 8909fda9279dSmrgif test x$LIB_MAN_DIR = x ; then 8910fda9279dSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 8911fda9279dSmrgfi 8912fda9279dSmrg 8913fda9279dSmrgif test x$FILE_MAN_SUFFIX = x ; then 8914fda9279dSmrg case $host_os in 8915fda9279dSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 8916fda9279dSmrg *) FILE_MAN_SUFFIX=5 ;; 8917fda9279dSmrg esac 8918fda9279dSmrgfi 8919fda9279dSmrgif test x$FILE_MAN_DIR = x ; then 8920fda9279dSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8921fda9279dSmrgfi 8922fda9279dSmrg 8923fda9279dSmrgif test x$MISC_MAN_SUFFIX = x ; then 8924fda9279dSmrg case $host_os in 8925fda9279dSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 8926fda9279dSmrg *) MISC_MAN_SUFFIX=7 ;; 8927fda9279dSmrg esac 8928fda9279dSmrgfi 8929fda9279dSmrgif test x$MISC_MAN_DIR = x ; then 8930fda9279dSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8931fda9279dSmrgfi 8932fda9279dSmrg 8933fda9279dSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 8934fda9279dSmrg case $host_os in 8935fda9279dSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 8936fda9279dSmrg *) DRIVER_MAN_SUFFIX=4 ;; 8937fda9279dSmrg esac 8938fda9279dSmrgfi 8939fda9279dSmrgif test x$DRIVER_MAN_DIR = x ; then 8940fda9279dSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 8941fda9279dSmrgfi 8942fda9279dSmrg 8943fda9279dSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 8944fda9279dSmrg case $host_os in 8945fda9279dSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 8946fda9279dSmrg *) ADMIN_MAN_SUFFIX=8 ;; 8947fda9279dSmrg esac 8948fda9279dSmrgfi 8949fda9279dSmrgif test x$ADMIN_MAN_DIR = x ; then 8950fda9279dSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 8951fda9279dSmrgfi 8952fda9279dSmrg 8953fda9279dSmrg 8954fda9279dSmrgAC_SUBST([APP_MAN_SUFFIX]) 8955fda9279dSmrgAC_SUBST([LIB_MAN_SUFFIX]) 8956fda9279dSmrgAC_SUBST([FILE_MAN_SUFFIX]) 8957fda9279dSmrgAC_SUBST([MISC_MAN_SUFFIX]) 8958fda9279dSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 8959fda9279dSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 8960fda9279dSmrgAC_SUBST([APP_MAN_DIR]) 8961fda9279dSmrgAC_SUBST([LIB_MAN_DIR]) 8962fda9279dSmrgAC_SUBST([FILE_MAN_DIR]) 8963fda9279dSmrgAC_SUBST([MISC_MAN_DIR]) 8964fda9279dSmrgAC_SUBST([DRIVER_MAN_DIR]) 8965fda9279dSmrgAC_SUBST([ADMIN_MAN_DIR]) 8966fda9279dSmrg 8967fda9279dSmrgXORG_MAN_PAGE="X Version 11" 8968fda9279dSmrgAC_SUBST([XORG_MAN_PAGE]) 8969fda9279dSmrgMAN_SUBSTS="\ 8970fda9279dSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8971fda9279dSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8972fda9279dSmrg -e 's|__xservername__|Xorg|g' \ 8973fda9279dSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 8974fda9279dSmrg -e 's|__projectroot__|\$(prefix)|g' \ 8975fda9279dSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 8976fda9279dSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 8977fda9279dSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 8978fda9279dSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 8979fda9279dSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 8980fda9279dSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 8981fda9279dSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 8982fda9279dSmrgAC_SUBST([MAN_SUBSTS]) 8983fda9279dSmrg 8984fda9279dSmrg]) # XORG_MANPAGE_SECTIONS 8985fda9279dSmrg 8986fda9279dSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 8987fda9279dSmrg# ------------------------ 8988fda9279dSmrg# Minimum version: 1.7.0 8989fda9279dSmrg# 8990fda9279dSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 8991fda9279dSmrg# provided by xorg-sgml-doctools, if installed. 8992fda9279dSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 8993fda9279dSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 8994fda9279dSmrgXORG_SGML_PATH= 8995fda9279dSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 8996fda9279dSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 8997fda9279dSmrg [m4_ifval([$1],[:], 8998fda9279dSmrg [if test x"$cross_compiling" != x"yes" ; then 8999fda9279dSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9000fda9279dSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 9001fda9279dSmrg fi]) 9002fda9279dSmrg ]) 9003fda9279dSmrg 9004fda9279dSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9005fda9279dSmrg# the path and the name of the doc stylesheet 9006fda9279dSmrgif test "x$XORG_SGML_PATH" != "x" ; then 9007fda9279dSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9008fda9279dSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9009fda9279dSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9010fda9279dSmrgelse 9011fda9279dSmrg AC_MSG_RESULT([no]) 9012fda9279dSmrgfi 9013fda9279dSmrg 9014fda9279dSmrgAC_SUBST(XORG_SGML_PATH) 9015fda9279dSmrgAC_SUBST(STYLESHEET_SRCDIR) 9016fda9279dSmrgAC_SUBST(XSL_STYLESHEET) 9017fda9279dSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9018fda9279dSmrg]) # XORG_CHECK_SGML_DOCTOOLS 9019fda9279dSmrg 9020fda9279dSmrg# XORG_CHECK_LINUXDOC 9021fda9279dSmrg# ------------------- 9022fda9279dSmrg# Minimum version: 1.0.0 9023fda9279dSmrg# 9024fda9279dSmrg# Defines the variable MAKE_TEXT if the necessary tools and 9025fda9279dSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9026fda9279dSmrg# Whether or not the necessary tools and files are found can be checked 9027fda9279dSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9028fda9279dSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9029fda9279dSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9030fda9279dSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9031fda9279dSmrg 9032fda9279dSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9033fda9279dSmrg 9034fda9279dSmrgAC_MSG_CHECKING([whether to build documentation]) 9035fda9279dSmrg 9036fda9279dSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9037fda9279dSmrg BUILDDOC=yes 9038fda9279dSmrgelse 9039fda9279dSmrg BUILDDOC=no 9040fda9279dSmrgfi 9041fda9279dSmrg 9042fda9279dSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9043fda9279dSmrg 9044fda9279dSmrgAC_MSG_RESULT([$BUILDDOC]) 9045fda9279dSmrg 9046fda9279dSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9047fda9279dSmrg 9048fda9279dSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9049fda9279dSmrg BUILDPDFDOC=yes 9050fda9279dSmrgelse 9051fda9279dSmrg BUILDPDFDOC=no 9052fda9279dSmrgfi 9053fda9279dSmrg 9054fda9279dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9055fda9279dSmrg 9056fda9279dSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9057fda9279dSmrg 9058fda9279dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9059fda9279dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9060fda9279dSmrgMAKE_PDF="$PS2PDF" 9061fda9279dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9062fda9279dSmrg 9063fda9279dSmrgAC_SUBST(MAKE_TEXT) 9064fda9279dSmrgAC_SUBST(MAKE_PS) 9065fda9279dSmrgAC_SUBST(MAKE_PDF) 9066fda9279dSmrgAC_SUBST(MAKE_HTML) 9067fda9279dSmrg]) # XORG_CHECK_LINUXDOC 9068fda9279dSmrg 9069fda9279dSmrg# XORG_CHECK_DOCBOOK 9070fda9279dSmrg# ------------------- 9071fda9279dSmrg# Minimum version: 1.0.0 9072fda9279dSmrg# 9073fda9279dSmrg# Checks for the ability to build output formats from SGML DocBook source. 9074fda9279dSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9075fda9279dSmrg# indicates whether the necessary tools and files are found and, if set, 9076fda9279dSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9077fda9279dSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9078fda9279dSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9079fda9279dSmrg 9080fda9279dSmrgBUILDTXTDOC=no 9081fda9279dSmrgBUILDPDFDOC=no 9082fda9279dSmrgBUILDPSDOC=no 9083fda9279dSmrgBUILDHTMLDOC=no 9084fda9279dSmrg 9085fda9279dSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9086fda9279dSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9087fda9279dSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9088fda9279dSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9089fda9279dSmrg 9090fda9279dSmrgAC_MSG_CHECKING([whether to build text documentation]) 9091fda9279dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9092fda9279dSmrg test x$BUILD_TXTDOC != xno; then 9093fda9279dSmrg BUILDTXTDOC=yes 9094fda9279dSmrgfi 9095fda9279dSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9096fda9279dSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9097fda9279dSmrg 9098fda9279dSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9099fda9279dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9100fda9279dSmrg test x$BUILD_PDFDOC != xno; then 9101fda9279dSmrg BUILDPDFDOC=yes 9102fda9279dSmrgfi 9103fda9279dSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9104fda9279dSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9105fda9279dSmrg 9106fda9279dSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9107fda9279dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9108fda9279dSmrg test x$BUILD_PSDOC != xno; then 9109fda9279dSmrg BUILDPSDOC=yes 9110fda9279dSmrgfi 9111fda9279dSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9112fda9279dSmrgAC_MSG_RESULT([$BUILDPSDOC]) 9113fda9279dSmrg 9114fda9279dSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9115fda9279dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9116fda9279dSmrg test x$BUILD_HTMLDOC != xno; then 9117fda9279dSmrg BUILDHTMLDOC=yes 9118fda9279dSmrgfi 9119fda9279dSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9120fda9279dSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9121fda9279dSmrg 9122fda9279dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9123fda9279dSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9124fda9279dSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9125fda9279dSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9126fda9279dSmrg 9127fda9279dSmrgAC_SUBST(MAKE_TEXT) 9128fda9279dSmrgAC_SUBST(MAKE_PS) 9129fda9279dSmrgAC_SUBST(MAKE_PDF) 9130fda9279dSmrgAC_SUBST(MAKE_HTML) 9131fda9279dSmrg]) # XORG_CHECK_DOCBOOK 9132fda9279dSmrg 9133fda9279dSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9134fda9279dSmrg# ---------------- 9135fda9279dSmrg# Minimum version: 1.5.0 9136fda9279dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9137fda9279dSmrg# 9138fda9279dSmrg# Documentation tools are not always available on all platforms and sometimes 9139fda9279dSmrg# not at the appropriate level. This macro enables a module to test for the 9140fda9279dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9141fda9279dSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9142fda9279dSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9143fda9279dSmrg# --with-xmlto assumes 'auto'. 9144fda9279dSmrg# 9145fda9279dSmrg# Interface to module: 9146fda9279dSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9147fda9279dSmrg# XMLTO: returns the path of the xmlto program found 9148fda9279dSmrg# returns the path set by the user in the environment 9149fda9279dSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9150fda9279dSmrg# 'no' user instructs the module not to use xmlto 9151fda9279dSmrg# 9152fda9279dSmrg# Added in version 1.10.0 9153fda9279dSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9154fda9279dSmrg# xmlto for text output requires either lynx, links, or w3m browsers 9155fda9279dSmrg# 9156fda9279dSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9157fda9279dSmrg# 9158fda9279dSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9159fda9279dSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9160fda9279dSmrgm4_define([_defopt], m4_default([$2], [auto])) 9161fda9279dSmrgAC_ARG_WITH(xmlto, 9162fda9279dSmrg AS_HELP_STRING([--with-xmlto], 9163fda9279dSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9164fda9279dSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9165fda9279dSmrgm4_undefine([_defopt]) 9166fda9279dSmrg 9167fda9279dSmrgif test "x$use_xmlto" = x"auto"; then 9168fda9279dSmrg AC_PATH_PROG([XMLTO], [xmlto]) 9169fda9279dSmrg if test "x$XMLTO" = "x"; then 9170fda9279dSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9171fda9279dSmrg have_xmlto=no 9172fda9279dSmrg else 9173fda9279dSmrg have_xmlto=yes 9174fda9279dSmrg fi 9175fda9279dSmrgelif test "x$use_xmlto" = x"yes" ; then 9176fda9279dSmrg AC_PATH_PROG([XMLTO], [xmlto]) 9177fda9279dSmrg if test "x$XMLTO" = "x"; then 9178fda9279dSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9179fda9279dSmrg fi 9180fda9279dSmrg have_xmlto=yes 9181fda9279dSmrgelif test "x$use_xmlto" = x"no" ; then 9182fda9279dSmrg if test "x$XMLTO" != "x"; then 9183fda9279dSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9184fda9279dSmrg fi 9185fda9279dSmrg have_xmlto=no 9186fda9279dSmrgelse 9187fda9279dSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9188fda9279dSmrgfi 9189fda9279dSmrg 9190fda9279dSmrg# Test for a minimum version of xmlto, if provided. 9191fda9279dSmrgm4_ifval([$1], 9192fda9279dSmrg[if test "$have_xmlto" = yes; then 9193fda9279dSmrg # scrape the xmlto version 9194fda9279dSmrg AC_MSG_CHECKING([the xmlto version]) 9195fda9279dSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9196fda9279dSmrg AC_MSG_RESULT([$xmlto_version]) 9197fda9279dSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9198fda9279dSmrg [if test "x$use_xmlto" = xauto; then 9199fda9279dSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9200fda9279dSmrg have_xmlto=no 9201fda9279dSmrg else 9202fda9279dSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9203fda9279dSmrg fi]) 9204fda9279dSmrgfi]) 9205fda9279dSmrg 9206fda9279dSmrg# Test for the ability of xmlto to generate a text target 9207fda9279dSmrghave_xmlto_text=no 9208fda9279dSmrgcat > conftest.xml << "EOF" 9209fda9279dSmrgEOF 9210fda9279dSmrgAS_IF([test "$have_xmlto" = yes], 9211fda9279dSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9212fda9279dSmrg [have_xmlto_text=yes], 9213fda9279dSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9214fda9279dSmrgrm -f conftest.xml 9215fda9279dSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9216fda9279dSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9217fda9279dSmrg]) # XORG_WITH_XMLTO 9218fda9279dSmrg 9219fda9279dSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9220fda9279dSmrg# -------------------------------------------- 9221fda9279dSmrg# Minimum version: 1.12.0 9222fda9279dSmrg# Minimum version for optional DEFAULT argument: 1.12.0 9223fda9279dSmrg# 9224fda9279dSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9225fda9279dSmrg# XML-based language used for the transformation of XML documents. 9226fda9279dSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9227fda9279dSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9228fda9279dSmrg# The XSLT processor is often used as a standalone tool for transformations. 9229fda9279dSmrg# It should not be assumed that this tool is used only to work with documnetation. 9230fda9279dSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9231fda9279dSmrg# 9232fda9279dSmrg# Interface to module: 9233fda9279dSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9234fda9279dSmrg# XSLTPROC: returns the path of the xsltproc program found 9235fda9279dSmrg# returns the path set by the user in the environment 9236fda9279dSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9237fda9279dSmrg# 'no' user instructs the module not to use xsltproc 9238fda9279dSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9239fda9279dSmrg# 9240fda9279dSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9241fda9279dSmrg# 9242fda9279dSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9243fda9279dSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9244fda9279dSmrg# Preserves the interface, should it be implemented later 9245fda9279dSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9246fda9279dSmrgm4_define([_defopt], m4_default([$2], [auto])) 9247fda9279dSmrgAC_ARG_WITH(xsltproc, 9248fda9279dSmrg AS_HELP_STRING([--with-xsltproc], 9249fda9279dSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9250fda9279dSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9251fda9279dSmrgm4_undefine([_defopt]) 9252fda9279dSmrg 9253fda9279dSmrgif test "x$use_xsltproc" = x"auto"; then 9254fda9279dSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9255fda9279dSmrg if test "x$XSLTPROC" = "x"; then 9256fda9279dSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9257fda9279dSmrg have_xsltproc=no 9258fda9279dSmrg else 9259fda9279dSmrg have_xsltproc=yes 9260fda9279dSmrg fi 9261fda9279dSmrgelif test "x$use_xsltproc" = x"yes" ; then 9262fda9279dSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9263fda9279dSmrg if test "x$XSLTPROC" = "x"; then 9264fda9279dSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9265fda9279dSmrg fi 9266fda9279dSmrg have_xsltproc=yes 9267fda9279dSmrgelif test "x$use_xsltproc" = x"no" ; then 9268fda9279dSmrg if test "x$XSLTPROC" != "x"; then 9269fda9279dSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9270fda9279dSmrg fi 9271fda9279dSmrg have_xsltproc=no 9272fda9279dSmrgelse 9273fda9279dSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9274fda9279dSmrgfi 9275fda9279dSmrg 9276fda9279dSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9277fda9279dSmrg]) # XORG_WITH_XSLTPROC 9278fda9279dSmrg 9279fda9279dSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9280fda9279dSmrg# ---------------------------------------- 9281fda9279dSmrg# Minimum version: 1.15.0 9282fda9279dSmrg# 9283fda9279dSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 9284fda9279dSmrg# scanning arbitrary text files, extracting information from those text files, 9285fda9279dSmrg# and printing reports based on that information. 9286fda9279dSmrg# 9287fda9279dSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9288fda9279dSmrg# 9289fda9279dSmrg# Interface to module: 9290fda9279dSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 9291fda9279dSmrg# PERL: returns the path of the perl program found 9292fda9279dSmrg# returns the path set by the user in the environment 9293fda9279dSmrg# --with-perl: 'yes' user instructs the module to use perl 9294fda9279dSmrg# 'no' user instructs the module not to use perl 9295fda9279dSmrg# have_perl: returns yes if perl found in PATH or no 9296fda9279dSmrg# 9297fda9279dSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9298fda9279dSmrg# 9299fda9279dSmrgAC_DEFUN([XORG_WITH_PERL],[ 9300fda9279dSmrgAC_ARG_VAR([PERL], [Path to perl command]) 9301fda9279dSmrg# Preserves the interface, should it be implemented later 9302fda9279dSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9303fda9279dSmrgm4_define([_defopt], m4_default([$2], [auto])) 9304fda9279dSmrgAC_ARG_WITH(perl, 9305fda9279dSmrg AS_HELP_STRING([--with-perl], 9306fda9279dSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 9307fda9279dSmrg [use_perl=$withval], [use_perl=]_defopt) 9308fda9279dSmrgm4_undefine([_defopt]) 9309fda9279dSmrg 9310fda9279dSmrgif test "x$use_perl" = x"auto"; then 9311fda9279dSmrg AC_PATH_PROG([PERL], [perl]) 9312fda9279dSmrg if test "x$PERL" = "x"; then 9313fda9279dSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9314fda9279dSmrg have_perl=no 9315fda9279dSmrg else 9316fda9279dSmrg have_perl=yes 9317fda9279dSmrg fi 9318fda9279dSmrgelif test "x$use_perl" = x"yes" ; then 9319fda9279dSmrg AC_PATH_PROG([PERL], [perl]) 9320fda9279dSmrg if test "x$PERL" = "x"; then 9321fda9279dSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9322fda9279dSmrg fi 9323fda9279dSmrg have_perl=yes 9324fda9279dSmrgelif test "x$use_perl" = x"no" ; then 9325fda9279dSmrg if test "x$PERL" != "x"; then 9326fda9279dSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9327fda9279dSmrg fi 9328fda9279dSmrg have_perl=no 9329fda9279dSmrgelse 9330fda9279dSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9331fda9279dSmrgfi 9332fda9279dSmrg 9333fda9279dSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9334fda9279dSmrg]) # XORG_WITH_PERL 9335fda9279dSmrg 9336fda9279dSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9337fda9279dSmrg# ---------------- 9338fda9279dSmrg# Minimum version: 1.5.0 9339fda9279dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9340fda9279dSmrg# 9341fda9279dSmrg# Documentation tools are not always available on all platforms and sometimes 9342fda9279dSmrg# not at the appropriate level. This macro enables a module to test for the 9343fda9279dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9344fda9279dSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9345fda9279dSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9346fda9279dSmrg# --with-asciidoc assumes 'auto'. 9347fda9279dSmrg# 9348fda9279dSmrg# Interface to module: 9349fda9279dSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9350fda9279dSmrg# ASCIIDOC: returns the path of the asciidoc program found 9351fda9279dSmrg# returns the path set by the user in the environment 9352fda9279dSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9353fda9279dSmrg# 'no' user instructs the module not to use asciidoc 9354fda9279dSmrg# 9355fda9279dSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9356fda9279dSmrg# 9357fda9279dSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9358fda9279dSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9359fda9279dSmrgm4_define([_defopt], m4_default([$2], [auto])) 9360fda9279dSmrgAC_ARG_WITH(asciidoc, 9361fda9279dSmrg AS_HELP_STRING([--with-asciidoc], 9362fda9279dSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9363fda9279dSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9364fda9279dSmrgm4_undefine([_defopt]) 9365fda9279dSmrg 9366fda9279dSmrgif test "x$use_asciidoc" = x"auto"; then 9367fda9279dSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9368fda9279dSmrg if test "x$ASCIIDOC" = "x"; then 9369fda9279dSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9370fda9279dSmrg have_asciidoc=no 9371fda9279dSmrg else 9372fda9279dSmrg have_asciidoc=yes 9373fda9279dSmrg fi 9374fda9279dSmrgelif test "x$use_asciidoc" = x"yes" ; then 9375fda9279dSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9376fda9279dSmrg if test "x$ASCIIDOC" = "x"; then 9377fda9279dSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9378fda9279dSmrg fi 9379fda9279dSmrg have_asciidoc=yes 9380fda9279dSmrgelif test "x$use_asciidoc" = x"no" ; then 9381fda9279dSmrg if test "x$ASCIIDOC" != "x"; then 9382fda9279dSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9383fda9279dSmrg fi 9384fda9279dSmrg have_asciidoc=no 9385fda9279dSmrgelse 9386fda9279dSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9387fda9279dSmrgfi 9388fda9279dSmrgm4_ifval([$1], 9389fda9279dSmrg[if test "$have_asciidoc" = yes; then 9390fda9279dSmrg # scrape the asciidoc version 9391fda9279dSmrg AC_MSG_CHECKING([the asciidoc version]) 9392fda9279dSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9393fda9279dSmrg AC_MSG_RESULT([$asciidoc_version]) 9394fda9279dSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9395fda9279dSmrg [if test "x$use_asciidoc" = xauto; then 9396fda9279dSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9397fda9279dSmrg have_asciidoc=no 9398fda9279dSmrg else 9399fda9279dSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9400fda9279dSmrg fi]) 9401fda9279dSmrgfi]) 9402fda9279dSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9403fda9279dSmrg]) # XORG_WITH_ASCIIDOC 9404fda9279dSmrg 9405fda9279dSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9406fda9279dSmrg# -------------------------------- 9407fda9279dSmrg# Minimum version: 1.5.0 9408fda9279dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9409fda9279dSmrg# 9410fda9279dSmrg# Documentation tools are not always available on all platforms and sometimes 9411fda9279dSmrg# not at the appropriate level. This macro enables a module to test for the 9412fda9279dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9413fda9279dSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9414fda9279dSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9415fda9279dSmrg# --with-doxygen assumes 'auto'. 9416fda9279dSmrg# 9417fda9279dSmrg# Interface to module: 9418fda9279dSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9419fda9279dSmrg# DOXYGEN: returns the path of the doxygen program found 9420fda9279dSmrg# returns the path set by the user in the environment 9421fda9279dSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9422fda9279dSmrg# 'no' user instructs the module not to use doxygen 9423fda9279dSmrg# 9424fda9279dSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9425fda9279dSmrg# 9426fda9279dSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9427fda9279dSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9428fda9279dSmrgm4_define([_defopt], m4_default([$2], [auto])) 9429fda9279dSmrgAC_ARG_WITH(doxygen, 9430fda9279dSmrg AS_HELP_STRING([--with-doxygen], 9431fda9279dSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9432fda9279dSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 9433fda9279dSmrgm4_undefine([_defopt]) 9434fda9279dSmrg 9435fda9279dSmrgif test "x$use_doxygen" = x"auto"; then 9436fda9279dSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9437fda9279dSmrg if test "x$DOXYGEN" = "x"; then 9438fda9279dSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9439fda9279dSmrg have_doxygen=no 9440fda9279dSmrg else 9441fda9279dSmrg have_doxygen=yes 9442fda9279dSmrg fi 9443fda9279dSmrgelif test "x$use_doxygen" = x"yes" ; then 9444fda9279dSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9445fda9279dSmrg if test "x$DOXYGEN" = "x"; then 9446fda9279dSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9447fda9279dSmrg fi 9448fda9279dSmrg have_doxygen=yes 9449fda9279dSmrgelif test "x$use_doxygen" = x"no" ; then 9450fda9279dSmrg if test "x$DOXYGEN" != "x"; then 9451fda9279dSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9452fda9279dSmrg fi 9453fda9279dSmrg have_doxygen=no 9454fda9279dSmrgelse 9455fda9279dSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9456fda9279dSmrgfi 9457fda9279dSmrgm4_ifval([$1], 9458fda9279dSmrg[if test "$have_doxygen" = yes; then 9459fda9279dSmrg # scrape the doxygen version 9460fda9279dSmrg AC_MSG_CHECKING([the doxygen version]) 9461fda9279dSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 9462fda9279dSmrg AC_MSG_RESULT([$doxygen_version]) 9463fda9279dSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 9464fda9279dSmrg [if test "x$use_doxygen" = xauto; then 9465fda9279dSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9466fda9279dSmrg have_doxygen=no 9467fda9279dSmrg else 9468fda9279dSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9469fda9279dSmrg fi]) 9470fda9279dSmrgfi]) 9471fda9279dSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9472fda9279dSmrg]) # XORG_WITH_DOXYGEN 9473fda9279dSmrg 9474fda9279dSmrg# XORG_WITH_GROFF([DEFAULT]) 9475fda9279dSmrg# ---------------- 9476fda9279dSmrg# Minimum version: 1.6.0 9477fda9279dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9478fda9279dSmrg# 9479fda9279dSmrg# Documentation tools are not always available on all platforms and sometimes 9480fda9279dSmrg# not at the appropriate level. This macro enables a module to test for the 9481fda9279dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9482fda9279dSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 9483fda9279dSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 9484fda9279dSmrg# --with-groff assumes 'auto'. 9485fda9279dSmrg# 9486fda9279dSmrg# Interface to module: 9487fda9279dSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 9488fda9279dSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 9489fda9279dSmrg# HAVE_GROFF_MS: the -ms macros package 9490fda9279dSmrg# GROFF: returns the path of the groff program found 9491fda9279dSmrg# returns the path set by the user in the environment 9492fda9279dSmrg# --with-groff: 'yes' user instructs the module to use groff 9493fda9279dSmrg# 'no' user instructs the module not to use groff 9494fda9279dSmrg# 9495fda9279dSmrg# Added in version 1.9.0: 9496fda9279dSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 9497fda9279dSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 9498fda9279dSmrg# psselect from the psutils package. 9499fda9279dSmrg# the ghostcript package. Refer to the grohtml man pages 9500fda9279dSmrg# 9501fda9279dSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 9502fda9279dSmrg# 9503fda9279dSmrg# OS and distros often splits groff in a basic and full package, the former 9504fda9279dSmrg# having the groff program and the later having devices, fonts and macros 9505fda9279dSmrg# Checking for the groff executable is not enough. 9506fda9279dSmrg# 9507fda9279dSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 9508fda9279dSmrg# unset HAVE_GROFF or GROFF env variables. 9509fda9279dSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 9510fda9279dSmrg# 9511fda9279dSmrgAC_DEFUN([XORG_WITH_GROFF],[ 9512fda9279dSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 9513fda9279dSmrgm4_define([_defopt], m4_default([$1], [auto])) 9514fda9279dSmrgAC_ARG_WITH(groff, 9515fda9279dSmrg AS_HELP_STRING([--with-groff], 9516fda9279dSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 9517fda9279dSmrg [use_groff=$withval], [use_groff=]_defopt) 9518fda9279dSmrgm4_undefine([_defopt]) 9519fda9279dSmrg 9520fda9279dSmrgif test "x$use_groff" = x"auto"; then 9521fda9279dSmrg AC_PATH_PROG([GROFF], [groff]) 9522fda9279dSmrg if test "x$GROFF" = "x"; then 9523fda9279dSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 9524fda9279dSmrg have_groff=no 9525fda9279dSmrg else 9526fda9279dSmrg have_groff=yes 9527fda9279dSmrg fi 9528fda9279dSmrgelif test "x$use_groff" = x"yes" ; then 9529fda9279dSmrg AC_PATH_PROG([GROFF], [groff]) 9530fda9279dSmrg if test "x$GROFF" = "x"; then 9531fda9279dSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 9532fda9279dSmrg fi 9533fda9279dSmrg have_groff=yes 9534fda9279dSmrgelif test "x$use_groff" = x"no" ; then 9535fda9279dSmrg if test "x$GROFF" != "x"; then 9536fda9279dSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 9537fda9279dSmrg fi 9538fda9279dSmrg have_groff=no 9539fda9279dSmrgelse 9540fda9279dSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 9541fda9279dSmrgfi 9542fda9279dSmrg 9543fda9279dSmrg# We have groff, test for the presence of the macro packages 9544fda9279dSmrgif test "x$have_groff" = x"yes"; then 9545fda9279dSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 9546fda9279dSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 9547fda9279dSmrg groff_ms_works=yes 9548fda9279dSmrg else 9549fda9279dSmrg groff_ms_works=no 9550fda9279dSmrg fi 9551fda9279dSmrg AC_MSG_RESULT([$groff_ms_works]) 9552fda9279dSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 9553fda9279dSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 9554fda9279dSmrg groff_mm_works=yes 9555fda9279dSmrg else 9556fda9279dSmrg groff_mm_works=no 9557fda9279dSmrg fi 9558fda9279dSmrg AC_MSG_RESULT([$groff_mm_works]) 9559fda9279dSmrgfi 9560fda9279dSmrg 9561fda9279dSmrg# We have groff, test for HTML dependencies, one command per package 9562fda9279dSmrgif test "x$have_groff" = x"yes"; then 9563fda9279dSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 9564fda9279dSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 9565fda9279dSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 9566fda9279dSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 9567fda9279dSmrg have_groff_html=yes 9568fda9279dSmrg else 9569fda9279dSmrg have_groff_html=no 9570fda9279dSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 9571fda9279dSmrg fi 9572fda9279dSmrgfi 9573fda9279dSmrg 9574fda9279dSmrg# Set Automake conditionals for Makefiles 9575fda9279dSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 9576fda9279dSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 9577fda9279dSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 9578fda9279dSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 9579fda9279dSmrg]) # XORG_WITH_GROFF 9580fda9279dSmrg 9581fda9279dSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 9582fda9279dSmrg# --------------------------------------- 9583fda9279dSmrg# Minimum version: 1.6.0 9584fda9279dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9585fda9279dSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 9586fda9279dSmrg# 9587fda9279dSmrg# Documentation tools are not always available on all platforms and sometimes 9588fda9279dSmrg# not at the appropriate level. This macro enables a module to test for the 9589fda9279dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9590fda9279dSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 9591fda9279dSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 9592fda9279dSmrg# --with-fop assumes 'auto'. 9593fda9279dSmrg# 9594fda9279dSmrg# Interface to module: 9595fda9279dSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 9596fda9279dSmrg# FOP: returns the path of the fop program found 9597fda9279dSmrg# returns the path set by the user in the environment 9598fda9279dSmrg# --with-fop: 'yes' user instructs the module to use fop 9599fda9279dSmrg# 'no' user instructs the module not to use fop 9600fda9279dSmrg# 9601fda9279dSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 9602fda9279dSmrg# 9603fda9279dSmrgAC_DEFUN([XORG_WITH_FOP],[ 9604fda9279dSmrgAC_ARG_VAR([FOP], [Path to fop command]) 9605fda9279dSmrgm4_define([_defopt], m4_default([$2], [auto])) 9606fda9279dSmrgAC_ARG_WITH(fop, 9607fda9279dSmrg AS_HELP_STRING([--with-fop], 9608fda9279dSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 9609fda9279dSmrg [use_fop=$withval], [use_fop=]_defopt) 9610fda9279dSmrgm4_undefine([_defopt]) 9611fda9279dSmrg 9612fda9279dSmrgif test "x$use_fop" = x"auto"; then 9613fda9279dSmrg AC_PATH_PROG([FOP], [fop]) 9614fda9279dSmrg if test "x$FOP" = "x"; then 9615fda9279dSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 9616fda9279dSmrg have_fop=no 9617fda9279dSmrg else 9618fda9279dSmrg have_fop=yes 9619fda9279dSmrg fi 9620fda9279dSmrgelif test "x$use_fop" = x"yes" ; then 9621fda9279dSmrg AC_PATH_PROG([FOP], [fop]) 9622fda9279dSmrg if test "x$FOP" = "x"; then 9623fda9279dSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 9624fda9279dSmrg fi 9625fda9279dSmrg have_fop=yes 9626fda9279dSmrgelif test "x$use_fop" = x"no" ; then 9627fda9279dSmrg if test "x$FOP" != "x"; then 9628fda9279dSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 9629fda9279dSmrg fi 9630fda9279dSmrg have_fop=no 9631fda9279dSmrgelse 9632fda9279dSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 9633fda9279dSmrgfi 9634fda9279dSmrg 9635fda9279dSmrg# Test for a minimum version of fop, if provided. 9636fda9279dSmrgm4_ifval([$1], 9637fda9279dSmrg[if test "$have_fop" = yes; then 9638fda9279dSmrg # scrape the fop version 9639fda9279dSmrg AC_MSG_CHECKING([for fop minimum version]) 9640fda9279dSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 9641fda9279dSmrg AC_MSG_RESULT([$fop_version]) 9642fda9279dSmrg AS_VERSION_COMPARE([$fop_version], [$1], 9643fda9279dSmrg [if test "x$use_fop" = xauto; then 9644fda9279dSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 9645fda9279dSmrg have_fop=no 9646fda9279dSmrg else 9647fda9279dSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 9648fda9279dSmrg fi]) 9649fda9279dSmrgfi]) 9650fda9279dSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 9651fda9279dSmrg]) # XORG_WITH_FOP 9652fda9279dSmrg 9653fda9279dSmrg# XORG_WITH_PS2PDF([DEFAULT]) 9654fda9279dSmrg# ---------------- 9655fda9279dSmrg# Minimum version: 1.6.0 9656fda9279dSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9657fda9279dSmrg# 9658fda9279dSmrg# Documentation tools are not always available on all platforms and sometimes 9659fda9279dSmrg# not at the appropriate level. This macro enables a module to test for the 9660fda9279dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9661fda9279dSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 9662fda9279dSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 9663fda9279dSmrg# --with-ps2pdf assumes 'auto'. 9664fda9279dSmrg# 9665fda9279dSmrg# Interface to module: 9666fda9279dSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 9667fda9279dSmrg# PS2PDF: returns the path of the ps2pdf program found 9668fda9279dSmrg# returns the path set by the user in the environment 9669fda9279dSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 9670fda9279dSmrg# 'no' user instructs the module not to use ps2pdf 9671fda9279dSmrg# 9672fda9279dSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 9673fda9279dSmrg# 9674fda9279dSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 9675fda9279dSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 9676fda9279dSmrgm4_define([_defopt], m4_default([$1], [auto])) 9677fda9279dSmrgAC_ARG_WITH(ps2pdf, 9678fda9279dSmrg AS_HELP_STRING([--with-ps2pdf], 9679fda9279dSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 9680fda9279dSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 9681fda9279dSmrgm4_undefine([_defopt]) 9682fda9279dSmrg 9683fda9279dSmrgif test "x$use_ps2pdf" = x"auto"; then 9684fda9279dSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9685fda9279dSmrg if test "x$PS2PDF" = "x"; then 9686fda9279dSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 9687fda9279dSmrg have_ps2pdf=no 9688fda9279dSmrg else 9689fda9279dSmrg have_ps2pdf=yes 9690fda9279dSmrg fi 9691fda9279dSmrgelif test "x$use_ps2pdf" = x"yes" ; then 9692fda9279dSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9693fda9279dSmrg if test "x$PS2PDF" = "x"; then 9694fda9279dSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 9695fda9279dSmrg fi 9696fda9279dSmrg have_ps2pdf=yes 9697fda9279dSmrgelif test "x$use_ps2pdf" = x"no" ; then 9698fda9279dSmrg if test "x$PS2PDF" != "x"; then 9699fda9279dSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 9700fda9279dSmrg fi 9701fda9279dSmrg have_ps2pdf=no 9702fda9279dSmrgelse 9703fda9279dSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 9704fda9279dSmrgfi 9705fda9279dSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 9706fda9279dSmrg]) # XORG_WITH_PS2PDF 9707fda9279dSmrg 9708fda9279dSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 9709fda9279dSmrg# ---------------- 9710fda9279dSmrg# Minimum version: 1.6.0 9711fda9279dSmrg# 9712fda9279dSmrg# Documentation tools are not always available on all platforms and sometimes 9713fda9279dSmrg# not at the appropriate level. This macro enables a builder to skip all 9714fda9279dSmrg# documentation targets except traditional man pages. 9715fda9279dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9716fda9279dSmrg# maximum flexibilty in controlling documentation building. 9717fda9279dSmrg# Refer to: 9718fda9279dSmrg# XORG_WITH_XMLTO --with-xmlto 9719fda9279dSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 9720fda9279dSmrg# XORG_WITH_DOXYGEN --with-doxygen 9721fda9279dSmrg# XORG_WITH_FOP --with-fop 9722fda9279dSmrg# XORG_WITH_GROFF --with-groff 9723fda9279dSmrg# XORG_WITH_PS2PDF --with-ps2pdf 9724fda9279dSmrg# 9725fda9279dSmrg# Interface to module: 9726fda9279dSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 9727fda9279dSmrg# --enable-docs: 'yes' user instructs the module to generate docs 9728fda9279dSmrg# 'no' user instructs the module not to generate docs 9729fda9279dSmrg# parm1: specify the default value, yes or no. 9730fda9279dSmrg# 9731fda9279dSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 9732fda9279dSmrgm4_define([docs_default], m4_default([$1], [yes])) 9733fda9279dSmrgAC_ARG_ENABLE(docs, 9734fda9279dSmrg AS_HELP_STRING([--enable-docs], 9735fda9279dSmrg [Enable building the documentation (default: ]docs_default[)]), 9736fda9279dSmrg [build_docs=$enableval], [build_docs=]docs_default) 9737fda9279dSmrgm4_undefine([docs_default]) 9738fda9279dSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 9739fda9279dSmrgAC_MSG_CHECKING([whether to build documentation]) 9740fda9279dSmrgAC_MSG_RESULT([$build_docs]) 9741fda9279dSmrg]) # XORG_ENABLE_DOCS 9742fda9279dSmrg 9743fda9279dSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 9744fda9279dSmrg# ---------------- 9745fda9279dSmrg# Minimum version: 1.6.0 9746fda9279dSmrg# 9747fda9279dSmrg# This macro enables a builder to skip all developer documentation. 9748fda9279dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9749fda9279dSmrg# maximum flexibilty in controlling documentation building. 9750fda9279dSmrg# Refer to: 9751fda9279dSmrg# XORG_WITH_XMLTO --with-xmlto 9752fda9279dSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 9753fda9279dSmrg# XORG_WITH_DOXYGEN --with-doxygen 9754fda9279dSmrg# XORG_WITH_FOP --with-fop 9755fda9279dSmrg# XORG_WITH_GROFF --with-groff 9756fda9279dSmrg# XORG_WITH_PS2PDF --with-ps2pdf 9757fda9279dSmrg# 9758fda9279dSmrg# Interface to module: 9759fda9279dSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 9760fda9279dSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 9761fda9279dSmrg# 'no' user instructs the module not to generate developer docs 9762fda9279dSmrg# parm1: specify the default value, yes or no. 9763fda9279dSmrg# 9764fda9279dSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 9765fda9279dSmrgm4_define([devel_default], m4_default([$1], [yes])) 9766fda9279dSmrgAC_ARG_ENABLE(devel-docs, 9767fda9279dSmrg AS_HELP_STRING([--enable-devel-docs], 9768fda9279dSmrg [Enable building the developer documentation (default: ]devel_default[)]), 9769fda9279dSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 9770fda9279dSmrgm4_undefine([devel_default]) 9771fda9279dSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 9772fda9279dSmrgAC_MSG_CHECKING([whether to build developer documentation]) 9773fda9279dSmrgAC_MSG_RESULT([$build_devel_docs]) 9774fda9279dSmrg]) # XORG_ENABLE_DEVEL_DOCS 9775fda9279dSmrg 9776fda9279dSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 9777fda9279dSmrg# ---------------- 9778fda9279dSmrg# Minimum version: 1.6.0 9779fda9279dSmrg# 9780fda9279dSmrg# This macro enables a builder to skip all functional specification targets. 9781fda9279dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9782fda9279dSmrg# maximum flexibilty in controlling documentation building. 9783fda9279dSmrg# Refer to: 9784fda9279dSmrg# XORG_WITH_XMLTO --with-xmlto 9785fda9279dSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 9786fda9279dSmrg# XORG_WITH_DOXYGEN --with-doxygen 9787fda9279dSmrg# XORG_WITH_FOP --with-fop 9788fda9279dSmrg# XORG_WITH_GROFF --with-groff 9789fda9279dSmrg# XORG_WITH_PS2PDF --with-ps2pdf 9790fda9279dSmrg# 9791fda9279dSmrg# Interface to module: 9792fda9279dSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 9793fda9279dSmrg# --enable-specs: 'yes' user instructs the module to generate specs 9794fda9279dSmrg# 'no' user instructs the module not to generate specs 9795fda9279dSmrg# parm1: specify the default value, yes or no. 9796fda9279dSmrg# 9797fda9279dSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 9798fda9279dSmrgm4_define([spec_default], m4_default([$1], [yes])) 9799fda9279dSmrgAC_ARG_ENABLE(specs, 9800fda9279dSmrg AS_HELP_STRING([--enable-specs], 9801fda9279dSmrg [Enable building the specs (default: ]spec_default[)]), 9802fda9279dSmrg [build_specs=$enableval], [build_specs=]spec_default) 9803fda9279dSmrgm4_undefine([spec_default]) 9804fda9279dSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 9805fda9279dSmrgAC_MSG_CHECKING([whether to build functional specifications]) 9806fda9279dSmrgAC_MSG_RESULT([$build_specs]) 9807fda9279dSmrg]) # XORG_ENABLE_SPECS 9808fda9279dSmrg 9809fda9279dSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 9810fda9279dSmrg# ---------------------------------------------- 9811fda9279dSmrg# Minimum version: 1.13.0 9812fda9279dSmrg# 9813fda9279dSmrg# This macro enables a builder to enable/disable unit testing 9814fda9279dSmrg# It makes no assumption about the test cases implementation 9815fda9279dSmrg# Test cases may or may not use Automake "Support for test suites" 9816fda9279dSmrg# They may or may not use the software utility library GLib 9817fda9279dSmrg# 9818fda9279dSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 9819fda9279dSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 9820fda9279dSmrg# The variable enable_unit_tests is used by other macros in this file. 9821fda9279dSmrg# 9822fda9279dSmrg# Interface to module: 9823fda9279dSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 9824fda9279dSmrg# enable_unit_tests: used in configure.ac for additional configuration 9825fda9279dSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 9826fda9279dSmrg# 'no' user instructs the module not to build tests 9827fda9279dSmrg# parm1: specify the default value, yes or no. 9828fda9279dSmrg# 9829fda9279dSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 9830fda9279dSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 9831fda9279dSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 9832fda9279dSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9833fda9279dSmrgm4_define([_defopt], m4_default([$1], [auto])) 9834fda9279dSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 9835fda9279dSmrg [Enable building unit test cases (default: ]_defopt[)]), 9836fda9279dSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 9837fda9279dSmrgm4_undefine([_defopt]) 9838fda9279dSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 9839fda9279dSmrgAC_MSG_CHECKING([whether to build unit test cases]) 9840fda9279dSmrgAC_MSG_RESULT([$enable_unit_tests]) 9841fda9279dSmrg]) # XORG_ENABLE_UNIT_TESTS 9842fda9279dSmrg 9843fda9279dSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 9844fda9279dSmrg# ------------------------------------------------------ 9845fda9279dSmrg# Minimum version: 1.17.0 9846fda9279dSmrg# 9847fda9279dSmrg# This macro enables a builder to enable/disable integration testing 9848fda9279dSmrg# It makes no assumption about the test cases' implementation 9849fda9279dSmrg# Test cases may or may not use Automake "Support for test suites" 9850fda9279dSmrg# 9851fda9279dSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 9852fda9279dSmrg# usually requires less dependencies and may be built and run under less 9853fda9279dSmrg# stringent environments than integration tests. 9854fda9279dSmrg# 9855fda9279dSmrg# Interface to module: 9856fda9279dSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 9857fda9279dSmrg# enable_integration_tests: used in configure.ac for additional configuration 9858fda9279dSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 9859fda9279dSmrg# 'no' user instructs the module not to build tests 9860fda9279dSmrg# parm1: specify the default value, yes or no. 9861fda9279dSmrg# 9862fda9279dSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 9863fda9279dSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9864fda9279dSmrgm4_define([_defopt], m4_default([$1], [auto])) 9865fda9279dSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 9866fda9279dSmrg [Enable building integration test cases (default: ]_defopt[)]), 9867fda9279dSmrg [enable_integration_tests=$enableval], 9868fda9279dSmrg [enable_integration_tests=]_defopt) 9869fda9279dSmrgm4_undefine([_defopt]) 9870fda9279dSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 9871fda9279dSmrg [test "x$enable_integration_tests" != xno]) 9872fda9279dSmrgAC_MSG_CHECKING([whether to build unit test cases]) 9873fda9279dSmrgAC_MSG_RESULT([$enable_integration_tests]) 9874fda9279dSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 9875fda9279dSmrg 9876fda9279dSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9877fda9279dSmrg# ---------------------------------------- 9878fda9279dSmrg# Minimum version: 1.13.0 9879fda9279dSmrg# 9880fda9279dSmrg# GLib is a library which provides advanced data structures and functions. 9881fda9279dSmrg# This macro enables a module to test for the presence of Glib. 9882fda9279dSmrg# 9883fda9279dSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 9884fda9279dSmrg# Otherwise the value of $enable_unit_tests is blank. 9885fda9279dSmrg# 9886fda9279dSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 9887fda9279dSmrg# test support usually requires less dependencies and may be built and run under 9888fda9279dSmrg# less stringent environments than integration tests. 9889fda9279dSmrg# 9890fda9279dSmrg# Interface to module: 9891fda9279dSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 9892fda9279dSmrg# with_glib: used in configure.ac to know if GLib has been found 9893fda9279dSmrg# --with-glib: 'yes' user instructs the module to use glib 9894fda9279dSmrg# 'no' user instructs the module not to use glib 9895fda9279dSmrg# 9896fda9279dSmrgAC_DEFUN([XORG_WITH_GLIB],[ 9897fda9279dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9898fda9279dSmrgm4_define([_defopt], m4_default([$2], [auto])) 9899fda9279dSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 9900fda9279dSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 9901fda9279dSmrg [with_glib=$withval], [with_glib=]_defopt) 9902fda9279dSmrgm4_undefine([_defopt]) 9903fda9279dSmrg 9904fda9279dSmrghave_glib=no 9905fda9279dSmrg# Do not probe GLib if user explicitly disabled unit testing 9906fda9279dSmrgif test "x$enable_unit_tests" != x"no"; then 9907fda9279dSmrg # Do not probe GLib if user explicitly disabled it 9908fda9279dSmrg if test "x$with_glib" != x"no"; then 9909fda9279dSmrg m4_ifval( 9910fda9279dSmrg [$1], 9911fda9279dSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 9912fda9279dSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 9913fda9279dSmrg ) 9914fda9279dSmrg fi 9915fda9279dSmrgfi 9916fda9279dSmrg 9917fda9279dSmrg# Not having GLib when unit testing has been explicitly requested is an error 9918fda9279dSmrgif test "x$enable_unit_tests" = x"yes"; then 9919fda9279dSmrg if test "x$have_glib" = x"no"; then 9920fda9279dSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9921fda9279dSmrg fi 9922fda9279dSmrgfi 9923fda9279dSmrg 9924fda9279dSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 9925fda9279dSmrgif test "x$enable_unit_tests" = x"no"; then 9926fda9279dSmrg if test "x$with_glib" = x"yes"; then 9927fda9279dSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9928fda9279dSmrg fi 9929fda9279dSmrgfi 9930fda9279dSmrg 9931fda9279dSmrg# Not having GLib when it has been explicitly requested is an error 9932fda9279dSmrgif test "x$with_glib" = x"yes"; then 9933fda9279dSmrg if test "x$have_glib" = x"no"; then 9934fda9279dSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 9935fda9279dSmrg fi 9936fda9279dSmrgfi 9937fda9279dSmrg 9938fda9279dSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 9939fda9279dSmrg]) # XORG_WITH_GLIB 9940fda9279dSmrg 9941fda9279dSmrg# XORG_LD_WRAP([required|optional]) 9942fda9279dSmrg# --------------------------------- 9943fda9279dSmrg# Minimum version: 1.13.0 9944fda9279dSmrg# 9945fda9279dSmrg# Check if linker supports -wrap, passed via compiler flags 9946fda9279dSmrg# 9947fda9279dSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 9948fda9279dSmrg# Otherwise the value of $enable_unit_tests is blank. 9949fda9279dSmrg# 9950fda9279dSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 9951fda9279dSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 9952fda9279dSmrg# available, an argument of "optional" allows use when some unit tests require 9953fda9279dSmrg# ld -wrap and others do not. 9954fda9279dSmrg# 9955fda9279dSmrgAC_DEFUN([XORG_LD_WRAP],[ 9956fda9279dSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 9957fda9279dSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 9958fda9279dSmrg void __wrap_exit(int status) { return; }], 9959fda9279dSmrg [exit(0);])]) 9960fda9279dSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 9961fda9279dSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 9962fda9279dSmrg if test "x$have_ld_wrap" = x"no"; then 9963fda9279dSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 9964fda9279dSmrg fi 9965fda9279dSmrgfi 9966fda9279dSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 9967fda9279dSmrg# 9968fda9279dSmrg]) # XORG_LD_WRAP 9969fda9279dSmrg 9970fda9279dSmrg# XORG_CHECK_LINKER_FLAGS 9971fda9279dSmrg# ----------------------- 9972fda9279dSmrg# SYNOPSIS 9973fda9279dSmrg# 9974fda9279dSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 9975fda9279dSmrg# 9976fda9279dSmrg# DESCRIPTION 9977fda9279dSmrg# 9978fda9279dSmrg# Check whether the given linker FLAGS work with the current language's 9979fda9279dSmrg# linker, or whether they give an error. 9980fda9279dSmrg# 9981fda9279dSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 9982fda9279dSmrg# success/failure. 9983fda9279dSmrg# 9984fda9279dSmrg# PROGRAM-SOURCE is the program source to link with, if needed 9985fda9279dSmrg# 9986fda9279dSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 9987fda9279dSmrg# 9988fda9279dSmrg# LICENSE 9989fda9279dSmrg# 9990fda9279dSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 9991fda9279dSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 9992fda9279dSmrg# Copyright (c) 2009 Matteo Frigo 9993fda9279dSmrg# 9994fda9279dSmrg# This program is free software: you can redistribute it and/or modify it 9995fda9279dSmrg# under the terms of the GNU General Public License as published by the 9996fda9279dSmrg# Free Software Foundation, either version 3 of the License, or (at your 9997fda9279dSmrg# option) any later version. 9998fda9279dSmrg# 9999fda9279dSmrg# This program is distributed in the hope that it will be useful, but 10000fda9279dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10001fda9279dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10002fda9279dSmrg# Public License for more details. 10003fda9279dSmrg# 10004fda9279dSmrg# You should have received a copy of the GNU General Public License along 10005fda9279dSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10006fda9279dSmrg# 10007fda9279dSmrg# As a special exception, the respective Autoconf Macro's copyright owner 10008fda9279dSmrg# gives unlimited permission to copy, distribute and modify the configure 10009fda9279dSmrg# scripts that are the output of Autoconf when processing the Macro. You 10010fda9279dSmrg# need not follow the terms of the GNU General Public License when using 10011fda9279dSmrg# or distributing such scripts, even though portions of the text of the 10012fda9279dSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 10013fda9279dSmrg# all other use of the material that constitutes the Autoconf Macro. 10014fda9279dSmrg# 10015fda9279dSmrg# This special exception to the GPL applies to versions of the Autoconf 10016fda9279dSmrg# Macro released by the Autoconf Archive. When you make and distribute a 10017fda9279dSmrg# modified version of the Autoconf Macro, you may extend this special 10018fda9279dSmrg# exception to the GPL to apply to your modified version as well.# 10019fda9279dSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10020fda9279dSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10021fda9279dSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10022fda9279dSmrgAS_LITERAL_IF([$1], 10023fda9279dSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10024fda9279dSmrg ax_save_FLAGS=$LDFLAGS 10025fda9279dSmrg LDFLAGS="$1" 10026fda9279dSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10027fda9279dSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10028fda9279dSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10029fda9279dSmrg LDFLAGS=$ax_save_FLAGS])], 10030fda9279dSmrg [ax_save_FLAGS=$LDFLAGS 10031fda9279dSmrg LDFLAGS="$1" 10032fda9279dSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10033fda9279dSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10034fda9279dSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10035fda9279dSmrg LDFLAGS=$ax_save_FLAGS]) 10036fda9279dSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10037fda9279dSmrgAC_MSG_RESULT($xorg_check_linker_flags) 10038fda9279dSmrgif test "x$xorg_check_linker_flags" = xyes; then 10039fda9279dSmrg m4_default([$2], :) 10040fda9279dSmrgelse 10041fda9279dSmrg m4_default([$3], :) 10042fda9279dSmrgfi 10043fda9279dSmrg]) # XORG_CHECK_LINKER_FLAGS 10044fda9279dSmrg 10045fda9279dSmrg# XORG_MEMORY_CHECK_FLAGS 10046fda9279dSmrg# ----------------------- 10047fda9279dSmrg# Minimum version: 1.16.0 10048fda9279dSmrg# 10049fda9279dSmrg# This macro attempts to find appropriate memory checking functionality 10050fda9279dSmrg# for various platforms which unit testing code may use to catch various 10051fda9279dSmrg# forms of memory allocation and access errors in testing. 10052fda9279dSmrg# 10053fda9279dSmrg# Interface to module: 10054fda9279dSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10055fda9279dSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10056fda9279dSmrg# 10057fda9279dSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10058fda9279dSmrg# 10059fda9279dSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10060fda9279dSmrg 10061fda9279dSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10062fda9279dSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10063fda9279dSmrg [Environment variables to enable memory checking in tests]) 10064fda9279dSmrg 10065fda9279dSmrg# Check for different types of support on different platforms 10066fda9279dSmrgcase $host_os in 10067fda9279dSmrg solaris*) 10068fda9279dSmrg AC_CHECK_LIB([umem], [umem_alloc], 10069fda9279dSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10070fda9279dSmrg ;; 10071fda9279dSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10072fda9279dSmrg # both directly and inverted, so should not be 0 or 255. 10073fda9279dSmrg malloc_debug_env='MALLOC_PERTURB_=15' 10074fda9279dSmrg ;; 10075fda9279dSmrg darwin*) 10076fda9279dSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10077fda9279dSmrg ;; 10078fda9279dSmrg *bsd*) 10079fda9279dSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10080fda9279dSmrg ;; 10081fda9279dSmrgesac 10082fda9279dSmrg 10083fda9279dSmrg# User supplied flags override default flags 10084fda9279dSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10085fda9279dSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10086fda9279dSmrgfi 10087fda9279dSmrg 10088fda9279dSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10089fda9279dSmrg]) # XORG_WITH_LINT 10090fda9279dSmrg 10091fda9279dSmrg# XORG_CHECK_MALLOC_ZERO 10092fda9279dSmrg# ---------------------- 10093fda9279dSmrg# Minimum version: 1.0.0 10094fda9279dSmrg# 10095fda9279dSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10096fda9279dSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 10097fda9279dSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10098fda9279dSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10099fda9279dSmrgAC_ARG_ENABLE(malloc0returnsnull, 10100fda9279dSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 10101fda9279dSmrg [malloc(0) returns NULL (default: auto)]), 10102fda9279dSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10103fda9279dSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10104fda9279dSmrg 10105fda9279dSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10106fda9279dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10107fda9279dSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10108fda9279dSmrg#include <stdlib.h> 10109fda9279dSmrg],[ 10110fda9279dSmrg char *m0, *r0, *c0, *p; 10111fda9279dSmrg m0 = malloc(0); 10112fda9279dSmrg p = malloc(10); 10113fda9279dSmrg r0 = realloc(p,0); 10114fda9279dSmrg c0 = calloc(0,10); 10115fda9279dSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10116fda9279dSmrg])], 10117fda9279dSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 10118fda9279dSmrg [MALLOC_ZERO_RETURNS_NULL=no], 10119fda9279dSmrg [MALLOC_ZERO_RETURNS_NULL=yes]) 10120fda9279dSmrgfi 10121fda9279dSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10122fda9279dSmrg 10123fda9279dSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10124fda9279dSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10125fda9279dSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10126fda9279dSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10127fda9279dSmrgelse 10128fda9279dSmrg MALLOC_ZERO_CFLAGS="" 10129fda9279dSmrg XMALLOC_ZERO_CFLAGS="" 10130fda9279dSmrg XTMALLOC_ZERO_CFLAGS="" 10131fda9279dSmrgfi 10132fda9279dSmrg 10133fda9279dSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10134fda9279dSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10135fda9279dSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10136fda9279dSmrg]) # XORG_CHECK_MALLOC_ZERO 10137fda9279dSmrg 10138fda9279dSmrg# XORG_WITH_LINT() 10139fda9279dSmrg# ---------------- 10140fda9279dSmrg# Minimum version: 1.1.0 10141fda9279dSmrg# 10142fda9279dSmrg# This macro enables the use of a tool that flags some suspicious and 10143fda9279dSmrg# non-portable constructs (likely to be bugs) in C language source code. 10144fda9279dSmrg# It will attempt to locate the tool and use appropriate options. 10145fda9279dSmrg# There are various lint type tools on different platforms. 10146fda9279dSmrg# 10147fda9279dSmrg# Interface to module: 10148fda9279dSmrg# LINT: returns the path to the tool found on the platform 10149fda9279dSmrg# or the value set to LINT on the configure cmd line 10150fda9279dSmrg# also an Automake conditional 10151fda9279dSmrg# LINT_FLAGS: an Automake variable with appropriate flags 10152fda9279dSmrg# 10153fda9279dSmrg# --with-lint: 'yes' user instructs the module to use lint 10154fda9279dSmrg# 'no' user instructs the module not to use lint (default) 10155fda9279dSmrg# 10156fda9279dSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10157fda9279dSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10158fda9279dSmrg# 10159fda9279dSmrgAC_DEFUN([XORG_WITH_LINT],[ 10160fda9279dSmrg 10161fda9279dSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10162fda9279dSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10163fda9279dSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10164fda9279dSmrg [Use a lint-style source code checker (default: disabled)])], 10165fda9279dSmrg [use_lint=$withval], [use_lint=no]) 10166fda9279dSmrg 10167fda9279dSmrg# Obtain platform specific info like program name and options 10168fda9279dSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10169fda9279dSmrgcase $host_os in 10170fda9279dSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10171fda9279dSmrg lint_name=splint 10172fda9279dSmrg lint_options="-badflag" 10173fda9279dSmrg ;; 10174fda9279dSmrg *freebsd* | *netbsd*) 10175fda9279dSmrg lint_name=lint 10176fda9279dSmrg lint_options="-u -b" 10177fda9279dSmrg ;; 10178fda9279dSmrg *solaris*) 10179fda9279dSmrg lint_name=lint 10180fda9279dSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10181fda9279dSmrg ;; 10182fda9279dSmrgesac 10183fda9279dSmrg 10184fda9279dSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10185fda9279dSmrgif test "x$use_lint" = x"yes" ; then 10186fda9279dSmrg AC_PATH_PROG([LINT], [$lint_name]) 10187fda9279dSmrg if test "x$LINT" = "x"; then 10188fda9279dSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10189fda9279dSmrg fi 10190fda9279dSmrgelif test "x$use_lint" = x"no" ; then 10191fda9279dSmrg if test "x$LINT" != "x"; then 10192fda9279dSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10193fda9279dSmrg fi 10194fda9279dSmrgelse 10195fda9279dSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10196fda9279dSmrgfi 10197fda9279dSmrg 10198fda9279dSmrg# User supplied flags override default flags 10199fda9279dSmrgif test "x$LINT_FLAGS" != "x"; then 10200fda9279dSmrg lint_options=$LINT_FLAGS 10201fda9279dSmrgfi 10202fda9279dSmrg 10203fda9279dSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10204fda9279dSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10205fda9279dSmrg 10206fda9279dSmrg]) # XORG_WITH_LINT 10207fda9279dSmrg 10208fda9279dSmrg# XORG_LINT_LIBRARY(LIBNAME) 10209fda9279dSmrg# -------------------------- 10210fda9279dSmrg# Minimum version: 1.1.0 10211fda9279dSmrg# 10212fda9279dSmrg# Sets up flags for building lint libraries for checking programs that call 10213fda9279dSmrg# functions in the library. 10214fda9279dSmrg# 10215fda9279dSmrg# Interface to module: 10216fda9279dSmrg# LINTLIB - Automake variable with the name of lint library file to make 10217fda9279dSmrg# MAKE_LINT_LIB - Automake conditional 10218fda9279dSmrg# 10219fda9279dSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10220fda9279dSmrg# - 'no' user instructs the module not to create a lint library (default) 10221fda9279dSmrg 10222fda9279dSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10223fda9279dSmrgAC_REQUIRE([XORG_WITH_LINT]) 10224fda9279dSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10225fda9279dSmrg [Create lint library (default: disabled)])], 10226fda9279dSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10227fda9279dSmrg 10228fda9279dSmrgif test "x$make_lint_lib" = x"yes" ; then 10229fda9279dSmrg LINTLIB=llib-l$1.ln 10230fda9279dSmrg if test "x$LINT" = "x"; then 10231fda9279dSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10232fda9279dSmrg fi 10233fda9279dSmrgelif test "x$make_lint_lib" != x"no" ; then 10234fda9279dSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10235fda9279dSmrgfi 10236fda9279dSmrg 10237fda9279dSmrgAC_SUBST(LINTLIB) 10238fda9279dSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10239fda9279dSmrg 10240fda9279dSmrg]) # XORG_LINT_LIBRARY 10241fda9279dSmrg 10242fda9279dSmrg# XORG_COMPILER_BRAND 10243fda9279dSmrg# ------------------- 10244fda9279dSmrg# Minimum version: 1.14.0 10245fda9279dSmrg# 10246fda9279dSmrg# Checks for various brands of compilers and sets flags as appropriate: 10247fda9279dSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10248fda9279dSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10249fda9279dSmrg# clang compiler - sets CLANGCC to "yes" 10250fda9279dSmrg# Intel compiler - sets INTELCC to "yes" 10251fda9279dSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10252fda9279dSmrg# 10253fda9279dSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10254fda9279dSmrgAC_LANG_CASE( 10255fda9279dSmrg [C], [ 10256fda9279dSmrg AC_REQUIRE([AC_PROG_CC_C99]) 10257fda9279dSmrg ], 10258fda9279dSmrg [C++], [ 10259fda9279dSmrg AC_REQUIRE([AC_PROG_CXX]) 10260fda9279dSmrg ] 10261fda9279dSmrg) 10262fda9279dSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10263fda9279dSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10264fda9279dSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10265fda9279dSmrg]) # XORG_COMPILER_BRAND 10266fda9279dSmrg 10267fda9279dSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10268fda9279dSmrg# --------------- 10269fda9279dSmrg# Minimum version: 1.16.0 10270fda9279dSmrg# 10271fda9279dSmrg# Test if the compiler works when passed the given flag as a command line argument. 10272fda9279dSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10273fda9279dSmrg# next flag in the list until there are no more options. 10274fda9279dSmrg# 10275fda9279dSmrg# Note that this does not guarantee that the compiler supports the flag as some 10276fda9279dSmrg# compilers will simply ignore arguments that they do not understand, but we do 10277fda9279dSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10278fda9279dSmrg# -Werror=unused-command-line-argument 10279fda9279dSmrg# 10280fda9279dSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10281fda9279dSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10282fda9279dSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10283fda9279dSmrg 10284fda9279dSmrgAC_LANG_COMPILER_REQUIRE 10285fda9279dSmrg 10286fda9279dSmrgAC_LANG_CASE( 10287fda9279dSmrg [C], [ 10288fda9279dSmrg AC_REQUIRE([AC_PROG_CC_C99]) 10289fda9279dSmrg define([PREFIX], [C]) 10290fda9279dSmrg define([CACHE_PREFIX], [cc]) 10291fda9279dSmrg define([COMPILER], [$CC]) 10292fda9279dSmrg ], 10293fda9279dSmrg [C++], [ 10294fda9279dSmrg define([PREFIX], [CXX]) 10295fda9279dSmrg define([CACHE_PREFIX], [cxx]) 10296fda9279dSmrg define([COMPILER], [$CXX]) 10297fda9279dSmrg ] 10298fda9279dSmrg) 10299fda9279dSmrg 10300fda9279dSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10301fda9279dSmrg 10302fda9279dSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10303fda9279dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10304fda9279dSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10305fda9279dSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10306fda9279dSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10307fda9279dSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10308fda9279dSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10309fda9279dSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10310fda9279dSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10311fda9279dSmrgfi 10312fda9279dSmrg 10313fda9279dSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10314fda9279dSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10315fda9279dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10316fda9279dSmrg fi 10317fda9279dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10318fda9279dSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10319fda9279dSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10320fda9279dSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10321fda9279dSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10322fda9279dSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10323fda9279dSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10324fda9279dSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10325fda9279dSmrgfi 10326fda9279dSmrg 10327fda9279dSmrgfound="no" 10328fda9279dSmrgm4_foreach([flag], m4_cdr($@), [ 10329fda9279dSmrg if test $found = "no" ; then 10330fda9279dSmrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 10331fda9279dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10332fda9279dSmrg fi 10333fda9279dSmrg 10334fda9279dSmrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 10335fda9279dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10336fda9279dSmrg fi 10337fda9279dSmrg 10338fda9279dSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10339fda9279dSmrg 10340fda9279dSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10341fda9279dSmrg AC_MSG_CHECKING([if ]COMPILER[ supports]flag[]) 10342fda9279dSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10343fda9279dSmrg AC_CACHE_VAL($cacheid, 10344fda9279dSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10345fda9279dSmrg [eval $cacheid=yes], 10346fda9279dSmrg [eval $cacheid=no])]) 10347fda9279dSmrg 10348fda9279dSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10349fda9279dSmrg 10350fda9279dSmrg eval supported=\$$cacheid 10351fda9279dSmrg AC_MSG_RESULT([$supported]) 10352fda9279dSmrg if test "$supported" = "yes" ; then 10353fda9279dSmrg $1="$$1 ]flag[" 10354fda9279dSmrg found="yes" 10355fda9279dSmrg fi 10356fda9279dSmrg fi 10357fda9279dSmrg]) 10358fda9279dSmrg]) # XORG_TESTSET_CFLAG 10359fda9279dSmrg 10360fda9279dSmrg# XORG_COMPILER_FLAGS 10361fda9279dSmrg# --------------- 10362fda9279dSmrg# Minimum version: 1.16.0 10363fda9279dSmrg# 10364fda9279dSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10365fda9279dSmrg# arguments supported by the selected compiler which do NOT alter the generated 10366fda9279dSmrg# code. These arguments will cause the compiler to print various warnings 10367fda9279dSmrg# during compilation AND turn a conservative set of warnings into errors. 10368fda9279dSmrg# 10369fda9279dSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10370fda9279dSmrg# future versions of util-macros as options are added to new compilers. 10371fda9279dSmrg# 10372fda9279dSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10373fda9279dSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10374fda9279dSmrg 10375fda9279dSmrgAC_ARG_ENABLE(selective-werror, 10376fda9279dSmrg AS_HELP_STRING([--disable-selective-werror], 10377fda9279dSmrg [Turn off selective compiler errors. (default: enabled)]), 10378fda9279dSmrg [SELECTIVE_WERROR=$enableval], 10379fda9279dSmrg [SELECTIVE_WERROR=yes]) 10380fda9279dSmrg 10381fda9279dSmrgAC_LANG_CASE( 10382fda9279dSmrg [C], [ 10383fda9279dSmrg define([PREFIX], [C]) 10384fda9279dSmrg ], 10385fda9279dSmrg [C++], [ 10386fda9279dSmrg define([PREFIX], [CXX]) 10387fda9279dSmrg ] 10388fda9279dSmrg) 10389fda9279dSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10390fda9279dSmrgif test "x$SUNCC" = "xyes"; then 10391fda9279dSmrg [BASE_]PREFIX[FLAGS]="-v" 10392fda9279dSmrgelse 10393fda9279dSmrg [BASE_]PREFIX[FLAGS]="" 10394fda9279dSmrgfi 10395fda9279dSmrg 10396fda9279dSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10397fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10398fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10399fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10400fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10401fda9279dSmrg 10402fda9279dSmrgAC_LANG_CASE( 10403fda9279dSmrg [C], [ 10404fda9279dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10405fda9279dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10406fda9279dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10407fda9279dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10408fda9279dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 10409fda9279dSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10410fda9279dSmrg ] 10411fda9279dSmrg) 10412fda9279dSmrg 10413fda9279dSmrg# This chunk adds additional warnings that could catch undesired effects. 10414fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10415fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10416fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10417fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10418fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10419fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10420fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10421fda9279dSmrg 10422fda9279dSmrg# These are currently disabled because they are noisy. They will be enabled 10423fda9279dSmrg# in the future once the codebase is sufficiently modernized to silence 10424fda9279dSmrg# them. For now, I don't want them to drown out the other warnings. 10425fda9279dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10426fda9279dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10427fda9279dSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10428fda9279dSmrg 10429fda9279dSmrg# Turn some warnings into errors, so we don't accidently get successful builds 10430fda9279dSmrg# when there are problems that should be fixed. 10431fda9279dSmrg 10432fda9279dSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10433fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10434fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10435fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10436fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10437fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10438fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10439fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10440fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10441fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10442fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10443fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10444fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10445fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10446fda9279dSmrgelse 10447fda9279dSmrgAC_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]) 10448fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10449fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10450fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10451fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10452fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10453fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10454fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10455fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10456fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10457fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10458fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10459fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10460fda9279dSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10461fda9279dSmrgfi 10462fda9279dSmrg 10463fda9279dSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10464fda9279dSmrg]) # XORG_COMPILER_FLAGS 10465fda9279dSmrg 10466fda9279dSmrg# XORG_CWARNFLAGS 10467fda9279dSmrg# --------------- 10468fda9279dSmrg# Minimum version: 1.2.0 10469fda9279dSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 10470fda9279dSmrg# 10471fda9279dSmrg# Defines CWARNFLAGS to enable C compiler warnings. 10472fda9279dSmrg# 10473fda9279dSmrg# This function is deprecated because it defines -fno-strict-aliasing 10474fda9279dSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 10475fda9279dSmrg# is needed, then it should be added explicitly in the module when 10476fda9279dSmrg# it is updated to use BASE_CFLAGS. 10477fda9279dSmrg# 10478fda9279dSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10479fda9279dSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10480fda9279dSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10481fda9279dSmrgAC_LANG_CASE( 10482fda9279dSmrg [C], [ 10483fda9279dSmrg CWARNFLAGS="$BASE_CFLAGS" 10484fda9279dSmrg if test "x$GCC" = xyes ; then 10485fda9279dSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10486fda9279dSmrg fi 10487fda9279dSmrg AC_SUBST(CWARNFLAGS) 10488fda9279dSmrg ] 10489fda9279dSmrg) 10490fda9279dSmrg]) # XORG_CWARNFLAGS 10491fda9279dSmrg 10492fda9279dSmrg# XORG_STRICT_OPTION 10493fda9279dSmrg# ----------------------- 10494fda9279dSmrg# Minimum version: 1.3.0 10495fda9279dSmrg# 10496fda9279dSmrg# Add configure option to enable strict compilation flags, such as treating 10497fda9279dSmrg# warnings as fatal errors. 10498fda9279dSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10499fda9279dSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10500fda9279dSmrg# 10501fda9279dSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10502fda9279dSmrg# when strict compilation is unconditionally desired. 10503fda9279dSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 10504fda9279dSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10505fda9279dSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10506fda9279dSmrg 10507fda9279dSmrgAC_ARG_ENABLE(strict-compilation, 10508fda9279dSmrg AS_HELP_STRING([--enable-strict-compilation], 10509fda9279dSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 10510fda9279dSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10511fda9279dSmrg 10512fda9279dSmrgAC_LANG_CASE( 10513fda9279dSmrg [C], [ 10514fda9279dSmrg define([PREFIX], [C]) 10515fda9279dSmrg ], 10516fda9279dSmrg [C++], [ 10517fda9279dSmrg define([PREFIX], [CXX]) 10518fda9279dSmrg ] 10519fda9279dSmrg) 10520fda9279dSmrg 10521fda9279dSmrg[STRICT_]PREFIX[FLAGS]="" 10522fda9279dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10523fda9279dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 10524fda9279dSmrg 10525fda9279dSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10526fda9279dSmrg# activate it with -Werror, so we add it here explicitly. 10527fda9279dSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 10528fda9279dSmrg 10529fda9279dSmrgif test "x$STRICT_COMPILE" = "xyes"; then 10530fda9279dSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10531fda9279dSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 10532fda9279dSmrgfi 10533fda9279dSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 10534fda9279dSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10535fda9279dSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 10536fda9279dSmrg]) # XORG_STRICT_OPTION 10537fda9279dSmrg 10538fda9279dSmrg# XORG_DEFAULT_OPTIONS 10539fda9279dSmrg# -------------------- 10540fda9279dSmrg# Minimum version: 1.3.0 10541fda9279dSmrg# 10542fda9279dSmrg# Defines default options for X.Org modules. 10543fda9279dSmrg# 10544fda9279dSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 10545fda9279dSmrgAC_REQUIRE([AC_PROG_INSTALL]) 10546fda9279dSmrgXORG_COMPILER_FLAGS 10547fda9279dSmrgXORG_CWARNFLAGS 10548fda9279dSmrgXORG_STRICT_OPTION 10549fda9279dSmrgXORG_RELEASE_VERSION 10550fda9279dSmrgXORG_CHANGELOG 10551fda9279dSmrgXORG_INSTALL 10552fda9279dSmrgXORG_MANPAGE_SECTIONS 10553fda9279dSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 10554fda9279dSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 10555fda9279dSmrg]) # XORG_DEFAULT_OPTIONS 10556fda9279dSmrg 10557fda9279dSmrg# XORG_INSTALL() 10558fda9279dSmrg# ---------------- 10559fda9279dSmrg# Minimum version: 1.4.0 10560fda9279dSmrg# 10561fda9279dSmrg# Defines the variable INSTALL_CMD as the command to copy 10562fda9279dSmrg# INSTALL from $prefix/share/util-macros. 10563fda9279dSmrg# 10564fda9279dSmrgAC_DEFUN([XORG_INSTALL], [ 10565fda9279dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10566fda9279dSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 10567fda9279dSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 10568fda9279dSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 10569fda9279dSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 10570fda9279dSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 10571fda9279dSmrgAC_SUBST([INSTALL_CMD]) 10572fda9279dSmrg]) # XORG_INSTALL 10573fda9279dSmrgdnl Copyright 2005 Red Hat, Inc 10574fda9279dSmrgdnl 10575fda9279dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10576fda9279dSmrgdnl documentation for any purpose is hereby granted without fee, provided that 10577fda9279dSmrgdnl the above copyright notice appear in all copies and that both that 10578fda9279dSmrgdnl copyright notice and this permission notice appear in supporting 10579fda9279dSmrgdnl documentation. 10580fda9279dSmrgdnl 10581fda9279dSmrgdnl The above copyright notice and this permission notice shall be included 10582fda9279dSmrgdnl in all copies or substantial portions of the Software. 10583fda9279dSmrgdnl 10584fda9279dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10585fda9279dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10586fda9279dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10587fda9279dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10588fda9279dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10589fda9279dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10590fda9279dSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 10591fda9279dSmrgdnl 10592fda9279dSmrgdnl Except as contained in this notice, the name of the copyright holders shall 10593fda9279dSmrgdnl not be used in advertising or otherwise to promote the sale, use or 10594fda9279dSmrgdnl other dealings in this Software without prior written authorization 10595fda9279dSmrgdnl from the copyright holders. 10596fda9279dSmrgdnl 10597fda9279dSmrg 10598fda9279dSmrg# XORG_RELEASE_VERSION 10599fda9279dSmrg# -------------------- 10600fda9279dSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 10601fda9279dSmrg 10602fda9279dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 10603fda9279dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 10604fda9279dSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 10605fda9279dSmrg [Major version of this package]) 10606fda9279dSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 10607fda9279dSmrg if test "x$PVM" = "x"; then 10608fda9279dSmrg PVM="0" 10609fda9279dSmrg fi 10610fda9279dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 10611fda9279dSmrg [$PVM], 10612fda9279dSmrg [Minor version of this package]) 10613fda9279dSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 10614fda9279dSmrg if test "x$PVP" = "x"; then 10615fda9279dSmrg PVP="0" 10616fda9279dSmrg fi 10617fda9279dSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 10618fda9279dSmrg [$PVP], 10619fda9279dSmrg [Patch version of this package]) 10620fda9279dSmrg]) 10621fda9279dSmrg 10622fda9279dSmrg# XORG_CHANGELOG() 10623fda9279dSmrg# ---------------- 10624fda9279dSmrg# Minimum version: 1.2.0 10625fda9279dSmrg# 10626fda9279dSmrg# Defines the variable CHANGELOG_CMD as the command to generate 10627fda9279dSmrg# ChangeLog from git. 10628fda9279dSmrg# 10629fda9279dSmrg# 10630fda9279dSmrgAC_DEFUN([XORG_CHANGELOG], [ 10631fda9279dSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 10632fda9279dSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 10633fda9279dSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 10634fda9279dSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 10635fda9279dSmrgAC_SUBST([CHANGELOG_CMD]) 10636fda9279dSmrg]) # XORG_CHANGELOG 10637fda9279dSmrg 10638fda9279dSmrgdnl Copyright 2005 Red Hat, Inc 10639fda9279dSmrgdnl 10640fda9279dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10641fda9279dSmrgdnl documentation for any purpose is hereby granted without fee, provided that 10642fda9279dSmrgdnl the above copyright notice appear in all copies and that both that 10643fda9279dSmrgdnl copyright notice and this permission notice appear in supporting 10644fda9279dSmrgdnl documentation. 10645fda9279dSmrgdnl 10646fda9279dSmrgdnl The above copyright notice and this permission notice shall be included 10647fda9279dSmrgdnl in all copies or substantial portions of the Software. 10648fda9279dSmrgdnl 10649fda9279dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10650fda9279dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10651fda9279dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10652fda9279dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10653fda9279dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10654fda9279dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10655fda9279dSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 10656fda9279dSmrgdnl 10657fda9279dSmrgdnl Except as contained in this notice, the name of the copyright holders shall 10658fda9279dSmrgdnl not be used in advertising or otherwise to promote the sale, use or 10659fda9279dSmrgdnl other dealings in this Software without prior written authorization 10660fda9279dSmrgdnl from the copyright holders. 10661fda9279dSmrgdnl 10662fda9279dSmrg 10663fda9279dSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 10664fda9279dSmrg# -------------------------- 10665fda9279dSmrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 10666fda9279dSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 10667fda9279dSmrg 10668fda9279dSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 10669fda9279dSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10670fda9279dSmrg SAVE_CFLAGS="$CFLAGS" 10671fda9279dSmrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 10672fda9279dSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 10673fda9279dSmrg#include "xorg-server.h" 10674fda9279dSmrg#if !defined $1 10675fda9279dSmrg#error $1 not defined 10676fda9279dSmrg#endif 10677fda9279dSmrg ]])], 10678fda9279dSmrg [_EXT_CHECK=yes], 10679fda9279dSmrg [_EXT_CHECK=no]) 10680fda9279dSmrg CFLAGS="$SAVE_CFLAGS" 10681fda9279dSmrg AC_MSG_CHECKING([if $1 is defined]) 10682fda9279dSmrg AC_MSG_RESULT([$_EXT_CHECK]) 10683fda9279dSmrg if test "$_EXT_CHECK" != no; then 10684fda9279dSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 10685fda9279dSmrg fi 10686fda9279dSmrg]) 10687fda9279dSmrg 10688fda9279dSmrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 10689fda9279dSmrg# 10690fda9279dSmrg# This file is free software; the Free Software Foundation 10691fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 10692fda9279dSmrg# with or without modifications, as long as this notice is preserved. 10693fda9279dSmrg 10694fda9279dSmrg# AM_AUTOMAKE_VERSION(VERSION) 10695fda9279dSmrg# ---------------------------- 10696fda9279dSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 10697fda9279dSmrg# generated from the m4 files accompanying Automake X.Y. 10698fda9279dSmrg# (This private macro should not be called outside this file.) 10699fda9279dSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 10700fda9279dSmrg[am__api_version='1.14' 10701fda9279dSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 10702fda9279dSmrgdnl require some minimum version. Point them to the right macro. 10703fda9279dSmrgm4_if([$1], [1.14.1], [], 10704fda9279dSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 10705fda9279dSmrg]) 10706fda9279dSmrg 10707fda9279dSmrg# _AM_AUTOCONF_VERSION(VERSION) 10708fda9279dSmrg# ----------------------------- 10709fda9279dSmrg# aclocal traces this macro to find the Autoconf version. 10710fda9279dSmrg# This is a private macro too. Using m4_define simplifies 10711fda9279dSmrg# the logic in aclocal, which can simply ignore this definition. 10712fda9279dSmrgm4_define([_AM_AUTOCONF_VERSION], []) 10713fda9279dSmrg 10714fda9279dSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 10715fda9279dSmrg# ------------------------------- 10716fda9279dSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 10717fda9279dSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 10718fda9279dSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 10719fda9279dSmrg[AM_AUTOMAKE_VERSION([1.14.1])dnl 10720fda9279dSmrgm4_ifndef([AC_AUTOCONF_VERSION], 10721fda9279dSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 10722fda9279dSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 10723fda9279dSmrg 10724fda9279dSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 10725fda9279dSmrg 10726fda9279dSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 10727fda9279dSmrg# 10728fda9279dSmrg# This file is free software; the Free Software Foundation 10729fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 10730fda9279dSmrg# with or without modifications, as long as this notice is preserved. 10731fda9279dSmrg 10732fda9279dSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 10733fda9279dSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 10734fda9279dSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 10735fda9279dSmrg# 10736fda9279dSmrg# Of course, Automake must honor this variable whenever it calls a 10737fda9279dSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 10738fda9279dSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 10739fda9279dSmrg# depending on how configure is run. This is pretty annoying, since 10740fda9279dSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 10741fda9279dSmrg# source directory, any form will work fine, but in subdirectories a 10742fda9279dSmrg# relative path needs to be adjusted first. 10743fda9279dSmrg# 10744fda9279dSmrg# $ac_aux_dir/missing 10745fda9279dSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 10746fda9279dSmrg# $top_srcdir/$ac_aux_dir/missing 10747fda9279dSmrg# fails if $ac_aux_dir is absolute, 10748fda9279dSmrg# fails when called from a subdirectory in a VPATH build with 10749fda9279dSmrg# a relative $ac_aux_dir 10750fda9279dSmrg# 10751fda9279dSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 10752fda9279dSmrg# are both prefixed by $srcdir. In an in-source build this is usually 10753fda9279dSmrg# harmless because $srcdir is '.', but things will broke when you 10754fda9279dSmrg# start a VPATH build or use an absolute $srcdir. 10755fda9279dSmrg# 10756fda9279dSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 10757fda9279dSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 10758fda9279dSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 10759fda9279dSmrg# and then we would define $MISSING as 10760fda9279dSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 10761fda9279dSmrg# This will work as long as MISSING is not called from configure, because 10762fda9279dSmrg# unfortunately $(top_srcdir) has no meaning in configure. 10763fda9279dSmrg# However there are other variables, like CC, which are often used in 10764fda9279dSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 10765fda9279dSmrg# 10766fda9279dSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 10767fda9279dSmrg# absolute PATH. The drawback is that using absolute paths prevent a 10768fda9279dSmrg# configured tree to be moved without reconfiguration. 10769fda9279dSmrg 10770fda9279dSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10771fda9279dSmrg[dnl Rely on autoconf to set up CDPATH properly. 10772fda9279dSmrgAC_PREREQ([2.50])dnl 10773fda9279dSmrg# expand $ac_aux_dir to an absolute path 10774fda9279dSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 10775fda9279dSmrg]) 10776fda9279dSmrg 10777fda9279dSmrg# AM_CONDITIONAL -*- Autoconf -*- 10778fda9279dSmrg 10779fda9279dSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 10780fda9279dSmrg# 10781fda9279dSmrg# This file is free software; the Free Software Foundation 10782fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 10783fda9279dSmrg# with or without modifications, as long as this notice is preserved. 10784fda9279dSmrg 10785fda9279dSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 10786fda9279dSmrg# ------------------------------------- 10787fda9279dSmrg# Define a conditional. 10788fda9279dSmrgAC_DEFUN([AM_CONDITIONAL], 10789fda9279dSmrg[AC_PREREQ([2.52])dnl 10790fda9279dSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 10791fda9279dSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 10792fda9279dSmrgAC_SUBST([$1_TRUE])dnl 10793fda9279dSmrgAC_SUBST([$1_FALSE])dnl 10794fda9279dSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 10795fda9279dSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 10796fda9279dSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 10797fda9279dSmrgif $2; then 10798fda9279dSmrg $1_TRUE= 10799fda9279dSmrg $1_FALSE='#' 10800fda9279dSmrgelse 10801fda9279dSmrg $1_TRUE='#' 10802fda9279dSmrg $1_FALSE= 10803fda9279dSmrgfi 10804fda9279dSmrgAC_CONFIG_COMMANDS_PRE( 10805fda9279dSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 10806fda9279dSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 10807fda9279dSmrgUsually this means the macro was only invoked conditionally.]]) 10808fda9279dSmrgfi])]) 10809fda9279dSmrg 10810fda9279dSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 10811fda9279dSmrg# 10812fda9279dSmrg# This file is free software; the Free Software Foundation 10813fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 10814fda9279dSmrg# with or without modifications, as long as this notice is preserved. 10815fda9279dSmrg 10816fda9279dSmrg 10817fda9279dSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 10818fda9279dSmrg# written in clear, in which case automake, when reading aclocal.m4, 10819fda9279dSmrg# will think it sees a *use*, and therefore will trigger all it's 10820fda9279dSmrg# C support machinery. Also note that it means that autoscan, seeing 10821fda9279dSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 10822fda9279dSmrg 10823fda9279dSmrg 10824fda9279dSmrg# _AM_DEPENDENCIES(NAME) 10825fda9279dSmrg# ---------------------- 10826fda9279dSmrg# See how the compiler implements dependency checking. 10827fda9279dSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 10828fda9279dSmrg# We try a few techniques and use that to set a single cache variable. 10829fda9279dSmrg# 10830fda9279dSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 10831fda9279dSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 10832fda9279dSmrg# dependency, and given that the user is not expected to run this macro, 10833fda9279dSmrg# just rely on AC_PROG_CC. 10834fda9279dSmrgAC_DEFUN([_AM_DEPENDENCIES], 10835fda9279dSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 10836fda9279dSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 10837fda9279dSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 10838fda9279dSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 10839fda9279dSmrg 10840fda9279dSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 10841fda9279dSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 10842fda9279dSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 10843fda9279dSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 10844fda9279dSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 10845fda9279dSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 10846fda9279dSmrg [depcc="$$1" am_compiler_list=]) 10847fda9279dSmrg 10848fda9279dSmrgAC_CACHE_CHECK([dependency style of $depcc], 10849fda9279dSmrg [am_cv_$1_dependencies_compiler_type], 10850fda9279dSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 10851fda9279dSmrg # We make a subdir and do the tests there. Otherwise we can end up 10852fda9279dSmrg # making bogus files that we don't know about and never remove. For 10853fda9279dSmrg # instance it was reported that on HP-UX the gcc test will end up 10854fda9279dSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 10855fda9279dSmrg # in D". 10856fda9279dSmrg rm -rf conftest.dir 10857fda9279dSmrg mkdir conftest.dir 10858fda9279dSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 10859fda9279dSmrg # using a relative directory. 10860fda9279dSmrg cp "$am_depcomp" conftest.dir 10861fda9279dSmrg cd conftest.dir 10862fda9279dSmrg # We will build objects and dependencies in a subdirectory because 10863fda9279dSmrg # it helps to detect inapplicable dependency modes. For instance 10864fda9279dSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 10865fda9279dSmrg # side effect of compilation, but ICC will put the dependencies in 10866fda9279dSmrg # the current directory while Tru64 will put them in the object 10867fda9279dSmrg # directory. 10868fda9279dSmrg mkdir sub 10869fda9279dSmrg 10870fda9279dSmrg am_cv_$1_dependencies_compiler_type=none 10871fda9279dSmrg if test "$am_compiler_list" = ""; then 10872fda9279dSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 10873fda9279dSmrg fi 10874fda9279dSmrg am__universal=false 10875fda9279dSmrg m4_case([$1], [CC], 10876fda9279dSmrg [case " $depcc " in #( 10877fda9279dSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 10878fda9279dSmrg esac], 10879fda9279dSmrg [CXX], 10880fda9279dSmrg [case " $depcc " in #( 10881fda9279dSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 10882fda9279dSmrg esac]) 10883fda9279dSmrg 10884fda9279dSmrg for depmode in $am_compiler_list; do 10885fda9279dSmrg # Setup a source with many dependencies, because some compilers 10886fda9279dSmrg # like to wrap large dependency lists on column 80 (with \), and 10887fda9279dSmrg # we should not choose a depcomp mode which is confused by this. 10888fda9279dSmrg # 10889fda9279dSmrg # We need to recreate these files for each test, as the compiler may 10890fda9279dSmrg # overwrite some of them when testing with obscure command lines. 10891fda9279dSmrg # This happens at least with the AIX C compiler. 10892fda9279dSmrg : > sub/conftest.c 10893fda9279dSmrg for i in 1 2 3 4 5 6; do 10894fda9279dSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 10895fda9279dSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 10896fda9279dSmrg # Solaris 10 /bin/sh. 10897fda9279dSmrg echo '/* dummy */' > sub/conftst$i.h 10898fda9279dSmrg done 10899fda9279dSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 10900fda9279dSmrg 10901fda9279dSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 10902fda9279dSmrg # mode. It turns out that the SunPro C++ compiler does not properly 10903fda9279dSmrg # handle '-M -o', and we need to detect this. Also, some Intel 10904fda9279dSmrg # versions had trouble with output in subdirs. 10905fda9279dSmrg am__obj=sub/conftest.${OBJEXT-o} 10906fda9279dSmrg am__minus_obj="-o $am__obj" 10907fda9279dSmrg case $depmode in 10908fda9279dSmrg gcc) 10909fda9279dSmrg # This depmode causes a compiler race in universal mode. 10910fda9279dSmrg test "$am__universal" = false || continue 10911fda9279dSmrg ;; 10912fda9279dSmrg nosideeffect) 10913fda9279dSmrg # After this tag, mechanisms are not by side-effect, so they'll 10914fda9279dSmrg # only be used when explicitly requested. 10915fda9279dSmrg if test "x$enable_dependency_tracking" = xyes; then 10916fda9279dSmrg continue 10917fda9279dSmrg else 10918fda9279dSmrg break 10919fda9279dSmrg fi 10920fda9279dSmrg ;; 10921fda9279dSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 10922fda9279dSmrg # This compiler won't grok '-c -o', but also, the minuso test has 10923fda9279dSmrg # not run yet. These depmodes are late enough in the game, and 10924fda9279dSmrg # so weak that their functioning should not be impacted. 10925fda9279dSmrg am__obj=conftest.${OBJEXT-o} 10926fda9279dSmrg am__minus_obj= 10927fda9279dSmrg ;; 10928fda9279dSmrg none) break ;; 10929fda9279dSmrg esac 10930fda9279dSmrg if depmode=$depmode \ 10931fda9279dSmrg source=sub/conftest.c object=$am__obj \ 10932fda9279dSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 10933fda9279dSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 10934fda9279dSmrg >/dev/null 2>conftest.err && 10935fda9279dSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 10936fda9279dSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 10937fda9279dSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 10938fda9279dSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 10939fda9279dSmrg # icc doesn't choke on unknown options, it will just issue warnings 10940fda9279dSmrg # or remarks (even with -Werror). So we grep stderr for any message 10941fda9279dSmrg # that says an option was ignored or not supported. 10942fda9279dSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 10943fda9279dSmrg # icc: Command line warning: ignoring option '-M'; no argument required 10944fda9279dSmrg # The diagnosis changed in icc 8.0: 10945fda9279dSmrg # icc: Command line remark: option '-MP' not supported 10946fda9279dSmrg if (grep 'ignoring option' conftest.err || 10947fda9279dSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 10948fda9279dSmrg am_cv_$1_dependencies_compiler_type=$depmode 10949fda9279dSmrg break 10950fda9279dSmrg fi 10951fda9279dSmrg fi 10952fda9279dSmrg done 10953fda9279dSmrg 10954fda9279dSmrg cd .. 10955fda9279dSmrg rm -rf conftest.dir 10956fda9279dSmrgelse 10957fda9279dSmrg am_cv_$1_dependencies_compiler_type=none 10958fda9279dSmrgfi 10959fda9279dSmrg]) 10960fda9279dSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 10961fda9279dSmrgAM_CONDITIONAL([am__fastdep$1], [ 10962fda9279dSmrg test "x$enable_dependency_tracking" != xno \ 10963fda9279dSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 10964fda9279dSmrg]) 10965fda9279dSmrg 10966fda9279dSmrg 10967fda9279dSmrg# AM_SET_DEPDIR 10968fda9279dSmrg# ------------- 10969fda9279dSmrg# Choose a directory name for dependency files. 10970fda9279dSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 10971fda9279dSmrgAC_DEFUN([AM_SET_DEPDIR], 10972fda9279dSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 10973fda9279dSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 10974fda9279dSmrg]) 10975fda9279dSmrg 10976fda9279dSmrg 10977fda9279dSmrg# AM_DEP_TRACK 10978fda9279dSmrg# ------------ 10979fda9279dSmrgAC_DEFUN([AM_DEP_TRACK], 10980fda9279dSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 10981fda9279dSmrgAS_HELP_STRING( 10982fda9279dSmrg [--enable-dependency-tracking], 10983fda9279dSmrg [do not reject slow dependency extractors]) 10984fda9279dSmrgAS_HELP_STRING( 10985fda9279dSmrg [--disable-dependency-tracking], 10986fda9279dSmrg [speeds up one-time build])]) 10987fda9279dSmrgif test "x$enable_dependency_tracking" != xno; then 10988fda9279dSmrg am_depcomp="$ac_aux_dir/depcomp" 10989fda9279dSmrg AMDEPBACKSLASH='\' 10990fda9279dSmrg am__nodep='_no' 10991fda9279dSmrgfi 10992fda9279dSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 10993fda9279dSmrgAC_SUBST([AMDEPBACKSLASH])dnl 10994fda9279dSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 10995fda9279dSmrgAC_SUBST([am__nodep])dnl 10996fda9279dSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 10997fda9279dSmrg]) 10998fda9279dSmrg 10999fda9279dSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 11000fda9279dSmrg 11001fda9279dSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 11002fda9279dSmrg# 11003fda9279dSmrg# This file is free software; the Free Software Foundation 11004fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11005fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11006fda9279dSmrg 11007fda9279dSmrg 11008fda9279dSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 11009fda9279dSmrg# ------------------------------ 11010fda9279dSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11011fda9279dSmrg[{ 11012fda9279dSmrg # Older Autoconf quotes --file arguments for eval, but not when files 11013fda9279dSmrg # are listed without --file. Let's play safe and only enable the eval 11014fda9279dSmrg # if we detect the quoting. 11015fda9279dSmrg case $CONFIG_FILES in 11016fda9279dSmrg *\'*) eval set x "$CONFIG_FILES" ;; 11017fda9279dSmrg *) set x $CONFIG_FILES ;; 11018fda9279dSmrg esac 11019fda9279dSmrg shift 11020fda9279dSmrg for mf 11021fda9279dSmrg do 11022fda9279dSmrg # Strip MF so we end up with the name of the file. 11023fda9279dSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11024fda9279dSmrg # Check whether this is an Automake generated Makefile or not. 11025fda9279dSmrg # We used to match only the files named 'Makefile.in', but 11026fda9279dSmrg # some people rename them; so instead we look at the file content. 11027fda9279dSmrg # Grep'ing the first line is not enough: some people post-process 11028fda9279dSmrg # each Makefile.in and add a new line on top of each file to say so. 11029fda9279dSmrg # Grep'ing the whole file is not good either: AIX grep has a line 11030fda9279dSmrg # limit of 2048, but all sed's we know have understand at least 4000. 11031fda9279dSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11032fda9279dSmrg dirpart=`AS_DIRNAME("$mf")` 11033fda9279dSmrg else 11034fda9279dSmrg continue 11035fda9279dSmrg fi 11036fda9279dSmrg # Extract the definition of DEPDIR, am__include, and am__quote 11037fda9279dSmrg # from the Makefile without running 'make'. 11038fda9279dSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11039fda9279dSmrg test -z "$DEPDIR" && continue 11040fda9279dSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11041fda9279dSmrg test -z "$am__include" && continue 11042fda9279dSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11043fda9279dSmrg # Find all dependency output files, they are included files with 11044fda9279dSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11045fda9279dSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 11046fda9279dSmrg # expansion. 11047fda9279dSmrg for file in `sed -n " 11048fda9279dSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11049fda9279dSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11050fda9279dSmrg # Make sure the directory exists. 11051fda9279dSmrg test -f "$dirpart/$file" && continue 11052fda9279dSmrg fdir=`AS_DIRNAME(["$file"])` 11053fda9279dSmrg AS_MKDIR_P([$dirpart/$fdir]) 11054fda9279dSmrg # echo "creating $dirpart/$file" 11055fda9279dSmrg echo '# dummy' > "$dirpart/$file" 11056fda9279dSmrg done 11057fda9279dSmrg done 11058fda9279dSmrg} 11059fda9279dSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11060fda9279dSmrg 11061fda9279dSmrg 11062fda9279dSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 11063fda9279dSmrg# ----------------------------- 11064fda9279dSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 11065fda9279dSmrg# 11066fda9279dSmrg# This code is only required when automatic dependency tracking 11067fda9279dSmrg# is enabled. FIXME. This creates each '.P' file that we will 11068fda9279dSmrg# need in order to bootstrap the dependency handling code. 11069fda9279dSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11070fda9279dSmrg[AC_CONFIG_COMMANDS([depfiles], 11071fda9279dSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11072fda9279dSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11073fda9279dSmrg]) 11074fda9279dSmrg 11075fda9279dSmrg# Do all the work for Automake. -*- Autoconf -*- 11076fda9279dSmrg 11077fda9279dSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 11078fda9279dSmrg# 11079fda9279dSmrg# This file is free software; the Free Software Foundation 11080fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11081fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11082fda9279dSmrg 11083fda9279dSmrg# This macro actually does too much. Some checks are only needed if 11084fda9279dSmrg# your package does certain things. But this isn't really a big deal. 11085fda9279dSmrg 11086fda9279dSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 11087fda9279dSmrgm4_define([AC_PROG_CC], 11088fda9279dSmrgm4_defn([AC_PROG_CC]) 11089fda9279dSmrg[_AM_PROG_CC_C_O 11090fda9279dSmrg]) 11091fda9279dSmrg 11092fda9279dSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11093fda9279dSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 11094fda9279dSmrg# ----------------------------------------------- 11095fda9279dSmrg# The call with PACKAGE and VERSION arguments is the old style 11096fda9279dSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11097fda9279dSmrg# and VERSION should now be passed to AC_INIT and removed from 11098fda9279dSmrg# the call to AM_INIT_AUTOMAKE. 11099fda9279dSmrg# We support both call styles for the transition. After 11100fda9279dSmrg# the next Automake release, Autoconf can make the AC_INIT 11101fda9279dSmrg# arguments mandatory, and then we can depend on a new Autoconf 11102fda9279dSmrg# release and drop the old call support. 11103fda9279dSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11104fda9279dSmrg[AC_PREREQ([2.65])dnl 11105fda9279dSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11106fda9279dSmrgdnl the ones we care about. 11107fda9279dSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11108fda9279dSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11109fda9279dSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11110fda9279dSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11111fda9279dSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11112fda9279dSmrg # is not polluted with repeated "-I." 11113fda9279dSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11114fda9279dSmrg # test to see if srcdir already configured 11115fda9279dSmrg if test -f $srcdir/config.status; then 11116fda9279dSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11117fda9279dSmrg fi 11118fda9279dSmrgfi 11119fda9279dSmrg 11120fda9279dSmrg# test whether we have cygpath 11121fda9279dSmrgif test -z "$CYGPATH_W"; then 11122fda9279dSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 11123fda9279dSmrg CYGPATH_W='cygpath -w' 11124fda9279dSmrg else 11125fda9279dSmrg CYGPATH_W=echo 11126fda9279dSmrg fi 11127fda9279dSmrgfi 11128fda9279dSmrgAC_SUBST([CYGPATH_W]) 11129fda9279dSmrg 11130fda9279dSmrg# Define the identity of the package. 11131fda9279dSmrgdnl Distinguish between old-style and new-style calls. 11132fda9279dSmrgm4_ifval([$2], 11133fda9279dSmrg[AC_DIAGNOSE([obsolete], 11134fda9279dSmrg [$0: two- and three-arguments forms are deprecated.]) 11135fda9279dSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11136fda9279dSmrg AC_SUBST([PACKAGE], [$1])dnl 11137fda9279dSmrg AC_SUBST([VERSION], [$2])], 11138fda9279dSmrg[_AM_SET_OPTIONS([$1])dnl 11139fda9279dSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11140fda9279dSmrgm4_if( 11141fda9279dSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11142fda9279dSmrg [ok:ok],, 11143fda9279dSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11144fda9279dSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11145fda9279dSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11146fda9279dSmrg 11147fda9279dSmrg_AM_IF_OPTION([no-define],, 11148fda9279dSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11149fda9279dSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11150fda9279dSmrg 11151fda9279dSmrg# Some tools Automake needs. 11152fda9279dSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11153fda9279dSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11154fda9279dSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11155fda9279dSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 11156fda9279dSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11157fda9279dSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 11158fda9279dSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 11159fda9279dSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11160fda9279dSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11161fda9279dSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11162fda9279dSmrg# For better backward compatibility. To be removed once Automake 1.9.x 11163fda9279dSmrg# dies out for good. For more background, see: 11164fda9279dSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11165fda9279dSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11166fda9279dSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11167fda9279dSmrg# We need awk for the "check" target. The system "awk" is bad on 11168fda9279dSmrg# some platforms. 11169fda9279dSmrgAC_REQUIRE([AC_PROG_AWK])dnl 11170fda9279dSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11171fda9279dSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11172fda9279dSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11173fda9279dSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11174fda9279dSmrg [_AM_PROG_TAR([v7])])]) 11175fda9279dSmrg_AM_IF_OPTION([no-dependencies],, 11176fda9279dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11177fda9279dSmrg [_AM_DEPENDENCIES([CC])], 11178fda9279dSmrg [m4_define([AC_PROG_CC], 11179fda9279dSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11180fda9279dSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11181fda9279dSmrg [_AM_DEPENDENCIES([CXX])], 11182fda9279dSmrg [m4_define([AC_PROG_CXX], 11183fda9279dSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11184fda9279dSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11185fda9279dSmrg [_AM_DEPENDENCIES([OBJC])], 11186fda9279dSmrg [m4_define([AC_PROG_OBJC], 11187fda9279dSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11188fda9279dSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11189fda9279dSmrg [_AM_DEPENDENCIES([OBJCXX])], 11190fda9279dSmrg [m4_define([AC_PROG_OBJCXX], 11191fda9279dSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11192fda9279dSmrg]) 11193fda9279dSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 11194fda9279dSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 11195fda9279dSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11196fda9279dSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11197fda9279dSmrgAC_CONFIG_COMMANDS_PRE(dnl 11198fda9279dSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11199fda9279dSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11200fda9279dSmrg 11201fda9279dSmrg# POSIX will say in a future version that running "rm -f" with no argument 11202fda9279dSmrg# is OK; and we want to be able to make that assumption in our Makefile 11203fda9279dSmrg# recipes. So use an aggressive probe to check that the usage we want is 11204fda9279dSmrg# actually supported "in the wild" to an acceptable degree. 11205fda9279dSmrg# See automake bug#10828. 11206fda9279dSmrg# To make any issue more visible, cause the running configure to be aborted 11207fda9279dSmrg# by default if the 'rm' program in use doesn't match our expectations; the 11208fda9279dSmrg# user can still override this though. 11209fda9279dSmrgif rm -f && rm -fr && rm -rf; then : OK; else 11210fda9279dSmrg cat >&2 <<'END' 11211fda9279dSmrgOops! 11212fda9279dSmrg 11213fda9279dSmrgYour 'rm' program seems unable to run without file operands specified 11214fda9279dSmrgon the command line, even when the '-f' option is present. This is contrary 11215fda9279dSmrgto the behaviour of most rm programs out there, and not conforming with 11216fda9279dSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 11217fda9279dSmrg 11218fda9279dSmrgPlease tell bug-automake@gnu.org about your system, including the value 11219fda9279dSmrgof your $PATH and any error possibly output before this message. This 11220fda9279dSmrgcan help us improve future automake versions. 11221fda9279dSmrg 11222fda9279dSmrgEND 11223fda9279dSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 11224fda9279dSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 11225fda9279dSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 11226fda9279dSmrg echo >&2 11227fda9279dSmrg else 11228fda9279dSmrg cat >&2 <<'END' 11229fda9279dSmrgAborting the configuration process, to ensure you take notice of the issue. 11230fda9279dSmrg 11231fda9279dSmrgYou can download and install GNU coreutils to get an 'rm' implementation 11232fda9279dSmrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 11233fda9279dSmrg 11234fda9279dSmrgIf you want to complete the configuration process using your problematic 11235fda9279dSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 11236fda9279dSmrgto "yes", and re-run configure. 11237fda9279dSmrg 11238fda9279dSmrgEND 11239fda9279dSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 11240fda9279dSmrg fi 11241fda9279dSmrgfi]) 11242fda9279dSmrg 11243fda9279dSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11244fda9279dSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11245fda9279dSmrgdnl mangled by Autoconf and run in a shell conditional statement. 11246fda9279dSmrgm4_define([_AC_COMPILER_EXEEXT], 11247fda9279dSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11248fda9279dSmrg 11249fda9279dSmrg# When config.status generates a header, we must update the stamp-h file. 11250fda9279dSmrg# This file resides in the same directory as the config header 11251fda9279dSmrg# that is generated. The stamp files are numbered to have different names. 11252fda9279dSmrg 11253fda9279dSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11254fda9279dSmrg# loop where config.status creates the headers, so we can generate 11255fda9279dSmrg# our stamp files there. 11256fda9279dSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11257fda9279dSmrg[# Compute $1's index in $config_headers. 11258fda9279dSmrg_am_arg=$1 11259fda9279dSmrg_am_stamp_count=1 11260fda9279dSmrgfor _am_header in $config_headers :; do 11261fda9279dSmrg case $_am_header in 11262fda9279dSmrg $_am_arg | $_am_arg:* ) 11263fda9279dSmrg break ;; 11264fda9279dSmrg * ) 11265fda9279dSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11266fda9279dSmrg esac 11267fda9279dSmrgdone 11268fda9279dSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11269fda9279dSmrg 11270fda9279dSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11271fda9279dSmrg# 11272fda9279dSmrg# This file is free software; the Free Software Foundation 11273fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11274fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11275fda9279dSmrg 11276fda9279dSmrg# AM_PROG_INSTALL_SH 11277fda9279dSmrg# ------------------ 11278fda9279dSmrg# Define $install_sh. 11279fda9279dSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 11280fda9279dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11281fda9279dSmrgif test x"${install_sh}" != xset; then 11282fda9279dSmrg case $am_aux_dir in 11283fda9279dSmrg *\ * | *\ *) 11284fda9279dSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11285fda9279dSmrg *) 11286fda9279dSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11287fda9279dSmrg esac 11288fda9279dSmrgfi 11289fda9279dSmrgAC_SUBST([install_sh])]) 11290fda9279dSmrg 11291fda9279dSmrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 11292fda9279dSmrg# 11293fda9279dSmrg# This file is free software; the Free Software Foundation 11294fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11295fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11296fda9279dSmrg 11297fda9279dSmrg# Check whether the underlying file-system supports filenames 11298fda9279dSmrg# with a leading dot. For instance MS-DOS doesn't. 11299fda9279dSmrgAC_DEFUN([AM_SET_LEADING_DOT], 11300fda9279dSmrg[rm -rf .tst 2>/dev/null 11301fda9279dSmrgmkdir .tst 2>/dev/null 11302fda9279dSmrgif test -d .tst; then 11303fda9279dSmrg am__leading_dot=. 11304fda9279dSmrgelse 11305fda9279dSmrg am__leading_dot=_ 11306fda9279dSmrgfi 11307fda9279dSmrgrmdir .tst 2>/dev/null 11308fda9279dSmrgAC_SUBST([am__leading_dot])]) 11309fda9279dSmrg 11310fda9279dSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11311fda9279dSmrg 11312fda9279dSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11313fda9279dSmrg# 11314fda9279dSmrg# This file is free software; the Free Software Foundation 11315fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11316fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11317fda9279dSmrg 11318fda9279dSmrg# AM_MAKE_INCLUDE() 11319fda9279dSmrg# ----------------- 11320fda9279dSmrg# Check to see how make treats includes. 11321fda9279dSmrgAC_DEFUN([AM_MAKE_INCLUDE], 11322fda9279dSmrg[am_make=${MAKE-make} 11323fda9279dSmrgcat > confinc << 'END' 11324fda9279dSmrgam__doit: 11325fda9279dSmrg @echo this is the am__doit target 11326fda9279dSmrg.PHONY: am__doit 11327fda9279dSmrgEND 11328fda9279dSmrg# If we don't find an include directive, just comment out the code. 11329fda9279dSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 11330fda9279dSmrgam__include="#" 11331fda9279dSmrgam__quote= 11332fda9279dSmrg_am_result=none 11333fda9279dSmrg# First try GNU make style include. 11334fda9279dSmrgecho "include confinc" > confmf 11335fda9279dSmrg# Ignore all kinds of additional output from 'make'. 11336fda9279dSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11337fda9279dSmrg*the\ am__doit\ target*) 11338fda9279dSmrg am__include=include 11339fda9279dSmrg am__quote= 11340fda9279dSmrg _am_result=GNU 11341fda9279dSmrg ;; 11342fda9279dSmrgesac 11343fda9279dSmrg# Now try BSD make style include. 11344fda9279dSmrgif test "$am__include" = "#"; then 11345fda9279dSmrg echo '.include "confinc"' > confmf 11346fda9279dSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 11347fda9279dSmrg *the\ am__doit\ target*) 11348fda9279dSmrg am__include=.include 11349fda9279dSmrg am__quote="\"" 11350fda9279dSmrg _am_result=BSD 11351fda9279dSmrg ;; 11352fda9279dSmrg esac 11353fda9279dSmrgfi 11354fda9279dSmrgAC_SUBST([am__include]) 11355fda9279dSmrgAC_SUBST([am__quote]) 11356fda9279dSmrgAC_MSG_RESULT([$_am_result]) 11357fda9279dSmrgrm -f confinc confmf 11358fda9279dSmrg]) 11359fda9279dSmrg 11360fda9279dSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11361fda9279dSmrg 11362fda9279dSmrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 11363fda9279dSmrg# 11364fda9279dSmrg# This file is free software; the Free Software Foundation 11365fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11366fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11367fda9279dSmrg 11368fda9279dSmrg# AM_MISSING_PROG(NAME, PROGRAM) 11369fda9279dSmrg# ------------------------------ 11370fda9279dSmrgAC_DEFUN([AM_MISSING_PROG], 11371fda9279dSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11372fda9279dSmrg$1=${$1-"${am_missing_run}$2"} 11373fda9279dSmrgAC_SUBST($1)]) 11374fda9279dSmrg 11375fda9279dSmrg# AM_MISSING_HAS_RUN 11376fda9279dSmrg# ------------------ 11377fda9279dSmrg# Define MISSING if not defined so far and test if it is modern enough. 11378fda9279dSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 11379fda9279dSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 11380fda9279dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11381fda9279dSmrgAC_REQUIRE_AUX_FILE([missing])dnl 11382fda9279dSmrgif test x"${MISSING+set}" != xset; then 11383fda9279dSmrg case $am_aux_dir in 11384fda9279dSmrg *\ * | *\ *) 11385fda9279dSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11386fda9279dSmrg *) 11387fda9279dSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 11388fda9279dSmrg esac 11389fda9279dSmrgfi 11390fda9279dSmrg# Use eval to expand $SHELL 11391fda9279dSmrgif eval "$MISSING --is-lightweight"; then 11392fda9279dSmrg am_missing_run="$MISSING " 11393fda9279dSmrgelse 11394fda9279dSmrg am_missing_run= 11395fda9279dSmrg AC_MSG_WARN(['missing' script is too old or missing]) 11396fda9279dSmrgfi 11397fda9279dSmrg]) 11398fda9279dSmrg 11399fda9279dSmrg# Helper functions for option handling. -*- Autoconf -*- 11400fda9279dSmrg 11401fda9279dSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11402fda9279dSmrg# 11403fda9279dSmrg# This file is free software; the Free Software Foundation 11404fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11405fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11406fda9279dSmrg 11407fda9279dSmrg# _AM_MANGLE_OPTION(NAME) 11408fda9279dSmrg# ----------------------- 11409fda9279dSmrgAC_DEFUN([_AM_MANGLE_OPTION], 11410fda9279dSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11411fda9279dSmrg 11412fda9279dSmrg# _AM_SET_OPTION(NAME) 11413fda9279dSmrg# -------------------- 11414fda9279dSmrg# Set option NAME. Presently that only means defining a flag for this option. 11415fda9279dSmrgAC_DEFUN([_AM_SET_OPTION], 11416fda9279dSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 11417fda9279dSmrg 11418fda9279dSmrg# _AM_SET_OPTIONS(OPTIONS) 11419fda9279dSmrg# ------------------------ 11420fda9279dSmrg# OPTIONS is a space-separated list of Automake options. 11421fda9279dSmrgAC_DEFUN([_AM_SET_OPTIONS], 11422fda9279dSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11423fda9279dSmrg 11424fda9279dSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11425fda9279dSmrg# ------------------------------------------- 11426fda9279dSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11427fda9279dSmrgAC_DEFUN([_AM_IF_OPTION], 11428fda9279dSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 11429fda9279dSmrg 11430fda9279dSmrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 11431fda9279dSmrg# 11432fda9279dSmrg# This file is free software; the Free Software Foundation 11433fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11434fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11435fda9279dSmrg 11436fda9279dSmrg# _AM_PROG_CC_C_O 11437fda9279dSmrg# --------------- 11438fda9279dSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 11439fda9279dSmrg# to automatically call this. 11440fda9279dSmrgAC_DEFUN([_AM_PROG_CC_C_O], 11441fda9279dSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11442fda9279dSmrgAC_REQUIRE_AUX_FILE([compile])dnl 11443fda9279dSmrgAC_LANG_PUSH([C])dnl 11444fda9279dSmrgAC_CACHE_CHECK( 11445fda9279dSmrg [whether $CC understands -c and -o together], 11446fda9279dSmrg [am_cv_prog_cc_c_o], 11447fda9279dSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 11448fda9279dSmrg # Make sure it works both with $CC and with simple cc. 11449fda9279dSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 11450fda9279dSmrg # compilers refuse to overwrite an existing .o file with -o, 11451fda9279dSmrg # though they will create one. 11452fda9279dSmrg am_cv_prog_cc_c_o=yes 11453fda9279dSmrg for am_i in 1 2; do 11454fda9279dSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 11455fda9279dSmrg && test -f conftest2.$ac_objext; then 11456fda9279dSmrg : OK 11457fda9279dSmrg else 11458fda9279dSmrg am_cv_prog_cc_c_o=no 11459fda9279dSmrg break 11460fda9279dSmrg fi 11461fda9279dSmrg done 11462fda9279dSmrg rm -f core conftest* 11463fda9279dSmrg unset am_i]) 11464fda9279dSmrgif test "$am_cv_prog_cc_c_o" != yes; then 11465fda9279dSmrg # Losing compiler, so override with the script. 11466fda9279dSmrg # FIXME: It is wrong to rewrite CC. 11467fda9279dSmrg # But if we don't then we get into trouble of one sort or another. 11468fda9279dSmrg # A longer-term fix would be to have automake use am__CC in this case, 11469fda9279dSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 11470fda9279dSmrg CC="$am_aux_dir/compile $CC" 11471fda9279dSmrgfi 11472fda9279dSmrgAC_LANG_POP([C])]) 11473fda9279dSmrg 11474fda9279dSmrg# For backward compatibility. 11475fda9279dSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 11476fda9279dSmrg 11477fda9279dSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11478fda9279dSmrg# 11479fda9279dSmrg# This file is free software; the Free Software Foundation 11480fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11481fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11482fda9279dSmrg 11483fda9279dSmrg# AM_RUN_LOG(COMMAND) 11484fda9279dSmrg# ------------------- 11485fda9279dSmrg# Run COMMAND, save the exit status in ac_status, and log it. 11486fda9279dSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 11487fda9279dSmrgAC_DEFUN([AM_RUN_LOG], 11488fda9279dSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 11489fda9279dSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 11490fda9279dSmrg ac_status=$? 11491fda9279dSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 11492fda9279dSmrg (exit $ac_status); }]) 11493fda9279dSmrg 11494fda9279dSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 11495fda9279dSmrg 11496fda9279dSmrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 11497fda9279dSmrg# 11498fda9279dSmrg# This file is free software; the Free Software Foundation 11499fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11500fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11501fda9279dSmrg 11502fda9279dSmrg# AM_SANITY_CHECK 11503fda9279dSmrg# --------------- 11504fda9279dSmrgAC_DEFUN([AM_SANITY_CHECK], 11505fda9279dSmrg[AC_MSG_CHECKING([whether build environment is sane]) 11506fda9279dSmrg# Reject unsafe characters in $srcdir or the absolute working directory 11507fda9279dSmrg# name. Accept space and tab only in the latter. 11508fda9279dSmrgam_lf=' 11509fda9279dSmrg' 11510fda9279dSmrgcase `pwd` in 11511fda9279dSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 11512fda9279dSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 11513fda9279dSmrgesac 11514fda9279dSmrgcase $srcdir in 11515fda9279dSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 11516fda9279dSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 11517fda9279dSmrgesac 11518fda9279dSmrg 11519fda9279dSmrg# Do 'set' in a subshell so we don't clobber the current shell's 11520fda9279dSmrg# arguments. Must try -L first in case configure is actually a 11521fda9279dSmrg# symlink; some systems play weird games with the mod time of symlinks 11522fda9279dSmrg# (eg FreeBSD returns the mod time of the symlink's containing 11523fda9279dSmrg# directory). 11524fda9279dSmrgif ( 11525fda9279dSmrg am_has_slept=no 11526fda9279dSmrg for am_try in 1 2; do 11527fda9279dSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 11528fda9279dSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 11529fda9279dSmrg if test "$[*]" = "X"; then 11530fda9279dSmrg # -L didn't work. 11531fda9279dSmrg set X `ls -t "$srcdir/configure" conftest.file` 11532fda9279dSmrg fi 11533fda9279dSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 11534fda9279dSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 11535fda9279dSmrg 11536fda9279dSmrg # If neither matched, then we have a broken ls. This can happen 11537fda9279dSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 11538fda9279dSmrg # broken ls alias from the environment. This has actually 11539fda9279dSmrg # happened. Such a system could not be considered "sane". 11540fda9279dSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 11541fda9279dSmrg alias in your environment]) 11542fda9279dSmrg fi 11543fda9279dSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 11544fda9279dSmrg break 11545fda9279dSmrg fi 11546fda9279dSmrg # Just in case. 11547fda9279dSmrg sleep 1 11548fda9279dSmrg am_has_slept=yes 11549fda9279dSmrg done 11550fda9279dSmrg test "$[2]" = conftest.file 11551fda9279dSmrg ) 11552fda9279dSmrgthen 11553fda9279dSmrg # Ok. 11554fda9279dSmrg : 11555fda9279dSmrgelse 11556fda9279dSmrg AC_MSG_ERROR([newly created file is older than distributed files! 11557fda9279dSmrgCheck your system clock]) 11558fda9279dSmrgfi 11559fda9279dSmrgAC_MSG_RESULT([yes]) 11560fda9279dSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 11561fda9279dSmrg# generated files are strictly newer. 11562fda9279dSmrgam_sleep_pid= 11563fda9279dSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 11564fda9279dSmrg ( sleep 1 ) & 11565fda9279dSmrg am_sleep_pid=$! 11566fda9279dSmrgfi 11567fda9279dSmrgAC_CONFIG_COMMANDS_PRE( 11568fda9279dSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 11569fda9279dSmrg if test -n "$am_sleep_pid"; then 11570fda9279dSmrg # Hide warnings about reused PIDs. 11571fda9279dSmrg wait $am_sleep_pid 2>/dev/null 11572fda9279dSmrg fi 11573fda9279dSmrg AC_MSG_RESULT([done])]) 11574fda9279dSmrgrm -f conftest.file 11575fda9279dSmrg]) 11576fda9279dSmrg 11577fda9279dSmrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 11578fda9279dSmrg# 11579fda9279dSmrg# This file is free software; the Free Software Foundation 11580fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11581fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11582fda9279dSmrg 11583fda9279dSmrg# AM_SILENT_RULES([DEFAULT]) 11584fda9279dSmrg# -------------------------- 11585fda9279dSmrg# Enable less verbose build rules; with the default set to DEFAULT 11586fda9279dSmrg# ("yes" being less verbose, "no" or empty being verbose). 11587fda9279dSmrgAC_DEFUN([AM_SILENT_RULES], 11588fda9279dSmrg[AC_ARG_ENABLE([silent-rules], [dnl 11589fda9279dSmrgAS_HELP_STRING( 11590fda9279dSmrg [--enable-silent-rules], 11591fda9279dSmrg [less verbose build output (undo: "make V=1")]) 11592fda9279dSmrgAS_HELP_STRING( 11593fda9279dSmrg [--disable-silent-rules], 11594fda9279dSmrg [verbose build output (undo: "make V=0")])dnl 11595fda9279dSmrg]) 11596fda9279dSmrgcase $enable_silent_rules in @%:@ ((( 11597fda9279dSmrg yes) AM_DEFAULT_VERBOSITY=0;; 11598fda9279dSmrg no) AM_DEFAULT_VERBOSITY=1;; 11599fda9279dSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 11600fda9279dSmrgesac 11601fda9279dSmrgdnl 11602fda9279dSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 11603fda9279dSmrgdnl do not support nested variable expansions. 11604fda9279dSmrgdnl See automake bug#9928 and bug#10237. 11605fda9279dSmrgam_make=${MAKE-make} 11606fda9279dSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 11607fda9279dSmrg [am_cv_make_support_nested_variables], 11608fda9279dSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 11609fda9279dSmrgBAR0=false 11610fda9279dSmrgBAR1=true 11611fda9279dSmrgV=1 11612fda9279dSmrgam__doit: 11613fda9279dSmrg @$(TRUE) 11614fda9279dSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 11615fda9279dSmrg am_cv_make_support_nested_variables=yes 11616fda9279dSmrgelse 11617fda9279dSmrg am_cv_make_support_nested_variables=no 11618fda9279dSmrgfi]) 11619fda9279dSmrgif test $am_cv_make_support_nested_variables = yes; then 11620fda9279dSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 11621fda9279dSmrg AM_V='$(V)' 11622fda9279dSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 11623fda9279dSmrgelse 11624fda9279dSmrg AM_V=$AM_DEFAULT_VERBOSITY 11625fda9279dSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 11626fda9279dSmrgfi 11627fda9279dSmrgAC_SUBST([AM_V])dnl 11628fda9279dSmrgAM_SUBST_NOTMAKE([AM_V])dnl 11629fda9279dSmrgAC_SUBST([AM_DEFAULT_V])dnl 11630fda9279dSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 11631fda9279dSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 11632fda9279dSmrgAM_BACKSLASH='\' 11633fda9279dSmrgAC_SUBST([AM_BACKSLASH])dnl 11634fda9279dSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 11635fda9279dSmrg]) 11636fda9279dSmrg 11637fda9279dSmrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 11638fda9279dSmrg# 11639fda9279dSmrg# This file is free software; the Free Software Foundation 11640fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11641fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11642fda9279dSmrg 11643fda9279dSmrg# AM_PROG_INSTALL_STRIP 11644fda9279dSmrg# --------------------- 11645fda9279dSmrg# One issue with vendor 'install' (even GNU) is that you can't 11646fda9279dSmrg# specify the program used to strip binaries. This is especially 11647fda9279dSmrg# annoying in cross-compiling environments, where the build's strip 11648fda9279dSmrg# is unlikely to handle the host's binaries. 11649fda9279dSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 11650fda9279dSmrg# always use install-sh in "make install-strip", and initialize 11651fda9279dSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 11652fda9279dSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 11653fda9279dSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11654fda9279dSmrg# Installed binaries are usually stripped using 'strip' when the user 11655fda9279dSmrg# run "make install-strip". However 'strip' might not be the right 11656fda9279dSmrg# tool to use in cross-compilation environments, therefore Automake 11657fda9279dSmrg# will honor the 'STRIP' environment variable to overrule this program. 11658fda9279dSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 11659fda9279dSmrgif test "$cross_compiling" != no; then 11660fda9279dSmrg AC_CHECK_TOOL([STRIP], [strip], :) 11661fda9279dSmrgfi 11662fda9279dSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 11663fda9279dSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 11664fda9279dSmrg 11665fda9279dSmrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 11666fda9279dSmrg# 11667fda9279dSmrg# This file is free software; the Free Software Foundation 11668fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11669fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11670fda9279dSmrg 11671fda9279dSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 11672fda9279dSmrg# --------------------------- 11673fda9279dSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 11674fda9279dSmrg# This macro is traced by Automake. 11675fda9279dSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 11676fda9279dSmrg 11677fda9279dSmrg# AM_SUBST_NOTMAKE(VARIABLE) 11678fda9279dSmrg# -------------------------- 11679fda9279dSmrg# Public sister of _AM_SUBST_NOTMAKE. 11680fda9279dSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 11681fda9279dSmrg 11682fda9279dSmrg# Check how to create a tarball. -*- Autoconf -*- 11683fda9279dSmrg 11684fda9279dSmrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 11685fda9279dSmrg# 11686fda9279dSmrg# This file is free software; the Free Software Foundation 11687fda9279dSmrg# gives unlimited permission to copy and/or distribute it, 11688fda9279dSmrg# with or without modifications, as long as this notice is preserved. 11689fda9279dSmrg 11690fda9279dSmrg# _AM_PROG_TAR(FORMAT) 11691fda9279dSmrg# -------------------- 11692fda9279dSmrg# Check how to create a tarball in format FORMAT. 11693fda9279dSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 11694fda9279dSmrg# 11695fda9279dSmrg# Substitute a variable $(am__tar) that is a command 11696fda9279dSmrg# writing to stdout a FORMAT-tarball containing the directory 11697fda9279dSmrg# $tardir. 11698fda9279dSmrg# tardir=directory && $(am__tar) > result.tar 11699fda9279dSmrg# 11700fda9279dSmrg# Substitute a variable $(am__untar) that extract such 11701fda9279dSmrg# a tarball read from stdin. 11702fda9279dSmrg# $(am__untar) < result.tar 11703fda9279dSmrg# 11704fda9279dSmrgAC_DEFUN([_AM_PROG_TAR], 11705fda9279dSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 11706fda9279dSmrg# in the wild :-( We should find a proper way to deprecate it ... 11707fda9279dSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 11708fda9279dSmrg 11709fda9279dSmrg# We'll loop over all known methods to create a tar archive until one works. 11710fda9279dSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 11711fda9279dSmrg 11712fda9279dSmrgm4_if([$1], [v7], 11713fda9279dSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 11714fda9279dSmrg 11715fda9279dSmrg [m4_case([$1], 11716fda9279dSmrg [ustar], 11717fda9279dSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 11718fda9279dSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 11719fda9279dSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 11720fda9279dSmrg # and bug#13588). 11721fda9279dSmrg am_max_uid=2097151 # 2^21 - 1 11722fda9279dSmrg am_max_gid=$am_max_uid 11723fda9279dSmrg # The $UID and $GID variables are not portable, so we need to resort 11724fda9279dSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 11725fda9279dSmrg # below are definitely unexpected, so allow the users to see them 11726fda9279dSmrg # (that is, avoid stderr redirection). 11727fda9279dSmrg am_uid=`id -u || echo unknown` 11728fda9279dSmrg am_gid=`id -g || echo unknown` 11729fda9279dSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 11730fda9279dSmrg if test $am_uid -le $am_max_uid; then 11731fda9279dSmrg AC_MSG_RESULT([yes]) 11732fda9279dSmrg else 11733fda9279dSmrg AC_MSG_RESULT([no]) 11734fda9279dSmrg _am_tools=none 11735fda9279dSmrg fi 11736fda9279dSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 11737fda9279dSmrg if test $am_gid -le $am_max_gid; then 11738fda9279dSmrg AC_MSG_RESULT([yes]) 11739fda9279dSmrg else 11740fda9279dSmrg AC_MSG_RESULT([no]) 11741fda9279dSmrg _am_tools=none 11742fda9279dSmrg fi], 11743fda9279dSmrg 11744fda9279dSmrg [pax], 11745fda9279dSmrg [], 11746fda9279dSmrg 11747fda9279dSmrg [m4_fatal([Unknown tar format])]) 11748fda9279dSmrg 11749fda9279dSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 11750fda9279dSmrg 11751fda9279dSmrg # Go ahead even if we have the value already cached. We do so because we 11752fda9279dSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 11753fda9279dSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 11754fda9279dSmrg 11755fda9279dSmrg for _am_tool in $_am_tools; do 11756fda9279dSmrg case $_am_tool in 11757fda9279dSmrg gnutar) 11758fda9279dSmrg for _am_tar in tar gnutar gtar; do 11759fda9279dSmrg AM_RUN_LOG([$_am_tar --version]) && break 11760fda9279dSmrg done 11761fda9279dSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11762fda9279dSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11763fda9279dSmrg am__untar="$_am_tar -xf -" 11764fda9279dSmrg ;; 11765fda9279dSmrg plaintar) 11766fda9279dSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 11767fda9279dSmrg # ustar tarball either. 11768fda9279dSmrg (tar --version) >/dev/null 2>&1 && continue 11769fda9279dSmrg am__tar='tar chf - "$$tardir"' 11770fda9279dSmrg am__tar_='tar chf - "$tardir"' 11771fda9279dSmrg am__untar='tar xf -' 11772fda9279dSmrg ;; 11773fda9279dSmrg pax) 11774fda9279dSmrg am__tar='pax -L -x $1 -w "$$tardir"' 11775fda9279dSmrg am__tar_='pax -L -x $1 -w "$tardir"' 11776fda9279dSmrg am__untar='pax -r' 11777fda9279dSmrg ;; 11778fda9279dSmrg cpio) 11779fda9279dSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11780fda9279dSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11781fda9279dSmrg am__untar='cpio -i -H $1 -d' 11782fda9279dSmrg ;; 11783fda9279dSmrg none) 11784fda9279dSmrg am__tar=false 11785fda9279dSmrg am__tar_=false 11786fda9279dSmrg am__untar=false 11787fda9279dSmrg ;; 11788fda9279dSmrg esac 11789fda9279dSmrg 11790fda9279dSmrg # If the value was cached, stop now. We just wanted to have am__tar 11791fda9279dSmrg # and am__untar set. 11792fda9279dSmrg test -n "${am_cv_prog_tar_$1}" && break 11793fda9279dSmrg 11794fda9279dSmrg # tar/untar a dummy directory, and stop if the command works. 11795fda9279dSmrg rm -rf conftest.dir 11796fda9279dSmrg mkdir conftest.dir 11797fda9279dSmrg echo GrepMe > conftest.dir/file 11798fda9279dSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11799fda9279dSmrg rm -rf conftest.dir 11800fda9279dSmrg if test -s conftest.tar; then 11801fda9279dSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 11802fda9279dSmrg AM_RUN_LOG([cat conftest.dir/file]) 11803fda9279dSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11804fda9279dSmrg fi 11805fda9279dSmrg done 11806fda9279dSmrg rm -rf conftest.dir 11807fda9279dSmrg 11808fda9279dSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11809fda9279dSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11810fda9279dSmrg 11811fda9279dSmrgAC_SUBST([am__tar]) 11812fda9279dSmrgAC_SUBST([am__untar]) 11813fda9279dSmrg]) # _AM_PROG_TAR 11814fda9279dSmrg 11815