1255376Sdes# generated automatically by aclocal 1.14 -*- Autoconf -*- 2117610Sdes 3255376Sdes# Copyright (C) 1996-2013 Free Software Foundation, Inc. 4255376Sdes 5117610Sdes# This file is free software; the Free Software Foundation 6117610Sdes# gives unlimited permission to copy and/or distribute it, 7117610Sdes# with or without modifications, as long as this notice is preserved. 8117610Sdes 9117610Sdes# This program is distributed in the hope that it will be useful, 10117610Sdes# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11117610Sdes# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12117610Sdes# PARTICULAR PURPOSE. 13117610Sdes 14255376Sdesm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15228692Sdesm4_ifndef([AC_AUTOCONF_VERSION], 16228692Sdes [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17255376Sdesm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18255376Sdes[m4_warning([this file was generated for autoconf 2.69. 19228692SdesYou have another version of autoconf. It may work, but is not guaranteed to. 20228692SdesIf you have problems, you may need to regenerate the build system entirely. 21255376SdesTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22228692Sdes 23271947Sdes# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24271947Sdes# 25271947Sdes# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 26271947Sdes# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 27271947Sdes# Foundation, Inc. 28271947Sdes# Written by Gordon Matzigkeit, 1996 29271947Sdes# 30271947Sdes# This file is free software; the Free Software Foundation gives 31271947Sdes# unlimited permission to copy and/or distribute it, with or without 32271947Sdes# modifications, as long as this notice is preserved. 33271947Sdes 34271947Sdesm4_define([_LT_COPYING], [dnl 35271947Sdes# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 36271947Sdes# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 37271947Sdes# Foundation, Inc. 38271947Sdes# Written by Gordon Matzigkeit, 1996 39271947Sdes# 40271947Sdes# This file is part of GNU Libtool. 41271947Sdes# 42271947Sdes# GNU Libtool is free software; you can redistribute it and/or 43271947Sdes# modify it under the terms of the GNU General Public License as 44271947Sdes# published by the Free Software Foundation; either version 2 of 45271947Sdes# the License, or (at your option) any later version. 46271947Sdes# 47271947Sdes# As a special exception to the GNU General Public License, 48271947Sdes# if you distribute this file as part of a program or library that 49271947Sdes# is built using GNU Libtool, you may include this file under the 50271947Sdes# same distribution terms that you use for the rest of that program. 51271947Sdes# 52271947Sdes# GNU Libtool is distributed in the hope that it will be useful, 53271947Sdes# but WITHOUT ANY WARRANTY; without even the implied warranty of 54271947Sdes# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 55271947Sdes# GNU General Public License for more details. 56271947Sdes# 57271947Sdes# You should have received a copy of the GNU General Public License 58271947Sdes# along with GNU Libtool; see the file COPYING. If not, a copy 59271947Sdes# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 60271947Sdes# obtained by writing to the Free Software Foundation, Inc., 61271947Sdes# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62271947Sdes]) 63271947Sdes 64271947Sdes# serial 57 LT_INIT 65271947Sdes 66271947Sdes 67271947Sdes# LT_PREREQ(VERSION) 68271947Sdes# ------------------ 69271947Sdes# Complain and exit if this libtool version is less that VERSION. 70271947Sdesm4_defun([LT_PREREQ], 71271947Sdes[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 72271947Sdes [m4_default([$3], 73271947Sdes [m4_fatal([Libtool version $1 or higher is required], 74271947Sdes 63)])], 75271947Sdes [$2])]) 76271947Sdes 77271947Sdes 78271947Sdes# _LT_CHECK_BUILDDIR 79271947Sdes# ------------------ 80271947Sdes# Complain if the absolute build directory name contains unusual characters 81271947Sdesm4_defun([_LT_CHECK_BUILDDIR], 82271947Sdes[case `pwd` in 83271947Sdes *\ * | *\ *) 84271947Sdes AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 85271947Sdesesac 86271947Sdes]) 87271947Sdes 88271947Sdes 89271947Sdes# LT_INIT([OPTIONS]) 90271947Sdes# ------------------ 91271947SdesAC_DEFUN([LT_INIT], 92271947Sdes[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 93271947SdesAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 94271947SdesAC_BEFORE([$0], [LT_LANG])dnl 95271947SdesAC_BEFORE([$0], [LT_OUTPUT])dnl 96271947SdesAC_BEFORE([$0], [LTDL_INIT])dnl 97271947Sdesm4_require([_LT_CHECK_BUILDDIR])dnl 98271947Sdes 99271947Sdesdnl Autoconf doesn't catch unexpanded LT_ macros by default: 100271947Sdesm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 101271947Sdesm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 102271947Sdesdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 103271947Sdesdnl unless we require an AC_DEFUNed macro: 104271947SdesAC_REQUIRE([LTOPTIONS_VERSION])dnl 105271947SdesAC_REQUIRE([LTSUGAR_VERSION])dnl 106271947SdesAC_REQUIRE([LTVERSION_VERSION])dnl 107271947SdesAC_REQUIRE([LTOBSOLETE_VERSION])dnl 108271947Sdesm4_require([_LT_PROG_LTMAIN])dnl 109271947Sdes 110271947Sdes_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 111271947Sdes 112271947Sdesdnl Parse OPTIONS 113271947Sdes_LT_SET_OPTIONS([$0], [$1]) 114271947Sdes 115271947Sdes# This can be used to rebuild libtool when needed 116271947SdesLIBTOOL_DEPS="$ltmain" 117271947Sdes 118271947Sdes# Always use our own libtool. 119271947SdesLIBTOOL='$(SHELL) $(top_builddir)/libtool' 120271947SdesAC_SUBST(LIBTOOL)dnl 121271947Sdes 122271947Sdes_LT_SETUP 123271947Sdes 124271947Sdes# Only expand once: 125271947Sdesm4_define([LT_INIT]) 126271947Sdes])# LT_INIT 127271947Sdes 128271947Sdes# Old names: 129271947SdesAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 130271947SdesAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 131271947Sdesdnl aclocal-1.4 backwards compatibility: 132271947Sdesdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 133271947Sdesdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 134271947Sdes 135271947Sdes 136271947Sdes# _LT_CC_BASENAME(CC) 137271947Sdes# ------------------- 138271947Sdes# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 139271947Sdesm4_defun([_LT_CC_BASENAME], 140271947Sdes[for cc_temp in $1""; do 141271947Sdes case $cc_temp in 142271947Sdes compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 143271947Sdes distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 144271947Sdes \-*) ;; 145271947Sdes *) break;; 146271947Sdes esac 147271947Sdesdone 148271947Sdescc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 149271947Sdes]) 150271947Sdes 151271947Sdes 152271947Sdes# _LT_FILEUTILS_DEFAULTS 153271947Sdes# ---------------------- 154271947Sdes# It is okay to use these file commands and assume they have been set 155271947Sdes# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 156271947Sdesm4_defun([_LT_FILEUTILS_DEFAULTS], 157271947Sdes[: ${CP="cp -f"} 158271947Sdes: ${MV="mv -f"} 159271947Sdes: ${RM="rm -f"} 160271947Sdes])# _LT_FILEUTILS_DEFAULTS 161271947Sdes 162271947Sdes 163271947Sdes# _LT_SETUP 164271947Sdes# --------- 165271947Sdesm4_defun([_LT_SETUP], 166271947Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 167271947SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl 168271947SdesAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 169271947SdesAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170271947Sdes 171271947Sdes_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 172271947Sdesdnl 173271947Sdes_LT_DECL([], [host_alias], [0], [The host system])dnl 174271947Sdes_LT_DECL([], [host], [0])dnl 175271947Sdes_LT_DECL([], [host_os], [0])dnl 176271947Sdesdnl 177271947Sdes_LT_DECL([], [build_alias], [0], [The build system])dnl 178271947Sdes_LT_DECL([], [build], [0])dnl 179271947Sdes_LT_DECL([], [build_os], [0])dnl 180271947Sdesdnl 181271947SdesAC_REQUIRE([AC_PROG_CC])dnl 182271947SdesAC_REQUIRE([LT_PATH_LD])dnl 183271947SdesAC_REQUIRE([LT_PATH_NM])dnl 184271947Sdesdnl 185271947SdesAC_REQUIRE([AC_PROG_LN_S])dnl 186271947Sdestest -z "$LN_S" && LN_S="ln -s" 187271947Sdes_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 188271947Sdesdnl 189271947SdesAC_REQUIRE([LT_CMD_MAX_LEN])dnl 190271947Sdes_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 191271947Sdes_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 192271947Sdesdnl 193271947Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 194271947Sdesm4_require([_LT_CHECK_SHELL_FEATURES])dnl 195271947Sdesm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 196271947Sdesm4_require([_LT_CMD_RELOAD])dnl 197271947Sdesm4_require([_LT_CHECK_MAGIC_METHOD])dnl 198271947Sdesm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 199271947Sdesm4_require([_LT_CMD_OLD_ARCHIVE])dnl 200271947Sdesm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 201271947Sdesm4_require([_LT_WITH_SYSROOT])dnl 202271947Sdes 203271947Sdes_LT_CONFIG_LIBTOOL_INIT([ 204271947Sdes# See if we are running on zsh, and set the options which allow our 205271947Sdes# commands through without removal of \ escapes INIT. 206271947Sdesif test -n "\${ZSH_VERSION+set}" ; then 207271947Sdes setopt NO_GLOB_SUBST 208271947Sdesfi 209271947Sdes]) 210271947Sdesif test -n "${ZSH_VERSION+set}" ; then 211271947Sdes setopt NO_GLOB_SUBST 212271947Sdesfi 213271947Sdes 214271947Sdes_LT_CHECK_OBJDIR 215271947Sdes 216271947Sdesm4_require([_LT_TAG_COMPILER])dnl 217271947Sdes 218271947Sdescase $host_os in 219271947Sdesaix3*) 220271947Sdes # AIX sometimes has problems with the GCC collect2 program. For some 221271947Sdes # reason, if we set the COLLECT_NAMES environment variable, the problems 222271947Sdes # vanish in a puff of smoke. 223271947Sdes if test "X${COLLECT_NAMES+set}" != Xset; then 224271947Sdes COLLECT_NAMES= 225271947Sdes export COLLECT_NAMES 226271947Sdes fi 227271947Sdes ;; 228271947Sdesesac 229271947Sdes 230271947Sdes# Global variables: 231271947Sdesofile=libtool 232271947Sdescan_build_shared=yes 233271947Sdes 234271947Sdes# All known linkers require a `.a' archive for static linking (except MSVC, 235271947Sdes# which needs '.lib'). 236271947Sdeslibext=a 237271947Sdes 238271947Sdeswith_gnu_ld="$lt_cv_prog_gnu_ld" 239271947Sdes 240271947Sdesold_CC="$CC" 241271947Sdesold_CFLAGS="$CFLAGS" 242271947Sdes 243271947Sdes# Set sane defaults for various variables 244271947Sdestest -z "$CC" && CC=cc 245271947Sdestest -z "$LTCC" && LTCC=$CC 246271947Sdestest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 247271947Sdestest -z "$LD" && LD=ld 248271947Sdestest -z "$ac_objext" && ac_objext=o 249271947Sdes 250271947Sdes_LT_CC_BASENAME([$compiler]) 251271947Sdes 252271947Sdes# Only perform the check for file, if the check method requires it 253271947Sdestest -z "$MAGIC_CMD" && MAGIC_CMD=file 254271947Sdescase $deplibs_check_method in 255271947Sdesfile_magic*) 256271947Sdes if test "$file_magic_cmd" = '$MAGIC_CMD'; then 257271947Sdes _LT_PATH_MAGIC 258271947Sdes fi 259271947Sdes ;; 260271947Sdesesac 261271947Sdes 262271947Sdes# Use C for the default configuration in the libtool script 263271947SdesLT_SUPPORTED_TAG([CC]) 264271947Sdes_LT_LANG_C_CONFIG 265271947Sdes_LT_LANG_DEFAULT_CONFIG 266271947Sdes_LT_CONFIG_COMMANDS 267271947Sdes])# _LT_SETUP 268271947Sdes 269271947Sdes 270271947Sdes# _LT_PREPARE_SED_QUOTE_VARS 271271947Sdes# -------------------------- 272271947Sdes# Define a few sed substitution that help us do robust quoting. 273271947Sdesm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 274271947Sdes[# Backslashify metacharacters that are still active within 275271947Sdes# double-quoted strings. 276271947Sdessed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 277271947Sdes 278271947Sdes# Same as above, but do not quote variable references. 279271947Sdesdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 280271947Sdes 281271947Sdes# Sed substitution to delay expansion of an escaped shell variable in a 282271947Sdes# double_quote_subst'ed string. 283271947Sdesdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 284271947Sdes 285271947Sdes# Sed substitution to delay expansion of an escaped single quote. 286271947Sdesdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 287271947Sdes 288271947Sdes# Sed substitution to avoid accidental globbing in evaled expressions 289271947Sdesno_glob_subst='s/\*/\\\*/g' 290271947Sdes]) 291271947Sdes 292271947Sdes# _LT_PROG_LTMAIN 293271947Sdes# --------------- 294271947Sdes# Note that this code is called both from `configure', and `config.status' 295271947Sdes# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 296271947Sdes# `config.status' has no value for ac_aux_dir unless we are using Automake, 297271947Sdes# so we pass a copy along to make sure it has a sensible value anyway. 298271947Sdesm4_defun([_LT_PROG_LTMAIN], 299271947Sdes[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 300271947Sdes_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 301271947Sdesltmain="$ac_aux_dir/ltmain.sh" 302271947Sdes])# _LT_PROG_LTMAIN 303271947Sdes 304271947Sdes 305271947Sdes 306271947Sdes# So that we can recreate a full libtool script including additional 307271947Sdes# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 308271947Sdes# in macros and then make a single call at the end using the `libtool' 309271947Sdes# label. 310271947Sdes 311271947Sdes 312271947Sdes# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 313271947Sdes# ---------------------------------------- 314271947Sdes# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 315271947Sdesm4_define([_LT_CONFIG_LIBTOOL_INIT], 316271947Sdes[m4_ifval([$1], 317271947Sdes [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 318271947Sdes [$1 319271947Sdes])])]) 320271947Sdes 321271947Sdes# Initialize. 322271947Sdesm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 323271947Sdes 324271947Sdes 325271947Sdes# _LT_CONFIG_LIBTOOL([COMMANDS]) 326271947Sdes# ------------------------------ 327271947Sdes# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 328271947Sdesm4_define([_LT_CONFIG_LIBTOOL], 329271947Sdes[m4_ifval([$1], 330271947Sdes [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 331271947Sdes [$1 332271947Sdes])])]) 333271947Sdes 334271947Sdes# Initialize. 335271947Sdesm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 336271947Sdes 337271947Sdes 338271947Sdes# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 339271947Sdes# ----------------------------------------------------- 340271947Sdesm4_defun([_LT_CONFIG_SAVE_COMMANDS], 341271947Sdes[_LT_CONFIG_LIBTOOL([$1]) 342271947Sdes_LT_CONFIG_LIBTOOL_INIT([$2]) 343271947Sdes]) 344271947Sdes 345271947Sdes 346271947Sdes# _LT_FORMAT_COMMENT([COMMENT]) 347271947Sdes# ----------------------------- 348271947Sdes# Add leading comment marks to the start of each line, and a trailing 349271947Sdes# full-stop to the whole comment if one is not present already. 350271947Sdesm4_define([_LT_FORMAT_COMMENT], 351271947Sdes[m4_ifval([$1], [ 352271947Sdesm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 353271947Sdes [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 354271947Sdes)]) 355271947Sdes 356271947Sdes 357271947Sdes 358271947Sdes 359271947Sdes 360271947Sdes# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 361271947Sdes# ------------------------------------------------------------------- 362271947Sdes# CONFIGNAME is the name given to the value in the libtool script. 363271947Sdes# VARNAME is the (base) name used in the configure script. 364271947Sdes# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 365271947Sdes# VARNAME. Any other value will be used directly. 366271947Sdesm4_define([_LT_DECL], 367271947Sdes[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 368271947Sdes [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 369271947Sdes [m4_ifval([$1], [$1], [$2])]) 370271947Sdes lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 371271947Sdes m4_ifval([$4], 372271947Sdes [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 373271947Sdes lt_dict_add_subkey([lt_decl_dict], [$2], 374271947Sdes [tagged?], [m4_ifval([$5], [yes], [no])])]) 375271947Sdes]) 376271947Sdes 377271947Sdes 378271947Sdes# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 379271947Sdes# -------------------------------------------------------- 380271947Sdesm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 381271947Sdes 382271947Sdes 383271947Sdes# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 384271947Sdes# ------------------------------------------------ 385271947Sdesm4_define([lt_decl_tag_varnames], 386271947Sdes[_lt_decl_filter([tagged?], [yes], $@)]) 387271947Sdes 388271947Sdes 389271947Sdes# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 390271947Sdes# --------------------------------------------------------- 391271947Sdesm4_define([_lt_decl_filter], 392271947Sdes[m4_case([$#], 393271947Sdes [0], [m4_fatal([$0: too few arguments: $#])], 394271947Sdes [1], [m4_fatal([$0: too few arguments: $#: $1])], 395271947Sdes [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 396271947Sdes [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 397271947Sdes [lt_dict_filter([lt_decl_dict], $@)])[]dnl 398271947Sdes]) 399271947Sdes 400271947Sdes 401271947Sdes# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 402271947Sdes# -------------------------------------------------- 403271947Sdesm4_define([lt_decl_quote_varnames], 404271947Sdes[_lt_decl_filter([value], [1], $@)]) 405271947Sdes 406271947Sdes 407271947Sdes# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 408271947Sdes# --------------------------------------------------- 409271947Sdesm4_define([lt_decl_dquote_varnames], 410271947Sdes[_lt_decl_filter([value], [2], $@)]) 411271947Sdes 412271947Sdes 413271947Sdes# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 414271947Sdes# --------------------------------------------------- 415271947Sdesm4_define([lt_decl_varnames_tagged], 416271947Sdes[m4_assert([$# <= 2])dnl 417271947Sdes_$0(m4_quote(m4_default([$1], [[, ]])), 418271947Sdes m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 419271947Sdes m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 420271947Sdesm4_define([_lt_decl_varnames_tagged], 421271947Sdes[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 422271947Sdes 423271947Sdes 424271947Sdes# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 425271947Sdes# ------------------------------------------------ 426271947Sdesm4_define([lt_decl_all_varnames], 427271947Sdes[_$0(m4_quote(m4_default([$1], [[, ]])), 428271947Sdes m4_if([$2], [], 429271947Sdes m4_quote(lt_decl_varnames), 430271947Sdes m4_quote(m4_shift($@))))[]dnl 431271947Sdes]) 432271947Sdesm4_define([_lt_decl_all_varnames], 433271947Sdes[lt_join($@, lt_decl_varnames_tagged([$1], 434271947Sdes lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 435271947Sdes]) 436271947Sdes 437271947Sdes 438271947Sdes# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 439271947Sdes# ------------------------------------ 440271947Sdes# Quote a variable value, and forward it to `config.status' so that its 441271947Sdes# declaration there will have the same value as in `configure'. VARNAME 442271947Sdes# must have a single quote delimited value for this to work. 443271947Sdesm4_define([_LT_CONFIG_STATUS_DECLARE], 444271947Sdes[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 445271947Sdes 446271947Sdes 447271947Sdes# _LT_CONFIG_STATUS_DECLARATIONS 448271947Sdes# ------------------------------ 449271947Sdes# We delimit libtool config variables with single quotes, so when 450271947Sdes# we write them to config.status, we have to be sure to quote all 451271947Sdes# embedded single quotes properly. In configure, this macro expands 452271947Sdes# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 453271947Sdes# 454271947Sdes# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 455271947Sdesm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 456271947Sdes[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 457271947Sdes [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 458271947Sdes 459271947Sdes 460271947Sdes# _LT_LIBTOOL_TAGS 461271947Sdes# ---------------- 462271947Sdes# Output comment and list of tags supported by the script 463271947Sdesm4_defun([_LT_LIBTOOL_TAGS], 464271947Sdes[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 465271947Sdesavailable_tags="_LT_TAGS"dnl 466271947Sdes]) 467271947Sdes 468271947Sdes 469271947Sdes# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 470271947Sdes# ----------------------------------- 471271947Sdes# Extract the dictionary values for VARNAME (optionally with TAG) and 472271947Sdes# expand to a commented shell variable setting: 473271947Sdes# 474271947Sdes# # Some comment about what VAR is for. 475271947Sdes# visible_name=$lt_internal_name 476271947Sdesm4_define([_LT_LIBTOOL_DECLARE], 477271947Sdes[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 478271947Sdes [description])))[]dnl 479271947Sdesm4_pushdef([_libtool_name], 480271947Sdes m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 481271947Sdesm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 482271947Sdes [0], [_libtool_name=[$]$1], 483271947Sdes [1], [_libtool_name=$lt_[]$1], 484271947Sdes [2], [_libtool_name=$lt_[]$1], 485271947Sdes [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 486271947Sdesm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 487271947Sdes]) 488271947Sdes 489271947Sdes 490271947Sdes# _LT_LIBTOOL_CONFIG_VARS 491271947Sdes# ----------------------- 492271947Sdes# Produce commented declarations of non-tagged libtool config variables 493271947Sdes# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 494271947Sdes# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 495271947Sdes# section) are produced by _LT_LIBTOOL_TAG_VARS. 496271947Sdesm4_defun([_LT_LIBTOOL_CONFIG_VARS], 497271947Sdes[m4_foreach([_lt_var], 498271947Sdes m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 499271947Sdes [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 500271947Sdes 501271947Sdes 502271947Sdes# _LT_LIBTOOL_TAG_VARS(TAG) 503271947Sdes# ------------------------- 504271947Sdesm4_define([_LT_LIBTOOL_TAG_VARS], 505271947Sdes[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 506271947Sdes [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 507271947Sdes 508271947Sdes 509271947Sdes# _LT_TAGVAR(VARNAME, [TAGNAME]) 510271947Sdes# ------------------------------ 511271947Sdesm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 512271947Sdes 513271947Sdes 514271947Sdes# _LT_CONFIG_COMMANDS 515271947Sdes# ------------------- 516271947Sdes# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 517271947Sdes# variables for single and double quote escaping we saved from calls 518271947Sdes# to _LT_DECL, we can put quote escaped variables declarations 519271947Sdes# into `config.status', and then the shell code to quote escape them in 520271947Sdes# for loops in `config.status'. Finally, any additional code accumulated 521271947Sdes# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 522271947Sdesm4_defun([_LT_CONFIG_COMMANDS], 523271947Sdes[AC_PROVIDE_IFELSE([LT_OUTPUT], 524271947Sdes dnl If the libtool generation code has been placed in $CONFIG_LT, 525271947Sdes dnl instead of duplicating it all over again into config.status, 526271947Sdes dnl then we will have config.status run $CONFIG_LT later, so it 527271947Sdes dnl needs to know what name is stored there: 528271947Sdes [AC_CONFIG_COMMANDS([libtool], 529271947Sdes [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 530271947Sdes dnl If the libtool generation code is destined for config.status, 531271947Sdes dnl expand the accumulated commands and init code now: 532271947Sdes [AC_CONFIG_COMMANDS([libtool], 533271947Sdes [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 534271947Sdes])#_LT_CONFIG_COMMANDS 535271947Sdes 536271947Sdes 537271947Sdes# Initialize. 538271947Sdesm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 539271947Sdes[ 540271947Sdes 541271947Sdes# The HP-UX ksh and POSIX shell print the target directory to stdout 542271947Sdes# if CDPATH is set. 543271947Sdes(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 544271947Sdes 545271947Sdessed_quote_subst='$sed_quote_subst' 546271947Sdesdouble_quote_subst='$double_quote_subst' 547271947Sdesdelay_variable_subst='$delay_variable_subst' 548271947Sdes_LT_CONFIG_STATUS_DECLARATIONS 549271947SdesLTCC='$LTCC' 550271947SdesLTCFLAGS='$LTCFLAGS' 551271947Sdescompiler='$compiler_DEFAULT' 552271947Sdes 553271947Sdes# A function that is used when there is no print builtin or printf. 554271947Sdesfunc_fallback_echo () 555271947Sdes{ 556271947Sdes eval 'cat <<_LTECHO_EOF 557271947Sdes\$[]1 558271947Sdes_LTECHO_EOF' 559271947Sdes} 560271947Sdes 561271947Sdes# Quote evaled strings. 562271947Sdesfor var in lt_decl_all_varnames([[ \ 563271947Sdes]], lt_decl_quote_varnames); do 564271947Sdes case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 565271947Sdes *[[\\\\\\\`\\"\\\$]]*) 566271947Sdes eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 567271947Sdes ;; 568271947Sdes *) 569271947Sdes eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 570271947Sdes ;; 571271947Sdes esac 572271947Sdesdone 573271947Sdes 574271947Sdes# Double-quote double-evaled strings. 575271947Sdesfor var in lt_decl_all_varnames([[ \ 576271947Sdes]], lt_decl_dquote_varnames); do 577271947Sdes case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 578271947Sdes *[[\\\\\\\`\\"\\\$]]*) 579271947Sdes eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 580271947Sdes ;; 581271947Sdes *) 582271947Sdes eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 583271947Sdes ;; 584271947Sdes esac 585271947Sdesdone 586271947Sdes 587271947Sdes_LT_OUTPUT_LIBTOOL_INIT 588271947Sdes]) 589271947Sdes 590271947Sdes# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 591271947Sdes# ------------------------------------ 592271947Sdes# Generate a child script FILE with all initialization necessary to 593271947Sdes# reuse the environment learned by the parent script, and make the 594271947Sdes# file executable. If COMMENT is supplied, it is inserted after the 595271947Sdes# `#!' sequence but before initialization text begins. After this 596271947Sdes# macro, additional text can be appended to FILE to form the body of 597271947Sdes# the child script. The macro ends with non-zero status if the 598271947Sdes# file could not be fully written (such as if the disk is full). 599271947Sdesm4_ifdef([AS_INIT_GENERATED], 600271947Sdes[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 601271947Sdes[m4_defun([_LT_GENERATED_FILE_INIT], 602271947Sdes[m4_require([AS_PREPARE])]dnl 603271947Sdes[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 604271947Sdes[lt_write_fail=0 605271947Sdescat >$1 <<_ASEOF || lt_write_fail=1 606271947Sdes#! $SHELL 607271947Sdes# Generated by $as_me. 608271947Sdes$2 609271947SdesSHELL=\${CONFIG_SHELL-$SHELL} 610271947Sdesexport SHELL 611271947Sdes_ASEOF 612271947Sdescat >>$1 <<\_ASEOF || lt_write_fail=1 613271947SdesAS_SHELL_SANITIZE 614271947Sdes_AS_PREPARE 615271947Sdesexec AS_MESSAGE_FD>&1 616271947Sdes_ASEOF 617271947Sdestest $lt_write_fail = 0 && chmod +x $1[]dnl 618271947Sdesm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 619271947Sdes 620271947Sdes# LT_OUTPUT 621271947Sdes# --------- 622271947Sdes# This macro allows early generation of the libtool script (before 623271947Sdes# AC_OUTPUT is called), incase it is used in configure for compilation 624271947Sdes# tests. 625271947SdesAC_DEFUN([LT_OUTPUT], 626271947Sdes[: ${CONFIG_LT=./config.lt} 627271947SdesAC_MSG_NOTICE([creating $CONFIG_LT]) 628271947Sdes_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 629271947Sdes[# Run this file to recreate a libtool stub with the current configuration.]) 630271947Sdes 631271947Sdescat >>"$CONFIG_LT" <<\_LTEOF 632271947Sdeslt_cl_silent=false 633271947Sdesexec AS_MESSAGE_LOG_FD>>config.log 634271947Sdes{ 635271947Sdes echo 636271947Sdes AS_BOX([Running $as_me.]) 637271947Sdes} >&AS_MESSAGE_LOG_FD 638271947Sdes 639271947Sdeslt_cl_help="\ 640271947Sdes\`$as_me' creates a local libtool stub from the current configuration, 641271947Sdesfor use in further configure time tests before the real libtool is 642271947Sdesgenerated. 643271947Sdes 644271947SdesUsage: $[0] [[OPTIONS]] 645271947Sdes 646271947Sdes -h, --help print this help, then exit 647271947Sdes -V, --version print version number, then exit 648271947Sdes -q, --quiet do not print progress messages 649271947Sdes -d, --debug don't remove temporary files 650271947Sdes 651271947SdesReport bugs to <bug-libtool@gnu.org>." 652271947Sdes 653271947Sdeslt_cl_version="\ 654271947Sdesm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 655271947Sdesm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 656271947Sdesconfigured by $[0], generated by m4_PACKAGE_STRING. 657271947Sdes 658271947SdesCopyright (C) 2011 Free Software Foundation, Inc. 659271947SdesThis config.lt script is free software; the Free Software Foundation 660271947Sdesgives unlimited permision to copy, distribute and modify it." 661271947Sdes 662271947Sdeswhile test $[#] != 0 663271947Sdesdo 664271947Sdes case $[1] in 665271947Sdes --version | --v* | -V ) 666271947Sdes echo "$lt_cl_version"; exit 0 ;; 667271947Sdes --help | --h* | -h ) 668271947Sdes echo "$lt_cl_help"; exit 0 ;; 669271947Sdes --debug | --d* | -d ) 670271947Sdes debug=: ;; 671271947Sdes --quiet | --q* | --silent | --s* | -q ) 672271947Sdes lt_cl_silent=: ;; 673271947Sdes 674271947Sdes -*) AC_MSG_ERROR([unrecognized option: $[1] 675271947SdesTry \`$[0] --help' for more information.]) ;; 676271947Sdes 677271947Sdes *) AC_MSG_ERROR([unrecognized argument: $[1] 678271947SdesTry \`$[0] --help' for more information.]) ;; 679271947Sdes esac 680271947Sdes shift 681271947Sdesdone 682271947Sdes 683271947Sdesif $lt_cl_silent; then 684271947Sdes exec AS_MESSAGE_FD>/dev/null 685271947Sdesfi 686271947Sdes_LTEOF 687271947Sdes 688271947Sdescat >>"$CONFIG_LT" <<_LTEOF 689271947Sdes_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 690271947Sdes_LTEOF 691271947Sdes 692271947Sdescat >>"$CONFIG_LT" <<\_LTEOF 693271947SdesAC_MSG_NOTICE([creating $ofile]) 694271947Sdes_LT_OUTPUT_LIBTOOL_COMMANDS 695271947SdesAS_EXIT(0) 696271947Sdes_LTEOF 697271947Sdeschmod +x "$CONFIG_LT" 698271947Sdes 699271947Sdes# configure is writing to config.log, but config.lt does its own redirection, 700271947Sdes# appending to config.log, which fails on DOS, as config.log is still kept 701271947Sdes# open by configure. Here we exec the FD to /dev/null, effectively closing 702271947Sdes# config.log, so it can be properly (re)opened and appended to by config.lt. 703271947Sdeslt_cl_success=: 704271947Sdestest "$silent" = yes && 705271947Sdes lt_config_lt_args="$lt_config_lt_args --quiet" 706271947Sdesexec AS_MESSAGE_LOG_FD>/dev/null 707271947Sdes$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 708271947Sdesexec AS_MESSAGE_LOG_FD>>config.log 709271947Sdes$lt_cl_success || AS_EXIT(1) 710271947Sdes])# LT_OUTPUT 711271947Sdes 712271947Sdes 713271947Sdes# _LT_CONFIG(TAG) 714271947Sdes# --------------- 715271947Sdes# If TAG is the built-in tag, create an initial libtool script with a 716271947Sdes# default configuration from the untagged config vars. Otherwise add code 717271947Sdes# to config.status for appending the configuration named by TAG from the 718271947Sdes# matching tagged config vars. 719271947Sdesm4_defun([_LT_CONFIG], 720271947Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 721271947Sdes_LT_CONFIG_SAVE_COMMANDS([ 722271947Sdes m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 723271947Sdes m4_if(_LT_TAG, [C], [ 724271947Sdes # See if we are running on zsh, and set the options which allow our 725271947Sdes # commands through without removal of \ escapes. 726271947Sdes if test -n "${ZSH_VERSION+set}" ; then 727271947Sdes setopt NO_GLOB_SUBST 728271947Sdes fi 729271947Sdes 730271947Sdes cfgfile="${ofile}T" 731271947Sdes trap "$RM \"$cfgfile\"; exit 1" 1 2 15 732271947Sdes $RM "$cfgfile" 733271947Sdes 734271947Sdes cat <<_LT_EOF >> "$cfgfile" 735271947Sdes#! $SHELL 736271947Sdes 737271947Sdes# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 738271947Sdes# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 739271947Sdes# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 740271947Sdes# NOTE: Changes made to this file will be lost: look at ltmain.sh. 741271947Sdes# 742271947Sdes_LT_COPYING 743271947Sdes_LT_LIBTOOL_TAGS 744271947Sdes 745271947Sdes# ### BEGIN LIBTOOL CONFIG 746271947Sdes_LT_LIBTOOL_CONFIG_VARS 747271947Sdes_LT_LIBTOOL_TAG_VARS 748271947Sdes# ### END LIBTOOL CONFIG 749271947Sdes 750271947Sdes_LT_EOF 751271947Sdes 752271947Sdes case $host_os in 753271947Sdes aix3*) 754271947Sdes cat <<\_LT_EOF >> "$cfgfile" 755271947Sdes# AIX sometimes has problems with the GCC collect2 program. For some 756271947Sdes# reason, if we set the COLLECT_NAMES environment variable, the problems 757271947Sdes# vanish in a puff of smoke. 758271947Sdesif test "X${COLLECT_NAMES+set}" != Xset; then 759271947Sdes COLLECT_NAMES= 760271947Sdes export COLLECT_NAMES 761271947Sdesfi 762271947Sdes_LT_EOF 763271947Sdes ;; 764271947Sdes esac 765271947Sdes 766271947Sdes _LT_PROG_LTMAIN 767271947Sdes 768271947Sdes # We use sed instead of cat because bash on DJGPP gets confused if 769271947Sdes # if finds mixed CR/LF and LF-only lines. Since sed operates in 770271947Sdes # text mode, it properly converts lines to CR/LF. This bash problem 771271947Sdes # is reportedly fixed, but why not run on old versions too? 772271947Sdes sed '$q' "$ltmain" >> "$cfgfile" \ 773271947Sdes || (rm -f "$cfgfile"; exit 1) 774271947Sdes 775271947Sdes _LT_PROG_REPLACE_SHELLFNS 776271947Sdes 777271947Sdes mv -f "$cfgfile" "$ofile" || 778271947Sdes (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 779271947Sdes chmod +x "$ofile" 780271947Sdes], 781271947Sdes[cat <<_LT_EOF >> "$ofile" 782271947Sdes 783271947Sdesdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 784271947Sdesdnl in a comment (ie after a #). 785271947Sdes# ### BEGIN LIBTOOL TAG CONFIG: $1 786271947Sdes_LT_LIBTOOL_TAG_VARS(_LT_TAG) 787271947Sdes# ### END LIBTOOL TAG CONFIG: $1 788271947Sdes_LT_EOF 789271947Sdes])dnl /m4_if 790271947Sdes], 791271947Sdes[m4_if([$1], [], [ 792271947Sdes PACKAGE='$PACKAGE' 793271947Sdes VERSION='$VERSION' 794271947Sdes TIMESTAMP='$TIMESTAMP' 795271947Sdes RM='$RM' 796271947Sdes ofile='$ofile'], []) 797271947Sdes])dnl /_LT_CONFIG_SAVE_COMMANDS 798271947Sdes])# _LT_CONFIG 799271947Sdes 800271947Sdes 801271947Sdes# LT_SUPPORTED_TAG(TAG) 802271947Sdes# --------------------- 803271947Sdes# Trace this macro to discover what tags are supported by the libtool 804271947Sdes# --tag option, using: 805271947Sdes# autoconf --trace 'LT_SUPPORTED_TAG:$1' 806271947SdesAC_DEFUN([LT_SUPPORTED_TAG], []) 807271947Sdes 808271947Sdes 809271947Sdes# C support is built-in for now 810271947Sdesm4_define([_LT_LANG_C_enabled], []) 811271947Sdesm4_define([_LT_TAGS], []) 812271947Sdes 813271947Sdes 814271947Sdes# LT_LANG(LANG) 815271947Sdes# ------------- 816271947Sdes# Enable libtool support for the given language if not already enabled. 817271947SdesAC_DEFUN([LT_LANG], 818271947Sdes[AC_BEFORE([$0], [LT_OUTPUT])dnl 819271947Sdesm4_case([$1], 820271947Sdes [C], [_LT_LANG(C)], 821271947Sdes [C++], [_LT_LANG(CXX)], 822271947Sdes [Go], [_LT_LANG(GO)], 823271947Sdes [Java], [_LT_LANG(GCJ)], 824271947Sdes [Fortran 77], [_LT_LANG(F77)], 825271947Sdes [Fortran], [_LT_LANG(FC)], 826271947Sdes [Windows Resource], [_LT_LANG(RC)], 827271947Sdes [m4_ifdef([_LT_LANG_]$1[_CONFIG], 828271947Sdes [_LT_LANG($1)], 829271947Sdes [m4_fatal([$0: unsupported language: "$1"])])])dnl 830271947Sdes])# LT_LANG 831271947Sdes 832271947Sdes 833271947Sdes# _LT_LANG(LANGNAME) 834271947Sdes# ------------------ 835271947Sdesm4_defun([_LT_LANG], 836271947Sdes[m4_ifdef([_LT_LANG_]$1[_enabled], [], 837271947Sdes [LT_SUPPORTED_TAG([$1])dnl 838271947Sdes m4_append([_LT_TAGS], [$1 ])dnl 839271947Sdes m4_define([_LT_LANG_]$1[_enabled], [])dnl 840271947Sdes _LT_LANG_$1_CONFIG($1)])dnl 841271947Sdes])# _LT_LANG 842271947Sdes 843271947Sdes 844271947Sdesm4_ifndef([AC_PROG_GO], [ 845271947Sdes# NOTE: This macro has been submitted for inclusion into # 846271947Sdes# GNU Autoconf as AC_PROG_GO. When it is available in # 847271947Sdes# a released version of Autoconf we should remove this # 848271947Sdes# macro and use it instead. # 849271947Sdesm4_defun([AC_PROG_GO], 850271947Sdes[AC_LANG_PUSH(Go)dnl 851271947SdesAC_ARG_VAR([GOC], [Go compiler command])dnl 852271947SdesAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 853271947Sdes_AC_ARG_VAR_LDFLAGS()dnl 854271947SdesAC_CHECK_TOOL(GOC, gccgo) 855271947Sdesif test -z "$GOC"; then 856271947Sdes if test -n "$ac_tool_prefix"; then 857271947Sdes AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 858271947Sdes fi 859271947Sdesfi 860271947Sdesif test -z "$GOC"; then 861271947Sdes AC_CHECK_PROG(GOC, gccgo, gccgo, false) 862271947Sdesfi 863271947Sdes])#m4_defun 864271947Sdes])#m4_ifndef 865271947Sdes 866271947Sdes 867271947Sdes# _LT_LANG_DEFAULT_CONFIG 868271947Sdes# ----------------------- 869271947Sdesm4_defun([_LT_LANG_DEFAULT_CONFIG], 870271947Sdes[AC_PROVIDE_IFELSE([AC_PROG_CXX], 871271947Sdes [LT_LANG(CXX)], 872271947Sdes [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 873271947Sdes 874271947SdesAC_PROVIDE_IFELSE([AC_PROG_F77], 875271947Sdes [LT_LANG(F77)], 876271947Sdes [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 877271947Sdes 878271947SdesAC_PROVIDE_IFELSE([AC_PROG_FC], 879271947Sdes [LT_LANG(FC)], 880271947Sdes [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 881271947Sdes 882271947Sdesdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 883271947Sdesdnl pulling things in needlessly. 884271947SdesAC_PROVIDE_IFELSE([AC_PROG_GCJ], 885271947Sdes [LT_LANG(GCJ)], 886271947Sdes [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 887271947Sdes [LT_LANG(GCJ)], 888271947Sdes [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 889271947Sdes [LT_LANG(GCJ)], 890271947Sdes [m4_ifdef([AC_PROG_GCJ], 891271947Sdes [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 892271947Sdes m4_ifdef([A][M_PROG_GCJ], 893271947Sdes [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 894271947Sdes m4_ifdef([LT_PROG_GCJ], 895271947Sdes [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 896271947Sdes 897271947SdesAC_PROVIDE_IFELSE([AC_PROG_GO], 898271947Sdes [LT_LANG(GO)], 899271947Sdes [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 900271947Sdes 901271947SdesAC_PROVIDE_IFELSE([LT_PROG_RC], 902271947Sdes [LT_LANG(RC)], 903271947Sdes [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 904271947Sdes])# _LT_LANG_DEFAULT_CONFIG 905271947Sdes 906271947Sdes# Obsolete macros: 907271947SdesAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 908271947SdesAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 909271947SdesAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 910271947SdesAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 911271947SdesAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 912271947Sdesdnl aclocal-1.4 backwards compatibility: 913271947Sdesdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 914271947Sdesdnl AC_DEFUN([AC_LIBTOOL_F77], []) 915271947Sdesdnl AC_DEFUN([AC_LIBTOOL_FC], []) 916271947Sdesdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 917271947Sdesdnl AC_DEFUN([AC_LIBTOOL_RC], []) 918271947Sdes 919271947Sdes 920271947Sdes# _LT_TAG_COMPILER 921271947Sdes# ---------------- 922271947Sdesm4_defun([_LT_TAG_COMPILER], 923271947Sdes[AC_REQUIRE([AC_PROG_CC])dnl 924271947Sdes 925271947Sdes_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 926271947Sdes_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 927271947Sdes_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 928271947Sdes_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 929271947Sdes 930271947Sdes# If no C compiler was specified, use CC. 931271947SdesLTCC=${LTCC-"$CC"} 932271947Sdes 933271947Sdes# If no C compiler flags were specified, use CFLAGS. 934271947SdesLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 935271947Sdes 936271947Sdes# Allow CC to be a program name with arguments. 937271947Sdescompiler=$CC 938271947Sdes])# _LT_TAG_COMPILER 939271947Sdes 940271947Sdes 941271947Sdes# _LT_COMPILER_BOILERPLATE 942271947Sdes# ------------------------ 943271947Sdes# Check for compiler boilerplate output or warnings with 944271947Sdes# the simple compiler test code. 945271947Sdesm4_defun([_LT_COMPILER_BOILERPLATE], 946271947Sdes[m4_require([_LT_DECL_SED])dnl 947271947Sdesac_outfile=conftest.$ac_objext 948271947Sdesecho "$lt_simple_compile_test_code" >conftest.$ac_ext 949271947Sdeseval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 950271947Sdes_lt_compiler_boilerplate=`cat conftest.err` 951271947Sdes$RM conftest* 952271947Sdes])# _LT_COMPILER_BOILERPLATE 953271947Sdes 954271947Sdes 955271947Sdes# _LT_LINKER_BOILERPLATE 956271947Sdes# ---------------------- 957271947Sdes# Check for linker boilerplate output or warnings with 958271947Sdes# the simple link test code. 959271947Sdesm4_defun([_LT_LINKER_BOILERPLATE], 960271947Sdes[m4_require([_LT_DECL_SED])dnl 961271947Sdesac_outfile=conftest.$ac_objext 962271947Sdesecho "$lt_simple_link_test_code" >conftest.$ac_ext 963271947Sdeseval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 964271947Sdes_lt_linker_boilerplate=`cat conftest.err` 965271947Sdes$RM -r conftest* 966271947Sdes])# _LT_LINKER_BOILERPLATE 967271947Sdes 968271947Sdes# _LT_REQUIRED_DARWIN_CHECKS 969271947Sdes# ------------------------- 970271947Sdesm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 971271947Sdes case $host_os in 972271947Sdes rhapsody* | darwin*) 973271947Sdes AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 974271947Sdes AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 975271947Sdes AC_CHECK_TOOL([LIPO], [lipo], [:]) 976271947Sdes AC_CHECK_TOOL([OTOOL], [otool], [:]) 977271947Sdes AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 978271947Sdes _LT_DECL([], [DSYMUTIL], [1], 979271947Sdes [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 980271947Sdes _LT_DECL([], [NMEDIT], [1], 981271947Sdes [Tool to change global to local symbols on Mac OS X]) 982271947Sdes _LT_DECL([], [LIPO], [1], 983271947Sdes [Tool to manipulate fat objects and archives on Mac OS X]) 984271947Sdes _LT_DECL([], [OTOOL], [1], 985271947Sdes [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 986271947Sdes _LT_DECL([], [OTOOL64], [1], 987271947Sdes [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 988271947Sdes 989271947Sdes AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 990271947Sdes [lt_cv_apple_cc_single_mod=no 991271947Sdes if test -z "${LT_MULTI_MODULE}"; then 992271947Sdes # By default we will add the -single_module flag. You can override 993271947Sdes # by either setting the environment variable LT_MULTI_MODULE 994271947Sdes # non-empty at configure time, or by adding -multi_module to the 995271947Sdes # link flags. 996271947Sdes rm -rf libconftest.dylib* 997271947Sdes echo "int foo(void){return 1;}" > conftest.c 998271947Sdes echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 999271947Sdes-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1000271947Sdes $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1001271947Sdes -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1002271947Sdes _lt_result=$? 1003271947Sdes # If there is a non-empty error log, and "single_module" 1004271947Sdes # appears in it, assume the flag caused a linker warning 1005271947Sdes if test -s conftest.err && $GREP single_module conftest.err; then 1006271947Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1007271947Sdes # Otherwise, if the output was created with a 0 exit code from 1008271947Sdes # the compiler, it worked. 1009271947Sdes elif test -f libconftest.dylib && test $_lt_result -eq 0; then 1010271947Sdes lt_cv_apple_cc_single_mod=yes 1011271947Sdes else 1012271947Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1013271947Sdes fi 1014271947Sdes rm -rf libconftest.dylib* 1015271947Sdes rm -f conftest.* 1016271947Sdes fi]) 1017271947Sdes 1018271947Sdes AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1019271947Sdes [lt_cv_ld_exported_symbols_list], 1020271947Sdes [lt_cv_ld_exported_symbols_list=no 1021271947Sdes save_LDFLAGS=$LDFLAGS 1022271947Sdes echo "_main" > conftest.sym 1023271947Sdes LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1024271947Sdes AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1025271947Sdes [lt_cv_ld_exported_symbols_list=yes], 1026271947Sdes [lt_cv_ld_exported_symbols_list=no]) 1027271947Sdes LDFLAGS="$save_LDFLAGS" 1028271947Sdes ]) 1029271947Sdes 1030271947Sdes AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1031271947Sdes [lt_cv_ld_force_load=no 1032271947Sdes cat > conftest.c << _LT_EOF 1033271947Sdesint forced_loaded() { return 2;} 1034271947Sdes_LT_EOF 1035271947Sdes echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1036271947Sdes $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1037271947Sdes echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1038271947Sdes $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1039271947Sdes echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1040271947Sdes $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1041271947Sdes cat > conftest.c << _LT_EOF 1042271947Sdesint main() { return 0;} 1043271947Sdes_LT_EOF 1044271947Sdes echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1045271947Sdes $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1046271947Sdes _lt_result=$? 1047271947Sdes if test -s conftest.err && $GREP force_load conftest.err; then 1048271947Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1049271947Sdes elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1050271947Sdes lt_cv_ld_force_load=yes 1051271947Sdes else 1052271947Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1053271947Sdes fi 1054271947Sdes rm -f conftest.err libconftest.a conftest conftest.c 1055271947Sdes rm -rf conftest.dSYM 1056271947Sdes ]) 1057271947Sdes case $host_os in 1058271947Sdes rhapsody* | darwin1.[[012]]) 1059271947Sdes _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1060271947Sdes darwin1.*) 1061271947Sdes _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1062271947Sdes darwin*) # darwin 5.x on 1063271947Sdes # if running on 10.5 or later, the deployment target defaults 1064271947Sdes # to the OS version, if on x86, and 10.4, the deployment 1065271947Sdes # target defaults to 10.4. Don't you love it? 1066271947Sdes case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1067271947Sdes 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1068271947Sdes _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1069271947Sdes 10.[[012]]*) 1070271947Sdes _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1071271947Sdes 10.*) 1072271947Sdes _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1073271947Sdes esac 1074271947Sdes ;; 1075271947Sdes esac 1076271947Sdes if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1077271947Sdes _lt_dar_single_mod='$single_module' 1078271947Sdes fi 1079271947Sdes if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1080271947Sdes _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1081271947Sdes else 1082271947Sdes _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1083271947Sdes fi 1084271947Sdes if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1085271947Sdes _lt_dsymutil='~$DSYMUTIL $lib || :' 1086271947Sdes else 1087271947Sdes _lt_dsymutil= 1088271947Sdes fi 1089271947Sdes ;; 1090271947Sdes esac 1091271947Sdes]) 1092271947Sdes 1093271947Sdes 1094271947Sdes# _LT_DARWIN_LINKER_FEATURES([TAG]) 1095271947Sdes# --------------------------------- 1096271947Sdes# Checks for linker and compiler features on darwin 1097271947Sdesm4_defun([_LT_DARWIN_LINKER_FEATURES], 1098271947Sdes[ 1099271947Sdes m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1100271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1101271947Sdes _LT_TAGVAR(hardcode_direct, $1)=no 1102271947Sdes _LT_TAGVAR(hardcode_automatic, $1)=yes 1103271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1104271947Sdes if test "$lt_cv_ld_force_load" = "yes"; then 1105271947Sdes _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\"`' 1106271947Sdes m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1107271947Sdes [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1108271947Sdes else 1109271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1110271947Sdes fi 1111271947Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 1112271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1113271947Sdes case $cc_basename in 1114271947Sdes ifort*) _lt_dar_can_shared=yes ;; 1115271947Sdes *) _lt_dar_can_shared=$GCC ;; 1116271947Sdes esac 1117271947Sdes if test "$_lt_dar_can_shared" = "yes"; then 1118271947Sdes output_verbose_link_cmd=func_echo_all 1119271947Sdes _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}" 1120271947Sdes _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1121271947Sdes _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}" 1122271947Sdes _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}" 1123271947Sdes m4_if([$1], [CXX], 1124271947Sdes[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1125271947Sdes _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}" 1126271947Sdes _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}" 1127271947Sdes fi 1128271947Sdes],[]) 1129271947Sdes else 1130271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 1131271947Sdes fi 1132271947Sdes]) 1133271947Sdes 1134271947Sdes# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1135271947Sdes# ---------------------------------- 1136271947Sdes# Links a minimal program and checks the executable 1137271947Sdes# for the system default hardcoded library path. In most cases, 1138271947Sdes# this is /usr/lib:/lib, but when the MPI compilers are used 1139271947Sdes# the location of the communication and MPI libs are included too. 1140271947Sdes# If we don't find anything, use the default library path according 1141271947Sdes# to the aix ld manual. 1142271947Sdes# Store the results from the different compilers for each TAGNAME. 1143271947Sdes# Allow to override them for all tags through lt_cv_aix_libpath. 1144271947Sdesm4_defun([_LT_SYS_MODULE_PATH_AIX], 1145271947Sdes[m4_require([_LT_DECL_SED])dnl 1146271947Sdesif test "${lt_cv_aix_libpath+set}" = set; then 1147271947Sdes aix_libpath=$lt_cv_aix_libpath 1148271947Sdeselse 1149271947Sdes AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1150271947Sdes [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1151271947Sdes lt_aix_libpath_sed='[ 1152271947Sdes /Import File Strings/,/^$/ { 1153271947Sdes /^0/ { 1154271947Sdes s/^0 *\([^ ]*\) *$/\1/ 1155271947Sdes p 1156271947Sdes } 1157271947Sdes }]' 1158271947Sdes _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1159271947Sdes # Check for a 64-bit object if we didn't find anything. 1160271947Sdes if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1161271947Sdes _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1162271947Sdes fi],[]) 1163271947Sdes if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1164271947Sdes _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1165271947Sdes fi 1166271947Sdes ]) 1167271947Sdes aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1168271947Sdesfi 1169271947Sdes])# _LT_SYS_MODULE_PATH_AIX 1170271947Sdes 1171271947Sdes 1172271947Sdes# _LT_SHELL_INIT(ARG) 1173271947Sdes# ------------------- 1174271947Sdesm4_define([_LT_SHELL_INIT], 1175271947Sdes[m4_divert_text([M4SH-INIT], [$1 1176271947Sdes])])# _LT_SHELL_INIT 1177271947Sdes 1178271947Sdes 1179271947Sdes 1180271947Sdes# _LT_PROG_ECHO_BACKSLASH 1181271947Sdes# ----------------------- 1182271947Sdes# Find how we can fake an echo command that does not interpret backslash. 1183271947Sdes# In particular, with Autoconf 2.60 or later we add some code to the start 1184271947Sdes# of the generated configure script which will find a shell with a builtin 1185271947Sdes# printf (which we can use as an echo command). 1186271947Sdesm4_defun([_LT_PROG_ECHO_BACKSLASH], 1187271947Sdes[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1188271947SdesECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1189271947SdesECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1190271947Sdes 1191271947SdesAC_MSG_CHECKING([how to print strings]) 1192271947Sdes# Test print first, because it will be a builtin if present. 1193271947Sdesif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1194271947Sdes test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1195271947Sdes ECHO='print -r --' 1196271947Sdeselif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1197271947Sdes ECHO='printf %s\n' 1198271947Sdeselse 1199271947Sdes # Use this function as a fallback that always works. 1200271947Sdes func_fallback_echo () 1201271947Sdes { 1202271947Sdes eval 'cat <<_LTECHO_EOF 1203271947Sdes$[]1 1204271947Sdes_LTECHO_EOF' 1205271947Sdes } 1206271947Sdes ECHO='func_fallback_echo' 1207271947Sdesfi 1208271947Sdes 1209271947Sdes# func_echo_all arg... 1210271947Sdes# Invoke $ECHO with all args, space-separated. 1211271947Sdesfunc_echo_all () 1212271947Sdes{ 1213271947Sdes $ECHO "$*" 1214271947Sdes} 1215271947Sdes 1216271947Sdescase "$ECHO" in 1217271947Sdes printf*) AC_MSG_RESULT([printf]) ;; 1218271947Sdes print*) AC_MSG_RESULT([print -r]) ;; 1219271947Sdes *) AC_MSG_RESULT([cat]) ;; 1220271947Sdesesac 1221271947Sdes 1222271947Sdesm4_ifdef([_AS_DETECT_SUGGESTED], 1223271947Sdes[_AS_DETECT_SUGGESTED([ 1224271947Sdes test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1225271947Sdes ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1226271947Sdes ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1227271947Sdes ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1228271947Sdes PATH=/empty FPATH=/empty; export PATH FPATH 1229271947Sdes test "X`printf %s $ECHO`" = "X$ECHO" \ 1230271947Sdes || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1231271947Sdes 1232271947Sdes_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1233271947Sdes_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1234271947Sdes])# _LT_PROG_ECHO_BACKSLASH 1235271947Sdes 1236271947Sdes 1237271947Sdes# _LT_WITH_SYSROOT 1238271947Sdes# ---------------- 1239271947SdesAC_DEFUN([_LT_WITH_SYSROOT], 1240271947Sdes[AC_MSG_CHECKING([for sysroot]) 1241271947SdesAC_ARG_WITH([sysroot], 1242271947Sdes[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1243271947Sdes (or the compiler's sysroot if not specified).], 1244271947Sdes[], [with_sysroot=no]) 1245271947Sdes 1246271947Sdesdnl lt_sysroot will always be passed unquoted. We quote it here 1247271947Sdesdnl in case the user passed a directory name. 1248271947Sdeslt_sysroot= 1249271947Sdescase ${with_sysroot} in #( 1250271947Sdes yes) 1251271947Sdes if test "$GCC" = yes; then 1252271947Sdes lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1253271947Sdes fi 1254271947Sdes ;; #( 1255271947Sdes /*) 1256271947Sdes lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1257271947Sdes ;; #( 1258271947Sdes no|'') 1259271947Sdes ;; #( 1260271947Sdes *) 1261271947Sdes AC_MSG_RESULT([${with_sysroot}]) 1262271947Sdes AC_MSG_ERROR([The sysroot must be an absolute path.]) 1263271947Sdes ;; 1264271947Sdesesac 1265271947Sdes 1266271947Sdes AC_MSG_RESULT([${lt_sysroot:-no}]) 1267271947Sdes_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1268271947Sdes[dependent libraries, and in which our libraries should be installed.])]) 1269271947Sdes 1270271947Sdes# _LT_ENABLE_LOCK 1271271947Sdes# --------------- 1272271947Sdesm4_defun([_LT_ENABLE_LOCK], 1273271947Sdes[AC_ARG_ENABLE([libtool-lock], 1274271947Sdes [AS_HELP_STRING([--disable-libtool-lock], 1275271947Sdes [avoid locking (might break parallel builds)])]) 1276271947Sdestest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1277271947Sdes 1278271947Sdes# Some flags need to be propagated to the compiler or linker for good 1279271947Sdes# libtool support. 1280271947Sdescase $host in 1281271947Sdesia64-*-hpux*) 1282271947Sdes # Find out which ABI we are using. 1283271947Sdes echo 'int i;' > conftest.$ac_ext 1284271947Sdes if AC_TRY_EVAL(ac_compile); then 1285271947Sdes case `/usr/bin/file conftest.$ac_objext` in 1286271947Sdes *ELF-32*) 1287271947Sdes HPUX_IA64_MODE="32" 1288271947Sdes ;; 1289271947Sdes *ELF-64*) 1290271947Sdes HPUX_IA64_MODE="64" 1291271947Sdes ;; 1292271947Sdes esac 1293271947Sdes fi 1294271947Sdes rm -rf conftest* 1295271947Sdes ;; 1296271947Sdes*-*-irix6*) 1297271947Sdes # Find out which ABI we are using. 1298271947Sdes echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1299271947Sdes if AC_TRY_EVAL(ac_compile); then 1300271947Sdes if test "$lt_cv_prog_gnu_ld" = yes; then 1301271947Sdes case `/usr/bin/file conftest.$ac_objext` in 1302271947Sdes *32-bit*) 1303271947Sdes LD="${LD-ld} -melf32bsmip" 1304271947Sdes ;; 1305271947Sdes *N32*) 1306271947Sdes LD="${LD-ld} -melf32bmipn32" 1307271947Sdes ;; 1308271947Sdes *64-bit*) 1309271947Sdes LD="${LD-ld} -melf64bmip" 1310271947Sdes ;; 1311271947Sdes esac 1312271947Sdes else 1313271947Sdes case `/usr/bin/file conftest.$ac_objext` in 1314271947Sdes *32-bit*) 1315271947Sdes LD="${LD-ld} -32" 1316271947Sdes ;; 1317271947Sdes *N32*) 1318271947Sdes LD="${LD-ld} -n32" 1319271947Sdes ;; 1320271947Sdes *64-bit*) 1321271947Sdes LD="${LD-ld} -64" 1322271947Sdes ;; 1323271947Sdes esac 1324271947Sdes fi 1325271947Sdes fi 1326271947Sdes rm -rf conftest* 1327271947Sdes ;; 1328271947Sdes 1329271947Sdesx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1330271947Sdess390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1331271947Sdes # Find out which ABI we are using. 1332271947Sdes echo 'int i;' > conftest.$ac_ext 1333271947Sdes if AC_TRY_EVAL(ac_compile); then 1334271947Sdes case `/usr/bin/file conftest.o` in 1335271947Sdes *32-bit*) 1336271947Sdes case $host in 1337271947Sdes x86_64-*kfreebsd*-gnu) 1338271947Sdes LD="${LD-ld} -m elf_i386_fbsd" 1339271947Sdes ;; 1340271947Sdes x86_64-*linux*) 1341271947Sdes LD="${LD-ld} -m elf_i386" 1342271947Sdes ;; 1343271947Sdes ppc64-*linux*|powerpc64-*linux*) 1344271947Sdes LD="${LD-ld} -m elf32ppclinux" 1345271947Sdes ;; 1346271947Sdes s390x-*linux*) 1347271947Sdes LD="${LD-ld} -m elf_s390" 1348271947Sdes ;; 1349271947Sdes sparc64-*linux*) 1350271947Sdes LD="${LD-ld} -m elf32_sparc" 1351271947Sdes ;; 1352271947Sdes esac 1353271947Sdes ;; 1354271947Sdes *64-bit*) 1355271947Sdes case $host in 1356271947Sdes x86_64-*kfreebsd*-gnu) 1357271947Sdes LD="${LD-ld} -m elf_x86_64_fbsd" 1358271947Sdes ;; 1359271947Sdes x86_64-*linux*) 1360271947Sdes LD="${LD-ld} -m elf_x86_64" 1361271947Sdes ;; 1362271947Sdes ppc*-*linux*|powerpc*-*linux*) 1363271947Sdes LD="${LD-ld} -m elf64ppc" 1364271947Sdes ;; 1365271947Sdes s390*-*linux*|s390*-*tpf*) 1366271947Sdes LD="${LD-ld} -m elf64_s390" 1367271947Sdes ;; 1368271947Sdes sparc*-*linux*) 1369271947Sdes LD="${LD-ld} -m elf64_sparc" 1370271947Sdes ;; 1371271947Sdes esac 1372271947Sdes ;; 1373271947Sdes esac 1374271947Sdes fi 1375271947Sdes rm -rf conftest* 1376271947Sdes ;; 1377271947Sdes 1378271947Sdes*-*-sco3.2v5*) 1379271947Sdes # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1380271947Sdes SAVE_CFLAGS="$CFLAGS" 1381271947Sdes CFLAGS="$CFLAGS -belf" 1382271947Sdes AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1383271947Sdes [AC_LANG_PUSH(C) 1384271947Sdes AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1385271947Sdes AC_LANG_POP]) 1386271947Sdes if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1387271947Sdes # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1388271947Sdes CFLAGS="$SAVE_CFLAGS" 1389271947Sdes fi 1390271947Sdes ;; 1391271947Sdes*-*solaris*) 1392271947Sdes # Find out which ABI we are using. 1393271947Sdes echo 'int i;' > conftest.$ac_ext 1394271947Sdes if AC_TRY_EVAL(ac_compile); then 1395271947Sdes case `/usr/bin/file conftest.o` in 1396271947Sdes *64-bit*) 1397271947Sdes case $lt_cv_prog_gnu_ld in 1398271947Sdes yes*) 1399271947Sdes case $host in 1400271947Sdes i?86-*-solaris*) 1401271947Sdes LD="${LD-ld} -m elf_x86_64" 1402271947Sdes ;; 1403271947Sdes sparc*-*-solaris*) 1404271947Sdes LD="${LD-ld} -m elf64_sparc" 1405271947Sdes ;; 1406271947Sdes esac 1407271947Sdes # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1408271947Sdes if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1409271947Sdes LD="${LD-ld}_sol2" 1410271947Sdes fi 1411271947Sdes ;; 1412271947Sdes *) 1413271947Sdes if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1414271947Sdes LD="${LD-ld} -64" 1415271947Sdes fi 1416271947Sdes ;; 1417271947Sdes esac 1418271947Sdes ;; 1419271947Sdes esac 1420271947Sdes fi 1421271947Sdes rm -rf conftest* 1422271947Sdes ;; 1423271947Sdesesac 1424271947Sdes 1425271947Sdesneed_locks="$enable_libtool_lock" 1426271947Sdes])# _LT_ENABLE_LOCK 1427271947Sdes 1428271947Sdes 1429271947Sdes# _LT_PROG_AR 1430271947Sdes# ----------- 1431271947Sdesm4_defun([_LT_PROG_AR], 1432271947Sdes[AC_CHECK_TOOLS(AR, [ar], false) 1433271947Sdes: ${AR=ar} 1434271947Sdes: ${AR_FLAGS=cru} 1435271947Sdes_LT_DECL([], [AR], [1], [The archiver]) 1436271947Sdes_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1437271947Sdes 1438271947SdesAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1439271947Sdes [lt_cv_ar_at_file=no 1440271947Sdes AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1441271947Sdes [echo conftest.$ac_objext > conftest.lst 1442271947Sdes lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1443271947Sdes AC_TRY_EVAL([lt_ar_try]) 1444271947Sdes if test "$ac_status" -eq 0; then 1445271947Sdes # Ensure the archiver fails upon bogus file names. 1446271947Sdes rm -f conftest.$ac_objext libconftest.a 1447271947Sdes AC_TRY_EVAL([lt_ar_try]) 1448271947Sdes if test "$ac_status" -ne 0; then 1449271947Sdes lt_cv_ar_at_file=@ 1450271947Sdes fi 1451271947Sdes fi 1452271947Sdes rm -f conftest.* libconftest.a 1453271947Sdes ]) 1454271947Sdes ]) 1455271947Sdes 1456271947Sdesif test "x$lt_cv_ar_at_file" = xno; then 1457271947Sdes archiver_list_spec= 1458271947Sdeselse 1459271947Sdes archiver_list_spec=$lt_cv_ar_at_file 1460271947Sdesfi 1461271947Sdes_LT_DECL([], [archiver_list_spec], [1], 1462271947Sdes [How to feed a file listing to the archiver]) 1463271947Sdes])# _LT_PROG_AR 1464271947Sdes 1465271947Sdes 1466271947Sdes# _LT_CMD_OLD_ARCHIVE 1467271947Sdes# ------------------- 1468271947Sdesm4_defun([_LT_CMD_OLD_ARCHIVE], 1469271947Sdes[_LT_PROG_AR 1470271947Sdes 1471271947SdesAC_CHECK_TOOL(STRIP, strip, :) 1472271947Sdestest -z "$STRIP" && STRIP=: 1473271947Sdes_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1474271947Sdes 1475271947SdesAC_CHECK_TOOL(RANLIB, ranlib, :) 1476271947Sdestest -z "$RANLIB" && RANLIB=: 1477271947Sdes_LT_DECL([], [RANLIB], [1], 1478271947Sdes [Commands used to install an old-style archive]) 1479271947Sdes 1480271947Sdes# Determine commands to create old-style static archives. 1481271947Sdesold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1482271947Sdesold_postinstall_cmds='chmod 644 $oldlib' 1483271947Sdesold_postuninstall_cmds= 1484271947Sdes 1485271947Sdesif test -n "$RANLIB"; then 1486271947Sdes case $host_os in 1487271947Sdes openbsd*) 1488271947Sdes old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1489271947Sdes ;; 1490271947Sdes *) 1491271947Sdes old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1492271947Sdes ;; 1493271947Sdes esac 1494271947Sdes old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1495271947Sdesfi 1496271947Sdes 1497271947Sdescase $host_os in 1498271947Sdes darwin*) 1499271947Sdes lock_old_archive_extraction=yes ;; 1500271947Sdes *) 1501271947Sdes lock_old_archive_extraction=no ;; 1502271947Sdesesac 1503271947Sdes_LT_DECL([], [old_postinstall_cmds], [2]) 1504271947Sdes_LT_DECL([], [old_postuninstall_cmds], [2]) 1505271947Sdes_LT_TAGDECL([], [old_archive_cmds], [2], 1506271947Sdes [Commands used to build an old-style archive]) 1507271947Sdes_LT_DECL([], [lock_old_archive_extraction], [0], 1508271947Sdes [Whether to use a lock for old archive extraction]) 1509271947Sdes])# _LT_CMD_OLD_ARCHIVE 1510271947Sdes 1511271947Sdes 1512271947Sdes# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1513271947Sdes# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1514271947Sdes# ---------------------------------------------------------------- 1515271947Sdes# Check whether the given compiler option works 1516271947SdesAC_DEFUN([_LT_COMPILER_OPTION], 1517271947Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1518271947Sdesm4_require([_LT_DECL_SED])dnl 1519271947SdesAC_CACHE_CHECK([$1], [$2], 1520271947Sdes [$2=no 1521271947Sdes m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1522271947Sdes echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1523271947Sdes lt_compiler_flag="$3" 1524271947Sdes # Insert the option either (1) after the last *FLAGS variable, or 1525271947Sdes # (2) before a word containing "conftest.", or (3) at the end. 1526271947Sdes # Note that $ac_compile itself does not contain backslashes and begins 1527271947Sdes # with a dollar sign (not a hyphen), so the echo should work correctly. 1528271947Sdes # The option is referenced via a variable to avoid confusing sed. 1529271947Sdes lt_compile=`echo "$ac_compile" | $SED \ 1530271947Sdes -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1531271947Sdes -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1532271947Sdes -e 's:$: $lt_compiler_flag:'` 1533271947Sdes (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1534271947Sdes (eval "$lt_compile" 2>conftest.err) 1535271947Sdes ac_status=$? 1536271947Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1537271947Sdes echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1538271947Sdes if (exit $ac_status) && test -s "$ac_outfile"; then 1539271947Sdes # The compiler can only warn and ignore the option if not recognized 1540271947Sdes # So say no if there are warnings other than the usual output. 1541271947Sdes $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1542271947Sdes $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1543271947Sdes if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1544271947Sdes $2=yes 1545271947Sdes fi 1546271947Sdes fi 1547271947Sdes $RM conftest* 1548271947Sdes]) 1549271947Sdes 1550271947Sdesif test x"[$]$2" = xyes; then 1551271947Sdes m4_if([$5], , :, [$5]) 1552271947Sdeselse 1553271947Sdes m4_if([$6], , :, [$6]) 1554271947Sdesfi 1555271947Sdes])# _LT_COMPILER_OPTION 1556271947Sdes 1557271947Sdes# Old name: 1558271947SdesAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1559271947Sdesdnl aclocal-1.4 backwards compatibility: 1560271947Sdesdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1561271947Sdes 1562271947Sdes 1563271947Sdes# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1564271947Sdes# [ACTION-SUCCESS], [ACTION-FAILURE]) 1565271947Sdes# ---------------------------------------------------- 1566271947Sdes# Check whether the given linker option works 1567271947SdesAC_DEFUN([_LT_LINKER_OPTION], 1568271947Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1569271947Sdesm4_require([_LT_DECL_SED])dnl 1570271947SdesAC_CACHE_CHECK([$1], [$2], 1571271947Sdes [$2=no 1572271947Sdes save_LDFLAGS="$LDFLAGS" 1573271947Sdes LDFLAGS="$LDFLAGS $3" 1574271947Sdes echo "$lt_simple_link_test_code" > conftest.$ac_ext 1575271947Sdes if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1576271947Sdes # The linker can only warn and ignore the option if not recognized 1577271947Sdes # So say no if there are warnings 1578271947Sdes if test -s conftest.err; then 1579271947Sdes # Append any errors to the config.log. 1580271947Sdes cat conftest.err 1>&AS_MESSAGE_LOG_FD 1581271947Sdes $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1582271947Sdes $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1583271947Sdes if diff conftest.exp conftest.er2 >/dev/null; then 1584271947Sdes $2=yes 1585271947Sdes fi 1586271947Sdes else 1587271947Sdes $2=yes 1588271947Sdes fi 1589271947Sdes fi 1590271947Sdes $RM -r conftest* 1591271947Sdes LDFLAGS="$save_LDFLAGS" 1592271947Sdes]) 1593271947Sdes 1594271947Sdesif test x"[$]$2" = xyes; then 1595271947Sdes m4_if([$4], , :, [$4]) 1596271947Sdeselse 1597271947Sdes m4_if([$5], , :, [$5]) 1598271947Sdesfi 1599271947Sdes])# _LT_LINKER_OPTION 1600271947Sdes 1601271947Sdes# Old name: 1602271947SdesAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1603271947Sdesdnl aclocal-1.4 backwards compatibility: 1604271947Sdesdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1605271947Sdes 1606271947Sdes 1607271947Sdes# LT_CMD_MAX_LEN 1608271947Sdes#--------------- 1609271947SdesAC_DEFUN([LT_CMD_MAX_LEN], 1610271947Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1611271947Sdes# find the maximum length of command line arguments 1612271947SdesAC_MSG_CHECKING([the maximum length of command line arguments]) 1613271947SdesAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1614271947Sdes i=0 1615271947Sdes teststring="ABCD" 1616271947Sdes 1617271947Sdes case $build_os in 1618271947Sdes msdosdjgpp*) 1619271947Sdes # On DJGPP, this test can blow up pretty badly due to problems in libc 1620271947Sdes # (any single argument exceeding 2000 bytes causes a buffer overrun 1621271947Sdes # during glob expansion). Even if it were fixed, the result of this 1622271947Sdes # check would be larger than it should be. 1623271947Sdes lt_cv_sys_max_cmd_len=12288; # 12K is about right 1624271947Sdes ;; 1625271947Sdes 1626271947Sdes gnu*) 1627271947Sdes # Under GNU Hurd, this test is not required because there is 1628271947Sdes # no limit to the length of command line arguments. 1629271947Sdes # Libtool will interpret -1 as no limit whatsoever 1630271947Sdes lt_cv_sys_max_cmd_len=-1; 1631271947Sdes ;; 1632271947Sdes 1633271947Sdes cygwin* | mingw* | cegcc*) 1634271947Sdes # On Win9x/ME, this test blows up -- it succeeds, but takes 1635271947Sdes # about 5 minutes as the teststring grows exponentially. 1636271947Sdes # Worse, since 9x/ME are not pre-emptively multitasking, 1637271947Sdes # you end up with a "frozen" computer, even though with patience 1638271947Sdes # the test eventually succeeds (with a max line length of 256k). 1639271947Sdes # Instead, let's just punt: use the minimum linelength reported by 1640271947Sdes # all of the supported platforms: 8192 (on NT/2K/XP). 1641271947Sdes lt_cv_sys_max_cmd_len=8192; 1642271947Sdes ;; 1643271947Sdes 1644271947Sdes mint*) 1645271947Sdes # On MiNT this can take a long time and run out of memory. 1646271947Sdes lt_cv_sys_max_cmd_len=8192; 1647271947Sdes ;; 1648271947Sdes 1649271947Sdes amigaos*) 1650271947Sdes # On AmigaOS with pdksh, this test takes hours, literally. 1651271947Sdes # So we just punt and use a minimum line length of 8192. 1652271947Sdes lt_cv_sys_max_cmd_len=8192; 1653271947Sdes ;; 1654271947Sdes 1655271947Sdes netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1656271947Sdes # This has been around since 386BSD, at least. Likely further. 1657271947Sdes if test -x /sbin/sysctl; then 1658271947Sdes lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1659271947Sdes elif test -x /usr/sbin/sysctl; then 1660271947Sdes lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1661271947Sdes else 1662271947Sdes lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1663271947Sdes fi 1664271947Sdes # And add a safety zone 1665271947Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1666271947Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1667271947Sdes ;; 1668271947Sdes 1669271947Sdes interix*) 1670271947Sdes # We know the value 262144 and hardcode it with a safety zone (like BSD) 1671271947Sdes lt_cv_sys_max_cmd_len=196608 1672271947Sdes ;; 1673271947Sdes 1674271947Sdes os2*) 1675271947Sdes # The test takes a long time on OS/2. 1676271947Sdes lt_cv_sys_max_cmd_len=8192 1677271947Sdes ;; 1678271947Sdes 1679271947Sdes osf*) 1680271947Sdes # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1681271947Sdes # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1682271947Sdes # nice to cause kernel panics so lets avoid the loop below. 1683271947Sdes # First set a reasonable default. 1684271947Sdes lt_cv_sys_max_cmd_len=16384 1685271947Sdes # 1686271947Sdes if test -x /sbin/sysconfig; then 1687271947Sdes case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1688271947Sdes *1*) lt_cv_sys_max_cmd_len=-1 ;; 1689271947Sdes esac 1690271947Sdes fi 1691271947Sdes ;; 1692271947Sdes sco3.2v5*) 1693271947Sdes lt_cv_sys_max_cmd_len=102400 1694271947Sdes ;; 1695271947Sdes sysv5* | sco5v6* | sysv4.2uw2*) 1696271947Sdes kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1697271947Sdes if test -n "$kargmax"; then 1698271947Sdes lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1699271947Sdes else 1700271947Sdes lt_cv_sys_max_cmd_len=32768 1701271947Sdes fi 1702271947Sdes ;; 1703271947Sdes *) 1704271947Sdes lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1705271947Sdes if test -n "$lt_cv_sys_max_cmd_len"; then 1706271947Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1707271947Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1708271947Sdes else 1709271947Sdes # Make teststring a little bigger before we do anything with it. 1710271947Sdes # a 1K string should be a reasonable start. 1711271947Sdes for i in 1 2 3 4 5 6 7 8 ; do 1712271947Sdes teststring=$teststring$teststring 1713271947Sdes done 1714271947Sdes SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1715271947Sdes # If test is not a shell built-in, we'll probably end up computing a 1716271947Sdes # maximum length that is only half of the actual maximum length, but 1717271947Sdes # we can't tell. 1718271947Sdes while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1719271947Sdes = "X$teststring$teststring"; } >/dev/null 2>&1 && 1720271947Sdes test $i != 17 # 1/2 MB should be enough 1721271947Sdes do 1722271947Sdes i=`expr $i + 1` 1723271947Sdes teststring=$teststring$teststring 1724271947Sdes done 1725271947Sdes # Only check the string length outside the loop. 1726271947Sdes lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1727271947Sdes teststring= 1728271947Sdes # Add a significant safety factor because C++ compilers can tack on 1729271947Sdes # massive amounts of additional arguments before passing them to the 1730271947Sdes # linker. It appears as though 1/2 is a usable value. 1731271947Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1732271947Sdes fi 1733271947Sdes ;; 1734271947Sdes esac 1735271947Sdes]) 1736271947Sdesif test -n $lt_cv_sys_max_cmd_len ; then 1737271947Sdes AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1738271947Sdeselse 1739271947Sdes AC_MSG_RESULT(none) 1740271947Sdesfi 1741271947Sdesmax_cmd_len=$lt_cv_sys_max_cmd_len 1742271947Sdes_LT_DECL([], [max_cmd_len], [0], 1743271947Sdes [What is the maximum length of a command?]) 1744271947Sdes])# LT_CMD_MAX_LEN 1745271947Sdes 1746271947Sdes# Old name: 1747271947SdesAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1748271947Sdesdnl aclocal-1.4 backwards compatibility: 1749271947Sdesdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1750271947Sdes 1751271947Sdes 1752271947Sdes# _LT_HEADER_DLFCN 1753271947Sdes# ---------------- 1754271947Sdesm4_defun([_LT_HEADER_DLFCN], 1755271947Sdes[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1756271947Sdes])# _LT_HEADER_DLFCN 1757271947Sdes 1758271947Sdes 1759271947Sdes# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1760271947Sdes# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1761271947Sdes# ---------------------------------------------------------------- 1762271947Sdesm4_defun([_LT_TRY_DLOPEN_SELF], 1763271947Sdes[m4_require([_LT_HEADER_DLFCN])dnl 1764271947Sdesif test "$cross_compiling" = yes; then : 1765271947Sdes [$4] 1766271947Sdeselse 1767271947Sdes lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1768271947Sdes lt_status=$lt_dlunknown 1769271947Sdes cat > conftest.$ac_ext <<_LT_EOF 1770271947Sdes[#line $LINENO "configure" 1771271947Sdes#include "confdefs.h" 1772271947Sdes 1773271947Sdes#if HAVE_DLFCN_H 1774271947Sdes#include <dlfcn.h> 1775271947Sdes#endif 1776271947Sdes 1777271947Sdes#include <stdio.h> 1778271947Sdes 1779271947Sdes#ifdef RTLD_GLOBAL 1780271947Sdes# define LT_DLGLOBAL RTLD_GLOBAL 1781271947Sdes#else 1782271947Sdes# ifdef DL_GLOBAL 1783271947Sdes# define LT_DLGLOBAL DL_GLOBAL 1784271947Sdes# else 1785271947Sdes# define LT_DLGLOBAL 0 1786271947Sdes# endif 1787271947Sdes#endif 1788271947Sdes 1789271947Sdes/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1790271947Sdes find out it does not work in some platform. */ 1791271947Sdes#ifndef LT_DLLAZY_OR_NOW 1792271947Sdes# ifdef RTLD_LAZY 1793271947Sdes# define LT_DLLAZY_OR_NOW RTLD_LAZY 1794271947Sdes# else 1795271947Sdes# ifdef DL_LAZY 1796271947Sdes# define LT_DLLAZY_OR_NOW DL_LAZY 1797271947Sdes# else 1798271947Sdes# ifdef RTLD_NOW 1799271947Sdes# define LT_DLLAZY_OR_NOW RTLD_NOW 1800271947Sdes# else 1801271947Sdes# ifdef DL_NOW 1802271947Sdes# define LT_DLLAZY_OR_NOW DL_NOW 1803271947Sdes# else 1804271947Sdes# define LT_DLLAZY_OR_NOW 0 1805271947Sdes# endif 1806271947Sdes# endif 1807271947Sdes# endif 1808271947Sdes# endif 1809271947Sdes#endif 1810271947Sdes 1811271947Sdes/* When -fvisbility=hidden is used, assume the code has been annotated 1812271947Sdes correspondingly for the symbols needed. */ 1813271947Sdes#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1814271947Sdesint fnord () __attribute__((visibility("default"))); 1815271947Sdes#endif 1816271947Sdes 1817271947Sdesint fnord () { return 42; } 1818271947Sdesint main () 1819271947Sdes{ 1820271947Sdes void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1821271947Sdes int status = $lt_dlunknown; 1822271947Sdes 1823271947Sdes if (self) 1824271947Sdes { 1825271947Sdes if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1826271947Sdes else 1827271947Sdes { 1828271947Sdes if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1829271947Sdes else puts (dlerror ()); 1830271947Sdes } 1831271947Sdes /* dlclose (self); */ 1832271947Sdes } 1833271947Sdes else 1834271947Sdes puts (dlerror ()); 1835271947Sdes 1836271947Sdes return status; 1837271947Sdes}] 1838271947Sdes_LT_EOF 1839271947Sdes if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1840271947Sdes (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1841271947Sdes lt_status=$? 1842271947Sdes case x$lt_status in 1843271947Sdes x$lt_dlno_uscore) $1 ;; 1844271947Sdes x$lt_dlneed_uscore) $2 ;; 1845271947Sdes x$lt_dlunknown|x*) $3 ;; 1846271947Sdes esac 1847271947Sdes else : 1848271947Sdes # compilation failed 1849271947Sdes $3 1850271947Sdes fi 1851271947Sdesfi 1852271947Sdesrm -fr conftest* 1853271947Sdes])# _LT_TRY_DLOPEN_SELF 1854271947Sdes 1855271947Sdes 1856271947Sdes# LT_SYS_DLOPEN_SELF 1857271947Sdes# ------------------ 1858271947SdesAC_DEFUN([LT_SYS_DLOPEN_SELF], 1859271947Sdes[m4_require([_LT_HEADER_DLFCN])dnl 1860271947Sdesif test "x$enable_dlopen" != xyes; then 1861271947Sdes enable_dlopen=unknown 1862271947Sdes enable_dlopen_self=unknown 1863271947Sdes enable_dlopen_self_static=unknown 1864271947Sdeselse 1865271947Sdes lt_cv_dlopen=no 1866271947Sdes lt_cv_dlopen_libs= 1867271947Sdes 1868271947Sdes case $host_os in 1869271947Sdes beos*) 1870271947Sdes lt_cv_dlopen="load_add_on" 1871271947Sdes lt_cv_dlopen_libs= 1872271947Sdes lt_cv_dlopen_self=yes 1873271947Sdes ;; 1874271947Sdes 1875271947Sdes mingw* | pw32* | cegcc*) 1876271947Sdes lt_cv_dlopen="LoadLibrary" 1877271947Sdes lt_cv_dlopen_libs= 1878271947Sdes ;; 1879271947Sdes 1880271947Sdes cygwin*) 1881271947Sdes lt_cv_dlopen="dlopen" 1882271947Sdes lt_cv_dlopen_libs= 1883271947Sdes ;; 1884271947Sdes 1885271947Sdes darwin*) 1886271947Sdes # if libdl is installed we need to link against it 1887271947Sdes AC_CHECK_LIB([dl], [dlopen], 1888271947Sdes [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1889271947Sdes lt_cv_dlopen="dyld" 1890271947Sdes lt_cv_dlopen_libs= 1891271947Sdes lt_cv_dlopen_self=yes 1892271947Sdes ]) 1893271947Sdes ;; 1894271947Sdes 1895271947Sdes *) 1896271947Sdes AC_CHECK_FUNC([shl_load], 1897271947Sdes [lt_cv_dlopen="shl_load"], 1898271947Sdes [AC_CHECK_LIB([dld], [shl_load], 1899271947Sdes [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1900271947Sdes [AC_CHECK_FUNC([dlopen], 1901271947Sdes [lt_cv_dlopen="dlopen"], 1902271947Sdes [AC_CHECK_LIB([dl], [dlopen], 1903271947Sdes [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1904271947Sdes [AC_CHECK_LIB([svld], [dlopen], 1905271947Sdes [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1906271947Sdes [AC_CHECK_LIB([dld], [dld_link], 1907271947Sdes [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1908271947Sdes ]) 1909271947Sdes ]) 1910271947Sdes ]) 1911271947Sdes ]) 1912271947Sdes ]) 1913271947Sdes ;; 1914271947Sdes esac 1915271947Sdes 1916271947Sdes if test "x$lt_cv_dlopen" != xno; then 1917271947Sdes enable_dlopen=yes 1918271947Sdes else 1919271947Sdes enable_dlopen=no 1920271947Sdes fi 1921271947Sdes 1922271947Sdes case $lt_cv_dlopen in 1923271947Sdes dlopen) 1924271947Sdes save_CPPFLAGS="$CPPFLAGS" 1925271947Sdes test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1926271947Sdes 1927271947Sdes save_LDFLAGS="$LDFLAGS" 1928271947Sdes wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1929271947Sdes 1930271947Sdes save_LIBS="$LIBS" 1931271947Sdes LIBS="$lt_cv_dlopen_libs $LIBS" 1932271947Sdes 1933271947Sdes AC_CACHE_CHECK([whether a program can dlopen itself], 1934271947Sdes lt_cv_dlopen_self, [dnl 1935271947Sdes _LT_TRY_DLOPEN_SELF( 1936271947Sdes lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1937271947Sdes lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1938271947Sdes ]) 1939271947Sdes 1940271947Sdes if test "x$lt_cv_dlopen_self" = xyes; then 1941271947Sdes wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1942271947Sdes AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1943271947Sdes lt_cv_dlopen_self_static, [dnl 1944271947Sdes _LT_TRY_DLOPEN_SELF( 1945271947Sdes lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1946271947Sdes lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1947271947Sdes ]) 1948271947Sdes fi 1949271947Sdes 1950271947Sdes CPPFLAGS="$save_CPPFLAGS" 1951271947Sdes LDFLAGS="$save_LDFLAGS" 1952271947Sdes LIBS="$save_LIBS" 1953271947Sdes ;; 1954271947Sdes esac 1955271947Sdes 1956271947Sdes case $lt_cv_dlopen_self in 1957271947Sdes yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1958271947Sdes *) enable_dlopen_self=unknown ;; 1959271947Sdes esac 1960271947Sdes 1961271947Sdes case $lt_cv_dlopen_self_static in 1962271947Sdes yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1963271947Sdes *) enable_dlopen_self_static=unknown ;; 1964271947Sdes esac 1965271947Sdesfi 1966271947Sdes_LT_DECL([dlopen_support], [enable_dlopen], [0], 1967271947Sdes [Whether dlopen is supported]) 1968271947Sdes_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1969271947Sdes [Whether dlopen of programs is supported]) 1970271947Sdes_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1971271947Sdes [Whether dlopen of statically linked programs is supported]) 1972271947Sdes])# LT_SYS_DLOPEN_SELF 1973271947Sdes 1974271947Sdes# Old name: 1975271947SdesAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1976271947Sdesdnl aclocal-1.4 backwards compatibility: 1977271947Sdesdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1978271947Sdes 1979271947Sdes 1980271947Sdes# _LT_COMPILER_C_O([TAGNAME]) 1981271947Sdes# --------------------------- 1982271947Sdes# Check to see if options -c and -o are simultaneously supported by compiler. 1983271947Sdes# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1984271947Sdesm4_defun([_LT_COMPILER_C_O], 1985271947Sdes[m4_require([_LT_DECL_SED])dnl 1986271947Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1987271947Sdesm4_require([_LT_TAG_COMPILER])dnl 1988271947SdesAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1989271947Sdes [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1990271947Sdes [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1991271947Sdes $RM -r conftest 2>/dev/null 1992271947Sdes mkdir conftest 1993271947Sdes cd conftest 1994271947Sdes mkdir out 1995271947Sdes echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1996271947Sdes 1997271947Sdes lt_compiler_flag="-o out/conftest2.$ac_objext" 1998271947Sdes # Insert the option either (1) after the last *FLAGS variable, or 1999271947Sdes # (2) before a word containing "conftest.", or (3) at the end. 2000271947Sdes # Note that $ac_compile itself does not contain backslashes and begins 2001271947Sdes # with a dollar sign (not a hyphen), so the echo should work correctly. 2002271947Sdes lt_compile=`echo "$ac_compile" | $SED \ 2003271947Sdes -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2004271947Sdes -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2005271947Sdes -e 's:$: $lt_compiler_flag:'` 2006271947Sdes (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2007271947Sdes (eval "$lt_compile" 2>out/conftest.err) 2008271947Sdes ac_status=$? 2009271947Sdes cat out/conftest.err >&AS_MESSAGE_LOG_FD 2010271947Sdes echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2011271947Sdes if (exit $ac_status) && test -s out/conftest2.$ac_objext 2012271947Sdes then 2013271947Sdes # The compiler can only warn and ignore the option if not recognized 2014271947Sdes # So say no if there are warnings 2015271947Sdes $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2016271947Sdes $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2017271947Sdes if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2018271947Sdes _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2019271947Sdes fi 2020271947Sdes fi 2021271947Sdes chmod u+w . 2>&AS_MESSAGE_LOG_FD 2022271947Sdes $RM conftest* 2023271947Sdes # SGI C++ compiler will create directory out/ii_files/ for 2024271947Sdes # template instantiation 2025271947Sdes test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2026271947Sdes $RM out/* && rmdir out 2027271947Sdes cd .. 2028271947Sdes $RM -r conftest 2029271947Sdes $RM conftest* 2030271947Sdes]) 2031271947Sdes_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2032271947Sdes [Does compiler simultaneously support -c and -o options?]) 2033271947Sdes])# _LT_COMPILER_C_O 2034271947Sdes 2035271947Sdes 2036271947Sdes# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2037271947Sdes# ---------------------------------- 2038271947Sdes# Check to see if we can do hard links to lock some files if needed 2039271947Sdesm4_defun([_LT_COMPILER_FILE_LOCKS], 2040271947Sdes[m4_require([_LT_ENABLE_LOCK])dnl 2041271947Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2042271947Sdes_LT_COMPILER_C_O([$1]) 2043271947Sdes 2044271947Sdeshard_links="nottested" 2045271947Sdesif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2046271947Sdes # do not overwrite the value of need_locks provided by the user 2047271947Sdes AC_MSG_CHECKING([if we can lock with hard links]) 2048271947Sdes hard_links=yes 2049271947Sdes $RM conftest* 2050271947Sdes ln conftest.a conftest.b 2>/dev/null && hard_links=no 2051271947Sdes touch conftest.a 2052271947Sdes ln conftest.a conftest.b 2>&5 || hard_links=no 2053271947Sdes ln conftest.a conftest.b 2>/dev/null && hard_links=no 2054271947Sdes AC_MSG_RESULT([$hard_links]) 2055271947Sdes if test "$hard_links" = no; then 2056271947Sdes AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2057271947Sdes need_locks=warn 2058271947Sdes fi 2059271947Sdeselse 2060271947Sdes need_locks=no 2061271947Sdesfi 2062271947Sdes_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2063271947Sdes])# _LT_COMPILER_FILE_LOCKS 2064271947Sdes 2065271947Sdes 2066271947Sdes# _LT_CHECK_OBJDIR 2067271947Sdes# ---------------- 2068271947Sdesm4_defun([_LT_CHECK_OBJDIR], 2069271947Sdes[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2070271947Sdes[rm -f .libs 2>/dev/null 2071271947Sdesmkdir .libs 2>/dev/null 2072271947Sdesif test -d .libs; then 2073271947Sdes lt_cv_objdir=.libs 2074271947Sdeselse 2075271947Sdes # MS-DOS does not allow filenames that begin with a dot. 2076271947Sdes lt_cv_objdir=_libs 2077271947Sdesfi 2078271947Sdesrmdir .libs 2>/dev/null]) 2079271947Sdesobjdir=$lt_cv_objdir 2080271947Sdes_LT_DECL([], [objdir], [0], 2081271947Sdes [The name of the directory that contains temporary libtool files])dnl 2082271947Sdesm4_pattern_allow([LT_OBJDIR])dnl 2083271947SdesAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2084271947Sdes [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2085271947Sdes])# _LT_CHECK_OBJDIR 2086271947Sdes 2087271947Sdes 2088271947Sdes# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2089271947Sdes# -------------------------------------- 2090271947Sdes# Check hardcoding attributes. 2091271947Sdesm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2092271947Sdes[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2093271947Sdes_LT_TAGVAR(hardcode_action, $1)= 2094271947Sdesif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2095271947Sdes test -n "$_LT_TAGVAR(runpath_var, $1)" || 2096271947Sdes test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2097271947Sdes 2098271947Sdes # We can hardcode non-existent directories. 2099271947Sdes if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2100271947Sdes # If the only mechanism to avoid hardcoding is shlibpath_var, we 2101271947Sdes # have to relink, otherwise we might link with an installed library 2102271947Sdes # when we should be linking with a yet-to-be-installed one 2103271947Sdes ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2104271947Sdes test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2105271947Sdes # Linking always hardcodes the temporary library directory. 2106271947Sdes _LT_TAGVAR(hardcode_action, $1)=relink 2107271947Sdes else 2108271947Sdes # We can link without hardcoding, and we can hardcode nonexisting dirs. 2109271947Sdes _LT_TAGVAR(hardcode_action, $1)=immediate 2110271947Sdes fi 2111271947Sdeselse 2112271947Sdes # We cannot hardcode anything, or else we can only hardcode existing 2113271947Sdes # directories. 2114271947Sdes _LT_TAGVAR(hardcode_action, $1)=unsupported 2115271947Sdesfi 2116271947SdesAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2117271947Sdes 2118271947Sdesif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2119271947Sdes test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2120271947Sdes # Fast installation is not supported 2121271947Sdes enable_fast_install=no 2122271947Sdeselif test "$shlibpath_overrides_runpath" = yes || 2123271947Sdes test "$enable_shared" = no; then 2124271947Sdes # Fast installation is not necessary 2125271947Sdes enable_fast_install=needless 2126271947Sdesfi 2127271947Sdes_LT_TAGDECL([], [hardcode_action], [0], 2128271947Sdes [How to hardcode a shared library path into an executable]) 2129271947Sdes])# _LT_LINKER_HARDCODE_LIBPATH 2130271947Sdes 2131271947Sdes 2132271947Sdes# _LT_CMD_STRIPLIB 2133271947Sdes# ---------------- 2134271947Sdesm4_defun([_LT_CMD_STRIPLIB], 2135271947Sdes[m4_require([_LT_DECL_EGREP]) 2136271947Sdesstriplib= 2137271947Sdesold_striplib= 2138271947SdesAC_MSG_CHECKING([whether stripping libraries is possible]) 2139271947Sdesif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2140271947Sdes test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2141271947Sdes test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2142271947Sdes AC_MSG_RESULT([yes]) 2143271947Sdeselse 2144271947Sdes# FIXME - insert some real tests, host_os isn't really good enough 2145271947Sdes case $host_os in 2146271947Sdes darwin*) 2147271947Sdes if test -n "$STRIP" ; then 2148271947Sdes striplib="$STRIP -x" 2149271947Sdes old_striplib="$STRIP -S" 2150271947Sdes AC_MSG_RESULT([yes]) 2151271947Sdes else 2152271947Sdes AC_MSG_RESULT([no]) 2153271947Sdes fi 2154271947Sdes ;; 2155271947Sdes *) 2156271947Sdes AC_MSG_RESULT([no]) 2157271947Sdes ;; 2158271947Sdes esac 2159271947Sdesfi 2160271947Sdes_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2161271947Sdes_LT_DECL([], [striplib], [1]) 2162271947Sdes])# _LT_CMD_STRIPLIB 2163271947Sdes 2164271947Sdes 2165271947Sdes# _LT_SYS_DYNAMIC_LINKER([TAG]) 2166271947Sdes# ----------------------------- 2167271947Sdes# PORTME Fill in your ld.so characteristics 2168271947Sdesm4_defun([_LT_SYS_DYNAMIC_LINKER], 2169271947Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2170271947Sdesm4_require([_LT_DECL_EGREP])dnl 2171271947Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2172271947Sdesm4_require([_LT_DECL_OBJDUMP])dnl 2173271947Sdesm4_require([_LT_DECL_SED])dnl 2174271947Sdesm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2175271947SdesAC_MSG_CHECKING([dynamic linker characteristics]) 2176271947Sdesm4_if([$1], 2177271947Sdes [], [ 2178271947Sdesif test "$GCC" = yes; then 2179271947Sdes case $host_os in 2180271947Sdes darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2181271947Sdes *) lt_awk_arg="/^libraries:/" ;; 2182271947Sdes esac 2183271947Sdes case $host_os in 2184271947Sdes mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2185271947Sdes *) lt_sed_strip_eq="s,=/,/,g" ;; 2186271947Sdes esac 2187271947Sdes lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2188271947Sdes case $lt_search_path_spec in 2189271947Sdes *\;*) 2190271947Sdes # if the path contains ";" then we assume it to be the separator 2191271947Sdes # otherwise default to the standard path separator (i.e. ":") - it is 2192271947Sdes # assumed that no part of a normal pathname contains ";" but that should 2193271947Sdes # okay in the real world where ";" in dirpaths is itself problematic. 2194271947Sdes lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2195271947Sdes ;; 2196271947Sdes *) 2197271947Sdes lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2198271947Sdes ;; 2199271947Sdes esac 2200271947Sdes # Ok, now we have the path, separated by spaces, we can step through it 2201271947Sdes # and add multilib dir if necessary. 2202271947Sdes lt_tmp_lt_search_path_spec= 2203271947Sdes lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2204271947Sdes for lt_sys_path in $lt_search_path_spec; do 2205271947Sdes if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2206271947Sdes lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2207271947Sdes else 2208271947Sdes test -d "$lt_sys_path" && \ 2209271947Sdes lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2210271947Sdes fi 2211271947Sdes done 2212271947Sdes lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2213271947SdesBEGIN {RS=" "; FS="/|\n";} { 2214271947Sdes lt_foo=""; 2215271947Sdes lt_count=0; 2216271947Sdes for (lt_i = NF; lt_i > 0; lt_i--) { 2217271947Sdes if ($lt_i != "" && $lt_i != ".") { 2218271947Sdes if ($lt_i == "..") { 2219271947Sdes lt_count++; 2220271947Sdes } else { 2221271947Sdes if (lt_count == 0) { 2222271947Sdes lt_foo="/" $lt_i lt_foo; 2223271947Sdes } else { 2224271947Sdes lt_count--; 2225271947Sdes } 2226271947Sdes } 2227271947Sdes } 2228271947Sdes } 2229271947Sdes if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2230271947Sdes if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2231271947Sdes}'` 2232271947Sdes # AWK program above erroneously prepends '/' to C:/dos/paths 2233271947Sdes # for these hosts. 2234271947Sdes case $host_os in 2235271947Sdes mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2236271947Sdes $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2237271947Sdes esac 2238271947Sdes sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2239271947Sdeselse 2240271947Sdes sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2241271947Sdesfi]) 2242271947Sdeslibrary_names_spec= 2243271947Sdeslibname_spec='lib$name' 2244271947Sdessoname_spec= 2245271947Sdesshrext_cmds=".so" 2246271947Sdespostinstall_cmds= 2247271947Sdespostuninstall_cmds= 2248271947Sdesfinish_cmds= 2249271947Sdesfinish_eval= 2250271947Sdesshlibpath_var= 2251271947Sdesshlibpath_overrides_runpath=unknown 2252271947Sdesversion_type=none 2253271947Sdesdynamic_linker="$host_os ld.so" 2254271947Sdessys_lib_dlsearch_path_spec="/lib /usr/lib" 2255271947Sdesneed_lib_prefix=unknown 2256271947Sdeshardcode_into_libs=no 2257271947Sdes 2258271947Sdes# when you set need_version to no, make sure it does not cause -set_version 2259271947Sdes# flags to be left without arguments 2260271947Sdesneed_version=unknown 2261271947Sdes 2262271947Sdescase $host_os in 2263271947Sdesaix3*) 2264271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2265271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2266271947Sdes shlibpath_var=LIBPATH 2267271947Sdes 2268271947Sdes # AIX 3 has no versioning support, so we append a major version to the name. 2269271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2270271947Sdes ;; 2271271947Sdes 2272271947Sdesaix[[4-9]]*) 2273271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2274271947Sdes need_lib_prefix=no 2275271947Sdes need_version=no 2276271947Sdes hardcode_into_libs=yes 2277271947Sdes if test "$host_cpu" = ia64; then 2278271947Sdes # AIX 5 supports IA64 2279271947Sdes library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2280271947Sdes shlibpath_var=LD_LIBRARY_PATH 2281271947Sdes else 2282271947Sdes # With GCC up to 2.95.x, collect2 would create an import file 2283271947Sdes # for dependence libraries. The import file would start with 2284271947Sdes # the line `#! .'. This would cause the generated library to 2285271947Sdes # depend on `.', always an invalid library. This was fixed in 2286271947Sdes # development snapshots of GCC prior to 3.0. 2287271947Sdes case $host_os in 2288271947Sdes aix4 | aix4.[[01]] | aix4.[[01]].*) 2289271947Sdes if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2290271947Sdes echo ' yes ' 2291271947Sdes echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2292271947Sdes : 2293271947Sdes else 2294271947Sdes can_build_shared=no 2295271947Sdes fi 2296271947Sdes ;; 2297271947Sdes esac 2298271947Sdes # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2299271947Sdes # soname into executable. Probably we can add versioning support to 2300271947Sdes # collect2, so additional links can be useful in future. 2301271947Sdes if test "$aix_use_runtimelinking" = yes; then 2302271947Sdes # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2303271947Sdes # instead of lib<name>.a to let people know that these are not 2304271947Sdes # typical AIX shared libraries. 2305271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2306271947Sdes else 2307271947Sdes # We preserve .a as extension for shared libraries through AIX4.2 2308271947Sdes # and later when we are not doing run time linking. 2309271947Sdes library_names_spec='${libname}${release}.a $libname.a' 2310271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2311271947Sdes fi 2312271947Sdes shlibpath_var=LIBPATH 2313271947Sdes fi 2314271947Sdes ;; 2315271947Sdes 2316271947Sdesamigaos*) 2317271947Sdes case $host_cpu in 2318271947Sdes powerpc) 2319271947Sdes # Since July 2007 AmigaOS4 officially supports .so libraries. 2320271947Sdes # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2321271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2322271947Sdes ;; 2323271947Sdes m68k) 2324271947Sdes library_names_spec='$libname.ixlibrary $libname.a' 2325271947Sdes # Create ${libname}_ixlibrary.a entries in /sys/libs. 2326271947Sdes 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' 2327271947Sdes ;; 2328271947Sdes esac 2329271947Sdes ;; 2330271947Sdes 2331271947Sdesbeos*) 2332271947Sdes library_names_spec='${libname}${shared_ext}' 2333271947Sdes dynamic_linker="$host_os ld.so" 2334271947Sdes shlibpath_var=LIBRARY_PATH 2335271947Sdes ;; 2336271947Sdes 2337271947Sdesbsdi[[45]]*) 2338271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2339271947Sdes need_version=no 2340271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2341271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2342271947Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2343271947Sdes shlibpath_var=LD_LIBRARY_PATH 2344271947Sdes sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2345271947Sdes sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2346271947Sdes # the default ld.so.conf also contains /usr/contrib/lib and 2347271947Sdes # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2348271947Sdes # libtool to hard-code these into programs 2349271947Sdes ;; 2350271947Sdes 2351271947Sdescygwin* | mingw* | pw32* | cegcc*) 2352271947Sdes version_type=windows 2353271947Sdes shrext_cmds=".dll" 2354271947Sdes need_version=no 2355271947Sdes need_lib_prefix=no 2356271947Sdes 2357271947Sdes case $GCC,$cc_basename in 2358271947Sdes yes,*) 2359271947Sdes # gcc 2360271947Sdes library_names_spec='$libname.dll.a' 2361271947Sdes # DLL is installed to $(libdir)/../bin by postinstall_cmds 2362271947Sdes postinstall_cmds='base_file=`basename \${file}`~ 2363271947Sdes dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2364271947Sdes dldir=$destdir/`dirname \$dlpath`~ 2365271947Sdes test -d \$dldir || mkdir -p \$dldir~ 2366271947Sdes $install_prog $dir/$dlname \$dldir/$dlname~ 2367271947Sdes chmod a+x \$dldir/$dlname~ 2368271947Sdes if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2369271947Sdes eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2370271947Sdes fi' 2371271947Sdes postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2372271947Sdes dlpath=$dir/\$dldll~ 2373271947Sdes $RM \$dlpath' 2374271947Sdes shlibpath_overrides_runpath=yes 2375271947Sdes 2376271947Sdes case $host_os in 2377271947Sdes cygwin*) 2378271947Sdes # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2379271947Sdes soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2380271947Sdesm4_if([$1], [],[ 2381271947Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2382271947Sdes ;; 2383271947Sdes mingw* | cegcc*) 2384271947Sdes # MinGW DLLs use traditional 'lib' prefix 2385271947Sdes soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2386271947Sdes ;; 2387271947Sdes pw32*) 2388271947Sdes # pw32 DLLs use 'pw' prefix rather than 'lib' 2389271947Sdes library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2390271947Sdes ;; 2391271947Sdes esac 2392271947Sdes dynamic_linker='Win32 ld.exe' 2393271947Sdes ;; 2394271947Sdes 2395271947Sdes *,cl*) 2396271947Sdes # Native MSVC 2397271947Sdes libname_spec='$name' 2398271947Sdes soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2399271947Sdes library_names_spec='${libname}.dll.lib' 2400271947Sdes 2401271947Sdes case $build_os in 2402271947Sdes mingw*) 2403271947Sdes sys_lib_search_path_spec= 2404271947Sdes lt_save_ifs=$IFS 2405271947Sdes IFS=';' 2406271947Sdes for lt_path in $LIB 2407271947Sdes do 2408271947Sdes IFS=$lt_save_ifs 2409271947Sdes # Let DOS variable expansion print the short 8.3 style file name. 2410271947Sdes lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2411271947Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2412271947Sdes done 2413271947Sdes IFS=$lt_save_ifs 2414271947Sdes # Convert to MSYS style. 2415271947Sdes sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2416271947Sdes ;; 2417271947Sdes cygwin*) 2418271947Sdes # Convert to unix form, then to dos form, then back to unix form 2419271947Sdes # but this time dos style (no spaces!) so that the unix form looks 2420271947Sdes # like /cygdrive/c/PROGRA~1:/cygdr... 2421271947Sdes sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2422271947Sdes sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2423271947Sdes sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2424271947Sdes ;; 2425271947Sdes *) 2426271947Sdes sys_lib_search_path_spec="$LIB" 2427271947Sdes if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2428271947Sdes # It is most probably a Windows format PATH. 2429271947Sdes sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2430271947Sdes else 2431271947Sdes sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2432271947Sdes fi 2433271947Sdes # FIXME: find the short name or the path components, as spaces are 2434271947Sdes # common. (e.g. "Program Files" -> "PROGRA~1") 2435271947Sdes ;; 2436271947Sdes esac 2437271947Sdes 2438271947Sdes # DLL is installed to $(libdir)/../bin by postinstall_cmds 2439271947Sdes postinstall_cmds='base_file=`basename \${file}`~ 2440271947Sdes dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2441271947Sdes dldir=$destdir/`dirname \$dlpath`~ 2442271947Sdes test -d \$dldir || mkdir -p \$dldir~ 2443271947Sdes $install_prog $dir/$dlname \$dldir/$dlname' 2444271947Sdes postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2445271947Sdes dlpath=$dir/\$dldll~ 2446271947Sdes $RM \$dlpath' 2447271947Sdes shlibpath_overrides_runpath=yes 2448271947Sdes dynamic_linker='Win32 link.exe' 2449271947Sdes ;; 2450271947Sdes 2451271947Sdes *) 2452271947Sdes # Assume MSVC wrapper 2453271947Sdes library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2454271947Sdes dynamic_linker='Win32 ld.exe' 2455271947Sdes ;; 2456271947Sdes esac 2457271947Sdes # FIXME: first we should search . and the directory the executable is in 2458271947Sdes shlibpath_var=PATH 2459271947Sdes ;; 2460271947Sdes 2461271947Sdesdarwin* | rhapsody*) 2462271947Sdes dynamic_linker="$host_os dyld" 2463271947Sdes version_type=darwin 2464271947Sdes need_lib_prefix=no 2465271947Sdes need_version=no 2466271947Sdes library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2467271947Sdes soname_spec='${libname}${release}${major}$shared_ext' 2468271947Sdes shlibpath_overrides_runpath=yes 2469271947Sdes shlibpath_var=DYLD_LIBRARY_PATH 2470271947Sdes shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2471271947Sdesm4_if([$1], [],[ 2472271947Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2473271947Sdes sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2474271947Sdes ;; 2475271947Sdes 2476271947Sdesdgux*) 2477271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2478271947Sdes need_lib_prefix=no 2479271947Sdes need_version=no 2480271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2481271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2482271947Sdes shlibpath_var=LD_LIBRARY_PATH 2483271947Sdes ;; 2484271947Sdes 2485271947Sdesfreebsd* | dragonfly*) 2486271947Sdes # DragonFly does not have aout. When/if they implement a new 2487271947Sdes # versioning mechanism, adjust this. 2488271947Sdes if test -x /usr/bin/objformat; then 2489271947Sdes objformat=`/usr/bin/objformat` 2490271947Sdes else 2491271947Sdes case $host_os in 2492271947Sdes freebsd[[23]].*) objformat=aout ;; 2493271947Sdes *) objformat=elf ;; 2494271947Sdes esac 2495271947Sdes fi 2496271947Sdes version_type=freebsd-$objformat 2497271947Sdes case $version_type in 2498271947Sdes freebsd-elf*) 2499271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2500271947Sdes need_version=no 2501271947Sdes need_lib_prefix=no 2502271947Sdes ;; 2503271947Sdes freebsd-*) 2504271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2505271947Sdes need_version=yes 2506271947Sdes ;; 2507271947Sdes esac 2508271947Sdes shlibpath_var=LD_LIBRARY_PATH 2509271947Sdes case $host_os in 2510271947Sdes freebsd2.*) 2511271947Sdes shlibpath_overrides_runpath=yes 2512271947Sdes ;; 2513271947Sdes freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2514271947Sdes shlibpath_overrides_runpath=yes 2515271947Sdes hardcode_into_libs=yes 2516271947Sdes ;; 2517271947Sdes freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2518271947Sdes freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2519271947Sdes shlibpath_overrides_runpath=no 2520271947Sdes hardcode_into_libs=yes 2521271947Sdes ;; 2522271947Sdes *) # from 4.6 on, and DragonFly 2523271947Sdes shlibpath_overrides_runpath=yes 2524271947Sdes hardcode_into_libs=yes 2525271947Sdes ;; 2526271947Sdes esac 2527271947Sdes ;; 2528271947Sdes 2529271947Sdesgnu*) 2530271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2531271947Sdes need_lib_prefix=no 2532271947Sdes need_version=no 2533271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2534271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2535271947Sdes shlibpath_var=LD_LIBRARY_PATH 2536271947Sdes shlibpath_overrides_runpath=no 2537271947Sdes hardcode_into_libs=yes 2538271947Sdes ;; 2539271947Sdes 2540271947Sdeshaiku*) 2541271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2542271947Sdes need_lib_prefix=no 2543271947Sdes need_version=no 2544271947Sdes dynamic_linker="$host_os runtime_loader" 2545271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2546271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2547271947Sdes shlibpath_var=LIBRARY_PATH 2548271947Sdes shlibpath_overrides_runpath=yes 2549271947Sdes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2550271947Sdes hardcode_into_libs=yes 2551271947Sdes ;; 2552271947Sdes 2553271947Sdeshpux9* | hpux10* | hpux11*) 2554271947Sdes # Give a soname corresponding to the major version so that dld.sl refuses to 2555271947Sdes # link against other versions. 2556271947Sdes version_type=sunos 2557271947Sdes need_lib_prefix=no 2558271947Sdes need_version=no 2559271947Sdes case $host_cpu in 2560271947Sdes ia64*) 2561271947Sdes shrext_cmds='.so' 2562271947Sdes hardcode_into_libs=yes 2563271947Sdes dynamic_linker="$host_os dld.so" 2564271947Sdes shlibpath_var=LD_LIBRARY_PATH 2565271947Sdes shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2566271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2567271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2568271947Sdes if test "X$HPUX_IA64_MODE" = X32; then 2569271947Sdes sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2570271947Sdes else 2571271947Sdes sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2572271947Sdes fi 2573271947Sdes sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2574271947Sdes ;; 2575271947Sdes hppa*64*) 2576271947Sdes shrext_cmds='.sl' 2577271947Sdes hardcode_into_libs=yes 2578271947Sdes dynamic_linker="$host_os dld.sl" 2579271947Sdes shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2580271947Sdes shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2581271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2582271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2583271947Sdes sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2584271947Sdes sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2585271947Sdes ;; 2586271947Sdes *) 2587271947Sdes shrext_cmds='.sl' 2588271947Sdes dynamic_linker="$host_os dld.sl" 2589271947Sdes shlibpath_var=SHLIB_PATH 2590271947Sdes shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2591271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2592271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2593271947Sdes ;; 2594271947Sdes esac 2595271947Sdes # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2596271947Sdes postinstall_cmds='chmod 555 $lib' 2597271947Sdes # or fails outright, so override atomically: 2598271947Sdes install_override_mode=555 2599271947Sdes ;; 2600271947Sdes 2601271947Sdesinterix[[3-9]]*) 2602271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2603271947Sdes need_lib_prefix=no 2604271947Sdes need_version=no 2605271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2606271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2607271947Sdes dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2608271947Sdes shlibpath_var=LD_LIBRARY_PATH 2609271947Sdes shlibpath_overrides_runpath=no 2610271947Sdes hardcode_into_libs=yes 2611271947Sdes ;; 2612271947Sdes 2613271947Sdesirix5* | irix6* | nonstopux*) 2614271947Sdes case $host_os in 2615271947Sdes nonstopux*) version_type=nonstopux ;; 2616271947Sdes *) 2617271947Sdes if test "$lt_cv_prog_gnu_ld" = yes; then 2618271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2619271947Sdes else 2620271947Sdes version_type=irix 2621271947Sdes fi ;; 2622271947Sdes esac 2623271947Sdes need_lib_prefix=no 2624271947Sdes need_version=no 2625271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2626271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2627271947Sdes case $host_os in 2628271947Sdes irix5* | nonstopux*) 2629271947Sdes libsuff= shlibsuff= 2630271947Sdes ;; 2631271947Sdes *) 2632271947Sdes case $LD in # libtool.m4 will add one of these switches to LD 2633271947Sdes *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2634271947Sdes libsuff= shlibsuff= libmagic=32-bit;; 2635271947Sdes *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2636271947Sdes libsuff=32 shlibsuff=N32 libmagic=N32;; 2637271947Sdes *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2638271947Sdes libsuff=64 shlibsuff=64 libmagic=64-bit;; 2639271947Sdes *) libsuff= shlibsuff= libmagic=never-match;; 2640271947Sdes esac 2641271947Sdes ;; 2642271947Sdes esac 2643271947Sdes shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2644271947Sdes shlibpath_overrides_runpath=no 2645271947Sdes sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2646271947Sdes sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2647271947Sdes hardcode_into_libs=yes 2648271947Sdes ;; 2649271947Sdes 2650271947Sdes# No shared lib support for Linux oldld, aout, or coff. 2651271947Sdeslinux*oldld* | linux*aout* | linux*coff*) 2652271947Sdes dynamic_linker=no 2653271947Sdes ;; 2654271947Sdes 2655271947Sdes# This must be glibc/ELF. 2656271947Sdeslinux* | k*bsd*-gnu | kopensolaris*-gnu) 2657271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2658271947Sdes need_lib_prefix=no 2659271947Sdes need_version=no 2660271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2661271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2662271947Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2663271947Sdes shlibpath_var=LD_LIBRARY_PATH 2664271947Sdes shlibpath_overrides_runpath=no 2665271947Sdes 2666271947Sdes # Some binutils ld are patched to set DT_RUNPATH 2667271947Sdes AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2668271947Sdes [lt_cv_shlibpath_overrides_runpath=no 2669271947Sdes save_LDFLAGS=$LDFLAGS 2670271947Sdes save_libdir=$libdir 2671271947Sdes eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2672271947Sdes LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2673271947Sdes AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2674271947Sdes [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2675271947Sdes [lt_cv_shlibpath_overrides_runpath=yes])]) 2676271947Sdes LDFLAGS=$save_LDFLAGS 2677271947Sdes libdir=$save_libdir 2678271947Sdes ]) 2679271947Sdes shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2680271947Sdes 2681271947Sdes # This implies no fast_install, which is unacceptable. 2682271947Sdes # Some rework will be needed to allow for fast_install 2683271947Sdes # before this can be enabled. 2684271947Sdes hardcode_into_libs=yes 2685271947Sdes 2686271947Sdes # Append ld.so.conf contents to the search path 2687271947Sdes if test -f /etc/ld.so.conf; then 2688271947Sdes 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' ' '` 2689271947Sdes sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2690271947Sdes fi 2691271947Sdes 2692271947Sdes # We used to test for /lib/ld.so.1 and disable shared libraries on 2693271947Sdes # powerpc, because MkLinux only supported shared libraries with the 2694271947Sdes # GNU dynamic linker. Since this was broken with cross compilers, 2695271947Sdes # most powerpc-linux boxes support dynamic linking these days and 2696271947Sdes # people can always --disable-shared, the test was removed, and we 2697271947Sdes # assume the GNU/Linux dynamic linker is in use. 2698271947Sdes dynamic_linker='GNU/Linux ld.so' 2699271947Sdes ;; 2700271947Sdes 2701271947Sdesnetbsd*) 2702271947Sdes version_type=sunos 2703271947Sdes need_lib_prefix=no 2704271947Sdes need_version=no 2705271947Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2706271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2707271947Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2708271947Sdes dynamic_linker='NetBSD (a.out) ld.so' 2709271947Sdes else 2710271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2711271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2712271947Sdes dynamic_linker='NetBSD ld.elf_so' 2713271947Sdes fi 2714271947Sdes shlibpath_var=LD_LIBRARY_PATH 2715271947Sdes shlibpath_overrides_runpath=yes 2716271947Sdes hardcode_into_libs=yes 2717271947Sdes ;; 2718271947Sdes 2719271947Sdesnewsos6) 2720271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2721271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2722271947Sdes shlibpath_var=LD_LIBRARY_PATH 2723271947Sdes shlibpath_overrides_runpath=yes 2724271947Sdes ;; 2725271947Sdes 2726271947Sdes*nto* | *qnx*) 2727271947Sdes version_type=qnx 2728271947Sdes need_lib_prefix=no 2729271947Sdes need_version=no 2730271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2731271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2732271947Sdes shlibpath_var=LD_LIBRARY_PATH 2733271947Sdes shlibpath_overrides_runpath=no 2734271947Sdes hardcode_into_libs=yes 2735271947Sdes dynamic_linker='ldqnx.so' 2736271947Sdes ;; 2737271947Sdes 2738271947Sdesopenbsd*) 2739271947Sdes version_type=sunos 2740271947Sdes sys_lib_dlsearch_path_spec="/usr/lib" 2741271947Sdes need_lib_prefix=no 2742271947Sdes # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2743271947Sdes case $host_os in 2744271947Sdes openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2745271947Sdes *) need_version=no ;; 2746271947Sdes esac 2747271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2748271947Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2749271947Sdes shlibpath_var=LD_LIBRARY_PATH 2750271947Sdes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2751271947Sdes case $host_os in 2752271947Sdes openbsd2.[[89]] | openbsd2.[[89]].*) 2753271947Sdes shlibpath_overrides_runpath=no 2754271947Sdes ;; 2755271947Sdes *) 2756271947Sdes shlibpath_overrides_runpath=yes 2757271947Sdes ;; 2758271947Sdes esac 2759271947Sdes else 2760271947Sdes shlibpath_overrides_runpath=yes 2761271947Sdes fi 2762271947Sdes ;; 2763271947Sdes 2764271947Sdesos2*) 2765271947Sdes libname_spec='$name' 2766271947Sdes shrext_cmds=".dll" 2767271947Sdes need_lib_prefix=no 2768271947Sdes library_names_spec='$libname${shared_ext} $libname.a' 2769271947Sdes dynamic_linker='OS/2 ld.exe' 2770271947Sdes shlibpath_var=LIBPATH 2771271947Sdes ;; 2772271947Sdes 2773271947Sdesosf3* | osf4* | osf5*) 2774271947Sdes version_type=osf 2775271947Sdes need_lib_prefix=no 2776271947Sdes need_version=no 2777271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2778271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2779271947Sdes shlibpath_var=LD_LIBRARY_PATH 2780271947Sdes sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2781271947Sdes sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2782271947Sdes ;; 2783271947Sdes 2784271947Sdesrdos*) 2785271947Sdes dynamic_linker=no 2786271947Sdes ;; 2787271947Sdes 2788271947Sdessolaris*) 2789271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2790271947Sdes need_lib_prefix=no 2791271947Sdes need_version=no 2792271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2793271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2794271947Sdes shlibpath_var=LD_LIBRARY_PATH 2795271947Sdes shlibpath_overrides_runpath=yes 2796271947Sdes hardcode_into_libs=yes 2797271947Sdes # ldd complains unless libraries are executable 2798271947Sdes postinstall_cmds='chmod +x $lib' 2799271947Sdes ;; 2800271947Sdes 2801271947Sdessunos4*) 2802271947Sdes version_type=sunos 2803271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2804271947Sdes finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2805271947Sdes shlibpath_var=LD_LIBRARY_PATH 2806271947Sdes shlibpath_overrides_runpath=yes 2807271947Sdes if test "$with_gnu_ld" = yes; then 2808271947Sdes need_lib_prefix=no 2809271947Sdes fi 2810271947Sdes need_version=yes 2811271947Sdes ;; 2812271947Sdes 2813271947Sdessysv4 | sysv4.3*) 2814271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2815271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2816271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2817271947Sdes shlibpath_var=LD_LIBRARY_PATH 2818271947Sdes case $host_vendor in 2819271947Sdes sni) 2820271947Sdes shlibpath_overrides_runpath=no 2821271947Sdes need_lib_prefix=no 2822271947Sdes runpath_var=LD_RUN_PATH 2823271947Sdes ;; 2824271947Sdes siemens) 2825271947Sdes need_lib_prefix=no 2826271947Sdes ;; 2827271947Sdes motorola) 2828271947Sdes need_lib_prefix=no 2829271947Sdes need_version=no 2830271947Sdes shlibpath_overrides_runpath=no 2831271947Sdes sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2832271947Sdes ;; 2833271947Sdes esac 2834271947Sdes ;; 2835271947Sdes 2836271947Sdessysv4*MP*) 2837271947Sdes if test -d /usr/nec ;then 2838271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2839271947Sdes library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2840271947Sdes soname_spec='$libname${shared_ext}.$major' 2841271947Sdes shlibpath_var=LD_LIBRARY_PATH 2842271947Sdes fi 2843271947Sdes ;; 2844271947Sdes 2845271947Sdessysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2846271947Sdes version_type=freebsd-elf 2847271947Sdes need_lib_prefix=no 2848271947Sdes need_version=no 2849271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2850271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2851271947Sdes shlibpath_var=LD_LIBRARY_PATH 2852271947Sdes shlibpath_overrides_runpath=yes 2853271947Sdes hardcode_into_libs=yes 2854271947Sdes if test "$with_gnu_ld" = yes; then 2855271947Sdes sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2856271947Sdes else 2857271947Sdes sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2858271947Sdes case $host_os in 2859271947Sdes sco3.2v5*) 2860271947Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2861271947Sdes ;; 2862271947Sdes esac 2863271947Sdes fi 2864271947Sdes sys_lib_dlsearch_path_spec='/usr/lib' 2865271947Sdes ;; 2866271947Sdes 2867271947Sdestpf*) 2868271947Sdes # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2869271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2870271947Sdes need_lib_prefix=no 2871271947Sdes need_version=no 2872271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2873271947Sdes shlibpath_var=LD_LIBRARY_PATH 2874271947Sdes shlibpath_overrides_runpath=no 2875271947Sdes hardcode_into_libs=yes 2876271947Sdes ;; 2877271947Sdes 2878271947Sdesuts4*) 2879271947Sdes version_type=linux # correct to gnu/linux during the next big refactor 2880271947Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2881271947Sdes soname_spec='${libname}${release}${shared_ext}$major' 2882271947Sdes shlibpath_var=LD_LIBRARY_PATH 2883271947Sdes ;; 2884271947Sdes 2885271947Sdes*) 2886271947Sdes dynamic_linker=no 2887271947Sdes ;; 2888271947Sdesesac 2889271947SdesAC_MSG_RESULT([$dynamic_linker]) 2890271947Sdestest "$dynamic_linker" = no && can_build_shared=no 2891271947Sdes 2892271947Sdesvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2893271947Sdesif test "$GCC" = yes; then 2894271947Sdes variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2895271947Sdesfi 2896271947Sdes 2897271947Sdesif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2898271947Sdes sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2899271947Sdesfi 2900271947Sdesif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2901271947Sdes sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2902271947Sdesfi 2903271947Sdes 2904271947Sdes_LT_DECL([], [variables_saved_for_relink], [1], 2905271947Sdes [Variables whose values should be saved in libtool wrapper scripts and 2906271947Sdes restored at link time]) 2907271947Sdes_LT_DECL([], [need_lib_prefix], [0], 2908271947Sdes [Do we need the "lib" prefix for modules?]) 2909271947Sdes_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2910271947Sdes_LT_DECL([], [version_type], [0], [Library versioning type]) 2911271947Sdes_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2912271947Sdes_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2913271947Sdes_LT_DECL([], [shlibpath_overrides_runpath], [0], 2914271947Sdes [Is shlibpath searched before the hard-coded library search path?]) 2915271947Sdes_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2916271947Sdes_LT_DECL([], [library_names_spec], [1], 2917271947Sdes [[List of archive names. First name is the real one, the rest are links. 2918271947Sdes The last name is the one that the linker finds with -lNAME]]) 2919271947Sdes_LT_DECL([], [soname_spec], [1], 2920271947Sdes [[The coded name of the library, if different from the real name]]) 2921271947Sdes_LT_DECL([], [install_override_mode], [1], 2922271947Sdes [Permission mode override for installation of shared libraries]) 2923271947Sdes_LT_DECL([], [postinstall_cmds], [2], 2924271947Sdes [Command to use after installation of a shared archive]) 2925271947Sdes_LT_DECL([], [postuninstall_cmds], [2], 2926271947Sdes [Command to use after uninstallation of a shared archive]) 2927271947Sdes_LT_DECL([], [finish_cmds], [2], 2928271947Sdes [Commands used to finish a libtool library installation in a directory]) 2929271947Sdes_LT_DECL([], [finish_eval], [1], 2930271947Sdes [[As "finish_cmds", except a single script fragment to be evaled but 2931271947Sdes not shown]]) 2932271947Sdes_LT_DECL([], [hardcode_into_libs], [0], 2933271947Sdes [Whether we should hardcode library paths into libraries]) 2934271947Sdes_LT_DECL([], [sys_lib_search_path_spec], [2], 2935271947Sdes [Compile-time system search path for libraries]) 2936271947Sdes_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2937271947Sdes [Run-time system search path for libraries]) 2938271947Sdes])# _LT_SYS_DYNAMIC_LINKER 2939271947Sdes 2940271947Sdes 2941271947Sdes# _LT_PATH_TOOL_PREFIX(TOOL) 2942271947Sdes# -------------------------- 2943271947Sdes# find a file program which can recognize shared library 2944271947SdesAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2945271947Sdes[m4_require([_LT_DECL_EGREP])dnl 2946271947SdesAC_MSG_CHECKING([for $1]) 2947271947SdesAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2948271947Sdes[case $MAGIC_CMD in 2949271947Sdes[[\\/*] | ?:[\\/]*]) 2950271947Sdes lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2951271947Sdes ;; 2952271947Sdes*) 2953271947Sdes lt_save_MAGIC_CMD="$MAGIC_CMD" 2954271947Sdes lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2955271947Sdesdnl $ac_dummy forces splitting on constant user-supplied paths. 2956271947Sdesdnl POSIX.2 word splitting is done only on the output of word expansions, 2957271947Sdesdnl not every word. This closes a longstanding sh security hole. 2958271947Sdes ac_dummy="m4_if([$2], , $PATH, [$2])" 2959271947Sdes for ac_dir in $ac_dummy; do 2960271947Sdes IFS="$lt_save_ifs" 2961271947Sdes test -z "$ac_dir" && ac_dir=. 2962271947Sdes if test -f $ac_dir/$1; then 2963271947Sdes lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2964271947Sdes if test -n "$file_magic_test_file"; then 2965271947Sdes case $deplibs_check_method in 2966271947Sdes "file_magic "*) 2967271947Sdes file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2968271947Sdes MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2969271947Sdes if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2970271947Sdes $EGREP "$file_magic_regex" > /dev/null; then 2971271947Sdes : 2972271947Sdes else 2973271947Sdes cat <<_LT_EOF 1>&2 2974271947Sdes 2975271947Sdes*** Warning: the command libtool uses to detect shared libraries, 2976271947Sdes*** $file_magic_cmd, produces output that libtool cannot recognize. 2977271947Sdes*** The result is that libtool may fail to recognize shared libraries 2978271947Sdes*** as such. This will affect the creation of libtool libraries that 2979271947Sdes*** depend on shared libraries, but programs linked with such libtool 2980271947Sdes*** libraries will work regardless of this problem. Nevertheless, you 2981271947Sdes*** may want to report the problem to your system manager and/or to 2982271947Sdes*** bug-libtool@gnu.org 2983271947Sdes 2984271947Sdes_LT_EOF 2985271947Sdes fi ;; 2986271947Sdes esac 2987271947Sdes fi 2988271947Sdes break 2989271947Sdes fi 2990271947Sdes done 2991271947Sdes IFS="$lt_save_ifs" 2992271947Sdes MAGIC_CMD="$lt_save_MAGIC_CMD" 2993271947Sdes ;; 2994271947Sdesesac]) 2995271947SdesMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2996271947Sdesif test -n "$MAGIC_CMD"; then 2997271947Sdes AC_MSG_RESULT($MAGIC_CMD) 2998271947Sdeselse 2999271947Sdes AC_MSG_RESULT(no) 3000271947Sdesfi 3001271947Sdes_LT_DECL([], [MAGIC_CMD], [0], 3002271947Sdes [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3003271947Sdes])# _LT_PATH_TOOL_PREFIX 3004271947Sdes 3005271947Sdes# Old name: 3006271947SdesAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3007271947Sdesdnl aclocal-1.4 backwards compatibility: 3008271947Sdesdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3009271947Sdes 3010271947Sdes 3011271947Sdes# _LT_PATH_MAGIC 3012271947Sdes# -------------- 3013271947Sdes# find a file program which can recognize a shared library 3014271947Sdesm4_defun([_LT_PATH_MAGIC], 3015271947Sdes[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3016271947Sdesif test -z "$lt_cv_path_MAGIC_CMD"; then 3017271947Sdes if test -n "$ac_tool_prefix"; then 3018271947Sdes _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3019271947Sdes else 3020271947Sdes MAGIC_CMD=: 3021271947Sdes fi 3022271947Sdesfi 3023271947Sdes])# _LT_PATH_MAGIC 3024271947Sdes 3025271947Sdes 3026271947Sdes# LT_PATH_LD 3027271947Sdes# ---------- 3028271947Sdes# find the pathname to the GNU or non-GNU linker 3029271947SdesAC_DEFUN([LT_PATH_LD], 3030271947Sdes[AC_REQUIRE([AC_PROG_CC])dnl 3031271947SdesAC_REQUIRE([AC_CANONICAL_HOST])dnl 3032271947SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3033271947Sdesm4_require([_LT_DECL_SED])dnl 3034271947Sdesm4_require([_LT_DECL_EGREP])dnl 3035271947Sdesm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3036271947Sdes 3037271947SdesAC_ARG_WITH([gnu-ld], 3038271947Sdes [AS_HELP_STRING([--with-gnu-ld], 3039271947Sdes [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3040271947Sdes [test "$withval" = no || with_gnu_ld=yes], 3041271947Sdes [with_gnu_ld=no])dnl 3042271947Sdes 3043271947Sdesac_prog=ld 3044271947Sdesif test "$GCC" = yes; then 3045271947Sdes # Check if gcc -print-prog-name=ld gives a path. 3046271947Sdes AC_MSG_CHECKING([for ld used by $CC]) 3047271947Sdes case $host in 3048271947Sdes *-*-mingw*) 3049271947Sdes # gcc leaves a trailing carriage return which upsets mingw 3050271947Sdes ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3051271947Sdes *) 3052271947Sdes ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3053271947Sdes esac 3054271947Sdes case $ac_prog in 3055271947Sdes # Accept absolute paths. 3056271947Sdes [[\\/]]* | ?:[[\\/]]*) 3057271947Sdes re_direlt='/[[^/]][[^/]]*/\.\./' 3058271947Sdes # Canonicalize the pathname of ld 3059271947Sdes ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3060271947Sdes while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3061271947Sdes ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3062271947Sdes done 3063271947Sdes test -z "$LD" && LD="$ac_prog" 3064271947Sdes ;; 3065271947Sdes "") 3066271947Sdes # If it fails, then pretend we aren't using GCC. 3067271947Sdes ac_prog=ld 3068271947Sdes ;; 3069271947Sdes *) 3070271947Sdes # If it is relative, then search for the first ld in PATH. 3071271947Sdes with_gnu_ld=unknown 3072271947Sdes ;; 3073271947Sdes esac 3074271947Sdeselif test "$with_gnu_ld" = yes; then 3075271947Sdes AC_MSG_CHECKING([for GNU ld]) 3076271947Sdeselse 3077271947Sdes AC_MSG_CHECKING([for non-GNU ld]) 3078271947Sdesfi 3079271947SdesAC_CACHE_VAL(lt_cv_path_LD, 3080271947Sdes[if test -z "$LD"; then 3081271947Sdes lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3082271947Sdes for ac_dir in $PATH; do 3083271947Sdes IFS="$lt_save_ifs" 3084271947Sdes test -z "$ac_dir" && ac_dir=. 3085271947Sdes if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3086271947Sdes lt_cv_path_LD="$ac_dir/$ac_prog" 3087271947Sdes # Check to see if the program is GNU ld. I'd rather use --version, 3088271947Sdes # but apparently some variants of GNU ld only accept -v. 3089271947Sdes # Break only if it was the GNU/non-GNU ld that we prefer. 3090271947Sdes case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3091271947Sdes *GNU* | *'with BFD'*) 3092271947Sdes test "$with_gnu_ld" != no && break 3093271947Sdes ;; 3094271947Sdes *) 3095271947Sdes test "$with_gnu_ld" != yes && break 3096271947Sdes ;; 3097271947Sdes esac 3098271947Sdes fi 3099271947Sdes done 3100271947Sdes IFS="$lt_save_ifs" 3101271947Sdeselse 3102271947Sdes lt_cv_path_LD="$LD" # Let the user override the test with a path. 3103271947Sdesfi]) 3104271947SdesLD="$lt_cv_path_LD" 3105271947Sdesif test -n "$LD"; then 3106271947Sdes AC_MSG_RESULT($LD) 3107271947Sdeselse 3108271947Sdes AC_MSG_RESULT(no) 3109271947Sdesfi 3110271947Sdestest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3111271947Sdes_LT_PATH_LD_GNU 3112271947SdesAC_SUBST([LD]) 3113271947Sdes 3114271947Sdes_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3115271947Sdes])# LT_PATH_LD 3116271947Sdes 3117271947Sdes# Old names: 3118271947SdesAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3119271947SdesAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3120271947Sdesdnl aclocal-1.4 backwards compatibility: 3121271947Sdesdnl AC_DEFUN([AM_PROG_LD], []) 3122271947Sdesdnl AC_DEFUN([AC_PROG_LD], []) 3123271947Sdes 3124271947Sdes 3125271947Sdes# _LT_PATH_LD_GNU 3126271947Sdes#- -------------- 3127271947Sdesm4_defun([_LT_PATH_LD_GNU], 3128271947Sdes[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3129271947Sdes[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3130271947Sdescase `$LD -v 2>&1 </dev/null` in 3131271947Sdes*GNU* | *'with BFD'*) 3132271947Sdes lt_cv_prog_gnu_ld=yes 3133271947Sdes ;; 3134271947Sdes*) 3135271947Sdes lt_cv_prog_gnu_ld=no 3136271947Sdes ;; 3137271947Sdesesac]) 3138271947Sdeswith_gnu_ld=$lt_cv_prog_gnu_ld 3139271947Sdes])# _LT_PATH_LD_GNU 3140271947Sdes 3141271947Sdes 3142271947Sdes# _LT_CMD_RELOAD 3143271947Sdes# -------------- 3144271947Sdes# find reload flag for linker 3145271947Sdes# -- PORTME Some linkers may need a different reload flag. 3146271947Sdesm4_defun([_LT_CMD_RELOAD], 3147271947Sdes[AC_CACHE_CHECK([for $LD option to reload object files], 3148271947Sdes lt_cv_ld_reload_flag, 3149271947Sdes [lt_cv_ld_reload_flag='-r']) 3150271947Sdesreload_flag=$lt_cv_ld_reload_flag 3151271947Sdescase $reload_flag in 3152271947Sdes"" | " "*) ;; 3153271947Sdes*) reload_flag=" $reload_flag" ;; 3154271947Sdesesac 3155271947Sdesreload_cmds='$LD$reload_flag -o $output$reload_objs' 3156271947Sdescase $host_os in 3157271947Sdes cygwin* | mingw* | pw32* | cegcc*) 3158271947Sdes if test "$GCC" != yes; then 3159271947Sdes reload_cmds=false 3160271947Sdes fi 3161271947Sdes ;; 3162271947Sdes darwin*) 3163271947Sdes if test "$GCC" = yes; then 3164271947Sdes reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3165271947Sdes else 3166271947Sdes reload_cmds='$LD$reload_flag -o $output$reload_objs' 3167271947Sdes fi 3168271947Sdes ;; 3169271947Sdesesac 3170271947Sdes_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3171271947Sdes_LT_TAGDECL([], [reload_cmds], [2])dnl 3172271947Sdes])# _LT_CMD_RELOAD 3173271947Sdes 3174271947Sdes 3175271947Sdes# _LT_CHECK_MAGIC_METHOD 3176271947Sdes# ---------------------- 3177271947Sdes# how to check for library dependencies 3178271947Sdes# -- PORTME fill in with the dynamic library characteristics 3179271947Sdesm4_defun([_LT_CHECK_MAGIC_METHOD], 3180271947Sdes[m4_require([_LT_DECL_EGREP]) 3181271947Sdesm4_require([_LT_DECL_OBJDUMP]) 3182271947SdesAC_CACHE_CHECK([how to recognize dependent libraries], 3183271947Sdeslt_cv_deplibs_check_method, 3184271947Sdes[lt_cv_file_magic_cmd='$MAGIC_CMD' 3185271947Sdeslt_cv_file_magic_test_file= 3186271947Sdeslt_cv_deplibs_check_method='unknown' 3187271947Sdes# Need to set the preceding variable on all platforms that support 3188271947Sdes# interlibrary dependencies. 3189271947Sdes# 'none' -- dependencies not supported. 3190271947Sdes# `unknown' -- same as none, but documents that we really don't know. 3191271947Sdes# 'pass_all' -- all dependencies passed with no checks. 3192271947Sdes# 'test_compile' -- check by making test program. 3193271947Sdes# 'file_magic [[regex]]' -- check by looking for files in library path 3194271947Sdes# which responds to the $file_magic_cmd with a given extended regex. 3195271947Sdes# If you have `file' or equivalent on your system and you're not sure 3196271947Sdes# whether `pass_all' will *always* work, you probably want this one. 3197271947Sdes 3198271947Sdescase $host_os in 3199271947Sdesaix[[4-9]]*) 3200271947Sdes lt_cv_deplibs_check_method=pass_all 3201271947Sdes ;; 3202271947Sdes 3203271947Sdesbeos*) 3204271947Sdes lt_cv_deplibs_check_method=pass_all 3205271947Sdes ;; 3206271947Sdes 3207271947Sdesbsdi[[45]]*) 3208271947Sdes lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3209271947Sdes lt_cv_file_magic_cmd='/usr/bin/file -L' 3210271947Sdes lt_cv_file_magic_test_file=/shlib/libc.so 3211271947Sdes ;; 3212271947Sdes 3213271947Sdescygwin*) 3214271947Sdes # func_win32_libid is a shell function defined in ltmain.sh 3215271947Sdes lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3216271947Sdes lt_cv_file_magic_cmd='func_win32_libid' 3217271947Sdes ;; 3218271947Sdes 3219271947Sdesmingw* | pw32*) 3220271947Sdes # Base MSYS/MinGW do not provide the 'file' command needed by 3221271947Sdes # func_win32_libid shell function, so use a weaker test based on 'objdump', 3222271947Sdes # unless we find 'file', for example because we are cross-compiling. 3223271947Sdes # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3224271947Sdes if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3225271947Sdes lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3226271947Sdes lt_cv_file_magic_cmd='func_win32_libid' 3227271947Sdes else 3228271947Sdes # Keep this pattern in sync with the one in func_win32_libid. 3229271947Sdes lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3230271947Sdes lt_cv_file_magic_cmd='$OBJDUMP -f' 3231271947Sdes fi 3232271947Sdes ;; 3233271947Sdes 3234271947Sdescegcc*) 3235271947Sdes # use the weaker test based on 'objdump'. See mingw*. 3236271947Sdes lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3237271947Sdes lt_cv_file_magic_cmd='$OBJDUMP -f' 3238271947Sdes ;; 3239271947Sdes 3240271947Sdesdarwin* | rhapsody*) 3241271947Sdes lt_cv_deplibs_check_method=pass_all 3242271947Sdes ;; 3243271947Sdes 3244271947Sdesfreebsd* | dragonfly*) 3245271947Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3246271947Sdes case $host_cpu in 3247271947Sdes i*86 ) 3248271947Sdes # Not sure whether the presence of OpenBSD here was a mistake. 3249271947Sdes # Let's accept both of them until this is cleared up. 3250271947Sdes lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3251271947Sdes lt_cv_file_magic_cmd=/usr/bin/file 3252271947Sdes lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3253271947Sdes ;; 3254271947Sdes esac 3255271947Sdes else 3256271947Sdes lt_cv_deplibs_check_method=pass_all 3257271947Sdes fi 3258271947Sdes ;; 3259271947Sdes 3260271947Sdesgnu*) 3261271947Sdes lt_cv_deplibs_check_method=pass_all 3262271947Sdes ;; 3263271947Sdes 3264271947Sdeshaiku*) 3265271947Sdes lt_cv_deplibs_check_method=pass_all 3266271947Sdes ;; 3267271947Sdes 3268271947Sdeshpux10.20* | hpux11*) 3269271947Sdes lt_cv_file_magic_cmd=/usr/bin/file 3270271947Sdes case $host_cpu in 3271271947Sdes ia64*) 3272271947Sdes lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3273271947Sdes lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3274271947Sdes ;; 3275271947Sdes hppa*64*) 3276271947Sdes [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]'] 3277271947Sdes lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3278271947Sdes ;; 3279271947Sdes *) 3280271947Sdes lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3281271947Sdes lt_cv_file_magic_test_file=/usr/lib/libc.sl 3282271947Sdes ;; 3283271947Sdes esac 3284271947Sdes ;; 3285271947Sdes 3286271947Sdesinterix[[3-9]]*) 3287271947Sdes # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3288271947Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3289271947Sdes ;; 3290271947Sdes 3291271947Sdesirix5* | irix6* | nonstopux*) 3292271947Sdes case $LD in 3293271947Sdes *-32|*"-32 ") libmagic=32-bit;; 3294271947Sdes *-n32|*"-n32 ") libmagic=N32;; 3295271947Sdes *-64|*"-64 ") libmagic=64-bit;; 3296271947Sdes *) libmagic=never-match;; 3297271947Sdes esac 3298271947Sdes lt_cv_deplibs_check_method=pass_all 3299271947Sdes ;; 3300271947Sdes 3301271947Sdes# This must be glibc/ELF. 3302271947Sdeslinux* | k*bsd*-gnu | kopensolaris*-gnu) 3303271947Sdes lt_cv_deplibs_check_method=pass_all 3304271947Sdes ;; 3305271947Sdes 3306271947Sdesnetbsd*) 3307271947Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3308271947Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3309271947Sdes else 3310271947Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3311271947Sdes fi 3312271947Sdes ;; 3313271947Sdes 3314271947Sdesnewos6*) 3315271947Sdes lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3316271947Sdes lt_cv_file_magic_cmd=/usr/bin/file 3317271947Sdes lt_cv_file_magic_test_file=/usr/lib/libnls.so 3318271947Sdes ;; 3319271947Sdes 3320271947Sdes*nto* | *qnx*) 3321271947Sdes lt_cv_deplibs_check_method=pass_all 3322271947Sdes ;; 3323271947Sdes 3324271947Sdesopenbsd*) 3325271947Sdes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3326271947Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3327271947Sdes else 3328271947Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3329271947Sdes fi 3330271947Sdes ;; 3331271947Sdes 3332271947Sdesosf3* | osf4* | osf5*) 3333271947Sdes lt_cv_deplibs_check_method=pass_all 3334271947Sdes ;; 3335271947Sdes 3336271947Sdesrdos*) 3337271947Sdes lt_cv_deplibs_check_method=pass_all 3338271947Sdes ;; 3339271947Sdes 3340271947Sdessolaris*) 3341271947Sdes lt_cv_deplibs_check_method=pass_all 3342271947Sdes ;; 3343271947Sdes 3344271947Sdessysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3345271947Sdes lt_cv_deplibs_check_method=pass_all 3346271947Sdes ;; 3347271947Sdes 3348271947Sdessysv4 | sysv4.3*) 3349271947Sdes case $host_vendor in 3350271947Sdes motorola) 3351271947Sdes 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]]' 3352271947Sdes lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3353271947Sdes ;; 3354271947Sdes ncr) 3355271947Sdes lt_cv_deplibs_check_method=pass_all 3356271947Sdes ;; 3357271947Sdes sequent) 3358271947Sdes lt_cv_file_magic_cmd='/bin/file' 3359271947Sdes lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3360271947Sdes ;; 3361271947Sdes sni) 3362271947Sdes lt_cv_file_magic_cmd='/bin/file' 3363271947Sdes lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3364271947Sdes lt_cv_file_magic_test_file=/lib/libc.so 3365271947Sdes ;; 3366271947Sdes siemens) 3367271947Sdes lt_cv_deplibs_check_method=pass_all 3368271947Sdes ;; 3369271947Sdes pc) 3370271947Sdes lt_cv_deplibs_check_method=pass_all 3371271947Sdes ;; 3372271947Sdes esac 3373271947Sdes ;; 3374271947Sdes 3375271947Sdestpf*) 3376271947Sdes lt_cv_deplibs_check_method=pass_all 3377271947Sdes ;; 3378271947Sdesesac 3379271947Sdes]) 3380271947Sdes 3381271947Sdesfile_magic_glob= 3382271947Sdeswant_nocaseglob=no 3383271947Sdesif test "$build" = "$host"; then 3384271947Sdes case $host_os in 3385271947Sdes mingw* | pw32*) 3386271947Sdes if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3387271947Sdes want_nocaseglob=yes 3388271947Sdes else 3389271947Sdes file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3390271947Sdes fi 3391271947Sdes ;; 3392271947Sdes esac 3393271947Sdesfi 3394271947Sdes 3395271947Sdesfile_magic_cmd=$lt_cv_file_magic_cmd 3396271947Sdesdeplibs_check_method=$lt_cv_deplibs_check_method 3397271947Sdestest -z "$deplibs_check_method" && deplibs_check_method=unknown 3398271947Sdes 3399271947Sdes_LT_DECL([], [deplibs_check_method], [1], 3400271947Sdes [Method to check whether dependent libraries are shared objects]) 3401271947Sdes_LT_DECL([], [file_magic_cmd], [1], 3402271947Sdes [Command to use when deplibs_check_method = "file_magic"]) 3403271947Sdes_LT_DECL([], [file_magic_glob], [1], 3404271947Sdes [How to find potential files when deplibs_check_method = "file_magic"]) 3405271947Sdes_LT_DECL([], [want_nocaseglob], [1], 3406271947Sdes [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3407271947Sdes])# _LT_CHECK_MAGIC_METHOD 3408271947Sdes 3409271947Sdes 3410271947Sdes# LT_PATH_NM 3411271947Sdes# ---------- 3412271947Sdes# find the pathname to a BSD- or MS-compatible name lister 3413271947SdesAC_DEFUN([LT_PATH_NM], 3414271947Sdes[AC_REQUIRE([AC_PROG_CC])dnl 3415271947SdesAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3416271947Sdes[if test -n "$NM"; then 3417271947Sdes # Let the user override the test. 3418271947Sdes lt_cv_path_NM="$NM" 3419271947Sdeselse 3420271947Sdes lt_nm_to_check="${ac_tool_prefix}nm" 3421271947Sdes if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3422271947Sdes lt_nm_to_check="$lt_nm_to_check nm" 3423271947Sdes fi 3424271947Sdes for lt_tmp_nm in $lt_nm_to_check; do 3425271947Sdes lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3426271947Sdes for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3427271947Sdes IFS="$lt_save_ifs" 3428271947Sdes test -z "$ac_dir" && ac_dir=. 3429271947Sdes tmp_nm="$ac_dir/$lt_tmp_nm" 3430271947Sdes if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3431271947Sdes # Check to see if the nm accepts a BSD-compat flag. 3432271947Sdes # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3433271947Sdes # nm: unknown option "B" ignored 3434271947Sdes # Tru64's nm complains that /dev/null is an invalid object file 3435271947Sdes case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3436271947Sdes */dev/null* | *'Invalid file or object type'*) 3437271947Sdes lt_cv_path_NM="$tmp_nm -B" 3438271947Sdes break 3439271947Sdes ;; 3440271947Sdes *) 3441271947Sdes case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3442271947Sdes */dev/null*) 3443271947Sdes lt_cv_path_NM="$tmp_nm -p" 3444271947Sdes break 3445271947Sdes ;; 3446271947Sdes *) 3447271947Sdes lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3448271947Sdes continue # so that we can try to find one that supports BSD flags 3449271947Sdes ;; 3450271947Sdes esac 3451271947Sdes ;; 3452271947Sdes esac 3453271947Sdes fi 3454271947Sdes done 3455271947Sdes IFS="$lt_save_ifs" 3456271947Sdes done 3457271947Sdes : ${lt_cv_path_NM=no} 3458271947Sdesfi]) 3459271947Sdesif test "$lt_cv_path_NM" != "no"; then 3460271947Sdes NM="$lt_cv_path_NM" 3461271947Sdeselse 3462271947Sdes # Didn't find any BSD compatible name lister, look for dumpbin. 3463271947Sdes if test -n "$DUMPBIN"; then : 3464271947Sdes # Let the user override the test. 3465271947Sdes else 3466271947Sdes AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3467271947Sdes case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3468271947Sdes *COFF*) 3469271947Sdes DUMPBIN="$DUMPBIN -symbols" 3470271947Sdes ;; 3471271947Sdes *) 3472271947Sdes DUMPBIN=: 3473271947Sdes ;; 3474271947Sdes esac 3475271947Sdes fi 3476271947Sdes AC_SUBST([DUMPBIN]) 3477271947Sdes if test "$DUMPBIN" != ":"; then 3478271947Sdes NM="$DUMPBIN" 3479271947Sdes fi 3480271947Sdesfi 3481271947Sdestest -z "$NM" && NM=nm 3482271947SdesAC_SUBST([NM]) 3483271947Sdes_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3484271947Sdes 3485271947SdesAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3486271947Sdes [lt_cv_nm_interface="BSD nm" 3487271947Sdes echo "int some_variable = 0;" > conftest.$ac_ext 3488271947Sdes (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3489271947Sdes (eval "$ac_compile" 2>conftest.err) 3490271947Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 3491271947Sdes (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3492271947Sdes (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3493271947Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 3494271947Sdes (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3495271947Sdes cat conftest.out >&AS_MESSAGE_LOG_FD 3496271947Sdes if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3497271947Sdes lt_cv_nm_interface="MS dumpbin" 3498271947Sdes fi 3499271947Sdes rm -f conftest*]) 3500271947Sdes])# LT_PATH_NM 3501271947Sdes 3502271947Sdes# Old names: 3503271947SdesAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3504271947SdesAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3505271947Sdesdnl aclocal-1.4 backwards compatibility: 3506271947Sdesdnl AC_DEFUN([AM_PROG_NM], []) 3507271947Sdesdnl AC_DEFUN([AC_PROG_NM], []) 3508271947Sdes 3509271947Sdes# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3510271947Sdes# -------------------------------- 3511271947Sdes# how to determine the name of the shared library 3512271947Sdes# associated with a specific link library. 3513271947Sdes# -- PORTME fill in with the dynamic library characteristics 3514271947Sdesm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3515271947Sdes[m4_require([_LT_DECL_EGREP]) 3516271947Sdesm4_require([_LT_DECL_OBJDUMP]) 3517271947Sdesm4_require([_LT_DECL_DLLTOOL]) 3518271947SdesAC_CACHE_CHECK([how to associate runtime and link libraries], 3519271947Sdeslt_cv_sharedlib_from_linklib_cmd, 3520271947Sdes[lt_cv_sharedlib_from_linklib_cmd='unknown' 3521271947Sdes 3522271947Sdescase $host_os in 3523271947Sdescygwin* | mingw* | pw32* | cegcc*) 3524271947Sdes # two different shell functions defined in ltmain.sh 3525271947Sdes # decide which to use based on capabilities of $DLLTOOL 3526271947Sdes case `$DLLTOOL --help 2>&1` in 3527271947Sdes *--identify-strict*) 3528271947Sdes lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3529271947Sdes ;; 3530271947Sdes *) 3531271947Sdes lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3532271947Sdes ;; 3533271947Sdes esac 3534271947Sdes ;; 3535271947Sdes*) 3536271947Sdes # fallback: assume linklib IS sharedlib 3537271947Sdes lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3538271947Sdes ;; 3539271947Sdesesac 3540271947Sdes]) 3541271947Sdessharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3542271947Sdestest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3543271947Sdes 3544271947Sdes_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3545271947Sdes [Command to associate shared and link libraries]) 3546271947Sdes])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3547271947Sdes 3548271947Sdes 3549271947Sdes# _LT_PATH_MANIFEST_TOOL 3550271947Sdes# ---------------------- 3551271947Sdes# locate the manifest tool 3552271947Sdesm4_defun([_LT_PATH_MANIFEST_TOOL], 3553271947Sdes[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3554271947Sdestest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3555271947SdesAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3556271947Sdes [lt_cv_path_mainfest_tool=no 3557271947Sdes echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3558271947Sdes $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3559271947Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 3560271947Sdes if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3561271947Sdes lt_cv_path_mainfest_tool=yes 3562271947Sdes fi 3563271947Sdes rm -f conftest*]) 3564271947Sdesif test "x$lt_cv_path_mainfest_tool" != xyes; then 3565271947Sdes MANIFEST_TOOL=: 3566271947Sdesfi 3567271947Sdes_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3568271947Sdes])# _LT_PATH_MANIFEST_TOOL 3569271947Sdes 3570271947Sdes 3571271947Sdes# LT_LIB_M 3572271947Sdes# -------- 3573271947Sdes# check for math library 3574271947SdesAC_DEFUN([LT_LIB_M], 3575271947Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3576271947SdesLIBM= 3577271947Sdescase $host in 3578271947Sdes*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3579271947Sdes # These system don't have libm, or don't need it 3580271947Sdes ;; 3581271947Sdes*-ncr-sysv4.3*) 3582271947Sdes AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3583271947Sdes AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3584271947Sdes ;; 3585271947Sdes*) 3586271947Sdes AC_CHECK_LIB(m, cos, LIBM="-lm") 3587271947Sdes ;; 3588271947Sdesesac 3589271947SdesAC_SUBST([LIBM]) 3590271947Sdes])# LT_LIB_M 3591271947Sdes 3592271947Sdes# Old name: 3593271947SdesAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3594271947Sdesdnl aclocal-1.4 backwards compatibility: 3595271947Sdesdnl AC_DEFUN([AC_CHECK_LIBM], []) 3596271947Sdes 3597271947Sdes 3598271947Sdes# _LT_COMPILER_NO_RTTI([TAGNAME]) 3599271947Sdes# ------------------------------- 3600271947Sdesm4_defun([_LT_COMPILER_NO_RTTI], 3601271947Sdes[m4_require([_LT_TAG_COMPILER])dnl 3602271947Sdes 3603271947Sdes_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3604271947Sdes 3605271947Sdesif test "$GCC" = yes; then 3606271947Sdes case $cc_basename in 3607271947Sdes nvcc*) 3608271947Sdes _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3609271947Sdes *) 3610271947Sdes _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3611271947Sdes esac 3612271947Sdes 3613271947Sdes _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3614271947Sdes lt_cv_prog_compiler_rtti_exceptions, 3615271947Sdes [-fno-rtti -fno-exceptions], [], 3616271947Sdes [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3617271947Sdesfi 3618271947Sdes_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3619271947Sdes [Compiler flag to turn off builtin functions]) 3620271947Sdes])# _LT_COMPILER_NO_RTTI 3621271947Sdes 3622271947Sdes 3623271947Sdes# _LT_CMD_GLOBAL_SYMBOLS 3624271947Sdes# ---------------------- 3625271947Sdesm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3626271947Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3627271947SdesAC_REQUIRE([AC_PROG_CC])dnl 3628271947SdesAC_REQUIRE([AC_PROG_AWK])dnl 3629271947SdesAC_REQUIRE([LT_PATH_NM])dnl 3630271947SdesAC_REQUIRE([LT_PATH_LD])dnl 3631271947Sdesm4_require([_LT_DECL_SED])dnl 3632271947Sdesm4_require([_LT_DECL_EGREP])dnl 3633271947Sdesm4_require([_LT_TAG_COMPILER])dnl 3634271947Sdes 3635271947Sdes# Check for command to grab the raw symbol name followed by C symbol from nm. 3636271947SdesAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3637271947SdesAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3638271947Sdes[ 3639271947Sdes# These are sane defaults that work on at least a few old systems. 3640271947Sdes# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3641271947Sdes 3642271947Sdes# Character class describing NM global symbol codes. 3643271947Sdessymcode='[[BCDEGRST]]' 3644271947Sdes 3645271947Sdes# Regexp to match symbols that can be accessed directly from C. 3646271947Sdessympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3647271947Sdes 3648271947Sdes# Define system-specific variables. 3649271947Sdescase $host_os in 3650271947Sdesaix*) 3651271947Sdes symcode='[[BCDT]]' 3652271947Sdes ;; 3653271947Sdescygwin* | mingw* | pw32* | cegcc*) 3654271947Sdes symcode='[[ABCDGISTW]]' 3655271947Sdes ;; 3656271947Sdeshpux*) 3657271947Sdes if test "$host_cpu" = ia64; then 3658271947Sdes symcode='[[ABCDEGRST]]' 3659271947Sdes fi 3660271947Sdes ;; 3661271947Sdesirix* | nonstopux*) 3662271947Sdes symcode='[[BCDEGRST]]' 3663271947Sdes ;; 3664271947Sdesosf*) 3665271947Sdes symcode='[[BCDEGQRST]]' 3666271947Sdes ;; 3667271947Sdessolaris*) 3668271947Sdes symcode='[[BDRT]]' 3669271947Sdes ;; 3670271947Sdessco3.2v5*) 3671271947Sdes symcode='[[DT]]' 3672271947Sdes ;; 3673271947Sdessysv4.2uw2*) 3674271947Sdes symcode='[[DT]]' 3675271947Sdes ;; 3676271947Sdessysv5* | sco5v6* | unixware* | OpenUNIX*) 3677271947Sdes symcode='[[ABDT]]' 3678271947Sdes ;; 3679271947Sdessysv4) 3680271947Sdes symcode='[[DFNSTU]]' 3681271947Sdes ;; 3682271947Sdesesac 3683271947Sdes 3684271947Sdes# If we're using GNU nm, then use its standard symbol codes. 3685271947Sdescase `$NM -V 2>&1` in 3686271947Sdes*GNU* | *'with BFD'*) 3687271947Sdes symcode='[[ABCDGIRSTW]]' ;; 3688271947Sdesesac 3689271947Sdes 3690271947Sdes# Transform an extracted symbol line into a proper C declaration. 3691271947Sdes# Some systems (esp. on ia64) link data and code symbols differently, 3692271947Sdes# so use this general approach. 3693271947Sdeslt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3694271947Sdes 3695271947Sdes# Transform an extracted symbol line into symbol name and symbol address 3696271947Sdeslt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3697271947Sdeslt_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'" 3698271947Sdes 3699271947Sdes# Handle CRLF in mingw tool chain 3700271947Sdesopt_cr= 3701271947Sdescase $build_os in 3702271947Sdesmingw*) 3703271947Sdes opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3704271947Sdes ;; 3705271947Sdesesac 3706271947Sdes 3707271947Sdes# Try without a prefix underscore, then with it. 3708271947Sdesfor ac_symprfx in "" "_"; do 3709271947Sdes 3710271947Sdes # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3711271947Sdes symxfrm="\\1 $ac_symprfx\\2 \\2" 3712271947Sdes 3713271947Sdes # Write the raw and C identifiers. 3714271947Sdes if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3715271947Sdes # Fake it for dumpbin and say T for any non-static function 3716271947Sdes # and D for any global variable. 3717271947Sdes # Also find C++ and __fastcall symbols from MSVC++, 3718271947Sdes # which start with @ or ?. 3719271947Sdes lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3720271947Sdes" {last_section=section; section=\$ 3};"\ 3721271947Sdes" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3722271947Sdes" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3723271947Sdes" \$ 0!~/External *\|/{next};"\ 3724271947Sdes" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3725271947Sdes" {if(hide[section]) next};"\ 3726271947Sdes" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3727271947Sdes" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3728271947Sdes" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3729271947Sdes" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3730271947Sdes" ' prfx=^$ac_symprfx]" 3731271947Sdes else 3732271947Sdes lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3733271947Sdes fi 3734271947Sdes lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3735271947Sdes 3736271947Sdes # Check to see that the pipe works correctly. 3737271947Sdes pipe_works=no 3738271947Sdes 3739271947Sdes rm -f conftest* 3740271947Sdes cat > conftest.$ac_ext <<_LT_EOF 3741271947Sdes#ifdef __cplusplus 3742271947Sdesextern "C" { 3743271947Sdes#endif 3744271947Sdeschar nm_test_var; 3745271947Sdesvoid nm_test_func(void); 3746271947Sdesvoid nm_test_func(void){} 3747271947Sdes#ifdef __cplusplus 3748271947Sdes} 3749271947Sdes#endif 3750271947Sdesint main(){nm_test_var='a';nm_test_func();return(0);} 3751271947Sdes_LT_EOF 3752271947Sdes 3753271947Sdes if AC_TRY_EVAL(ac_compile); then 3754271947Sdes # Now try to grab the symbols. 3755271947Sdes nlist=conftest.nm 3756271947Sdes if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3757271947Sdes # Try sorting and uniquifying the output. 3758271947Sdes if sort "$nlist" | uniq > "$nlist"T; then 3759271947Sdes mv -f "$nlist"T "$nlist" 3760271947Sdes else 3761271947Sdes rm -f "$nlist"T 3762271947Sdes fi 3763271947Sdes 3764271947Sdes # Make sure that we snagged all the symbols we need. 3765271947Sdes if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3766271947Sdes if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3767271947Sdes cat <<_LT_EOF > conftest.$ac_ext 3768271947Sdes/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3769271947Sdes#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3770271947Sdes/* DATA imports from DLLs on WIN32 con't be const, because runtime 3771271947Sdes relocations are performed -- see ld's documentation on pseudo-relocs. */ 3772271947Sdes# define LT@&t@_DLSYM_CONST 3773271947Sdes#elif defined(__osf__) 3774271947Sdes/* This system does not cope well with relocations in const data. */ 3775271947Sdes# define LT@&t@_DLSYM_CONST 3776271947Sdes#else 3777271947Sdes# define LT@&t@_DLSYM_CONST const 3778271947Sdes#endif 3779271947Sdes 3780271947Sdes#ifdef __cplusplus 3781271947Sdesextern "C" { 3782271947Sdes#endif 3783271947Sdes 3784271947Sdes_LT_EOF 3785271947Sdes # Now generate the symbol file. 3786271947Sdes eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3787271947Sdes 3788271947Sdes cat <<_LT_EOF >> conftest.$ac_ext 3789271947Sdes 3790271947Sdes/* The mapping between symbol names and symbols. */ 3791271947SdesLT@&t@_DLSYM_CONST struct { 3792271947Sdes const char *name; 3793271947Sdes void *address; 3794271947Sdes} 3795271947Sdeslt__PROGRAM__LTX_preloaded_symbols[[]] = 3796271947Sdes{ 3797271947Sdes { "@PROGRAM@", (void *) 0 }, 3798271947Sdes_LT_EOF 3799271947Sdes $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3800271947Sdes cat <<\_LT_EOF >> conftest.$ac_ext 3801271947Sdes {0, (void *) 0} 3802271947Sdes}; 3803271947Sdes 3804271947Sdes/* This works around a problem in FreeBSD linker */ 3805271947Sdes#ifdef FREEBSD_WORKAROUND 3806271947Sdesstatic const void *lt_preloaded_setup() { 3807271947Sdes return lt__PROGRAM__LTX_preloaded_symbols; 3808271947Sdes} 3809271947Sdes#endif 3810271947Sdes 3811271947Sdes#ifdef __cplusplus 3812271947Sdes} 3813271947Sdes#endif 3814271947Sdes_LT_EOF 3815271947Sdes # Now try linking the two files. 3816271947Sdes mv conftest.$ac_objext conftstm.$ac_objext 3817271947Sdes lt_globsym_save_LIBS=$LIBS 3818271947Sdes lt_globsym_save_CFLAGS=$CFLAGS 3819271947Sdes LIBS="conftstm.$ac_objext" 3820271947Sdes CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3821271947Sdes if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3822271947Sdes pipe_works=yes 3823271947Sdes fi 3824271947Sdes LIBS=$lt_globsym_save_LIBS 3825271947Sdes CFLAGS=$lt_globsym_save_CFLAGS 3826271947Sdes else 3827271947Sdes echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3828271947Sdes fi 3829271947Sdes else 3830271947Sdes echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3831271947Sdes fi 3832271947Sdes else 3833271947Sdes echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3834271947Sdes fi 3835271947Sdes else 3836271947Sdes echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3837271947Sdes cat conftest.$ac_ext >&5 3838271947Sdes fi 3839271947Sdes rm -rf conftest* conftst* 3840271947Sdes 3841271947Sdes # Do not use the global_symbol_pipe unless it works. 3842271947Sdes if test "$pipe_works" = yes; then 3843271947Sdes break 3844271947Sdes else 3845271947Sdes lt_cv_sys_global_symbol_pipe= 3846271947Sdes fi 3847271947Sdesdone 3848271947Sdes]) 3849271947Sdesif test -z "$lt_cv_sys_global_symbol_pipe"; then 3850271947Sdes lt_cv_sys_global_symbol_to_cdecl= 3851271947Sdesfi 3852271947Sdesif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3853271947Sdes AC_MSG_RESULT(failed) 3854271947Sdeselse 3855271947Sdes AC_MSG_RESULT(ok) 3856271947Sdesfi 3857271947Sdes 3858271947Sdes# Response file support. 3859271947Sdesif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3860271947Sdes nm_file_list_spec='@' 3861271947Sdeselif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3862271947Sdes nm_file_list_spec='@' 3863271947Sdesfi 3864271947Sdes 3865271947Sdes_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3866271947Sdes [Take the output of nm and produce a listing of raw symbols and C names]) 3867271947Sdes_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3868271947Sdes [Transform the output of nm in a proper C declaration]) 3869271947Sdes_LT_DECL([global_symbol_to_c_name_address], 3870271947Sdes [lt_cv_sys_global_symbol_to_c_name_address], [1], 3871271947Sdes [Transform the output of nm in a C name address pair]) 3872271947Sdes_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3873271947Sdes [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3874271947Sdes [Transform the output of nm in a C name address pair when lib prefix is needed]) 3875271947Sdes_LT_DECL([], [nm_file_list_spec], [1], 3876271947Sdes [Specify filename containing input files for $NM]) 3877271947Sdes]) # _LT_CMD_GLOBAL_SYMBOLS 3878271947Sdes 3879271947Sdes 3880271947Sdes# _LT_COMPILER_PIC([TAGNAME]) 3881271947Sdes# --------------------------- 3882271947Sdesm4_defun([_LT_COMPILER_PIC], 3883271947Sdes[m4_require([_LT_TAG_COMPILER])dnl 3884271947Sdes_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3885271947Sdes_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3886271947Sdes_LT_TAGVAR(lt_prog_compiler_static, $1)= 3887271947Sdes 3888271947Sdesm4_if([$1], [CXX], [ 3889271947Sdes # C++ specific cases for pic, static, wl, etc. 3890271947Sdes if test "$GXX" = yes; then 3891271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3892271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3893271947Sdes 3894271947Sdes case $host_os in 3895271947Sdes aix*) 3896271947Sdes # All AIX code is PIC. 3897271947Sdes if test "$host_cpu" = ia64; then 3898271947Sdes # AIX 5 now supports IA64 processor 3899271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3900271947Sdes fi 3901271947Sdes ;; 3902271947Sdes 3903271947Sdes amigaos*) 3904271947Sdes case $host_cpu in 3905271947Sdes powerpc) 3906271947Sdes # see comment about AmigaOS4 .so support 3907271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3908271947Sdes ;; 3909271947Sdes m68k) 3910271947Sdes # FIXME: we need at least 68020 code to build shared libraries, but 3911271947Sdes # adding the `-m68020' flag to GCC prevents building anything better, 3912271947Sdes # like `-m68040'. 3913271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3914271947Sdes ;; 3915271947Sdes esac 3916271947Sdes ;; 3917271947Sdes 3918271947Sdes beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3919271947Sdes # PIC is the default for these OSes. 3920271947Sdes ;; 3921271947Sdes mingw* | cygwin* | os2* | pw32* | cegcc*) 3922271947Sdes # This hack is so that the source file can tell whether it is being 3923271947Sdes # built for inclusion in a dll (and should export symbols for example). 3924271947Sdes # Although the cygwin gcc ignores -fPIC, still need this for old-style 3925271947Sdes # (--disable-auto-import) libraries 3926271947Sdes m4_if([$1], [GCJ], [], 3927271947Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3928271947Sdes ;; 3929271947Sdes darwin* | rhapsody*) 3930271947Sdes # PIC is the default on this platform 3931271947Sdes # Common symbols not allowed in MH_DYLIB files 3932271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3933271947Sdes ;; 3934271947Sdes *djgpp*) 3935271947Sdes # DJGPP does not support shared libraries at all 3936271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3937271947Sdes ;; 3938271947Sdes haiku*) 3939271947Sdes # PIC is the default for Haiku. 3940271947Sdes # The "-static" flag exists, but is broken. 3941271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)= 3942271947Sdes ;; 3943271947Sdes interix[[3-9]]*) 3944271947Sdes # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3945271947Sdes # Instead, we relocate shared libraries at runtime. 3946271947Sdes ;; 3947271947Sdes sysv4*MP*) 3948271947Sdes if test -d /usr/nec; then 3949271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3950271947Sdes fi 3951271947Sdes ;; 3952271947Sdes hpux*) 3953271947Sdes # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3954271947Sdes # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3955271947Sdes # sets the default TLS model and affects inlining. 3956271947Sdes case $host_cpu in 3957271947Sdes hppa*64*) 3958271947Sdes ;; 3959271947Sdes *) 3960271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3961271947Sdes ;; 3962271947Sdes esac 3963271947Sdes ;; 3964271947Sdes *qnx* | *nto*) 3965271947Sdes # QNX uses GNU C++, but need to define -shared option too, otherwise 3966271947Sdes # it will coredump. 3967271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3968271947Sdes ;; 3969271947Sdes *) 3970271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3971271947Sdes ;; 3972271947Sdes esac 3973271947Sdes else 3974271947Sdes case $host_os in 3975271947Sdes aix[[4-9]]*) 3976271947Sdes # All AIX code is PIC. 3977271947Sdes if test "$host_cpu" = ia64; then 3978271947Sdes # AIX 5 now supports IA64 processor 3979271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3980271947Sdes else 3981271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3982271947Sdes fi 3983271947Sdes ;; 3984271947Sdes chorus*) 3985271947Sdes case $cc_basename in 3986271947Sdes cxch68*) 3987271947Sdes # Green Hills C++ Compiler 3988271947Sdes # _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" 3989271947Sdes ;; 3990271947Sdes esac 3991271947Sdes ;; 3992271947Sdes mingw* | cygwin* | os2* | pw32* | cegcc*) 3993271947Sdes # This hack is so that the source file can tell whether it is being 3994271947Sdes # built for inclusion in a dll (and should export symbols for example). 3995271947Sdes m4_if([$1], [GCJ], [], 3996271947Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3997271947Sdes ;; 3998271947Sdes dgux*) 3999271947Sdes case $cc_basename in 4000271947Sdes ec++*) 4001271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4002271947Sdes ;; 4003271947Sdes ghcx*) 4004271947Sdes # Green Hills C++ Compiler 4005271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4006271947Sdes ;; 4007271947Sdes *) 4008271947Sdes ;; 4009271947Sdes esac 4010271947Sdes ;; 4011271947Sdes freebsd* | dragonfly*) 4012271947Sdes # FreeBSD uses GNU C++ 4013271947Sdes ;; 4014271947Sdes hpux9* | hpux10* | hpux11*) 4015271947Sdes case $cc_basename in 4016271947Sdes CC*) 4017271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4018271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4019271947Sdes if test "$host_cpu" != ia64; then 4020271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4021271947Sdes fi 4022271947Sdes ;; 4023271947Sdes aCC*) 4024271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4025271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4026271947Sdes case $host_cpu in 4027271947Sdes hppa*64*|ia64*) 4028271947Sdes # +Z the default 4029271947Sdes ;; 4030271947Sdes *) 4031271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4032271947Sdes ;; 4033271947Sdes esac 4034271947Sdes ;; 4035271947Sdes *) 4036271947Sdes ;; 4037271947Sdes esac 4038271947Sdes ;; 4039271947Sdes interix*) 4040271947Sdes # This is c89, which is MS Visual C++ (no shared libs) 4041271947Sdes # Anyone wants to do a port? 4042271947Sdes ;; 4043271947Sdes irix5* | irix6* | nonstopux*) 4044271947Sdes case $cc_basename in 4045271947Sdes CC*) 4046271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4047271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4048271947Sdes # CC pic flag -KPIC is the default. 4049271947Sdes ;; 4050271947Sdes *) 4051271947Sdes ;; 4052271947Sdes esac 4053271947Sdes ;; 4054271947Sdes linux* | k*bsd*-gnu | kopensolaris*-gnu) 4055271947Sdes case $cc_basename in 4056271947Sdes KCC*) 4057271947Sdes # KAI C++ Compiler 4058271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4059271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4060271947Sdes ;; 4061271947Sdes ecpc* ) 4062271947Sdes # old Intel C++ for x86_64 which still supported -KPIC. 4063271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4064271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4065271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4066271947Sdes ;; 4067271947Sdes icpc* ) 4068271947Sdes # Intel C++, used to be incompatible with GCC. 4069271947Sdes # ICC 10 doesn't accept -KPIC any more. 4070271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4071271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4072271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4073271947Sdes ;; 4074271947Sdes pgCC* | pgcpp*) 4075271947Sdes # Portland Group C++ compiler 4076271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4077271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4078271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4079271947Sdes ;; 4080271947Sdes cxx*) 4081271947Sdes # Compaq C++ 4082271947Sdes # Make sure the PIC flag is empty. It appears that all Alpha 4083271947Sdes # Linux and Compaq Tru64 Unix objects are PIC. 4084271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4085271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4086271947Sdes ;; 4087271947Sdes xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4088271947Sdes # IBM XL 8.0, 9.0 on PPC and BlueGene 4089271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4090271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4091271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4092271947Sdes ;; 4093271947Sdes *) 4094271947Sdes case `$CC -V 2>&1 | sed 5q` in 4095271947Sdes *Sun\ C*) 4096271947Sdes # Sun C++ 5.9 4097271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4098271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4099271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4100271947Sdes ;; 4101271947Sdes esac 4102271947Sdes ;; 4103271947Sdes esac 4104271947Sdes ;; 4105271947Sdes lynxos*) 4106271947Sdes ;; 4107271947Sdes m88k*) 4108271947Sdes ;; 4109271947Sdes mvs*) 4110271947Sdes case $cc_basename in 4111271947Sdes cxx*) 4112271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4113271947Sdes ;; 4114271947Sdes *) 4115271947Sdes ;; 4116271947Sdes esac 4117271947Sdes ;; 4118271947Sdes netbsd*) 4119271947Sdes ;; 4120271947Sdes *qnx* | *nto*) 4121271947Sdes # QNX uses GNU C++, but need to define -shared option too, otherwise 4122271947Sdes # it will coredump. 4123271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4124271947Sdes ;; 4125271947Sdes osf3* | osf4* | osf5*) 4126271947Sdes case $cc_basename in 4127271947Sdes KCC*) 4128271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4129271947Sdes ;; 4130271947Sdes RCC*) 4131271947Sdes # Rational C++ 2.4.1 4132271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4133271947Sdes ;; 4134271947Sdes cxx*) 4135271947Sdes # Digital/Compaq C++ 4136271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4137271947Sdes # Make sure the PIC flag is empty. It appears that all Alpha 4138271947Sdes # Linux and Compaq Tru64 Unix objects are PIC. 4139271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4140271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4141271947Sdes ;; 4142271947Sdes *) 4143271947Sdes ;; 4144271947Sdes esac 4145271947Sdes ;; 4146271947Sdes psos*) 4147271947Sdes ;; 4148271947Sdes solaris*) 4149271947Sdes case $cc_basename in 4150271947Sdes CC* | sunCC*) 4151271947Sdes # Sun C++ 4.2, 5.x and Centerline C++ 4152271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4153271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4154271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4155271947Sdes ;; 4156271947Sdes gcx*) 4157271947Sdes # Green Hills C++ Compiler 4158271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4159271947Sdes ;; 4160271947Sdes *) 4161271947Sdes ;; 4162271947Sdes esac 4163271947Sdes ;; 4164271947Sdes sunos4*) 4165271947Sdes case $cc_basename in 4166271947Sdes CC*) 4167271947Sdes # Sun C++ 4.x 4168271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4169271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4170271947Sdes ;; 4171271947Sdes lcc*) 4172271947Sdes # Lucid 4173271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4174271947Sdes ;; 4175271947Sdes *) 4176271947Sdes ;; 4177271947Sdes esac 4178271947Sdes ;; 4179271947Sdes sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4180271947Sdes case $cc_basename in 4181271947Sdes CC*) 4182271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4183271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4184271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4185271947Sdes ;; 4186271947Sdes esac 4187271947Sdes ;; 4188271947Sdes tandem*) 4189271947Sdes case $cc_basename in 4190271947Sdes NCC*) 4191271947Sdes # NonStop-UX NCC 3.20 4192271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4193271947Sdes ;; 4194271947Sdes *) 4195271947Sdes ;; 4196271947Sdes esac 4197271947Sdes ;; 4198271947Sdes vxworks*) 4199271947Sdes ;; 4200271947Sdes *) 4201271947Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4202271947Sdes ;; 4203271947Sdes esac 4204271947Sdes fi 4205271947Sdes], 4206271947Sdes[ 4207271947Sdes if test "$GCC" = yes; then 4208271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4209271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4210271947Sdes 4211271947Sdes case $host_os in 4212271947Sdes aix*) 4213271947Sdes # All AIX code is PIC. 4214271947Sdes if test "$host_cpu" = ia64; then 4215271947Sdes # AIX 5 now supports IA64 processor 4216271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4217271947Sdes fi 4218271947Sdes ;; 4219271947Sdes 4220271947Sdes amigaos*) 4221271947Sdes case $host_cpu in 4222271947Sdes powerpc) 4223271947Sdes # see comment about AmigaOS4 .so support 4224271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4225271947Sdes ;; 4226271947Sdes m68k) 4227271947Sdes # FIXME: we need at least 68020 code to build shared libraries, but 4228271947Sdes # adding the `-m68020' flag to GCC prevents building anything better, 4229271947Sdes # like `-m68040'. 4230271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4231271947Sdes ;; 4232271947Sdes esac 4233271947Sdes ;; 4234271947Sdes 4235271947Sdes beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4236271947Sdes # PIC is the default for these OSes. 4237271947Sdes ;; 4238271947Sdes 4239271947Sdes mingw* | cygwin* | pw32* | os2* | cegcc*) 4240271947Sdes # This hack is so that the source file can tell whether it is being 4241271947Sdes # built for inclusion in a dll (and should export symbols for example). 4242271947Sdes # Although the cygwin gcc ignores -fPIC, still need this for old-style 4243271947Sdes # (--disable-auto-import) libraries 4244271947Sdes m4_if([$1], [GCJ], [], 4245271947Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4246271947Sdes ;; 4247271947Sdes 4248271947Sdes darwin* | rhapsody*) 4249271947Sdes # PIC is the default on this platform 4250271947Sdes # Common symbols not allowed in MH_DYLIB files 4251271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4252271947Sdes ;; 4253271947Sdes 4254271947Sdes haiku*) 4255271947Sdes # PIC is the default for Haiku. 4256271947Sdes # The "-static" flag exists, but is broken. 4257271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)= 4258271947Sdes ;; 4259271947Sdes 4260271947Sdes hpux*) 4261271947Sdes # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4262271947Sdes # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4263271947Sdes # sets the default TLS model and affects inlining. 4264271947Sdes case $host_cpu in 4265271947Sdes hppa*64*) 4266271947Sdes # +Z the default 4267271947Sdes ;; 4268271947Sdes *) 4269271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4270271947Sdes ;; 4271271947Sdes esac 4272271947Sdes ;; 4273271947Sdes 4274271947Sdes interix[[3-9]]*) 4275271947Sdes # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4276271947Sdes # Instead, we relocate shared libraries at runtime. 4277271947Sdes ;; 4278271947Sdes 4279271947Sdes msdosdjgpp*) 4280271947Sdes # Just because we use GCC doesn't mean we suddenly get shared libraries 4281271947Sdes # on systems that don't support them. 4282271947Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4283271947Sdes enable_shared=no 4284271947Sdes ;; 4285271947Sdes 4286271947Sdes *nto* | *qnx*) 4287271947Sdes # QNX uses GNU C++, but need to define -shared option too, otherwise 4288271947Sdes # it will coredump. 4289271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4290271947Sdes ;; 4291271947Sdes 4292271947Sdes sysv4*MP*) 4293271947Sdes if test -d /usr/nec; then 4294271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4295271947Sdes fi 4296271947Sdes ;; 4297271947Sdes 4298271947Sdes *) 4299271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4300271947Sdes ;; 4301271947Sdes esac 4302271947Sdes 4303271947Sdes case $cc_basename in 4304271947Sdes nvcc*) # Cuda Compiler Driver 2.2 4305271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4306271947Sdes if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4307271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4308271947Sdes fi 4309271947Sdes ;; 4310271947Sdes esac 4311271947Sdes else 4312271947Sdes # PORTME Check for flag to pass linker flags through the system compiler. 4313271947Sdes case $host_os in 4314271947Sdes aix*) 4315271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4316271947Sdes if test "$host_cpu" = ia64; then 4317271947Sdes # AIX 5 now supports IA64 processor 4318271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4319271947Sdes else 4320271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4321271947Sdes fi 4322271947Sdes ;; 4323271947Sdes 4324271947Sdes mingw* | cygwin* | pw32* | os2* | cegcc*) 4325271947Sdes # This hack is so that the source file can tell whether it is being 4326271947Sdes # built for inclusion in a dll (and should export symbols for example). 4327271947Sdes m4_if([$1], [GCJ], [], 4328271947Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4329271947Sdes ;; 4330271947Sdes 4331271947Sdes hpux9* | hpux10* | hpux11*) 4332271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4333271947Sdes # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4334271947Sdes # not for PA HP-UX. 4335271947Sdes case $host_cpu in 4336271947Sdes hppa*64*|ia64*) 4337271947Sdes # +Z the default 4338271947Sdes ;; 4339271947Sdes *) 4340271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4341271947Sdes ;; 4342271947Sdes esac 4343271947Sdes # Is there a better lt_prog_compiler_static that works with the bundled CC? 4344271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4345271947Sdes ;; 4346271947Sdes 4347271947Sdes irix5* | irix6* | nonstopux*) 4348271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4349271947Sdes # PIC (with -KPIC) is the default. 4350271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4351271947Sdes ;; 4352271947Sdes 4353271947Sdes linux* | k*bsd*-gnu | kopensolaris*-gnu) 4354271947Sdes case $cc_basename in 4355271947Sdes # old Intel for x86_64 which still supported -KPIC. 4356271947Sdes ecc*) 4357271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4358271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4359271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4360271947Sdes ;; 4361271947Sdes # icc used to be incompatible with GCC. 4362271947Sdes # ICC 10 doesn't accept -KPIC any more. 4363271947Sdes icc* | ifort*) 4364271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4365271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4366271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4367271947Sdes ;; 4368271947Sdes # Lahey Fortran 8.1. 4369271947Sdes lf95*) 4370271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4371271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4372271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4373271947Sdes ;; 4374271947Sdes nagfor*) 4375271947Sdes # NAG Fortran compiler 4376271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4377271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4378271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4379271947Sdes ;; 4380271947Sdes pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4381271947Sdes # Portland Group compilers (*not* the Pentium gcc compiler, 4382271947Sdes # which looks to be a dead project) 4383271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4384271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4385271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4386271947Sdes ;; 4387271947Sdes ccc*) 4388271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4389271947Sdes # All Alpha code is PIC. 4390271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4391271947Sdes ;; 4392271947Sdes xl* | bgxl* | bgf* | mpixl*) 4393271947Sdes # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4394271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4395271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4396271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4397271947Sdes ;; 4398271947Sdes *) 4399271947Sdes case `$CC -V 2>&1 | sed 5q` in 4400271947Sdes *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4401271947Sdes # Sun Fortran 8.3 passes all unrecognized flags to the linker 4402271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4403271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4404271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4405271947Sdes ;; 4406271947Sdes *Sun\ F* | *Sun*Fortran*) 4407271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4408271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4409271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4410271947Sdes ;; 4411271947Sdes *Sun\ C*) 4412271947Sdes # Sun C 5.9 4413271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4414271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4415271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4416271947Sdes ;; 4417271947Sdes *Intel*\ [[CF]]*Compiler*) 4418271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4419271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4420271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4421271947Sdes ;; 4422271947Sdes *Portland\ Group*) 4423271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4424271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4425271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4426271947Sdes ;; 4427271947Sdes esac 4428271947Sdes ;; 4429271947Sdes esac 4430271947Sdes ;; 4431271947Sdes 4432271947Sdes newsos6) 4433271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4434271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4435271947Sdes ;; 4436271947Sdes 4437271947Sdes *nto* | *qnx*) 4438271947Sdes # QNX uses GNU C++, but need to define -shared option too, otherwise 4439271947Sdes # it will coredump. 4440271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4441271947Sdes ;; 4442271947Sdes 4443271947Sdes osf3* | osf4* | osf5*) 4444271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4445271947Sdes # All OSF/1 code is PIC. 4446271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4447271947Sdes ;; 4448271947Sdes 4449271947Sdes rdos*) 4450271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4451271947Sdes ;; 4452271947Sdes 4453271947Sdes solaris*) 4454271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4455271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4456271947Sdes case $cc_basename in 4457271947Sdes f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4458271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4459271947Sdes *) 4460271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4461271947Sdes esac 4462271947Sdes ;; 4463271947Sdes 4464271947Sdes sunos4*) 4465271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4466271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4467271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4468271947Sdes ;; 4469271947Sdes 4470271947Sdes sysv4 | sysv4.2uw2* | sysv4.3*) 4471271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4472271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4473271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4474271947Sdes ;; 4475271947Sdes 4476271947Sdes sysv4*MP*) 4477271947Sdes if test -d /usr/nec ;then 4478271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4479271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4480271947Sdes fi 4481271947Sdes ;; 4482271947Sdes 4483271947Sdes sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4484271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4485271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4486271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4487271947Sdes ;; 4488271947Sdes 4489271947Sdes unicos*) 4490271947Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4491271947Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4492271947Sdes ;; 4493271947Sdes 4494271947Sdes uts4*) 4495271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4496271947Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4497271947Sdes ;; 4498271947Sdes 4499271947Sdes *) 4500271947Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4501271947Sdes ;; 4502271947Sdes esac 4503271947Sdes fi 4504271947Sdes]) 4505271947Sdescase $host_os in 4506271947Sdes # For platforms which do not support PIC, -DPIC is meaningless: 4507271947Sdes *djgpp*) 4508271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4509271947Sdes ;; 4510271947Sdes *) 4511271947Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4512271947Sdes ;; 4513271947Sdesesac 4514271947Sdes 4515271947SdesAC_CACHE_CHECK([for $compiler option to produce PIC], 4516271947Sdes [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4517271947Sdes [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4518271947Sdes_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4519271947Sdes 4520271947Sdes# 4521271947Sdes# Check to make sure the PIC flag actually works. 4522271947Sdes# 4523271947Sdesif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4524271947Sdes _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4525271947Sdes [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4526271947Sdes [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4527271947Sdes [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4528271947Sdes "" | " "*) ;; 4529271947Sdes *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4530271947Sdes esac], 4531271947Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4532271947Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4533271947Sdesfi 4534271947Sdes_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4535271947Sdes [Additional compiler flags for building library objects]) 4536271947Sdes 4537271947Sdes_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4538271947Sdes [How to pass a linker flag through the compiler]) 4539271947Sdes# 4540271947Sdes# Check to make sure the static flag actually works. 4541271947Sdes# 4542271947Sdeswl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4543271947Sdes_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4544271947Sdes _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4545271947Sdes $lt_tmp_static_flag, 4546271947Sdes [], 4547271947Sdes [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4548271947Sdes_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4549271947Sdes [Compiler flag to prevent dynamic linking]) 4550271947Sdes])# _LT_COMPILER_PIC 4551271947Sdes 4552271947Sdes 4553271947Sdes# _LT_LINKER_SHLIBS([TAGNAME]) 4554271947Sdes# ---------------------------- 4555271947Sdes# See if the linker supports building shared libraries. 4556271947Sdesm4_defun([_LT_LINKER_SHLIBS], 4557271947Sdes[AC_REQUIRE([LT_PATH_LD])dnl 4558271947SdesAC_REQUIRE([LT_PATH_NM])dnl 4559271947Sdesm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4560271947Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4561271947Sdesm4_require([_LT_DECL_EGREP])dnl 4562271947Sdesm4_require([_LT_DECL_SED])dnl 4563271947Sdesm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4564271947Sdesm4_require([_LT_TAG_COMPILER])dnl 4565271947SdesAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4566271947Sdesm4_if([$1], [CXX], [ 4567271947Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4568271947Sdes _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4569271947Sdes case $host_os in 4570271947Sdes aix[[4-9]]*) 4571271947Sdes # If we're using GNU nm, then we don't want the "-C" option. 4572271947Sdes # -C means demangle to AIX nm, but means don't demangle with GNU nm 4573271947Sdes # Also, AIX nm treats weak defined symbols like other global defined 4574271947Sdes # symbols, whereas GNU nm marks them as "W". 4575271947Sdes if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4576271947Sdes _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' 4577271947Sdes else 4578271947Sdes _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' 4579271947Sdes fi 4580271947Sdes ;; 4581271947Sdes pw32*) 4582271947Sdes _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4583271947Sdes ;; 4584271947Sdes cygwin* | mingw* | cegcc*) 4585271947Sdes case $cc_basename in 4586271947Sdes cl*) 4587271947Sdes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4588271947Sdes ;; 4589271947Sdes *) 4590271947Sdes _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' 4591271947Sdes _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4592271947Sdes ;; 4593271947Sdes esac 4594271947Sdes ;; 4595271947Sdes *) 4596271947Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4597271947Sdes ;; 4598271947Sdes esac 4599271947Sdes], [ 4600271947Sdes runpath_var= 4601271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)= 4602271947Sdes _LT_TAGVAR(always_export_symbols, $1)=no 4603271947Sdes _LT_TAGVAR(archive_cmds, $1)= 4604271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)= 4605271947Sdes _LT_TAGVAR(compiler_needs_object, $1)=no 4606271947Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4607271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4608271947Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4609271947Sdes _LT_TAGVAR(hardcode_automatic, $1)=no 4610271947Sdes _LT_TAGVAR(hardcode_direct, $1)=no 4611271947Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4612271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4613271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)= 4614271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=no 4615271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4616271947Sdes _LT_TAGVAR(inherit_rpath, $1)=no 4617271947Sdes _LT_TAGVAR(link_all_deplibs, $1)=unknown 4618271947Sdes _LT_TAGVAR(module_cmds, $1)= 4619271947Sdes _LT_TAGVAR(module_expsym_cmds, $1)= 4620271947Sdes _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4621271947Sdes _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4622271947Sdes _LT_TAGVAR(thread_safe_flag_spec, $1)= 4623271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 4624271947Sdes # include_expsyms should be a list of space-separated symbols to be *always* 4625271947Sdes # included in the symbol list 4626271947Sdes _LT_TAGVAR(include_expsyms, $1)= 4627271947Sdes # exclude_expsyms can be an extended regexp of symbols to exclude 4628271947Sdes # it will be wrapped by ` (' and `)$', so one must not match beginning or 4629271947Sdes # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4630271947Sdes # as well as any symbol that contains `d'. 4631271947Sdes _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4632271947Sdes # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4633271947Sdes # platforms (ab)use it in PIC code, but their linkers get confused if 4634271947Sdes # the symbol is explicitly referenced. Since portable code cannot 4635271947Sdes # rely on this symbol name, it's probably fine to never include it in 4636271947Sdes # preloaded symbol tables. 4637271947Sdes # Exclude shared library initialization/finalization symbols. 4638271947Sdesdnl Note also adjust exclude_expsyms for C++ above. 4639271947Sdes extract_expsyms_cmds= 4640271947Sdes 4641271947Sdes case $host_os in 4642271947Sdes cygwin* | mingw* | pw32* | cegcc*) 4643271947Sdes # FIXME: the MSVC++ port hasn't been tested in a loooong time 4644271947Sdes # When not using gcc, we currently assume that we are using 4645271947Sdes # Microsoft Visual C++. 4646271947Sdes if test "$GCC" != yes; then 4647271947Sdes with_gnu_ld=no 4648271947Sdes fi 4649271947Sdes ;; 4650271947Sdes interix*) 4651271947Sdes # we just hope/assume this is gcc and not c89 (= MSVC++) 4652271947Sdes with_gnu_ld=yes 4653271947Sdes ;; 4654271947Sdes openbsd*) 4655271947Sdes with_gnu_ld=no 4656271947Sdes ;; 4657271947Sdes esac 4658271947Sdes 4659271947Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 4660271947Sdes 4661271947Sdes # On some targets, GNU ld is compatible enough with the native linker 4662271947Sdes # that we're better off using the native interface for both. 4663271947Sdes lt_use_gnu_ld_interface=no 4664271947Sdes if test "$with_gnu_ld" = yes; then 4665271947Sdes case $host_os in 4666271947Sdes aix*) 4667271947Sdes # The AIX port of GNU ld has always aspired to compatibility 4668271947Sdes # with the native linker. However, as the warning in the GNU ld 4669271947Sdes # block says, versions before 2.19.5* couldn't really create working 4670271947Sdes # shared libraries, regardless of the interface used. 4671271947Sdes case `$LD -v 2>&1` in 4672271947Sdes *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4673271947Sdes *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4674271947Sdes *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4675271947Sdes *) 4676271947Sdes lt_use_gnu_ld_interface=yes 4677271947Sdes ;; 4678271947Sdes esac 4679271947Sdes ;; 4680271947Sdes *) 4681271947Sdes lt_use_gnu_ld_interface=yes 4682271947Sdes ;; 4683271947Sdes esac 4684271947Sdes fi 4685271947Sdes 4686271947Sdes if test "$lt_use_gnu_ld_interface" = yes; then 4687271947Sdes # If archive_cmds runs LD, not CC, wlarc should be empty 4688271947Sdes wlarc='${wl}' 4689271947Sdes 4690271947Sdes # Set some defaults for GNU ld with shared library support. These 4691271947Sdes # are reset later if shared libraries are not supported. Putting them 4692271947Sdes # here allows them to be overridden if necessary. 4693271947Sdes runpath_var=LD_RUN_PATH 4694271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4695271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4696271947Sdes # ancient GNU ld didn't support --whole-archive et. al. 4697271947Sdes if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4698271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4699271947Sdes else 4700271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 4701271947Sdes fi 4702271947Sdes supports_anon_versioning=no 4703271947Sdes case `$LD -v 2>&1` in 4704271947Sdes *GNU\ gold*) supports_anon_versioning=yes ;; 4705271947Sdes *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4706271947Sdes *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4707271947Sdes *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4708271947Sdes *\ 2.11.*) ;; # other 2.11 versions 4709271947Sdes *) supports_anon_versioning=yes ;; 4710271947Sdes esac 4711271947Sdes 4712271947Sdes # See if GNU ld supports shared libraries. 4713271947Sdes case $host_os in 4714271947Sdes aix[[3-9]]*) 4715271947Sdes # On AIX/PPC, the GNU linker is very broken 4716271947Sdes if test "$host_cpu" != ia64; then 4717271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4718271947Sdes cat <<_LT_EOF 1>&2 4719271947Sdes 4720271947Sdes*** Warning: the GNU linker, at least up to release 2.19, is reported 4721271947Sdes*** to be unable to reliably create shared libraries on AIX. 4722271947Sdes*** Therefore, libtool is disabling shared libraries support. If you 4723271947Sdes*** really care for shared libraries, you may want to install binutils 4724271947Sdes*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4725271947Sdes*** You will then need to restart the configuration process. 4726271947Sdes 4727271947Sdes_LT_EOF 4728271947Sdes fi 4729271947Sdes ;; 4730271947Sdes 4731271947Sdes amigaos*) 4732271947Sdes case $host_cpu in 4733271947Sdes powerpc) 4734271947Sdes # see comment about AmigaOS4 .so support 4735271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4736271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='' 4737271947Sdes ;; 4738271947Sdes m68k) 4739271947Sdes _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)' 4740271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4741271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 4742271947Sdes ;; 4743271947Sdes esac 4744271947Sdes ;; 4745271947Sdes 4746271947Sdes beos*) 4747271947Sdes if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4748271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4749271947Sdes # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4750271947Sdes # support --undefined. This deserves some investigation. FIXME 4751271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4752271947Sdes else 4753271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4754271947Sdes fi 4755271947Sdes ;; 4756271947Sdes 4757271947Sdes cygwin* | mingw* | pw32* | cegcc*) 4758271947Sdes # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4759271947Sdes # as there is no search path for DLLs. 4760271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4761271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4762271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4763271947Sdes _LT_TAGVAR(always_export_symbols, $1)=no 4764271947Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4765271947Sdes _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' 4766271947Sdes _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4767271947Sdes 4768271947Sdes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4769271947Sdes _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' 4770271947Sdes # If the export-symbols file already is a .def file (1st line 4771271947Sdes # is EXPORTS), use it as is; otherwise, prepend... 4772271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4773271947Sdes cp $export_symbols $output_objdir/$soname.def; 4774271947Sdes else 4775271947Sdes echo EXPORTS > $output_objdir/$soname.def; 4776271947Sdes cat $export_symbols >> $output_objdir/$soname.def; 4777271947Sdes fi~ 4778271947Sdes $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4779271947Sdes else 4780271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4781271947Sdes fi 4782271947Sdes ;; 4783271947Sdes 4784271947Sdes haiku*) 4785271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4786271947Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 4787271947Sdes ;; 4788271947Sdes 4789271947Sdes interix[[3-9]]*) 4790271947Sdes _LT_TAGVAR(hardcode_direct, $1)=no 4791271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4792271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4793271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4794271947Sdes # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4795271947Sdes # Instead, shared libraries are loaded at an image base (0x10000000 by 4796271947Sdes # default) and relocated if they conflict, which is a slow very memory 4797271947Sdes # consuming and fragmenting process. To avoid this, we pick a random, 4798271947Sdes # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4799271947Sdes # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4800271947Sdes _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' 4801271947Sdes _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' 4802271947Sdes ;; 4803271947Sdes 4804271947Sdes gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4805271947Sdes tmp_diet=no 4806271947Sdes if test "$host_os" = linux-dietlibc; then 4807271947Sdes case $cc_basename in 4808271947Sdes diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4809271947Sdes esac 4810271947Sdes fi 4811271947Sdes if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4812271947Sdes && test "$tmp_diet" = no 4813271947Sdes then 4814271947Sdes tmp_addflag=' $pic_flag' 4815271947Sdes tmp_sharedflag='-shared' 4816271947Sdes case $cc_basename,$host_cpu in 4817271947Sdes pgcc*) # Portland Group C compiler 4818271947Sdes _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' 4819271947Sdes tmp_addflag=' $pic_flag' 4820271947Sdes ;; 4821271947Sdes pgf77* | pgf90* | pgf95* | pgfortran*) 4822271947Sdes # Portland Group f77 and f90 compilers 4823271947Sdes _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' 4824271947Sdes tmp_addflag=' $pic_flag -Mnomain' ;; 4825271947Sdes ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4826271947Sdes tmp_addflag=' -i_dynamic' ;; 4827271947Sdes efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4828271947Sdes tmp_addflag=' -i_dynamic -nofor_main' ;; 4829271947Sdes ifc* | ifort*) # Intel Fortran compiler 4830271947Sdes tmp_addflag=' -nofor_main' ;; 4831271947Sdes lf95*) # Lahey Fortran 8.1 4832271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 4833271947Sdes tmp_sharedflag='--shared' ;; 4834271947Sdes xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4835271947Sdes tmp_sharedflag='-qmkshrobj' 4836271947Sdes tmp_addflag= ;; 4837271947Sdes nvcc*) # Cuda Compiler Driver 2.2 4838271947Sdes _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' 4839271947Sdes _LT_TAGVAR(compiler_needs_object, $1)=yes 4840271947Sdes ;; 4841271947Sdes esac 4842271947Sdes case `$CC -V 2>&1 | sed 5q` in 4843271947Sdes *Sun\ C*) # Sun C 5.9 4844271947Sdes _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' 4845271947Sdes _LT_TAGVAR(compiler_needs_object, $1)=yes 4846271947Sdes tmp_sharedflag='-G' ;; 4847271947Sdes *Sun\ F*) # Sun Fortran 8.3 4848271947Sdes tmp_sharedflag='-G' ;; 4849271947Sdes esac 4850271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4851271947Sdes 4852271947Sdes if test "x$supports_anon_versioning" = xyes; then 4853271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4854271947Sdes cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4855271947Sdes echo "local: *; };" >> $output_objdir/$libname.ver~ 4856271947Sdes $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4857271947Sdes fi 4858271947Sdes 4859271947Sdes case $cc_basename in 4860271947Sdes xlf* | bgf* | bgxlf* | mpixlf*) 4861271947Sdes # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4862271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4863271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4864271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4865271947Sdes if test "x$supports_anon_versioning" = xyes; then 4866271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4867271947Sdes cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4868271947Sdes echo "local: *; };" >> $output_objdir/$libname.ver~ 4869271947Sdes $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4870271947Sdes fi 4871271947Sdes ;; 4872271947Sdes esac 4873271947Sdes else 4874271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4875271947Sdes fi 4876271947Sdes ;; 4877271947Sdes 4878271947Sdes netbsd*) 4879271947Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4880271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4881271947Sdes wlarc= 4882271947Sdes else 4883271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4884271947Sdes _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' 4885271947Sdes fi 4886271947Sdes ;; 4887271947Sdes 4888271947Sdes solaris*) 4889271947Sdes if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4890271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4891271947Sdes cat <<_LT_EOF 1>&2 4892271947Sdes 4893271947Sdes*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4894271947Sdes*** create shared libraries on Solaris systems. Therefore, libtool 4895271947Sdes*** is disabling shared libraries support. We urge you to upgrade GNU 4896271947Sdes*** binutils to release 2.9.1 or newer. Another option is to modify 4897271947Sdes*** your PATH or compiler configuration so that the native linker is 4898271947Sdes*** used, and then restart. 4899271947Sdes 4900271947Sdes_LT_EOF 4901271947Sdes elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4902271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4903271947Sdes _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' 4904271947Sdes else 4905271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4906271947Sdes fi 4907271947Sdes ;; 4908271947Sdes 4909271947Sdes sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4910271947Sdes case `$LD -v 2>&1` in 4911271947Sdes *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4912271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4913271947Sdes cat <<_LT_EOF 1>&2 4914271947Sdes 4915271947Sdes*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4916271947Sdes*** reliably create shared libraries on SCO systems. Therefore, libtool 4917271947Sdes*** is disabling shared libraries support. We urge you to upgrade GNU 4918271947Sdes*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4919271947Sdes*** your PATH or compiler configuration so that the native linker is 4920271947Sdes*** used, and then restart. 4921271947Sdes 4922271947Sdes_LT_EOF 4923271947Sdes ;; 4924271947Sdes *) 4925271947Sdes # For security reasons, it is highly recommended that you always 4926271947Sdes # use absolute paths for naming shared libraries, and exclude the 4927271947Sdes # DT_RUNPATH tag from executables and libraries. But doing so 4928271947Sdes # requires that you compile everything twice, which is a pain. 4929271947Sdes if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4930271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4931271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4932271947Sdes _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' 4933271947Sdes else 4934271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4935271947Sdes fi 4936271947Sdes ;; 4937271947Sdes esac 4938271947Sdes ;; 4939271947Sdes 4940271947Sdes sunos4*) 4941271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4942271947Sdes wlarc= 4943271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 4944271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4945271947Sdes ;; 4946271947Sdes 4947271947Sdes *) 4948271947Sdes if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4949271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4950271947Sdes _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' 4951271947Sdes else 4952271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4953271947Sdes fi 4954271947Sdes ;; 4955271947Sdes esac 4956271947Sdes 4957271947Sdes if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4958271947Sdes runpath_var= 4959271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4960271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4961271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 4962271947Sdes fi 4963271947Sdes else 4964271947Sdes # PORTME fill in a description of your system's linker (not GNU ld) 4965271947Sdes case $host_os in 4966271947Sdes aix3*) 4967271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4968271947Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 4969271947Sdes _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' 4970271947Sdes # Note: this linker hardcodes the directories in LIBPATH if there 4971271947Sdes # are no directories specified by -L. 4972271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 4973271947Sdes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4974271947Sdes # Neither direct hardcoding nor static linking is supported with a 4975271947Sdes # broken collect2. 4976271947Sdes _LT_TAGVAR(hardcode_direct, $1)=unsupported 4977271947Sdes fi 4978271947Sdes ;; 4979271947Sdes 4980271947Sdes aix[[4-9]]*) 4981271947Sdes if test "$host_cpu" = ia64; then 4982271947Sdes # On IA64, the linker does run time linking by default, so we don't 4983271947Sdes # have to do anything special. 4984271947Sdes aix_use_runtimelinking=no 4985271947Sdes exp_sym_flag='-Bexport' 4986271947Sdes no_entry_flag="" 4987271947Sdes else 4988271947Sdes # If we're using GNU nm, then we don't want the "-C" option. 4989271947Sdes # -C means demangle to AIX nm, but means don't demangle with GNU nm 4990271947Sdes # Also, AIX nm treats weak defined symbols like other global 4991271947Sdes # defined symbols, whereas GNU nm marks them as "W". 4992271947Sdes if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4993271947Sdes _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' 4994271947Sdes else 4995271947Sdes _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' 4996271947Sdes fi 4997271947Sdes aix_use_runtimelinking=no 4998271947Sdes 4999271947Sdes # Test if we are trying to use run time linking or normal 5000271947Sdes # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5001271947Sdes # need to do runtime linking. 5002271947Sdes case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5003271947Sdes for ld_flag in $LDFLAGS; do 5004271947Sdes if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5005271947Sdes aix_use_runtimelinking=yes 5006271947Sdes break 5007271947Sdes fi 5008271947Sdes done 5009271947Sdes ;; 5010271947Sdes esac 5011271947Sdes 5012271947Sdes exp_sym_flag='-bexport' 5013271947Sdes no_entry_flag='-bnoentry' 5014271947Sdes fi 5015271947Sdes 5016271947Sdes # When large executables or shared objects are built, AIX ld can 5017271947Sdes # have problems creating the table of contents. If linking a library 5018271947Sdes # or program results in "error TOC overflow" add -mminimal-toc to 5019271947Sdes # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5020271947Sdes # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5021271947Sdes 5022271947Sdes _LT_TAGVAR(archive_cmds, $1)='' 5023271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5024271947Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5025271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5026271947Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 5027271947Sdes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5028271947Sdes 5029271947Sdes if test "$GCC" = yes; then 5030271947Sdes case $host_os in aix4.[[012]]|aix4.[[012]].*) 5031271947Sdes # We only want to do this on AIX 4.2 and lower, the check 5032271947Sdes # below for broken collect2 doesn't work under 4.3+ 5033271947Sdes collect2name=`${CC} -print-prog-name=collect2` 5034271947Sdes if test -f "$collect2name" && 5035271947Sdes strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5036271947Sdes then 5037271947Sdes # We have reworked collect2 5038271947Sdes : 5039271947Sdes else 5040271947Sdes # We have old collect2 5041271947Sdes _LT_TAGVAR(hardcode_direct, $1)=unsupported 5042271947Sdes # It fails to find uninstalled libraries when the uninstalled 5043271947Sdes # path is not listed in the libpath. Setting hardcode_minus_L 5044271947Sdes # to unsupported forces relinking 5045271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5046271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5047271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)= 5048271947Sdes fi 5049271947Sdes ;; 5050271947Sdes esac 5051271947Sdes shared_flag='-shared' 5052271947Sdes if test "$aix_use_runtimelinking" = yes; then 5053271947Sdes shared_flag="$shared_flag "'${wl}-G' 5054271947Sdes fi 5055271947Sdes else 5056271947Sdes # not using gcc 5057271947Sdes if test "$host_cpu" = ia64; then 5058271947Sdes # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5059271947Sdes # chokes on -Wl,-G. The following line is correct: 5060271947Sdes shared_flag='-G' 5061271947Sdes else 5062271947Sdes if test "$aix_use_runtimelinking" = yes; then 5063271947Sdes shared_flag='${wl}-G' 5064271947Sdes else 5065271947Sdes shared_flag='${wl}-bM:SRE' 5066271947Sdes fi 5067271947Sdes fi 5068271947Sdes fi 5069271947Sdes 5070271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5071271947Sdes # It seems that -bexpall does not export symbols beginning with 5072271947Sdes # underscore (_), so it is better to generate a list of symbols to export. 5073271947Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 5074271947Sdes if test "$aix_use_runtimelinking" = yes; then 5075271947Sdes # Warning - without using the other runtime loading flags (-brtl), 5076271947Sdes # -berok will link without error, but may produce a broken library. 5077271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5078271947Sdes # Determine the default libpath from the value encoded in an 5079271947Sdes # empty executable. 5080271947Sdes _LT_SYS_MODULE_PATH_AIX([$1]) 5081271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5082271947Sdes _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" 5083271947Sdes else 5084271947Sdes if test "$host_cpu" = ia64; then 5085271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5086271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5087271947Sdes _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" 5088271947Sdes else 5089271947Sdes # Determine the default libpath from the value encoded in an 5090271947Sdes # empty executable. 5091271947Sdes _LT_SYS_MODULE_PATH_AIX([$1]) 5092271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5093271947Sdes # Warning - without using the other run time loading flags, 5094271947Sdes # -berok will link without error, but may produce a broken library. 5095271947Sdes _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5096271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5097271947Sdes if test "$with_gnu_ld" = yes; then 5098271947Sdes # We only use this code for GNU lds that support --whole-archive. 5099271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5100271947Sdes else 5101271947Sdes # Exported symbols can be pulled into shared objects from archives 5102271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5103271947Sdes fi 5104271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5105271947Sdes # This is similar to how AIX traditionally builds its shared libraries. 5106271947Sdes _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' 5107271947Sdes fi 5108271947Sdes fi 5109271947Sdes ;; 5110271947Sdes 5111271947Sdes amigaos*) 5112271947Sdes case $host_cpu in 5113271947Sdes powerpc) 5114271947Sdes # see comment about AmigaOS4 .so support 5115271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5116271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='' 5117271947Sdes ;; 5118271947Sdes m68k) 5119271947Sdes _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)' 5120271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5121271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5122271947Sdes ;; 5123271947Sdes esac 5124271947Sdes ;; 5125271947Sdes 5126271947Sdes bsdi[[45]]*) 5127271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5128271947Sdes ;; 5129271947Sdes 5130271947Sdes cygwin* | mingw* | pw32* | cegcc*) 5131271947Sdes # When not using gcc, we currently assume that we are using 5132271947Sdes # Microsoft Visual C++. 5133271947Sdes # hardcode_libdir_flag_spec is actually meaningless, as there is 5134271947Sdes # no search path for DLLs. 5135271947Sdes case $cc_basename in 5136271947Sdes cl*) 5137271947Sdes # Native MSVC 5138271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5139271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5140271947Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 5141271947Sdes _LT_TAGVAR(file_list_spec, $1)='@' 5142271947Sdes # Tell ltmain to make .lib files, not .a files. 5143271947Sdes libext=lib 5144271947Sdes # Tell ltmain to make .dll files, not .so files. 5145271947Sdes shrext_cmds=".dll" 5146271947Sdes # FIXME: Setting linknames here is a bad hack. 5147271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5148271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5149271947Sdes sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5150271947Sdes else 5151271947Sdes sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5152271947Sdes fi~ 5153271947Sdes $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5154271947Sdes linknames=' 5155271947Sdes # The linker will not automatically build a static lib if we build a DLL. 5156271947Sdes # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5157271947Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5158271947Sdes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5159271947Sdes _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' 5160271947Sdes # Don't use ranlib 5161271947Sdes _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5162271947Sdes _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5163271947Sdes lt_tool_outputfile="@TOOL_OUTPUT@"~ 5164271947Sdes case $lt_outputfile in 5165271947Sdes *.exe|*.EXE) ;; 5166271947Sdes *) 5167271947Sdes lt_outputfile="$lt_outputfile.exe" 5168271947Sdes lt_tool_outputfile="$lt_tool_outputfile.exe" 5169271947Sdes ;; 5170271947Sdes esac~ 5171271947Sdes if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5172271947Sdes $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5173271947Sdes $RM "$lt_outputfile.manifest"; 5174271947Sdes fi' 5175271947Sdes ;; 5176271947Sdes *) 5177271947Sdes # Assume MSVC wrapper 5178271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5179271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5180271947Sdes # Tell ltmain to make .lib files, not .a files. 5181271947Sdes libext=lib 5182271947Sdes # Tell ltmain to make .dll files, not .so files. 5183271947Sdes shrext_cmds=".dll" 5184271947Sdes # FIXME: Setting linknames here is a bad hack. 5185271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5186271947Sdes # The linker will automatically build a .lib file if we build a DLL. 5187271947Sdes _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5188271947Sdes # FIXME: Should let the user specify the lib program. 5189271947Sdes _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5190271947Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5191271947Sdes ;; 5192271947Sdes esac 5193271947Sdes ;; 5194271947Sdes 5195271947Sdes darwin* | rhapsody*) 5196271947Sdes _LT_DARWIN_LINKER_FEATURES($1) 5197271947Sdes ;; 5198271947Sdes 5199271947Sdes dgux*) 5200271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5201271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5202271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5203271947Sdes ;; 5204271947Sdes 5205271947Sdes # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5206271947Sdes # support. Future versions do this automatically, but an explicit c++rt0.o 5207271947Sdes # does not break anything, and helps significantly (at the cost of a little 5208271947Sdes # extra space). 5209271947Sdes freebsd2.2*) 5210271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5211271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5212271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5213271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5214271947Sdes ;; 5215271947Sdes 5216271947Sdes # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5217271947Sdes freebsd2.*) 5218271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5219271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5220271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5221271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5222271947Sdes ;; 5223271947Sdes 5224271947Sdes # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5225271947Sdes freebsd* | dragonfly*) 5226271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5227271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5228271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5229271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5230271947Sdes ;; 5231271947Sdes 5232271947Sdes hpux9*) 5233271947Sdes if test "$GCC" = yes; then 5234271947Sdes _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' 5235271947Sdes else 5236271947Sdes _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' 5237271947Sdes fi 5238271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5239271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5240271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5241271947Sdes 5242271947Sdes # hardcode_minus_L: Not really in the search PATH, 5243271947Sdes # but as the default location of the library. 5244271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5245271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5246271947Sdes ;; 5247271947Sdes 5248271947Sdes hpux10*) 5249271947Sdes if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5250271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5251271947Sdes else 5252271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5253271947Sdes fi 5254271947Sdes if test "$with_gnu_ld" = no; then 5255271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5256271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5257271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5258271947Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5259271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5260271947Sdes # hardcode_minus_L: Not really in the search PATH, 5261271947Sdes # but as the default location of the library. 5262271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5263271947Sdes fi 5264271947Sdes ;; 5265271947Sdes 5266271947Sdes hpux11*) 5267271947Sdes if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5268271947Sdes case $host_cpu in 5269271947Sdes hppa*64*) 5270271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5271271947Sdes ;; 5272271947Sdes ia64*) 5273271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5274271947Sdes ;; 5275271947Sdes *) 5276271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5277271947Sdes ;; 5278271947Sdes esac 5279271947Sdes else 5280271947Sdes case $host_cpu in 5281271947Sdes hppa*64*) 5282271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5283271947Sdes ;; 5284271947Sdes ia64*) 5285271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5286271947Sdes ;; 5287271947Sdes *) 5288271947Sdes m4_if($1, [], [ 5289271947Sdes # Older versions of the 11.00 compiler do not understand -b yet 5290271947Sdes # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5291271947Sdes _LT_LINKER_OPTION([if $CC understands -b], 5292271947Sdes _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5293271947Sdes [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5294271947Sdes [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5295271947Sdes [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5296271947Sdes ;; 5297271947Sdes esac 5298271947Sdes fi 5299271947Sdes if test "$with_gnu_ld" = no; then 5300271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5301271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5302271947Sdes 5303271947Sdes case $host_cpu in 5304271947Sdes hppa*64*|ia64*) 5305271947Sdes _LT_TAGVAR(hardcode_direct, $1)=no 5306271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5307271947Sdes ;; 5308271947Sdes *) 5309271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5310271947Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5311271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5312271947Sdes 5313271947Sdes # hardcode_minus_L: Not really in the search PATH, 5314271947Sdes # but as the default location of the library. 5315271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5316271947Sdes ;; 5317271947Sdes esac 5318271947Sdes fi 5319271947Sdes ;; 5320271947Sdes 5321271947Sdes irix5* | irix6* | nonstopux*) 5322271947Sdes if test "$GCC" = yes; then 5323271947Sdes _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' 5324271947Sdes # Try to use the -exported_symbol ld option, if it does not 5325271947Sdes # work, assume that -exports_file does not work either and 5326271947Sdes # implicitly export all symbols. 5327271947Sdes # This should be the same for all languages, so no per-tag cache variable. 5328271947Sdes AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5329271947Sdes [lt_cv_irix_exported_symbol], 5330271947Sdes [save_LDFLAGS="$LDFLAGS" 5331271947Sdes LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5332271947Sdes AC_LINK_IFELSE( 5333271947Sdes [AC_LANG_SOURCE( 5334271947Sdes [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5335271947Sdes [C++], [[int foo (void) { return 0; }]], 5336271947Sdes [Fortran 77], [[ 5337271947Sdes subroutine foo 5338271947Sdes end]], 5339271947Sdes [Fortran], [[ 5340271947Sdes subroutine foo 5341271947Sdes end]])])], 5342271947Sdes [lt_cv_irix_exported_symbol=yes], 5343271947Sdes [lt_cv_irix_exported_symbol=no]) 5344271947Sdes LDFLAGS="$save_LDFLAGS"]) 5345271947Sdes if test "$lt_cv_irix_exported_symbol" = yes; then 5346271947Sdes _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' 5347271947Sdes fi 5348271947Sdes else 5349271947Sdes _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' 5350271947Sdes _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' 5351271947Sdes fi 5352271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5353271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5354271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5355271947Sdes _LT_TAGVAR(inherit_rpath, $1)=yes 5356271947Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 5357271947Sdes ;; 5358271947Sdes 5359271947Sdes netbsd*) 5360271947Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5361271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5362271947Sdes else 5363271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5364271947Sdes fi 5365271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5366271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5367271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5368271947Sdes ;; 5369271947Sdes 5370271947Sdes newsos6) 5371271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5372271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5373271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5374271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5375271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5376271947Sdes ;; 5377271947Sdes 5378271947Sdes *nto* | *qnx*) 5379271947Sdes ;; 5380271947Sdes 5381271947Sdes openbsd*) 5382271947Sdes if test -f /usr/libexec/ld.so; then 5383271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5384271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5385271947Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5386271947Sdes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5387271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5388271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5389271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5390271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5391271947Sdes else 5392271947Sdes case $host_os in 5393271947Sdes openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5394271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5395271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5396271947Sdes ;; 5397271947Sdes *) 5398271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5399271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5400271947Sdes ;; 5401271947Sdes esac 5402271947Sdes fi 5403271947Sdes else 5404271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5405271947Sdes fi 5406271947Sdes ;; 5407271947Sdes 5408271947Sdes os2*) 5409271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5410271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5411271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5412271947Sdes _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' 5413271947Sdes _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5414271947Sdes ;; 5415271947Sdes 5416271947Sdes osf3*) 5417271947Sdes if test "$GCC" = yes; then 5418271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5419271947Sdes _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' 5420271947Sdes else 5421271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5422271947Sdes _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' 5423271947Sdes fi 5424271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5425271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5426271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5427271947Sdes ;; 5428271947Sdes 5429271947Sdes osf4* | osf5*) # as osf3* with the addition of -msym flag 5430271947Sdes if test "$GCC" = yes; then 5431271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5432271947Sdes _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' 5433271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5434271947Sdes else 5435271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5436271947Sdes _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' 5437271947Sdes _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~ 5438271947Sdes $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' 5439271947Sdes 5440271947Sdes # Both c and cxx compiler support -rpath directly 5441271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5442271947Sdes fi 5443271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5444271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5445271947Sdes ;; 5446271947Sdes 5447271947Sdes solaris*) 5448271947Sdes _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5449271947Sdes if test "$GCC" = yes; then 5450271947Sdes wlarc='${wl}' 5451271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5452271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5453271947Sdes $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' 5454271947Sdes else 5455271947Sdes case `$CC -V 2>&1` in 5456271947Sdes *"Compilers 5.0"*) 5457271947Sdes wlarc='' 5458271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5459271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5460271947Sdes $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5461271947Sdes ;; 5462271947Sdes *) 5463271947Sdes wlarc='${wl}' 5464271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5465271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5466271947Sdes $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5467271947Sdes ;; 5468271947Sdes esac 5469271947Sdes fi 5470271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5471271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5472271947Sdes case $host_os in 5473271947Sdes solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5474271947Sdes *) 5475271947Sdes # The compiler driver will combine and reorder linker options, 5476271947Sdes # but understands `-z linker_flag'. GCC discards it without `$wl', 5477271947Sdes # but is careful enough not to reorder. 5478271947Sdes # Supported since Solaris 2.6 (maybe 2.5.1?) 5479271947Sdes if test "$GCC" = yes; then 5480271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5481271947Sdes else 5482271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5483271947Sdes fi 5484271947Sdes ;; 5485271947Sdes esac 5486271947Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 5487271947Sdes ;; 5488271947Sdes 5489271947Sdes sunos4*) 5490271947Sdes if test "x$host_vendor" = xsequent; then 5491271947Sdes # Use $CC to link under sequent, because it throws in some extra .o 5492271947Sdes # files that make .init and .fini sections work. 5493271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5494271947Sdes else 5495271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5496271947Sdes fi 5497271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5498271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5499271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5500271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5501271947Sdes ;; 5502271947Sdes 5503271947Sdes sysv4) 5504271947Sdes case $host_vendor in 5505271947Sdes sni) 5506271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5507271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5508271947Sdes ;; 5509271947Sdes siemens) 5510271947Sdes ## LD is ld it makes a PLAMLIB 5511271947Sdes ## CC just makes a GrossModule. 5512271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5513271947Sdes _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5514271947Sdes _LT_TAGVAR(hardcode_direct, $1)=no 5515271947Sdes ;; 5516271947Sdes motorola) 5517271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5518271947Sdes _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5519271947Sdes ;; 5520271947Sdes esac 5521271947Sdes runpath_var='LD_RUN_PATH' 5522271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5523271947Sdes ;; 5524271947Sdes 5525271947Sdes sysv4.3*) 5526271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5527271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5528271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5529271947Sdes ;; 5530271947Sdes 5531271947Sdes sysv4*MP*) 5532271947Sdes if test -d /usr/nec; then 5533271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5534271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5535271947Sdes runpath_var=LD_RUN_PATH 5536271947Sdes hardcode_runpath_var=yes 5537271947Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 5538271947Sdes fi 5539271947Sdes ;; 5540271947Sdes 5541271947Sdes sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5542271947Sdes _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5543271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5544271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5545271947Sdes runpath_var='LD_RUN_PATH' 5546271947Sdes 5547271947Sdes if test "$GCC" = yes; then 5548271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5549271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5550271947Sdes else 5551271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5552271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5553271947Sdes fi 5554271947Sdes ;; 5555271947Sdes 5556271947Sdes sysv5* | sco3.2v5* | sco5v6*) 5557271947Sdes # Note: We can NOT use -z defs as we might desire, because we do not 5558271947Sdes # link with -lc, and that would cause any symbols used from libc to 5559271947Sdes # always be unresolved, which means just about no library would 5560271947Sdes # ever link correctly. If we're not using GNU ld we use -z text 5561271947Sdes # though, which does catch some bad symbols but isn't as heavy-handed 5562271947Sdes # as -z defs. 5563271947Sdes _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5564271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5565271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5566271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5567271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5568271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5569271947Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 5570271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5571271947Sdes runpath_var='LD_RUN_PATH' 5572271947Sdes 5573271947Sdes if test "$GCC" = yes; then 5574271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5575271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5576271947Sdes else 5577271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5578271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5579271947Sdes fi 5580271947Sdes ;; 5581271947Sdes 5582271947Sdes uts4*) 5583271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5584271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5585271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5586271947Sdes ;; 5587271947Sdes 5588271947Sdes *) 5589271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5590271947Sdes ;; 5591271947Sdes esac 5592271947Sdes 5593271947Sdes if test x$host_vendor = xsni; then 5594271947Sdes case $host in 5595271947Sdes sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5596271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5597271947Sdes ;; 5598271947Sdes esac 5599271947Sdes fi 5600271947Sdes fi 5601271947Sdes]) 5602271947SdesAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5603271947Sdestest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5604271947Sdes 5605271947Sdes_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5606271947Sdes 5607271947Sdes_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5608271947Sdes_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5609271947Sdes_LT_DECL([], [extract_expsyms_cmds], [2], 5610271947Sdes [The commands to extract the exported symbol list from a shared archive]) 5611271947Sdes 5612271947Sdes# 5613271947Sdes# Do we need to explicitly link libc? 5614271947Sdes# 5615271947Sdescase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5616271947Sdesx|xyes) 5617271947Sdes # Assume -lc should be added 5618271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5619271947Sdes 5620271947Sdes if test "$enable_shared" = yes && test "$GCC" = yes; then 5621271947Sdes case $_LT_TAGVAR(archive_cmds, $1) in 5622271947Sdes *'~'*) 5623271947Sdes # FIXME: we may have to deal with multi-command sequences. 5624271947Sdes ;; 5625271947Sdes '$CC '*) 5626271947Sdes # Test whether the compiler implicitly links with -lc since on some 5627271947Sdes # systems, -lgcc has to come before -lc. If gcc already passes -lc 5628271947Sdes # to ld, don't add -lc before -lgcc. 5629271947Sdes AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5630271947Sdes [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5631271947Sdes [$RM conftest* 5632271947Sdes echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5633271947Sdes 5634271947Sdes if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5635271947Sdes soname=conftest 5636271947Sdes lib=conftest 5637271947Sdes libobjs=conftest.$ac_objext 5638271947Sdes deplibs= 5639271947Sdes wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5640271947Sdes pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5641271947Sdes compiler_flags=-v 5642271947Sdes linker_flags=-v 5643271947Sdes verstring= 5644271947Sdes output_objdir=. 5645271947Sdes libname=conftest 5646271947Sdes lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5647271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)= 5648271947Sdes if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5649271947Sdes then 5650271947Sdes lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5651271947Sdes else 5652271947Sdes lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5653271947Sdes fi 5654271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5655271947Sdes else 5656271947Sdes cat conftest.err 1>&5 5657271947Sdes fi 5658271947Sdes $RM conftest* 5659271947Sdes ]) 5660271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5661271947Sdes ;; 5662271947Sdes esac 5663271947Sdes fi 5664271947Sdes ;; 5665271947Sdesesac 5666271947Sdes 5667271947Sdes_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5668271947Sdes [Whether or not to add -lc for building shared libraries]) 5669271947Sdes_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5670271947Sdes [enable_shared_with_static_runtimes], [0], 5671271947Sdes [Whether or not to disallow shared libs when runtime libs are static]) 5672271947Sdes_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5673271947Sdes [Compiler flag to allow reflexive dlopens]) 5674271947Sdes_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5675271947Sdes [Compiler flag to generate shared objects directly from archives]) 5676271947Sdes_LT_TAGDECL([], [compiler_needs_object], [1], 5677271947Sdes [Whether the compiler copes with passing no objects directly]) 5678271947Sdes_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5679271947Sdes [Create an old-style archive from a shared archive]) 5680271947Sdes_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5681271947Sdes [Create a temporary old-style archive to link instead of a shared archive]) 5682271947Sdes_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5683271947Sdes_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5684271947Sdes_LT_TAGDECL([], [module_cmds], [2], 5685271947Sdes [Commands used to build a loadable module if different from building 5686271947Sdes a shared archive.]) 5687271947Sdes_LT_TAGDECL([], [module_expsym_cmds], [2]) 5688271947Sdes_LT_TAGDECL([], [with_gnu_ld], [1], 5689271947Sdes [Whether we are building with GNU ld or not]) 5690271947Sdes_LT_TAGDECL([], [allow_undefined_flag], [1], 5691271947Sdes [Flag that allows shared libraries with undefined symbols to be built]) 5692271947Sdes_LT_TAGDECL([], [no_undefined_flag], [1], 5693271947Sdes [Flag that enforces no undefined symbols]) 5694271947Sdes_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5695271947Sdes [Flag to hardcode $libdir into a binary during linking. 5696271947Sdes This must work even if $libdir does not exist]) 5697271947Sdes_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5698271947Sdes [Whether we need a single "-rpath" flag with a separated argument]) 5699271947Sdes_LT_TAGDECL([], [hardcode_direct], [0], 5700271947Sdes [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5701271947Sdes DIR into the resulting binary]) 5702271947Sdes_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5703271947Sdes [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5704271947Sdes DIR into the resulting binary and the resulting library dependency is 5705271947Sdes "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5706271947Sdes library is relocated]) 5707271947Sdes_LT_TAGDECL([], [hardcode_minus_L], [0], 5708271947Sdes [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5709271947Sdes into the resulting binary]) 5710271947Sdes_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5711271947Sdes [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5712271947Sdes into the resulting binary]) 5713271947Sdes_LT_TAGDECL([], [hardcode_automatic], [0], 5714271947Sdes [Set to "yes" if building a shared library automatically hardcodes DIR 5715271947Sdes into the library and all subsequent libraries and executables linked 5716271947Sdes against it]) 5717271947Sdes_LT_TAGDECL([], [inherit_rpath], [0], 5718271947Sdes [Set to yes if linker adds runtime paths of dependent libraries 5719271947Sdes to runtime path list]) 5720271947Sdes_LT_TAGDECL([], [link_all_deplibs], [0], 5721271947Sdes [Whether libtool must link a program against all its dependency libraries]) 5722271947Sdes_LT_TAGDECL([], [always_export_symbols], [0], 5723271947Sdes [Set to "yes" if exported symbols are required]) 5724271947Sdes_LT_TAGDECL([], [export_symbols_cmds], [2], 5725271947Sdes [The commands to list exported symbols]) 5726271947Sdes_LT_TAGDECL([], [exclude_expsyms], [1], 5727271947Sdes [Symbols that should not be listed in the preloaded symbols]) 5728271947Sdes_LT_TAGDECL([], [include_expsyms], [1], 5729271947Sdes [Symbols that must always be exported]) 5730271947Sdes_LT_TAGDECL([], [prelink_cmds], [2], 5731271947Sdes [Commands necessary for linking programs (against libraries) with templates]) 5732271947Sdes_LT_TAGDECL([], [postlink_cmds], [2], 5733271947Sdes [Commands necessary for finishing linking programs]) 5734271947Sdes_LT_TAGDECL([], [file_list_spec], [1], 5735271947Sdes [Specify filename containing input files]) 5736271947Sdesdnl FIXME: Not yet implemented 5737271947Sdesdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5738271947Sdesdnl [Compiler flag to generate thread safe objects]) 5739271947Sdes])# _LT_LINKER_SHLIBS 5740271947Sdes 5741271947Sdes 5742271947Sdes# _LT_LANG_C_CONFIG([TAG]) 5743271947Sdes# ------------------------ 5744271947Sdes# Ensure that the configuration variables for a C compiler are suitably 5745271947Sdes# defined. These variables are subsequently used by _LT_CONFIG to write 5746271947Sdes# the compiler configuration to `libtool'. 5747271947Sdesm4_defun([_LT_LANG_C_CONFIG], 5748271947Sdes[m4_require([_LT_DECL_EGREP])dnl 5749271947Sdeslt_save_CC="$CC" 5750271947SdesAC_LANG_PUSH(C) 5751271947Sdes 5752271947Sdes# Source file extension for C test sources. 5753271947Sdesac_ext=c 5754271947Sdes 5755271947Sdes# Object file extension for compiled C test sources. 5756271947Sdesobjext=o 5757271947Sdes_LT_TAGVAR(objext, $1)=$objext 5758271947Sdes 5759271947Sdes# Code to be used in simple compile tests 5760271947Sdeslt_simple_compile_test_code="int some_variable = 0;" 5761271947Sdes 5762271947Sdes# Code to be used in simple link tests 5763271947Sdeslt_simple_link_test_code='int main(){return(0);}' 5764271947Sdes 5765271947Sdes_LT_TAG_COMPILER 5766271947Sdes# Save the default compiler, since it gets overwritten when the other 5767271947Sdes# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5768271947Sdescompiler_DEFAULT=$CC 5769271947Sdes 5770271947Sdes# save warnings/boilerplate of simple test code 5771271947Sdes_LT_COMPILER_BOILERPLATE 5772271947Sdes_LT_LINKER_BOILERPLATE 5773271947Sdes 5774271947Sdesif test -n "$compiler"; then 5775271947Sdes _LT_COMPILER_NO_RTTI($1) 5776271947Sdes _LT_COMPILER_PIC($1) 5777271947Sdes _LT_COMPILER_C_O($1) 5778271947Sdes _LT_COMPILER_FILE_LOCKS($1) 5779271947Sdes _LT_LINKER_SHLIBS($1) 5780271947Sdes _LT_SYS_DYNAMIC_LINKER($1) 5781271947Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 5782271947Sdes LT_SYS_DLOPEN_SELF 5783271947Sdes _LT_CMD_STRIPLIB 5784271947Sdes 5785271947Sdes # Report which library types will actually be built 5786271947Sdes AC_MSG_CHECKING([if libtool supports shared libraries]) 5787271947Sdes AC_MSG_RESULT([$can_build_shared]) 5788271947Sdes 5789271947Sdes AC_MSG_CHECKING([whether to build shared libraries]) 5790271947Sdes test "$can_build_shared" = "no" && enable_shared=no 5791271947Sdes 5792271947Sdes # On AIX, shared libraries and static libraries use the same namespace, and 5793271947Sdes # are all built from PIC. 5794271947Sdes case $host_os in 5795271947Sdes aix3*) 5796271947Sdes test "$enable_shared" = yes && enable_static=no 5797271947Sdes if test -n "$RANLIB"; then 5798271947Sdes archive_cmds="$archive_cmds~\$RANLIB \$lib" 5799271947Sdes postinstall_cmds='$RANLIB $lib' 5800271947Sdes fi 5801271947Sdes ;; 5802271947Sdes 5803271947Sdes aix[[4-9]]*) 5804271947Sdes if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5805271947Sdes test "$enable_shared" = yes && enable_static=no 5806271947Sdes fi 5807271947Sdes ;; 5808271947Sdes esac 5809271947Sdes AC_MSG_RESULT([$enable_shared]) 5810271947Sdes 5811271947Sdes AC_MSG_CHECKING([whether to build static libraries]) 5812271947Sdes # Make sure either enable_shared or enable_static is yes. 5813271947Sdes test "$enable_shared" = yes || enable_static=yes 5814271947Sdes AC_MSG_RESULT([$enable_static]) 5815271947Sdes 5816271947Sdes _LT_CONFIG($1) 5817271947Sdesfi 5818271947SdesAC_LANG_POP 5819271947SdesCC="$lt_save_CC" 5820271947Sdes])# _LT_LANG_C_CONFIG 5821271947Sdes 5822271947Sdes 5823271947Sdes# _LT_LANG_CXX_CONFIG([TAG]) 5824271947Sdes# -------------------------- 5825271947Sdes# Ensure that the configuration variables for a C++ compiler are suitably 5826271947Sdes# defined. These variables are subsequently used by _LT_CONFIG to write 5827271947Sdes# the compiler configuration to `libtool'. 5828271947Sdesm4_defun([_LT_LANG_CXX_CONFIG], 5829271947Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5830271947Sdesm4_require([_LT_DECL_EGREP])dnl 5831271947Sdesm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5832271947Sdesif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5833271947Sdes ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5834271947Sdes (test "X$CXX" != "Xg++"))) ; then 5835271947Sdes AC_PROG_CXXCPP 5836271947Sdeselse 5837271947Sdes _lt_caught_CXX_error=yes 5838271947Sdesfi 5839271947Sdes 5840271947SdesAC_LANG_PUSH(C++) 5841271947Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5842271947Sdes_LT_TAGVAR(allow_undefined_flag, $1)= 5843271947Sdes_LT_TAGVAR(always_export_symbols, $1)=no 5844271947Sdes_LT_TAGVAR(archive_expsym_cmds, $1)= 5845271947Sdes_LT_TAGVAR(compiler_needs_object, $1)=no 5846271947Sdes_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5847271947Sdes_LT_TAGVAR(hardcode_direct, $1)=no 5848271947Sdes_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5849271947Sdes_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5850271947Sdes_LT_TAGVAR(hardcode_libdir_separator, $1)= 5851271947Sdes_LT_TAGVAR(hardcode_minus_L, $1)=no 5852271947Sdes_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5853271947Sdes_LT_TAGVAR(hardcode_automatic, $1)=no 5854271947Sdes_LT_TAGVAR(inherit_rpath, $1)=no 5855271947Sdes_LT_TAGVAR(module_cmds, $1)= 5856271947Sdes_LT_TAGVAR(module_expsym_cmds, $1)= 5857271947Sdes_LT_TAGVAR(link_all_deplibs, $1)=unknown 5858271947Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5859271947Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 5860271947Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5861271947Sdes_LT_TAGVAR(no_undefined_flag, $1)= 5862271947Sdes_LT_TAGVAR(whole_archive_flag_spec, $1)= 5863271947Sdes_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5864271947Sdes 5865271947Sdes# Source file extension for C++ test sources. 5866271947Sdesac_ext=cpp 5867271947Sdes 5868271947Sdes# Object file extension for compiled C++ test sources. 5869271947Sdesobjext=o 5870271947Sdes_LT_TAGVAR(objext, $1)=$objext 5871271947Sdes 5872271947Sdes# No sense in running all these tests if we already determined that 5873271947Sdes# the CXX compiler isn't working. Some variables (like enable_shared) 5874271947Sdes# are currently assumed to apply to all compilers on this platform, 5875271947Sdes# and will be corrupted by setting them based on a non-working compiler. 5876271947Sdesif test "$_lt_caught_CXX_error" != yes; then 5877271947Sdes # Code to be used in simple compile tests 5878271947Sdes lt_simple_compile_test_code="int some_variable = 0;" 5879271947Sdes 5880271947Sdes # Code to be used in simple link tests 5881271947Sdes lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5882271947Sdes 5883271947Sdes # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5884271947Sdes _LT_TAG_COMPILER 5885271947Sdes 5886271947Sdes # save warnings/boilerplate of simple test code 5887271947Sdes _LT_COMPILER_BOILERPLATE 5888271947Sdes _LT_LINKER_BOILERPLATE 5889271947Sdes 5890271947Sdes # Allow CC to be a program name with arguments. 5891271947Sdes lt_save_CC=$CC 5892271947Sdes lt_save_CFLAGS=$CFLAGS 5893271947Sdes lt_save_LD=$LD 5894271947Sdes lt_save_GCC=$GCC 5895271947Sdes GCC=$GXX 5896271947Sdes lt_save_with_gnu_ld=$with_gnu_ld 5897271947Sdes lt_save_path_LD=$lt_cv_path_LD 5898271947Sdes if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5899271947Sdes lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5900271947Sdes else 5901271947Sdes $as_unset lt_cv_prog_gnu_ld 5902271947Sdes fi 5903271947Sdes if test -n "${lt_cv_path_LDCXX+set}"; then 5904271947Sdes lt_cv_path_LD=$lt_cv_path_LDCXX 5905271947Sdes else 5906271947Sdes $as_unset lt_cv_path_LD 5907271947Sdes fi 5908271947Sdes test -z "${LDCXX+set}" || LD=$LDCXX 5909271947Sdes CC=${CXX-"c++"} 5910271947Sdes CFLAGS=$CXXFLAGS 5911271947Sdes compiler=$CC 5912271947Sdes _LT_TAGVAR(compiler, $1)=$CC 5913271947Sdes _LT_CC_BASENAME([$compiler]) 5914271947Sdes 5915271947Sdes if test -n "$compiler"; then 5916271947Sdes # We don't want -fno-exception when compiling C++ code, so set the 5917271947Sdes # no_builtin_flag separately 5918271947Sdes if test "$GXX" = yes; then 5919271947Sdes _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5920271947Sdes else 5921271947Sdes _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5922271947Sdes fi 5923271947Sdes 5924271947Sdes if test "$GXX" = yes; then 5925271947Sdes # Set up default GNU C++ configuration 5926271947Sdes 5927271947Sdes LT_PATH_LD 5928271947Sdes 5929271947Sdes # Check if GNU C++ uses GNU ld as the underlying linker, since the 5930271947Sdes # archiving commands below assume that GNU ld is being used. 5931271947Sdes if test "$with_gnu_ld" = yes; then 5932271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5933271947Sdes _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' 5934271947Sdes 5935271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5936271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5937271947Sdes 5938271947Sdes # If archive_cmds runs LD, not CC, wlarc should be empty 5939271947Sdes # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5940271947Sdes # investigate it a little bit more. (MM) 5941271947Sdes wlarc='${wl}' 5942271947Sdes 5943271947Sdes # ancient GNU ld didn't support --whole-archive et. al. 5944271947Sdes if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5945271947Sdes $GREP 'no-whole-archive' > /dev/null; then 5946271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5947271947Sdes else 5948271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 5949271947Sdes fi 5950271947Sdes else 5951271947Sdes with_gnu_ld=no 5952271947Sdes wlarc= 5953271947Sdes 5954271947Sdes # A generic and very simple default shared library creation 5955271947Sdes # command for GNU C++ for the case where it uses the native 5956271947Sdes # linker, instead of GNU ld. If possible, this setting should 5957271947Sdes # overridden to take advantage of the native linker features on 5958271947Sdes # the platform it is being used on. 5959271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5960271947Sdes fi 5961271947Sdes 5962271947Sdes # Commands to make compiler produce verbose output that lists 5963271947Sdes # what "hidden" libraries, object files and flags are used when 5964271947Sdes # linking a shared library. 5965271947Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5966271947Sdes 5967271947Sdes else 5968271947Sdes GXX=no 5969271947Sdes with_gnu_ld=no 5970271947Sdes wlarc= 5971271947Sdes fi 5972271947Sdes 5973271947Sdes # PORTME: fill in a description of your system's C++ link characteristics 5974271947Sdes AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5975271947Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 5976271947Sdes case $host_os in 5977271947Sdes aix3*) 5978271947Sdes # FIXME: insert proper C++ library support 5979271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5980271947Sdes ;; 5981271947Sdes aix[[4-9]]*) 5982271947Sdes if test "$host_cpu" = ia64; then 5983271947Sdes # On IA64, the linker does run time linking by default, so we don't 5984271947Sdes # have to do anything special. 5985271947Sdes aix_use_runtimelinking=no 5986271947Sdes exp_sym_flag='-Bexport' 5987271947Sdes no_entry_flag="" 5988271947Sdes else 5989271947Sdes aix_use_runtimelinking=no 5990271947Sdes 5991271947Sdes # Test if we are trying to use run time linking or normal 5992271947Sdes # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5993271947Sdes # need to do runtime linking. 5994271947Sdes case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5995271947Sdes for ld_flag in $LDFLAGS; do 5996271947Sdes case $ld_flag in 5997271947Sdes *-brtl*) 5998271947Sdes aix_use_runtimelinking=yes 5999271947Sdes break 6000271947Sdes ;; 6001271947Sdes esac 6002271947Sdes done 6003271947Sdes ;; 6004271947Sdes esac 6005271947Sdes 6006271947Sdes exp_sym_flag='-bexport' 6007271947Sdes no_entry_flag='-bnoentry' 6008271947Sdes fi 6009271947Sdes 6010271947Sdes # When large executables or shared objects are built, AIX ld can 6011271947Sdes # have problems creating the table of contents. If linking a library 6012271947Sdes # or program results in "error TOC overflow" add -mminimal-toc to 6013271947Sdes # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6014271947Sdes # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6015271947Sdes 6016271947Sdes _LT_TAGVAR(archive_cmds, $1)='' 6017271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6018271947Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6019271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6020271947Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6021271947Sdes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6022271947Sdes 6023271947Sdes if test "$GXX" = yes; then 6024271947Sdes case $host_os in aix4.[[012]]|aix4.[[012]].*) 6025271947Sdes # We only want to do this on AIX 4.2 and lower, the check 6026271947Sdes # below for broken collect2 doesn't work under 4.3+ 6027271947Sdes collect2name=`${CC} -print-prog-name=collect2` 6028271947Sdes if test -f "$collect2name" && 6029271947Sdes strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6030271947Sdes then 6031271947Sdes # We have reworked collect2 6032271947Sdes : 6033271947Sdes else 6034271947Sdes # We have old collect2 6035271947Sdes _LT_TAGVAR(hardcode_direct, $1)=unsupported 6036271947Sdes # It fails to find uninstalled libraries when the uninstalled 6037271947Sdes # path is not listed in the libpath. Setting hardcode_minus_L 6038271947Sdes # to unsupported forces relinking 6039271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 6040271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6041271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)= 6042271947Sdes fi 6043271947Sdes esac 6044271947Sdes shared_flag='-shared' 6045271947Sdes if test "$aix_use_runtimelinking" = yes; then 6046271947Sdes shared_flag="$shared_flag "'${wl}-G' 6047271947Sdes fi 6048271947Sdes else 6049271947Sdes # not using gcc 6050271947Sdes if test "$host_cpu" = ia64; then 6051271947Sdes # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6052271947Sdes # chokes on -Wl,-G. The following line is correct: 6053271947Sdes shared_flag='-G' 6054271947Sdes else 6055271947Sdes if test "$aix_use_runtimelinking" = yes; then 6056271947Sdes shared_flag='${wl}-G' 6057271947Sdes else 6058271947Sdes shared_flag='${wl}-bM:SRE' 6059271947Sdes fi 6060271947Sdes fi 6061271947Sdes fi 6062271947Sdes 6063271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6064271947Sdes # It seems that -bexpall does not export symbols beginning with 6065271947Sdes # underscore (_), so it is better to generate a list of symbols to 6066271947Sdes # export. 6067271947Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 6068271947Sdes if test "$aix_use_runtimelinking" = yes; then 6069271947Sdes # Warning - without using the other runtime loading flags (-brtl), 6070271947Sdes # -berok will link without error, but may produce a broken library. 6071271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6072271947Sdes # Determine the default libpath from the value encoded in an empty 6073271947Sdes # executable. 6074271947Sdes _LT_SYS_MODULE_PATH_AIX([$1]) 6075271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6076271947Sdes 6077271947Sdes _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" 6078271947Sdes else 6079271947Sdes if test "$host_cpu" = ia64; then 6080271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6081271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6082271947Sdes _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" 6083271947Sdes else 6084271947Sdes # Determine the default libpath from the value encoded in an 6085271947Sdes # empty executable. 6086271947Sdes _LT_SYS_MODULE_PATH_AIX([$1]) 6087271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6088271947Sdes # Warning - without using the other run time loading flags, 6089271947Sdes # -berok will link without error, but may produce a broken library. 6090271947Sdes _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6091271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6092271947Sdes if test "$with_gnu_ld" = yes; then 6093271947Sdes # We only use this code for GNU lds that support --whole-archive. 6094271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6095271947Sdes else 6096271947Sdes # Exported symbols can be pulled into shared objects from archives 6097271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6098271947Sdes fi 6099271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6100271947Sdes # This is similar to how AIX traditionally builds its shared 6101271947Sdes # libraries. 6102271947Sdes _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' 6103271947Sdes fi 6104271947Sdes fi 6105271947Sdes ;; 6106271947Sdes 6107271947Sdes beos*) 6108271947Sdes if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6109271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6110271947Sdes # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6111271947Sdes # support --undefined. This deserves some investigation. FIXME 6112271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6113271947Sdes else 6114271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6115271947Sdes fi 6116271947Sdes ;; 6117271947Sdes 6118271947Sdes chorus*) 6119271947Sdes case $cc_basename in 6120271947Sdes *) 6121271947Sdes # FIXME: insert proper C++ library support 6122271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6123271947Sdes ;; 6124271947Sdes esac 6125271947Sdes ;; 6126271947Sdes 6127271947Sdes cygwin* | mingw* | pw32* | cegcc*) 6128271947Sdes case $GXX,$cc_basename in 6129271947Sdes ,cl* | no,cl*) 6130271947Sdes # Native MSVC 6131271947Sdes # hardcode_libdir_flag_spec is actually meaningless, as there is 6132271947Sdes # no search path for DLLs. 6133271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6134271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6135271947Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 6136271947Sdes _LT_TAGVAR(file_list_spec, $1)='@' 6137271947Sdes # Tell ltmain to make .lib files, not .a files. 6138271947Sdes libext=lib 6139271947Sdes # Tell ltmain to make .dll files, not .so files. 6140271947Sdes shrext_cmds=".dll" 6141271947Sdes # FIXME: Setting linknames here is a bad hack. 6142271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6143271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6144271947Sdes $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6145271947Sdes else 6146271947Sdes $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6147271947Sdes fi~ 6148271947Sdes $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6149271947Sdes linknames=' 6150271947Sdes # The linker will not automatically build a static lib if we build a DLL. 6151271947Sdes # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6152271947Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6153271947Sdes # Don't use ranlib 6154271947Sdes _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6155271947Sdes _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6156271947Sdes lt_tool_outputfile="@TOOL_OUTPUT@"~ 6157271947Sdes case $lt_outputfile in 6158271947Sdes *.exe|*.EXE) ;; 6159271947Sdes *) 6160271947Sdes lt_outputfile="$lt_outputfile.exe" 6161271947Sdes lt_tool_outputfile="$lt_tool_outputfile.exe" 6162271947Sdes ;; 6163271947Sdes esac~ 6164271947Sdes func_to_tool_file "$lt_outputfile"~ 6165271947Sdes if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6166271947Sdes $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6167271947Sdes $RM "$lt_outputfile.manifest"; 6168271947Sdes fi' 6169271947Sdes ;; 6170271947Sdes *) 6171271947Sdes # g++ 6172271947Sdes # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6173271947Sdes # as there is no search path for DLLs. 6174271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6175271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6176271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6177271947Sdes _LT_TAGVAR(always_export_symbols, $1)=no 6178271947Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6179271947Sdes 6180271947Sdes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6181271947Sdes _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' 6182271947Sdes # If the export-symbols file already is a .def file (1st line 6183271947Sdes # is EXPORTS), use it as is; otherwise, prepend... 6184271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6185271947Sdes cp $export_symbols $output_objdir/$soname.def; 6186271947Sdes else 6187271947Sdes echo EXPORTS > $output_objdir/$soname.def; 6188271947Sdes cat $export_symbols >> $output_objdir/$soname.def; 6189271947Sdes fi~ 6190271947Sdes $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' 6191271947Sdes else 6192271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6193271947Sdes fi 6194271947Sdes ;; 6195271947Sdes esac 6196271947Sdes ;; 6197271947Sdes darwin* | rhapsody*) 6198271947Sdes _LT_DARWIN_LINKER_FEATURES($1) 6199271947Sdes ;; 6200271947Sdes 6201271947Sdes dgux*) 6202271947Sdes case $cc_basename in 6203271947Sdes ec++*) 6204271947Sdes # FIXME: insert proper C++ library support 6205271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6206271947Sdes ;; 6207271947Sdes ghcx*) 6208271947Sdes # Green Hills C++ Compiler 6209271947Sdes # FIXME: insert proper C++ library support 6210271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6211271947Sdes ;; 6212271947Sdes *) 6213271947Sdes # FIXME: insert proper C++ library support 6214271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6215271947Sdes ;; 6216271947Sdes esac 6217271947Sdes ;; 6218271947Sdes 6219271947Sdes freebsd2.*) 6220271947Sdes # C++ shared libraries reported to be fairly broken before 6221271947Sdes # switch to ELF 6222271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6223271947Sdes ;; 6224271947Sdes 6225271947Sdes freebsd-elf*) 6226271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6227271947Sdes ;; 6228271947Sdes 6229271947Sdes freebsd* | dragonfly*) 6230271947Sdes # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6231271947Sdes # conventions 6232271947Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 6233271947Sdes ;; 6234271947Sdes 6235271947Sdes gnu*) 6236271947Sdes ;; 6237271947Sdes 6238271947Sdes haiku*) 6239271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6240271947Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6241271947Sdes ;; 6242271947Sdes 6243271947Sdes hpux9*) 6244271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6245271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6246271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6247271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6248271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6249271947Sdes # but as the default 6250271947Sdes # location of the library. 6251271947Sdes 6252271947Sdes case $cc_basename in 6253271947Sdes CC*) 6254271947Sdes # FIXME: insert proper C++ library support 6255271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6256271947Sdes ;; 6257271947Sdes aCC*) 6258271947Sdes _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' 6259271947Sdes # Commands to make compiler produce verbose output that lists 6260271947Sdes # what "hidden" libraries, object files and flags are used when 6261271947Sdes # linking a shared library. 6262271947Sdes # 6263271947Sdes # There doesn't appear to be a way to prevent this compiler from 6264271947Sdes # explicitly linking system object files so we need to strip them 6265271947Sdes # from the output so that they don't get included in the library 6266271947Sdes # dependencies. 6267271947Sdes 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"' 6268271947Sdes ;; 6269271947Sdes *) 6270271947Sdes if test "$GXX" = yes; then 6271271947Sdes _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' 6272271947Sdes else 6273271947Sdes # FIXME: insert proper C++ library support 6274271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6275271947Sdes fi 6276271947Sdes ;; 6277271947Sdes esac 6278271947Sdes ;; 6279271947Sdes 6280271947Sdes hpux10*|hpux11*) 6281271947Sdes if test $with_gnu_ld = no; then 6282271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6283271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6284271947Sdes 6285271947Sdes case $host_cpu in 6286271947Sdes hppa*64*|ia64*) 6287271947Sdes ;; 6288271947Sdes *) 6289271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6290271947Sdes ;; 6291271947Sdes esac 6292271947Sdes fi 6293271947Sdes case $host_cpu in 6294271947Sdes hppa*64*|ia64*) 6295271947Sdes _LT_TAGVAR(hardcode_direct, $1)=no 6296271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6297271947Sdes ;; 6298271947Sdes *) 6299271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6300271947Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6301271947Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6302271947Sdes # but as the default 6303271947Sdes # location of the library. 6304271947Sdes ;; 6305271947Sdes esac 6306271947Sdes 6307271947Sdes case $cc_basename in 6308271947Sdes CC*) 6309271947Sdes # FIXME: insert proper C++ library support 6310271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6311271947Sdes ;; 6312271947Sdes aCC*) 6313271947Sdes case $host_cpu in 6314271947Sdes hppa*64*) 6315271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6316271947Sdes ;; 6317271947Sdes ia64*) 6318271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6319271947Sdes ;; 6320271947Sdes *) 6321271947Sdes _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' 6322271947Sdes ;; 6323271947Sdes esac 6324271947Sdes # Commands to make compiler produce verbose output that lists 6325271947Sdes # what "hidden" libraries, object files and flags are used when 6326271947Sdes # linking a shared library. 6327271947Sdes # 6328271947Sdes # There doesn't appear to be a way to prevent this compiler from 6329271947Sdes # explicitly linking system object files so we need to strip them 6330271947Sdes # from the output so that they don't get included in the library 6331271947Sdes # dependencies. 6332271947Sdes 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"' 6333271947Sdes ;; 6334271947Sdes *) 6335271947Sdes if test "$GXX" = yes; then 6336271947Sdes if test $with_gnu_ld = no; then 6337271947Sdes case $host_cpu in 6338271947Sdes hppa*64*) 6339271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6340271947Sdes ;; 6341271947Sdes ia64*) 6342271947Sdes _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' 6343271947Sdes ;; 6344271947Sdes *) 6345271947Sdes _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' 6346271947Sdes ;; 6347271947Sdes esac 6348271947Sdes fi 6349271947Sdes else 6350271947Sdes # FIXME: insert proper C++ library support 6351271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6352271947Sdes fi 6353271947Sdes ;; 6354271947Sdes esac 6355271947Sdes ;; 6356271947Sdes 6357271947Sdes interix[[3-9]]*) 6358271947Sdes _LT_TAGVAR(hardcode_direct, $1)=no 6359271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6360271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6361271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6362271947Sdes # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6363271947Sdes # Instead, shared libraries are loaded at an image base (0x10000000 by 6364271947Sdes # default) and relocated if they conflict, which is a slow very memory 6365271947Sdes # consuming and fragmenting process. To avoid this, we pick a random, 6366271947Sdes # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6367271947Sdes # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6368271947Sdes _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' 6369271947Sdes _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' 6370271947Sdes ;; 6371271947Sdes irix5* | irix6*) 6372271947Sdes case $cc_basename in 6373271947Sdes CC*) 6374271947Sdes # SGI C++ 6375271947Sdes _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' 6376271947Sdes 6377271947Sdes # Archives containing C++ object files must be created using 6378271947Sdes # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6379271947Sdes # necessary to make sure instantiated templates are included 6380271947Sdes # in the archive. 6381271947Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6382271947Sdes ;; 6383271947Sdes *) 6384271947Sdes if test "$GXX" = yes; then 6385271947Sdes if test "$with_gnu_ld" = no; then 6386271947Sdes _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' 6387271947Sdes else 6388271947Sdes _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' 6389271947Sdes fi 6390271947Sdes fi 6391271947Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6392271947Sdes ;; 6393271947Sdes esac 6394271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6395271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6396271947Sdes _LT_TAGVAR(inherit_rpath, $1)=yes 6397271947Sdes ;; 6398271947Sdes 6399271947Sdes linux* | k*bsd*-gnu | kopensolaris*-gnu) 6400271947Sdes case $cc_basename in 6401271947Sdes KCC*) 6402271947Sdes # Kuck and Associates, Inc. (KAI) C++ Compiler 6403271947Sdes 6404271947Sdes # KCC will only create a shared library if the output file 6405271947Sdes # ends with ".so" (or ".sl" for HP-UX), so rename the library 6406271947Sdes # to its proper name (with version) after linking. 6407271947Sdes _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' 6408271947Sdes _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' 6409271947Sdes # Commands to make compiler produce verbose output that lists 6410271947Sdes # what "hidden" libraries, object files and flags are used when 6411271947Sdes # linking a shared library. 6412271947Sdes # 6413271947Sdes # There doesn't appear to be a way to prevent this compiler from 6414271947Sdes # explicitly linking system object files so we need to strip them 6415271947Sdes # from the output so that they don't get included in the library 6416271947Sdes # dependencies. 6417271947Sdes 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"' 6418271947Sdes 6419271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6420271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6421271947Sdes 6422271947Sdes # Archives containing C++ object files must be created using 6423271947Sdes # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6424271947Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6425271947Sdes ;; 6426271947Sdes icpc* | ecpc* ) 6427271947Sdes # Intel C++ 6428271947Sdes with_gnu_ld=yes 6429271947Sdes # version 8.0 and above of icpc choke on multiply defined symbols 6430271947Sdes # if we add $predep_objects and $postdep_objects, however 7.1 and 6431271947Sdes # earlier do not add the objects themselves. 6432271947Sdes case `$CC -V 2>&1` in 6433271947Sdes *"Version 7."*) 6434271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6435271947Sdes _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' 6436271947Sdes ;; 6437271947Sdes *) # Version 8.0 or newer 6438271947Sdes tmp_idyn= 6439271947Sdes case $host_cpu in 6440271947Sdes ia64*) tmp_idyn=' -i_dynamic';; 6441271947Sdes esac 6442271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6443271947Sdes _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' 6444271947Sdes ;; 6445271947Sdes esac 6446271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6447271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6448271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6449271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6450271947Sdes ;; 6451271947Sdes pgCC* | pgcpp*) 6452271947Sdes # Portland Group C++ compiler 6453271947Sdes case `$CC -V` in 6454271947Sdes *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6455271947Sdes _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6456271947Sdes rm -rf $tpldir~ 6457271947Sdes $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6458271947Sdes compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6459271947Sdes _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6460271947Sdes rm -rf $tpldir~ 6461271947Sdes $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6462271947Sdes $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6463271947Sdes $RANLIB $oldlib' 6464271947Sdes _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6465271947Sdes rm -rf $tpldir~ 6466271947Sdes $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6467271947Sdes $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6468271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6469271947Sdes rm -rf $tpldir~ 6470271947Sdes $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6471271947Sdes $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' 6472271947Sdes ;; 6473271947Sdes *) # Version 6 and above use weak symbols 6474271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6475271947Sdes _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' 6476271947Sdes ;; 6477271947Sdes esac 6478271947Sdes 6479271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6480271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6481271947Sdes _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' 6482271947Sdes ;; 6483271947Sdes cxx*) 6484271947Sdes # Compaq C++ 6485271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6486271947Sdes _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' 6487271947Sdes 6488271947Sdes runpath_var=LD_RUN_PATH 6489271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6490271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6491271947Sdes 6492271947Sdes # Commands to make compiler produce verbose output that lists 6493271947Sdes # what "hidden" libraries, object files and flags are used when 6494271947Sdes # linking a shared library. 6495271947Sdes # 6496271947Sdes # There doesn't appear to be a way to prevent this compiler from 6497271947Sdes # explicitly linking system object files so we need to strip them 6498271947Sdes # from the output so that they don't get included in the library 6499271947Sdes # dependencies. 6500271947Sdes 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' 6501271947Sdes ;; 6502271947Sdes xl* | mpixl* | bgxl*) 6503271947Sdes # IBM XL 8.0 on PPC, with GNU ld 6504271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6505271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6506271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6507271947Sdes if test "x$supports_anon_versioning" = xyes; then 6508271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6509271947Sdes cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6510271947Sdes echo "local: *; };" >> $output_objdir/$libname.ver~ 6511271947Sdes $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6512271947Sdes fi 6513271947Sdes ;; 6514271947Sdes *) 6515271947Sdes case `$CC -V 2>&1 | sed 5q` in 6516271947Sdes *Sun\ C*) 6517271947Sdes # Sun C++ 5.9 6518271947Sdes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6519271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6520271947Sdes _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' 6521271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6522271947Sdes _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' 6523271947Sdes _LT_TAGVAR(compiler_needs_object, $1)=yes 6524271947Sdes 6525271947Sdes # Not sure whether something based on 6526271947Sdes # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6527271947Sdes # would be better. 6528271947Sdes output_verbose_link_cmd='func_echo_all' 6529271947Sdes 6530271947Sdes # Archives containing C++ object files must be created using 6531271947Sdes # "CC -xar", where "CC" is the Sun C++ compiler. This is 6532271947Sdes # necessary to make sure instantiated templates are included 6533271947Sdes # in the archive. 6534271947Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6535271947Sdes ;; 6536271947Sdes esac 6537271947Sdes ;; 6538271947Sdes esac 6539271947Sdes ;; 6540271947Sdes 6541271947Sdes lynxos*) 6542271947Sdes # FIXME: insert proper C++ library support 6543271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6544271947Sdes ;; 6545271947Sdes 6546271947Sdes m88k*) 6547271947Sdes # FIXME: insert proper C++ library support 6548271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6549271947Sdes ;; 6550271947Sdes 6551271947Sdes mvs*) 6552271947Sdes case $cc_basename in 6553271947Sdes cxx*) 6554271947Sdes # FIXME: insert proper C++ library support 6555271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6556271947Sdes ;; 6557271947Sdes *) 6558271947Sdes # FIXME: insert proper C++ library support 6559271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6560271947Sdes ;; 6561271947Sdes esac 6562271947Sdes ;; 6563271947Sdes 6564271947Sdes netbsd*) 6565271947Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6566271947Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6567271947Sdes wlarc= 6568271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6569271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6570271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6571271947Sdes fi 6572271947Sdes # Workaround some broken pre-1.5 toolchains 6573271947Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6574271947Sdes ;; 6575271947Sdes 6576271947Sdes *nto* | *qnx*) 6577271947Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 6578271947Sdes ;; 6579271947Sdes 6580271947Sdes openbsd2*) 6581271947Sdes # C++ shared libraries are fairly broken 6582271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6583271947Sdes ;; 6584271947Sdes 6585271947Sdes openbsd*) 6586271947Sdes if test -f /usr/libexec/ld.so; then 6587271947Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6588271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6589271947Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6590271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6591271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6592271947Sdes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6593271947Sdes _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' 6594271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6595271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6596271947Sdes fi 6597271947Sdes output_verbose_link_cmd=func_echo_all 6598271947Sdes else 6599271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6600271947Sdes fi 6601271947Sdes ;; 6602271947Sdes 6603271947Sdes osf3* | osf4* | osf5*) 6604271947Sdes case $cc_basename in 6605271947Sdes KCC*) 6606271947Sdes # Kuck and Associates, Inc. (KAI) C++ Compiler 6607271947Sdes 6608271947Sdes # KCC will only create a shared library if the output file 6609271947Sdes # ends with ".so" (or ".sl" for HP-UX), so rename the library 6610271947Sdes # to its proper name (with version) after linking. 6611271947Sdes _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' 6612271947Sdes 6613271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6614271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6615271947Sdes 6616271947Sdes # Archives containing C++ object files must be created using 6617271947Sdes # the KAI C++ compiler. 6618271947Sdes case $host in 6619271947Sdes osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6620271947Sdes *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6621271947Sdes esac 6622271947Sdes ;; 6623271947Sdes RCC*) 6624271947Sdes # Rational C++ 2.4.1 6625271947Sdes # FIXME: insert proper C++ library support 6626271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6627271947Sdes ;; 6628271947Sdes cxx*) 6629271947Sdes case $host in 6630271947Sdes osf3*) 6631271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6632271947Sdes _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' 6633271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6634271947Sdes ;; 6635271947Sdes *) 6636271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6637271947Sdes _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' 6638271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6639271947Sdes echo "-hidden">> $lib.exp~ 6640271947Sdes $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~ 6641271947Sdes $RM $lib.exp' 6642271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6643271947Sdes ;; 6644271947Sdes esac 6645271947Sdes 6646271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6647271947Sdes 6648271947Sdes # Commands to make compiler produce verbose output that lists 6649271947Sdes # what "hidden" libraries, object files and flags are used when 6650271947Sdes # linking a shared library. 6651271947Sdes # 6652271947Sdes # There doesn't appear to be a way to prevent this compiler from 6653271947Sdes # explicitly linking system object files so we need to strip them 6654271947Sdes # from the output so that they don't get included in the library 6655271947Sdes # dependencies. 6656271947Sdes 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"' 6657271947Sdes ;; 6658271947Sdes *) 6659271947Sdes if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6660271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6661271947Sdes case $host in 6662271947Sdes osf3*) 6663271947Sdes _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' 6664271947Sdes ;; 6665271947Sdes *) 6666271947Sdes _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' 6667271947Sdes ;; 6668271947Sdes esac 6669271947Sdes 6670271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6671271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6672271947Sdes 6673271947Sdes # Commands to make compiler produce verbose output that lists 6674271947Sdes # what "hidden" libraries, object files and flags are used when 6675271947Sdes # linking a shared library. 6676271947Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6677271947Sdes 6678271947Sdes else 6679271947Sdes # FIXME: insert proper C++ library support 6680271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6681271947Sdes fi 6682271947Sdes ;; 6683271947Sdes esac 6684271947Sdes ;; 6685271947Sdes 6686271947Sdes psos*) 6687271947Sdes # FIXME: insert proper C++ library support 6688271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6689271947Sdes ;; 6690271947Sdes 6691271947Sdes sunos4*) 6692271947Sdes case $cc_basename in 6693271947Sdes CC*) 6694271947Sdes # Sun C++ 4.x 6695271947Sdes # FIXME: insert proper C++ library support 6696271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6697271947Sdes ;; 6698271947Sdes lcc*) 6699271947Sdes # Lucid 6700271947Sdes # FIXME: insert proper C++ library support 6701271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6702271947Sdes ;; 6703271947Sdes *) 6704271947Sdes # FIXME: insert proper C++ library support 6705271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6706271947Sdes ;; 6707271947Sdes esac 6708271947Sdes ;; 6709271947Sdes 6710271947Sdes solaris*) 6711271947Sdes case $cc_basename in 6712271947Sdes CC* | sunCC*) 6713271947Sdes # Sun C++ 4.2, 5.x and Centerline C++ 6714271947Sdes _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6715271947Sdes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6716271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6717271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6718271947Sdes $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' 6719271947Sdes 6720271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6721271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6722271947Sdes case $host_os in 6723271947Sdes solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6724271947Sdes *) 6725271947Sdes # The compiler driver will combine and reorder linker options, 6726271947Sdes # but understands `-z linker_flag'. 6727271947Sdes # Supported since Solaris 2.6 (maybe 2.5.1?) 6728271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6729271947Sdes ;; 6730271947Sdes esac 6731271947Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6732271947Sdes 6733271947Sdes output_verbose_link_cmd='func_echo_all' 6734271947Sdes 6735271947Sdes # Archives containing C++ object files must be created using 6736271947Sdes # "CC -xar", where "CC" is the Sun C++ compiler. This is 6737271947Sdes # necessary to make sure instantiated templates are included 6738271947Sdes # in the archive. 6739271947Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6740271947Sdes ;; 6741271947Sdes gcx*) 6742271947Sdes # Green Hills C++ Compiler 6743271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6744271947Sdes 6745271947Sdes # The C++ compiler must be used to create the archive. 6746271947Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6747271947Sdes ;; 6748271947Sdes *) 6749271947Sdes # GNU C++ compiler with Solaris linker 6750271947Sdes if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6751271947Sdes _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6752271947Sdes if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6753271947Sdes _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' 6754271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6755271947Sdes $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6756271947Sdes 6757271947Sdes # Commands to make compiler produce verbose output that lists 6758271947Sdes # what "hidden" libraries, object files and flags are used when 6759271947Sdes # linking a shared library. 6760271947Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6761271947Sdes else 6762271947Sdes # g++ 2.7 appears to require `-G' NOT `-shared' on this 6763271947Sdes # platform. 6764271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6765271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6766271947Sdes $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6767271947Sdes 6768271947Sdes # Commands to make compiler produce verbose output that lists 6769271947Sdes # what "hidden" libraries, object files and flags are used when 6770271947Sdes # linking a shared library. 6771271947Sdes output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6772271947Sdes fi 6773271947Sdes 6774271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6775271947Sdes case $host_os in 6776271947Sdes solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6777271947Sdes *) 6778271947Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6779271947Sdes ;; 6780271947Sdes esac 6781271947Sdes fi 6782271947Sdes ;; 6783271947Sdes esac 6784271947Sdes ;; 6785271947Sdes 6786271947Sdes sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6787271947Sdes _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6788271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6789271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6790271947Sdes runpath_var='LD_RUN_PATH' 6791271947Sdes 6792271947Sdes case $cc_basename in 6793271947Sdes CC*) 6794271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6795271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6796271947Sdes ;; 6797271947Sdes *) 6798271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6799271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6800271947Sdes ;; 6801271947Sdes esac 6802271947Sdes ;; 6803271947Sdes 6804271947Sdes sysv5* | sco3.2v5* | sco5v6*) 6805271947Sdes # Note: We can NOT use -z defs as we might desire, because we do not 6806271947Sdes # link with -lc, and that would cause any symbols used from libc to 6807271947Sdes # always be unresolved, which means just about no library would 6808271947Sdes # ever link correctly. If we're not using GNU ld we use -z text 6809271947Sdes # though, which does catch some bad symbols but isn't as heavy-handed 6810271947Sdes # as -z defs. 6811271947Sdes _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6812271947Sdes _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6813271947Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6814271947Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6815271947Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6816271947Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6817271947Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6818271947Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6819271947Sdes runpath_var='LD_RUN_PATH' 6820271947Sdes 6821271947Sdes case $cc_basename in 6822271947Sdes CC*) 6823271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6824271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6825271947Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6826271947Sdes '"$_LT_TAGVAR(old_archive_cmds, $1)" 6827271947Sdes _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6828271947Sdes '"$_LT_TAGVAR(reload_cmds, $1)" 6829271947Sdes ;; 6830271947Sdes *) 6831271947Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6832271947Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6833271947Sdes ;; 6834271947Sdes esac 6835271947Sdes ;; 6836271947Sdes 6837271947Sdes tandem*) 6838271947Sdes case $cc_basename in 6839271947Sdes NCC*) 6840271947Sdes # NonStop-UX NCC 3.20 6841271947Sdes # FIXME: insert proper C++ library support 6842271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6843271947Sdes ;; 6844271947Sdes *) 6845271947Sdes # FIXME: insert proper C++ library support 6846271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6847271947Sdes ;; 6848271947Sdes esac 6849271947Sdes ;; 6850271947Sdes 6851271947Sdes vxworks*) 6852271947Sdes # FIXME: insert proper C++ library support 6853271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6854271947Sdes ;; 6855271947Sdes 6856271947Sdes *) 6857271947Sdes # FIXME: insert proper C++ library support 6858271947Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6859271947Sdes ;; 6860271947Sdes esac 6861271947Sdes 6862271947Sdes AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6863271947Sdes test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6864271947Sdes 6865271947Sdes _LT_TAGVAR(GCC, $1)="$GXX" 6866271947Sdes _LT_TAGVAR(LD, $1)="$LD" 6867271947Sdes 6868271947Sdes ## CAVEAT EMPTOR: 6869271947Sdes ## There is no encapsulation within the following macros, do not change 6870271947Sdes ## the running order or otherwise move them around unless you know exactly 6871271947Sdes ## what you are doing... 6872271947Sdes _LT_SYS_HIDDEN_LIBDEPS($1) 6873271947Sdes _LT_COMPILER_PIC($1) 6874271947Sdes _LT_COMPILER_C_O($1) 6875271947Sdes _LT_COMPILER_FILE_LOCKS($1) 6876271947Sdes _LT_LINKER_SHLIBS($1) 6877271947Sdes _LT_SYS_DYNAMIC_LINKER($1) 6878271947Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 6879271947Sdes 6880271947Sdes _LT_CONFIG($1) 6881271947Sdes fi # test -n "$compiler" 6882271947Sdes 6883271947Sdes CC=$lt_save_CC 6884271947Sdes CFLAGS=$lt_save_CFLAGS 6885271947Sdes LDCXX=$LD 6886271947Sdes LD=$lt_save_LD 6887271947Sdes GCC=$lt_save_GCC 6888271947Sdes with_gnu_ld=$lt_save_with_gnu_ld 6889271947Sdes lt_cv_path_LDCXX=$lt_cv_path_LD 6890271947Sdes lt_cv_path_LD=$lt_save_path_LD 6891271947Sdes lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6892271947Sdes lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6893271947Sdesfi # test "$_lt_caught_CXX_error" != yes 6894271947Sdes 6895271947SdesAC_LANG_POP 6896271947Sdes])# _LT_LANG_CXX_CONFIG 6897271947Sdes 6898271947Sdes 6899271947Sdes# _LT_FUNC_STRIPNAME_CNF 6900271947Sdes# ---------------------- 6901271947Sdes# func_stripname_cnf prefix suffix name 6902271947Sdes# strip PREFIX and SUFFIX off of NAME. 6903271947Sdes# PREFIX and SUFFIX must not contain globbing or regex special 6904271947Sdes# characters, hashes, percent signs, but SUFFIX may contain a leading 6905271947Sdes# dot (in which case that matches only a dot). 6906271947Sdes# 6907271947Sdes# This function is identical to the (non-XSI) version of func_stripname, 6908271947Sdes# except this one can be used by m4 code that may be executed by configure, 6909271947Sdes# rather than the libtool script. 6910271947Sdesm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6911271947SdesAC_REQUIRE([_LT_DECL_SED]) 6912271947SdesAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6913271947Sdesfunc_stripname_cnf () 6914271947Sdes{ 6915271947Sdes case ${2} in 6916271947Sdes .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6917271947Sdes *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6918271947Sdes esac 6919271947Sdes} # func_stripname_cnf 6920271947Sdes])# _LT_FUNC_STRIPNAME_CNF 6921271947Sdes 6922271947Sdes# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6923271947Sdes# --------------------------------- 6924271947Sdes# Figure out "hidden" library dependencies from verbose 6925271947Sdes# compiler output when linking a shared library. 6926271947Sdes# Parse the compiler output and extract the necessary 6927271947Sdes# objects, libraries and library flags. 6928271947Sdesm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6929271947Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6930271947SdesAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6931271947Sdes# Dependencies to place before and after the object being linked: 6932271947Sdes_LT_TAGVAR(predep_objects, $1)= 6933271947Sdes_LT_TAGVAR(postdep_objects, $1)= 6934271947Sdes_LT_TAGVAR(predeps, $1)= 6935271947Sdes_LT_TAGVAR(postdeps, $1)= 6936271947Sdes_LT_TAGVAR(compiler_lib_search_path, $1)= 6937271947Sdes 6938271947Sdesdnl we can't use the lt_simple_compile_test_code here, 6939271947Sdesdnl because it contains code intended for an executable, 6940271947Sdesdnl not a library. It's possible we should let each 6941271947Sdesdnl tag define a new lt_????_link_test_code variable, 6942271947Sdesdnl but it's only used here... 6943271947Sdesm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6944271947Sdesint a; 6945271947Sdesvoid foo (void) { a = 0; } 6946271947Sdes_LT_EOF 6947271947Sdes], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6948271947Sdesclass Foo 6949271947Sdes{ 6950271947Sdespublic: 6951271947Sdes Foo (void) { a = 0; } 6952271947Sdesprivate: 6953271947Sdes int a; 6954271947Sdes}; 6955271947Sdes_LT_EOF 6956271947Sdes], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6957271947Sdes subroutine foo 6958271947Sdes implicit none 6959271947Sdes integer*4 a 6960271947Sdes a=0 6961271947Sdes return 6962271947Sdes end 6963271947Sdes_LT_EOF 6964271947Sdes], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6965271947Sdes subroutine foo 6966271947Sdes implicit none 6967271947Sdes integer a 6968271947Sdes a=0 6969271947Sdes return 6970271947Sdes end 6971271947Sdes_LT_EOF 6972271947Sdes], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6973271947Sdespublic class foo { 6974271947Sdes private int a; 6975271947Sdes public void bar (void) { 6976271947Sdes a = 0; 6977271947Sdes } 6978271947Sdes}; 6979271947Sdes_LT_EOF 6980271947Sdes], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6981271947Sdespackage foo 6982271947Sdesfunc foo() { 6983271947Sdes} 6984271947Sdes_LT_EOF 6985271947Sdes]) 6986271947Sdes 6987271947Sdes_lt_libdeps_save_CFLAGS=$CFLAGS 6988271947Sdescase "$CC $CFLAGS " in #( 6989271947Sdes*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6990271947Sdes*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6991271947Sdes*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 6992271947Sdesesac 6993271947Sdes 6994271947Sdesdnl Parse the compiler output and extract the necessary 6995271947Sdesdnl objects, libraries and library flags. 6996271947Sdesif AC_TRY_EVAL(ac_compile); then 6997271947Sdes # Parse the compiler output and extract the necessary 6998271947Sdes # objects, libraries and library flags. 6999271947Sdes 7000271947Sdes # Sentinel used to keep track of whether or not we are before 7001271947Sdes # the conftest object file. 7002271947Sdes pre_test_object_deps_done=no 7003271947Sdes 7004271947Sdes for p in `eval "$output_verbose_link_cmd"`; do 7005271947Sdes case ${prev}${p} in 7006271947Sdes 7007271947Sdes -L* | -R* | -l*) 7008271947Sdes # Some compilers place space between "-{L,R}" and the path. 7009271947Sdes # Remove the space. 7010271947Sdes if test $p = "-L" || 7011271947Sdes test $p = "-R"; then 7012271947Sdes prev=$p 7013271947Sdes continue 7014271947Sdes fi 7015271947Sdes 7016271947Sdes # Expand the sysroot to ease extracting the directories later. 7017271947Sdes if test -z "$prev"; then 7018271947Sdes case $p in 7019271947Sdes -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7020271947Sdes -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7021271947Sdes -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7022271947Sdes esac 7023271947Sdes fi 7024271947Sdes case $p in 7025271947Sdes =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7026271947Sdes esac 7027271947Sdes if test "$pre_test_object_deps_done" = no; then 7028271947Sdes case ${prev} in 7029271947Sdes -L | -R) 7030271947Sdes # Internal compiler library paths should come after those 7031271947Sdes # provided the user. The postdeps already come after the 7032271947Sdes # user supplied libs so there is no need to process them. 7033271947Sdes if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7034271947Sdes _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 7035271947Sdes else 7036271947Sdes _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 7037271947Sdes fi 7038271947Sdes ;; 7039271947Sdes # The "-l" case would never come before the object being 7040271947Sdes # linked, so don't bother handling this case. 7041271947Sdes esac 7042271947Sdes else 7043271947Sdes if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7044271947Sdes _LT_TAGVAR(postdeps, $1)="${prev}${p}" 7045271947Sdes else 7046271947Sdes _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 7047271947Sdes fi 7048271947Sdes fi 7049271947Sdes prev= 7050271947Sdes ;; 7051271947Sdes 7052271947Sdes *.lto.$objext) ;; # Ignore GCC LTO objects 7053271947Sdes *.$objext) 7054271947Sdes # This assumes that the test object file only shows up 7055271947Sdes # once in the compiler output. 7056271947Sdes if test "$p" = "conftest.$objext"; then 7057271947Sdes pre_test_object_deps_done=yes 7058271947Sdes continue 7059271947Sdes fi 7060271947Sdes 7061271947Sdes if test "$pre_test_object_deps_done" = no; then 7062271947Sdes if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7063271947Sdes _LT_TAGVAR(predep_objects, $1)="$p" 7064271947Sdes else 7065271947Sdes _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7066271947Sdes fi 7067271947Sdes else 7068271947Sdes if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7069271947Sdes _LT_TAGVAR(postdep_objects, $1)="$p" 7070271947Sdes else 7071271947Sdes _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7072271947Sdes fi 7073271947Sdes fi 7074271947Sdes ;; 7075271947Sdes 7076271947Sdes *) ;; # Ignore the rest. 7077271947Sdes 7078271947Sdes esac 7079271947Sdes done 7080271947Sdes 7081271947Sdes # Clean up. 7082271947Sdes rm -f a.out a.exe 7083271947Sdeselse 7084271947Sdes echo "libtool.m4: error: problem compiling $1 test program" 7085271947Sdesfi 7086271947Sdes 7087271947Sdes$RM -f confest.$objext 7088271947SdesCFLAGS=$_lt_libdeps_save_CFLAGS 7089271947Sdes 7090271947Sdes# PORTME: override above test on systems where it is broken 7091271947Sdesm4_if([$1], [CXX], 7092271947Sdes[case $host_os in 7093271947Sdesinterix[[3-9]]*) 7094271947Sdes # Interix 3.5 installs completely hosed .la files for C++, so rather than 7095271947Sdes # hack all around it, let's just trust "g++" to DTRT. 7096271947Sdes _LT_TAGVAR(predep_objects,$1)= 7097271947Sdes _LT_TAGVAR(postdep_objects,$1)= 7098271947Sdes _LT_TAGVAR(postdeps,$1)= 7099271947Sdes ;; 7100271947Sdes 7101271947Sdeslinux*) 7102271947Sdes case `$CC -V 2>&1 | sed 5q` in 7103271947Sdes *Sun\ C*) 7104271947Sdes # Sun C++ 5.9 7105271947Sdes 7106271947Sdes # The more standards-conforming stlport4 library is 7107271947Sdes # incompatible with the Cstd library. Avoid specifying 7108271947Sdes # it if it's in CXXFLAGS. Ignore libCrun as 7109271947Sdes # -library=stlport4 depends on it. 7110271947Sdes case " $CXX $CXXFLAGS " in 7111271947Sdes *" -library=stlport4 "*) 7112271947Sdes solaris_use_stlport4=yes 7113271947Sdes ;; 7114271947Sdes esac 7115271947Sdes 7116271947Sdes if test "$solaris_use_stlport4" != yes; then 7117271947Sdes _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7118271947Sdes fi 7119271947Sdes ;; 7120271947Sdes esac 7121271947Sdes ;; 7122271947Sdes 7123271947Sdessolaris*) 7124271947Sdes case $cc_basename in 7125271947Sdes CC* | sunCC*) 7126271947Sdes # The more standards-conforming stlport4 library is 7127271947Sdes # incompatible with the Cstd library. Avoid specifying 7128271947Sdes # it if it's in CXXFLAGS. Ignore libCrun as 7129271947Sdes # -library=stlport4 depends on it. 7130271947Sdes case " $CXX $CXXFLAGS " in 7131271947Sdes *" -library=stlport4 "*) 7132271947Sdes solaris_use_stlport4=yes 7133271947Sdes ;; 7134271947Sdes esac 7135271947Sdes 7136271947Sdes # Adding this requires a known-good setup of shared libraries for 7137271947Sdes # Sun compiler versions before 5.6, else PIC objects from an old 7138271947Sdes # archive will be linked into the output, leading to subtle bugs. 7139271947Sdes if test "$solaris_use_stlport4" != yes; then 7140271947Sdes _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7141271947Sdes fi 7142271947Sdes ;; 7143271947Sdes esac 7144271947Sdes ;; 7145271947Sdesesac 7146271947Sdes]) 7147271947Sdes 7148271947Sdescase " $_LT_TAGVAR(postdeps, $1) " in 7149271947Sdes*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7150271947Sdesesac 7151271947Sdes _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7152271947Sdesif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7153271947Sdes _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7154271947Sdesfi 7155271947Sdes_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7156271947Sdes [The directories searched by this compiler when creating a shared library]) 7157271947Sdes_LT_TAGDECL([], [predep_objects], [1], 7158271947Sdes [Dependencies to place before and after the objects being linked to 7159271947Sdes create a shared library]) 7160271947Sdes_LT_TAGDECL([], [postdep_objects], [1]) 7161271947Sdes_LT_TAGDECL([], [predeps], [1]) 7162271947Sdes_LT_TAGDECL([], [postdeps], [1]) 7163271947Sdes_LT_TAGDECL([], [compiler_lib_search_path], [1], 7164271947Sdes [The library search path used internally by the compiler when linking 7165271947Sdes a shared library]) 7166271947Sdes])# _LT_SYS_HIDDEN_LIBDEPS 7167271947Sdes 7168271947Sdes 7169271947Sdes# _LT_LANG_F77_CONFIG([TAG]) 7170271947Sdes# -------------------------- 7171271947Sdes# Ensure that the configuration variables for a Fortran 77 compiler are 7172271947Sdes# suitably defined. These variables are subsequently used by _LT_CONFIG 7173271947Sdes# to write the compiler configuration to `libtool'. 7174271947Sdesm4_defun([_LT_LANG_F77_CONFIG], 7175271947Sdes[AC_LANG_PUSH(Fortran 77) 7176271947Sdesif test -z "$F77" || test "X$F77" = "Xno"; then 7177271947Sdes _lt_disable_F77=yes 7178271947Sdesfi 7179271947Sdes 7180271947Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7181271947Sdes_LT_TAGVAR(allow_undefined_flag, $1)= 7182271947Sdes_LT_TAGVAR(always_export_symbols, $1)=no 7183271947Sdes_LT_TAGVAR(archive_expsym_cmds, $1)= 7184271947Sdes_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7185271947Sdes_LT_TAGVAR(hardcode_direct, $1)=no 7186271947Sdes_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7187271947Sdes_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7188271947Sdes_LT_TAGVAR(hardcode_libdir_separator, $1)= 7189271947Sdes_LT_TAGVAR(hardcode_minus_L, $1)=no 7190271947Sdes_LT_TAGVAR(hardcode_automatic, $1)=no 7191271947Sdes_LT_TAGVAR(inherit_rpath, $1)=no 7192271947Sdes_LT_TAGVAR(module_cmds, $1)= 7193271947Sdes_LT_TAGVAR(module_expsym_cmds, $1)= 7194271947Sdes_LT_TAGVAR(link_all_deplibs, $1)=unknown 7195271947Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7196271947Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 7197271947Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7198271947Sdes_LT_TAGVAR(no_undefined_flag, $1)= 7199271947Sdes_LT_TAGVAR(whole_archive_flag_spec, $1)= 7200271947Sdes_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7201271947Sdes 7202271947Sdes# Source file extension for f77 test sources. 7203271947Sdesac_ext=f 7204271947Sdes 7205271947Sdes# Object file extension for compiled f77 test sources. 7206271947Sdesobjext=o 7207271947Sdes_LT_TAGVAR(objext, $1)=$objext 7208271947Sdes 7209271947Sdes# No sense in running all these tests if we already determined that 7210271947Sdes# the F77 compiler isn't working. Some variables (like enable_shared) 7211271947Sdes# are currently assumed to apply to all compilers on this platform, 7212271947Sdes# and will be corrupted by setting them based on a non-working compiler. 7213271947Sdesif test "$_lt_disable_F77" != yes; then 7214271947Sdes # Code to be used in simple compile tests 7215271947Sdes lt_simple_compile_test_code="\ 7216271947Sdes subroutine t 7217271947Sdes return 7218271947Sdes end 7219271947Sdes" 7220271947Sdes 7221271947Sdes # Code to be used in simple link tests 7222271947Sdes lt_simple_link_test_code="\ 7223271947Sdes program t 7224271947Sdes end 7225271947Sdes" 7226271947Sdes 7227271947Sdes # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7228271947Sdes _LT_TAG_COMPILER 7229271947Sdes 7230271947Sdes # save warnings/boilerplate of simple test code 7231271947Sdes _LT_COMPILER_BOILERPLATE 7232271947Sdes _LT_LINKER_BOILERPLATE 7233271947Sdes 7234271947Sdes # Allow CC to be a program name with arguments. 7235271947Sdes lt_save_CC="$CC" 7236271947Sdes lt_save_GCC=$GCC 7237271947Sdes lt_save_CFLAGS=$CFLAGS 7238271947Sdes CC=${F77-"f77"} 7239271947Sdes CFLAGS=$FFLAGS 7240271947Sdes compiler=$CC 7241271947Sdes _LT_TAGVAR(compiler, $1)=$CC 7242271947Sdes _LT_CC_BASENAME([$compiler]) 7243271947Sdes GCC=$G77 7244271947Sdes if test -n "$compiler"; then 7245271947Sdes AC_MSG_CHECKING([if libtool supports shared libraries]) 7246271947Sdes AC_MSG_RESULT([$can_build_shared]) 7247271947Sdes 7248271947Sdes AC_MSG_CHECKING([whether to build shared libraries]) 7249271947Sdes test "$can_build_shared" = "no" && enable_shared=no 7250271947Sdes 7251271947Sdes # On AIX, shared libraries and static libraries use the same namespace, and 7252271947Sdes # are all built from PIC. 7253271947Sdes case $host_os in 7254271947Sdes aix3*) 7255271947Sdes test "$enable_shared" = yes && enable_static=no 7256271947Sdes if test -n "$RANLIB"; then 7257271947Sdes archive_cmds="$archive_cmds~\$RANLIB \$lib" 7258271947Sdes postinstall_cmds='$RANLIB $lib' 7259271947Sdes fi 7260271947Sdes ;; 7261271947Sdes aix[[4-9]]*) 7262271947Sdes if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7263271947Sdes test "$enable_shared" = yes && enable_static=no 7264271947Sdes fi 7265271947Sdes ;; 7266271947Sdes esac 7267271947Sdes AC_MSG_RESULT([$enable_shared]) 7268271947Sdes 7269271947Sdes AC_MSG_CHECKING([whether to build static libraries]) 7270271947Sdes # Make sure either enable_shared or enable_static is yes. 7271271947Sdes test "$enable_shared" = yes || enable_static=yes 7272271947Sdes AC_MSG_RESULT([$enable_static]) 7273271947Sdes 7274271947Sdes _LT_TAGVAR(GCC, $1)="$G77" 7275271947Sdes _LT_TAGVAR(LD, $1)="$LD" 7276271947Sdes 7277271947Sdes ## CAVEAT EMPTOR: 7278271947Sdes ## There is no encapsulation within the following macros, do not change 7279271947Sdes ## the running order or otherwise move them around unless you know exactly 7280271947Sdes ## what you are doing... 7281271947Sdes _LT_COMPILER_PIC($1) 7282271947Sdes _LT_COMPILER_C_O($1) 7283271947Sdes _LT_COMPILER_FILE_LOCKS($1) 7284271947Sdes _LT_LINKER_SHLIBS($1) 7285271947Sdes _LT_SYS_DYNAMIC_LINKER($1) 7286271947Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 7287271947Sdes 7288271947Sdes _LT_CONFIG($1) 7289271947Sdes fi # test -n "$compiler" 7290271947Sdes 7291271947Sdes GCC=$lt_save_GCC 7292271947Sdes CC="$lt_save_CC" 7293271947Sdes CFLAGS="$lt_save_CFLAGS" 7294271947Sdesfi # test "$_lt_disable_F77" != yes 7295271947Sdes 7296271947SdesAC_LANG_POP 7297271947Sdes])# _LT_LANG_F77_CONFIG 7298271947Sdes 7299271947Sdes 7300271947Sdes# _LT_LANG_FC_CONFIG([TAG]) 7301271947Sdes# ------------------------- 7302271947Sdes# Ensure that the configuration variables for a Fortran compiler are 7303271947Sdes# suitably defined. These variables are subsequently used by _LT_CONFIG 7304271947Sdes# to write the compiler configuration to `libtool'. 7305271947Sdesm4_defun([_LT_LANG_FC_CONFIG], 7306271947Sdes[AC_LANG_PUSH(Fortran) 7307271947Sdes 7308271947Sdesif test -z "$FC" || test "X$FC" = "Xno"; then 7309271947Sdes _lt_disable_FC=yes 7310271947Sdesfi 7311271947Sdes 7312271947Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7313271947Sdes_LT_TAGVAR(allow_undefined_flag, $1)= 7314271947Sdes_LT_TAGVAR(always_export_symbols, $1)=no 7315271947Sdes_LT_TAGVAR(archive_expsym_cmds, $1)= 7316271947Sdes_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7317271947Sdes_LT_TAGVAR(hardcode_direct, $1)=no 7318271947Sdes_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7319271947Sdes_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7320271947Sdes_LT_TAGVAR(hardcode_libdir_separator, $1)= 7321271947Sdes_LT_TAGVAR(hardcode_minus_L, $1)=no 7322271947Sdes_LT_TAGVAR(hardcode_automatic, $1)=no 7323271947Sdes_LT_TAGVAR(inherit_rpath, $1)=no 7324271947Sdes_LT_TAGVAR(module_cmds, $1)= 7325271947Sdes_LT_TAGVAR(module_expsym_cmds, $1)= 7326271947Sdes_LT_TAGVAR(link_all_deplibs, $1)=unknown 7327271947Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7328271947Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 7329271947Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7330271947Sdes_LT_TAGVAR(no_undefined_flag, $1)= 7331271947Sdes_LT_TAGVAR(whole_archive_flag_spec, $1)= 7332271947Sdes_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7333271947Sdes 7334271947Sdes# Source file extension for fc test sources. 7335271947Sdesac_ext=${ac_fc_srcext-f} 7336271947Sdes 7337271947Sdes# Object file extension for compiled fc test sources. 7338271947Sdesobjext=o 7339271947Sdes_LT_TAGVAR(objext, $1)=$objext 7340271947Sdes 7341271947Sdes# No sense in running all these tests if we already determined that 7342271947Sdes# the FC compiler isn't working. Some variables (like enable_shared) 7343271947Sdes# are currently assumed to apply to all compilers on this platform, 7344271947Sdes# and will be corrupted by setting them based on a non-working compiler. 7345271947Sdesif test "$_lt_disable_FC" != yes; then 7346271947Sdes # Code to be used in simple compile tests 7347271947Sdes lt_simple_compile_test_code="\ 7348271947Sdes subroutine t 7349271947Sdes return 7350271947Sdes end 7351271947Sdes" 7352271947Sdes 7353271947Sdes # Code to be used in simple link tests 7354271947Sdes lt_simple_link_test_code="\ 7355271947Sdes program t 7356271947Sdes end 7357271947Sdes" 7358271947Sdes 7359271947Sdes # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7360271947Sdes _LT_TAG_COMPILER 7361271947Sdes 7362271947Sdes # save warnings/boilerplate of simple test code 7363271947Sdes _LT_COMPILER_BOILERPLATE 7364271947Sdes _LT_LINKER_BOILERPLATE 7365271947Sdes 7366271947Sdes # Allow CC to be a program name with arguments. 7367271947Sdes lt_save_CC="$CC" 7368271947Sdes lt_save_GCC=$GCC 7369271947Sdes lt_save_CFLAGS=$CFLAGS 7370271947Sdes CC=${FC-"f95"} 7371271947Sdes CFLAGS=$FCFLAGS 7372271947Sdes compiler=$CC 7373271947Sdes GCC=$ac_cv_fc_compiler_gnu 7374271947Sdes 7375271947Sdes _LT_TAGVAR(compiler, $1)=$CC 7376271947Sdes _LT_CC_BASENAME([$compiler]) 7377271947Sdes 7378271947Sdes if test -n "$compiler"; then 7379271947Sdes AC_MSG_CHECKING([if libtool supports shared libraries]) 7380271947Sdes AC_MSG_RESULT([$can_build_shared]) 7381271947Sdes 7382271947Sdes AC_MSG_CHECKING([whether to build shared libraries]) 7383271947Sdes test "$can_build_shared" = "no" && enable_shared=no 7384271947Sdes 7385271947Sdes # On AIX, shared libraries and static libraries use the same namespace, and 7386271947Sdes # are all built from PIC. 7387271947Sdes case $host_os in 7388271947Sdes aix3*) 7389271947Sdes test "$enable_shared" = yes && enable_static=no 7390271947Sdes if test -n "$RANLIB"; then 7391271947Sdes archive_cmds="$archive_cmds~\$RANLIB \$lib" 7392271947Sdes postinstall_cmds='$RANLIB $lib' 7393271947Sdes fi 7394271947Sdes ;; 7395271947Sdes aix[[4-9]]*) 7396271947Sdes if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7397271947Sdes test "$enable_shared" = yes && enable_static=no 7398271947Sdes fi 7399271947Sdes ;; 7400271947Sdes esac 7401271947Sdes AC_MSG_RESULT([$enable_shared]) 7402271947Sdes 7403271947Sdes AC_MSG_CHECKING([whether to build static libraries]) 7404271947Sdes # Make sure either enable_shared or enable_static is yes. 7405271947Sdes test "$enable_shared" = yes || enable_static=yes 7406271947Sdes AC_MSG_RESULT([$enable_static]) 7407271947Sdes 7408271947Sdes _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7409271947Sdes _LT_TAGVAR(LD, $1)="$LD" 7410271947Sdes 7411271947Sdes ## CAVEAT EMPTOR: 7412271947Sdes ## There is no encapsulation within the following macros, do not change 7413271947Sdes ## the running order or otherwise move them around unless you know exactly 7414271947Sdes ## what you are doing... 7415271947Sdes _LT_SYS_HIDDEN_LIBDEPS($1) 7416271947Sdes _LT_COMPILER_PIC($1) 7417271947Sdes _LT_COMPILER_C_O($1) 7418271947Sdes _LT_COMPILER_FILE_LOCKS($1) 7419271947Sdes _LT_LINKER_SHLIBS($1) 7420271947Sdes _LT_SYS_DYNAMIC_LINKER($1) 7421271947Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 7422271947Sdes 7423271947Sdes _LT_CONFIG($1) 7424271947Sdes fi # test -n "$compiler" 7425271947Sdes 7426271947Sdes GCC=$lt_save_GCC 7427271947Sdes CC=$lt_save_CC 7428271947Sdes CFLAGS=$lt_save_CFLAGS 7429271947Sdesfi # test "$_lt_disable_FC" != yes 7430271947Sdes 7431271947SdesAC_LANG_POP 7432271947Sdes])# _LT_LANG_FC_CONFIG 7433271947Sdes 7434271947Sdes 7435271947Sdes# _LT_LANG_GCJ_CONFIG([TAG]) 7436271947Sdes# -------------------------- 7437271947Sdes# Ensure that the configuration variables for the GNU Java Compiler compiler 7438271947Sdes# are suitably defined. These variables are subsequently used by _LT_CONFIG 7439271947Sdes# to write the compiler configuration to `libtool'. 7440271947Sdesm4_defun([_LT_LANG_GCJ_CONFIG], 7441271947Sdes[AC_REQUIRE([LT_PROG_GCJ])dnl 7442271947SdesAC_LANG_SAVE 7443271947Sdes 7444271947Sdes# Source file extension for Java test sources. 7445271947Sdesac_ext=java 7446271947Sdes 7447271947Sdes# Object file extension for compiled Java test sources. 7448271947Sdesobjext=o 7449271947Sdes_LT_TAGVAR(objext, $1)=$objext 7450271947Sdes 7451271947Sdes# Code to be used in simple compile tests 7452271947Sdeslt_simple_compile_test_code="class foo {}" 7453271947Sdes 7454271947Sdes# Code to be used in simple link tests 7455271947Sdeslt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7456271947Sdes 7457271947Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7458271947Sdes_LT_TAG_COMPILER 7459271947Sdes 7460271947Sdes# save warnings/boilerplate of simple test code 7461271947Sdes_LT_COMPILER_BOILERPLATE 7462271947Sdes_LT_LINKER_BOILERPLATE 7463271947Sdes 7464271947Sdes# Allow CC to be a program name with arguments. 7465271947Sdeslt_save_CC=$CC 7466271947Sdeslt_save_CFLAGS=$CFLAGS 7467271947Sdeslt_save_GCC=$GCC 7468271947SdesGCC=yes 7469271947SdesCC=${GCJ-"gcj"} 7470271947SdesCFLAGS=$GCJFLAGS 7471271947Sdescompiler=$CC 7472271947Sdes_LT_TAGVAR(compiler, $1)=$CC 7473271947Sdes_LT_TAGVAR(LD, $1)="$LD" 7474271947Sdes_LT_CC_BASENAME([$compiler]) 7475271947Sdes 7476271947Sdes# GCJ did not exist at the time GCC didn't implicitly link libc in. 7477271947Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7478271947Sdes 7479271947Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7480271947Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 7481271947Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7482271947Sdes 7483271947Sdesif test -n "$compiler"; then 7484271947Sdes _LT_COMPILER_NO_RTTI($1) 7485271947Sdes _LT_COMPILER_PIC($1) 7486271947Sdes _LT_COMPILER_C_O($1) 7487271947Sdes _LT_COMPILER_FILE_LOCKS($1) 7488271947Sdes _LT_LINKER_SHLIBS($1) 7489271947Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 7490271947Sdes 7491271947Sdes _LT_CONFIG($1) 7492271947Sdesfi 7493271947Sdes 7494271947SdesAC_LANG_RESTORE 7495271947Sdes 7496271947SdesGCC=$lt_save_GCC 7497271947SdesCC=$lt_save_CC 7498271947SdesCFLAGS=$lt_save_CFLAGS 7499271947Sdes])# _LT_LANG_GCJ_CONFIG 7500271947Sdes 7501271947Sdes 7502271947Sdes# _LT_LANG_GO_CONFIG([TAG]) 7503271947Sdes# -------------------------- 7504271947Sdes# Ensure that the configuration variables for the GNU Go compiler 7505271947Sdes# are suitably defined. These variables are subsequently used by _LT_CONFIG 7506271947Sdes# to write the compiler configuration to `libtool'. 7507271947Sdesm4_defun([_LT_LANG_GO_CONFIG], 7508271947Sdes[AC_REQUIRE([LT_PROG_GO])dnl 7509271947SdesAC_LANG_SAVE 7510271947Sdes 7511271947Sdes# Source file extension for Go test sources. 7512271947Sdesac_ext=go 7513271947Sdes 7514271947Sdes# Object file extension for compiled Go test sources. 7515271947Sdesobjext=o 7516271947Sdes_LT_TAGVAR(objext, $1)=$objext 7517271947Sdes 7518271947Sdes# Code to be used in simple compile tests 7519271947Sdeslt_simple_compile_test_code="package main; func main() { }" 7520271947Sdes 7521271947Sdes# Code to be used in simple link tests 7522271947Sdeslt_simple_link_test_code='package main; func main() { }' 7523271947Sdes 7524271947Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7525271947Sdes_LT_TAG_COMPILER 7526271947Sdes 7527271947Sdes# save warnings/boilerplate of simple test code 7528271947Sdes_LT_COMPILER_BOILERPLATE 7529271947Sdes_LT_LINKER_BOILERPLATE 7530271947Sdes 7531271947Sdes# Allow CC to be a program name with arguments. 7532271947Sdeslt_save_CC=$CC 7533271947Sdeslt_save_CFLAGS=$CFLAGS 7534271947Sdeslt_save_GCC=$GCC 7535271947SdesGCC=yes 7536271947SdesCC=${GOC-"gccgo"} 7537271947SdesCFLAGS=$GOFLAGS 7538271947Sdescompiler=$CC 7539271947Sdes_LT_TAGVAR(compiler, $1)=$CC 7540271947Sdes_LT_TAGVAR(LD, $1)="$LD" 7541271947Sdes_LT_CC_BASENAME([$compiler]) 7542271947Sdes 7543271947Sdes# Go did not exist at the time GCC didn't implicitly link libc in. 7544271947Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7545271947Sdes 7546271947Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7547271947Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 7548271947Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7549271947Sdes 7550271947Sdesif test -n "$compiler"; then 7551271947Sdes _LT_COMPILER_NO_RTTI($1) 7552271947Sdes _LT_COMPILER_PIC($1) 7553271947Sdes _LT_COMPILER_C_O($1) 7554271947Sdes _LT_COMPILER_FILE_LOCKS($1) 7555271947Sdes _LT_LINKER_SHLIBS($1) 7556271947Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 7557271947Sdes 7558271947Sdes _LT_CONFIG($1) 7559271947Sdesfi 7560271947Sdes 7561271947SdesAC_LANG_RESTORE 7562271947Sdes 7563271947SdesGCC=$lt_save_GCC 7564271947SdesCC=$lt_save_CC 7565271947SdesCFLAGS=$lt_save_CFLAGS 7566271947Sdes])# _LT_LANG_GO_CONFIG 7567271947Sdes 7568271947Sdes 7569271947Sdes# _LT_LANG_RC_CONFIG([TAG]) 7570271947Sdes# ------------------------- 7571271947Sdes# Ensure that the configuration variables for the Windows resource compiler 7572271947Sdes# are suitably defined. These variables are subsequently used by _LT_CONFIG 7573271947Sdes# to write the compiler configuration to `libtool'. 7574271947Sdesm4_defun([_LT_LANG_RC_CONFIG], 7575271947Sdes[AC_REQUIRE([LT_PROG_RC])dnl 7576271947SdesAC_LANG_SAVE 7577271947Sdes 7578271947Sdes# Source file extension for RC test sources. 7579271947Sdesac_ext=rc 7580271947Sdes 7581271947Sdes# Object file extension for compiled RC test sources. 7582271947Sdesobjext=o 7583271947Sdes_LT_TAGVAR(objext, $1)=$objext 7584271947Sdes 7585271947Sdes# Code to be used in simple compile tests 7586271947Sdeslt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7587271947Sdes 7588271947Sdes# Code to be used in simple link tests 7589271947Sdeslt_simple_link_test_code="$lt_simple_compile_test_code" 7590271947Sdes 7591271947Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7592271947Sdes_LT_TAG_COMPILER 7593271947Sdes 7594271947Sdes# save warnings/boilerplate of simple test code 7595271947Sdes_LT_COMPILER_BOILERPLATE 7596271947Sdes_LT_LINKER_BOILERPLATE 7597271947Sdes 7598271947Sdes# Allow CC to be a program name with arguments. 7599271947Sdeslt_save_CC="$CC" 7600271947Sdeslt_save_CFLAGS=$CFLAGS 7601271947Sdeslt_save_GCC=$GCC 7602271947SdesGCC= 7603271947SdesCC=${RC-"windres"} 7604271947SdesCFLAGS= 7605271947Sdescompiler=$CC 7606271947Sdes_LT_TAGVAR(compiler, $1)=$CC 7607271947Sdes_LT_CC_BASENAME([$compiler]) 7608271947Sdes_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7609271947Sdes 7610271947Sdesif test -n "$compiler"; then 7611271947Sdes : 7612271947Sdes _LT_CONFIG($1) 7613271947Sdesfi 7614271947Sdes 7615271947SdesGCC=$lt_save_GCC 7616271947SdesAC_LANG_RESTORE 7617271947SdesCC=$lt_save_CC 7618271947SdesCFLAGS=$lt_save_CFLAGS 7619271947Sdes])# _LT_LANG_RC_CONFIG 7620271947Sdes 7621271947Sdes 7622271947Sdes# LT_PROG_GCJ 7623271947Sdes# ----------- 7624271947SdesAC_DEFUN([LT_PROG_GCJ], 7625271947Sdes[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7626271947Sdes [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7627271947Sdes [AC_CHECK_TOOL(GCJ, gcj,) 7628271947Sdes test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7629271947Sdes AC_SUBST(GCJFLAGS)])])[]dnl 7630271947Sdes]) 7631271947Sdes 7632271947Sdes# Old name: 7633271947SdesAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7634271947Sdesdnl aclocal-1.4 backwards compatibility: 7635271947Sdesdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7636271947Sdes 7637271947Sdes 7638271947Sdes# LT_PROG_GO 7639271947Sdes# ---------- 7640271947SdesAC_DEFUN([LT_PROG_GO], 7641271947Sdes[AC_CHECK_TOOL(GOC, gccgo,) 7642271947Sdes]) 7643271947Sdes 7644271947Sdes 7645271947Sdes# LT_PROG_RC 7646271947Sdes# ---------- 7647271947SdesAC_DEFUN([LT_PROG_RC], 7648271947Sdes[AC_CHECK_TOOL(RC, windres,) 7649271947Sdes]) 7650271947Sdes 7651271947Sdes# Old name: 7652271947SdesAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7653271947Sdesdnl aclocal-1.4 backwards compatibility: 7654271947Sdesdnl AC_DEFUN([LT_AC_PROG_RC], []) 7655271947Sdes 7656271947Sdes 7657271947Sdes# _LT_DECL_EGREP 7658271947Sdes# -------------- 7659271947Sdes# If we don't have a new enough Autoconf to choose the best grep 7660271947Sdes# available, choose the one first in the user's PATH. 7661271947Sdesm4_defun([_LT_DECL_EGREP], 7662271947Sdes[AC_REQUIRE([AC_PROG_EGREP])dnl 7663271947SdesAC_REQUIRE([AC_PROG_FGREP])dnl 7664271947Sdestest -z "$GREP" && GREP=grep 7665271947Sdes_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7666271947Sdes_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7667271947Sdes_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7668271947Sdesdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7669271947SdesAC_SUBST([GREP]) 7670271947Sdes]) 7671271947Sdes 7672271947Sdes 7673271947Sdes# _LT_DECL_OBJDUMP 7674271947Sdes# -------------- 7675271947Sdes# If we don't have a new enough Autoconf to choose the best objdump 7676271947Sdes# available, choose the one first in the user's PATH. 7677271947Sdesm4_defun([_LT_DECL_OBJDUMP], 7678271947Sdes[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7679271947Sdestest -z "$OBJDUMP" && OBJDUMP=objdump 7680271947Sdes_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7681271947SdesAC_SUBST([OBJDUMP]) 7682271947Sdes]) 7683271947Sdes 7684271947Sdes# _LT_DECL_DLLTOOL 7685271947Sdes# ---------------- 7686271947Sdes# Ensure DLLTOOL variable is set. 7687271947Sdesm4_defun([_LT_DECL_DLLTOOL], 7688271947Sdes[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7689271947Sdestest -z "$DLLTOOL" && DLLTOOL=dlltool 7690271947Sdes_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7691271947SdesAC_SUBST([DLLTOOL]) 7692271947Sdes]) 7693271947Sdes 7694271947Sdes# _LT_DECL_SED 7695271947Sdes# ------------ 7696271947Sdes# Check for a fully-functional sed program, that truncates 7697271947Sdes# as few characters as possible. Prefer GNU sed if found. 7698271947Sdesm4_defun([_LT_DECL_SED], 7699271947Sdes[AC_PROG_SED 7700271947Sdestest -z "$SED" && SED=sed 7701271947SdesXsed="$SED -e 1s/^X//" 7702271947Sdes_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7703271947Sdes_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7704271947Sdes [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7705271947Sdes])# _LT_DECL_SED 7706271947Sdes 7707271947Sdesm4_ifndef([AC_PROG_SED], [ 7708271947Sdes# NOTE: This macro has been submitted for inclusion into # 7709271947Sdes# GNU Autoconf as AC_PROG_SED. When it is available in # 7710271947Sdes# a released version of Autoconf we should remove this # 7711271947Sdes# macro and use it instead. # 7712271947Sdes 7713271947Sdesm4_defun([AC_PROG_SED], 7714271947Sdes[AC_MSG_CHECKING([for a sed that does not truncate output]) 7715271947SdesAC_CACHE_VAL(lt_cv_path_SED, 7716271947Sdes[# Loop through the user's path and test for sed and gsed. 7717271947Sdes# Then use that list of sed's as ones to test for truncation. 7718271947Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7719271947Sdesfor as_dir in $PATH 7720271947Sdesdo 7721271947Sdes IFS=$as_save_IFS 7722271947Sdes test -z "$as_dir" && as_dir=. 7723271947Sdes for lt_ac_prog in sed gsed; do 7724271947Sdes for ac_exec_ext in '' $ac_executable_extensions; do 7725271947Sdes if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7726271947Sdes lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7727271947Sdes fi 7728271947Sdes done 7729271947Sdes done 7730271947Sdesdone 7731271947SdesIFS=$as_save_IFS 7732271947Sdeslt_ac_max=0 7733271947Sdeslt_ac_count=0 7734271947Sdes# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7735271947Sdes# along with /bin/sed that truncates output. 7736271947Sdesfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7737271947Sdes test ! -f $lt_ac_sed && continue 7738271947Sdes cat /dev/null > conftest.in 7739271947Sdes lt_ac_count=0 7740271947Sdes echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7741271947Sdes # Check for GNU sed and select it if it is found. 7742271947Sdes if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7743271947Sdes lt_cv_path_SED=$lt_ac_sed 7744271947Sdes break 7745271947Sdes fi 7746271947Sdes while true; do 7747271947Sdes cat conftest.in conftest.in >conftest.tmp 7748271947Sdes mv conftest.tmp conftest.in 7749271947Sdes cp conftest.in conftest.nl 7750271947Sdes echo >>conftest.nl 7751271947Sdes $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7752271947Sdes cmp -s conftest.out conftest.nl || break 7753271947Sdes # 10000 chars as input seems more than enough 7754271947Sdes test $lt_ac_count -gt 10 && break 7755271947Sdes lt_ac_count=`expr $lt_ac_count + 1` 7756271947Sdes if test $lt_ac_count -gt $lt_ac_max; then 7757271947Sdes lt_ac_max=$lt_ac_count 7758271947Sdes lt_cv_path_SED=$lt_ac_sed 7759271947Sdes fi 7760271947Sdes done 7761271947Sdesdone 7762271947Sdes]) 7763271947SdesSED=$lt_cv_path_SED 7764271947SdesAC_SUBST([SED]) 7765271947SdesAC_MSG_RESULT([$SED]) 7766271947Sdes])#AC_PROG_SED 7767271947Sdes])#m4_ifndef 7768271947Sdes 7769271947Sdes# Old name: 7770271947SdesAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7771271947Sdesdnl aclocal-1.4 backwards compatibility: 7772271947Sdesdnl AC_DEFUN([LT_AC_PROG_SED], []) 7773271947Sdes 7774271947Sdes 7775271947Sdes# _LT_CHECK_SHELL_FEATURES 7776271947Sdes# ------------------------ 7777271947Sdes# Find out whether the shell is Bourne or XSI compatible, 7778271947Sdes# or has some other useful features. 7779271947Sdesm4_defun([_LT_CHECK_SHELL_FEATURES], 7780271947Sdes[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7781271947Sdes# Try some XSI features 7782271947Sdesxsi_shell=no 7783271947Sdes( _lt_dummy="a/b/c" 7784271947Sdes test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7785271947Sdes = c,a/b,b/c, \ 7786271947Sdes && eval 'test $(( 1 + 1 )) -eq 2 \ 7787271947Sdes && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7788271947Sdes && xsi_shell=yes 7789271947SdesAC_MSG_RESULT([$xsi_shell]) 7790271947Sdes_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7791271947Sdes 7792271947SdesAC_MSG_CHECKING([whether the shell understands "+="]) 7793271947Sdeslt_shell_append=no 7794271947Sdes( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7795271947Sdes >/dev/null 2>&1 \ 7796271947Sdes && lt_shell_append=yes 7797271947SdesAC_MSG_RESULT([$lt_shell_append]) 7798271947Sdes_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7799271947Sdes 7800271947Sdesif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7801271947Sdes lt_unset=unset 7802271947Sdeselse 7803271947Sdes lt_unset=false 7804271947Sdesfi 7805271947Sdes_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7806271947Sdes 7807271947Sdes# test EBCDIC or ASCII 7808271947Sdescase `echo X|tr X '\101'` in 7809271947Sdes A) # ASCII based system 7810271947Sdes # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7811271947Sdes lt_SP2NL='tr \040 \012' 7812271947Sdes lt_NL2SP='tr \015\012 \040\040' 7813271947Sdes ;; 7814271947Sdes *) # EBCDIC based system 7815271947Sdes lt_SP2NL='tr \100 \n' 7816271947Sdes lt_NL2SP='tr \r\n \100\100' 7817271947Sdes ;; 7818271947Sdesesac 7819271947Sdes_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7820271947Sdes_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7821271947Sdes])# _LT_CHECK_SHELL_FEATURES 7822271947Sdes 7823271947Sdes 7824271947Sdes# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7825271947Sdes# ------------------------------------------------------ 7826271947Sdes# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7827271947Sdes# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7828271947Sdesm4_defun([_LT_PROG_FUNCTION_REPLACE], 7829271947Sdes[dnl { 7830271947Sdessed -e '/^$1 ()$/,/^} # $1 /c\ 7831271947Sdes$1 ()\ 7832271947Sdes{\ 7833271947Sdesm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7834271947Sdes} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7835271947Sdes && mv -f "$cfgfile.tmp" "$cfgfile" \ 7836271947Sdes || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7837271947Sdestest 0 -eq $? || _lt_function_replace_fail=: 7838271947Sdes]) 7839271947Sdes 7840271947Sdes 7841271947Sdes# _LT_PROG_REPLACE_SHELLFNS 7842271947Sdes# ------------------------- 7843271947Sdes# Replace existing portable implementations of several shell functions with 7844271947Sdes# equivalent extended shell implementations where those features are available.. 7845271947Sdesm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7846271947Sdes[if test x"$xsi_shell" = xyes; then 7847271947Sdes _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7848271947Sdes case ${1} in 7849271947Sdes */*) func_dirname_result="${1%/*}${2}" ;; 7850271947Sdes * ) func_dirname_result="${3}" ;; 7851271947Sdes esac]) 7852271947Sdes 7853271947Sdes _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7854271947Sdes func_basename_result="${1##*/}"]) 7855271947Sdes 7856271947Sdes _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7857271947Sdes case ${1} in 7858271947Sdes */*) func_dirname_result="${1%/*}${2}" ;; 7859271947Sdes * ) func_dirname_result="${3}" ;; 7860271947Sdes esac 7861271947Sdes func_basename_result="${1##*/}"]) 7862271947Sdes 7863271947Sdes _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7864271947Sdes # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7865271947Sdes # positional parameters, so assign one to ordinary parameter first. 7866271947Sdes func_stripname_result=${3} 7867271947Sdes func_stripname_result=${func_stripname_result#"${1}"} 7868271947Sdes func_stripname_result=${func_stripname_result%"${2}"}]) 7869271947Sdes 7870271947Sdes _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7871271947Sdes func_split_long_opt_name=${1%%=*} 7872271947Sdes func_split_long_opt_arg=${1#*=}]) 7873271947Sdes 7874271947Sdes _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7875271947Sdes func_split_short_opt_arg=${1#??} 7876271947Sdes func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7877271947Sdes 7878271947Sdes _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7879271947Sdes case ${1} in 7880271947Sdes *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7881271947Sdes *) func_lo2o_result=${1} ;; 7882271947Sdes esac]) 7883271947Sdes 7884271947Sdes _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7885271947Sdes 7886271947Sdes _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7887271947Sdes 7888271947Sdes _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7889271947Sdesfi 7890271947Sdes 7891271947Sdesif test x"$lt_shell_append" = xyes; then 7892271947Sdes _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7893271947Sdes 7894271947Sdes _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7895271947Sdes func_quote_for_eval "${2}" 7896271947Sdesdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7897271947Sdes eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7898271947Sdes 7899271947Sdes # Save a `func_append' function call where possible by direct use of '+=' 7900271947Sdes sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7901271947Sdes && mv -f "$cfgfile.tmp" "$cfgfile" \ 7902271947Sdes || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7903271947Sdes test 0 -eq $? || _lt_function_replace_fail=: 7904271947Sdeselse 7905271947Sdes # Save a `func_append' function call even when '+=' is not available 7906271947Sdes sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7907271947Sdes && mv -f "$cfgfile.tmp" "$cfgfile" \ 7908271947Sdes || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7909271947Sdes test 0 -eq $? || _lt_function_replace_fail=: 7910271947Sdesfi 7911271947Sdes 7912271947Sdesif test x"$_lt_function_replace_fail" = x":"; then 7913271947Sdes AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7914271947Sdesfi 7915271947Sdes]) 7916271947Sdes 7917271947Sdes# _LT_PATH_CONVERSION_FUNCTIONS 7918271947Sdes# ----------------------------- 7919271947Sdes# Determine which file name conversion functions should be used by 7920271947Sdes# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7921271947Sdes# for certain cross-compile configurations and native mingw. 7922271947Sdesm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7923271947Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7924271947SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7925271947SdesAC_MSG_CHECKING([how to convert $build file names to $host format]) 7926271947SdesAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7927271947Sdes[case $host in 7928271947Sdes *-*-mingw* ) 7929271947Sdes case $build in 7930271947Sdes *-*-mingw* ) # actually msys 7931271947Sdes lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7932271947Sdes ;; 7933271947Sdes *-*-cygwin* ) 7934271947Sdes lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7935271947Sdes ;; 7936271947Sdes * ) # otherwise, assume *nix 7937271947Sdes lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7938271947Sdes ;; 7939271947Sdes esac 7940271947Sdes ;; 7941271947Sdes *-*-cygwin* ) 7942271947Sdes case $build in 7943271947Sdes *-*-mingw* ) # actually msys 7944271947Sdes lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7945271947Sdes ;; 7946271947Sdes *-*-cygwin* ) 7947271947Sdes lt_cv_to_host_file_cmd=func_convert_file_noop 7948271947Sdes ;; 7949271947Sdes * ) # otherwise, assume *nix 7950271947Sdes lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7951271947Sdes ;; 7952271947Sdes esac 7953271947Sdes ;; 7954271947Sdes * ) # unhandled hosts (and "normal" native builds) 7955271947Sdes lt_cv_to_host_file_cmd=func_convert_file_noop 7956271947Sdes ;; 7957271947Sdesesac 7958271947Sdes]) 7959271947Sdesto_host_file_cmd=$lt_cv_to_host_file_cmd 7960271947SdesAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7961271947Sdes_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7962271947Sdes [0], [convert $build file names to $host format])dnl 7963271947Sdes 7964271947SdesAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7965271947SdesAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7966271947Sdes[#assume ordinary cross tools, or native build. 7967271947Sdeslt_cv_to_tool_file_cmd=func_convert_file_noop 7968271947Sdescase $host in 7969271947Sdes *-*-mingw* ) 7970271947Sdes case $build in 7971271947Sdes *-*-mingw* ) # actually msys 7972271947Sdes lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7973271947Sdes ;; 7974271947Sdes esac 7975271947Sdes ;; 7976271947Sdesesac 7977271947Sdes]) 7978271947Sdesto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7979271947SdesAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7980271947Sdes_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7981271947Sdes [0], [convert $build files to toolchain format])dnl 7982271947Sdes])# _LT_PATH_CONVERSION_FUNCTIONS 7983271947Sdes 7984271947Sdes# Helper functions for option handling. -*- Autoconf -*- 7985271947Sdes# 7986271947Sdes# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7987271947Sdes# Inc. 7988271947Sdes# Written by Gary V. Vaughan, 2004 7989271947Sdes# 7990271947Sdes# This file is free software; the Free Software Foundation gives 7991271947Sdes# unlimited permission to copy and/or distribute it, with or without 7992271947Sdes# modifications, as long as this notice is preserved. 7993271947Sdes 7994271947Sdes# serial 7 ltoptions.m4 7995271947Sdes 7996271947Sdes# This is to help aclocal find these macros, as it can't see m4_define. 7997271947SdesAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7998271947Sdes 7999271947Sdes 8000271947Sdes# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8001271947Sdes# ------------------------------------------ 8002271947Sdesm4_define([_LT_MANGLE_OPTION], 8003271947Sdes[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8004271947Sdes 8005271947Sdes 8006271947Sdes# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8007271947Sdes# --------------------------------------- 8008271947Sdes# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8009271947Sdes# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8010271947Sdes# saved as a flag. 8011271947Sdesm4_define([_LT_SET_OPTION], 8012271947Sdes[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8013271947Sdesm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8014271947Sdes _LT_MANGLE_DEFUN([$1], [$2]), 8015271947Sdes [m4_warning([Unknown $1 option `$2'])])[]dnl 8016271947Sdes]) 8017271947Sdes 8018271947Sdes 8019271947Sdes# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8020271947Sdes# ------------------------------------------------------------ 8021271947Sdes# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8022271947Sdesm4_define([_LT_IF_OPTION], 8023271947Sdes[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8024271947Sdes 8025271947Sdes 8026271947Sdes# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8027271947Sdes# ------------------------------------------------------- 8028271947Sdes# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8029271947Sdes# are set. 8030271947Sdesm4_define([_LT_UNLESS_OPTIONS], 8031271947Sdes[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8032271947Sdes [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8033271947Sdes [m4_define([$0_found])])])[]dnl 8034271947Sdesm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8035271947Sdes])[]dnl 8036271947Sdes]) 8037271947Sdes 8038271947Sdes 8039271947Sdes# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8040271947Sdes# ---------------------------------------- 8041271947Sdes# OPTION-LIST is a space-separated list of Libtool options associated 8042271947Sdes# with MACRO-NAME. If any OPTION has a matching handler declared with 8043271947Sdes# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8044271947Sdes# the unknown option and exit. 8045271947Sdesm4_defun([_LT_SET_OPTIONS], 8046271947Sdes[# Set options 8047271947Sdesm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8048271947Sdes [_LT_SET_OPTION([$1], _LT_Option)]) 8049271947Sdes 8050271947Sdesm4_if([$1],[LT_INIT],[ 8051271947Sdes dnl 8052271947Sdes dnl Simply set some default values (i.e off) if boolean options were not 8053271947Sdes dnl specified: 8054271947Sdes _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8055271947Sdes ]) 8056271947Sdes _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8057271947Sdes ]) 8058271947Sdes dnl 8059271947Sdes dnl If no reference was made to various pairs of opposing options, then 8060271947Sdes dnl we run the default mode handler for the pair. For example, if neither 8061271947Sdes dnl `shared' nor `disable-shared' was passed, we enable building of shared 8062271947Sdes dnl archives by default: 8063271947Sdes _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8064271947Sdes _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8065271947Sdes _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8066271947Sdes _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8067271947Sdes [_LT_ENABLE_FAST_INSTALL]) 8068271947Sdes ]) 8069271947Sdes])# _LT_SET_OPTIONS 8070271947Sdes 8071271947Sdes 8072271947Sdes 8073271947Sdes# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8074271947Sdes# ----------------------------------------- 8075271947Sdesm4_define([_LT_MANGLE_DEFUN], 8076271947Sdes[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8077271947Sdes 8078271947Sdes 8079271947Sdes# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8080271947Sdes# ----------------------------------------------- 8081271947Sdesm4_define([LT_OPTION_DEFINE], 8082271947Sdes[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8083271947Sdes])# LT_OPTION_DEFINE 8084271947Sdes 8085271947Sdes 8086271947Sdes# dlopen 8087271947Sdes# ------ 8088271947SdesLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8089271947Sdes]) 8090271947Sdes 8091271947SdesAU_DEFUN([AC_LIBTOOL_DLOPEN], 8092271947Sdes[_LT_SET_OPTION([LT_INIT], [dlopen]) 8093271947SdesAC_DIAGNOSE([obsolete], 8094271947Sdes[$0: Remove this warning and the call to _LT_SET_OPTION when you 8095271947Sdesput the `dlopen' option into LT_INIT's first parameter.]) 8096271947Sdes]) 8097271947Sdes 8098271947Sdesdnl aclocal-1.4 backwards compatibility: 8099271947Sdesdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8100271947Sdes 8101271947Sdes 8102271947Sdes# win32-dll 8103271947Sdes# --------- 8104271947Sdes# Declare package support for building win32 dll's. 8105271947SdesLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8106271947Sdes[enable_win32_dll=yes 8107271947Sdes 8108271947Sdescase $host in 8109271947Sdes*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8110271947Sdes AC_CHECK_TOOL(AS, as, false) 8111271947Sdes AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8112271947Sdes AC_CHECK_TOOL(OBJDUMP, objdump, false) 8113271947Sdes ;; 8114271947Sdesesac 8115271947Sdes 8116271947Sdestest -z "$AS" && AS=as 8117271947Sdes_LT_DECL([], [AS], [1], [Assembler program])dnl 8118271947Sdes 8119271947Sdestest -z "$DLLTOOL" && DLLTOOL=dlltool 8120271947Sdes_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8121271947Sdes 8122271947Sdestest -z "$OBJDUMP" && OBJDUMP=objdump 8123271947Sdes_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8124271947Sdes])# win32-dll 8125271947Sdes 8126271947SdesAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8127271947Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8128271947Sdes_LT_SET_OPTION([LT_INIT], [win32-dll]) 8129271947SdesAC_DIAGNOSE([obsolete], 8130271947Sdes[$0: Remove this warning and the call to _LT_SET_OPTION when you 8131271947Sdesput the `win32-dll' option into LT_INIT's first parameter.]) 8132271947Sdes]) 8133271947Sdes 8134271947Sdesdnl aclocal-1.4 backwards compatibility: 8135271947Sdesdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8136271947Sdes 8137271947Sdes 8138271947Sdes# _LT_ENABLE_SHARED([DEFAULT]) 8139271947Sdes# ---------------------------- 8140271947Sdes# implement the --enable-shared flag, and supports the `shared' and 8141271947Sdes# `disable-shared' LT_INIT options. 8142271947Sdes# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8143271947Sdesm4_define([_LT_ENABLE_SHARED], 8144271947Sdes[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8145271947SdesAC_ARG_ENABLE([shared], 8146271947Sdes [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8147271947Sdes [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8148271947Sdes [p=${PACKAGE-default} 8149271947Sdes case $enableval in 8150271947Sdes yes) enable_shared=yes ;; 8151271947Sdes no) enable_shared=no ;; 8152271947Sdes *) 8153271947Sdes enable_shared=no 8154271947Sdes # Look at the argument we got. We use all the common list separators. 8155271947Sdes lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8156271947Sdes for pkg in $enableval; do 8157271947Sdes IFS="$lt_save_ifs" 8158271947Sdes if test "X$pkg" = "X$p"; then 8159271947Sdes enable_shared=yes 8160271947Sdes fi 8161271947Sdes done 8162271947Sdes IFS="$lt_save_ifs" 8163271947Sdes ;; 8164271947Sdes esac], 8165271947Sdes [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8166271947Sdes 8167271947Sdes _LT_DECL([build_libtool_libs], [enable_shared], [0], 8168271947Sdes [Whether or not to build shared libraries]) 8169271947Sdes])# _LT_ENABLE_SHARED 8170271947Sdes 8171271947SdesLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8172271947SdesLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8173271947Sdes 8174271947Sdes# Old names: 8175271947SdesAC_DEFUN([AC_ENABLE_SHARED], 8176271947Sdes[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8177271947Sdes]) 8178271947Sdes 8179271947SdesAC_DEFUN([AC_DISABLE_SHARED], 8180271947Sdes[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8181271947Sdes]) 8182271947Sdes 8183271947SdesAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8184271947SdesAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8185271947Sdes 8186271947Sdesdnl aclocal-1.4 backwards compatibility: 8187271947Sdesdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8188271947Sdesdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8189271947Sdes 8190271947Sdes 8191271947Sdes 8192271947Sdes# _LT_ENABLE_STATIC([DEFAULT]) 8193271947Sdes# ---------------------------- 8194271947Sdes# implement the --enable-static flag, and support the `static' and 8195271947Sdes# `disable-static' LT_INIT options. 8196271947Sdes# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8197271947Sdesm4_define([_LT_ENABLE_STATIC], 8198271947Sdes[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8199271947SdesAC_ARG_ENABLE([static], 8200271947Sdes [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8201271947Sdes [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8202271947Sdes [p=${PACKAGE-default} 8203271947Sdes case $enableval in 8204271947Sdes yes) enable_static=yes ;; 8205271947Sdes no) enable_static=no ;; 8206271947Sdes *) 8207271947Sdes enable_static=no 8208271947Sdes # Look at the argument we got. We use all the common list separators. 8209271947Sdes lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8210271947Sdes for pkg in $enableval; do 8211271947Sdes IFS="$lt_save_ifs" 8212271947Sdes if test "X$pkg" = "X$p"; then 8213271947Sdes enable_static=yes 8214271947Sdes fi 8215271947Sdes done 8216271947Sdes IFS="$lt_save_ifs" 8217271947Sdes ;; 8218271947Sdes esac], 8219271947Sdes [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8220271947Sdes 8221271947Sdes _LT_DECL([build_old_libs], [enable_static], [0], 8222271947Sdes [Whether or not to build static libraries]) 8223271947Sdes])# _LT_ENABLE_STATIC 8224271947Sdes 8225271947SdesLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8226271947SdesLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8227271947Sdes 8228271947Sdes# Old names: 8229271947SdesAC_DEFUN([AC_ENABLE_STATIC], 8230271947Sdes[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8231271947Sdes]) 8232271947Sdes 8233271947SdesAC_DEFUN([AC_DISABLE_STATIC], 8234271947Sdes[_LT_SET_OPTION([LT_INIT], [disable-static]) 8235271947Sdes]) 8236271947Sdes 8237271947SdesAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8238271947SdesAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8239271947Sdes 8240271947Sdesdnl aclocal-1.4 backwards compatibility: 8241271947Sdesdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8242271947Sdesdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8243271947Sdes 8244271947Sdes 8245271947Sdes 8246271947Sdes# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8247271947Sdes# ---------------------------------- 8248271947Sdes# implement the --enable-fast-install flag, and support the `fast-install' 8249271947Sdes# and `disable-fast-install' LT_INIT options. 8250271947Sdes# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8251271947Sdesm4_define([_LT_ENABLE_FAST_INSTALL], 8252271947Sdes[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8253271947SdesAC_ARG_ENABLE([fast-install], 8254271947Sdes [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8255271947Sdes [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8256271947Sdes [p=${PACKAGE-default} 8257271947Sdes case $enableval in 8258271947Sdes yes) enable_fast_install=yes ;; 8259271947Sdes no) enable_fast_install=no ;; 8260271947Sdes *) 8261271947Sdes enable_fast_install=no 8262271947Sdes # Look at the argument we got. We use all the common list separators. 8263271947Sdes lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8264271947Sdes for pkg in $enableval; do 8265271947Sdes IFS="$lt_save_ifs" 8266271947Sdes if test "X$pkg" = "X$p"; then 8267271947Sdes enable_fast_install=yes 8268271947Sdes fi 8269271947Sdes done 8270271947Sdes IFS="$lt_save_ifs" 8271271947Sdes ;; 8272271947Sdes esac], 8273271947Sdes [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8274271947Sdes 8275271947Sdes_LT_DECL([fast_install], [enable_fast_install], [0], 8276271947Sdes [Whether or not to optimize for fast installation])dnl 8277271947Sdes])# _LT_ENABLE_FAST_INSTALL 8278271947Sdes 8279271947SdesLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8280271947SdesLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8281271947Sdes 8282271947Sdes# Old names: 8283271947SdesAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8284271947Sdes[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8285271947SdesAC_DIAGNOSE([obsolete], 8286271947Sdes[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8287271947Sdesthe `fast-install' option into LT_INIT's first parameter.]) 8288271947Sdes]) 8289271947Sdes 8290271947SdesAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8291271947Sdes[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8292271947SdesAC_DIAGNOSE([obsolete], 8293271947Sdes[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8294271947Sdesthe `disable-fast-install' option into LT_INIT's first parameter.]) 8295271947Sdes]) 8296271947Sdes 8297271947Sdesdnl aclocal-1.4 backwards compatibility: 8298271947Sdesdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8299271947Sdesdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8300271947Sdes 8301271947Sdes 8302271947Sdes# _LT_WITH_PIC([MODE]) 8303271947Sdes# -------------------- 8304271947Sdes# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8305271947Sdes# LT_INIT options. 8306271947Sdes# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8307271947Sdesm4_define([_LT_WITH_PIC], 8308271947Sdes[AC_ARG_WITH([pic], 8309271947Sdes [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8310271947Sdes [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8311271947Sdes [lt_p=${PACKAGE-default} 8312271947Sdes case $withval in 8313271947Sdes yes|no) pic_mode=$withval ;; 8314271947Sdes *) 8315271947Sdes pic_mode=default 8316271947Sdes # Look at the argument we got. We use all the common list separators. 8317271947Sdes lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8318271947Sdes for lt_pkg in $withval; do 8319271947Sdes IFS="$lt_save_ifs" 8320271947Sdes if test "X$lt_pkg" = "X$lt_p"; then 8321271947Sdes pic_mode=yes 8322271947Sdes fi 8323271947Sdes done 8324271947Sdes IFS="$lt_save_ifs" 8325271947Sdes ;; 8326271947Sdes esac], 8327271947Sdes [pic_mode=default]) 8328271947Sdes 8329271947Sdestest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8330271947Sdes 8331271947Sdes_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8332271947Sdes])# _LT_WITH_PIC 8333271947Sdes 8334271947SdesLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8335271947SdesLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8336271947Sdes 8337271947Sdes# Old name: 8338271947SdesAU_DEFUN([AC_LIBTOOL_PICMODE], 8339271947Sdes[_LT_SET_OPTION([LT_INIT], [pic-only]) 8340271947SdesAC_DIAGNOSE([obsolete], 8341271947Sdes[$0: Remove this warning and the call to _LT_SET_OPTION when you 8342271947Sdesput the `pic-only' option into LT_INIT's first parameter.]) 8343271947Sdes]) 8344271947Sdes 8345271947Sdesdnl aclocal-1.4 backwards compatibility: 8346271947Sdesdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8347271947Sdes 8348271947Sdes 8349271947Sdesm4_define([_LTDL_MODE], []) 8350271947SdesLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8351271947Sdes [m4_define([_LTDL_MODE], [nonrecursive])]) 8352271947SdesLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8353271947Sdes [m4_define([_LTDL_MODE], [recursive])]) 8354271947SdesLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8355271947Sdes [m4_define([_LTDL_MODE], [subproject])]) 8356271947Sdes 8357271947Sdesm4_define([_LTDL_TYPE], []) 8358271947SdesLT_OPTION_DEFINE([LTDL_INIT], [installable], 8359271947Sdes [m4_define([_LTDL_TYPE], [installable])]) 8360271947SdesLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8361271947Sdes [m4_define([_LTDL_TYPE], [convenience])]) 8362271947Sdes 8363271947Sdes# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8364271947Sdes# 8365271947Sdes# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8366271947Sdes# Written by Gary V. Vaughan, 2004 8367271947Sdes# 8368271947Sdes# This file is free software; the Free Software Foundation gives 8369271947Sdes# unlimited permission to copy and/or distribute it, with or without 8370271947Sdes# modifications, as long as this notice is preserved. 8371271947Sdes 8372271947Sdes# serial 6 ltsugar.m4 8373271947Sdes 8374271947Sdes# This is to help aclocal find these macros, as it can't see m4_define. 8375271947SdesAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8376271947Sdes 8377271947Sdes 8378271947Sdes# lt_join(SEP, ARG1, [ARG2...]) 8379271947Sdes# ----------------------------- 8380271947Sdes# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8381271947Sdes# associated separator. 8382271947Sdes# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8383271947Sdes# versions in m4sugar had bugs. 8384271947Sdesm4_define([lt_join], 8385271947Sdes[m4_if([$#], [1], [], 8386271947Sdes [$#], [2], [[$2]], 8387271947Sdes [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8388271947Sdesm4_define([_lt_join], 8389271947Sdes[m4_if([$#$2], [2], [], 8390271947Sdes [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8391271947Sdes 8392271947Sdes 8393271947Sdes# lt_car(LIST) 8394271947Sdes# lt_cdr(LIST) 8395271947Sdes# ------------ 8396271947Sdes# Manipulate m4 lists. 8397271947Sdes# These macros are necessary as long as will still need to support 8398271947Sdes# Autoconf-2.59 which quotes differently. 8399271947Sdesm4_define([lt_car], [[$1]]) 8400271947Sdesm4_define([lt_cdr], 8401271947Sdes[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8402271947Sdes [$#], 1, [], 8403271947Sdes [m4_dquote(m4_shift($@))])]) 8404271947Sdesm4_define([lt_unquote], $1) 8405271947Sdes 8406271947Sdes 8407271947Sdes# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8408271947Sdes# ------------------------------------------ 8409271947Sdes# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8410271947Sdes# Note that neither SEPARATOR nor STRING are expanded; they are appended 8411271947Sdes# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8412271947Sdes# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8413271947Sdes# than defined and empty). 8414271947Sdes# 8415271947Sdes# This macro is needed until we can rely on Autoconf 2.62, since earlier 8416271947Sdes# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8417271947Sdesm4_define([lt_append], 8418271947Sdes[m4_define([$1], 8419271947Sdes m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8420271947Sdes 8421271947Sdes 8422271947Sdes 8423271947Sdes# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8424271947Sdes# ---------------------------------------------------------- 8425271947Sdes# Produce a SEP delimited list of all paired combinations of elements of 8426271947Sdes# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8427271947Sdes# has the form PREFIXmINFIXSUFFIXn. 8428271947Sdes# Needed until we can rely on m4_combine added in Autoconf 2.62. 8429271947Sdesm4_define([lt_combine], 8430271947Sdes[m4_if(m4_eval([$# > 3]), [1], 8431271947Sdes [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8432271947Sdes[[m4_foreach([_Lt_prefix], [$2], 8433271947Sdes [m4_foreach([_Lt_suffix], 8434271947Sdes ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8435271947Sdes [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8436271947Sdes 8437271947Sdes 8438271947Sdes# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8439271947Sdes# ----------------------------------------------------------------------- 8440271947Sdes# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8441271947Sdes# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8442271947Sdesm4_define([lt_if_append_uniq], 8443271947Sdes[m4_ifdef([$1], 8444271947Sdes [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8445271947Sdes [lt_append([$1], [$2], [$3])$4], 8446271947Sdes [$5])], 8447271947Sdes [lt_append([$1], [$2], [$3])$4])]) 8448271947Sdes 8449271947Sdes 8450271947Sdes# lt_dict_add(DICT, KEY, VALUE) 8451271947Sdes# ----------------------------- 8452271947Sdesm4_define([lt_dict_add], 8453271947Sdes[m4_define([$1($2)], [$3])]) 8454271947Sdes 8455271947Sdes 8456271947Sdes# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8457271947Sdes# -------------------------------------------- 8458271947Sdesm4_define([lt_dict_add_subkey], 8459271947Sdes[m4_define([$1($2:$3)], [$4])]) 8460271947Sdes 8461271947Sdes 8462271947Sdes# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8463271947Sdes# ---------------------------------- 8464271947Sdesm4_define([lt_dict_fetch], 8465271947Sdes[m4_ifval([$3], 8466271947Sdes m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8467271947Sdes m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8468271947Sdes 8469271947Sdes 8470271947Sdes# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8471271947Sdes# ----------------------------------------------------------------- 8472271947Sdesm4_define([lt_if_dict_fetch], 8473271947Sdes[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8474271947Sdes [$5], 8475271947Sdes [$6])]) 8476271947Sdes 8477271947Sdes 8478271947Sdes# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8479271947Sdes# -------------------------------------------------------------- 8480271947Sdesm4_define([lt_dict_filter], 8481271947Sdes[m4_if([$5], [], [], 8482271947Sdes [lt_join(m4_quote(m4_default([$4], [[, ]])), 8483271947Sdes lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8484271947Sdes [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8485271947Sdes]) 8486271947Sdes 8487271947Sdes# ltversion.m4 -- version numbers -*- Autoconf -*- 8488271947Sdes# 8489271947Sdes# Copyright (C) 2004 Free Software Foundation, Inc. 8490271947Sdes# Written by Scott James Remnant, 2004 8491271947Sdes# 8492271947Sdes# This file is free software; the Free Software Foundation gives 8493271947Sdes# unlimited permission to copy and/or distribute it, with or without 8494271947Sdes# modifications, as long as this notice is preserved. 8495271947Sdes 8496271947Sdes# @configure_input@ 8497271947Sdes 8498271947Sdes# serial 3337 ltversion.m4 8499271947Sdes# This file is part of GNU Libtool 8500271947Sdes 8501271947Sdesm4_define([LT_PACKAGE_VERSION], [2.4.2]) 8502271947Sdesm4_define([LT_PACKAGE_REVISION], [1.3337]) 8503271947Sdes 8504271947SdesAC_DEFUN([LTVERSION_VERSION], 8505271947Sdes[macro_version='2.4.2' 8506271947Sdesmacro_revision='1.3337' 8507271947Sdes_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8508271947Sdes_LT_DECL(, macro_revision, 0) 8509271947Sdes]) 8510271947Sdes 8511271947Sdes# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8512271947Sdes# 8513271947Sdes# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8514271947Sdes# Written by Scott James Remnant, 2004. 8515271947Sdes# 8516271947Sdes# This file is free software; the Free Software Foundation gives 8517271947Sdes# unlimited permission to copy and/or distribute it, with or without 8518271947Sdes# modifications, as long as this notice is preserved. 8519271947Sdes 8520271947Sdes# serial 5 lt~obsolete.m4 8521271947Sdes 8522271947Sdes# These exist entirely to fool aclocal when bootstrapping libtool. 8523271947Sdes# 8524271947Sdes# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8525271947Sdes# which have later been changed to m4_define as they aren't part of the 8526271947Sdes# exported API, or moved to Autoconf or Automake where they belong. 8527271947Sdes# 8528271947Sdes# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8529271947Sdes# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8530271947Sdes# using a macro with the same name in our local m4/libtool.m4 it'll 8531271947Sdes# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8532271947Sdes# and doesn't know about Autoconf macros at all.) 8533271947Sdes# 8534271947Sdes# So we provide this file, which has a silly filename so it's always 8535271947Sdes# included after everything else. This provides aclocal with the 8536271947Sdes# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8537271947Sdes# because those macros already exist, or will be overwritten later. 8538271947Sdes# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8539271947Sdes# 8540271947Sdes# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8541271947Sdes# Yes, that means every name once taken will need to remain here until 8542271947Sdes# we give up compatibility with versions before 1.7, at which point 8543271947Sdes# we need to keep only those names which we still refer to. 8544271947Sdes 8545271947Sdes# This is to help aclocal find these macros, as it can't see m4_define. 8546271947SdesAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8547271947Sdes 8548271947Sdesm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8549271947Sdesm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8550271947Sdesm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8551271947Sdesm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8552271947Sdesm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8553271947Sdesm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8554271947Sdesm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8555271947Sdesm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8556271947Sdesm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8557271947Sdesm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8558271947Sdesm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8559271947Sdesm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8560271947Sdesm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8561271947Sdesm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8562271947Sdesm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8563271947Sdesm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8564271947Sdesm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8565271947Sdesm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8566271947Sdesm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8567271947Sdesm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8568271947Sdesm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8569271947Sdesm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8570271947Sdesm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8571271947Sdesm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8572271947Sdesm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8573271947Sdesm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8574271947Sdesm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8575271947Sdesm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8576271947Sdesm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8577271947Sdesm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8578271947Sdesm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8579271947Sdesm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8580271947Sdesm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8581271947Sdesm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8582271947Sdesm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8583271947Sdesm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8584271947Sdesm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8585271947Sdesm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8586271947Sdesm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8587271947Sdesm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8588271947Sdesm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8589271947Sdesm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8590271947Sdesm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8591271947Sdesm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8592271947Sdesm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8593271947Sdesm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8594271947Sdesm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8595271947Sdesm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8596271947Sdesm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8597271947Sdesm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8598271947Sdesm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8599271947Sdesm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8600271947Sdesm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8601271947Sdesm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8602271947Sdesm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8603271947Sdesm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8604271947Sdesm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8605271947Sdesm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8606271947Sdesm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8607271947Sdesm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8608271947Sdesm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8609271947Sdes 8610255376Sdes# Copyright (C) 2002-2013 Free Software Foundation, Inc. 8611228692Sdes# 8612174832Sdes# This file is free software; the Free Software Foundation 8613174832Sdes# gives unlimited permission to copy and/or distribute it, 8614174832Sdes# with or without modifications, as long as this notice is preserved. 8615141098Sdes 8616141098Sdes# AM_AUTOMAKE_VERSION(VERSION) 8617141098Sdes# ---------------------------- 8618141098Sdes# Automake X.Y traces this macro to ensure aclocal.m4 has been 8619141098Sdes# generated from the m4 files accompanying Automake X.Y. 8620228692Sdes# (This private macro should not be called outside this file.) 8621228692SdesAC_DEFUN([AM_AUTOMAKE_VERSION], 8622255376Sdes[am__api_version='1.14' 8623228692Sdesdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 8624228692Sdesdnl require some minimum version. Point them to the right macro. 8625255376Sdesm4_if([$1], [1.14], [], 8626228692Sdes [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 8627228692Sdes]) 8628141098Sdes 8629228692Sdes# _AM_AUTOCONF_VERSION(VERSION) 8630228692Sdes# ----------------------------- 8631228692Sdes# aclocal traces this macro to find the Autoconf version. 8632228692Sdes# This is a private macro too. Using m4_define simplifies 8633228692Sdes# the logic in aclocal, which can simply ignore this definition. 8634228692Sdesm4_define([_AM_AUTOCONF_VERSION], []) 8635228692Sdes 8636141098Sdes# AM_SET_CURRENT_AUTOMAKE_VERSION 8637141098Sdes# ------------------------------- 8638228692Sdes# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8639228692Sdes# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 8640141098SdesAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 8641255376Sdes[AM_AUTOMAKE_VERSION([1.14])dnl 8642228692Sdesm4_ifndef([AC_AUTOCONF_VERSION], 8643228692Sdes [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8644228692Sdes_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 8645141098Sdes 8646174832Sdes# AM_AUX_DIR_EXPAND -*- Autoconf -*- 8647117610Sdes 8648255376Sdes# Copyright (C) 2001-2013 Free Software Foundation, Inc. 8649174832Sdes# 8650174832Sdes# This file is free software; the Free Software Foundation 8651174832Sdes# gives unlimited permission to copy and/or distribute it, 8652174832Sdes# with or without modifications, as long as this notice is preserved. 8653141098Sdes 8654117610Sdes# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 8655255376Sdes# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 8656255376Sdes# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 8657117610Sdes# 8658117610Sdes# Of course, Automake must honor this variable whenever it calls a 8659117610Sdes# tool from the auxiliary directory. The problem is that $srcdir (and 8660117610Sdes# therefore $ac_aux_dir as well) can be either absolute or relative, 8661117610Sdes# depending on how configure is run. This is pretty annoying, since 8662117610Sdes# it makes $ac_aux_dir quite unusable in subdirectories: in the top 8663117610Sdes# source directory, any form will work fine, but in subdirectories a 8664117610Sdes# relative path needs to be adjusted first. 8665117610Sdes# 8666117610Sdes# $ac_aux_dir/missing 8667117610Sdes# fails when called from a subdirectory if $ac_aux_dir is relative 8668117610Sdes# $top_srcdir/$ac_aux_dir/missing 8669117610Sdes# fails if $ac_aux_dir is absolute, 8670117610Sdes# fails when called from a subdirectory in a VPATH build with 8671117610Sdes# a relative $ac_aux_dir 8672117610Sdes# 8673117610Sdes# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8674117610Sdes# are both prefixed by $srcdir. In an in-source build this is usually 8675255376Sdes# harmless because $srcdir is '.', but things will broke when you 8676117610Sdes# start a VPATH build or use an absolute $srcdir. 8677117610Sdes# 8678117610Sdes# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 8679117610Sdes# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 8680117610Sdes# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 8681117610Sdes# and then we would define $MISSING as 8682117610Sdes# MISSING="\${SHELL} $am_aux_dir/missing" 8683117610Sdes# This will work as long as MISSING is not called from configure, because 8684117610Sdes# unfortunately $(top_srcdir) has no meaning in configure. 8685117610Sdes# However there are other variables, like CC, which are often used in 8686117610Sdes# configure, and could therefore not use this "fixed" $ac_aux_dir. 8687117610Sdes# 8688117610Sdes# Another solution, used here, is to always expand $ac_aux_dir to an 8689117610Sdes# absolute PATH. The drawback is that using absolute paths prevent a 8690117610Sdes# configured tree to be moved without reconfiguration. 8691117610Sdes 8692141098SdesAC_DEFUN([AM_AUX_DIR_EXPAND], 8693141098Sdes[dnl Rely on autoconf to set up CDPATH properly. 8694141098SdesAC_PREREQ([2.50])dnl 8695117610Sdes# expand $ac_aux_dir to an absolute path 8696141098Sdesam_aux_dir=`cd $ac_aux_dir && pwd` 8697117610Sdes]) 8698117610Sdes 8699174832Sdes# AM_CONDITIONAL -*- Autoconf -*- 8700117610Sdes 8701255376Sdes# Copyright (C) 1997-2013 Free Software Foundation, Inc. 8702174832Sdes# 8703174832Sdes# This file is free software; the Free Software Foundation 8704174832Sdes# gives unlimited permission to copy and/or distribute it, 8705174832Sdes# with or without modifications, as long as this notice is preserved. 8706117610Sdes 8707141098Sdes# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8708141098Sdes# ------------------------------------- 8709141098Sdes# Define a conditional. 8710141098SdesAC_DEFUN([AM_CONDITIONAL], 8711255376Sdes[AC_PREREQ([2.52])dnl 8712255376Sdes m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8713255376Sdes [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8714228692SdesAC_SUBST([$1_TRUE])dnl 8715228692SdesAC_SUBST([$1_FALSE])dnl 8716228692Sdes_AM_SUBST_NOTMAKE([$1_TRUE])dnl 8717228692Sdes_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8718228692Sdesm4_define([_AM_COND_VALUE_$1], [$2])dnl 8719141098Sdesif $2; then 8720141098Sdes $1_TRUE= 8721141098Sdes $1_FALSE='#' 8722141098Sdeselse 8723141098Sdes $1_TRUE='#' 8724141098Sdes $1_FALSE= 8725141098Sdesfi 8726141098SdesAC_CONFIG_COMMANDS_PRE( 8727141098Sdes[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8728174832Sdes AC_MSG_ERROR([[conditional "$1" was never defined. 8729174832SdesUsually this means the macro was only invoked conditionally.]]) 8730141098Sdesfi])]) 8731141098Sdes 8732255376Sdes# Copyright (C) 1999-2013 Free Software Foundation, Inc. 8733174832Sdes# 8734174832Sdes# This file is free software; the Free Software Foundation 8735174832Sdes# gives unlimited permission to copy and/or distribute it, 8736174832Sdes# with or without modifications, as long as this notice is preserved. 8737141098Sdes 8738141098Sdes 8739255376Sdes# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 8740117610Sdes# written in clear, in which case automake, when reading aclocal.m4, 8741117610Sdes# will think it sees a *use*, and therefore will trigger all it's 8742117610Sdes# C support machinery. Also note that it means that autoscan, seeing 8743117610Sdes# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 8744117610Sdes 8745117610Sdes 8746117610Sdes# _AM_DEPENDENCIES(NAME) 8747141098Sdes# ---------------------- 8748117610Sdes# See how the compiler implements dependency checking. 8749255376Sdes# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 8750117610Sdes# We try a few techniques and use that to set a single cache variable. 8751117610Sdes# 8752117610Sdes# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 8753117610Sdes# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 8754117610Sdes# dependency, and given that the user is not expected to run this macro, 8755117610Sdes# just rely on AC_PROG_CC. 8756117610SdesAC_DEFUN([_AM_DEPENDENCIES], 8757117610Sdes[AC_REQUIRE([AM_SET_DEPDIR])dnl 8758117610SdesAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 8759117610SdesAC_REQUIRE([AM_MAKE_INCLUDE])dnl 8760117610SdesAC_REQUIRE([AM_DEP_TRACK])dnl 8761117610Sdes 8762255376Sdesm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 8763255376Sdes [$1], [CXX], [depcc="$CXX" am_compiler_list=], 8764255376Sdes [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 8765255376Sdes [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 8766255376Sdes [$1], [UPC], [depcc="$UPC" am_compiler_list=], 8767255376Sdes [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 8768255376Sdes [depcc="$$1" am_compiler_list=]) 8769117610Sdes 8770117610SdesAC_CACHE_CHECK([dependency style of $depcc], 8771117610Sdes [am_cv_$1_dependencies_compiler_type], 8772117610Sdes[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 8773117610Sdes # We make a subdir and do the tests there. Otherwise we can end up 8774117610Sdes # making bogus files that we don't know about and never remove. For 8775117610Sdes # instance it was reported that on HP-UX the gcc test will end up 8776255376Sdes # making a dummy file named 'D' -- because '-MD' means "put the output 8777255376Sdes # in D". 8778255376Sdes rm -rf conftest.dir 8779117610Sdes mkdir conftest.dir 8780117610Sdes # Copy depcomp to subdir because otherwise we won't find it if we're 8781117610Sdes # using a relative directory. 8782117610Sdes cp "$am_depcomp" conftest.dir 8783117610Sdes cd conftest.dir 8784141098Sdes # We will build objects and dependencies in a subdirectory because 8785141098Sdes # it helps to detect inapplicable dependency modes. For instance 8786141098Sdes # both Tru64's cc and ICC support -MD to output dependencies as a 8787141098Sdes # side effect of compilation, but ICC will put the dependencies in 8788141098Sdes # the current directory while Tru64 will put them in the object 8789141098Sdes # directory. 8790141098Sdes mkdir sub 8791117610Sdes 8792117610Sdes am_cv_$1_dependencies_compiler_type=none 8793117610Sdes if test "$am_compiler_list" = ""; then 8794117610Sdes am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 8795117610Sdes fi 8796228692Sdes am__universal=false 8797228692Sdes m4_case([$1], [CC], 8798228692Sdes [case " $depcc " in #( 8799228692Sdes *\ -arch\ *\ -arch\ *) am__universal=true ;; 8800228692Sdes esac], 8801228692Sdes [CXX], 8802228692Sdes [case " $depcc " in #( 8803228692Sdes *\ -arch\ *\ -arch\ *) am__universal=true ;; 8804228692Sdes esac]) 8805228692Sdes 8806117610Sdes for depmode in $am_compiler_list; do 8807141098Sdes # Setup a source with many dependencies, because some compilers 8808141098Sdes # like to wrap large dependency lists on column 80 (with \), and 8809141098Sdes # we should not choose a depcomp mode which is confused by this. 8810141098Sdes # 8811117610Sdes # We need to recreate these files for each test, as the compiler may 8812117610Sdes # overwrite some of them when testing with obscure command lines. 8813117610Sdes # This happens at least with the AIX C compiler. 8814141098Sdes : > sub/conftest.c 8815141098Sdes for i in 1 2 3 4 5 6; do 8816141098Sdes echo '#include "conftst'$i'.h"' >> sub/conftest.c 8817255376Sdes # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 8818255376Sdes # Solaris 10 /bin/sh. 8819255376Sdes echo '/* dummy */' > sub/conftst$i.h 8820141098Sdes done 8821141098Sdes echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 8822117610Sdes 8823255376Sdes # We check with '-c' and '-o' for the sake of the "dashmstdout" 8824228692Sdes # mode. It turns out that the SunPro C++ compiler does not properly 8825255376Sdes # handle '-M -o', and we need to detect this. Also, some Intel 8826255376Sdes # versions had trouble with output in subdirs. 8827228692Sdes am__obj=sub/conftest.${OBJEXT-o} 8828228692Sdes am__minus_obj="-o $am__obj" 8829117610Sdes case $depmode in 8830228692Sdes gcc) 8831228692Sdes # This depmode causes a compiler race in universal mode. 8832228692Sdes test "$am__universal" = false || continue 8833228692Sdes ;; 8834117610Sdes nosideeffect) 8835255376Sdes # After this tag, mechanisms are not by side-effect, so they'll 8836255376Sdes # only be used when explicitly requested. 8837117610Sdes if test "x$enable_dependency_tracking" = xyes; then 8838117610Sdes continue 8839117610Sdes else 8840117610Sdes break 8841117610Sdes fi 8842117610Sdes ;; 8843255376Sdes msvc7 | msvc7msys | msvisualcpp | msvcmsys) 8844255376Sdes # This compiler won't grok '-c -o', but also, the minuso test has 8845228692Sdes # not run yet. These depmodes are late enough in the game, and 8846228692Sdes # so weak that their functioning should not be impacted. 8847228692Sdes am__obj=conftest.${OBJEXT-o} 8848228692Sdes am__minus_obj= 8849228692Sdes ;; 8850117610Sdes none) break ;; 8851117610Sdes esac 8852117610Sdes if depmode=$depmode \ 8853228692Sdes source=sub/conftest.c object=$am__obj \ 8854141098Sdes depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 8855228692Sdes $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 8856141098Sdes >/dev/null 2>conftest.err && 8857228692Sdes grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 8858141098Sdes grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 8859228692Sdes grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 8860117610Sdes ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 8861141098Sdes # icc doesn't choke on unknown options, it will just issue warnings 8862141098Sdes # or remarks (even with -Werror). So we grep stderr for any message 8863141098Sdes # that says an option was ignored or not supported. 8864141098Sdes # When given -MP, icc 7.0 and 7.1 complain thusly: 8865141098Sdes # icc: Command line warning: ignoring option '-M'; no argument required 8866141098Sdes # The diagnosis changed in icc 8.0: 8867141098Sdes # icc: Command line remark: option '-MP' not supported 8868141098Sdes if (grep 'ignoring option' conftest.err || 8869141098Sdes grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 8870141098Sdes am_cv_$1_dependencies_compiler_type=$depmode 8871141098Sdes break 8872141098Sdes fi 8873117610Sdes fi 8874117610Sdes done 8875117610Sdes 8876117610Sdes cd .. 8877117610Sdes rm -rf conftest.dir 8878117610Sdeselse 8879117610Sdes am_cv_$1_dependencies_compiler_type=none 8880117610Sdesfi 8881117610Sdes]) 8882141098SdesAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 8883141098SdesAM_CONDITIONAL([am__fastdep$1], [ 8884141098Sdes test "x$enable_dependency_tracking" != xno \ 8885141098Sdes && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 8886117610Sdes]) 8887117610Sdes 8888117610Sdes 8889117610Sdes# AM_SET_DEPDIR 8890117610Sdes# ------------- 8891117610Sdes# Choose a directory name for dependency files. 8892255376Sdes# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 8893117610SdesAC_DEFUN([AM_SET_DEPDIR], 8894141098Sdes[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 8895141098SdesAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 8896117610Sdes]) 8897117610Sdes 8898117610Sdes 8899117610Sdes# AM_DEP_TRACK 8900117610Sdes# ------------ 8901117610SdesAC_DEFUN([AM_DEP_TRACK], 8902255376Sdes[AC_ARG_ENABLE([dependency-tracking], [dnl 8903255376SdesAS_HELP_STRING( 8904255376Sdes [--enable-dependency-tracking], 8905255376Sdes [do not reject slow dependency extractors]) 8906255376SdesAS_HELP_STRING( 8907255376Sdes [--disable-dependency-tracking], 8908255376Sdes [speeds up one-time build])]) 8909117610Sdesif test "x$enable_dependency_tracking" != xno; then 8910117610Sdes am_depcomp="$ac_aux_dir/depcomp" 8911117610Sdes AMDEPBACKSLASH='\' 8912255376Sdes am__nodep='_no' 8913117610Sdesfi 8914117610SdesAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 8915228692SdesAC_SUBST([AMDEPBACKSLASH])dnl 8916228692Sdes_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 8917255376SdesAC_SUBST([am__nodep])dnl 8918255376Sdes_AM_SUBST_NOTMAKE([am__nodep])dnl 8919117610Sdes]) 8920117610Sdes 8921174832Sdes# Generate code to set up dependency tracking. -*- Autoconf -*- 8922117610Sdes 8923255376Sdes# Copyright (C) 1999-2013 Free Software Foundation, Inc. 8924174832Sdes# 8925174832Sdes# This file is free software; the Free Software Foundation 8926174832Sdes# gives unlimited permission to copy and/or distribute it, 8927174832Sdes# with or without modifications, as long as this notice is preserved. 8928141098Sdes 8929141098Sdes 8930141098Sdes# _AM_OUTPUT_DEPENDENCY_COMMANDS 8931141098Sdes# ------------------------------ 8932141098SdesAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 8933228692Sdes[{ 8934255376Sdes # Older Autoconf quotes --file arguments for eval, but not when files 8935228692Sdes # are listed without --file. Let's play safe and only enable the eval 8936228692Sdes # if we detect the quoting. 8937228692Sdes case $CONFIG_FILES in 8938228692Sdes *\'*) eval set x "$CONFIG_FILES" ;; 8939228692Sdes *) set x $CONFIG_FILES ;; 8940228692Sdes esac 8941228692Sdes shift 8942228692Sdes for mf 8943228692Sdes do 8944228692Sdes # Strip MF so we end up with the name of the file. 8945228692Sdes mf=`echo "$mf" | sed -e 's/:.*$//'` 8946228692Sdes # Check whether this is an Automake generated Makefile or not. 8947255376Sdes # We used to match only the files named 'Makefile.in', but 8948228692Sdes # some people rename them; so instead we look at the file content. 8949228692Sdes # Grep'ing the first line is not enough: some people post-process 8950228692Sdes # each Makefile.in and add a new line on top of each file to say so. 8951228692Sdes # Grep'ing the whole file is not good either: AIX grep has a line 8952228692Sdes # limit of 2048, but all sed's we know have understand at least 4000. 8953228692Sdes if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 8954228692Sdes dirpart=`AS_DIRNAME("$mf")` 8955228692Sdes else 8956228692Sdes continue 8957228692Sdes fi 8958228692Sdes # Extract the definition of DEPDIR, am__include, and am__quote 8959255376Sdes # from the Makefile without running 'make'. 8960228692Sdes DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 8961228692Sdes test -z "$DEPDIR" && continue 8962228692Sdes am__include=`sed -n 's/^am__include = //p' < "$mf"` 8963255376Sdes test -z "$am__include" && continue 8964228692Sdes am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 8965228692Sdes # Find all dependency output files, they are included files with 8966228692Sdes # $(DEPDIR) in their names. We invoke sed twice because it is the 8967228692Sdes # simplest approach to changing $(DEPDIR) to its actual value in the 8968228692Sdes # expansion. 8969228692Sdes for file in `sed -n " 8970228692Sdes s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 8971255376Sdes sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 8972228692Sdes # Make sure the directory exists. 8973228692Sdes test -f "$dirpart/$file" && continue 8974228692Sdes fdir=`AS_DIRNAME(["$file"])` 8975228692Sdes AS_MKDIR_P([$dirpart/$fdir]) 8976228692Sdes # echo "creating $dirpart/$file" 8977228692Sdes echo '# dummy' > "$dirpart/$file" 8978228692Sdes done 8979117610Sdes done 8980228692Sdes} 8981141098Sdes])# _AM_OUTPUT_DEPENDENCY_COMMANDS 8982117610Sdes 8983141098Sdes 8984141098Sdes# AM_OUTPUT_DEPENDENCY_COMMANDS 8985141098Sdes# ----------------------------- 8986141098Sdes# This macro should only be invoked once -- use via AC_REQUIRE. 8987141098Sdes# 8988141098Sdes# This code is only required when automatic dependency tracking 8989255376Sdes# is enabled. FIXME. This creates each '.P' file that we will 8990141098Sdes# need in order to bootstrap the dependency handling code. 8991141098SdesAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 8992141098Sdes[AC_CONFIG_COMMANDS([depfiles], 8993141098Sdes [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 8994141098Sdes [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 8995141098Sdes]) 8996141098Sdes 8997174832Sdes# Do all the work for Automake. -*- Autoconf -*- 8998141098Sdes 8999255376Sdes# Copyright (C) 1996-2013 Free Software Foundation, Inc. 9000174832Sdes# 9001174832Sdes# This file is free software; the Free Software Foundation 9002174832Sdes# gives unlimited permission to copy and/or distribute it, 9003174832Sdes# with or without modifications, as long as this notice is preserved. 9004141098Sdes 9005174832Sdes# This macro actually does too much. Some checks are only needed if 9006174832Sdes# your package does certain things. But this isn't really a big deal. 9007141098Sdes 9008255376Sdesdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 9009255376Sdesm4_define([AC_PROG_CC], 9010255376Sdesm4_defn([AC_PROG_CC]) 9011255376Sdes[_AM_PROG_CC_C_O 9012255376Sdes]) 9013255376Sdes 9014141098Sdes# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 9015141098Sdes# AM_INIT_AUTOMAKE([OPTIONS]) 9016141098Sdes# ----------------------------------------------- 9017141098Sdes# The call with PACKAGE and VERSION arguments is the old style 9018141098Sdes# call (pre autoconf-2.50), which is being phased out. PACKAGE 9019141098Sdes# and VERSION should now be passed to AC_INIT and removed from 9020141098Sdes# the call to AM_INIT_AUTOMAKE. 9021141098Sdes# We support both call styles for the transition. After 9022141098Sdes# the next Automake release, Autoconf can make the AC_INIT 9023141098Sdes# arguments mandatory, and then we can depend on a new Autoconf 9024141098Sdes# release and drop the old call support. 9025141098SdesAC_DEFUN([AM_INIT_AUTOMAKE], 9026255376Sdes[AC_PREREQ([2.65])dnl 9027141098Sdesdnl Autoconf wants to disallow AM_ names. We explicitly allow 9028141098Sdesdnl the ones we care about. 9029141098Sdesm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 9030141098SdesAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 9031141098SdesAC_REQUIRE([AC_PROG_INSTALL])dnl 9032228692Sdesif test "`cd $srcdir && pwd`" != "`pwd`"; then 9033228692Sdes # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 9034228692Sdes # is not polluted with repeated "-I." 9035228692Sdes AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 9036228692Sdes # test to see if srcdir already configured 9037228692Sdes if test -f $srcdir/config.status; then 9038228692Sdes AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 9039228692Sdes fi 9040141098Sdesfi 9041141098Sdes 9042141098Sdes# test whether we have cygpath 9043141098Sdesif test -z "$CYGPATH_W"; then 9044141098Sdes if (cygpath --version) >/dev/null 2>/dev/null; then 9045141098Sdes CYGPATH_W='cygpath -w' 9046141098Sdes else 9047141098Sdes CYGPATH_W=echo 9048141098Sdes fi 9049141098Sdesfi 9050141098SdesAC_SUBST([CYGPATH_W]) 9051141098Sdes 9052141098Sdes# Define the identity of the package. 9053141098Sdesdnl Distinguish between old-style and new-style calls. 9054141098Sdesm4_ifval([$2], 9055255376Sdes[AC_DIAGNOSE([obsolete], 9056255376Sdes [$0: two- and three-arguments forms are deprecated.]) 9057255376Sdesm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 9058141098Sdes AC_SUBST([PACKAGE], [$1])dnl 9059141098Sdes AC_SUBST([VERSION], [$2])], 9060141098Sdes[_AM_SET_OPTIONS([$1])dnl 9061228692Sdesdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 9062255376Sdesm4_if( 9063255376Sdes m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 9064255376Sdes [ok:ok],, 9065228692Sdes [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 9066141098Sdes AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 9067141098Sdes AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 9068141098Sdes 9069141098Sdes_AM_IF_OPTION([no-define],, 9070255376Sdes[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 9071255376Sdes AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 9072141098Sdes 9073141098Sdes# Some tools Automake needs. 9074141098SdesAC_REQUIRE([AM_SANITY_CHECK])dnl 9075141098SdesAC_REQUIRE([AC_ARG_PROGRAM])dnl 9076255376SdesAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 9077255376SdesAM_MISSING_PROG([AUTOCONF], [autoconf]) 9078255376SdesAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 9079255376SdesAM_MISSING_PROG([AUTOHEADER], [autoheader]) 9080255376SdesAM_MISSING_PROG([MAKEINFO], [makeinfo]) 9081228692SdesAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9082228692SdesAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 9083255376SdesAC_REQUIRE([AC_PROG_MKDIR_P])dnl 9084255376Sdes# For better backward compatibility. To be removed once Automake 1.9.x 9085255376Sdes# dies out for good. For more background, see: 9086255376Sdes# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 9087255376Sdes# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 9088255376SdesAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 9089141098Sdes# We need awk for the "check" target. The system "awk" is bad on 9090141098Sdes# some platforms. 9091141098SdesAC_REQUIRE([AC_PROG_AWK])dnl 9092141098SdesAC_REQUIRE([AC_PROG_MAKE_SET])dnl 9093141098SdesAC_REQUIRE([AM_SET_LEADING_DOT])dnl 9094174832Sdes_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 9095228692Sdes [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 9096228692Sdes [_AM_PROG_TAR([v7])])]) 9097141098Sdes_AM_IF_OPTION([no-dependencies],, 9098141098Sdes[AC_PROVIDE_IFELSE([AC_PROG_CC], 9099255376Sdes [_AM_DEPENDENCIES([CC])], 9100255376Sdes [m4_define([AC_PROG_CC], 9101255376Sdes m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 9102141098SdesAC_PROVIDE_IFELSE([AC_PROG_CXX], 9103255376Sdes [_AM_DEPENDENCIES([CXX])], 9104255376Sdes [m4_define([AC_PROG_CXX], 9105255376Sdes m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 9106228692SdesAC_PROVIDE_IFELSE([AC_PROG_OBJC], 9107255376Sdes [_AM_DEPENDENCIES([OBJC])], 9108255376Sdes [m4_define([AC_PROG_OBJC], 9109255376Sdes m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 9110255376SdesAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 9111255376Sdes [_AM_DEPENDENCIES([OBJCXX])], 9112255376Sdes [m4_define([AC_PROG_OBJCXX], 9113255376Sdes m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 9114141098Sdes]) 9115255376SdesAC_REQUIRE([AM_SILENT_RULES])dnl 9116255376Sdesdnl The testsuite driver may need to know about EXEEXT, so add the 9117255376Sdesdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 9118255376Sdesdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 9119228692SdesAC_CONFIG_COMMANDS_PRE(dnl 9120228692Sdes[m4_provide_if([_AM_COMPILER_EXEEXT], 9121228692Sdes [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 9122141098Sdes 9123255376Sdes# POSIX will say in a future version that running "rm -f" with no argument 9124255376Sdes# is OK; and we want to be able to make that assumption in our Makefile 9125255376Sdes# recipes. So use an aggressive probe to check that the usage we want is 9126255376Sdes# actually supported "in the wild" to an acceptable degree. 9127255376Sdes# See automake bug#10828. 9128255376Sdes# To make any issue more visible, cause the running configure to be aborted 9129255376Sdes# by default if the 'rm' program in use doesn't match our expectations; the 9130255376Sdes# user can still override this though. 9131255376Sdesif rm -f && rm -fr && rm -rf; then : OK; else 9132255376Sdes cat >&2 <<'END' 9133255376SdesOops! 9134255376Sdes 9135255376SdesYour 'rm' program seems unable to run without file operands specified 9136255376Sdeson the command line, even when the '-f' option is present. This is contrary 9137255376Sdesto the behaviour of most rm programs out there, and not conforming with 9138255376Sdesthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 9139255376Sdes 9140255376SdesPlease tell bug-automake@gnu.org about your system, including the value 9141255376Sdesof your $PATH and any error possibly output before this message. This 9142255376Sdescan help us improve future automake versions. 9143255376Sdes 9144255376SdesEND 9145255376Sdes if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 9146255376Sdes echo 'Configuration will proceed anyway, since you have set the' >&2 9147255376Sdes echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 9148255376Sdes echo >&2 9149255376Sdes else 9150255376Sdes cat >&2 <<'END' 9151255376SdesAborting the configuration process, to ensure you take notice of the issue. 9152255376Sdes 9153255376SdesYou can download and install GNU coreutils to get an 'rm' implementation 9154255376Sdesthat behaves properly: <http://www.gnu.org/software/coreutils/>. 9155255376Sdes 9156255376SdesIf you want to complete the configuration process using your problematic 9157255376Sdes'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 9158255376Sdesto "yes", and re-run configure. 9159255376Sdes 9160255376SdesEND 9161255376Sdes AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 9162255376Sdes fi 9163255376Sdesfi]) 9164255376Sdes 9165255376Sdesdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 9166228692Sdesdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 9167228692Sdesdnl mangled by Autoconf and run in a shell conditional statement. 9168228692Sdesm4_define([_AC_COMPILER_EXEEXT], 9169228692Sdesm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 9170141098Sdes 9171141098Sdes# When config.status generates a header, we must update the stamp-h file. 9172141098Sdes# This file resides in the same directory as the config header 9173141098Sdes# that is generated. The stamp files are numbered to have different names. 9174141098Sdes 9175141098Sdes# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 9176141098Sdes# loop where config.status creates the headers, so we can generate 9177141098Sdes# our stamp files there. 9178141098SdesAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 9179141098Sdes[# Compute $1's index in $config_headers. 9180228692Sdes_am_arg=$1 9181141098Sdes_am_stamp_count=1 9182141098Sdesfor _am_header in $config_headers :; do 9183141098Sdes case $_am_header in 9184228692Sdes $_am_arg | $_am_arg:* ) 9185141098Sdes break ;; 9186141098Sdes * ) 9187141098Sdes _am_stamp_count=`expr $_am_stamp_count + 1` ;; 9188141098Sdes esac 9189141098Sdesdone 9190228692Sdesecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 9191141098Sdes 9192255376Sdes# Copyright (C) 2001-2013 Free Software Foundation, Inc. 9193174832Sdes# 9194174832Sdes# This file is free software; the Free Software Foundation 9195174832Sdes# gives unlimited permission to copy and/or distribute it, 9196174832Sdes# with or without modifications, as long as this notice is preserved. 9197174832Sdes 9198141098Sdes# AM_PROG_INSTALL_SH 9199141098Sdes# ------------------ 9200141098Sdes# Define $install_sh. 9201141098SdesAC_DEFUN([AM_PROG_INSTALL_SH], 9202141098Sdes[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9203228692Sdesif test x"${install_sh}" != xset; then 9204228692Sdes case $am_aux_dir in 9205228692Sdes *\ * | *\ *) 9206228692Sdes install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 9207228692Sdes *) 9208228692Sdes install_sh="\${SHELL} $am_aux_dir/install-sh" 9209228692Sdes esac 9210228692Sdesfi 9211255376SdesAC_SUBST([install_sh])]) 9212141098Sdes 9213255376Sdes# Copyright (C) 2003-2013 Free Software Foundation, Inc. 9214174832Sdes# 9215174832Sdes# This file is free software; the Free Software Foundation 9216174832Sdes# gives unlimited permission to copy and/or distribute it, 9217174832Sdes# with or without modifications, as long as this notice is preserved. 9218141098Sdes 9219141098Sdes# Check whether the underlying file-system supports filenames 9220141098Sdes# with a leading dot. For instance MS-DOS doesn't. 9221141098SdesAC_DEFUN([AM_SET_LEADING_DOT], 9222141098Sdes[rm -rf .tst 2>/dev/null 9223141098Sdesmkdir .tst 2>/dev/null 9224141098Sdesif test -d .tst; then 9225141098Sdes am__leading_dot=. 9226141098Sdeselse 9227141098Sdes am__leading_dot=_ 9228141098Sdesfi 9229141098Sdesrmdir .tst 2>/dev/null 9230141098SdesAC_SUBST([am__leading_dot])]) 9231141098Sdes 9232174832Sdes# Check to see how 'make' treats includes. -*- Autoconf -*- 9233141098Sdes 9234255376Sdes# Copyright (C) 2001-2013 Free Software Foundation, Inc. 9235174832Sdes# 9236174832Sdes# This file is free software; the Free Software Foundation 9237174832Sdes# gives unlimited permission to copy and/or distribute it, 9238174832Sdes# with or without modifications, as long as this notice is preserved. 9239141098Sdes 9240117610Sdes# AM_MAKE_INCLUDE() 9241117610Sdes# ----------------- 9242117610Sdes# Check to see how make treats includes. 9243117610SdesAC_DEFUN([AM_MAKE_INCLUDE], 9244117610Sdes[am_make=${MAKE-make} 9245117610Sdescat > confinc << 'END' 9246141098Sdesam__doit: 9247228692Sdes @echo this is the am__doit target 9248141098Sdes.PHONY: am__doit 9249117610SdesEND 9250117610Sdes# If we don't find an include directive, just comment out the code. 9251117610SdesAC_MSG_CHECKING([for style of include used by $am_make]) 9252141098Sdesam__include="#" 9253117610Sdesam__quote= 9254117610Sdes_am_result=none 9255117610Sdes# First try GNU make style include. 9256117610Sdesecho "include confinc" > confmf 9257255376Sdes# Ignore all kinds of additional output from 'make'. 9258228692Sdescase `$am_make -s -f confmf 2> /dev/null` in #( 9259228692Sdes*the\ am__doit\ target*) 9260228692Sdes am__include=include 9261228692Sdes am__quote= 9262228692Sdes _am_result=GNU 9263228692Sdes ;; 9264228692Sdesesac 9265117610Sdes# Now try BSD make style include. 9266117610Sdesif test "$am__include" = "#"; then 9267117610Sdes echo '.include "confinc"' > confmf 9268228692Sdes case `$am_make -s -f confmf 2> /dev/null` in #( 9269228692Sdes *the\ am__doit\ target*) 9270228692Sdes am__include=.include 9271228692Sdes am__quote="\"" 9272228692Sdes _am_result=BSD 9273228692Sdes ;; 9274228692Sdes esac 9275117610Sdesfi 9276141098SdesAC_SUBST([am__include]) 9277141098SdesAC_SUBST([am__quote]) 9278141098SdesAC_MSG_RESULT([$_am_result]) 9279117610Sdesrm -f confinc confmf 9280117610Sdes]) 9281117610Sdes 9282174832Sdes# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 9283141098Sdes 9284255376Sdes# Copyright (C) 1997-2013 Free Software Foundation, Inc. 9285174832Sdes# 9286174832Sdes# This file is free software; the Free Software Foundation 9287174832Sdes# gives unlimited permission to copy and/or distribute it, 9288174832Sdes# with or without modifications, as long as this notice is preserved. 9289141098Sdes 9290141098Sdes# AM_MISSING_PROG(NAME, PROGRAM) 9291141098Sdes# ------------------------------ 9292141098SdesAC_DEFUN([AM_MISSING_PROG], 9293141098Sdes[AC_REQUIRE([AM_MISSING_HAS_RUN]) 9294141098Sdes$1=${$1-"${am_missing_run}$2"} 9295141098SdesAC_SUBST($1)]) 9296141098Sdes 9297141098Sdes# AM_MISSING_HAS_RUN 9298141098Sdes# ------------------ 9299255376Sdes# Define MISSING if not defined so far and test if it is modern enough. 9300255376Sdes# If it is, set am_missing_run to use it, otherwise, to nothing. 9301141098SdesAC_DEFUN([AM_MISSING_HAS_RUN], 9302141098Sdes[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9303228692SdesAC_REQUIRE_AUX_FILE([missing])dnl 9304228692Sdesif test x"${MISSING+set}" != xset; then 9305228692Sdes case $am_aux_dir in 9306228692Sdes *\ * | *\ *) 9307228692Sdes MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 9308228692Sdes *) 9309228692Sdes MISSING="\${SHELL} $am_aux_dir/missing" ;; 9310228692Sdes esac 9311228692Sdesfi 9312141098Sdes# Use eval to expand $SHELL 9313255376Sdesif eval "$MISSING --is-lightweight"; then 9314255376Sdes am_missing_run="$MISSING " 9315141098Sdeselse 9316141098Sdes am_missing_run= 9317255376Sdes AC_MSG_WARN(['missing' script is too old or missing]) 9318141098Sdesfi 9319141098Sdes]) 9320141098Sdes 9321255376Sdes# -*- Autoconf -*- 9322255376Sdes# Obsolete and "removed" macros, that must however still report explicit 9323255376Sdes# error messages when used, to smooth transition. 9324174832Sdes# 9325255376Sdes# Copyright (C) 1996-2013 Free Software Foundation, Inc. 9326255376Sdes# 9327174832Sdes# This file is free software; the Free Software Foundation 9328174832Sdes# gives unlimited permission to copy and/or distribute it, 9329174832Sdes# with or without modifications, as long as this notice is preserved. 9330174832Sdes 9331255376SdesAC_DEFUN([AM_CONFIG_HEADER], 9332255376Sdes[AC_DIAGNOSE([obsolete], 9333255376Sdes['$0': this macro is obsolete. 9334255376SdesYou should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl 9335255376SdesAC_CONFIG_HEADERS($@)]) 9336117610Sdes 9337255376SdesAC_DEFUN([AM_PROG_CC_STDC], 9338255376Sdes[AC_PROG_CC 9339255376Sdesam_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc 9340255376SdesAC_DIAGNOSE([obsolete], 9341255376Sdes['$0': this macro is obsolete. 9342255376SdesYou should simply use the 'AC][_PROG_CC' macro instead. 9343255376SdesAlso, your code should no longer depend upon 'am_cv_prog_cc_stdc', 9344255376Sdesbut upon 'ac_cv_prog_cc_stdc'.])]) 9345255376Sdes 9346255376SdesAC_DEFUN([AM_C_PROTOTYPES], 9347255376Sdes [AC_FATAL([automatic de-ANSI-fication support has been removed])]) 9348255376SdesAU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) 9349255376Sdes 9350174832Sdes# Helper functions for option handling. -*- Autoconf -*- 9351141098Sdes 9352255376Sdes# Copyright (C) 2001-2013 Free Software Foundation, Inc. 9353174832Sdes# 9354174832Sdes# This file is free software; the Free Software Foundation 9355174832Sdes# gives unlimited permission to copy and/or distribute it, 9356174832Sdes# with or without modifications, as long as this notice is preserved. 9357141098Sdes 9358141098Sdes# _AM_MANGLE_OPTION(NAME) 9359141098Sdes# ----------------------- 9360141098SdesAC_DEFUN([_AM_MANGLE_OPTION], 9361141098Sdes[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 9362141098Sdes 9363141098Sdes# _AM_SET_OPTION(NAME) 9364255376Sdes# -------------------- 9365141098Sdes# Set option NAME. Presently that only means defining a flag for this option. 9366141098SdesAC_DEFUN([_AM_SET_OPTION], 9367255376Sdes[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 9368141098Sdes 9369141098Sdes# _AM_SET_OPTIONS(OPTIONS) 9370255376Sdes# ------------------------ 9371141098Sdes# OPTIONS is a space-separated list of Automake options. 9372141098SdesAC_DEFUN([_AM_SET_OPTIONS], 9373228692Sdes[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 9374141098Sdes 9375141098Sdes# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 9376141098Sdes# ------------------------------------------- 9377141098Sdes# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9378141098SdesAC_DEFUN([_AM_IF_OPTION], 9379141098Sdes[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 9380141098Sdes 9381255376Sdes# Copyright (C) 1999-2013 Free Software Foundation, Inc. 9382255376Sdes# 9383255376Sdes# This file is free software; the Free Software Foundation 9384255376Sdes# gives unlimited permission to copy and/or distribute it, 9385255376Sdes# with or without modifications, as long as this notice is preserved. 9386255376Sdes 9387255376Sdes# _AM_PROG_CC_C_O 9388255376Sdes# --------------- 9389255376Sdes# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 9390255376Sdes# to automatically call this. 9391255376SdesAC_DEFUN([_AM_PROG_CC_C_O], 9392255376Sdes[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9393255376SdesAC_REQUIRE_AUX_FILE([compile])dnl 9394255376SdesAC_LANG_PUSH([C])dnl 9395255376SdesAC_CACHE_CHECK( 9396255376Sdes [whether $CC understands -c and -o together], 9397255376Sdes [am_cv_prog_cc_c_o], 9398255376Sdes [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 9399255376Sdes # Make sure it works both with $CC and with simple cc. 9400255376Sdes # Following AC_PROG_CC_C_O, we do the test twice because some 9401255376Sdes # compilers refuse to overwrite an existing .o file with -o, 9402255376Sdes # though they will create one. 9403255376Sdes am_cv_prog_cc_c_o=yes 9404255376Sdes for am_i in 1 2; do 9405255376Sdes if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 9406255376Sdes && test -f conftest2.$ac_objext; then 9407255376Sdes : OK 9408255376Sdes else 9409255376Sdes am_cv_prog_cc_c_o=no 9410255376Sdes break 9411255376Sdes fi 9412255376Sdes done 9413255376Sdes rm -f core conftest* 9414255376Sdes unset am_i]) 9415255376Sdesif test "$am_cv_prog_cc_c_o" != yes; then 9416255376Sdes # Losing compiler, so override with the script. 9417255376Sdes # FIXME: It is wrong to rewrite CC. 9418255376Sdes # But if we don't then we get into trouble of one sort or another. 9419255376Sdes # A longer-term fix would be to have automake use am__CC in this case, 9420255376Sdes # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 9421255376Sdes CC="$am_aux_dir/compile $CC" 9422255376Sdesfi 9423255376SdesAC_LANG_POP([C])]) 9424255376Sdes 9425255376Sdes# For backward compatibility. 9426255376SdesAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 9427255376Sdes 9428255376Sdes# Copyright (C) 2001-2013 Free Software Foundation, Inc. 9429255376Sdes# 9430255376Sdes# This file is free software; the Free Software Foundation 9431255376Sdes# gives unlimited permission to copy and/or distribute it, 9432255376Sdes# with or without modifications, as long as this notice is preserved. 9433255376Sdes 9434255376Sdes# AM_RUN_LOG(COMMAND) 9435255376Sdes# ------------------- 9436255376Sdes# Run COMMAND, save the exit status in ac_status, and log it. 9437255376Sdes# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 9438255376SdesAC_DEFUN([AM_RUN_LOG], 9439255376Sdes[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 9440255376Sdes ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 9441255376Sdes ac_status=$? 9442255376Sdes echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 9443255376Sdes (exit $ac_status); }]) 9444255376Sdes 9445174832Sdes# Check to make sure that the build environment is sane. -*- Autoconf -*- 9446174832Sdes 9447255376Sdes# Copyright (C) 1996-2013 Free Software Foundation, Inc. 9448141098Sdes# 9449174832Sdes# This file is free software; the Free Software Foundation 9450174832Sdes# gives unlimited permission to copy and/or distribute it, 9451174832Sdes# with or without modifications, as long as this notice is preserved. 9452141098Sdes 9453141098Sdes# AM_SANITY_CHECK 9454141098Sdes# --------------- 9455141098SdesAC_DEFUN([AM_SANITY_CHECK], 9456141098Sdes[AC_MSG_CHECKING([whether build environment is sane]) 9457228692Sdes# Reject unsafe characters in $srcdir or the absolute working directory 9458228692Sdes# name. Accept space and tab only in the latter. 9459228692Sdesam_lf=' 9460228692Sdes' 9461228692Sdescase `pwd` in 9462228692Sdes *[[\\\"\#\$\&\'\`$am_lf]]*) 9463228692Sdes AC_MSG_ERROR([unsafe absolute working directory name]);; 9464228692Sdesesac 9465228692Sdescase $srcdir in 9466228692Sdes *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 9467255376Sdes AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 9468228692Sdesesac 9469228692Sdes 9470255376Sdes# Do 'set' in a subshell so we don't clobber the current shell's 9471141098Sdes# arguments. Must try -L first in case configure is actually a 9472141098Sdes# symlink; some systems play weird games with the mod time of symlinks 9473141098Sdes# (eg FreeBSD returns the mod time of the symlink's containing 9474141098Sdes# directory). 9475141098Sdesif ( 9476255376Sdes am_has_slept=no 9477255376Sdes for am_try in 1 2; do 9478255376Sdes echo "timestamp, slept: $am_has_slept" > conftest.file 9479255376Sdes set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 9480255376Sdes if test "$[*]" = "X"; then 9481255376Sdes # -L didn't work. 9482255376Sdes set X `ls -t "$srcdir/configure" conftest.file` 9483255376Sdes fi 9484255376Sdes if test "$[*]" != "X $srcdir/configure conftest.file" \ 9485255376Sdes && test "$[*]" != "X conftest.file $srcdir/configure"; then 9486141098Sdes 9487255376Sdes # If neither matched, then we have a broken ls. This can happen 9488255376Sdes # if, for instance, CONFIG_SHELL is bash and it inherits a 9489255376Sdes # broken ls alias from the environment. This has actually 9490255376Sdes # happened. Such a system could not be considered "sane". 9491255376Sdes AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 9492255376Sdes alias in your environment]) 9493255376Sdes fi 9494255376Sdes if test "$[2]" = conftest.file || test $am_try -eq 2; then 9495255376Sdes break 9496255376Sdes fi 9497255376Sdes # Just in case. 9498255376Sdes sleep 1 9499255376Sdes am_has_slept=yes 9500255376Sdes done 9501141098Sdes test "$[2]" = conftest.file 9502141098Sdes ) 9503141098Sdesthen 9504141098Sdes # Ok. 9505141098Sdes : 9506141098Sdeselse 9507141098Sdes AC_MSG_ERROR([newly created file is older than distributed files! 9508141098SdesCheck your system clock]) 9509141098Sdesfi 9510255376SdesAC_MSG_RESULT([yes]) 9511255376Sdes# If we didn't sleep, we still need to ensure time stamps of config.status and 9512255376Sdes# generated files are strictly newer. 9513255376Sdesam_sleep_pid= 9514255376Sdesif grep 'slept: no' conftest.file >/dev/null 2>&1; then 9515255376Sdes ( sleep 1 ) & 9516255376Sdes am_sleep_pid=$! 9517255376Sdesfi 9518255376SdesAC_CONFIG_COMMANDS_PRE( 9519255376Sdes [AC_MSG_CHECKING([that generated files are newer than configure]) 9520255376Sdes if test -n "$am_sleep_pid"; then 9521255376Sdes # Hide warnings about reused PIDs. 9522255376Sdes wait $am_sleep_pid 2>/dev/null 9523255376Sdes fi 9524255376Sdes AC_MSG_RESULT([done])]) 9525255376Sdesrm -f conftest.file 9526255376Sdes]) 9527141098Sdes 9528255376Sdes# Copyright (C) 2009-2013 Free Software Foundation, Inc. 9529174832Sdes# 9530174832Sdes# This file is free software; the Free Software Foundation 9531174832Sdes# gives unlimited permission to copy and/or distribute it, 9532174832Sdes# with or without modifications, as long as this notice is preserved. 9533174832Sdes 9534255376Sdes# AM_SILENT_RULES([DEFAULT]) 9535255376Sdes# -------------------------- 9536255376Sdes# Enable less verbose build rules; with the default set to DEFAULT 9537255376Sdes# ("yes" being less verbose, "no" or empty being verbose). 9538255376SdesAC_DEFUN([AM_SILENT_RULES], 9539255376Sdes[AC_ARG_ENABLE([silent-rules], [dnl 9540255376SdesAS_HELP_STRING( 9541255376Sdes [--enable-silent-rules], 9542255376Sdes [less verbose build output (undo: "make V=1")]) 9543255376SdesAS_HELP_STRING( 9544255376Sdes [--disable-silent-rules], 9545255376Sdes [verbose build output (undo: "make V=0")])dnl 9546255376Sdes]) 9547255376Sdescase $enable_silent_rules in @%:@ ((( 9548255376Sdes yes) AM_DEFAULT_VERBOSITY=0;; 9549255376Sdes no) AM_DEFAULT_VERBOSITY=1;; 9550255376Sdes *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 9551255376Sdesesac 9552255376Sdesdnl 9553255376Sdesdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 9554255376Sdesdnl do not support nested variable expansions. 9555255376Sdesdnl See automake bug#9928 and bug#10237. 9556255376Sdesam_make=${MAKE-make} 9557255376SdesAC_CACHE_CHECK([whether $am_make supports nested variables], 9558255376Sdes [am_cv_make_support_nested_variables], 9559255376Sdes [if AS_ECHO([['TRUE=$(BAR$(V)) 9560255376SdesBAR0=false 9561255376SdesBAR1=true 9562255376SdesV=1 9563255376Sdesam__doit: 9564255376Sdes @$(TRUE) 9565255376Sdes.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 9566255376Sdes am_cv_make_support_nested_variables=yes 9567255376Sdeselse 9568255376Sdes am_cv_make_support_nested_variables=no 9569255376Sdesfi]) 9570255376Sdesif test $am_cv_make_support_nested_variables = yes; then 9571255376Sdes dnl Using '$V' instead of '$(V)' breaks IRIX make. 9572255376Sdes AM_V='$(V)' 9573255376Sdes AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 9574255376Sdeselse 9575255376Sdes AM_V=$AM_DEFAULT_VERBOSITY 9576255376Sdes AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 9577255376Sdesfi 9578255376SdesAC_SUBST([AM_V])dnl 9579255376SdesAM_SUBST_NOTMAKE([AM_V])dnl 9580255376SdesAC_SUBST([AM_DEFAULT_V])dnl 9581255376SdesAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 9582255376SdesAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 9583255376SdesAM_BACKSLASH='\' 9584255376SdesAC_SUBST([AM_BACKSLASH])dnl 9585255376Sdes_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 9586255376Sdes]) 9587255376Sdes 9588255376Sdes# Copyright (C) 2001-2013 Free Software Foundation, Inc. 9589255376Sdes# 9590255376Sdes# This file is free software; the Free Software Foundation 9591255376Sdes# gives unlimited permission to copy and/or distribute it, 9592255376Sdes# with or without modifications, as long as this notice is preserved. 9593255376Sdes 9594141098Sdes# AM_PROG_INSTALL_STRIP 9595174832Sdes# --------------------- 9596255376Sdes# One issue with vendor 'install' (even GNU) is that you can't 9597141098Sdes# specify the program used to strip binaries. This is especially 9598141098Sdes# annoying in cross-compiling environments, where the build's strip 9599141098Sdes# is unlikely to handle the host's binaries. 9600141098Sdes# Fortunately install-sh will honor a STRIPPROG variable, so we 9601255376Sdes# always use install-sh in "make install-strip", and initialize 9602141098Sdes# STRIPPROG with the value of the STRIP variable (set by the user). 9603141098SdesAC_DEFUN([AM_PROG_INSTALL_STRIP], 9604141098Sdes[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9605255376Sdes# Installed binaries are usually stripped using 'strip' when the user 9606255376Sdes# run "make install-strip". However 'strip' might not be the right 9607141098Sdes# tool to use in cross-compilation environments, therefore Automake 9608255376Sdes# will honor the 'STRIP' environment variable to overrule this program. 9609255376Sdesdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 9610141098Sdesif test "$cross_compiling" != no; then 9611141098Sdes AC_CHECK_TOOL([STRIP], [strip], :) 9612141098Sdesfi 9613228692SdesINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9614141098SdesAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9615141098Sdes 9616255376Sdes# Copyright (C) 2006-2013 Free Software Foundation, Inc. 9617228692Sdes# 9618228692Sdes# This file is free software; the Free Software Foundation 9619228692Sdes# gives unlimited permission to copy and/or distribute it, 9620228692Sdes# with or without modifications, as long as this notice is preserved. 9621228692Sdes 9622228692Sdes# _AM_SUBST_NOTMAKE(VARIABLE) 9623228692Sdes# --------------------------- 9624228692Sdes# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9625228692Sdes# This macro is traced by Automake. 9626228692SdesAC_DEFUN([_AM_SUBST_NOTMAKE]) 9627228692Sdes 9628228692Sdes# AM_SUBST_NOTMAKE(VARIABLE) 9629255376Sdes# -------------------------- 9630228692Sdes# Public sister of _AM_SUBST_NOTMAKE. 9631228692SdesAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9632228692Sdes 9633174832Sdes# Check how to create a tarball. -*- Autoconf -*- 9634174832Sdes 9635255376Sdes# Copyright (C) 2004-2013 Free Software Foundation, Inc. 9636174832Sdes# 9637174832Sdes# This file is free software; the Free Software Foundation 9638174832Sdes# gives unlimited permission to copy and/or distribute it, 9639174832Sdes# with or without modifications, as long as this notice is preserved. 9640174832Sdes 9641174832Sdes# _AM_PROG_TAR(FORMAT) 9642174832Sdes# -------------------- 9643174832Sdes# Check how to create a tarball in format FORMAT. 9644255376Sdes# FORMAT should be one of 'v7', 'ustar', or 'pax'. 9645174832Sdes# 9646174832Sdes# Substitute a variable $(am__tar) that is a command 9647174832Sdes# writing to stdout a FORMAT-tarball containing the directory 9648174832Sdes# $tardir. 9649174832Sdes# tardir=directory && $(am__tar) > result.tar 9650174832Sdes# 9651174832Sdes# Substitute a variable $(am__untar) that extract such 9652174832Sdes# a tarball read from stdin. 9653174832Sdes# $(am__untar) < result.tar 9654255376Sdes# 9655174832SdesAC_DEFUN([_AM_PROG_TAR], 9656255376Sdes[# Always define AMTAR for backward compatibility. Yes, it's still used 9657255376Sdes# in the wild :-( We should find a proper way to deprecate it ... 9658255376SdesAC_SUBST([AMTAR], ['$${TAR-tar}']) 9659255376Sdes 9660255376Sdes# We'll loop over all known methods to create a tar archive until one works. 9661174832Sdes_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9662174832Sdes 9663255376Sdesm4_if([$1], [v7], 9664255376Sdes [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 9665174832Sdes 9666255376Sdes [m4_case([$1], 9667255376Sdes [ustar], 9668255376Sdes [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 9669255376Sdes # There is notably a 21 bits limit for the UID and the GID. In fact, 9670255376Sdes # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 9671255376Sdes # and bug#13588). 9672255376Sdes am_max_uid=2097151 # 2^21 - 1 9673255376Sdes am_max_gid=$am_max_uid 9674255376Sdes # The $UID and $GID variables are not portable, so we need to resort 9675255376Sdes # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 9676255376Sdes # below are definitely unexpected, so allow the users to see them 9677255376Sdes # (that is, avoid stderr redirection). 9678255376Sdes am_uid=`id -u || echo unknown` 9679255376Sdes am_gid=`id -g || echo unknown` 9680255376Sdes AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 9681255376Sdes if test $am_uid -le $am_max_uid; then 9682255376Sdes AC_MSG_RESULT([yes]) 9683255376Sdes else 9684255376Sdes AC_MSG_RESULT([no]) 9685255376Sdes _am_tools=none 9686255376Sdes fi 9687255376Sdes AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 9688255376Sdes if test $am_gid -le $am_max_gid; then 9689255376Sdes AC_MSG_RESULT([yes]) 9690255376Sdes else 9691255376Sdes AC_MSG_RESULT([no]) 9692255376Sdes _am_tools=none 9693255376Sdes fi], 9694255376Sdes 9695255376Sdes [pax], 9696255376Sdes [], 9697255376Sdes 9698255376Sdes [m4_fatal([Unknown tar format])]) 9699255376Sdes 9700255376Sdes AC_MSG_CHECKING([how to create a $1 tar archive]) 9701255376Sdes 9702255376Sdes # Go ahead even if we have the value already cached. We do so because we 9703255376Sdes # need to set the values for the 'am__tar' and 'am__untar' variables. 9704255376Sdes _am_tools=${am_cv_prog_tar_$1-$_am_tools} 9705255376Sdes 9706255376Sdes for _am_tool in $_am_tools; do 9707255376Sdes case $_am_tool in 9708255376Sdes gnutar) 9709255376Sdes for _am_tar in tar gnutar gtar; do 9710255376Sdes AM_RUN_LOG([$_am_tar --version]) && break 9711255376Sdes done 9712255376Sdes am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9713255376Sdes am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9714255376Sdes am__untar="$_am_tar -xf -" 9715255376Sdes ;; 9716255376Sdes plaintar) 9717255376Sdes # Must skip GNU tar: if it does not support --format= it doesn't create 9718255376Sdes # ustar tarball either. 9719255376Sdes (tar --version) >/dev/null 2>&1 && continue 9720255376Sdes am__tar='tar chf - "$$tardir"' 9721255376Sdes am__tar_='tar chf - "$tardir"' 9722255376Sdes am__untar='tar xf -' 9723255376Sdes ;; 9724255376Sdes pax) 9725255376Sdes am__tar='pax -L -x $1 -w "$$tardir"' 9726255376Sdes am__tar_='pax -L -x $1 -w "$tardir"' 9727255376Sdes am__untar='pax -r' 9728255376Sdes ;; 9729255376Sdes cpio) 9730255376Sdes am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9731255376Sdes am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9732255376Sdes am__untar='cpio -i -H $1 -d' 9733255376Sdes ;; 9734255376Sdes none) 9735255376Sdes am__tar=false 9736255376Sdes am__tar_=false 9737255376Sdes am__untar=false 9738255376Sdes ;; 9739255376Sdes esac 9740255376Sdes 9741255376Sdes # If the value was cached, stop now. We just wanted to have am__tar 9742255376Sdes # and am__untar set. 9743255376Sdes test -n "${am_cv_prog_tar_$1}" && break 9744255376Sdes 9745255376Sdes # tar/untar a dummy directory, and stop if the command works. 9746255376Sdes rm -rf conftest.dir 9747255376Sdes mkdir conftest.dir 9748255376Sdes echo GrepMe > conftest.dir/file 9749255376Sdes AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 9750255376Sdes rm -rf conftest.dir 9751255376Sdes if test -s conftest.tar; then 9752255376Sdes AM_RUN_LOG([$am__untar <conftest.tar]) 9753255376Sdes AM_RUN_LOG([cat conftest.dir/file]) 9754255376Sdes grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 9755255376Sdes fi 9756255376Sdes done 9757174832Sdes rm -rf conftest.dir 9758174832Sdes 9759255376Sdes AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 9760255376Sdes AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 9761255376Sdes 9762174832SdesAC_SUBST([am__tar]) 9763174832SdesAC_SUBST([am__untar]) 9764174832Sdes]) # _AM_PROG_TAR 9765174832Sdes 9766