1fb570538Smrg# generated automatically by aclocal 1.16.1 -*- Autoconf -*- 2a4f78defSmrg 3fb570538Smrg# Copyright (C) 1996-2018 Free Software Foundation, Inc. 4a4f78defSmrg 5a4f78defSmrg# This file is free software; the Free Software Foundation 6a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 7a4f78defSmrg# with or without modifications, as long as this notice is preserved. 8a4f78defSmrg 9a4f78defSmrg# This program is distributed in the hope that it will be useful, 10a4f78defSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11a4f78defSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12a4f78defSmrg# PARTICULAR PURPOSE. 13a4f78defSmrg 14a4f78defSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15a4f78defSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16a4f78defSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17a4f78defSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18a4f78defSmrg[m4_warning([this file was generated for autoconf 2.69. 19a4f78defSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20a4f78defSmrgIf you have problems, you may need to regenerate the build system entirely. 21a4f78defSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22a4f78defSmrg 23a4f78defSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24a4f78defSmrg# 25fb570538Smrg# Copyright (C) 1996-2001, 2003-2018 Free Software Foundation, Inc. 26a4f78defSmrg# Written by Gordon Matzigkeit, 1996 27a4f78defSmrg# 28a4f78defSmrg# This file is free software; the Free Software Foundation gives 29a4f78defSmrg# unlimited permission to copy and/or distribute it, with or without 30a4f78defSmrg# modifications, as long as this notice is preserved. 31a4f78defSmrg 32a4f78defSmrgm4_define([_LT_COPYING], [dnl 33a4f78defSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 34a4f78defSmrg# This is free software; see the source for copying conditions. There is NO 35a4f78defSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 36a4f78defSmrg 37a4f78defSmrg# GNU Libtool is free software; you can redistribute it and/or modify 38a4f78defSmrg# it under the terms of the GNU General Public License as published by 39a4f78defSmrg# the Free Software Foundation; either version 2 of of the License, or 40a4f78defSmrg# (at your option) any later version. 41a4f78defSmrg# 42a4f78defSmrg# As a special exception to the GNU General Public License, if you 43a4f78defSmrg# distribute this file as part of a program or library that is built 44a4f78defSmrg# using GNU Libtool, you may include this file under the same 45a4f78defSmrg# distribution terms that you use for the rest of that program. 46a4f78defSmrg# 47a4f78defSmrg# GNU Libtool is distributed in the hope that it will be useful, but 48a4f78defSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 49a4f78defSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 50a4f78defSmrg# GNU General Public License for more details. 51a4f78defSmrg# 52a4f78defSmrg# You should have received a copy of the GNU General Public License 53a4f78defSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 54a4f78defSmrg]) 55a4f78defSmrg 56a4f78defSmrg# serial 58 LT_INIT 57a4f78defSmrg 58a4f78defSmrg 59a4f78defSmrg# LT_PREREQ(VERSION) 60a4f78defSmrg# ------------------ 61a4f78defSmrg# Complain and exit if this libtool version is less that VERSION. 62a4f78defSmrgm4_defun([LT_PREREQ], 63a4f78defSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 64a4f78defSmrg [m4_default([$3], 65a4f78defSmrg [m4_fatal([Libtool version $1 or higher is required], 66a4f78defSmrg 63)])], 67a4f78defSmrg [$2])]) 68a4f78defSmrg 69a4f78defSmrg 70a4f78defSmrg# _LT_CHECK_BUILDDIR 71a4f78defSmrg# ------------------ 72a4f78defSmrg# Complain if the absolute build directory name contains unusual characters 73a4f78defSmrgm4_defun([_LT_CHECK_BUILDDIR], 74a4f78defSmrg[case `pwd` in 75a4f78defSmrg *\ * | *\ *) 76a4f78defSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 77a4f78defSmrgesac 78a4f78defSmrg]) 79a4f78defSmrg 80a4f78defSmrg 81a4f78defSmrg# LT_INIT([OPTIONS]) 82a4f78defSmrg# ------------------ 83a4f78defSmrgAC_DEFUN([LT_INIT], 84a4f78defSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 85a4f78defSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 86a4f78defSmrgAC_BEFORE([$0], [LT_LANG])dnl 87a4f78defSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 88a4f78defSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 89a4f78defSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 90a4f78defSmrg 91a4f78defSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 92a4f78defSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 93a4f78defSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 94a4f78defSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 95a4f78defSmrgdnl unless we require an AC_DEFUNed macro: 96a4f78defSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 97a4f78defSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 98a4f78defSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 99a4f78defSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 100a4f78defSmrgm4_require([_LT_PROG_LTMAIN])dnl 101a4f78defSmrg 102a4f78defSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 103a4f78defSmrg 104a4f78defSmrgdnl Parse OPTIONS 105a4f78defSmrg_LT_SET_OPTIONS([$0], [$1]) 106a4f78defSmrg 107a4f78defSmrg# This can be used to rebuild libtool when needed 108a4f78defSmrgLIBTOOL_DEPS=$ltmain 109a4f78defSmrg 110a4f78defSmrg# Always use our own libtool. 111a4f78defSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 112a4f78defSmrgAC_SUBST(LIBTOOL)dnl 113a4f78defSmrg 114a4f78defSmrg_LT_SETUP 115a4f78defSmrg 116a4f78defSmrg# Only expand once: 117a4f78defSmrgm4_define([LT_INIT]) 118a4f78defSmrg])# LT_INIT 119a4f78defSmrg 120a4f78defSmrg# Old names: 121a4f78defSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 122a4f78defSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 123a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 124a4f78defSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 125a4f78defSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 126a4f78defSmrg 127a4f78defSmrg 128a4f78defSmrg# _LT_PREPARE_CC_BASENAME 129a4f78defSmrg# ----------------------- 130a4f78defSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 131a4f78defSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 132a4f78defSmrgfunc_cc_basename () 133a4f78defSmrg{ 134a4f78defSmrg for cc_temp in @S|@*""; do 135a4f78defSmrg case $cc_temp in 136a4f78defSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137a4f78defSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138a4f78defSmrg \-*) ;; 139a4f78defSmrg *) break;; 140a4f78defSmrg esac 141a4f78defSmrg done 142a4f78defSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 143a4f78defSmrg} 144a4f78defSmrg])# _LT_PREPARE_CC_BASENAME 145a4f78defSmrg 146a4f78defSmrg 147a4f78defSmrg# _LT_CC_BASENAME(CC) 148a4f78defSmrg# ------------------- 149a4f78defSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 150a4f78defSmrg# but that macro is also expanded into generated libtool script, which 151a4f78defSmrg# arranges for $SED and $ECHO to be set by different means. 152a4f78defSmrgm4_defun([_LT_CC_BASENAME], 153a4f78defSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 154a4f78defSmrgAC_REQUIRE([_LT_DECL_SED])dnl 155a4f78defSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 156a4f78defSmrgfunc_cc_basename $1 157a4f78defSmrgcc_basename=$func_cc_basename_result 158a4f78defSmrg]) 159a4f78defSmrg 160a4f78defSmrg 161a4f78defSmrg# _LT_FILEUTILS_DEFAULTS 162a4f78defSmrg# ---------------------- 163a4f78defSmrg# It is okay to use these file commands and assume they have been set 164a4f78defSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 165a4f78defSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 166a4f78defSmrg[: ${CP="cp -f"} 167a4f78defSmrg: ${MV="mv -f"} 168a4f78defSmrg: ${RM="rm -f"} 169a4f78defSmrg])# _LT_FILEUTILS_DEFAULTS 170a4f78defSmrg 171a4f78defSmrg 172a4f78defSmrg# _LT_SETUP 173a4f78defSmrg# --------- 174a4f78defSmrgm4_defun([_LT_SETUP], 175a4f78defSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 176a4f78defSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 177a4f78defSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 178a4f78defSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 179a4f78defSmrg 180a4f78defSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 181a4f78defSmrgdnl 182a4f78defSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 183a4f78defSmrg_LT_DECL([], [host], [0])dnl 184a4f78defSmrg_LT_DECL([], [host_os], [0])dnl 185a4f78defSmrgdnl 186a4f78defSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 187a4f78defSmrg_LT_DECL([], [build], [0])dnl 188a4f78defSmrg_LT_DECL([], [build_os], [0])dnl 189a4f78defSmrgdnl 190a4f78defSmrgAC_REQUIRE([AC_PROG_CC])dnl 191a4f78defSmrgAC_REQUIRE([LT_PATH_LD])dnl 192a4f78defSmrgAC_REQUIRE([LT_PATH_NM])dnl 193a4f78defSmrgdnl 194a4f78defSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 195a4f78defSmrgtest -z "$LN_S" && LN_S="ln -s" 196a4f78defSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 197a4f78defSmrgdnl 198a4f78defSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 199a4f78defSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 200a4f78defSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 201a4f78defSmrgdnl 202a4f78defSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 203a4f78defSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 204a4f78defSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 205a4f78defSmrgm4_require([_LT_CMD_RELOAD])dnl 206a4f78defSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 207a4f78defSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 208a4f78defSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 209a4f78defSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 210a4f78defSmrgm4_require([_LT_WITH_SYSROOT])dnl 211a4f78defSmrgm4_require([_LT_CMD_TRUNCATE])dnl 212a4f78defSmrg 213a4f78defSmrg_LT_CONFIG_LIBTOOL_INIT([ 214a4f78defSmrg# See if we are running on zsh, and set the options that allow our 215a4f78defSmrg# commands through without removal of \ escapes INIT. 216a4f78defSmrgif test -n "\${ZSH_VERSION+set}"; then 217a4f78defSmrg setopt NO_GLOB_SUBST 218a4f78defSmrgfi 219a4f78defSmrg]) 220a4f78defSmrgif test -n "${ZSH_VERSION+set}"; then 221a4f78defSmrg setopt NO_GLOB_SUBST 222a4f78defSmrgfi 223a4f78defSmrg 224a4f78defSmrg_LT_CHECK_OBJDIR 225a4f78defSmrg 226a4f78defSmrgm4_require([_LT_TAG_COMPILER])dnl 227a4f78defSmrg 228a4f78defSmrgcase $host_os in 229a4f78defSmrgaix3*) 230a4f78defSmrg # AIX sometimes has problems with the GCC collect2 program. For some 231a4f78defSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 232a4f78defSmrg # vanish in a puff of smoke. 233a4f78defSmrg if test set != "${COLLECT_NAMES+set}"; then 234a4f78defSmrg COLLECT_NAMES= 235a4f78defSmrg export COLLECT_NAMES 236a4f78defSmrg fi 237a4f78defSmrg ;; 238a4f78defSmrgesac 239a4f78defSmrg 240a4f78defSmrg# Global variables: 241a4f78defSmrgofile=libtool 242a4f78defSmrgcan_build_shared=yes 243a4f78defSmrg 244fb570538Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 245fb570538Smrg# ICC, which need '.lib'). 246a4f78defSmrglibext=a 247a4f78defSmrg 248a4f78defSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 249a4f78defSmrg 250a4f78defSmrgold_CC=$CC 251a4f78defSmrgold_CFLAGS=$CFLAGS 252a4f78defSmrg 253a4f78defSmrg# Set sane defaults for various variables 254a4f78defSmrgtest -z "$CC" && CC=cc 255a4f78defSmrgtest -z "$LTCC" && LTCC=$CC 256a4f78defSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 257a4f78defSmrgtest -z "$LD" && LD=ld 258a4f78defSmrgtest -z "$ac_objext" && ac_objext=o 259a4f78defSmrg 260a4f78defSmrg_LT_CC_BASENAME([$compiler]) 261a4f78defSmrg 262a4f78defSmrg# Only perform the check for file, if the check method requires it 263a4f78defSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 264a4f78defSmrgcase $deplibs_check_method in 265a4f78defSmrgfile_magic*) 266a4f78defSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 267a4f78defSmrg _LT_PATH_MAGIC 268a4f78defSmrg fi 269a4f78defSmrg ;; 270a4f78defSmrgesac 271a4f78defSmrg 272a4f78defSmrg# Use C for the default configuration in the libtool script 273a4f78defSmrgLT_SUPPORTED_TAG([CC]) 274a4f78defSmrg_LT_LANG_C_CONFIG 275a4f78defSmrg_LT_LANG_DEFAULT_CONFIG 276a4f78defSmrg_LT_CONFIG_COMMANDS 277a4f78defSmrg])# _LT_SETUP 278a4f78defSmrg 279a4f78defSmrg 280a4f78defSmrg# _LT_PREPARE_SED_QUOTE_VARS 281a4f78defSmrg# -------------------------- 282a4f78defSmrg# Define a few sed substitution that help us do robust quoting. 283a4f78defSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 284a4f78defSmrg[# Backslashify metacharacters that are still active within 285a4f78defSmrg# double-quoted strings. 286a4f78defSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 287a4f78defSmrg 288a4f78defSmrg# Same as above, but do not quote variable references. 289a4f78defSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 290a4f78defSmrg 291a4f78defSmrg# Sed substitution to delay expansion of an escaped shell variable in a 292a4f78defSmrg# double_quote_subst'ed string. 293a4f78defSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 294a4f78defSmrg 295a4f78defSmrg# Sed substitution to delay expansion of an escaped single quote. 296a4f78defSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 297a4f78defSmrg 298a4f78defSmrg# Sed substitution to avoid accidental globbing in evaled expressions 299a4f78defSmrgno_glob_subst='s/\*/\\\*/g' 300a4f78defSmrg]) 301a4f78defSmrg 302a4f78defSmrg# _LT_PROG_LTMAIN 303a4f78defSmrg# --------------- 304a4f78defSmrg# Note that this code is called both from 'configure', and 'config.status' 305a4f78defSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 306a4f78defSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 307a4f78defSmrg# so we pass a copy along to make sure it has a sensible value anyway. 308a4f78defSmrgm4_defun([_LT_PROG_LTMAIN], 309a4f78defSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 310a4f78defSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 311a4f78defSmrgltmain=$ac_aux_dir/ltmain.sh 312a4f78defSmrg])# _LT_PROG_LTMAIN 313a4f78defSmrg 314a4f78defSmrg 315a4f78defSmrg 316a4f78defSmrg# So that we can recreate a full libtool script including additional 317a4f78defSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 318a4f78defSmrg# in macros and then make a single call at the end using the 'libtool' 319a4f78defSmrg# label. 320a4f78defSmrg 321a4f78defSmrg 322a4f78defSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 323a4f78defSmrg# ---------------------------------------- 324a4f78defSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325a4f78defSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 326a4f78defSmrg[m4_ifval([$1], 327a4f78defSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 328a4f78defSmrg [$1 329a4f78defSmrg])])]) 330a4f78defSmrg 331a4f78defSmrg# Initialize. 332a4f78defSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 333a4f78defSmrg 334a4f78defSmrg 335a4f78defSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 336a4f78defSmrg# ------------------------------ 337a4f78defSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 338a4f78defSmrgm4_define([_LT_CONFIG_LIBTOOL], 339a4f78defSmrg[m4_ifval([$1], 340a4f78defSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 341a4f78defSmrg [$1 342a4f78defSmrg])])]) 343a4f78defSmrg 344a4f78defSmrg# Initialize. 345a4f78defSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 346a4f78defSmrg 347a4f78defSmrg 348a4f78defSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 349a4f78defSmrg# ----------------------------------------------------- 350a4f78defSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 351a4f78defSmrg[_LT_CONFIG_LIBTOOL([$1]) 352a4f78defSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 353a4f78defSmrg]) 354a4f78defSmrg 355a4f78defSmrg 356a4f78defSmrg# _LT_FORMAT_COMMENT([COMMENT]) 357a4f78defSmrg# ----------------------------- 358a4f78defSmrg# Add leading comment marks to the start of each line, and a trailing 359a4f78defSmrg# full-stop to the whole comment if one is not present already. 360a4f78defSmrgm4_define([_LT_FORMAT_COMMENT], 361a4f78defSmrg[m4_ifval([$1], [ 362a4f78defSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 363a4f78defSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 364a4f78defSmrg)]) 365a4f78defSmrg 366a4f78defSmrg 367a4f78defSmrg 368a4f78defSmrg 369a4f78defSmrg 370a4f78defSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 371a4f78defSmrg# ------------------------------------------------------------------- 372a4f78defSmrg# CONFIGNAME is the name given to the value in the libtool script. 373a4f78defSmrg# VARNAME is the (base) name used in the configure script. 374a4f78defSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 375a4f78defSmrg# VARNAME. Any other value will be used directly. 376a4f78defSmrgm4_define([_LT_DECL], 377a4f78defSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 378a4f78defSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 379a4f78defSmrg [m4_ifval([$1], [$1], [$2])]) 380a4f78defSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 381a4f78defSmrg m4_ifval([$4], 382a4f78defSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 383a4f78defSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 384a4f78defSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 385a4f78defSmrg]) 386a4f78defSmrg 387a4f78defSmrg 388a4f78defSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 389a4f78defSmrg# -------------------------------------------------------- 390a4f78defSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 391a4f78defSmrg 392a4f78defSmrg 393a4f78defSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 394a4f78defSmrg# ------------------------------------------------ 395a4f78defSmrgm4_define([lt_decl_tag_varnames], 396a4f78defSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 397a4f78defSmrg 398a4f78defSmrg 399a4f78defSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 400a4f78defSmrg# --------------------------------------------------------- 401a4f78defSmrgm4_define([_lt_decl_filter], 402a4f78defSmrg[m4_case([$#], 403a4f78defSmrg [0], [m4_fatal([$0: too few arguments: $#])], 404a4f78defSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 405a4f78defSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 406a4f78defSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 407a4f78defSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 408a4f78defSmrg]) 409a4f78defSmrg 410a4f78defSmrg 411a4f78defSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 412a4f78defSmrg# -------------------------------------------------- 413a4f78defSmrgm4_define([lt_decl_quote_varnames], 414a4f78defSmrg[_lt_decl_filter([value], [1], $@)]) 415a4f78defSmrg 416a4f78defSmrg 417a4f78defSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 418a4f78defSmrg# --------------------------------------------------- 419a4f78defSmrgm4_define([lt_decl_dquote_varnames], 420a4f78defSmrg[_lt_decl_filter([value], [2], $@)]) 421a4f78defSmrg 422a4f78defSmrg 423a4f78defSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 424a4f78defSmrg# --------------------------------------------------- 425a4f78defSmrgm4_define([lt_decl_varnames_tagged], 426a4f78defSmrg[m4_assert([$# <= 2])dnl 427a4f78defSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 428a4f78defSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 429a4f78defSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 430a4f78defSmrgm4_define([_lt_decl_varnames_tagged], 431a4f78defSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 432a4f78defSmrg 433a4f78defSmrg 434a4f78defSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 435a4f78defSmrg# ------------------------------------------------ 436a4f78defSmrgm4_define([lt_decl_all_varnames], 437a4f78defSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 438a4f78defSmrg m4_if([$2], [], 439a4f78defSmrg m4_quote(lt_decl_varnames), 440a4f78defSmrg m4_quote(m4_shift($@))))[]dnl 441a4f78defSmrg]) 442a4f78defSmrgm4_define([_lt_decl_all_varnames], 443a4f78defSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 444a4f78defSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 445a4f78defSmrg]) 446a4f78defSmrg 447a4f78defSmrg 448a4f78defSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 449a4f78defSmrg# ------------------------------------ 450a4f78defSmrg# Quote a variable value, and forward it to 'config.status' so that its 451a4f78defSmrg# declaration there will have the same value as in 'configure'. VARNAME 452a4f78defSmrg# must have a single quote delimited value for this to work. 453a4f78defSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 454a4f78defSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 455a4f78defSmrg 456a4f78defSmrg 457a4f78defSmrg# _LT_CONFIG_STATUS_DECLARATIONS 458a4f78defSmrg# ------------------------------ 459a4f78defSmrg# We delimit libtool config variables with single quotes, so when 460a4f78defSmrg# we write them to config.status, we have to be sure to quote all 461a4f78defSmrg# embedded single quotes properly. In configure, this macro expands 462a4f78defSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 463a4f78defSmrg# 464a4f78defSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 465a4f78defSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 466a4f78defSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 467a4f78defSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 468a4f78defSmrg 469a4f78defSmrg 470a4f78defSmrg# _LT_LIBTOOL_TAGS 471a4f78defSmrg# ---------------- 472a4f78defSmrg# Output comment and list of tags supported by the script 473a4f78defSmrgm4_defun([_LT_LIBTOOL_TAGS], 474a4f78defSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 475a4f78defSmrgavailable_tags='_LT_TAGS'dnl 476a4f78defSmrg]) 477a4f78defSmrg 478a4f78defSmrg 479a4f78defSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 480a4f78defSmrg# ----------------------------------- 481a4f78defSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 482a4f78defSmrg# expand to a commented shell variable setting: 483a4f78defSmrg# 484a4f78defSmrg# # Some comment about what VAR is for. 485a4f78defSmrg# visible_name=$lt_internal_name 486a4f78defSmrgm4_define([_LT_LIBTOOL_DECLARE], 487a4f78defSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 488a4f78defSmrg [description])))[]dnl 489a4f78defSmrgm4_pushdef([_libtool_name], 490a4f78defSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 491a4f78defSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 492a4f78defSmrg [0], [_libtool_name=[$]$1], 493a4f78defSmrg [1], [_libtool_name=$lt_[]$1], 494a4f78defSmrg [2], [_libtool_name=$lt_[]$1], 495a4f78defSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 496a4f78defSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 497a4f78defSmrg]) 498a4f78defSmrg 499a4f78defSmrg 500a4f78defSmrg# _LT_LIBTOOL_CONFIG_VARS 501a4f78defSmrg# ----------------------- 502a4f78defSmrg# Produce commented declarations of non-tagged libtool config variables 503a4f78defSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 504a4f78defSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 505a4f78defSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 506a4f78defSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 507a4f78defSmrg[m4_foreach([_lt_var], 508a4f78defSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 509a4f78defSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 510a4f78defSmrg 511a4f78defSmrg 512a4f78defSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 513a4f78defSmrg# ------------------------- 514a4f78defSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 515a4f78defSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 516a4f78defSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 517a4f78defSmrg 518a4f78defSmrg 519a4f78defSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 520a4f78defSmrg# ------------------------------ 521a4f78defSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 522a4f78defSmrg 523a4f78defSmrg 524a4f78defSmrg# _LT_CONFIG_COMMANDS 525a4f78defSmrg# ------------------- 526a4f78defSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 527a4f78defSmrg# variables for single and double quote escaping we saved from calls 528a4f78defSmrg# to _LT_DECL, we can put quote escaped variables declarations 529a4f78defSmrg# into 'config.status', and then the shell code to quote escape them in 530a4f78defSmrg# for loops in 'config.status'. Finally, any additional code accumulated 531a4f78defSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 532a4f78defSmrgm4_defun([_LT_CONFIG_COMMANDS], 533a4f78defSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 534a4f78defSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 535a4f78defSmrg dnl instead of duplicating it all over again into config.status, 536a4f78defSmrg dnl then we will have config.status run $CONFIG_LT later, so it 537a4f78defSmrg dnl needs to know what name is stored there: 538a4f78defSmrg [AC_CONFIG_COMMANDS([libtool], 539a4f78defSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 540a4f78defSmrg dnl If the libtool generation code is destined for config.status, 541a4f78defSmrg dnl expand the accumulated commands and init code now: 542a4f78defSmrg [AC_CONFIG_COMMANDS([libtool], 543a4f78defSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 544a4f78defSmrg])#_LT_CONFIG_COMMANDS 545a4f78defSmrg 546a4f78defSmrg 547a4f78defSmrg# Initialize. 548a4f78defSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 549a4f78defSmrg[ 550a4f78defSmrg 551a4f78defSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 552a4f78defSmrg# if CDPATH is set. 553a4f78defSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 554a4f78defSmrg 555a4f78defSmrgsed_quote_subst='$sed_quote_subst' 556a4f78defSmrgdouble_quote_subst='$double_quote_subst' 557a4f78defSmrgdelay_variable_subst='$delay_variable_subst' 558a4f78defSmrg_LT_CONFIG_STATUS_DECLARATIONS 559a4f78defSmrgLTCC='$LTCC' 560a4f78defSmrgLTCFLAGS='$LTCFLAGS' 561a4f78defSmrgcompiler='$compiler_DEFAULT' 562a4f78defSmrg 563a4f78defSmrg# A function that is used when there is no print builtin or printf. 564a4f78defSmrgfunc_fallback_echo () 565a4f78defSmrg{ 566a4f78defSmrg eval 'cat <<_LTECHO_EOF 567a4f78defSmrg\$[]1 568a4f78defSmrg_LTECHO_EOF' 569a4f78defSmrg} 570a4f78defSmrg 571a4f78defSmrg# Quote evaled strings. 572a4f78defSmrgfor var in lt_decl_all_varnames([[ \ 573a4f78defSmrg]], lt_decl_quote_varnames); do 574a4f78defSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575a4f78defSmrg *[[\\\\\\\`\\"\\\$]]*) 576a4f78defSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 577a4f78defSmrg ;; 578a4f78defSmrg *) 579a4f78defSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580a4f78defSmrg ;; 581a4f78defSmrg esac 582a4f78defSmrgdone 583a4f78defSmrg 584a4f78defSmrg# Double-quote double-evaled strings. 585a4f78defSmrgfor var in lt_decl_all_varnames([[ \ 586a4f78defSmrg]], lt_decl_dquote_varnames); do 587a4f78defSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 588a4f78defSmrg *[[\\\\\\\`\\"\\\$]]*) 589a4f78defSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 590a4f78defSmrg ;; 591a4f78defSmrg *) 592a4f78defSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 593a4f78defSmrg ;; 594a4f78defSmrg esac 595a4f78defSmrgdone 596a4f78defSmrg 597a4f78defSmrg_LT_OUTPUT_LIBTOOL_INIT 598a4f78defSmrg]) 599a4f78defSmrg 600a4f78defSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 601a4f78defSmrg# ------------------------------------ 602a4f78defSmrg# Generate a child script FILE with all initialization necessary to 603a4f78defSmrg# reuse the environment learned by the parent script, and make the 604a4f78defSmrg# file executable. If COMMENT is supplied, it is inserted after the 605a4f78defSmrg# '#!' sequence but before initialization text begins. After this 606a4f78defSmrg# macro, additional text can be appended to FILE to form the body of 607a4f78defSmrg# the child script. The macro ends with non-zero status if the 608a4f78defSmrg# file could not be fully written (such as if the disk is full). 609a4f78defSmrgm4_ifdef([AS_INIT_GENERATED], 610a4f78defSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 611a4f78defSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 612a4f78defSmrg[m4_require([AS_PREPARE])]dnl 613a4f78defSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 614a4f78defSmrg[lt_write_fail=0 615a4f78defSmrgcat >$1 <<_ASEOF || lt_write_fail=1 616a4f78defSmrg#! $SHELL 617a4f78defSmrg# Generated by $as_me. 618a4f78defSmrg$2 619a4f78defSmrgSHELL=\${CONFIG_SHELL-$SHELL} 620a4f78defSmrgexport SHELL 621a4f78defSmrg_ASEOF 622a4f78defSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 623a4f78defSmrgAS_SHELL_SANITIZE 624a4f78defSmrg_AS_PREPARE 625a4f78defSmrgexec AS_MESSAGE_FD>&1 626a4f78defSmrg_ASEOF 627a4f78defSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 628a4f78defSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 629a4f78defSmrg 630a4f78defSmrg# LT_OUTPUT 631a4f78defSmrg# --------- 632a4f78defSmrg# This macro allows early generation of the libtool script (before 633a4f78defSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 634a4f78defSmrg# tests. 635a4f78defSmrgAC_DEFUN([LT_OUTPUT], 636a4f78defSmrg[: ${CONFIG_LT=./config.lt} 637a4f78defSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 638a4f78defSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 639a4f78defSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 640a4f78defSmrg 641a4f78defSmrgcat >>"$CONFIG_LT" <<\_LTEOF 642a4f78defSmrglt_cl_silent=false 643a4f78defSmrgexec AS_MESSAGE_LOG_FD>>config.log 644a4f78defSmrg{ 645a4f78defSmrg echo 646a4f78defSmrg AS_BOX([Running $as_me.]) 647a4f78defSmrg} >&AS_MESSAGE_LOG_FD 648a4f78defSmrg 649a4f78defSmrglt_cl_help="\ 650a4f78defSmrg'$as_me' creates a local libtool stub from the current configuration, 651a4f78defSmrgfor use in further configure time tests before the real libtool is 652a4f78defSmrggenerated. 653a4f78defSmrg 654a4f78defSmrgUsage: $[0] [[OPTIONS]] 655a4f78defSmrg 656a4f78defSmrg -h, --help print this help, then exit 657a4f78defSmrg -V, --version print version number, then exit 658a4f78defSmrg -q, --quiet do not print progress messages 659a4f78defSmrg -d, --debug don't remove temporary files 660a4f78defSmrg 661a4f78defSmrgReport bugs to <bug-libtool@gnu.org>." 662a4f78defSmrg 663a4f78defSmrglt_cl_version="\ 664a4f78defSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 665a4f78defSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 666a4f78defSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 667a4f78defSmrg 668a4f78defSmrgCopyright (C) 2011 Free Software Foundation, Inc. 669a4f78defSmrgThis config.lt script is free software; the Free Software Foundation 670a4f78defSmrggives unlimited permision to copy, distribute and modify it." 671a4f78defSmrg 672a4f78defSmrgwhile test 0 != $[#] 673a4f78defSmrgdo 674a4f78defSmrg case $[1] in 675a4f78defSmrg --version | --v* | -V ) 676a4f78defSmrg echo "$lt_cl_version"; exit 0 ;; 677a4f78defSmrg --help | --h* | -h ) 678a4f78defSmrg echo "$lt_cl_help"; exit 0 ;; 679a4f78defSmrg --debug | --d* | -d ) 680a4f78defSmrg debug=: ;; 681a4f78defSmrg --quiet | --q* | --silent | --s* | -q ) 682a4f78defSmrg lt_cl_silent=: ;; 683a4f78defSmrg 684a4f78defSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 685a4f78defSmrgTry '$[0] --help' for more information.]) ;; 686a4f78defSmrg 687a4f78defSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 688a4f78defSmrgTry '$[0] --help' for more information.]) ;; 689a4f78defSmrg esac 690a4f78defSmrg shift 691a4f78defSmrgdone 692a4f78defSmrg 693a4f78defSmrgif $lt_cl_silent; then 694a4f78defSmrg exec AS_MESSAGE_FD>/dev/null 695a4f78defSmrgfi 696a4f78defSmrg_LTEOF 697a4f78defSmrg 698a4f78defSmrgcat >>"$CONFIG_LT" <<_LTEOF 699a4f78defSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 700a4f78defSmrg_LTEOF 701a4f78defSmrg 702a4f78defSmrgcat >>"$CONFIG_LT" <<\_LTEOF 703a4f78defSmrgAC_MSG_NOTICE([creating $ofile]) 704a4f78defSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 705a4f78defSmrgAS_EXIT(0) 706a4f78defSmrg_LTEOF 707a4f78defSmrgchmod +x "$CONFIG_LT" 708a4f78defSmrg 709a4f78defSmrg# configure is writing to config.log, but config.lt does its own redirection, 710a4f78defSmrg# appending to config.log, which fails on DOS, as config.log is still kept 711a4f78defSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 712a4f78defSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 713a4f78defSmrglt_cl_success=: 714a4f78defSmrgtest yes = "$silent" && 715a4f78defSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 716a4f78defSmrgexec AS_MESSAGE_LOG_FD>/dev/null 717a4f78defSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 718a4f78defSmrgexec AS_MESSAGE_LOG_FD>>config.log 719a4f78defSmrg$lt_cl_success || AS_EXIT(1) 720a4f78defSmrg])# LT_OUTPUT 721a4f78defSmrg 722a4f78defSmrg 723a4f78defSmrg# _LT_CONFIG(TAG) 724a4f78defSmrg# --------------- 725a4f78defSmrg# If TAG is the built-in tag, create an initial libtool script with a 726a4f78defSmrg# default configuration from the untagged config vars. Otherwise add code 727a4f78defSmrg# to config.status for appending the configuration named by TAG from the 728a4f78defSmrg# matching tagged config vars. 729a4f78defSmrgm4_defun([_LT_CONFIG], 730a4f78defSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 731a4f78defSmrg_LT_CONFIG_SAVE_COMMANDS([ 732a4f78defSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 733a4f78defSmrg m4_if(_LT_TAG, [C], [ 734a4f78defSmrg # See if we are running on zsh, and set the options that allow our 735a4f78defSmrg # commands through without removal of \ escapes. 736a4f78defSmrg if test -n "${ZSH_VERSION+set}"; then 737a4f78defSmrg setopt NO_GLOB_SUBST 738a4f78defSmrg fi 739a4f78defSmrg 740a4f78defSmrg cfgfile=${ofile}T 741a4f78defSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 742a4f78defSmrg $RM "$cfgfile" 743a4f78defSmrg 744a4f78defSmrg cat <<_LT_EOF >> "$cfgfile" 745a4f78defSmrg#! $SHELL 746a4f78defSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 747a4f78defSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 748a4f78defSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 749a4f78defSmrg 750a4f78defSmrg# Provide generalized library-building support services. 751a4f78defSmrg# Written by Gordon Matzigkeit, 1996 752a4f78defSmrg 753a4f78defSmrg_LT_COPYING 754a4f78defSmrg_LT_LIBTOOL_TAGS 755a4f78defSmrg 756a4f78defSmrg# Configured defaults for sys_lib_dlsearch_path munging. 757a4f78defSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 758a4f78defSmrg 759a4f78defSmrg# ### BEGIN LIBTOOL CONFIG 760a4f78defSmrg_LT_LIBTOOL_CONFIG_VARS 761a4f78defSmrg_LT_LIBTOOL_TAG_VARS 762a4f78defSmrg# ### END LIBTOOL CONFIG 763a4f78defSmrg 764a4f78defSmrg_LT_EOF 765a4f78defSmrg 766a4f78defSmrg cat <<'_LT_EOF' >> "$cfgfile" 767a4f78defSmrg 768a4f78defSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 769a4f78defSmrg 770a4f78defSmrg_LT_PREPARE_MUNGE_PATH_LIST 771a4f78defSmrg_LT_PREPARE_CC_BASENAME 772a4f78defSmrg 773a4f78defSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 774a4f78defSmrg 775a4f78defSmrg_LT_EOF 776a4f78defSmrg 777a4f78defSmrg case $host_os in 778a4f78defSmrg aix3*) 779a4f78defSmrg cat <<\_LT_EOF >> "$cfgfile" 780a4f78defSmrg# AIX sometimes has problems with the GCC collect2 program. For some 781a4f78defSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 782a4f78defSmrg# vanish in a puff of smoke. 783a4f78defSmrgif test set != "${COLLECT_NAMES+set}"; then 784a4f78defSmrg COLLECT_NAMES= 785a4f78defSmrg export COLLECT_NAMES 786a4f78defSmrgfi 787a4f78defSmrg_LT_EOF 788a4f78defSmrg ;; 789a4f78defSmrg esac 790a4f78defSmrg 791a4f78defSmrg _LT_PROG_LTMAIN 792a4f78defSmrg 793a4f78defSmrg # We use sed instead of cat because bash on DJGPP gets confused if 794a4f78defSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 795a4f78defSmrg # text mode, it properly converts lines to CR/LF. This bash problem 796a4f78defSmrg # is reportedly fixed, but why not run on old versions too? 797a4f78defSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 798a4f78defSmrg || (rm -f "$cfgfile"; exit 1) 799a4f78defSmrg 800a4f78defSmrg mv -f "$cfgfile" "$ofile" || 801a4f78defSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 802a4f78defSmrg chmod +x "$ofile" 803a4f78defSmrg], 804a4f78defSmrg[cat <<_LT_EOF >> "$ofile" 805a4f78defSmrg 806a4f78defSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 807a4f78defSmrgdnl in a comment (ie after a #). 808a4f78defSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 809a4f78defSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 810a4f78defSmrg# ### END LIBTOOL TAG CONFIG: $1 811a4f78defSmrg_LT_EOF 812a4f78defSmrg])dnl /m4_if 813a4f78defSmrg], 814a4f78defSmrg[m4_if([$1], [], [ 815a4f78defSmrg PACKAGE='$PACKAGE' 816a4f78defSmrg VERSION='$VERSION' 817a4f78defSmrg RM='$RM' 818a4f78defSmrg ofile='$ofile'], []) 819a4f78defSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 820a4f78defSmrg])# _LT_CONFIG 821a4f78defSmrg 822a4f78defSmrg 823a4f78defSmrg# LT_SUPPORTED_TAG(TAG) 824a4f78defSmrg# --------------------- 825a4f78defSmrg# Trace this macro to discover what tags are supported by the libtool 826a4f78defSmrg# --tag option, using: 827a4f78defSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 828a4f78defSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 829a4f78defSmrg 830a4f78defSmrg 831a4f78defSmrg# C support is built-in for now 832a4f78defSmrgm4_define([_LT_LANG_C_enabled], []) 833a4f78defSmrgm4_define([_LT_TAGS], []) 834a4f78defSmrg 835a4f78defSmrg 836a4f78defSmrg# LT_LANG(LANG) 837a4f78defSmrg# ------------- 838a4f78defSmrg# Enable libtool support for the given language if not already enabled. 839a4f78defSmrgAC_DEFUN([LT_LANG], 840a4f78defSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 841a4f78defSmrgm4_case([$1], 842a4f78defSmrg [C], [_LT_LANG(C)], 843a4f78defSmrg [C++], [_LT_LANG(CXX)], 844a4f78defSmrg [Go], [_LT_LANG(GO)], 845a4f78defSmrg [Java], [_LT_LANG(GCJ)], 846a4f78defSmrg [Fortran 77], [_LT_LANG(F77)], 847a4f78defSmrg [Fortran], [_LT_LANG(FC)], 848a4f78defSmrg [Windows Resource], [_LT_LANG(RC)], 849a4f78defSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 850a4f78defSmrg [_LT_LANG($1)], 851a4f78defSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 852a4f78defSmrg])# LT_LANG 853a4f78defSmrg 854a4f78defSmrg 855a4f78defSmrg# _LT_LANG(LANGNAME) 856a4f78defSmrg# ------------------ 857a4f78defSmrgm4_defun([_LT_LANG], 858a4f78defSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 859a4f78defSmrg [LT_SUPPORTED_TAG([$1])dnl 860a4f78defSmrg m4_append([_LT_TAGS], [$1 ])dnl 861a4f78defSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 862a4f78defSmrg _LT_LANG_$1_CONFIG($1)])dnl 863a4f78defSmrg])# _LT_LANG 864a4f78defSmrg 865a4f78defSmrg 866a4f78defSmrgm4_ifndef([AC_PROG_GO], [ 867a4f78defSmrg# NOTE: This macro has been submitted for inclusion into # 868a4f78defSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 869a4f78defSmrg# a released version of Autoconf we should remove this # 870a4f78defSmrg# macro and use it instead. # 871a4f78defSmrgm4_defun([AC_PROG_GO], 872a4f78defSmrg[AC_LANG_PUSH(Go)dnl 873a4f78defSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 874a4f78defSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 875a4f78defSmrg_AC_ARG_VAR_LDFLAGS()dnl 876a4f78defSmrgAC_CHECK_TOOL(GOC, gccgo) 877a4f78defSmrgif test -z "$GOC"; then 878a4f78defSmrg if test -n "$ac_tool_prefix"; then 879a4f78defSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 880a4f78defSmrg fi 881a4f78defSmrgfi 882a4f78defSmrgif test -z "$GOC"; then 883a4f78defSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 884a4f78defSmrgfi 885a4f78defSmrg])#m4_defun 886a4f78defSmrg])#m4_ifndef 887a4f78defSmrg 888a4f78defSmrg 889a4f78defSmrg# _LT_LANG_DEFAULT_CONFIG 890a4f78defSmrg# ----------------------- 891a4f78defSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 892a4f78defSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 893a4f78defSmrg [LT_LANG(CXX)], 894a4f78defSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 895a4f78defSmrg 896a4f78defSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 897a4f78defSmrg [LT_LANG(F77)], 898a4f78defSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 899a4f78defSmrg 900a4f78defSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 901a4f78defSmrg [LT_LANG(FC)], 902a4f78defSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 903a4f78defSmrg 904a4f78defSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 905a4f78defSmrgdnl pulling things in needlessly. 906a4f78defSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 907a4f78defSmrg [LT_LANG(GCJ)], 908a4f78defSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 909a4f78defSmrg [LT_LANG(GCJ)], 910a4f78defSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 911a4f78defSmrg [LT_LANG(GCJ)], 912a4f78defSmrg [m4_ifdef([AC_PROG_GCJ], 913a4f78defSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 914a4f78defSmrg m4_ifdef([A][M_PROG_GCJ], 915a4f78defSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 916a4f78defSmrg m4_ifdef([LT_PROG_GCJ], 917a4f78defSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 918a4f78defSmrg 919a4f78defSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 920a4f78defSmrg [LT_LANG(GO)], 921a4f78defSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 922a4f78defSmrg 923a4f78defSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 924a4f78defSmrg [LT_LANG(RC)], 925a4f78defSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 926a4f78defSmrg])# _LT_LANG_DEFAULT_CONFIG 927a4f78defSmrg 928a4f78defSmrg# Obsolete macros: 929a4f78defSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 930a4f78defSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 931a4f78defSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 932a4f78defSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 933a4f78defSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 934a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 935a4f78defSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 936a4f78defSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 937a4f78defSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 938a4f78defSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 939a4f78defSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 940a4f78defSmrg 941a4f78defSmrg 942a4f78defSmrg# _LT_TAG_COMPILER 943a4f78defSmrg# ---------------- 944a4f78defSmrgm4_defun([_LT_TAG_COMPILER], 945a4f78defSmrg[AC_REQUIRE([AC_PROG_CC])dnl 946a4f78defSmrg 947a4f78defSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 948a4f78defSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 949a4f78defSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 950a4f78defSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 951a4f78defSmrg 952a4f78defSmrg# If no C compiler was specified, use CC. 953a4f78defSmrgLTCC=${LTCC-"$CC"} 954a4f78defSmrg 955a4f78defSmrg# If no C compiler flags were specified, use CFLAGS. 956a4f78defSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957a4f78defSmrg 958a4f78defSmrg# Allow CC to be a program name with arguments. 959a4f78defSmrgcompiler=$CC 960a4f78defSmrg])# _LT_TAG_COMPILER 961a4f78defSmrg 962a4f78defSmrg 963a4f78defSmrg# _LT_COMPILER_BOILERPLATE 964a4f78defSmrg# ------------------------ 965a4f78defSmrg# Check for compiler boilerplate output or warnings with 966a4f78defSmrg# the simple compiler test code. 967a4f78defSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 968a4f78defSmrg[m4_require([_LT_DECL_SED])dnl 969a4f78defSmrgac_outfile=conftest.$ac_objext 970a4f78defSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 971a4f78defSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 972a4f78defSmrg_lt_compiler_boilerplate=`cat conftest.err` 973a4f78defSmrg$RM conftest* 974a4f78defSmrg])# _LT_COMPILER_BOILERPLATE 975a4f78defSmrg 976a4f78defSmrg 977a4f78defSmrg# _LT_LINKER_BOILERPLATE 978a4f78defSmrg# ---------------------- 979a4f78defSmrg# Check for linker boilerplate output or warnings with 980a4f78defSmrg# the simple link test code. 981a4f78defSmrgm4_defun([_LT_LINKER_BOILERPLATE], 982a4f78defSmrg[m4_require([_LT_DECL_SED])dnl 983a4f78defSmrgac_outfile=conftest.$ac_objext 984a4f78defSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 985a4f78defSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 986a4f78defSmrg_lt_linker_boilerplate=`cat conftest.err` 987a4f78defSmrg$RM -r conftest* 988a4f78defSmrg])# _LT_LINKER_BOILERPLATE 989a4f78defSmrg 990a4f78defSmrg# _LT_REQUIRED_DARWIN_CHECKS 991a4f78defSmrg# ------------------------- 992a4f78defSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 993a4f78defSmrg case $host_os in 994a4f78defSmrg rhapsody* | darwin*) 995a4f78defSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 996a4f78defSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 997a4f78defSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 998a4f78defSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 999a4f78defSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1000a4f78defSmrg _LT_DECL([], [DSYMUTIL], [1], 1001a4f78defSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1002a4f78defSmrg _LT_DECL([], [NMEDIT], [1], 1003a4f78defSmrg [Tool to change global to local symbols on Mac OS X]) 1004a4f78defSmrg _LT_DECL([], [LIPO], [1], 1005a4f78defSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 1006a4f78defSmrg _LT_DECL([], [OTOOL], [1], 1007a4f78defSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1008a4f78defSmrg _LT_DECL([], [OTOOL64], [1], 1009a4f78defSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1010a4f78defSmrg 1011a4f78defSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1012a4f78defSmrg [lt_cv_apple_cc_single_mod=no 1013a4f78defSmrg if test -z "$LT_MULTI_MODULE"; then 1014a4f78defSmrg # By default we will add the -single_module flag. You can override 1015a4f78defSmrg # by either setting the environment variable LT_MULTI_MODULE 1016a4f78defSmrg # non-empty at configure time, or by adding -multi_module to the 1017a4f78defSmrg # link flags. 1018a4f78defSmrg rm -rf libconftest.dylib* 1019a4f78defSmrg echo "int foo(void){return 1;}" > conftest.c 1020a4f78defSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1021a4f78defSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1022a4f78defSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1023a4f78defSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1024a4f78defSmrg _lt_result=$? 1025a4f78defSmrg # If there is a non-empty error log, and "single_module" 1026a4f78defSmrg # appears in it, assume the flag caused a linker warning 1027a4f78defSmrg if test -s conftest.err && $GREP single_module conftest.err; then 1028a4f78defSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1029a4f78defSmrg # Otherwise, if the output was created with a 0 exit code from 1030a4f78defSmrg # the compiler, it worked. 1031a4f78defSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1032a4f78defSmrg lt_cv_apple_cc_single_mod=yes 1033a4f78defSmrg else 1034a4f78defSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1035a4f78defSmrg fi 1036a4f78defSmrg rm -rf libconftest.dylib* 1037a4f78defSmrg rm -f conftest.* 1038a4f78defSmrg fi]) 1039a4f78defSmrg 1040a4f78defSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1041a4f78defSmrg [lt_cv_ld_exported_symbols_list], 1042a4f78defSmrg [lt_cv_ld_exported_symbols_list=no 1043a4f78defSmrg save_LDFLAGS=$LDFLAGS 1044a4f78defSmrg echo "_main" > conftest.sym 1045a4f78defSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1046a4f78defSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1047a4f78defSmrg [lt_cv_ld_exported_symbols_list=yes], 1048a4f78defSmrg [lt_cv_ld_exported_symbols_list=no]) 1049a4f78defSmrg LDFLAGS=$save_LDFLAGS 1050a4f78defSmrg ]) 1051a4f78defSmrg 1052a4f78defSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1053a4f78defSmrg [lt_cv_ld_force_load=no 1054a4f78defSmrg cat > conftest.c << _LT_EOF 1055a4f78defSmrgint forced_loaded() { return 2;} 1056a4f78defSmrg_LT_EOF 1057a4f78defSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1058a4f78defSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1059fb570538Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1060fb570538Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1061a4f78defSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1062a4f78defSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1063a4f78defSmrg cat > conftest.c << _LT_EOF 1064a4f78defSmrgint main() { return 0;} 1065a4f78defSmrg_LT_EOF 1066a4f78defSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1067a4f78defSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1068a4f78defSmrg _lt_result=$? 1069a4f78defSmrg if test -s conftest.err && $GREP force_load conftest.err; then 1070a4f78defSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1071a4f78defSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1072a4f78defSmrg lt_cv_ld_force_load=yes 1073a4f78defSmrg else 1074a4f78defSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1075a4f78defSmrg fi 1076a4f78defSmrg rm -f conftest.err libconftest.a conftest conftest.c 1077a4f78defSmrg rm -rf conftest.dSYM 1078a4f78defSmrg ]) 1079a4f78defSmrg case $host_os in 1080a4f78defSmrg rhapsody* | darwin1.[[012]]) 1081a4f78defSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1082a4f78defSmrg darwin1.*) 1083a4f78defSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1084a4f78defSmrg darwin*) # darwin 5.x on 1085a4f78defSmrg # if running on 10.5 or later, the deployment target defaults 1086a4f78defSmrg # to the OS version, if on x86, and 10.4, the deployment 1087a4f78defSmrg # target defaults to 10.4. Don't you love it? 1088a4f78defSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1089a4f78defSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1090a4f78defSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1091a4f78defSmrg 10.[[012]][[,.]]*) 1092a4f78defSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1093a4f78defSmrg 10.*) 1094a4f78defSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1095a4f78defSmrg esac 1096a4f78defSmrg ;; 1097a4f78defSmrg esac 1098a4f78defSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1099a4f78defSmrg _lt_dar_single_mod='$single_module' 1100a4f78defSmrg fi 1101a4f78defSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1102a4f78defSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1103a4f78defSmrg else 1104a4f78defSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1105a4f78defSmrg fi 1106a4f78defSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1107a4f78defSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1108a4f78defSmrg else 1109a4f78defSmrg _lt_dsymutil= 1110a4f78defSmrg fi 1111a4f78defSmrg ;; 1112a4f78defSmrg esac 1113a4f78defSmrg]) 1114a4f78defSmrg 1115a4f78defSmrg 1116a4f78defSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1117a4f78defSmrg# --------------------------------- 1118a4f78defSmrg# Checks for linker and compiler features on darwin 1119a4f78defSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1120a4f78defSmrg[ 1121a4f78defSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1122a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1123a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1124a4f78defSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1125a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1126a4f78defSmrg if test yes = "$lt_cv_ld_force_load"; then 1127a4f78defSmrg _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\"`' 1128a4f78defSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1129a4f78defSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1130a4f78defSmrg else 1131a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1132a4f78defSmrg fi 1133a4f78defSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1134a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1135a4f78defSmrg case $cc_basename in 1136a4f78defSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1137a4f78defSmrg *) _lt_dar_can_shared=$GCC ;; 1138a4f78defSmrg esac 1139a4f78defSmrg if test yes = "$_lt_dar_can_shared"; then 1140a4f78defSmrg output_verbose_link_cmd=func_echo_all 1141a4f78defSmrg _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" 1142a4f78defSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1143a4f78defSmrg _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" 1144a4f78defSmrg _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" 1145a4f78defSmrg m4_if([$1], [CXX], 1146a4f78defSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1147a4f78defSmrg _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" 1148a4f78defSmrg _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" 1149a4f78defSmrg fi 1150a4f78defSmrg],[]) 1151a4f78defSmrg else 1152a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1153a4f78defSmrg fi 1154a4f78defSmrg]) 1155a4f78defSmrg 1156a4f78defSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1157a4f78defSmrg# ---------------------------------- 1158a4f78defSmrg# Links a minimal program and checks the executable 1159a4f78defSmrg# for the system default hardcoded library path. In most cases, 1160a4f78defSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1161a4f78defSmrg# the location of the communication and MPI libs are included too. 1162a4f78defSmrg# If we don't find anything, use the default library path according 1163a4f78defSmrg# to the aix ld manual. 1164a4f78defSmrg# Store the results from the different compilers for each TAGNAME. 1165a4f78defSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 1166a4f78defSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1167a4f78defSmrg[m4_require([_LT_DECL_SED])dnl 1168a4f78defSmrgif test set = "${lt_cv_aix_libpath+set}"; then 1169a4f78defSmrg aix_libpath=$lt_cv_aix_libpath 1170a4f78defSmrgelse 1171a4f78defSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1172a4f78defSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1173a4f78defSmrg lt_aix_libpath_sed='[ 1174a4f78defSmrg /Import File Strings/,/^$/ { 1175a4f78defSmrg /^0/ { 1176a4f78defSmrg s/^0 *\([^ ]*\) *$/\1/ 1177a4f78defSmrg p 1178a4f78defSmrg } 1179a4f78defSmrg }]' 1180a4f78defSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181a4f78defSmrg # Check for a 64-bit object if we didn't find anything. 1182a4f78defSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183a4f78defSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1184a4f78defSmrg fi],[]) 1185a4f78defSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1186a4f78defSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1187a4f78defSmrg fi 1188a4f78defSmrg ]) 1189a4f78defSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1190a4f78defSmrgfi 1191a4f78defSmrg])# _LT_SYS_MODULE_PATH_AIX 1192a4f78defSmrg 1193a4f78defSmrg 1194a4f78defSmrg# _LT_SHELL_INIT(ARG) 1195a4f78defSmrg# ------------------- 1196a4f78defSmrgm4_define([_LT_SHELL_INIT], 1197a4f78defSmrg[m4_divert_text([M4SH-INIT], [$1 1198a4f78defSmrg])])# _LT_SHELL_INIT 1199a4f78defSmrg 1200a4f78defSmrg 1201a4f78defSmrg 1202a4f78defSmrg# _LT_PROG_ECHO_BACKSLASH 1203a4f78defSmrg# ----------------------- 1204a4f78defSmrg# Find how we can fake an echo command that does not interpret backslash. 1205a4f78defSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1206a4f78defSmrg# of the generated configure script that will find a shell with a builtin 1207a4f78defSmrg# printf (that we can use as an echo command). 1208a4f78defSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1209a4f78defSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1210a4f78defSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1211a4f78defSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1212a4f78defSmrg 1213a4f78defSmrgAC_MSG_CHECKING([how to print strings]) 1214a4f78defSmrg# Test print first, because it will be a builtin if present. 1215a4f78defSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1216a4f78defSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1217a4f78defSmrg ECHO='print -r --' 1218a4f78defSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1219a4f78defSmrg ECHO='printf %s\n' 1220a4f78defSmrgelse 1221a4f78defSmrg # Use this function as a fallback that always works. 1222a4f78defSmrg func_fallback_echo () 1223a4f78defSmrg { 1224a4f78defSmrg eval 'cat <<_LTECHO_EOF 1225a4f78defSmrg$[]1 1226a4f78defSmrg_LTECHO_EOF' 1227a4f78defSmrg } 1228a4f78defSmrg ECHO='func_fallback_echo' 1229a4f78defSmrgfi 1230a4f78defSmrg 1231a4f78defSmrg# func_echo_all arg... 1232a4f78defSmrg# Invoke $ECHO with all args, space-separated. 1233a4f78defSmrgfunc_echo_all () 1234a4f78defSmrg{ 1235a4f78defSmrg $ECHO "$*" 1236a4f78defSmrg} 1237a4f78defSmrg 1238a4f78defSmrgcase $ECHO in 1239a4f78defSmrg printf*) AC_MSG_RESULT([printf]) ;; 1240a4f78defSmrg print*) AC_MSG_RESULT([print -r]) ;; 1241a4f78defSmrg *) AC_MSG_RESULT([cat]) ;; 1242a4f78defSmrgesac 1243a4f78defSmrg 1244a4f78defSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1245a4f78defSmrg[_AS_DETECT_SUGGESTED([ 1246a4f78defSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1247a4f78defSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1248a4f78defSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1249a4f78defSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1250a4f78defSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1251a4f78defSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1252a4f78defSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1253a4f78defSmrg 1254a4f78defSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1255a4f78defSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1256a4f78defSmrg])# _LT_PROG_ECHO_BACKSLASH 1257a4f78defSmrg 1258a4f78defSmrg 1259a4f78defSmrg# _LT_WITH_SYSROOT 1260a4f78defSmrg# ---------------- 1261a4f78defSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1262a4f78defSmrg[AC_MSG_CHECKING([for sysroot]) 1263a4f78defSmrgAC_ARG_WITH([sysroot], 1264a4f78defSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1265a4f78defSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 1266a4f78defSmrg if not specified).])], 1267a4f78defSmrg[], [with_sysroot=no]) 1268a4f78defSmrg 1269a4f78defSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 1270a4f78defSmrgdnl in case the user passed a directory name. 1271a4f78defSmrglt_sysroot= 1272a4f78defSmrgcase $with_sysroot in #( 1273a4f78defSmrg yes) 1274a4f78defSmrg if test yes = "$GCC"; then 1275a4f78defSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1276a4f78defSmrg fi 1277a4f78defSmrg ;; #( 1278a4f78defSmrg /*) 1279a4f78defSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1280a4f78defSmrg ;; #( 1281a4f78defSmrg no|'') 1282a4f78defSmrg ;; #( 1283a4f78defSmrg *) 1284a4f78defSmrg AC_MSG_RESULT([$with_sysroot]) 1285a4f78defSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1286a4f78defSmrg ;; 1287a4f78defSmrgesac 1288a4f78defSmrg 1289a4f78defSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1290a4f78defSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1291a4f78defSmrg[dependent libraries, and where our libraries should be installed.])]) 1292a4f78defSmrg 1293a4f78defSmrg# _LT_ENABLE_LOCK 1294a4f78defSmrg# --------------- 1295a4f78defSmrgm4_defun([_LT_ENABLE_LOCK], 1296a4f78defSmrg[AC_ARG_ENABLE([libtool-lock], 1297a4f78defSmrg [AS_HELP_STRING([--disable-libtool-lock], 1298a4f78defSmrg [avoid locking (might break parallel builds)])]) 1299a4f78defSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1300a4f78defSmrg 1301a4f78defSmrg# Some flags need to be propagated to the compiler or linker for good 1302a4f78defSmrg# libtool support. 1303a4f78defSmrgcase $host in 1304a4f78defSmrgia64-*-hpux*) 1305a4f78defSmrg # Find out what ABI is being produced by ac_compile, and set mode 1306a4f78defSmrg # options accordingly. 1307a4f78defSmrg echo 'int i;' > conftest.$ac_ext 1308a4f78defSmrg if AC_TRY_EVAL(ac_compile); then 1309a4f78defSmrg case `/usr/bin/file conftest.$ac_objext` in 1310a4f78defSmrg *ELF-32*) 1311a4f78defSmrg HPUX_IA64_MODE=32 1312a4f78defSmrg ;; 1313a4f78defSmrg *ELF-64*) 1314a4f78defSmrg HPUX_IA64_MODE=64 1315a4f78defSmrg ;; 1316a4f78defSmrg esac 1317a4f78defSmrg fi 1318a4f78defSmrg rm -rf conftest* 1319a4f78defSmrg ;; 1320a4f78defSmrg*-*-irix6*) 1321a4f78defSmrg # Find out what ABI is being produced by ac_compile, and set linker 1322a4f78defSmrg # options accordingly. 1323a4f78defSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1324a4f78defSmrg if AC_TRY_EVAL(ac_compile); then 1325a4f78defSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 1326a4f78defSmrg case `/usr/bin/file conftest.$ac_objext` in 1327a4f78defSmrg *32-bit*) 1328a4f78defSmrg LD="${LD-ld} -melf32bsmip" 1329a4f78defSmrg ;; 1330a4f78defSmrg *N32*) 1331a4f78defSmrg LD="${LD-ld} -melf32bmipn32" 1332a4f78defSmrg ;; 1333a4f78defSmrg *64-bit*) 1334a4f78defSmrg LD="${LD-ld} -melf64bmip" 1335a4f78defSmrg ;; 1336a4f78defSmrg esac 1337a4f78defSmrg else 1338a4f78defSmrg case `/usr/bin/file conftest.$ac_objext` in 1339a4f78defSmrg *32-bit*) 1340a4f78defSmrg LD="${LD-ld} -32" 1341a4f78defSmrg ;; 1342a4f78defSmrg *N32*) 1343a4f78defSmrg LD="${LD-ld} -n32" 1344a4f78defSmrg ;; 1345a4f78defSmrg *64-bit*) 1346a4f78defSmrg LD="${LD-ld} -64" 1347a4f78defSmrg ;; 1348a4f78defSmrg esac 1349a4f78defSmrg fi 1350a4f78defSmrg fi 1351a4f78defSmrg rm -rf conftest* 1352a4f78defSmrg ;; 1353a4f78defSmrg 1354a4f78defSmrgmips64*-*linux*) 1355a4f78defSmrg # Find out what ABI is being produced by ac_compile, and set linker 1356a4f78defSmrg # options accordingly. 1357a4f78defSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1358a4f78defSmrg if AC_TRY_EVAL(ac_compile); then 1359a4f78defSmrg emul=elf 1360a4f78defSmrg case `/usr/bin/file conftest.$ac_objext` in 1361a4f78defSmrg *32-bit*) 1362a4f78defSmrg emul="${emul}32" 1363a4f78defSmrg ;; 1364a4f78defSmrg *64-bit*) 1365a4f78defSmrg emul="${emul}64" 1366a4f78defSmrg ;; 1367a4f78defSmrg esac 1368a4f78defSmrg case `/usr/bin/file conftest.$ac_objext` in 1369a4f78defSmrg *MSB*) 1370a4f78defSmrg emul="${emul}btsmip" 1371a4f78defSmrg ;; 1372a4f78defSmrg *LSB*) 1373a4f78defSmrg emul="${emul}ltsmip" 1374a4f78defSmrg ;; 1375a4f78defSmrg esac 1376a4f78defSmrg case `/usr/bin/file conftest.$ac_objext` in 1377a4f78defSmrg *N32*) 1378a4f78defSmrg emul="${emul}n32" 1379a4f78defSmrg ;; 1380a4f78defSmrg esac 1381a4f78defSmrg LD="${LD-ld} -m $emul" 1382a4f78defSmrg fi 1383a4f78defSmrg rm -rf conftest* 1384a4f78defSmrg ;; 1385a4f78defSmrg 1386a4f78defSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1387a4f78defSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1388a4f78defSmrg # Find out what ABI is being produced by ac_compile, and set linker 1389a4f78defSmrg # options accordingly. Note that the listed cases only cover the 1390a4f78defSmrg # situations where additional linker options are needed (such as when 1391a4f78defSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1392a4f78defSmrg # vice versa); the common cases where no linker options are needed do 1393a4f78defSmrg # not appear in the list. 1394a4f78defSmrg echo 'int i;' > conftest.$ac_ext 1395a4f78defSmrg if AC_TRY_EVAL(ac_compile); then 1396a4f78defSmrg case `/usr/bin/file conftest.o` in 1397a4f78defSmrg *32-bit*) 1398a4f78defSmrg case $host in 1399a4f78defSmrg x86_64-*kfreebsd*-gnu) 1400a4f78defSmrg LD="${LD-ld} -m elf_i386_fbsd" 1401a4f78defSmrg ;; 1402a4f78defSmrg x86_64-*linux*) 1403a4f78defSmrg case `/usr/bin/file conftest.o` in 1404a4f78defSmrg *x86-64*) 1405a4f78defSmrg LD="${LD-ld} -m elf32_x86_64" 1406a4f78defSmrg ;; 1407a4f78defSmrg *) 1408a4f78defSmrg LD="${LD-ld} -m elf_i386" 1409a4f78defSmrg ;; 1410a4f78defSmrg esac 1411a4f78defSmrg ;; 1412a4f78defSmrg powerpc64le-*linux*) 1413a4f78defSmrg LD="${LD-ld} -m elf32lppclinux" 1414a4f78defSmrg ;; 1415a4f78defSmrg powerpc64-*linux*) 1416a4f78defSmrg LD="${LD-ld} -m elf32ppclinux" 1417a4f78defSmrg ;; 1418a4f78defSmrg s390x-*linux*) 1419a4f78defSmrg LD="${LD-ld} -m elf_s390" 1420a4f78defSmrg ;; 1421a4f78defSmrg sparc64-*linux*) 1422a4f78defSmrg LD="${LD-ld} -m elf32_sparc" 1423a4f78defSmrg ;; 1424a4f78defSmrg esac 1425a4f78defSmrg ;; 1426a4f78defSmrg *64-bit*) 1427a4f78defSmrg case $host in 1428a4f78defSmrg x86_64-*kfreebsd*-gnu) 1429a4f78defSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1430a4f78defSmrg ;; 1431a4f78defSmrg x86_64-*linux*) 1432a4f78defSmrg LD="${LD-ld} -m elf_x86_64" 1433a4f78defSmrg ;; 1434a4f78defSmrg powerpcle-*linux*) 1435a4f78defSmrg LD="${LD-ld} -m elf64lppc" 1436a4f78defSmrg ;; 1437a4f78defSmrg powerpc-*linux*) 1438a4f78defSmrg LD="${LD-ld} -m elf64ppc" 1439a4f78defSmrg ;; 1440a4f78defSmrg s390*-*linux*|s390*-*tpf*) 1441a4f78defSmrg LD="${LD-ld} -m elf64_s390" 1442a4f78defSmrg ;; 1443a4f78defSmrg sparc*-*linux*) 1444a4f78defSmrg LD="${LD-ld} -m elf64_sparc" 1445a4f78defSmrg ;; 1446a4f78defSmrg esac 1447a4f78defSmrg ;; 1448a4f78defSmrg esac 1449a4f78defSmrg fi 1450a4f78defSmrg rm -rf conftest* 1451a4f78defSmrg ;; 1452a4f78defSmrg 1453a4f78defSmrg*-*-sco3.2v5*) 1454a4f78defSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1455a4f78defSmrg SAVE_CFLAGS=$CFLAGS 1456a4f78defSmrg CFLAGS="$CFLAGS -belf" 1457a4f78defSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1458a4f78defSmrg [AC_LANG_PUSH(C) 1459a4f78defSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1460a4f78defSmrg AC_LANG_POP]) 1461a4f78defSmrg if test yes != "$lt_cv_cc_needs_belf"; then 1462a4f78defSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1463a4f78defSmrg CFLAGS=$SAVE_CFLAGS 1464a4f78defSmrg fi 1465a4f78defSmrg ;; 1466a4f78defSmrg*-*solaris*) 1467a4f78defSmrg # Find out what ABI is being produced by ac_compile, and set linker 1468a4f78defSmrg # options accordingly. 1469a4f78defSmrg echo 'int i;' > conftest.$ac_ext 1470a4f78defSmrg if AC_TRY_EVAL(ac_compile); then 1471a4f78defSmrg case `/usr/bin/file conftest.o` in 1472a4f78defSmrg *64-bit*) 1473a4f78defSmrg case $lt_cv_prog_gnu_ld in 1474a4f78defSmrg yes*) 1475a4f78defSmrg case $host in 1476a4f78defSmrg i?86-*-solaris*|x86_64-*-solaris*) 1477a4f78defSmrg LD="${LD-ld} -m elf_x86_64" 1478a4f78defSmrg ;; 1479a4f78defSmrg sparc*-*-solaris*) 1480a4f78defSmrg LD="${LD-ld} -m elf64_sparc" 1481a4f78defSmrg ;; 1482a4f78defSmrg esac 1483a4f78defSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1484a4f78defSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1485a4f78defSmrg LD=${LD-ld}_sol2 1486a4f78defSmrg fi 1487a4f78defSmrg ;; 1488a4f78defSmrg *) 1489a4f78defSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1490a4f78defSmrg LD="${LD-ld} -64" 1491a4f78defSmrg fi 1492a4f78defSmrg ;; 1493a4f78defSmrg esac 1494a4f78defSmrg ;; 1495a4f78defSmrg esac 1496a4f78defSmrg fi 1497a4f78defSmrg rm -rf conftest* 1498a4f78defSmrg ;; 1499a4f78defSmrgesac 1500a4f78defSmrg 1501a4f78defSmrgneed_locks=$enable_libtool_lock 1502a4f78defSmrg])# _LT_ENABLE_LOCK 1503a4f78defSmrg 1504a4f78defSmrg 1505a4f78defSmrg# _LT_PROG_AR 1506a4f78defSmrg# ----------- 1507a4f78defSmrgm4_defun([_LT_PROG_AR], 1508a4f78defSmrg[AC_CHECK_TOOLS(AR, [ar], false) 1509a4f78defSmrg: ${AR=ar} 1510a4f78defSmrg_LT_DECL([], [AR], [1], [The archiver]) 1511fb570538Smrg 1512fb570538Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 1513fb570538Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 1514fb570538Smrg# higher priority because thats what people were doing historically (setting 1515fb570538Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 1516fb570538Smrg# variable obsoleted/removed. 1517fb570538Smrg 1518fb570538Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 1519fb570538Smrglt_ar_flags=$AR_FLAGS 1520fb570538Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 1521fb570538Smrg 1522fb570538Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 1523fb570538Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 1524fb570538Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 1525fb570538Smrg [Flags to create an archive]) 1526a4f78defSmrg 1527a4f78defSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1528a4f78defSmrg [lt_cv_ar_at_file=no 1529a4f78defSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1530a4f78defSmrg [echo conftest.$ac_objext > conftest.lst 1531a4f78defSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1532a4f78defSmrg AC_TRY_EVAL([lt_ar_try]) 1533a4f78defSmrg if test 0 -eq "$ac_status"; then 1534a4f78defSmrg # Ensure the archiver fails upon bogus file names. 1535a4f78defSmrg rm -f conftest.$ac_objext libconftest.a 1536a4f78defSmrg AC_TRY_EVAL([lt_ar_try]) 1537a4f78defSmrg if test 0 -ne "$ac_status"; then 1538a4f78defSmrg lt_cv_ar_at_file=@ 1539a4f78defSmrg fi 1540a4f78defSmrg fi 1541a4f78defSmrg rm -f conftest.* libconftest.a 1542a4f78defSmrg ]) 1543a4f78defSmrg ]) 1544a4f78defSmrg 1545a4f78defSmrgif test no = "$lt_cv_ar_at_file"; then 1546a4f78defSmrg archiver_list_spec= 1547a4f78defSmrgelse 1548a4f78defSmrg archiver_list_spec=$lt_cv_ar_at_file 1549a4f78defSmrgfi 1550a4f78defSmrg_LT_DECL([], [archiver_list_spec], [1], 1551a4f78defSmrg [How to feed a file listing to the archiver]) 1552a4f78defSmrg])# _LT_PROG_AR 1553a4f78defSmrg 1554a4f78defSmrg 1555a4f78defSmrg# _LT_CMD_OLD_ARCHIVE 1556a4f78defSmrg# ------------------- 1557a4f78defSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1558a4f78defSmrg[_LT_PROG_AR 1559a4f78defSmrg 1560a4f78defSmrgAC_CHECK_TOOL(STRIP, strip, :) 1561a4f78defSmrgtest -z "$STRIP" && STRIP=: 1562a4f78defSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1563a4f78defSmrg 1564a4f78defSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1565a4f78defSmrgtest -z "$RANLIB" && RANLIB=: 1566a4f78defSmrg_LT_DECL([], [RANLIB], [1], 1567a4f78defSmrg [Commands used to install an old-style archive]) 1568a4f78defSmrg 1569a4f78defSmrg# Determine commands to create old-style static archives. 1570a4f78defSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1571a4f78defSmrgold_postinstall_cmds='chmod 644 $oldlib' 1572a4f78defSmrgold_postuninstall_cmds= 1573a4f78defSmrg 1574a4f78defSmrgif test -n "$RANLIB"; then 1575a4f78defSmrg case $host_os in 1576a4f78defSmrg bitrig* | openbsd*) 1577a4f78defSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1578a4f78defSmrg ;; 1579a4f78defSmrg *) 1580a4f78defSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1581a4f78defSmrg ;; 1582a4f78defSmrg esac 1583a4f78defSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1584a4f78defSmrgfi 1585a4f78defSmrg 1586a4f78defSmrgcase $host_os in 1587a4f78defSmrg darwin*) 1588a4f78defSmrg lock_old_archive_extraction=yes ;; 1589a4f78defSmrg *) 1590a4f78defSmrg lock_old_archive_extraction=no ;; 1591a4f78defSmrgesac 1592a4f78defSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1593a4f78defSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1594a4f78defSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1595a4f78defSmrg [Commands used to build an old-style archive]) 1596a4f78defSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 1597a4f78defSmrg [Whether to use a lock for old archive extraction]) 1598a4f78defSmrg])# _LT_CMD_OLD_ARCHIVE 1599a4f78defSmrg 1600a4f78defSmrg 1601a4f78defSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1602a4f78defSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1603a4f78defSmrg# ---------------------------------------------------------------- 1604a4f78defSmrg# Check whether the given compiler option works 1605a4f78defSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1606a4f78defSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1607a4f78defSmrgm4_require([_LT_DECL_SED])dnl 1608a4f78defSmrgAC_CACHE_CHECK([$1], [$2], 1609a4f78defSmrg [$2=no 1610a4f78defSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1611a4f78defSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1612a4f78defSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1613a4f78defSmrg # Insert the option either (1) after the last *FLAGS variable, or 1614a4f78defSmrg # (2) before a word containing "conftest.", or (3) at the end. 1615a4f78defSmrg # Note that $ac_compile itself does not contain backslashes and begins 1616a4f78defSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1617a4f78defSmrg # The option is referenced via a variable to avoid confusing sed. 1618a4f78defSmrg lt_compile=`echo "$ac_compile" | $SED \ 1619a4f78defSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1620a4f78defSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1621a4f78defSmrg -e 's:$: $lt_compiler_flag:'` 1622a4f78defSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1623a4f78defSmrg (eval "$lt_compile" 2>conftest.err) 1624a4f78defSmrg ac_status=$? 1625a4f78defSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1626a4f78defSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1627a4f78defSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1628a4f78defSmrg # The compiler can only warn and ignore the option if not recognized 1629a4f78defSmrg # So say no if there are warnings other than the usual output. 1630a4f78defSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1631a4f78defSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1632a4f78defSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1633a4f78defSmrg $2=yes 1634a4f78defSmrg fi 1635a4f78defSmrg fi 1636a4f78defSmrg $RM conftest* 1637a4f78defSmrg]) 1638a4f78defSmrg 1639a4f78defSmrgif test yes = "[$]$2"; then 1640a4f78defSmrg m4_if([$5], , :, [$5]) 1641a4f78defSmrgelse 1642a4f78defSmrg m4_if([$6], , :, [$6]) 1643a4f78defSmrgfi 1644a4f78defSmrg])# _LT_COMPILER_OPTION 1645a4f78defSmrg 1646a4f78defSmrg# Old name: 1647a4f78defSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1648a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 1649a4f78defSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1650a4f78defSmrg 1651a4f78defSmrg 1652a4f78defSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1653a4f78defSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1654a4f78defSmrg# ---------------------------------------------------- 1655a4f78defSmrg# Check whether the given linker option works 1656a4f78defSmrgAC_DEFUN([_LT_LINKER_OPTION], 1657a4f78defSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1658a4f78defSmrgm4_require([_LT_DECL_SED])dnl 1659a4f78defSmrgAC_CACHE_CHECK([$1], [$2], 1660a4f78defSmrg [$2=no 1661a4f78defSmrg save_LDFLAGS=$LDFLAGS 1662a4f78defSmrg LDFLAGS="$LDFLAGS $3" 1663a4f78defSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1664a4f78defSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1665a4f78defSmrg # The linker can only warn and ignore the option if not recognized 1666a4f78defSmrg # So say no if there are warnings 1667a4f78defSmrg if test -s conftest.err; then 1668a4f78defSmrg # Append any errors to the config.log. 1669a4f78defSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1670a4f78defSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1671a4f78defSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1672a4f78defSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1673a4f78defSmrg $2=yes 1674a4f78defSmrg fi 1675a4f78defSmrg else 1676a4f78defSmrg $2=yes 1677a4f78defSmrg fi 1678a4f78defSmrg fi 1679a4f78defSmrg $RM -r conftest* 1680a4f78defSmrg LDFLAGS=$save_LDFLAGS 1681a4f78defSmrg]) 1682a4f78defSmrg 1683a4f78defSmrgif test yes = "[$]$2"; then 1684a4f78defSmrg m4_if([$4], , :, [$4]) 1685a4f78defSmrgelse 1686a4f78defSmrg m4_if([$5], , :, [$5]) 1687a4f78defSmrgfi 1688a4f78defSmrg])# _LT_LINKER_OPTION 1689a4f78defSmrg 1690a4f78defSmrg# Old name: 1691a4f78defSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1692a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 1693a4f78defSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1694a4f78defSmrg 1695a4f78defSmrg 1696a4f78defSmrg# LT_CMD_MAX_LEN 1697a4f78defSmrg#--------------- 1698a4f78defSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1699a4f78defSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1700a4f78defSmrg# find the maximum length of command line arguments 1701a4f78defSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1702a4f78defSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1703a4f78defSmrg i=0 1704a4f78defSmrg teststring=ABCD 1705a4f78defSmrg 1706a4f78defSmrg case $build_os in 1707a4f78defSmrg msdosdjgpp*) 1708a4f78defSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1709a4f78defSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1710a4f78defSmrg # during glob expansion). Even if it were fixed, the result of this 1711a4f78defSmrg # check would be larger than it should be. 1712a4f78defSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1713a4f78defSmrg ;; 1714a4f78defSmrg 1715a4f78defSmrg gnu*) 1716a4f78defSmrg # Under GNU Hurd, this test is not required because there is 1717a4f78defSmrg # no limit to the length of command line arguments. 1718a4f78defSmrg # Libtool will interpret -1 as no limit whatsoever 1719a4f78defSmrg lt_cv_sys_max_cmd_len=-1; 1720a4f78defSmrg ;; 1721a4f78defSmrg 1722a4f78defSmrg cygwin* | mingw* | cegcc*) 1723a4f78defSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1724a4f78defSmrg # about 5 minutes as the teststring grows exponentially. 1725a4f78defSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1726a4f78defSmrg # you end up with a "frozen" computer, even though with patience 1727a4f78defSmrg # the test eventually succeeds (with a max line length of 256k). 1728a4f78defSmrg # Instead, let's just punt: use the minimum linelength reported by 1729a4f78defSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1730a4f78defSmrg lt_cv_sys_max_cmd_len=8192; 1731a4f78defSmrg ;; 1732a4f78defSmrg 1733a4f78defSmrg mint*) 1734a4f78defSmrg # On MiNT this can take a long time and run out of memory. 1735a4f78defSmrg lt_cv_sys_max_cmd_len=8192; 1736a4f78defSmrg ;; 1737a4f78defSmrg 1738a4f78defSmrg amigaos*) 1739a4f78defSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1740a4f78defSmrg # So we just punt and use a minimum line length of 8192. 1741a4f78defSmrg lt_cv_sys_max_cmd_len=8192; 1742a4f78defSmrg ;; 1743a4f78defSmrg 1744a4f78defSmrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1745a4f78defSmrg # This has been around since 386BSD, at least. Likely further. 1746a4f78defSmrg if test -x /sbin/sysctl; then 1747a4f78defSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1748a4f78defSmrg elif test -x /usr/sbin/sysctl; then 1749a4f78defSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1750a4f78defSmrg else 1751a4f78defSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1752a4f78defSmrg fi 1753a4f78defSmrg # And add a safety zone 1754a4f78defSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1755a4f78defSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1756a4f78defSmrg ;; 1757a4f78defSmrg 1758a4f78defSmrg interix*) 1759a4f78defSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1760a4f78defSmrg lt_cv_sys_max_cmd_len=196608 1761a4f78defSmrg ;; 1762a4f78defSmrg 1763a4f78defSmrg os2*) 1764a4f78defSmrg # The test takes a long time on OS/2. 1765a4f78defSmrg lt_cv_sys_max_cmd_len=8192 1766a4f78defSmrg ;; 1767a4f78defSmrg 1768a4f78defSmrg osf*) 1769a4f78defSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1770a4f78defSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1771a4f78defSmrg # nice to cause kernel panics so lets avoid the loop below. 1772a4f78defSmrg # First set a reasonable default. 1773a4f78defSmrg lt_cv_sys_max_cmd_len=16384 1774a4f78defSmrg # 1775a4f78defSmrg if test -x /sbin/sysconfig; then 1776a4f78defSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1777a4f78defSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1778a4f78defSmrg esac 1779a4f78defSmrg fi 1780a4f78defSmrg ;; 1781a4f78defSmrg sco3.2v5*) 1782a4f78defSmrg lt_cv_sys_max_cmd_len=102400 1783a4f78defSmrg ;; 1784a4f78defSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1785a4f78defSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1786a4f78defSmrg if test -n "$kargmax"; then 1787a4f78defSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1788a4f78defSmrg else 1789a4f78defSmrg lt_cv_sys_max_cmd_len=32768 1790a4f78defSmrg fi 1791a4f78defSmrg ;; 1792a4f78defSmrg *) 1793a4f78defSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1794a4f78defSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1795a4f78defSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 1796a4f78defSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1797a4f78defSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1798a4f78defSmrg else 1799a4f78defSmrg # Make teststring a little bigger before we do anything with it. 1800a4f78defSmrg # a 1K string should be a reasonable start. 1801a4f78defSmrg for i in 1 2 3 4 5 6 7 8; do 1802a4f78defSmrg teststring=$teststring$teststring 1803a4f78defSmrg done 1804a4f78defSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1805a4f78defSmrg # If test is not a shell built-in, we'll probably end up computing a 1806a4f78defSmrg # maximum length that is only half of the actual maximum length, but 1807a4f78defSmrg # we can't tell. 1808a4f78defSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1809a4f78defSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1810a4f78defSmrg test 17 != "$i" # 1/2 MB should be enough 1811a4f78defSmrg do 1812a4f78defSmrg i=`expr $i + 1` 1813a4f78defSmrg teststring=$teststring$teststring 1814a4f78defSmrg done 1815a4f78defSmrg # Only check the string length outside the loop. 1816a4f78defSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1817a4f78defSmrg teststring= 1818a4f78defSmrg # Add a significant safety factor because C++ compilers can tack on 1819a4f78defSmrg # massive amounts of additional arguments before passing them to the 1820a4f78defSmrg # linker. It appears as though 1/2 is a usable value. 1821a4f78defSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1822a4f78defSmrg fi 1823a4f78defSmrg ;; 1824a4f78defSmrg esac 1825a4f78defSmrg]) 1826a4f78defSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 1827a4f78defSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1828a4f78defSmrgelse 1829a4f78defSmrg AC_MSG_RESULT(none) 1830a4f78defSmrgfi 1831a4f78defSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1832a4f78defSmrg_LT_DECL([], [max_cmd_len], [0], 1833a4f78defSmrg [What is the maximum length of a command?]) 1834a4f78defSmrg])# LT_CMD_MAX_LEN 1835a4f78defSmrg 1836a4f78defSmrg# Old name: 1837a4f78defSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1838a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 1839a4f78defSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1840a4f78defSmrg 1841a4f78defSmrg 1842a4f78defSmrg# _LT_HEADER_DLFCN 1843a4f78defSmrg# ---------------- 1844a4f78defSmrgm4_defun([_LT_HEADER_DLFCN], 1845a4f78defSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1846a4f78defSmrg])# _LT_HEADER_DLFCN 1847a4f78defSmrg 1848a4f78defSmrg 1849a4f78defSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1850a4f78defSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1851a4f78defSmrg# ---------------------------------------------------------------- 1852a4f78defSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1853a4f78defSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1854a4f78defSmrgif test yes = "$cross_compiling"; then : 1855a4f78defSmrg [$4] 1856a4f78defSmrgelse 1857a4f78defSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1858a4f78defSmrg lt_status=$lt_dlunknown 1859a4f78defSmrg cat > conftest.$ac_ext <<_LT_EOF 1860a4f78defSmrg[#line $LINENO "configure" 1861a4f78defSmrg#include "confdefs.h" 1862a4f78defSmrg 1863a4f78defSmrg#if HAVE_DLFCN_H 1864a4f78defSmrg#include <dlfcn.h> 1865a4f78defSmrg#endif 1866a4f78defSmrg 1867a4f78defSmrg#include <stdio.h> 1868a4f78defSmrg 1869a4f78defSmrg#ifdef RTLD_GLOBAL 1870a4f78defSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1871a4f78defSmrg#else 1872a4f78defSmrg# ifdef DL_GLOBAL 1873a4f78defSmrg# define LT_DLGLOBAL DL_GLOBAL 1874a4f78defSmrg# else 1875a4f78defSmrg# define LT_DLGLOBAL 0 1876a4f78defSmrg# endif 1877a4f78defSmrg#endif 1878a4f78defSmrg 1879a4f78defSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1880a4f78defSmrg find out it does not work in some platform. */ 1881a4f78defSmrg#ifndef LT_DLLAZY_OR_NOW 1882a4f78defSmrg# ifdef RTLD_LAZY 1883a4f78defSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1884a4f78defSmrg# else 1885a4f78defSmrg# ifdef DL_LAZY 1886a4f78defSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1887a4f78defSmrg# else 1888a4f78defSmrg# ifdef RTLD_NOW 1889a4f78defSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1890a4f78defSmrg# else 1891a4f78defSmrg# ifdef DL_NOW 1892a4f78defSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1893a4f78defSmrg# else 1894a4f78defSmrg# define LT_DLLAZY_OR_NOW 0 1895a4f78defSmrg# endif 1896a4f78defSmrg# endif 1897a4f78defSmrg# endif 1898a4f78defSmrg# endif 1899a4f78defSmrg#endif 1900a4f78defSmrg 1901a4f78defSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 1902a4f78defSmrg correspondingly for the symbols needed. */ 1903a4f78defSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1904a4f78defSmrgint fnord () __attribute__((visibility("default"))); 1905a4f78defSmrg#endif 1906a4f78defSmrg 1907a4f78defSmrgint fnord () { return 42; } 1908a4f78defSmrgint main () 1909a4f78defSmrg{ 1910a4f78defSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1911a4f78defSmrg int status = $lt_dlunknown; 1912a4f78defSmrg 1913a4f78defSmrg if (self) 1914a4f78defSmrg { 1915a4f78defSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1916a4f78defSmrg else 1917a4f78defSmrg { 1918a4f78defSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1919a4f78defSmrg else puts (dlerror ()); 1920a4f78defSmrg } 1921a4f78defSmrg /* dlclose (self); */ 1922a4f78defSmrg } 1923a4f78defSmrg else 1924a4f78defSmrg puts (dlerror ()); 1925a4f78defSmrg 1926a4f78defSmrg return status; 1927a4f78defSmrg}] 1928a4f78defSmrg_LT_EOF 1929a4f78defSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1930a4f78defSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1931a4f78defSmrg lt_status=$? 1932a4f78defSmrg case x$lt_status in 1933a4f78defSmrg x$lt_dlno_uscore) $1 ;; 1934a4f78defSmrg x$lt_dlneed_uscore) $2 ;; 1935a4f78defSmrg x$lt_dlunknown|x*) $3 ;; 1936a4f78defSmrg esac 1937a4f78defSmrg else : 1938a4f78defSmrg # compilation failed 1939a4f78defSmrg $3 1940a4f78defSmrg fi 1941a4f78defSmrgfi 1942a4f78defSmrgrm -fr conftest* 1943a4f78defSmrg])# _LT_TRY_DLOPEN_SELF 1944a4f78defSmrg 1945a4f78defSmrg 1946a4f78defSmrg# LT_SYS_DLOPEN_SELF 1947a4f78defSmrg# ------------------ 1948a4f78defSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1949a4f78defSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1950a4f78defSmrgif test yes != "$enable_dlopen"; then 1951a4f78defSmrg enable_dlopen=unknown 1952a4f78defSmrg enable_dlopen_self=unknown 1953a4f78defSmrg enable_dlopen_self_static=unknown 1954a4f78defSmrgelse 1955a4f78defSmrg lt_cv_dlopen=no 1956a4f78defSmrg lt_cv_dlopen_libs= 1957a4f78defSmrg 1958a4f78defSmrg case $host_os in 1959a4f78defSmrg beos*) 1960a4f78defSmrg lt_cv_dlopen=load_add_on 1961a4f78defSmrg lt_cv_dlopen_libs= 1962a4f78defSmrg lt_cv_dlopen_self=yes 1963a4f78defSmrg ;; 1964a4f78defSmrg 1965a4f78defSmrg mingw* | pw32* | cegcc*) 1966a4f78defSmrg lt_cv_dlopen=LoadLibrary 1967a4f78defSmrg lt_cv_dlopen_libs= 1968a4f78defSmrg ;; 1969a4f78defSmrg 1970a4f78defSmrg cygwin*) 1971a4f78defSmrg lt_cv_dlopen=dlopen 1972a4f78defSmrg lt_cv_dlopen_libs= 1973a4f78defSmrg ;; 1974a4f78defSmrg 1975a4f78defSmrg darwin*) 1976a4f78defSmrg # if libdl is installed we need to link against it 1977a4f78defSmrg AC_CHECK_LIB([dl], [dlopen], 1978a4f78defSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1979a4f78defSmrg lt_cv_dlopen=dyld 1980a4f78defSmrg lt_cv_dlopen_libs= 1981a4f78defSmrg lt_cv_dlopen_self=yes 1982a4f78defSmrg ]) 1983a4f78defSmrg ;; 1984a4f78defSmrg 1985a4f78defSmrg tpf*) 1986a4f78defSmrg # Don't try to run any link tests for TPF. We know it's impossible 1987a4f78defSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 1988a4f78defSmrg lt_cv_dlopen=dlopen 1989a4f78defSmrg lt_cv_dlopen_libs= 1990a4f78defSmrg lt_cv_dlopen_self=no 1991a4f78defSmrg ;; 1992a4f78defSmrg 1993a4f78defSmrg *) 1994a4f78defSmrg AC_CHECK_FUNC([shl_load], 1995a4f78defSmrg [lt_cv_dlopen=shl_load], 1996a4f78defSmrg [AC_CHECK_LIB([dld], [shl_load], 1997a4f78defSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1998a4f78defSmrg [AC_CHECK_FUNC([dlopen], 1999a4f78defSmrg [lt_cv_dlopen=dlopen], 2000a4f78defSmrg [AC_CHECK_LIB([dl], [dlopen], 2001a4f78defSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 2002a4f78defSmrg [AC_CHECK_LIB([svld], [dlopen], 2003a4f78defSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 2004a4f78defSmrg [AC_CHECK_LIB([dld], [dld_link], 2005a4f78defSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 2006a4f78defSmrg ]) 2007a4f78defSmrg ]) 2008a4f78defSmrg ]) 2009a4f78defSmrg ]) 2010a4f78defSmrg ]) 2011a4f78defSmrg ;; 2012a4f78defSmrg esac 2013a4f78defSmrg 2014a4f78defSmrg if test no = "$lt_cv_dlopen"; then 2015a4f78defSmrg enable_dlopen=no 2016a4f78defSmrg else 2017a4f78defSmrg enable_dlopen=yes 2018a4f78defSmrg fi 2019a4f78defSmrg 2020a4f78defSmrg case $lt_cv_dlopen in 2021a4f78defSmrg dlopen) 2022a4f78defSmrg save_CPPFLAGS=$CPPFLAGS 2023a4f78defSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2024a4f78defSmrg 2025a4f78defSmrg save_LDFLAGS=$LDFLAGS 2026a4f78defSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2027a4f78defSmrg 2028a4f78defSmrg save_LIBS=$LIBS 2029a4f78defSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2030a4f78defSmrg 2031a4f78defSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 2032a4f78defSmrg lt_cv_dlopen_self, [dnl 2033a4f78defSmrg _LT_TRY_DLOPEN_SELF( 2034a4f78defSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2035a4f78defSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2036a4f78defSmrg ]) 2037a4f78defSmrg 2038a4f78defSmrg if test yes = "$lt_cv_dlopen_self"; then 2039a4f78defSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2040a4f78defSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2041a4f78defSmrg lt_cv_dlopen_self_static, [dnl 2042a4f78defSmrg _LT_TRY_DLOPEN_SELF( 2043a4f78defSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2044a4f78defSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2045a4f78defSmrg ]) 2046a4f78defSmrg fi 2047a4f78defSmrg 2048a4f78defSmrg CPPFLAGS=$save_CPPFLAGS 2049a4f78defSmrg LDFLAGS=$save_LDFLAGS 2050a4f78defSmrg LIBS=$save_LIBS 2051a4f78defSmrg ;; 2052a4f78defSmrg esac 2053a4f78defSmrg 2054a4f78defSmrg case $lt_cv_dlopen_self in 2055a4f78defSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2056a4f78defSmrg *) enable_dlopen_self=unknown ;; 2057a4f78defSmrg esac 2058a4f78defSmrg 2059a4f78defSmrg case $lt_cv_dlopen_self_static in 2060a4f78defSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2061a4f78defSmrg *) enable_dlopen_self_static=unknown ;; 2062a4f78defSmrg esac 2063a4f78defSmrgfi 2064a4f78defSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2065a4f78defSmrg [Whether dlopen is supported]) 2066a4f78defSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2067a4f78defSmrg [Whether dlopen of programs is supported]) 2068a4f78defSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2069a4f78defSmrg [Whether dlopen of statically linked programs is supported]) 2070a4f78defSmrg])# LT_SYS_DLOPEN_SELF 2071a4f78defSmrg 2072a4f78defSmrg# Old name: 2073a4f78defSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2074a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 2075a4f78defSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2076a4f78defSmrg 2077a4f78defSmrg 2078a4f78defSmrg# _LT_COMPILER_C_O([TAGNAME]) 2079a4f78defSmrg# --------------------------- 2080a4f78defSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 2081a4f78defSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2082a4f78defSmrgm4_defun([_LT_COMPILER_C_O], 2083a4f78defSmrg[m4_require([_LT_DECL_SED])dnl 2084a4f78defSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2085a4f78defSmrgm4_require([_LT_TAG_COMPILER])dnl 2086a4f78defSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2087a4f78defSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2088a4f78defSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2089a4f78defSmrg $RM -r conftest 2>/dev/null 2090a4f78defSmrg mkdir conftest 2091a4f78defSmrg cd conftest 2092a4f78defSmrg mkdir out 2093a4f78defSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2094a4f78defSmrg 2095a4f78defSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2096a4f78defSmrg # Insert the option either (1) after the last *FLAGS variable, or 2097a4f78defSmrg # (2) before a word containing "conftest.", or (3) at the end. 2098a4f78defSmrg # Note that $ac_compile itself does not contain backslashes and begins 2099a4f78defSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2100a4f78defSmrg lt_compile=`echo "$ac_compile" | $SED \ 2101a4f78defSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2102a4f78defSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2103a4f78defSmrg -e 's:$: $lt_compiler_flag:'` 2104a4f78defSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2105a4f78defSmrg (eval "$lt_compile" 2>out/conftest.err) 2106a4f78defSmrg ac_status=$? 2107a4f78defSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2108a4f78defSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2109a4f78defSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2110a4f78defSmrg then 2111a4f78defSmrg # The compiler can only warn and ignore the option if not recognized 2112a4f78defSmrg # So say no if there are warnings 2113a4f78defSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2114a4f78defSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2115a4f78defSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2116a4f78defSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2117a4f78defSmrg fi 2118a4f78defSmrg fi 2119a4f78defSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2120a4f78defSmrg $RM conftest* 2121a4f78defSmrg # SGI C++ compiler will create directory out/ii_files/ for 2122a4f78defSmrg # template instantiation 2123a4f78defSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2124a4f78defSmrg $RM out/* && rmdir out 2125a4f78defSmrg cd .. 2126a4f78defSmrg $RM -r conftest 2127a4f78defSmrg $RM conftest* 2128a4f78defSmrg]) 2129a4f78defSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2130a4f78defSmrg [Does compiler simultaneously support -c and -o options?]) 2131a4f78defSmrg])# _LT_COMPILER_C_O 2132a4f78defSmrg 2133a4f78defSmrg 2134a4f78defSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2135a4f78defSmrg# ---------------------------------- 2136a4f78defSmrg# Check to see if we can do hard links to lock some files if needed 2137a4f78defSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2138a4f78defSmrg[m4_require([_LT_ENABLE_LOCK])dnl 2139a4f78defSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2140a4f78defSmrg_LT_COMPILER_C_O([$1]) 2141a4f78defSmrg 2142a4f78defSmrghard_links=nottested 2143a4f78defSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2144a4f78defSmrg # do not overwrite the value of need_locks provided by the user 2145a4f78defSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2146a4f78defSmrg hard_links=yes 2147a4f78defSmrg $RM conftest* 2148a4f78defSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2149a4f78defSmrg touch conftest.a 2150a4f78defSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2151a4f78defSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2152a4f78defSmrg AC_MSG_RESULT([$hard_links]) 2153a4f78defSmrg if test no = "$hard_links"; then 2154a4f78defSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2155a4f78defSmrg need_locks=warn 2156a4f78defSmrg fi 2157a4f78defSmrgelse 2158a4f78defSmrg need_locks=no 2159a4f78defSmrgfi 2160a4f78defSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2161a4f78defSmrg])# _LT_COMPILER_FILE_LOCKS 2162a4f78defSmrg 2163a4f78defSmrg 2164a4f78defSmrg# _LT_CHECK_OBJDIR 2165a4f78defSmrg# ---------------- 2166a4f78defSmrgm4_defun([_LT_CHECK_OBJDIR], 2167a4f78defSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2168a4f78defSmrg[rm -f .libs 2>/dev/null 2169a4f78defSmrgmkdir .libs 2>/dev/null 2170a4f78defSmrgif test -d .libs; then 2171a4f78defSmrg lt_cv_objdir=.libs 2172a4f78defSmrgelse 2173a4f78defSmrg # MS-DOS does not allow filenames that begin with a dot. 2174a4f78defSmrg lt_cv_objdir=_libs 2175a4f78defSmrgfi 2176a4f78defSmrgrmdir .libs 2>/dev/null]) 2177a4f78defSmrgobjdir=$lt_cv_objdir 2178a4f78defSmrg_LT_DECL([], [objdir], [0], 2179a4f78defSmrg [The name of the directory that contains temporary libtool files])dnl 2180a4f78defSmrgm4_pattern_allow([LT_OBJDIR])dnl 2181a4f78defSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2182a4f78defSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2183a4f78defSmrg])# _LT_CHECK_OBJDIR 2184a4f78defSmrg 2185a4f78defSmrg 2186a4f78defSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2187a4f78defSmrg# -------------------------------------- 2188a4f78defSmrg# Check hardcoding attributes. 2189a4f78defSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2190a4f78defSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2191a4f78defSmrg_LT_TAGVAR(hardcode_action, $1)= 2192a4f78defSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2193a4f78defSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2194a4f78defSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2195a4f78defSmrg 2196a4f78defSmrg # We can hardcode non-existent directories. 2197a4f78defSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2198a4f78defSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2199a4f78defSmrg # have to relink, otherwise we might link with an installed library 2200a4f78defSmrg # when we should be linking with a yet-to-be-installed one 2201a4f78defSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2202a4f78defSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2203a4f78defSmrg # Linking always hardcodes the temporary library directory. 2204a4f78defSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2205a4f78defSmrg else 2206a4f78defSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2207a4f78defSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 2208a4f78defSmrg fi 2209a4f78defSmrgelse 2210a4f78defSmrg # We cannot hardcode anything, or else we can only hardcode existing 2211a4f78defSmrg # directories. 2212a4f78defSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2213a4f78defSmrgfi 2214a4f78defSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2215a4f78defSmrg 2216a4f78defSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2217a4f78defSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2218a4f78defSmrg # Fast installation is not supported 2219a4f78defSmrg enable_fast_install=no 2220a4f78defSmrgelif test yes = "$shlibpath_overrides_runpath" || 2221a4f78defSmrg test no = "$enable_shared"; then 2222a4f78defSmrg # Fast installation is not necessary 2223a4f78defSmrg enable_fast_install=needless 2224a4f78defSmrgfi 2225a4f78defSmrg_LT_TAGDECL([], [hardcode_action], [0], 2226a4f78defSmrg [How to hardcode a shared library path into an executable]) 2227a4f78defSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2228a4f78defSmrg 2229a4f78defSmrg 2230a4f78defSmrg# _LT_CMD_STRIPLIB 2231a4f78defSmrg# ---------------- 2232a4f78defSmrgm4_defun([_LT_CMD_STRIPLIB], 2233a4f78defSmrg[m4_require([_LT_DECL_EGREP]) 2234a4f78defSmrgstriplib= 2235a4f78defSmrgold_striplib= 2236a4f78defSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2237fb570538Smrgif test -z "$STRIP"; then 2238fb570538Smrg AC_MSG_RESULT([no]) 2239a4f78defSmrgelse 2240fb570538Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2241fb570538Smrg old_striplib="$STRIP --strip-debug" 2242fb570538Smrg striplib="$STRIP --strip-unneeded" 2243fb570538Smrg AC_MSG_RESULT([yes]) 2244fb570538Smrg else 2245fb570538Smrg case $host_os in 2246fb570538Smrg darwin*) 2247fb570538Smrg # FIXME - insert some real tests, host_os isn't really good enough 2248a4f78defSmrg striplib="$STRIP -x" 2249a4f78defSmrg old_striplib="$STRIP -S" 2250a4f78defSmrg AC_MSG_RESULT([yes]) 2251fb570538Smrg ;; 2252fb570538Smrg freebsd*) 2253fb570538Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 2254fb570538Smrg old_striplib="$STRIP --strip-debug" 2255fb570538Smrg striplib="$STRIP --strip-unneeded" 2256fb570538Smrg AC_MSG_RESULT([yes]) 2257fb570538Smrg else 2258fb570538Smrg AC_MSG_RESULT([no]) 2259fb570538Smrg fi 2260fb570538Smrg ;; 2261fb570538Smrg *) 2262a4f78defSmrg AC_MSG_RESULT([no]) 2263fb570538Smrg ;; 2264fb570538Smrg esac 2265fb570538Smrg fi 2266a4f78defSmrgfi 2267a4f78defSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2268a4f78defSmrg_LT_DECL([], [striplib], [1]) 2269a4f78defSmrg])# _LT_CMD_STRIPLIB 2270a4f78defSmrg 2271a4f78defSmrg 2272a4f78defSmrg# _LT_PREPARE_MUNGE_PATH_LIST 2273a4f78defSmrg# --------------------------- 2274a4f78defSmrg# Make sure func_munge_path_list() is defined correctly. 2275a4f78defSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2276a4f78defSmrg[[# func_munge_path_list VARIABLE PATH 2277a4f78defSmrg# ----------------------------------- 2278a4f78defSmrg# VARIABLE is name of variable containing _space_ separated list of 2279a4f78defSmrg# directories to be munged by the contents of PATH, which is string 2280a4f78defSmrg# having a format: 2281a4f78defSmrg# "DIR[:DIR]:" 2282a4f78defSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 2283a4f78defSmrg# ":DIR[:DIR]" 2284a4f78defSmrg# string "DIR[ DIR]" will be appended to VARIABLE 2285a4f78defSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2286a4f78defSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2287a4f78defSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 2288a4f78defSmrg# "DIR[:DIR]" 2289a4f78defSmrg# VARIABLE will be replaced by "DIR[ DIR]" 2290a4f78defSmrgfunc_munge_path_list () 2291a4f78defSmrg{ 2292a4f78defSmrg case x@S|@2 in 2293a4f78defSmrg x) 2294a4f78defSmrg ;; 2295a4f78defSmrg *:) 2296a4f78defSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2297a4f78defSmrg ;; 2298a4f78defSmrg x:*) 2299a4f78defSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2300a4f78defSmrg ;; 2301a4f78defSmrg *::*) 2302a4f78defSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2303a4f78defSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2304a4f78defSmrg ;; 2305a4f78defSmrg *) 2306a4f78defSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2307a4f78defSmrg ;; 2308a4f78defSmrg esac 2309a4f78defSmrg} 2310a4f78defSmrg]])# _LT_PREPARE_PATH_LIST 2311a4f78defSmrg 2312a4f78defSmrg 2313a4f78defSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2314a4f78defSmrg# ----------------------------- 2315a4f78defSmrg# PORTME Fill in your ld.so characteristics 2316a4f78defSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2317a4f78defSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2318a4f78defSmrgm4_require([_LT_DECL_EGREP])dnl 2319a4f78defSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2320a4f78defSmrgm4_require([_LT_DECL_OBJDUMP])dnl 2321a4f78defSmrgm4_require([_LT_DECL_SED])dnl 2322a4f78defSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2323a4f78defSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2324a4f78defSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2325a4f78defSmrgm4_if([$1], 2326a4f78defSmrg [], [ 2327a4f78defSmrgif test yes = "$GCC"; then 2328a4f78defSmrg case $host_os in 2329a4f78defSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2330a4f78defSmrg *) lt_awk_arg='/^libraries:/' ;; 2331a4f78defSmrg esac 2332a4f78defSmrg case $host_os in 2333a4f78defSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2334a4f78defSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 2335a4f78defSmrg esac 2336a4f78defSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2337a4f78defSmrg case $lt_search_path_spec in 2338a4f78defSmrg *\;*) 2339a4f78defSmrg # if the path contains ";" then we assume it to be the separator 2340a4f78defSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2341a4f78defSmrg # assumed that no part of a normal pathname contains ";" but that should 2342a4f78defSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2343a4f78defSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2344a4f78defSmrg ;; 2345a4f78defSmrg *) 2346a4f78defSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2347a4f78defSmrg ;; 2348a4f78defSmrg esac 2349a4f78defSmrg # Ok, now we have the path, separated by spaces, we can step through it 2350a4f78defSmrg # and add multilib dir if necessary... 2351a4f78defSmrg lt_tmp_lt_search_path_spec= 2352a4f78defSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2353a4f78defSmrg # ...but if some path component already ends with the multilib dir we assume 2354a4f78defSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2355a4f78defSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2356a4f78defSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2357a4f78defSmrg lt_multi_os_dir= 2358a4f78defSmrg ;; 2359a4f78defSmrg esac 2360a4f78defSmrg for lt_sys_path in $lt_search_path_spec; do 2361a4f78defSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2362a4f78defSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2363a4f78defSmrg elif test -n "$lt_multi_os_dir"; then 2364a4f78defSmrg test -d "$lt_sys_path" && \ 2365a4f78defSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2366a4f78defSmrg fi 2367a4f78defSmrg done 2368a4f78defSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2369a4f78defSmrgBEGIN {RS = " "; FS = "/|\n";} { 2370a4f78defSmrg lt_foo = ""; 2371a4f78defSmrg lt_count = 0; 2372a4f78defSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2373a4f78defSmrg if ($lt_i != "" && $lt_i != ".") { 2374a4f78defSmrg if ($lt_i == "..") { 2375a4f78defSmrg lt_count++; 2376a4f78defSmrg } else { 2377a4f78defSmrg if (lt_count == 0) { 2378a4f78defSmrg lt_foo = "/" $lt_i lt_foo; 2379a4f78defSmrg } else { 2380a4f78defSmrg lt_count--; 2381a4f78defSmrg } 2382a4f78defSmrg } 2383a4f78defSmrg } 2384a4f78defSmrg } 2385a4f78defSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2386a4f78defSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2387a4f78defSmrg}'` 2388a4f78defSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 2389a4f78defSmrg # for these hosts. 2390a4f78defSmrg case $host_os in 2391a4f78defSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2392a4f78defSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2393a4f78defSmrg esac 2394a4f78defSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2395a4f78defSmrgelse 2396a4f78defSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2397a4f78defSmrgfi]) 2398a4f78defSmrglibrary_names_spec= 2399a4f78defSmrglibname_spec='lib$name' 2400a4f78defSmrgsoname_spec= 2401a4f78defSmrgshrext_cmds=.so 2402a4f78defSmrgpostinstall_cmds= 2403a4f78defSmrgpostuninstall_cmds= 2404a4f78defSmrgfinish_cmds= 2405a4f78defSmrgfinish_eval= 2406a4f78defSmrgshlibpath_var= 2407a4f78defSmrgshlibpath_overrides_runpath=unknown 2408a4f78defSmrgversion_type=none 2409a4f78defSmrgdynamic_linker="$host_os ld.so" 2410a4f78defSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2411a4f78defSmrgneed_lib_prefix=unknown 2412a4f78defSmrghardcode_into_libs=no 2413a4f78defSmrg 2414a4f78defSmrg# when you set need_version to no, make sure it does not cause -set_version 2415a4f78defSmrg# flags to be left without arguments 2416a4f78defSmrgneed_version=unknown 2417a4f78defSmrg 2418a4f78defSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2419a4f78defSmrg[User-defined run-time library search path.]) 2420a4f78defSmrg 2421a4f78defSmrgcase $host_os in 2422a4f78defSmrgaix3*) 2423a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 2424a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2425a4f78defSmrg shlibpath_var=LIBPATH 2426a4f78defSmrg 2427a4f78defSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2428a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2429a4f78defSmrg ;; 2430a4f78defSmrg 2431a4f78defSmrgaix[[4-9]]*) 2432a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 2433a4f78defSmrg need_lib_prefix=no 2434a4f78defSmrg need_version=no 2435a4f78defSmrg hardcode_into_libs=yes 2436a4f78defSmrg if test ia64 = "$host_cpu"; then 2437a4f78defSmrg # AIX 5 supports IA64 2438a4f78defSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2439a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 2440a4f78defSmrg else 2441a4f78defSmrg # With GCC up to 2.95.x, collect2 would create an import file 2442a4f78defSmrg # for dependence libraries. The import file would start with 2443a4f78defSmrg # the line '#! .'. This would cause the generated library to 2444a4f78defSmrg # depend on '.', always an invalid library. This was fixed in 2445a4f78defSmrg # development snapshots of GCC prior to 3.0. 2446a4f78defSmrg case $host_os in 2447a4f78defSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2448a4f78defSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2449a4f78defSmrg echo ' yes ' 2450a4f78defSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2451a4f78defSmrg : 2452a4f78defSmrg else 2453a4f78defSmrg can_build_shared=no 2454a4f78defSmrg fi 2455a4f78defSmrg ;; 2456a4f78defSmrg esac 2457a4f78defSmrg # Using Import Files as archive members, it is possible to support 2458a4f78defSmrg # filename-based versioning of shared library archives on AIX. While 2459a4f78defSmrg # this would work for both with and without runtime linking, it will 2460a4f78defSmrg # prevent static linking of such archives. So we do filename-based 2461a4f78defSmrg # shared library versioning with .so extension only, which is used 2462a4f78defSmrg # when both runtime linking and shared linking is enabled. 2463a4f78defSmrg # Unfortunately, runtime linking may impact performance, so we do 2464a4f78defSmrg # not want this to be the default eventually. Also, we use the 2465a4f78defSmrg # versioned .so libs for executables only if there is the -brtl 2466a4f78defSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2467a4f78defSmrg # To allow for filename-based versioning support, we need to create 2468a4f78defSmrg # libNAME.so.V as an archive file, containing: 2469a4f78defSmrg # *) an Import File, referring to the versioned filename of the 2470a4f78defSmrg # archive as well as the shared archive member, telling the 2471a4f78defSmrg # bitwidth (32 or 64) of that shared object, and providing the 2472a4f78defSmrg # list of exported symbols of that shared object, eventually 2473a4f78defSmrg # decorated with the 'weak' keyword 2474a4f78defSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2475a4f78defSmrg # it being seen by the linker. 2476a4f78defSmrg # At run time we better use the real file rather than another symlink, 2477a4f78defSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2478a4f78defSmrg 2479a4f78defSmrg case $with_aix_soname,$aix_use_runtimelinking in 2480a4f78defSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2481a4f78defSmrg # soname into executable. Probably we can add versioning support to 2482a4f78defSmrg # collect2, so additional links can be useful in future. 2483a4f78defSmrg aix,yes) # traditional libtool 2484a4f78defSmrg dynamic_linker='AIX unversionable lib.so' 2485a4f78defSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2486a4f78defSmrg # instead of lib<name>.a to let people know that these are not 2487a4f78defSmrg # typical AIX shared libraries. 2488a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2489a4f78defSmrg ;; 2490a4f78defSmrg aix,no) # traditional AIX only 2491a4f78defSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2492a4f78defSmrg # We preserve .a as extension for shared libraries through AIX4.2 2493a4f78defSmrg # and later when we are not doing run time linking. 2494a4f78defSmrg library_names_spec='$libname$release.a $libname.a' 2495a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2496a4f78defSmrg ;; 2497a4f78defSmrg svr4,*) # full svr4 only 2498a4f78defSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2499a4f78defSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2500a4f78defSmrg # We do not specify a path in Import Files, so LIBPATH fires. 2501a4f78defSmrg shlibpath_overrides_runpath=yes 2502a4f78defSmrg ;; 2503a4f78defSmrg *,yes) # both, prefer svr4 2504a4f78defSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2505a4f78defSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2506a4f78defSmrg # unpreferred sharedlib libNAME.a needs extra handling 2507a4f78defSmrg postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 2508a4f78defSmrg postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 2509a4f78defSmrg # We do not specify a path in Import Files, so LIBPATH fires. 2510a4f78defSmrg shlibpath_overrides_runpath=yes 2511a4f78defSmrg ;; 2512a4f78defSmrg *,no) # both, prefer aix 2513a4f78defSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2514a4f78defSmrg library_names_spec='$libname$release.a $libname.a' 2515a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2516a4f78defSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2517a4f78defSmrg postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 2518a4f78defSmrg postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 2519a4f78defSmrg ;; 2520a4f78defSmrg esac 2521a4f78defSmrg shlibpath_var=LIBPATH 2522a4f78defSmrg fi 2523a4f78defSmrg ;; 2524a4f78defSmrg 2525a4f78defSmrgamigaos*) 2526a4f78defSmrg case $host_cpu in 2527a4f78defSmrg powerpc) 2528a4f78defSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2529a4f78defSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2530a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2531a4f78defSmrg ;; 2532a4f78defSmrg m68k) 2533a4f78defSmrg library_names_spec='$libname.ixlibrary $libname.a' 2534a4f78defSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2535a4f78defSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 2536a4f78defSmrg ;; 2537a4f78defSmrg esac 2538a4f78defSmrg ;; 2539a4f78defSmrg 2540a4f78defSmrgbeos*) 2541a4f78defSmrg library_names_spec='$libname$shared_ext' 2542a4f78defSmrg dynamic_linker="$host_os ld.so" 2543a4f78defSmrg shlibpath_var=LIBRARY_PATH 2544a4f78defSmrg ;; 2545a4f78defSmrg 2546a4f78defSmrgbsdi[[45]]*) 2547a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 2548a4f78defSmrg need_version=no 2549a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2550a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2551a4f78defSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2552a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 2553a4f78defSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2554a4f78defSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2555a4f78defSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2556a4f78defSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2557a4f78defSmrg # libtool to hard-code these into programs 2558a4f78defSmrg ;; 2559a4f78defSmrg 2560a4f78defSmrgcygwin* | mingw* | pw32* | cegcc*) 2561a4f78defSmrg version_type=windows 2562a4f78defSmrg shrext_cmds=.dll 2563a4f78defSmrg need_version=no 2564a4f78defSmrg need_lib_prefix=no 2565a4f78defSmrg 2566a4f78defSmrg case $GCC,$cc_basename in 2567a4f78defSmrg yes,*) 2568a4f78defSmrg # gcc 2569a4f78defSmrg library_names_spec='$libname.dll.a' 2570a4f78defSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2571a4f78defSmrg postinstall_cmds='base_file=`basename \$file`~ 2572a4f78defSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2573a4f78defSmrg dldir=$destdir/`dirname \$dlpath`~ 2574a4f78defSmrg test -d \$dldir || mkdir -p \$dldir~ 2575a4f78defSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2576a4f78defSmrg chmod a+x \$dldir/$dlname~ 2577a4f78defSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2578a4f78defSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2579a4f78defSmrg fi' 2580a4f78defSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2581a4f78defSmrg dlpath=$dir/\$dldll~ 2582a4f78defSmrg $RM \$dlpath' 2583a4f78defSmrg shlibpath_overrides_runpath=yes 2584a4f78defSmrg 2585a4f78defSmrg case $host_os in 2586a4f78defSmrg cygwin*) 2587a4f78defSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2588a4f78defSmrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2589a4f78defSmrgm4_if([$1], [],[ 2590a4f78defSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2591a4f78defSmrg ;; 2592a4f78defSmrg mingw* | cegcc*) 2593a4f78defSmrg # MinGW DLLs use traditional 'lib' prefix 2594a4f78defSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2595a4f78defSmrg ;; 2596a4f78defSmrg pw32*) 2597a4f78defSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2598a4f78defSmrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2599a4f78defSmrg ;; 2600a4f78defSmrg esac 2601a4f78defSmrg dynamic_linker='Win32 ld.exe' 2602a4f78defSmrg ;; 2603a4f78defSmrg 2604fb570538Smrg *,cl* | *,icl*) 2605fb570538Smrg # Native MSVC or ICC 2606a4f78defSmrg libname_spec='$name' 2607a4f78defSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2608a4f78defSmrg library_names_spec='$libname.dll.lib' 2609a4f78defSmrg 2610a4f78defSmrg case $build_os in 2611a4f78defSmrg mingw*) 2612a4f78defSmrg sys_lib_search_path_spec= 2613a4f78defSmrg lt_save_ifs=$IFS 2614a4f78defSmrg IFS=';' 2615a4f78defSmrg for lt_path in $LIB 2616a4f78defSmrg do 2617a4f78defSmrg IFS=$lt_save_ifs 2618a4f78defSmrg # Let DOS variable expansion print the short 8.3 style file name. 2619a4f78defSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2620a4f78defSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2621a4f78defSmrg done 2622a4f78defSmrg IFS=$lt_save_ifs 2623a4f78defSmrg # Convert to MSYS style. 2624a4f78defSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2625a4f78defSmrg ;; 2626a4f78defSmrg cygwin*) 2627a4f78defSmrg # Convert to unix form, then to dos form, then back to unix form 2628a4f78defSmrg # but this time dos style (no spaces!) so that the unix form looks 2629a4f78defSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 2630a4f78defSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2631a4f78defSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2632a4f78defSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2633a4f78defSmrg ;; 2634a4f78defSmrg *) 2635a4f78defSmrg sys_lib_search_path_spec=$LIB 2636a4f78defSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2637a4f78defSmrg # It is most probably a Windows format PATH. 2638a4f78defSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2639a4f78defSmrg else 2640a4f78defSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2641a4f78defSmrg fi 2642a4f78defSmrg # FIXME: find the short name or the path components, as spaces are 2643a4f78defSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 2644a4f78defSmrg ;; 2645a4f78defSmrg esac 2646a4f78defSmrg 2647a4f78defSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2648a4f78defSmrg postinstall_cmds='base_file=`basename \$file`~ 2649a4f78defSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2650a4f78defSmrg dldir=$destdir/`dirname \$dlpath`~ 2651a4f78defSmrg test -d \$dldir || mkdir -p \$dldir~ 2652a4f78defSmrg $install_prog $dir/$dlname \$dldir/$dlname' 2653a4f78defSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2654a4f78defSmrg dlpath=$dir/\$dldll~ 2655a4f78defSmrg $RM \$dlpath' 2656a4f78defSmrg shlibpath_overrides_runpath=yes 2657a4f78defSmrg dynamic_linker='Win32 link.exe' 2658a4f78defSmrg ;; 2659a4f78defSmrg 2660a4f78defSmrg *) 2661fb570538Smrg # Assume MSVC and ICC wrapper 2662a4f78defSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2663a4f78defSmrg dynamic_linker='Win32 ld.exe' 2664a4f78defSmrg ;; 2665a4f78defSmrg esac 2666a4f78defSmrg # FIXME: first we should search . and the directory the executable is in 2667a4f78defSmrg shlibpath_var=PATH 2668a4f78defSmrg ;; 2669a4f78defSmrg 2670a4f78defSmrgdarwin* | rhapsody*) 2671a4f78defSmrg dynamic_linker="$host_os dyld" 2672a4f78defSmrg version_type=darwin 2673a4f78defSmrg need_lib_prefix=no 2674a4f78defSmrg need_version=no 2675a4f78defSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2676a4f78defSmrg soname_spec='$libname$release$major$shared_ext' 2677a4f78defSmrg shlibpath_overrides_runpath=yes 2678a4f78defSmrg shlibpath_var=DYLD_LIBRARY_PATH 2679a4f78defSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2680a4f78defSmrgm4_if([$1], [],[ 2681a4f78defSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2682a4f78defSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2683a4f78defSmrg ;; 2684a4f78defSmrg 2685a4f78defSmrgdgux*) 2686a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 2687a4f78defSmrg need_lib_prefix=no 2688a4f78defSmrg need_version=no 2689a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2690a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2691a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 2692a4f78defSmrg ;; 2693a4f78defSmrg 2694a4f78defSmrgfreebsd* | dragonfly*) 2695a4f78defSmrg # DragonFly does not have aout. When/if they implement a new 2696a4f78defSmrg # versioning mechanism, adjust this. 2697a4f78defSmrg if test -x /usr/bin/objformat; then 2698a4f78defSmrg objformat=`/usr/bin/objformat` 2699a4f78defSmrg else 2700a4f78defSmrg case $host_os in 2701a4f78defSmrg freebsd[[23]].*) objformat=aout ;; 2702a4f78defSmrg *) objformat=elf ;; 2703a4f78defSmrg esac 2704a4f78defSmrg fi 2705a4f78defSmrg version_type=freebsd-$objformat 2706a4f78defSmrg case $version_type in 2707a4f78defSmrg freebsd-elf*) 2708a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2709a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2710a4f78defSmrg need_version=no 2711a4f78defSmrg need_lib_prefix=no 2712a4f78defSmrg ;; 2713a4f78defSmrg freebsd-*) 2714a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2715a4f78defSmrg need_version=yes 2716a4f78defSmrg ;; 2717a4f78defSmrg esac 2718a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 2719a4f78defSmrg case $host_os in 2720a4f78defSmrg freebsd2.*) 2721a4f78defSmrg shlibpath_overrides_runpath=yes 2722a4f78defSmrg ;; 2723a4f78defSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2724a4f78defSmrg shlibpath_overrides_runpath=yes 2725a4f78defSmrg hardcode_into_libs=yes 2726a4f78defSmrg ;; 2727a4f78defSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2728a4f78defSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2729a4f78defSmrg shlibpath_overrides_runpath=no 2730a4f78defSmrg hardcode_into_libs=yes 2731a4f78defSmrg ;; 2732a4f78defSmrg *) # from 4.6 on, and DragonFly 2733a4f78defSmrg shlibpath_overrides_runpath=yes 2734a4f78defSmrg hardcode_into_libs=yes 2735a4f78defSmrg ;; 2736a4f78defSmrg esac 2737a4f78defSmrg ;; 2738a4f78defSmrg 2739a4f78defSmrghaiku*) 2740a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 2741a4f78defSmrg need_lib_prefix=no 2742a4f78defSmrg need_version=no 2743a4f78defSmrg dynamic_linker="$host_os runtime_loader" 2744a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2745a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2746a4f78defSmrg shlibpath_var=LIBRARY_PATH 2747a4f78defSmrg shlibpath_overrides_runpath=no 2748a4f78defSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2749a4f78defSmrg hardcode_into_libs=yes 2750a4f78defSmrg ;; 2751a4f78defSmrg 2752a4f78defSmrghpux9* | hpux10* | hpux11*) 2753a4f78defSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2754a4f78defSmrg # link against other versions. 2755a4f78defSmrg version_type=sunos 2756a4f78defSmrg need_lib_prefix=no 2757a4f78defSmrg need_version=no 2758a4f78defSmrg case $host_cpu in 2759a4f78defSmrg ia64*) 2760a4f78defSmrg shrext_cmds='.so' 2761a4f78defSmrg hardcode_into_libs=yes 2762a4f78defSmrg dynamic_linker="$host_os dld.so" 2763a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 2764a4f78defSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2765a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2766a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2767a4f78defSmrg if test 32 = "$HPUX_IA64_MODE"; then 2768a4f78defSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2769a4f78defSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2770a4f78defSmrg else 2771a4f78defSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2772a4f78defSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2773a4f78defSmrg fi 2774a4f78defSmrg ;; 2775a4f78defSmrg hppa*64*) 2776a4f78defSmrg shrext_cmds='.sl' 2777a4f78defSmrg hardcode_into_libs=yes 2778a4f78defSmrg dynamic_linker="$host_os dld.sl" 2779a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2780a4f78defSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2781a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2782a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2783a4f78defSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2784a4f78defSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2785a4f78defSmrg ;; 2786a4f78defSmrg *) 2787a4f78defSmrg shrext_cmds='.sl' 2788a4f78defSmrg dynamic_linker="$host_os dld.sl" 2789a4f78defSmrg shlibpath_var=SHLIB_PATH 2790a4f78defSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2791a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2792a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2793a4f78defSmrg ;; 2794a4f78defSmrg esac 2795a4f78defSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2796a4f78defSmrg postinstall_cmds='chmod 555 $lib' 2797a4f78defSmrg # or fails outright, so override atomically: 2798a4f78defSmrg install_override_mode=555 2799a4f78defSmrg ;; 2800a4f78defSmrg 2801a4f78defSmrginterix[[3-9]]*) 2802a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 2803a4f78defSmrg need_lib_prefix=no 2804a4f78defSmrg need_version=no 2805a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2806a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2807a4f78defSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2808a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 2809a4f78defSmrg shlibpath_overrides_runpath=no 2810a4f78defSmrg hardcode_into_libs=yes 2811a4f78defSmrg ;; 2812a4f78defSmrg 2813a4f78defSmrgirix5* | irix6* | nonstopux*) 2814a4f78defSmrg case $host_os in 2815a4f78defSmrg nonstopux*) version_type=nonstopux ;; 2816a4f78defSmrg *) 2817a4f78defSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 2818a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 2819a4f78defSmrg else 2820a4f78defSmrg version_type=irix 2821a4f78defSmrg fi ;; 2822a4f78defSmrg esac 2823a4f78defSmrg need_lib_prefix=no 2824a4f78defSmrg need_version=no 2825a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2826a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2827a4f78defSmrg case $host_os in 2828a4f78defSmrg irix5* | nonstopux*) 2829a4f78defSmrg libsuff= shlibsuff= 2830a4f78defSmrg ;; 2831a4f78defSmrg *) 2832a4f78defSmrg case $LD in # libtool.m4 will add one of these switches to LD 2833a4f78defSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2834a4f78defSmrg libsuff= shlibsuff= libmagic=32-bit;; 2835a4f78defSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2836a4f78defSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2837a4f78defSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2838a4f78defSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2839a4f78defSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2840a4f78defSmrg esac 2841a4f78defSmrg ;; 2842a4f78defSmrg esac 2843a4f78defSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2844a4f78defSmrg shlibpath_overrides_runpath=no 2845a4f78defSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2846a4f78defSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2847a4f78defSmrg hardcode_into_libs=yes 2848a4f78defSmrg ;; 2849a4f78defSmrg 2850a4f78defSmrg# No shared lib support for Linux oldld, aout, or coff. 2851a4f78defSmrglinux*oldld* | linux*aout* | linux*coff*) 2852a4f78defSmrg dynamic_linker=no 2853a4f78defSmrg ;; 2854a4f78defSmrg 2855a4f78defSmrglinux*android*) 2856a4f78defSmrg version_type=none # Android doesn't support versioned libraries. 2857a4f78defSmrg need_lib_prefix=no 2858a4f78defSmrg need_version=no 2859a4f78defSmrg library_names_spec='$libname$release$shared_ext' 2860a4f78defSmrg soname_spec='$libname$release$shared_ext' 2861a4f78defSmrg finish_cmds= 2862a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 2863a4f78defSmrg shlibpath_overrides_runpath=yes 2864a4f78defSmrg 2865a4f78defSmrg # This implies no fast_install, which is unacceptable. 2866a4f78defSmrg # Some rework will be needed to allow for fast_install 2867a4f78defSmrg # before this can be enabled. 2868a4f78defSmrg hardcode_into_libs=yes 2869a4f78defSmrg 2870a4f78defSmrg dynamic_linker='Android linker' 2871a4f78defSmrg # Don't embed -rpath directories since the linker doesn't support them. 2872a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2873a4f78defSmrg ;; 2874a4f78defSmrg 2875a4f78defSmrg# This must be glibc/ELF. 2876a4f78defSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2877a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 2878a4f78defSmrg need_lib_prefix=no 2879a4f78defSmrg need_version=no 2880a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2881a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2882a4f78defSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2883a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 2884a4f78defSmrg shlibpath_overrides_runpath=no 2885a4f78defSmrg 2886a4f78defSmrg # Some binutils ld are patched to set DT_RUNPATH 2887a4f78defSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2888a4f78defSmrg [lt_cv_shlibpath_overrides_runpath=no 2889a4f78defSmrg save_LDFLAGS=$LDFLAGS 2890a4f78defSmrg save_libdir=$libdir 2891a4f78defSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2892a4f78defSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2893a4f78defSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2894a4f78defSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2895a4f78defSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2896a4f78defSmrg LDFLAGS=$save_LDFLAGS 2897a4f78defSmrg libdir=$save_libdir 2898a4f78defSmrg ]) 2899a4f78defSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2900a4f78defSmrg 2901a4f78defSmrg # This implies no fast_install, which is unacceptable. 2902a4f78defSmrg # Some rework will be needed to allow for fast_install 2903a4f78defSmrg # before this can be enabled. 2904a4f78defSmrg hardcode_into_libs=yes 2905a4f78defSmrg 2906a4f78defSmrg # Ideally, we could use ldconfig to report *all* directores which are 2907a4f78defSmrg # searched for libraries, however this is still not possible. Aside from not 2908a4f78defSmrg # being certain /sbin/ldconfig is available, command 2909a4f78defSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2910a4f78defSmrg # even though it is searched at run-time. Try to do the best guess by 2911a4f78defSmrg # appending ld.so.conf contents (and includes) to the search path. 2912a4f78defSmrg if test -f /etc/ld.so.conf; then 2913a4f78defSmrg 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' ' '` 2914a4f78defSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2915a4f78defSmrg fi 2916a4f78defSmrg 2917a4f78defSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2918a4f78defSmrg # powerpc, because MkLinux only supported shared libraries with the 2919a4f78defSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2920a4f78defSmrg # most powerpc-linux boxes support dynamic linking these days and 2921a4f78defSmrg # people can always --disable-shared, the test was removed, and we 2922a4f78defSmrg # assume the GNU/Linux dynamic linker is in use. 2923a4f78defSmrg dynamic_linker='GNU/Linux ld.so' 2924a4f78defSmrg ;; 2925a4f78defSmrg 2926a4f78defSmrgnetbsd*) 2927a4f78defSmrg version_type=sunos 2928a4f78defSmrg need_lib_prefix=no 2929a4f78defSmrg need_version=no 2930a4f78defSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2931a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2932a4f78defSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2933a4f78defSmrg dynamic_linker='NetBSD (a.out) ld.so' 2934a4f78defSmrg else 2935a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2936a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2937a4f78defSmrg dynamic_linker='NetBSD ld.elf_so' 2938a4f78defSmrg fi 2939a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 2940a4f78defSmrg shlibpath_overrides_runpath=yes 2941a4f78defSmrg hardcode_into_libs=yes 2942a4f78defSmrg ;; 2943a4f78defSmrg 2944a4f78defSmrgnewsos6) 2945a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 2946a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2947a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 2948a4f78defSmrg shlibpath_overrides_runpath=yes 2949a4f78defSmrg ;; 2950a4f78defSmrg 2951a4f78defSmrg*nto* | *qnx*) 2952a4f78defSmrg version_type=qnx 2953a4f78defSmrg need_lib_prefix=no 2954a4f78defSmrg need_version=no 2955a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2956a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 2957a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 2958a4f78defSmrg shlibpath_overrides_runpath=no 2959a4f78defSmrg hardcode_into_libs=yes 2960a4f78defSmrg dynamic_linker='ldqnx.so' 2961a4f78defSmrg ;; 2962a4f78defSmrg 2963a4f78defSmrgopenbsd* | bitrig*) 2964a4f78defSmrg version_type=sunos 2965a4f78defSmrg sys_lib_dlsearch_path_spec=/usr/lib 2966a4f78defSmrg need_lib_prefix=no 2967a4f78defSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2968a4f78defSmrg need_version=no 2969a4f78defSmrg else 2970a4f78defSmrg need_version=yes 2971a4f78defSmrg fi 2972a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2973a4f78defSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2974a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 2975a4f78defSmrg shlibpath_overrides_runpath=yes 2976a4f78defSmrg ;; 2977a4f78defSmrg 2978a4f78defSmrgos2*) 2979a4f78defSmrg libname_spec='$name' 2980a4f78defSmrg version_type=windows 2981a4f78defSmrg shrext_cmds=.dll 2982a4f78defSmrg need_version=no 2983a4f78defSmrg need_lib_prefix=no 2984a4f78defSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 2985a4f78defSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2986a4f78defSmrg v=$($ECHO $release$versuffix | tr -d .-); 2987a4f78defSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2988a4f78defSmrg $ECHO $n$v`$shared_ext' 2989a4f78defSmrg library_names_spec='${libname}_dll.$libext' 2990a4f78defSmrg dynamic_linker='OS/2 ld.exe' 2991a4f78defSmrg shlibpath_var=BEGINLIBPATH 2992a4f78defSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2993a4f78defSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2994a4f78defSmrg postinstall_cmds='base_file=`basename \$file`~ 2995a4f78defSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2996a4f78defSmrg dldir=$destdir/`dirname \$dlpath`~ 2997a4f78defSmrg test -d \$dldir || mkdir -p \$dldir~ 2998a4f78defSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2999a4f78defSmrg chmod a+x \$dldir/$dlname~ 3000a4f78defSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3001a4f78defSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3002a4f78defSmrg fi' 3003a4f78defSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 3004a4f78defSmrg dlpath=$dir/\$dldll~ 3005a4f78defSmrg $RM \$dlpath' 3006a4f78defSmrg ;; 3007a4f78defSmrg 3008a4f78defSmrgosf3* | osf4* | osf5*) 3009a4f78defSmrg version_type=osf 3010a4f78defSmrg need_lib_prefix=no 3011a4f78defSmrg need_version=no 3012a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 3013a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3014a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 3015a4f78defSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3016a4f78defSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3017a4f78defSmrg ;; 3018a4f78defSmrg 3019a4f78defSmrgrdos*) 3020a4f78defSmrg dynamic_linker=no 3021a4f78defSmrg ;; 3022a4f78defSmrg 3023a4f78defSmrgsolaris*) 3024a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 3025a4f78defSmrg need_lib_prefix=no 3026a4f78defSmrg need_version=no 3027a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3028a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 3029a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 3030a4f78defSmrg shlibpath_overrides_runpath=yes 3031a4f78defSmrg hardcode_into_libs=yes 3032a4f78defSmrg # ldd complains unless libraries are executable 3033a4f78defSmrg postinstall_cmds='chmod +x $lib' 3034a4f78defSmrg ;; 3035a4f78defSmrg 3036a4f78defSmrgsunos4*) 3037a4f78defSmrg version_type=sunos 3038a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3039a4f78defSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3040a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 3041a4f78defSmrg shlibpath_overrides_runpath=yes 3042a4f78defSmrg if test yes = "$with_gnu_ld"; then 3043a4f78defSmrg need_lib_prefix=no 3044a4f78defSmrg fi 3045a4f78defSmrg need_version=yes 3046a4f78defSmrg ;; 3047a4f78defSmrg 3048a4f78defSmrgsysv4 | sysv4.3*) 3049a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 3050a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3051a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 3052a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 3053a4f78defSmrg case $host_vendor in 3054a4f78defSmrg sni) 3055a4f78defSmrg shlibpath_overrides_runpath=no 3056a4f78defSmrg need_lib_prefix=no 3057a4f78defSmrg runpath_var=LD_RUN_PATH 3058a4f78defSmrg ;; 3059a4f78defSmrg siemens) 3060a4f78defSmrg need_lib_prefix=no 3061a4f78defSmrg ;; 3062a4f78defSmrg motorola) 3063a4f78defSmrg need_lib_prefix=no 3064a4f78defSmrg need_version=no 3065a4f78defSmrg shlibpath_overrides_runpath=no 3066a4f78defSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3067a4f78defSmrg ;; 3068a4f78defSmrg esac 3069a4f78defSmrg ;; 3070a4f78defSmrg 3071a4f78defSmrgsysv4*MP*) 3072a4f78defSmrg if test -d /usr/nec; then 3073a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 3074a4f78defSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3075a4f78defSmrg soname_spec='$libname$shared_ext.$major' 3076a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 3077a4f78defSmrg fi 3078a4f78defSmrg ;; 3079a4f78defSmrg 3080a4f78defSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3081a4f78defSmrg version_type=sco 3082a4f78defSmrg need_lib_prefix=no 3083a4f78defSmrg need_version=no 3084a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3085a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 3086a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 3087a4f78defSmrg shlibpath_overrides_runpath=yes 3088a4f78defSmrg hardcode_into_libs=yes 3089a4f78defSmrg if test yes = "$with_gnu_ld"; then 3090a4f78defSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3091a4f78defSmrg else 3092a4f78defSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3093a4f78defSmrg case $host_os in 3094a4f78defSmrg sco3.2v5*) 3095a4f78defSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3096a4f78defSmrg ;; 3097a4f78defSmrg esac 3098a4f78defSmrg fi 3099a4f78defSmrg sys_lib_dlsearch_path_spec='/usr/lib' 3100a4f78defSmrg ;; 3101a4f78defSmrg 3102a4f78defSmrgtpf*) 3103a4f78defSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3104a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 3105a4f78defSmrg need_lib_prefix=no 3106a4f78defSmrg need_version=no 3107a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3108a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 3109a4f78defSmrg shlibpath_overrides_runpath=no 3110a4f78defSmrg hardcode_into_libs=yes 3111a4f78defSmrg ;; 3112a4f78defSmrg 3113a4f78defSmrguts4*) 3114a4f78defSmrg version_type=linux # correct to gnu/linux during the next big refactor 3115a4f78defSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3116a4f78defSmrg soname_spec='$libname$release$shared_ext$major' 3117a4f78defSmrg shlibpath_var=LD_LIBRARY_PATH 3118a4f78defSmrg ;; 3119a4f78defSmrg 3120a4f78defSmrg*) 3121a4f78defSmrg dynamic_linker=no 3122a4f78defSmrg ;; 3123a4f78defSmrgesac 3124a4f78defSmrgAC_MSG_RESULT([$dynamic_linker]) 3125a4f78defSmrgtest no = "$dynamic_linker" && can_build_shared=no 3126a4f78defSmrg 3127a4f78defSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3128a4f78defSmrgif test yes = "$GCC"; then 3129a4f78defSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3130a4f78defSmrgfi 3131a4f78defSmrg 3132a4f78defSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3133a4f78defSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3134a4f78defSmrgfi 3135a4f78defSmrg 3136a4f78defSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3137a4f78defSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3138a4f78defSmrgfi 3139a4f78defSmrg 3140a4f78defSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3141a4f78defSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3142a4f78defSmrg 3143a4f78defSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3144a4f78defSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3145a4f78defSmrg 3146a4f78defSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3147a4f78defSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3148a4f78defSmrg 3149a4f78defSmrg_LT_DECL([], [variables_saved_for_relink], [1], 3150a4f78defSmrg [Variables whose values should be saved in libtool wrapper scripts and 3151a4f78defSmrg restored at link time]) 3152a4f78defSmrg_LT_DECL([], [need_lib_prefix], [0], 3153a4f78defSmrg [Do we need the "lib" prefix for modules?]) 3154a4f78defSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3155a4f78defSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3156a4f78defSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3157a4f78defSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3158a4f78defSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3159a4f78defSmrg [Is shlibpath searched before the hard-coded library search path?]) 3160a4f78defSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3161a4f78defSmrg_LT_DECL([], [library_names_spec], [1], 3162a4f78defSmrg [[List of archive names. First name is the real one, the rest are links. 3163a4f78defSmrg The last name is the one that the linker finds with -lNAME]]) 3164a4f78defSmrg_LT_DECL([], [soname_spec], [1], 3165a4f78defSmrg [[The coded name of the library, if different from the real name]]) 3166a4f78defSmrg_LT_DECL([], [install_override_mode], [1], 3167a4f78defSmrg [Permission mode override for installation of shared libraries]) 3168a4f78defSmrg_LT_DECL([], [postinstall_cmds], [2], 3169a4f78defSmrg [Command to use after installation of a shared archive]) 3170a4f78defSmrg_LT_DECL([], [postuninstall_cmds], [2], 3171a4f78defSmrg [Command to use after uninstallation of a shared archive]) 3172a4f78defSmrg_LT_DECL([], [finish_cmds], [2], 3173a4f78defSmrg [Commands used to finish a libtool library installation in a directory]) 3174a4f78defSmrg_LT_DECL([], [finish_eval], [1], 3175a4f78defSmrg [[As "finish_cmds", except a single script fragment to be evaled but 3176a4f78defSmrg not shown]]) 3177a4f78defSmrg_LT_DECL([], [hardcode_into_libs], [0], 3178a4f78defSmrg [Whether we should hardcode library paths into libraries]) 3179a4f78defSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3180a4f78defSmrg [Compile-time system search path for libraries]) 3181a4f78defSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3182a4f78defSmrg [Detected run-time system search path for libraries]) 3183a4f78defSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3184a4f78defSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3185a4f78defSmrg])# _LT_SYS_DYNAMIC_LINKER 3186a4f78defSmrg 3187a4f78defSmrg 3188a4f78defSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 3189a4f78defSmrg# -------------------------- 3190a4f78defSmrg# find a file program that can recognize shared library 3191a4f78defSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3192a4f78defSmrg[m4_require([_LT_DECL_EGREP])dnl 3193a4f78defSmrgAC_MSG_CHECKING([for $1]) 3194a4f78defSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3195a4f78defSmrg[case $MAGIC_CMD in 3196a4f78defSmrg[[\\/*] | ?:[\\/]*]) 3197a4f78defSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3198a4f78defSmrg ;; 3199a4f78defSmrg*) 3200a4f78defSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 3201a4f78defSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3202a4f78defSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3203a4f78defSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3204a4f78defSmrgdnl not every word. This closes a longstanding sh security hole. 3205a4f78defSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3206a4f78defSmrg for ac_dir in $ac_dummy; do 3207a4f78defSmrg IFS=$lt_save_ifs 3208a4f78defSmrg test -z "$ac_dir" && ac_dir=. 3209a4f78defSmrg if test -f "$ac_dir/$1"; then 3210a4f78defSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3211a4f78defSmrg if test -n "$file_magic_test_file"; then 3212a4f78defSmrg case $deplibs_check_method in 3213a4f78defSmrg "file_magic "*) 3214a4f78defSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3215a4f78defSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3216a4f78defSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3217a4f78defSmrg $EGREP "$file_magic_regex" > /dev/null; then 3218a4f78defSmrg : 3219a4f78defSmrg else 3220a4f78defSmrg cat <<_LT_EOF 1>&2 3221a4f78defSmrg 3222a4f78defSmrg*** Warning: the command libtool uses to detect shared libraries, 3223a4f78defSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3224a4f78defSmrg*** The result is that libtool may fail to recognize shared libraries 3225a4f78defSmrg*** as such. This will affect the creation of libtool libraries that 3226a4f78defSmrg*** depend on shared libraries, but programs linked with such libtool 3227a4f78defSmrg*** libraries will work regardless of this problem. Nevertheless, you 3228a4f78defSmrg*** may want to report the problem to your system manager and/or to 3229a4f78defSmrg*** bug-libtool@gnu.org 3230a4f78defSmrg 3231a4f78defSmrg_LT_EOF 3232a4f78defSmrg fi ;; 3233a4f78defSmrg esac 3234a4f78defSmrg fi 3235a4f78defSmrg break 3236a4f78defSmrg fi 3237a4f78defSmrg done 3238a4f78defSmrg IFS=$lt_save_ifs 3239a4f78defSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 3240a4f78defSmrg ;; 3241a4f78defSmrgesac]) 3242a4f78defSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3243a4f78defSmrgif test -n "$MAGIC_CMD"; then 3244a4f78defSmrg AC_MSG_RESULT($MAGIC_CMD) 3245a4f78defSmrgelse 3246a4f78defSmrg AC_MSG_RESULT(no) 3247a4f78defSmrgfi 3248a4f78defSmrg_LT_DECL([], [MAGIC_CMD], [0], 3249a4f78defSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3250a4f78defSmrg])# _LT_PATH_TOOL_PREFIX 3251a4f78defSmrg 3252a4f78defSmrg# Old name: 3253a4f78defSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3254a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 3255a4f78defSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3256a4f78defSmrg 3257a4f78defSmrg 3258a4f78defSmrg# _LT_PATH_MAGIC 3259a4f78defSmrg# -------------- 3260a4f78defSmrg# find a file program that can recognize a shared library 3261a4f78defSmrgm4_defun([_LT_PATH_MAGIC], 3262a4f78defSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3263a4f78defSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3264a4f78defSmrg if test -n "$ac_tool_prefix"; then 3265a4f78defSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3266a4f78defSmrg else 3267a4f78defSmrg MAGIC_CMD=: 3268a4f78defSmrg fi 3269a4f78defSmrgfi 3270a4f78defSmrg])# _LT_PATH_MAGIC 3271a4f78defSmrg 3272a4f78defSmrg 3273a4f78defSmrg# LT_PATH_LD 3274a4f78defSmrg# ---------- 3275a4f78defSmrg# find the pathname to the GNU or non-GNU linker 3276a4f78defSmrgAC_DEFUN([LT_PATH_LD], 3277a4f78defSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3278a4f78defSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3279a4f78defSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3280a4f78defSmrgm4_require([_LT_DECL_SED])dnl 3281a4f78defSmrgm4_require([_LT_DECL_EGREP])dnl 3282a4f78defSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3283a4f78defSmrg 3284a4f78defSmrgAC_ARG_WITH([gnu-ld], 3285a4f78defSmrg [AS_HELP_STRING([--with-gnu-ld], 3286a4f78defSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3287a4f78defSmrg [test no = "$withval" || with_gnu_ld=yes], 3288a4f78defSmrg [with_gnu_ld=no])dnl 3289a4f78defSmrg 3290a4f78defSmrgac_prog=ld 3291a4f78defSmrgif test yes = "$GCC"; then 3292a4f78defSmrg # Check if gcc -print-prog-name=ld gives a path. 3293a4f78defSmrg AC_MSG_CHECKING([for ld used by $CC]) 3294a4f78defSmrg case $host in 3295a4f78defSmrg *-*-mingw*) 3296a4f78defSmrg # gcc leaves a trailing carriage return, which upsets mingw 3297a4f78defSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3298a4f78defSmrg *) 3299a4f78defSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3300a4f78defSmrg esac 3301a4f78defSmrg case $ac_prog in 3302a4f78defSmrg # Accept absolute paths. 3303a4f78defSmrg [[\\/]]* | ?:[[\\/]]*) 3304a4f78defSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3305a4f78defSmrg # Canonicalize the pathname of ld 3306a4f78defSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3307a4f78defSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3308a4f78defSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3309a4f78defSmrg done 3310a4f78defSmrg test -z "$LD" && LD=$ac_prog 3311a4f78defSmrg ;; 3312a4f78defSmrg "") 3313a4f78defSmrg # If it fails, then pretend we aren't using GCC. 3314a4f78defSmrg ac_prog=ld 3315a4f78defSmrg ;; 3316a4f78defSmrg *) 3317a4f78defSmrg # If it is relative, then search for the first ld in PATH. 3318a4f78defSmrg with_gnu_ld=unknown 3319a4f78defSmrg ;; 3320a4f78defSmrg esac 3321a4f78defSmrgelif test yes = "$with_gnu_ld"; then 3322a4f78defSmrg AC_MSG_CHECKING([for GNU ld]) 3323a4f78defSmrgelse 3324a4f78defSmrg AC_MSG_CHECKING([for non-GNU ld]) 3325a4f78defSmrgfi 3326a4f78defSmrgAC_CACHE_VAL(lt_cv_path_LD, 3327a4f78defSmrg[if test -z "$LD"; then 3328a4f78defSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3329a4f78defSmrg for ac_dir in $PATH; do 3330a4f78defSmrg IFS=$lt_save_ifs 3331a4f78defSmrg test -z "$ac_dir" && ac_dir=. 3332a4f78defSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3333a4f78defSmrg lt_cv_path_LD=$ac_dir/$ac_prog 3334a4f78defSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3335a4f78defSmrg # but apparently some variants of GNU ld only accept -v. 3336a4f78defSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3337a4f78defSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3338a4f78defSmrg *GNU* | *'with BFD'*) 3339a4f78defSmrg test no != "$with_gnu_ld" && break 3340a4f78defSmrg ;; 3341a4f78defSmrg *) 3342a4f78defSmrg test yes != "$with_gnu_ld" && break 3343a4f78defSmrg ;; 3344a4f78defSmrg esac 3345a4f78defSmrg fi 3346a4f78defSmrg done 3347a4f78defSmrg IFS=$lt_save_ifs 3348a4f78defSmrgelse 3349a4f78defSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 3350a4f78defSmrgfi]) 3351a4f78defSmrgLD=$lt_cv_path_LD 3352a4f78defSmrgif test -n "$LD"; then 3353a4f78defSmrg AC_MSG_RESULT($LD) 3354a4f78defSmrgelse 3355a4f78defSmrg AC_MSG_RESULT(no) 3356a4f78defSmrgfi 3357a4f78defSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3358a4f78defSmrg_LT_PATH_LD_GNU 3359a4f78defSmrgAC_SUBST([LD]) 3360a4f78defSmrg 3361a4f78defSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3362a4f78defSmrg])# LT_PATH_LD 3363a4f78defSmrg 3364a4f78defSmrg# Old names: 3365a4f78defSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3366a4f78defSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3367a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 3368a4f78defSmrgdnl AC_DEFUN([AM_PROG_LD], []) 3369a4f78defSmrgdnl AC_DEFUN([AC_PROG_LD], []) 3370a4f78defSmrg 3371a4f78defSmrg 3372a4f78defSmrg# _LT_PATH_LD_GNU 3373a4f78defSmrg#- -------------- 3374a4f78defSmrgm4_defun([_LT_PATH_LD_GNU], 3375a4f78defSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3376a4f78defSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3377a4f78defSmrgcase `$LD -v 2>&1 </dev/null` in 3378a4f78defSmrg*GNU* | *'with BFD'*) 3379a4f78defSmrg lt_cv_prog_gnu_ld=yes 3380a4f78defSmrg ;; 3381a4f78defSmrg*) 3382a4f78defSmrg lt_cv_prog_gnu_ld=no 3383a4f78defSmrg ;; 3384a4f78defSmrgesac]) 3385a4f78defSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3386a4f78defSmrg])# _LT_PATH_LD_GNU 3387a4f78defSmrg 3388a4f78defSmrg 3389a4f78defSmrg# _LT_CMD_RELOAD 3390a4f78defSmrg# -------------- 3391a4f78defSmrg# find reload flag for linker 3392a4f78defSmrg# -- PORTME Some linkers may need a different reload flag. 3393a4f78defSmrgm4_defun([_LT_CMD_RELOAD], 3394a4f78defSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3395a4f78defSmrg lt_cv_ld_reload_flag, 3396a4f78defSmrg [lt_cv_ld_reload_flag='-r']) 3397a4f78defSmrgreload_flag=$lt_cv_ld_reload_flag 3398a4f78defSmrgcase $reload_flag in 3399a4f78defSmrg"" | " "*) ;; 3400a4f78defSmrg*) reload_flag=" $reload_flag" ;; 3401a4f78defSmrgesac 3402a4f78defSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3403a4f78defSmrgcase $host_os in 3404a4f78defSmrg cygwin* | mingw* | pw32* | cegcc*) 3405a4f78defSmrg if test yes != "$GCC"; then 3406a4f78defSmrg reload_cmds=false 3407a4f78defSmrg fi 3408a4f78defSmrg ;; 3409a4f78defSmrg darwin*) 3410a4f78defSmrg if test yes = "$GCC"; then 3411a4f78defSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3412a4f78defSmrg else 3413a4f78defSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3414a4f78defSmrg fi 3415a4f78defSmrg ;; 3416a4f78defSmrgesac 3417a4f78defSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3418a4f78defSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3419a4f78defSmrg])# _LT_CMD_RELOAD 3420a4f78defSmrg 3421a4f78defSmrg 3422a4f78defSmrg# _LT_PATH_DD 3423a4f78defSmrg# ----------- 3424a4f78defSmrg# find a working dd 3425a4f78defSmrgm4_defun([_LT_PATH_DD], 3426a4f78defSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3427a4f78defSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3428a4f78defSmrgcat conftest.i conftest.i >conftest2.i 3429a4f78defSmrg: ${lt_DD:=$DD} 3430a4f78defSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3431a4f78defSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3432a4f78defSmrg cmp -s conftest.i conftest.out \ 3433a4f78defSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3434a4f78defSmrgfi]) 3435a4f78defSmrgrm -f conftest.i conftest2.i conftest.out]) 3436a4f78defSmrg])# _LT_PATH_DD 3437a4f78defSmrg 3438a4f78defSmrg 3439a4f78defSmrg# _LT_CMD_TRUNCATE 3440a4f78defSmrg# ---------------- 3441a4f78defSmrg# find command to truncate a binary pipe 3442a4f78defSmrgm4_defun([_LT_CMD_TRUNCATE], 3443a4f78defSmrg[m4_require([_LT_PATH_DD]) 3444a4f78defSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3445a4f78defSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3446a4f78defSmrgcat conftest.i conftest.i >conftest2.i 3447a4f78defSmrglt_cv_truncate_bin= 3448a4f78defSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3449a4f78defSmrg cmp -s conftest.i conftest.out \ 3450a4f78defSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3451a4f78defSmrgfi 3452a4f78defSmrgrm -f conftest.i conftest2.i conftest.out 3453a4f78defSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3454a4f78defSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3455a4f78defSmrg [Command to truncate a binary pipe]) 3456a4f78defSmrg])# _LT_CMD_TRUNCATE 3457a4f78defSmrg 3458a4f78defSmrg 3459a4f78defSmrg# _LT_CHECK_MAGIC_METHOD 3460a4f78defSmrg# ---------------------- 3461a4f78defSmrg# how to check for library dependencies 3462a4f78defSmrg# -- PORTME fill in with the dynamic library characteristics 3463a4f78defSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3464a4f78defSmrg[m4_require([_LT_DECL_EGREP]) 3465a4f78defSmrgm4_require([_LT_DECL_OBJDUMP]) 3466a4f78defSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3467a4f78defSmrglt_cv_deplibs_check_method, 3468a4f78defSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3469a4f78defSmrglt_cv_file_magic_test_file= 3470a4f78defSmrglt_cv_deplibs_check_method='unknown' 3471a4f78defSmrg# Need to set the preceding variable on all platforms that support 3472a4f78defSmrg# interlibrary dependencies. 3473a4f78defSmrg# 'none' -- dependencies not supported. 3474a4f78defSmrg# 'unknown' -- same as none, but documents that we really don't know. 3475a4f78defSmrg# 'pass_all' -- all dependencies passed with no checks. 3476a4f78defSmrg# 'test_compile' -- check by making test program. 3477a4f78defSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3478a4f78defSmrg# that responds to the $file_magic_cmd with a given extended regex. 3479a4f78defSmrg# If you have 'file' or equivalent on your system and you're not sure 3480a4f78defSmrg# whether 'pass_all' will *always* work, you probably want this one. 3481a4f78defSmrg 3482a4f78defSmrgcase $host_os in 3483a4f78defSmrgaix[[4-9]]*) 3484a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3485a4f78defSmrg ;; 3486a4f78defSmrg 3487a4f78defSmrgbeos*) 3488a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3489a4f78defSmrg ;; 3490a4f78defSmrg 3491a4f78defSmrgbsdi[[45]]*) 3492a4f78defSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3493a4f78defSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3494a4f78defSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3495a4f78defSmrg ;; 3496a4f78defSmrg 3497a4f78defSmrgcygwin*) 3498a4f78defSmrg # func_win32_libid is a shell function defined in ltmain.sh 3499a4f78defSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3500a4f78defSmrg lt_cv_file_magic_cmd='func_win32_libid' 3501a4f78defSmrg ;; 3502a4f78defSmrg 3503a4f78defSmrgmingw* | pw32*) 3504a4f78defSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3505a4f78defSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3506a4f78defSmrg # unless we find 'file', for example because we are cross-compiling. 3507a4f78defSmrg if ( file / ) >/dev/null 2>&1; then 3508a4f78defSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3509a4f78defSmrg lt_cv_file_magic_cmd='func_win32_libid' 3510a4f78defSmrg else 3511a4f78defSmrg # Keep this pattern in sync with the one in func_win32_libid. 3512a4f78defSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3513a4f78defSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3514a4f78defSmrg fi 3515a4f78defSmrg ;; 3516a4f78defSmrg 3517a4f78defSmrgcegcc*) 3518a4f78defSmrg # use the weaker test based on 'objdump'. See mingw*. 3519a4f78defSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3520a4f78defSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3521a4f78defSmrg ;; 3522a4f78defSmrg 3523a4f78defSmrgdarwin* | rhapsody*) 3524a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3525a4f78defSmrg ;; 3526a4f78defSmrg 3527a4f78defSmrgfreebsd* | dragonfly*) 3528a4f78defSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3529a4f78defSmrg case $host_cpu in 3530a4f78defSmrg i*86 ) 3531a4f78defSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3532a4f78defSmrg # Let's accept both of them until this is cleared up. 3533a4f78defSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3534a4f78defSmrg lt_cv_file_magic_cmd=/usr/bin/file 3535a4f78defSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3536a4f78defSmrg ;; 3537a4f78defSmrg esac 3538a4f78defSmrg else 3539a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3540a4f78defSmrg fi 3541a4f78defSmrg ;; 3542a4f78defSmrg 3543a4f78defSmrghaiku*) 3544a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3545a4f78defSmrg ;; 3546a4f78defSmrg 3547a4f78defSmrghpux10.20* | hpux11*) 3548a4f78defSmrg lt_cv_file_magic_cmd=/usr/bin/file 3549a4f78defSmrg case $host_cpu in 3550a4f78defSmrg ia64*) 3551a4f78defSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3552a4f78defSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3553a4f78defSmrg ;; 3554a4f78defSmrg hppa*64*) 3555a4f78defSmrg [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]'] 3556a4f78defSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3557a4f78defSmrg ;; 3558a4f78defSmrg *) 3559a4f78defSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3560a4f78defSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3561a4f78defSmrg ;; 3562a4f78defSmrg esac 3563a4f78defSmrg ;; 3564a4f78defSmrg 3565a4f78defSmrginterix[[3-9]]*) 3566a4f78defSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3567a4f78defSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3568a4f78defSmrg ;; 3569a4f78defSmrg 3570a4f78defSmrgirix5* | irix6* | nonstopux*) 3571a4f78defSmrg case $LD in 3572a4f78defSmrg *-32|*"-32 ") libmagic=32-bit;; 3573a4f78defSmrg *-n32|*"-n32 ") libmagic=N32;; 3574a4f78defSmrg *-64|*"-64 ") libmagic=64-bit;; 3575a4f78defSmrg *) libmagic=never-match;; 3576a4f78defSmrg esac 3577a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3578a4f78defSmrg ;; 3579a4f78defSmrg 3580a4f78defSmrg# This must be glibc/ELF. 3581a4f78defSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3582a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3583a4f78defSmrg ;; 3584a4f78defSmrg 3585a4f78defSmrgnetbsd*) 3586a4f78defSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3587a4f78defSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3588a4f78defSmrg else 3589a4f78defSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3590a4f78defSmrg fi 3591a4f78defSmrg ;; 3592a4f78defSmrg 3593a4f78defSmrgnewos6*) 3594a4f78defSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3595a4f78defSmrg lt_cv_file_magic_cmd=/usr/bin/file 3596a4f78defSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3597a4f78defSmrg ;; 3598a4f78defSmrg 3599a4f78defSmrg*nto* | *qnx*) 3600a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3601a4f78defSmrg ;; 3602a4f78defSmrg 3603a4f78defSmrgopenbsd* | bitrig*) 3604a4f78defSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3605a4f78defSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3606a4f78defSmrg else 3607a4f78defSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3608a4f78defSmrg fi 3609a4f78defSmrg ;; 3610a4f78defSmrg 3611a4f78defSmrgosf3* | osf4* | osf5*) 3612a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3613a4f78defSmrg ;; 3614a4f78defSmrg 3615a4f78defSmrgrdos*) 3616a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3617a4f78defSmrg ;; 3618a4f78defSmrg 3619a4f78defSmrgsolaris*) 3620a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3621a4f78defSmrg ;; 3622a4f78defSmrg 3623a4f78defSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3624a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3625a4f78defSmrg ;; 3626a4f78defSmrg 3627a4f78defSmrgsysv4 | sysv4.3*) 3628a4f78defSmrg case $host_vendor in 3629a4f78defSmrg motorola) 3630a4f78defSmrg 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]]' 3631a4f78defSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3632a4f78defSmrg ;; 3633a4f78defSmrg ncr) 3634a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3635a4f78defSmrg ;; 3636a4f78defSmrg sequent) 3637a4f78defSmrg lt_cv_file_magic_cmd='/bin/file' 3638a4f78defSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3639a4f78defSmrg ;; 3640a4f78defSmrg sni) 3641a4f78defSmrg lt_cv_file_magic_cmd='/bin/file' 3642a4f78defSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3643a4f78defSmrg lt_cv_file_magic_test_file=/lib/libc.so 3644a4f78defSmrg ;; 3645a4f78defSmrg siemens) 3646a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3647a4f78defSmrg ;; 3648a4f78defSmrg pc) 3649a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3650a4f78defSmrg ;; 3651a4f78defSmrg esac 3652a4f78defSmrg ;; 3653a4f78defSmrg 3654a4f78defSmrgtpf*) 3655a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3656a4f78defSmrg ;; 3657a4f78defSmrgos2*) 3658a4f78defSmrg lt_cv_deplibs_check_method=pass_all 3659a4f78defSmrg ;; 3660a4f78defSmrgesac 3661a4f78defSmrg]) 3662a4f78defSmrg 3663a4f78defSmrgfile_magic_glob= 3664a4f78defSmrgwant_nocaseglob=no 3665a4f78defSmrgif test "$build" = "$host"; then 3666a4f78defSmrg case $host_os in 3667a4f78defSmrg mingw* | pw32*) 3668a4f78defSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3669a4f78defSmrg want_nocaseglob=yes 3670a4f78defSmrg else 3671a4f78defSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3672a4f78defSmrg fi 3673a4f78defSmrg ;; 3674a4f78defSmrg esac 3675a4f78defSmrgfi 3676a4f78defSmrg 3677a4f78defSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3678a4f78defSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3679a4f78defSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3680a4f78defSmrg 3681a4f78defSmrg_LT_DECL([], [deplibs_check_method], [1], 3682a4f78defSmrg [Method to check whether dependent libraries are shared objects]) 3683a4f78defSmrg_LT_DECL([], [file_magic_cmd], [1], 3684a4f78defSmrg [Command to use when deplibs_check_method = "file_magic"]) 3685a4f78defSmrg_LT_DECL([], [file_magic_glob], [1], 3686a4f78defSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 3687a4f78defSmrg_LT_DECL([], [want_nocaseglob], [1], 3688a4f78defSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3689a4f78defSmrg])# _LT_CHECK_MAGIC_METHOD 3690a4f78defSmrg 3691a4f78defSmrg 3692a4f78defSmrg# LT_PATH_NM 3693a4f78defSmrg# ---------- 3694a4f78defSmrg# find the pathname to a BSD- or MS-compatible name lister 3695a4f78defSmrgAC_DEFUN([LT_PATH_NM], 3696a4f78defSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3697a4f78defSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3698a4f78defSmrg[if test -n "$NM"; then 3699a4f78defSmrg # Let the user override the test. 3700a4f78defSmrg lt_cv_path_NM=$NM 3701a4f78defSmrgelse 3702a4f78defSmrg lt_nm_to_check=${ac_tool_prefix}nm 3703a4f78defSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3704a4f78defSmrg lt_nm_to_check="$lt_nm_to_check nm" 3705a4f78defSmrg fi 3706a4f78defSmrg for lt_tmp_nm in $lt_nm_to_check; do 3707a4f78defSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3708a4f78defSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3709a4f78defSmrg IFS=$lt_save_ifs 3710a4f78defSmrg test -z "$ac_dir" && ac_dir=. 3711a4f78defSmrg tmp_nm=$ac_dir/$lt_tmp_nm 3712a4f78defSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3713a4f78defSmrg # Check to see if the nm accepts a BSD-compat flag. 3714a4f78defSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3715a4f78defSmrg # nm: unknown option "B" ignored 3716a4f78defSmrg # Tru64's nm complains that /dev/null is an invalid object file 3717a4f78defSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3718a4f78defSmrg case $build_os in 3719a4f78defSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3720a4f78defSmrg *) lt_bad_file=/dev/null ;; 3721a4f78defSmrg esac 3722a4f78defSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3723a4f78defSmrg *$lt_bad_file* | *'Invalid file or object type'*) 3724a4f78defSmrg lt_cv_path_NM="$tmp_nm -B" 3725a4f78defSmrg break 2 3726a4f78defSmrg ;; 3727a4f78defSmrg *) 3728a4f78defSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3729a4f78defSmrg */dev/null*) 3730a4f78defSmrg lt_cv_path_NM="$tmp_nm -p" 3731a4f78defSmrg break 2 3732a4f78defSmrg ;; 3733a4f78defSmrg *) 3734a4f78defSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3735a4f78defSmrg continue # so that we can try to find one that supports BSD flags 3736a4f78defSmrg ;; 3737a4f78defSmrg esac 3738a4f78defSmrg ;; 3739a4f78defSmrg esac 3740a4f78defSmrg fi 3741a4f78defSmrg done 3742a4f78defSmrg IFS=$lt_save_ifs 3743a4f78defSmrg done 3744a4f78defSmrg : ${lt_cv_path_NM=no} 3745a4f78defSmrgfi]) 3746a4f78defSmrgif test no != "$lt_cv_path_NM"; then 3747a4f78defSmrg NM=$lt_cv_path_NM 3748a4f78defSmrgelse 3749a4f78defSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3750a4f78defSmrg if test -n "$DUMPBIN"; then : 3751a4f78defSmrg # Let the user override the test. 3752a4f78defSmrg else 3753a4f78defSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3754a4f78defSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3755a4f78defSmrg *COFF*) 3756a4f78defSmrg DUMPBIN="$DUMPBIN -symbols -headers" 3757a4f78defSmrg ;; 3758a4f78defSmrg *) 3759a4f78defSmrg DUMPBIN=: 3760a4f78defSmrg ;; 3761a4f78defSmrg esac 3762a4f78defSmrg fi 3763a4f78defSmrg AC_SUBST([DUMPBIN]) 3764a4f78defSmrg if test : != "$DUMPBIN"; then 3765a4f78defSmrg NM=$DUMPBIN 3766a4f78defSmrg fi 3767a4f78defSmrgfi 3768a4f78defSmrgtest -z "$NM" && NM=nm 3769a4f78defSmrgAC_SUBST([NM]) 3770a4f78defSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3771a4f78defSmrg 3772a4f78defSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3773a4f78defSmrg [lt_cv_nm_interface="BSD nm" 3774a4f78defSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3775a4f78defSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3776a4f78defSmrg (eval "$ac_compile" 2>conftest.err) 3777a4f78defSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3778a4f78defSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3779a4f78defSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3780a4f78defSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3781a4f78defSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3782a4f78defSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3783a4f78defSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3784a4f78defSmrg lt_cv_nm_interface="MS dumpbin" 3785a4f78defSmrg fi 3786a4f78defSmrg rm -f conftest*]) 3787a4f78defSmrg])# LT_PATH_NM 3788a4f78defSmrg 3789a4f78defSmrg# Old names: 3790a4f78defSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3791a4f78defSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3792a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 3793a4f78defSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3794a4f78defSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3795a4f78defSmrg 3796a4f78defSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3797a4f78defSmrg# -------------------------------- 3798a4f78defSmrg# how to determine the name of the shared library 3799a4f78defSmrg# associated with a specific link library. 3800a4f78defSmrg# -- PORTME fill in with the dynamic library characteristics 3801a4f78defSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3802a4f78defSmrg[m4_require([_LT_DECL_EGREP]) 3803a4f78defSmrgm4_require([_LT_DECL_OBJDUMP]) 3804a4f78defSmrgm4_require([_LT_DECL_DLLTOOL]) 3805a4f78defSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3806a4f78defSmrglt_cv_sharedlib_from_linklib_cmd, 3807a4f78defSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3808a4f78defSmrg 3809a4f78defSmrgcase $host_os in 3810a4f78defSmrgcygwin* | mingw* | pw32* | cegcc*) 3811a4f78defSmrg # two different shell functions defined in ltmain.sh; 3812a4f78defSmrg # decide which one to use based on capabilities of $DLLTOOL 3813a4f78defSmrg case `$DLLTOOL --help 2>&1` in 3814a4f78defSmrg *--identify-strict*) 3815a4f78defSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3816a4f78defSmrg ;; 3817a4f78defSmrg *) 3818a4f78defSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3819a4f78defSmrg ;; 3820a4f78defSmrg esac 3821a4f78defSmrg ;; 3822a4f78defSmrg*) 3823a4f78defSmrg # fallback: assume linklib IS sharedlib 3824a4f78defSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 3825a4f78defSmrg ;; 3826a4f78defSmrgesac 3827a4f78defSmrg]) 3828a4f78defSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3829a4f78defSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3830a4f78defSmrg 3831a4f78defSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3832a4f78defSmrg [Command to associate shared and link libraries]) 3833a4f78defSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3834a4f78defSmrg 3835a4f78defSmrg 3836a4f78defSmrg# _LT_PATH_MANIFEST_TOOL 3837a4f78defSmrg# ---------------------- 3838a4f78defSmrg# locate the manifest tool 3839a4f78defSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3840a4f78defSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3841a4f78defSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3842a4f78defSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3843a4f78defSmrg [lt_cv_path_mainfest_tool=no 3844a4f78defSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3845a4f78defSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3846a4f78defSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3847a4f78defSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3848a4f78defSmrg lt_cv_path_mainfest_tool=yes 3849a4f78defSmrg fi 3850a4f78defSmrg rm -f conftest*]) 3851a4f78defSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 3852a4f78defSmrg MANIFEST_TOOL=: 3853a4f78defSmrgfi 3854a4f78defSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3855a4f78defSmrg])# _LT_PATH_MANIFEST_TOOL 3856a4f78defSmrg 3857a4f78defSmrg 3858a4f78defSmrg# _LT_DLL_DEF_P([FILE]) 3859a4f78defSmrg# --------------------- 3860a4f78defSmrg# True iff FILE is a Windows DLL '.def' file. 3861a4f78defSmrg# Keep in sync with func_dll_def_p in the libtool script 3862a4f78defSmrgAC_DEFUN([_LT_DLL_DEF_P], 3863a4f78defSmrg[dnl 3864a4f78defSmrg test DEF = "`$SED -n dnl 3865a4f78defSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3866a4f78defSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3867a4f78defSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3868a4f78defSmrg -e q dnl Only consider the first "real" line 3869a4f78defSmrg $1`" dnl 3870a4f78defSmrg])# _LT_DLL_DEF_P 3871a4f78defSmrg 3872a4f78defSmrg 3873a4f78defSmrg# LT_LIB_M 3874a4f78defSmrg# -------- 3875a4f78defSmrg# check for math library 3876a4f78defSmrgAC_DEFUN([LT_LIB_M], 3877a4f78defSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3878a4f78defSmrgLIBM= 3879a4f78defSmrgcase $host in 3880a4f78defSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3881a4f78defSmrg # These system don't have libm, or don't need it 3882a4f78defSmrg ;; 3883a4f78defSmrg*-ncr-sysv4.3*) 3884a4f78defSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3885a4f78defSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3886a4f78defSmrg ;; 3887a4f78defSmrg*) 3888a4f78defSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 3889a4f78defSmrg ;; 3890a4f78defSmrgesac 3891a4f78defSmrgAC_SUBST([LIBM]) 3892a4f78defSmrg])# LT_LIB_M 3893a4f78defSmrg 3894a4f78defSmrg# Old name: 3895a4f78defSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3896a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 3897a4f78defSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3898a4f78defSmrg 3899a4f78defSmrg 3900a4f78defSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3901a4f78defSmrg# ------------------------------- 3902a4f78defSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3903a4f78defSmrg[m4_require([_LT_TAG_COMPILER])dnl 3904a4f78defSmrg 3905a4f78defSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3906a4f78defSmrg 3907a4f78defSmrgif test yes = "$GCC"; then 3908a4f78defSmrg case $cc_basename in 3909a4f78defSmrg nvcc*) 3910a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3911a4f78defSmrg *) 3912a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3913a4f78defSmrg esac 3914a4f78defSmrg 3915a4f78defSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3916a4f78defSmrg lt_cv_prog_compiler_rtti_exceptions, 3917a4f78defSmrg [-fno-rtti -fno-exceptions], [], 3918a4f78defSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3919a4f78defSmrgfi 3920a4f78defSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3921a4f78defSmrg [Compiler flag to turn off builtin functions]) 3922a4f78defSmrg])# _LT_COMPILER_NO_RTTI 3923a4f78defSmrg 3924a4f78defSmrg 3925a4f78defSmrg# _LT_CMD_GLOBAL_SYMBOLS 3926a4f78defSmrg# ---------------------- 3927a4f78defSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3928a4f78defSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3929a4f78defSmrgAC_REQUIRE([AC_PROG_CC])dnl 3930a4f78defSmrgAC_REQUIRE([AC_PROG_AWK])dnl 3931a4f78defSmrgAC_REQUIRE([LT_PATH_NM])dnl 3932a4f78defSmrgAC_REQUIRE([LT_PATH_LD])dnl 3933a4f78defSmrgm4_require([_LT_DECL_SED])dnl 3934a4f78defSmrgm4_require([_LT_DECL_EGREP])dnl 3935a4f78defSmrgm4_require([_LT_TAG_COMPILER])dnl 3936a4f78defSmrg 3937a4f78defSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3938a4f78defSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3939a4f78defSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3940a4f78defSmrg[ 3941a4f78defSmrg# These are sane defaults that work on at least a few old systems. 3942a4f78defSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3943a4f78defSmrg 3944a4f78defSmrg# Character class describing NM global symbol codes. 3945a4f78defSmrgsymcode='[[BCDEGRST]]' 3946a4f78defSmrg 3947a4f78defSmrg# Regexp to match symbols that can be accessed directly from C. 3948a4f78defSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3949a4f78defSmrg 3950a4f78defSmrg# Define system-specific variables. 3951a4f78defSmrgcase $host_os in 3952a4f78defSmrgaix*) 3953a4f78defSmrg symcode='[[BCDT]]' 3954a4f78defSmrg ;; 3955a4f78defSmrgcygwin* | mingw* | pw32* | cegcc*) 3956a4f78defSmrg symcode='[[ABCDGISTW]]' 3957a4f78defSmrg ;; 3958a4f78defSmrghpux*) 3959a4f78defSmrg if test ia64 = "$host_cpu"; then 3960a4f78defSmrg symcode='[[ABCDEGRST]]' 3961a4f78defSmrg fi 3962a4f78defSmrg ;; 3963a4f78defSmrgirix* | nonstopux*) 3964a4f78defSmrg symcode='[[BCDEGRST]]' 3965a4f78defSmrg ;; 3966a4f78defSmrgosf*) 3967a4f78defSmrg symcode='[[BCDEGQRST]]' 3968a4f78defSmrg ;; 3969a4f78defSmrgsolaris*) 3970a4f78defSmrg symcode='[[BDRT]]' 3971a4f78defSmrg ;; 3972a4f78defSmrgsco3.2v5*) 3973a4f78defSmrg symcode='[[DT]]' 3974a4f78defSmrg ;; 3975a4f78defSmrgsysv4.2uw2*) 3976a4f78defSmrg symcode='[[DT]]' 3977a4f78defSmrg ;; 3978a4f78defSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3979a4f78defSmrg symcode='[[ABDT]]' 3980a4f78defSmrg ;; 3981a4f78defSmrgsysv4) 3982a4f78defSmrg symcode='[[DFNSTU]]' 3983a4f78defSmrg ;; 3984a4f78defSmrgesac 3985a4f78defSmrg 3986a4f78defSmrg# If we're using GNU nm, then use its standard symbol codes. 3987a4f78defSmrgcase `$NM -V 2>&1` in 3988a4f78defSmrg*GNU* | *'with BFD'*) 3989a4f78defSmrg symcode='[[ABCDGIRSTW]]' ;; 3990a4f78defSmrgesac 3991a4f78defSmrg 3992a4f78defSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3993a4f78defSmrg # Gets list of data symbols to import. 3994a4f78defSmrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3995a4f78defSmrg # Adjust the below global symbol transforms to fixup imported variables. 3996a4f78defSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3997a4f78defSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3998a4f78defSmrg lt_c_name_lib_hook="\ 3999a4f78defSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 4000a4f78defSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 4001a4f78defSmrgelse 4002a4f78defSmrg # Disable hooks by default. 4003a4f78defSmrg lt_cv_sys_global_symbol_to_import= 4004a4f78defSmrg lt_cdecl_hook= 4005a4f78defSmrg lt_c_name_hook= 4006a4f78defSmrg lt_c_name_lib_hook= 4007a4f78defSmrgfi 4008a4f78defSmrg 4009a4f78defSmrg# Transform an extracted symbol line into a proper C declaration. 4010a4f78defSmrg# Some systems (esp. on ia64) link data and code symbols differently, 4011a4f78defSmrg# so use this general approach. 4012a4f78defSmrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 4013a4f78defSmrg$lt_cdecl_hook\ 4014a4f78defSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4015a4f78defSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4016a4f78defSmrg 4017a4f78defSmrg# Transform an extracted symbol line into symbol name and symbol address 4018a4f78defSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 4019a4f78defSmrg$lt_c_name_hook\ 4020a4f78defSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4021a4f78defSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4022a4f78defSmrg 4023a4f78defSmrg# Transform an extracted symbol line into symbol name with lib prefix and 4024a4f78defSmrg# symbol address. 4025a4f78defSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4026a4f78defSmrg$lt_c_name_lib_hook\ 4027a4f78defSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4028a4f78defSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4029a4f78defSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4030a4f78defSmrg 4031a4f78defSmrg# Handle CRLF in mingw tool chain 4032a4f78defSmrgopt_cr= 4033a4f78defSmrgcase $build_os in 4034a4f78defSmrgmingw*) 4035a4f78defSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4036a4f78defSmrg ;; 4037a4f78defSmrgesac 4038a4f78defSmrg 4039a4f78defSmrg# Try without a prefix underscore, then with it. 4040a4f78defSmrgfor ac_symprfx in "" "_"; do 4041a4f78defSmrg 4042a4f78defSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4043a4f78defSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4044a4f78defSmrg 4045a4f78defSmrg # Write the raw and C identifiers. 4046a4f78defSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4047a4f78defSmrg # Fake it for dumpbin and say T for any non-static function, 4048a4f78defSmrg # D for any global variable and I for any imported variable. 4049fb570538Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 4050a4f78defSmrg # which start with @ or ?. 4051a4f78defSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4052a4f78defSmrg" {last_section=section; section=\$ 3};"\ 4053a4f78defSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4054a4f78defSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4055a4f78defSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4056a4f78defSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4057a4f78defSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4058a4f78defSmrg" \$ 0!~/External *\|/{next};"\ 4059a4f78defSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4060a4f78defSmrg" {if(hide[section]) next};"\ 4061a4f78defSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4062a4f78defSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4063a4f78defSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4064a4f78defSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4065a4f78defSmrg" ' prfx=^$ac_symprfx]" 4066a4f78defSmrg else 4067a4f78defSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4068a4f78defSmrg fi 4069a4f78defSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4070a4f78defSmrg 4071a4f78defSmrg # Check to see that the pipe works correctly. 4072a4f78defSmrg pipe_works=no 4073a4f78defSmrg 4074a4f78defSmrg rm -f conftest* 4075a4f78defSmrg cat > conftest.$ac_ext <<_LT_EOF 4076a4f78defSmrg#ifdef __cplusplus 4077a4f78defSmrgextern "C" { 4078a4f78defSmrg#endif 4079a4f78defSmrgchar nm_test_var; 4080a4f78defSmrgvoid nm_test_func(void); 4081a4f78defSmrgvoid nm_test_func(void){} 4082a4f78defSmrg#ifdef __cplusplus 4083a4f78defSmrg} 4084a4f78defSmrg#endif 4085a4f78defSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 4086a4f78defSmrg_LT_EOF 4087a4f78defSmrg 4088a4f78defSmrg if AC_TRY_EVAL(ac_compile); then 4089a4f78defSmrg # Now try to grab the symbols. 4090a4f78defSmrg nlist=conftest.nm 4091a4f78defSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4092a4f78defSmrg # Try sorting and uniquifying the output. 4093a4f78defSmrg if sort "$nlist" | uniq > "$nlist"T; then 4094a4f78defSmrg mv -f "$nlist"T "$nlist" 4095a4f78defSmrg else 4096a4f78defSmrg rm -f "$nlist"T 4097a4f78defSmrg fi 4098a4f78defSmrg 4099a4f78defSmrg # Make sure that we snagged all the symbols we need. 4100a4f78defSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4101a4f78defSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4102a4f78defSmrg cat <<_LT_EOF > conftest.$ac_ext 4103a4f78defSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4104a4f78defSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4105a4f78defSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 4106a4f78defSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4107a4f78defSmrg# define LT@&t@_DLSYM_CONST 4108a4f78defSmrg#elif defined __osf__ 4109a4f78defSmrg/* This system does not cope well with relocations in const data. */ 4110a4f78defSmrg# define LT@&t@_DLSYM_CONST 4111a4f78defSmrg#else 4112a4f78defSmrg# define LT@&t@_DLSYM_CONST const 4113a4f78defSmrg#endif 4114a4f78defSmrg 4115a4f78defSmrg#ifdef __cplusplus 4116a4f78defSmrgextern "C" { 4117a4f78defSmrg#endif 4118a4f78defSmrg 4119a4f78defSmrg_LT_EOF 4120a4f78defSmrg # Now generate the symbol file. 4121a4f78defSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4122a4f78defSmrg 4123a4f78defSmrg cat <<_LT_EOF >> conftest.$ac_ext 4124a4f78defSmrg 4125a4f78defSmrg/* The mapping between symbol names and symbols. */ 4126a4f78defSmrgLT@&t@_DLSYM_CONST struct { 4127a4f78defSmrg const char *name; 4128a4f78defSmrg void *address; 4129a4f78defSmrg} 4130a4f78defSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4131a4f78defSmrg{ 4132a4f78defSmrg { "@PROGRAM@", (void *) 0 }, 4133a4f78defSmrg_LT_EOF 4134a4f78defSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4135a4f78defSmrg cat <<\_LT_EOF >> conftest.$ac_ext 4136a4f78defSmrg {0, (void *) 0} 4137a4f78defSmrg}; 4138a4f78defSmrg 4139a4f78defSmrg/* This works around a problem in FreeBSD linker */ 4140a4f78defSmrg#ifdef FREEBSD_WORKAROUND 4141a4f78defSmrgstatic const void *lt_preloaded_setup() { 4142a4f78defSmrg return lt__PROGRAM__LTX_preloaded_symbols; 4143a4f78defSmrg} 4144a4f78defSmrg#endif 4145a4f78defSmrg 4146a4f78defSmrg#ifdef __cplusplus 4147a4f78defSmrg} 4148a4f78defSmrg#endif 4149a4f78defSmrg_LT_EOF 4150a4f78defSmrg # Now try linking the two files. 4151a4f78defSmrg mv conftest.$ac_objext conftstm.$ac_objext 4152a4f78defSmrg lt_globsym_save_LIBS=$LIBS 4153a4f78defSmrg lt_globsym_save_CFLAGS=$CFLAGS 4154a4f78defSmrg LIBS=conftstm.$ac_objext 4155a4f78defSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4156a4f78defSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4157a4f78defSmrg pipe_works=yes 4158a4f78defSmrg fi 4159a4f78defSmrg LIBS=$lt_globsym_save_LIBS 4160a4f78defSmrg CFLAGS=$lt_globsym_save_CFLAGS 4161a4f78defSmrg else 4162a4f78defSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4163a4f78defSmrg fi 4164a4f78defSmrg else 4165a4f78defSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4166a4f78defSmrg fi 4167a4f78defSmrg else 4168a4f78defSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4169a4f78defSmrg fi 4170a4f78defSmrg else 4171a4f78defSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4172a4f78defSmrg cat conftest.$ac_ext >&5 4173a4f78defSmrg fi 4174a4f78defSmrg rm -rf conftest* conftst* 4175a4f78defSmrg 4176a4f78defSmrg # Do not use the global_symbol_pipe unless it works. 4177a4f78defSmrg if test yes = "$pipe_works"; then 4178a4f78defSmrg break 4179a4f78defSmrg else 4180a4f78defSmrg lt_cv_sys_global_symbol_pipe= 4181a4f78defSmrg fi 4182a4f78defSmrgdone 4183a4f78defSmrg]) 4184a4f78defSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4185a4f78defSmrg lt_cv_sys_global_symbol_to_cdecl= 4186a4f78defSmrgfi 4187a4f78defSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4188a4f78defSmrg AC_MSG_RESULT(failed) 4189a4f78defSmrgelse 4190a4f78defSmrg AC_MSG_RESULT(ok) 4191a4f78defSmrgfi 4192a4f78defSmrg 4193a4f78defSmrg# Response file support. 4194a4f78defSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4195a4f78defSmrg nm_file_list_spec='@' 4196a4f78defSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4197a4f78defSmrg nm_file_list_spec='@' 4198a4f78defSmrgfi 4199a4f78defSmrg 4200a4f78defSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4201a4f78defSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 4202a4f78defSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4203a4f78defSmrg [Transform the output of nm in a proper C declaration]) 4204a4f78defSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4205a4f78defSmrg [Transform the output of nm into a list of symbols to manually relocate]) 4206a4f78defSmrg_LT_DECL([global_symbol_to_c_name_address], 4207a4f78defSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4208a4f78defSmrg [Transform the output of nm in a C name address pair]) 4209a4f78defSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4210a4f78defSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4211a4f78defSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4212a4f78defSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4213a4f78defSmrg [The name lister interface]) 4214a4f78defSmrg_LT_DECL([], [nm_file_list_spec], [1], 4215a4f78defSmrg [Specify filename containing input files for $NM]) 4216a4f78defSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 4217a4f78defSmrg 4218a4f78defSmrg 4219a4f78defSmrg# _LT_COMPILER_PIC([TAGNAME]) 4220a4f78defSmrg# --------------------------- 4221a4f78defSmrgm4_defun([_LT_COMPILER_PIC], 4222a4f78defSmrg[m4_require([_LT_TAG_COMPILER])dnl 4223a4f78defSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4224a4f78defSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4225a4f78defSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4226a4f78defSmrg 4227a4f78defSmrgm4_if([$1], [CXX], [ 4228a4f78defSmrg # C++ specific cases for pic, static, wl, etc. 4229a4f78defSmrg if test yes = "$GXX"; then 4230a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4231a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4232a4f78defSmrg 4233a4f78defSmrg case $host_os in 4234a4f78defSmrg aix*) 4235a4f78defSmrg # All AIX code is PIC. 4236a4f78defSmrg if test ia64 = "$host_cpu"; then 4237a4f78defSmrg # AIX 5 now supports IA64 processor 4238a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4239a4f78defSmrg fi 4240a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4241a4f78defSmrg ;; 4242a4f78defSmrg 4243a4f78defSmrg amigaos*) 4244a4f78defSmrg case $host_cpu in 4245a4f78defSmrg powerpc) 4246a4f78defSmrg # see comment about AmigaOS4 .so support 4247a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4248a4f78defSmrg ;; 4249a4f78defSmrg m68k) 4250a4f78defSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4251a4f78defSmrg # adding the '-m68020' flag to GCC prevents building anything better, 4252a4f78defSmrg # like '-m68040'. 4253a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4254a4f78defSmrg ;; 4255a4f78defSmrg esac 4256a4f78defSmrg ;; 4257a4f78defSmrg 4258a4f78defSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4259a4f78defSmrg # PIC is the default for these OSes. 4260a4f78defSmrg ;; 4261a4f78defSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4262a4f78defSmrg # This hack is so that the source file can tell whether it is being 4263a4f78defSmrg # built for inclusion in a dll (and should export symbols for example). 4264a4f78defSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4265a4f78defSmrg # (--disable-auto-import) libraries 4266a4f78defSmrg m4_if([$1], [GCJ], [], 4267a4f78defSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4268a4f78defSmrg case $host_os in 4269a4f78defSmrg os2*) 4270a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4271a4f78defSmrg ;; 4272a4f78defSmrg esac 4273a4f78defSmrg ;; 4274a4f78defSmrg darwin* | rhapsody*) 4275a4f78defSmrg # PIC is the default on this platform 4276a4f78defSmrg # Common symbols not allowed in MH_DYLIB files 4277a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4278a4f78defSmrg ;; 4279a4f78defSmrg *djgpp*) 4280a4f78defSmrg # DJGPP does not support shared libraries at all 4281a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4282a4f78defSmrg ;; 4283a4f78defSmrg haiku*) 4284a4f78defSmrg # PIC is the default for Haiku. 4285a4f78defSmrg # The "-static" flag exists, but is broken. 4286a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4287a4f78defSmrg ;; 4288a4f78defSmrg interix[[3-9]]*) 4289a4f78defSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4290a4f78defSmrg # Instead, we relocate shared libraries at runtime. 4291a4f78defSmrg ;; 4292a4f78defSmrg sysv4*MP*) 4293a4f78defSmrg if test -d /usr/nec; then 4294a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4295a4f78defSmrg fi 4296a4f78defSmrg ;; 4297a4f78defSmrg hpux*) 4298a4f78defSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4299a4f78defSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4300a4f78defSmrg # sets the default TLS model and affects inlining. 4301a4f78defSmrg case $host_cpu in 4302a4f78defSmrg hppa*64*) 4303a4f78defSmrg ;; 4304a4f78defSmrg *) 4305a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4306a4f78defSmrg ;; 4307a4f78defSmrg esac 4308a4f78defSmrg ;; 4309a4f78defSmrg *qnx* | *nto*) 4310a4f78defSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4311a4f78defSmrg # it will coredump. 4312a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4313a4f78defSmrg ;; 4314a4f78defSmrg *) 4315a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4316a4f78defSmrg ;; 4317a4f78defSmrg esac 4318a4f78defSmrg else 4319a4f78defSmrg case $host_os in 4320a4f78defSmrg aix[[4-9]]*) 4321a4f78defSmrg # All AIX code is PIC. 4322a4f78defSmrg if test ia64 = "$host_cpu"; then 4323a4f78defSmrg # AIX 5 now supports IA64 processor 4324a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4325a4f78defSmrg else 4326a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4327a4f78defSmrg fi 4328a4f78defSmrg ;; 4329a4f78defSmrg chorus*) 4330a4f78defSmrg case $cc_basename in 4331a4f78defSmrg cxch68*) 4332a4f78defSmrg # Green Hills C++ Compiler 4333a4f78defSmrg # _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" 4334a4f78defSmrg ;; 4335a4f78defSmrg esac 4336a4f78defSmrg ;; 4337a4f78defSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4338a4f78defSmrg # This hack is so that the source file can tell whether it is being 4339a4f78defSmrg # built for inclusion in a dll (and should export symbols for example). 4340a4f78defSmrg m4_if([$1], [GCJ], [], 4341a4f78defSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4342a4f78defSmrg ;; 4343a4f78defSmrg dgux*) 4344a4f78defSmrg case $cc_basename in 4345a4f78defSmrg ec++*) 4346a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4347a4f78defSmrg ;; 4348a4f78defSmrg ghcx*) 4349a4f78defSmrg # Green Hills C++ Compiler 4350a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4351a4f78defSmrg ;; 4352a4f78defSmrg *) 4353a4f78defSmrg ;; 4354a4f78defSmrg esac 4355a4f78defSmrg ;; 4356a4f78defSmrg freebsd* | dragonfly*) 4357a4f78defSmrg # FreeBSD uses GNU C++ 4358a4f78defSmrg ;; 4359a4f78defSmrg hpux9* | hpux10* | hpux11*) 4360a4f78defSmrg case $cc_basename in 4361a4f78defSmrg CC*) 4362a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4363a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4364a4f78defSmrg if test ia64 != "$host_cpu"; then 4365a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4366a4f78defSmrg fi 4367a4f78defSmrg ;; 4368a4f78defSmrg aCC*) 4369a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4370a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4371a4f78defSmrg case $host_cpu in 4372a4f78defSmrg hppa*64*|ia64*) 4373a4f78defSmrg # +Z the default 4374a4f78defSmrg ;; 4375a4f78defSmrg *) 4376a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4377a4f78defSmrg ;; 4378a4f78defSmrg esac 4379a4f78defSmrg ;; 4380a4f78defSmrg *) 4381a4f78defSmrg ;; 4382a4f78defSmrg esac 4383a4f78defSmrg ;; 4384a4f78defSmrg interix*) 4385a4f78defSmrg # This is c89, which is MS Visual C++ (no shared libs) 4386a4f78defSmrg # Anyone wants to do a port? 4387a4f78defSmrg ;; 4388a4f78defSmrg irix5* | irix6* | nonstopux*) 4389a4f78defSmrg case $cc_basename in 4390a4f78defSmrg CC*) 4391a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4392a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4393a4f78defSmrg # CC pic flag -KPIC is the default. 4394a4f78defSmrg ;; 4395a4f78defSmrg *) 4396a4f78defSmrg ;; 4397a4f78defSmrg esac 4398a4f78defSmrg ;; 4399a4f78defSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4400a4f78defSmrg case $cc_basename in 4401a4f78defSmrg KCC*) 4402a4f78defSmrg # KAI C++ Compiler 4403a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4404a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4405a4f78defSmrg ;; 4406a4f78defSmrg ecpc* ) 4407a4f78defSmrg # old Intel C++ for x86_64, which still supported -KPIC. 4408a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4409a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4410a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4411a4f78defSmrg ;; 4412a4f78defSmrg icpc* ) 4413a4f78defSmrg # Intel C++, used to be incompatible with GCC. 4414a4f78defSmrg # ICC 10 doesn't accept -KPIC any more. 4415a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4416a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4417a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4418a4f78defSmrg ;; 4419a4f78defSmrg pgCC* | pgcpp*) 4420a4f78defSmrg # Portland Group C++ compiler 4421a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4422a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4423a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4424a4f78defSmrg ;; 4425a4f78defSmrg cxx*) 4426a4f78defSmrg # Compaq C++ 4427a4f78defSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4428a4f78defSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4429a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4430a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4431a4f78defSmrg ;; 4432a4f78defSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4433a4f78defSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4434a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4435a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4436a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4437a4f78defSmrg ;; 4438a4f78defSmrg *) 4439a4f78defSmrg case `$CC -V 2>&1 | sed 5q` in 4440a4f78defSmrg *Sun\ C*) 4441a4f78defSmrg # Sun C++ 5.9 4442a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4443a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4444a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4445a4f78defSmrg ;; 4446a4f78defSmrg esac 4447a4f78defSmrg ;; 4448a4f78defSmrg esac 4449a4f78defSmrg ;; 4450a4f78defSmrg lynxos*) 4451a4f78defSmrg ;; 4452a4f78defSmrg m88k*) 4453a4f78defSmrg ;; 4454a4f78defSmrg mvs*) 4455a4f78defSmrg case $cc_basename in 4456a4f78defSmrg cxx*) 4457a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4458a4f78defSmrg ;; 4459a4f78defSmrg *) 4460a4f78defSmrg ;; 4461a4f78defSmrg esac 4462a4f78defSmrg ;; 4463a4f78defSmrg netbsd*) 4464a4f78defSmrg ;; 4465a4f78defSmrg *qnx* | *nto*) 4466a4f78defSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4467a4f78defSmrg # it will coredump. 4468a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4469a4f78defSmrg ;; 4470a4f78defSmrg osf3* | osf4* | osf5*) 4471a4f78defSmrg case $cc_basename in 4472a4f78defSmrg KCC*) 4473a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4474a4f78defSmrg ;; 4475a4f78defSmrg RCC*) 4476a4f78defSmrg # Rational C++ 2.4.1 4477a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4478a4f78defSmrg ;; 4479a4f78defSmrg cxx*) 4480a4f78defSmrg # Digital/Compaq C++ 4481a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4482a4f78defSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4483a4f78defSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4484a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4485a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4486a4f78defSmrg ;; 4487a4f78defSmrg *) 4488a4f78defSmrg ;; 4489a4f78defSmrg esac 4490a4f78defSmrg ;; 4491a4f78defSmrg psos*) 4492a4f78defSmrg ;; 4493a4f78defSmrg solaris*) 4494a4f78defSmrg case $cc_basename in 4495a4f78defSmrg CC* | sunCC*) 4496a4f78defSmrg # Sun C++ 4.2, 5.x and Centerline C++ 4497a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4498a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4499a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4500a4f78defSmrg ;; 4501a4f78defSmrg gcx*) 4502a4f78defSmrg # Green Hills C++ Compiler 4503a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4504a4f78defSmrg ;; 4505a4f78defSmrg *) 4506a4f78defSmrg ;; 4507a4f78defSmrg esac 4508a4f78defSmrg ;; 4509a4f78defSmrg sunos4*) 4510a4f78defSmrg case $cc_basename in 4511a4f78defSmrg CC*) 4512a4f78defSmrg # Sun C++ 4.x 4513a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4514a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4515a4f78defSmrg ;; 4516a4f78defSmrg lcc*) 4517a4f78defSmrg # Lucid 4518a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4519a4f78defSmrg ;; 4520a4f78defSmrg *) 4521a4f78defSmrg ;; 4522a4f78defSmrg esac 4523a4f78defSmrg ;; 4524a4f78defSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4525a4f78defSmrg case $cc_basename in 4526a4f78defSmrg CC*) 4527a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4528a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4529a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4530a4f78defSmrg ;; 4531a4f78defSmrg esac 4532a4f78defSmrg ;; 4533a4f78defSmrg tandem*) 4534a4f78defSmrg case $cc_basename in 4535a4f78defSmrg NCC*) 4536a4f78defSmrg # NonStop-UX NCC 3.20 4537a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4538a4f78defSmrg ;; 4539a4f78defSmrg *) 4540a4f78defSmrg ;; 4541a4f78defSmrg esac 4542a4f78defSmrg ;; 4543a4f78defSmrg vxworks*) 4544a4f78defSmrg ;; 4545a4f78defSmrg *) 4546a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4547a4f78defSmrg ;; 4548a4f78defSmrg esac 4549a4f78defSmrg fi 4550a4f78defSmrg], 4551a4f78defSmrg[ 4552a4f78defSmrg if test yes = "$GCC"; then 4553a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4554a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4555a4f78defSmrg 4556a4f78defSmrg case $host_os in 4557a4f78defSmrg aix*) 4558a4f78defSmrg # All AIX code is PIC. 4559a4f78defSmrg if test ia64 = "$host_cpu"; then 4560a4f78defSmrg # AIX 5 now supports IA64 processor 4561a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4562a4f78defSmrg fi 4563a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4564a4f78defSmrg ;; 4565a4f78defSmrg 4566a4f78defSmrg amigaos*) 4567a4f78defSmrg case $host_cpu in 4568a4f78defSmrg powerpc) 4569a4f78defSmrg # see comment about AmigaOS4 .so support 4570a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4571a4f78defSmrg ;; 4572a4f78defSmrg m68k) 4573a4f78defSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4574a4f78defSmrg # adding the '-m68020' flag to GCC prevents building anything better, 4575a4f78defSmrg # like '-m68040'. 4576a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4577a4f78defSmrg ;; 4578a4f78defSmrg esac 4579a4f78defSmrg ;; 4580a4f78defSmrg 4581a4f78defSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4582a4f78defSmrg # PIC is the default for these OSes. 4583a4f78defSmrg ;; 4584a4f78defSmrg 4585a4f78defSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4586a4f78defSmrg # This hack is so that the source file can tell whether it is being 4587a4f78defSmrg # built for inclusion in a dll (and should export symbols for example). 4588a4f78defSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4589a4f78defSmrg # (--disable-auto-import) libraries 4590a4f78defSmrg m4_if([$1], [GCJ], [], 4591a4f78defSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4592a4f78defSmrg case $host_os in 4593a4f78defSmrg os2*) 4594a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4595a4f78defSmrg ;; 4596a4f78defSmrg esac 4597a4f78defSmrg ;; 4598a4f78defSmrg 4599a4f78defSmrg darwin* | rhapsody*) 4600a4f78defSmrg # PIC is the default on this platform 4601a4f78defSmrg # Common symbols not allowed in MH_DYLIB files 4602a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4603a4f78defSmrg ;; 4604a4f78defSmrg 4605a4f78defSmrg haiku*) 4606a4f78defSmrg # PIC is the default for Haiku. 4607a4f78defSmrg # The "-static" flag exists, but is broken. 4608a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4609a4f78defSmrg ;; 4610a4f78defSmrg 4611a4f78defSmrg hpux*) 4612a4f78defSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4613a4f78defSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4614a4f78defSmrg # sets the default TLS model and affects inlining. 4615a4f78defSmrg case $host_cpu in 4616a4f78defSmrg hppa*64*) 4617a4f78defSmrg # +Z the default 4618a4f78defSmrg ;; 4619a4f78defSmrg *) 4620a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4621a4f78defSmrg ;; 4622a4f78defSmrg esac 4623a4f78defSmrg ;; 4624a4f78defSmrg 4625a4f78defSmrg interix[[3-9]]*) 4626a4f78defSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4627a4f78defSmrg # Instead, we relocate shared libraries at runtime. 4628a4f78defSmrg ;; 4629a4f78defSmrg 4630a4f78defSmrg msdosdjgpp*) 4631a4f78defSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4632a4f78defSmrg # on systems that don't support them. 4633a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4634a4f78defSmrg enable_shared=no 4635a4f78defSmrg ;; 4636a4f78defSmrg 4637a4f78defSmrg *nto* | *qnx*) 4638a4f78defSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4639a4f78defSmrg # it will coredump. 4640a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4641a4f78defSmrg ;; 4642a4f78defSmrg 4643a4f78defSmrg sysv4*MP*) 4644a4f78defSmrg if test -d /usr/nec; then 4645a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4646a4f78defSmrg fi 4647a4f78defSmrg ;; 4648a4f78defSmrg 4649a4f78defSmrg *) 4650a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4651a4f78defSmrg ;; 4652a4f78defSmrg esac 4653a4f78defSmrg 4654a4f78defSmrg case $cc_basename in 4655a4f78defSmrg nvcc*) # Cuda Compiler Driver 2.2 4656a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4657a4f78defSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4658a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4659a4f78defSmrg fi 4660a4f78defSmrg ;; 4661a4f78defSmrg esac 4662a4f78defSmrg else 4663a4f78defSmrg # PORTME Check for flag to pass linker flags through the system compiler. 4664a4f78defSmrg case $host_os in 4665a4f78defSmrg aix*) 4666a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4667a4f78defSmrg if test ia64 = "$host_cpu"; then 4668a4f78defSmrg # AIX 5 now supports IA64 processor 4669a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4670a4f78defSmrg else 4671a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4672a4f78defSmrg fi 4673a4f78defSmrg ;; 4674a4f78defSmrg 4675a4f78defSmrg darwin* | rhapsody*) 4676a4f78defSmrg # PIC is the default on this platform 4677a4f78defSmrg # Common symbols not allowed in MH_DYLIB files 4678a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4679a4f78defSmrg case $cc_basename in 4680a4f78defSmrg nagfor*) 4681a4f78defSmrg # NAG Fortran compiler 4682a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4683a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4684a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4685a4f78defSmrg ;; 4686a4f78defSmrg esac 4687a4f78defSmrg ;; 4688a4f78defSmrg 4689a4f78defSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4690a4f78defSmrg # This hack is so that the source file can tell whether it is being 4691a4f78defSmrg # built for inclusion in a dll (and should export symbols for example). 4692a4f78defSmrg m4_if([$1], [GCJ], [], 4693a4f78defSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4694a4f78defSmrg case $host_os in 4695a4f78defSmrg os2*) 4696a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4697a4f78defSmrg ;; 4698a4f78defSmrg esac 4699a4f78defSmrg ;; 4700a4f78defSmrg 4701a4f78defSmrg hpux9* | hpux10* | hpux11*) 4702a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4703a4f78defSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4704a4f78defSmrg # not for PA HP-UX. 4705a4f78defSmrg case $host_cpu in 4706a4f78defSmrg hppa*64*|ia64*) 4707a4f78defSmrg # +Z the default 4708a4f78defSmrg ;; 4709a4f78defSmrg *) 4710a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4711a4f78defSmrg ;; 4712a4f78defSmrg esac 4713a4f78defSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4714a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4715a4f78defSmrg ;; 4716a4f78defSmrg 4717a4f78defSmrg irix5* | irix6* | nonstopux*) 4718a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4719a4f78defSmrg # PIC (with -KPIC) is the default. 4720a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4721a4f78defSmrg ;; 4722a4f78defSmrg 4723a4f78defSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4724a4f78defSmrg case $cc_basename in 4725a4f78defSmrg # old Intel for x86_64, which still supported -KPIC. 4726a4f78defSmrg ecc*) 4727a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4728a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4729a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4730a4f78defSmrg ;; 4731a4f78defSmrg # icc used to be incompatible with GCC. 4732a4f78defSmrg # ICC 10 doesn't accept -KPIC any more. 4733a4f78defSmrg icc* | ifort*) 4734a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4735a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4736a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4737a4f78defSmrg ;; 4738a4f78defSmrg # Lahey Fortran 8.1. 4739a4f78defSmrg lf95*) 4740a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4741a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4742a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4743a4f78defSmrg ;; 4744a4f78defSmrg nagfor*) 4745a4f78defSmrg # NAG Fortran compiler 4746a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4747a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4748a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4749a4f78defSmrg ;; 4750a4f78defSmrg tcc*) 4751a4f78defSmrg # Fabrice Bellard et al's Tiny C Compiler 4752a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4753a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4754a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4755a4f78defSmrg ;; 4756a4f78defSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4757a4f78defSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 4758a4f78defSmrg # which looks to be a dead project) 4759a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4760a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4761a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4762a4f78defSmrg ;; 4763a4f78defSmrg ccc*) 4764a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4765a4f78defSmrg # All Alpha code is PIC. 4766a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4767a4f78defSmrg ;; 4768a4f78defSmrg xl* | bgxl* | bgf* | mpixl*) 4769a4f78defSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4770a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4771a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4772a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4773a4f78defSmrg ;; 4774a4f78defSmrg *) 4775a4f78defSmrg case `$CC -V 2>&1 | sed 5q` in 4776a4f78defSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4777a4f78defSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4778a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4779a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4780a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4781a4f78defSmrg ;; 4782a4f78defSmrg *Sun\ F* | *Sun*Fortran*) 4783a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4784a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4785a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4786a4f78defSmrg ;; 4787a4f78defSmrg *Sun\ C*) 4788a4f78defSmrg # Sun C 5.9 4789a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4790a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4791a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4792a4f78defSmrg ;; 4793a4f78defSmrg *Intel*\ [[CF]]*Compiler*) 4794a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4795a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4796a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4797a4f78defSmrg ;; 4798a4f78defSmrg *Portland\ Group*) 4799a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4800a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4801a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4802a4f78defSmrg ;; 4803a4f78defSmrg esac 4804a4f78defSmrg ;; 4805a4f78defSmrg esac 4806a4f78defSmrg ;; 4807a4f78defSmrg 4808a4f78defSmrg newsos6) 4809a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4810a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4811a4f78defSmrg ;; 4812a4f78defSmrg 4813a4f78defSmrg *nto* | *qnx*) 4814a4f78defSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4815a4f78defSmrg # it will coredump. 4816a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4817a4f78defSmrg ;; 4818a4f78defSmrg 4819a4f78defSmrg osf3* | osf4* | osf5*) 4820a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4821a4f78defSmrg # All OSF/1 code is PIC. 4822a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4823a4f78defSmrg ;; 4824a4f78defSmrg 4825a4f78defSmrg rdos*) 4826a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4827a4f78defSmrg ;; 4828a4f78defSmrg 4829a4f78defSmrg solaris*) 4830a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4831a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4832a4f78defSmrg case $cc_basename in 4833a4f78defSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4834a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4835a4f78defSmrg *) 4836a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4837a4f78defSmrg esac 4838a4f78defSmrg ;; 4839a4f78defSmrg 4840a4f78defSmrg sunos4*) 4841a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4842a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4843a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4844a4f78defSmrg ;; 4845a4f78defSmrg 4846a4f78defSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 4847a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4848a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4849a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4850a4f78defSmrg ;; 4851a4f78defSmrg 4852a4f78defSmrg sysv4*MP*) 4853a4f78defSmrg if test -d /usr/nec; then 4854a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4855a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4856a4f78defSmrg fi 4857a4f78defSmrg ;; 4858a4f78defSmrg 4859a4f78defSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4860a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4861a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4862a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4863a4f78defSmrg ;; 4864a4f78defSmrg 4865a4f78defSmrg unicos*) 4866a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4867a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4868a4f78defSmrg ;; 4869a4f78defSmrg 4870a4f78defSmrg uts4*) 4871a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4872a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4873a4f78defSmrg ;; 4874a4f78defSmrg 4875a4f78defSmrg *) 4876a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4877a4f78defSmrg ;; 4878a4f78defSmrg esac 4879a4f78defSmrg fi 4880a4f78defSmrg]) 4881a4f78defSmrgcase $host_os in 4882a4f78defSmrg # For platforms that do not support PIC, -DPIC is meaningless: 4883a4f78defSmrg *djgpp*) 4884a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4885a4f78defSmrg ;; 4886a4f78defSmrg *) 4887a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4888a4f78defSmrg ;; 4889a4f78defSmrgesac 4890a4f78defSmrg 4891a4f78defSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4892a4f78defSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4893a4f78defSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4894a4f78defSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4895a4f78defSmrg 4896a4f78defSmrg# 4897a4f78defSmrg# Check to make sure the PIC flag actually works. 4898a4f78defSmrg# 4899a4f78defSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4900a4f78defSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4901a4f78defSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4902a4f78defSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4903a4f78defSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4904a4f78defSmrg "" | " "*) ;; 4905a4f78defSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4906a4f78defSmrg esac], 4907a4f78defSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4908a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4909a4f78defSmrgfi 4910a4f78defSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4911a4f78defSmrg [Additional compiler flags for building library objects]) 4912a4f78defSmrg 4913a4f78defSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4914a4f78defSmrg [How to pass a linker flag through the compiler]) 4915a4f78defSmrg# 4916a4f78defSmrg# Check to make sure the static flag actually works. 4917a4f78defSmrg# 4918a4f78defSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4919a4f78defSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4920a4f78defSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4921a4f78defSmrg $lt_tmp_static_flag, 4922a4f78defSmrg [], 4923a4f78defSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4924a4f78defSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4925a4f78defSmrg [Compiler flag to prevent dynamic linking]) 4926a4f78defSmrg])# _LT_COMPILER_PIC 4927a4f78defSmrg 4928a4f78defSmrg 4929a4f78defSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 4930a4f78defSmrg# ---------------------------- 4931a4f78defSmrg# See if the linker supports building shared libraries. 4932a4f78defSmrgm4_defun([_LT_LINKER_SHLIBS], 4933a4f78defSmrg[AC_REQUIRE([LT_PATH_LD])dnl 4934a4f78defSmrgAC_REQUIRE([LT_PATH_NM])dnl 4935a4f78defSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4936a4f78defSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4937a4f78defSmrgm4_require([_LT_DECL_EGREP])dnl 4938a4f78defSmrgm4_require([_LT_DECL_SED])dnl 4939a4f78defSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4940a4f78defSmrgm4_require([_LT_TAG_COMPILER])dnl 4941a4f78defSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4942a4f78defSmrgm4_if([$1], [CXX], [ 4943a4f78defSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4944a4f78defSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4945a4f78defSmrg case $host_os in 4946a4f78defSmrg aix[[4-9]]*) 4947a4f78defSmrg # If we're using GNU nm, then we don't want the "-C" option. 4948a4f78defSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4949a4f78defSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4950a4f78defSmrg # weak defined symbols like other global defined symbols, whereas 4951a4f78defSmrg # GNU nm marks them as "W". 4952a4f78defSmrg # While the 'weak' keyword is ignored in the Export File, we need 4953a4f78defSmrg # it in the Import File for the 'aix-soname' feature, so we have 4954a4f78defSmrg # to replace the "-B" option with "-P" for AIX nm. 4955a4f78defSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4956a4f78defSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 4957a4f78defSmrg else 4958fb570538Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 4959a4f78defSmrg fi 4960a4f78defSmrg ;; 4961a4f78defSmrg pw32*) 4962a4f78defSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4963a4f78defSmrg ;; 4964a4f78defSmrg cygwin* | mingw* | cegcc*) 4965a4f78defSmrg case $cc_basename in 4966fb570538Smrg cl* | icl*) 4967a4f78defSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4968a4f78defSmrg ;; 4969a4f78defSmrg *) 4970a4f78defSmrg _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' 4971a4f78defSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4972a4f78defSmrg ;; 4973a4f78defSmrg esac 4974a4f78defSmrg ;; 4975a4f78defSmrg *) 4976a4f78defSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4977a4f78defSmrg ;; 4978a4f78defSmrg esac 4979a4f78defSmrg], [ 4980a4f78defSmrg runpath_var= 4981a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 4982a4f78defSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4983a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)= 4984a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4985a4f78defSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 4986a4f78defSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4987a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4988a4f78defSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4989a4f78defSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 4990a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4991a4f78defSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4992a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4993a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4994a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4995a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4996a4f78defSmrg _LT_TAGVAR(inherit_rpath, $1)=no 4997a4f78defSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4998a4f78defSmrg _LT_TAGVAR(module_cmds, $1)= 4999a4f78defSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 5000a4f78defSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5001a4f78defSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5002a4f78defSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 5003a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5004a4f78defSmrg # include_expsyms should be a list of space-separated symbols to be *always* 5005a4f78defSmrg # included in the symbol list 5006a4f78defSmrg _LT_TAGVAR(include_expsyms, $1)= 5007a4f78defSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 5008a4f78defSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 5009a4f78defSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5010a4f78defSmrg # as well as any symbol that contains 'd'. 5011a4f78defSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5012a4f78defSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5013a4f78defSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 5014a4f78defSmrg # the symbol is explicitly referenced. Since portable code cannot 5015a4f78defSmrg # rely on this symbol name, it's probably fine to never include it in 5016a4f78defSmrg # preloaded symbol tables. 5017a4f78defSmrg # Exclude shared library initialization/finalization symbols. 5018a4f78defSmrgdnl Note also adjust exclude_expsyms for C++ above. 5019a4f78defSmrg extract_expsyms_cmds= 5020a4f78defSmrg 5021a4f78defSmrg case $host_os in 5022a4f78defSmrg cygwin* | mingw* | pw32* | cegcc*) 5023fb570538Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 5024a4f78defSmrg # When not using gcc, we currently assume that we are using 5025fb570538Smrg # Microsoft Visual C++ or Intel C++ Compiler. 5026a4f78defSmrg if test yes != "$GCC"; then 5027a4f78defSmrg with_gnu_ld=no 5028a4f78defSmrg fi 5029a4f78defSmrg ;; 5030a4f78defSmrg interix*) 5031fb570538Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 5032a4f78defSmrg with_gnu_ld=yes 5033a4f78defSmrg ;; 5034a4f78defSmrg openbsd* | bitrig*) 5035a4f78defSmrg with_gnu_ld=no 5036a4f78defSmrg ;; 5037a4f78defSmrg esac 5038a4f78defSmrg 5039a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5040a4f78defSmrg 5041a4f78defSmrg # On some targets, GNU ld is compatible enough with the native linker 5042a4f78defSmrg # that we're better off using the native interface for both. 5043a4f78defSmrg lt_use_gnu_ld_interface=no 5044a4f78defSmrg if test yes = "$with_gnu_ld"; then 5045a4f78defSmrg case $host_os in 5046a4f78defSmrg aix*) 5047a4f78defSmrg # The AIX port of GNU ld has always aspired to compatibility 5048a4f78defSmrg # with the native linker. However, as the warning in the GNU ld 5049a4f78defSmrg # block says, versions before 2.19.5* couldn't really create working 5050a4f78defSmrg # shared libraries, regardless of the interface used. 5051a4f78defSmrg case `$LD -v 2>&1` in 5052a4f78defSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5053a4f78defSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5054a4f78defSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5055a4f78defSmrg *) 5056a4f78defSmrg lt_use_gnu_ld_interface=yes 5057a4f78defSmrg ;; 5058a4f78defSmrg esac 5059a4f78defSmrg ;; 5060a4f78defSmrg *) 5061a4f78defSmrg lt_use_gnu_ld_interface=yes 5062a4f78defSmrg ;; 5063a4f78defSmrg esac 5064a4f78defSmrg fi 5065a4f78defSmrg 5066a4f78defSmrg if test yes = "$lt_use_gnu_ld_interface"; then 5067a4f78defSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5068a4f78defSmrg wlarc='$wl' 5069a4f78defSmrg 5070a4f78defSmrg # Set some defaults for GNU ld with shared library support. These 5071a4f78defSmrg # are reset later if shared libraries are not supported. Putting them 5072a4f78defSmrg # here allows them to be overridden if necessary. 5073a4f78defSmrg runpath_var=LD_RUN_PATH 5074a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5075a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5076a4f78defSmrg # ancient GNU ld didn't support --whole-archive et. al. 5077a4f78defSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5078a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5079a4f78defSmrg else 5080a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5081a4f78defSmrg fi 5082a4f78defSmrg supports_anon_versioning=no 5083a4f78defSmrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5084a4f78defSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 5085a4f78defSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5086a4f78defSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5087a4f78defSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5088a4f78defSmrg *\ 2.11.*) ;; # other 2.11 versions 5089a4f78defSmrg *) supports_anon_versioning=yes ;; 5090a4f78defSmrg esac 5091a4f78defSmrg 5092a4f78defSmrg # See if GNU ld supports shared libraries. 5093a4f78defSmrg case $host_os in 5094a4f78defSmrg aix[[3-9]]*) 5095a4f78defSmrg # On AIX/PPC, the GNU linker is very broken 5096a4f78defSmrg if test ia64 != "$host_cpu"; then 5097a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5098a4f78defSmrg cat <<_LT_EOF 1>&2 5099a4f78defSmrg 5100a4f78defSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5101a4f78defSmrg*** to be unable to reliably create shared libraries on AIX. 5102a4f78defSmrg*** Therefore, libtool is disabling shared libraries support. If you 5103a4f78defSmrg*** really care for shared libraries, you may want to install binutils 5104a4f78defSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5105a4f78defSmrg*** You will then need to restart the configuration process. 5106a4f78defSmrg 5107a4f78defSmrg_LT_EOF 5108a4f78defSmrg fi 5109a4f78defSmrg ;; 5110a4f78defSmrg 5111a4f78defSmrg amigaos*) 5112a4f78defSmrg case $host_cpu in 5113a4f78defSmrg powerpc) 5114a4f78defSmrg # see comment about AmigaOS4 .so support 5115a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5116a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5117a4f78defSmrg ;; 5118a4f78defSmrg m68k) 5119a4f78defSmrg _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)' 5120a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5121a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5122a4f78defSmrg ;; 5123a4f78defSmrg esac 5124a4f78defSmrg ;; 5125a4f78defSmrg 5126a4f78defSmrg beos*) 5127a4f78defSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5128a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5129a4f78defSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5130a4f78defSmrg # support --undefined. This deserves some investigation. FIXME 5131a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5132a4f78defSmrg else 5133a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5134a4f78defSmrg fi 5135a4f78defSmrg ;; 5136a4f78defSmrg 5137a4f78defSmrg cygwin* | mingw* | pw32* | cegcc*) 5138a4f78defSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5139a4f78defSmrg # as there is no search path for DLLs. 5140a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5141a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5142a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5143a4f78defSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5144a4f78defSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5145a4f78defSmrg _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' 5146a4f78defSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5147a4f78defSmrg 5148a4f78defSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5149a4f78defSmrg _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' 5150a4f78defSmrg # If the export-symbols file already is a .def file, use it as 5151a4f78defSmrg # is; otherwise, prepend EXPORTS... 5152a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5153a4f78defSmrg cp $export_symbols $output_objdir/$soname.def; 5154a4f78defSmrg else 5155a4f78defSmrg echo EXPORTS > $output_objdir/$soname.def; 5156a4f78defSmrg cat $export_symbols >> $output_objdir/$soname.def; 5157a4f78defSmrg fi~ 5158a4f78defSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5159a4f78defSmrg else 5160a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5161a4f78defSmrg fi 5162a4f78defSmrg ;; 5163a4f78defSmrg 5164a4f78defSmrg haiku*) 5165a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5166a4f78defSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5167a4f78defSmrg ;; 5168a4f78defSmrg 5169a4f78defSmrg os2*) 5170a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5171a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5172a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5173a4f78defSmrg shrext_cmds=.dll 5174a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5175a4f78defSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5176a4f78defSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5177a4f78defSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5178a4f78defSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5179a4f78defSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5180a4f78defSmrg emximp -o $lib $output_objdir/$libname.def' 5181a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5182a4f78defSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5183a4f78defSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5184a4f78defSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5185a4f78defSmrg prefix_cmds="$SED"~ 5186a4f78defSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5187a4f78defSmrg prefix_cmds="$prefix_cmds -e 1d"; 5188a4f78defSmrg fi~ 5189a4f78defSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5190a4f78defSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5191a4f78defSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5192a4f78defSmrg emximp -o $lib $output_objdir/$libname.def' 5193a4f78defSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5194a4f78defSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5195fb570538Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5196a4f78defSmrg ;; 5197a4f78defSmrg 5198a4f78defSmrg interix[[3-9]]*) 5199a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5200a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5201a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5202a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5203a4f78defSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5204a4f78defSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5205a4f78defSmrg # default) and relocated if they conflict, which is a slow very memory 5206a4f78defSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5207a4f78defSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5208a4f78defSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5209a4f78defSmrg _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' 5210a4f78defSmrg _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' 5211a4f78defSmrg ;; 5212a4f78defSmrg 5213a4f78defSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5214a4f78defSmrg tmp_diet=no 5215a4f78defSmrg if test linux-dietlibc = "$host_os"; then 5216a4f78defSmrg case $cc_basename in 5217a4f78defSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5218a4f78defSmrg esac 5219a4f78defSmrg fi 5220a4f78defSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5221a4f78defSmrg && test no = "$tmp_diet" 5222a4f78defSmrg then 5223a4f78defSmrg tmp_addflag=' $pic_flag' 5224a4f78defSmrg tmp_sharedflag='-shared' 5225a4f78defSmrg case $cc_basename,$host_cpu in 5226a4f78defSmrg pgcc*) # Portland Group C compiler 5227a4f78defSmrg _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' 5228a4f78defSmrg tmp_addflag=' $pic_flag' 5229a4f78defSmrg ;; 5230a4f78defSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 5231a4f78defSmrg # Portland Group f77 and f90 compilers 5232a4f78defSmrg _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' 5233a4f78defSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 5234a4f78defSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5235a4f78defSmrg tmp_addflag=' -i_dynamic' ;; 5236a4f78defSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5237a4f78defSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5238a4f78defSmrg ifc* | ifort*) # Intel Fortran compiler 5239a4f78defSmrg tmp_addflag=' -nofor_main' ;; 5240a4f78defSmrg lf95*) # Lahey Fortran 8.1 5241a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5242a4f78defSmrg tmp_sharedflag='--shared' ;; 5243a4f78defSmrg nagfor*) # NAGFOR 5.3 5244a4f78defSmrg tmp_sharedflag='-Wl,-shared' ;; 5245a4f78defSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5246a4f78defSmrg tmp_sharedflag='-qmkshrobj' 5247a4f78defSmrg tmp_addflag= ;; 5248a4f78defSmrg nvcc*) # Cuda Compiler Driver 2.2 5249a4f78defSmrg _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' 5250a4f78defSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5251a4f78defSmrg ;; 5252a4f78defSmrg esac 5253a4f78defSmrg case `$CC -V 2>&1 | sed 5q` in 5254a4f78defSmrg *Sun\ C*) # Sun C 5.9 5255a4f78defSmrg _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' 5256a4f78defSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5257a4f78defSmrg tmp_sharedflag='-G' ;; 5258a4f78defSmrg *Sun\ F*) # Sun Fortran 8.3 5259a4f78defSmrg tmp_sharedflag='-G' ;; 5260a4f78defSmrg esac 5261a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5262a4f78defSmrg 5263a4f78defSmrg if test yes = "$supports_anon_versioning"; then 5264a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5265a4f78defSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5266a4f78defSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5267a4f78defSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5268a4f78defSmrg fi 5269a4f78defSmrg 5270a4f78defSmrg case $cc_basename in 5271a4f78defSmrg tcc*) 5272a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5273a4f78defSmrg ;; 5274a4f78defSmrg xlf* | bgf* | bgxlf* | mpixlf*) 5275a4f78defSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5276a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5277a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5278a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5279a4f78defSmrg if test yes = "$supports_anon_versioning"; then 5280a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5281a4f78defSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5282a4f78defSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5283a4f78defSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5284a4f78defSmrg fi 5285a4f78defSmrg ;; 5286a4f78defSmrg esac 5287a4f78defSmrg else 5288a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5289a4f78defSmrg fi 5290a4f78defSmrg ;; 5291a4f78defSmrg 5292a4f78defSmrg netbsd*) 5293a4f78defSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5294a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5295a4f78defSmrg wlarc= 5296a4f78defSmrg else 5297a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5298a4f78defSmrg _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' 5299a4f78defSmrg fi 5300a4f78defSmrg ;; 5301a4f78defSmrg 5302a4f78defSmrg solaris*) 5303a4f78defSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5304a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5305a4f78defSmrg cat <<_LT_EOF 1>&2 5306a4f78defSmrg 5307a4f78defSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5308a4f78defSmrg*** create shared libraries on Solaris systems. Therefore, libtool 5309a4f78defSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5310a4f78defSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 5311a4f78defSmrg*** your PATH or compiler configuration so that the native linker is 5312a4f78defSmrg*** used, and then restart. 5313a4f78defSmrg 5314a4f78defSmrg_LT_EOF 5315a4f78defSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5316a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5317a4f78defSmrg _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' 5318a4f78defSmrg else 5319a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5320a4f78defSmrg fi 5321a4f78defSmrg ;; 5322a4f78defSmrg 5323a4f78defSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5324a4f78defSmrg case `$LD -v 2>&1` in 5325a4f78defSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5326a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5327a4f78defSmrg cat <<_LT_EOF 1>&2 5328a4f78defSmrg 5329a4f78defSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5330a4f78defSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5331a4f78defSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5332a4f78defSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5333a4f78defSmrg*** your PATH or compiler configuration so that the native linker is 5334a4f78defSmrg*** used, and then restart. 5335a4f78defSmrg 5336a4f78defSmrg_LT_EOF 5337a4f78defSmrg ;; 5338a4f78defSmrg *) 5339a4f78defSmrg # For security reasons, it is highly recommended that you always 5340a4f78defSmrg # use absolute paths for naming shared libraries, and exclude the 5341a4f78defSmrg # DT_RUNPATH tag from executables and libraries. But doing so 5342a4f78defSmrg # requires that you compile everything twice, which is a pain. 5343a4f78defSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5344a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5345a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5346a4f78defSmrg _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' 5347a4f78defSmrg else 5348a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5349a4f78defSmrg fi 5350a4f78defSmrg ;; 5351a4f78defSmrg esac 5352a4f78defSmrg ;; 5353a4f78defSmrg 5354a4f78defSmrg sunos4*) 5355a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5356a4f78defSmrg wlarc= 5357a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5358a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5359a4f78defSmrg ;; 5360a4f78defSmrg 5361a4f78defSmrg *) 5362a4f78defSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5363a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5364a4f78defSmrg _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' 5365a4f78defSmrg else 5366a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5367a4f78defSmrg fi 5368a4f78defSmrg ;; 5369a4f78defSmrg esac 5370a4f78defSmrg 5371a4f78defSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5372a4f78defSmrg runpath_var= 5373a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5374a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5375a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5376a4f78defSmrg fi 5377a4f78defSmrg else 5378a4f78defSmrg # PORTME fill in a description of your system's linker (not GNU ld) 5379a4f78defSmrg case $host_os in 5380a4f78defSmrg aix3*) 5381a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5382a4f78defSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5383a4f78defSmrg _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' 5384a4f78defSmrg # Note: this linker hardcodes the directories in LIBPATH if there 5385a4f78defSmrg # are no directories specified by -L. 5386a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5387a4f78defSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5388a4f78defSmrg # Neither direct hardcoding nor static linking is supported with a 5389a4f78defSmrg # broken collect2. 5390a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5391a4f78defSmrg fi 5392a4f78defSmrg ;; 5393a4f78defSmrg 5394a4f78defSmrg aix[[4-9]]*) 5395a4f78defSmrg if test ia64 = "$host_cpu"; then 5396a4f78defSmrg # On IA64, the linker does run time linking by default, so we don't 5397a4f78defSmrg # have to do anything special. 5398a4f78defSmrg aix_use_runtimelinking=no 5399a4f78defSmrg exp_sym_flag='-Bexport' 5400a4f78defSmrg no_entry_flag= 5401a4f78defSmrg else 5402a4f78defSmrg # If we're using GNU nm, then we don't want the "-C" option. 5403a4f78defSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5404a4f78defSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5405a4f78defSmrg # weak defined symbols like other global defined symbols, whereas 5406a4f78defSmrg # GNU nm marks them as "W". 5407a4f78defSmrg # While the 'weak' keyword is ignored in the Export File, we need 5408a4f78defSmrg # it in the Import File for the 'aix-soname' feature, so we have 5409a4f78defSmrg # to replace the "-B" option with "-P" for AIX nm. 5410a4f78defSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5411a4f78defSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 5412a4f78defSmrg else 5413fb570538Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 5414a4f78defSmrg fi 5415a4f78defSmrg aix_use_runtimelinking=no 5416a4f78defSmrg 5417a4f78defSmrg # Test if we are trying to use run time linking or normal 5418a4f78defSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5419a4f78defSmrg # have runtime linking enabled, and use it for executables. 5420a4f78defSmrg # For shared libraries, we enable/disable runtime linking 5421a4f78defSmrg # depending on the kind of the shared library created - 5422a4f78defSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 5423a4f78defSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5424a4f78defSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 5425a4f78defSmrg # lib.a static archive 5426a4f78defSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5427a4f78defSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 5428a4f78defSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5429a4f78defSmrg # lib.a(lib.so.V) shared, rtl:no 5430a4f78defSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5431a4f78defSmrg # lib.a static archive 5432a4f78defSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5433a4f78defSmrg for ld_flag in $LDFLAGS; do 5434a4f78defSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5435a4f78defSmrg aix_use_runtimelinking=yes 5436a4f78defSmrg break 5437a4f78defSmrg fi 5438a4f78defSmrg done 5439a4f78defSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5440a4f78defSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5441a4f78defSmrg # so we don't have lib.a shared libs to link our executables. 5442a4f78defSmrg # We have to force runtime linking in this case. 5443a4f78defSmrg aix_use_runtimelinking=yes 5444a4f78defSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5445a4f78defSmrg fi 5446a4f78defSmrg ;; 5447a4f78defSmrg esac 5448a4f78defSmrg 5449a4f78defSmrg exp_sym_flag='-bexport' 5450a4f78defSmrg no_entry_flag='-bnoentry' 5451a4f78defSmrg fi 5452a4f78defSmrg 5453a4f78defSmrg # When large executables or shared objects are built, AIX ld can 5454a4f78defSmrg # have problems creating the table of contents. If linking a library 5455a4f78defSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5456a4f78defSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5457a4f78defSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5458a4f78defSmrg 5459a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='' 5460a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5461a4f78defSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5462a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5463a4f78defSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5464a4f78defSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5465a4f78defSmrg case $with_aix_soname,$aix_use_runtimelinking in 5466a4f78defSmrg aix,*) ;; # traditional, no import file 5467a4f78defSmrg svr4,* | *,yes) # use import file 5468a4f78defSmrg # The Import File defines what to hardcode. 5469a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5470a4f78defSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5471a4f78defSmrg ;; 5472a4f78defSmrg esac 5473a4f78defSmrg 5474a4f78defSmrg if test yes = "$GCC"; then 5475a4f78defSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5476a4f78defSmrg # We only want to do this on AIX 4.2 and lower, the check 5477a4f78defSmrg # below for broken collect2 doesn't work under 4.3+ 5478a4f78defSmrg collect2name=`$CC -print-prog-name=collect2` 5479a4f78defSmrg if test -f "$collect2name" && 5480a4f78defSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5481a4f78defSmrg then 5482a4f78defSmrg # We have reworked collect2 5483a4f78defSmrg : 5484a4f78defSmrg else 5485a4f78defSmrg # We have old collect2 5486a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5487a4f78defSmrg # It fails to find uninstalled libraries when the uninstalled 5488a4f78defSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5489a4f78defSmrg # to unsupported forces relinking 5490a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5491a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5492a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5493a4f78defSmrg fi 5494a4f78defSmrg ;; 5495a4f78defSmrg esac 5496a4f78defSmrg shared_flag='-shared' 5497a4f78defSmrg if test yes = "$aix_use_runtimelinking"; then 5498a4f78defSmrg shared_flag="$shared_flag "'$wl-G' 5499a4f78defSmrg fi 5500a4f78defSmrg # Need to ensure runtime linking is disabled for the traditional 5501a4f78defSmrg # shared library, or the linker may eventually find shared libraries 5502a4f78defSmrg # /with/ Import File - we do not want to mix them. 5503a4f78defSmrg shared_flag_aix='-shared' 5504a4f78defSmrg shared_flag_svr4='-shared $wl-G' 5505a4f78defSmrg else 5506a4f78defSmrg # not using gcc 5507a4f78defSmrg if test ia64 = "$host_cpu"; then 5508a4f78defSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5509a4f78defSmrg # chokes on -Wl,-G. The following line is correct: 5510a4f78defSmrg shared_flag='-G' 5511a4f78defSmrg else 5512a4f78defSmrg if test yes = "$aix_use_runtimelinking"; then 5513a4f78defSmrg shared_flag='$wl-G' 5514a4f78defSmrg else 5515a4f78defSmrg shared_flag='$wl-bM:SRE' 5516a4f78defSmrg fi 5517a4f78defSmrg shared_flag_aix='$wl-bM:SRE' 5518a4f78defSmrg shared_flag_svr4='$wl-G' 5519a4f78defSmrg fi 5520a4f78defSmrg fi 5521a4f78defSmrg 5522a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5523a4f78defSmrg # It seems that -bexpall does not export symbols beginning with 5524a4f78defSmrg # underscore (_), so it is better to generate a list of symbols to export. 5525a4f78defSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5526a4f78defSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5527a4f78defSmrg # Warning - without using the other runtime loading flags (-brtl), 5528a4f78defSmrg # -berok will link without error, but may produce a broken library. 5529a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5530a4f78defSmrg # Determine the default libpath from the value encoded in an 5531a4f78defSmrg # empty executable. 5532a4f78defSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5533a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5534a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 5535a4f78defSmrg else 5536a4f78defSmrg if test ia64 = "$host_cpu"; then 5537a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5538a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5539a4f78defSmrg _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" 5540a4f78defSmrg else 5541a4f78defSmrg # Determine the default libpath from the value encoded in an 5542a4f78defSmrg # empty executable. 5543a4f78defSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5544a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5545a4f78defSmrg # Warning - without using the other run time loading flags, 5546a4f78defSmrg # -berok will link without error, but may produce a broken library. 5547a4f78defSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5548a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5549a4f78defSmrg if test yes = "$with_gnu_ld"; then 5550a4f78defSmrg # We only use this code for GNU lds that support --whole-archive. 5551a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5552a4f78defSmrg else 5553a4f78defSmrg # Exported symbols can be pulled into shared objects from archives 5554a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5555a4f78defSmrg fi 5556a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5557a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5558a4f78defSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5559a4f78defSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5560a4f78defSmrg if test svr4 != "$with_aix_soname"; then 5561a4f78defSmrg # This is similar to how AIX traditionally builds its shared libraries. 5562a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 5563a4f78defSmrg fi 5564a4f78defSmrg if test aix != "$with_aix_soname"; then 5565a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 5566a4f78defSmrg else 5567a4f78defSmrg # used by -dlpreopen to get the symbols 5568a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5569a4f78defSmrg fi 5570a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5571a4f78defSmrg fi 5572a4f78defSmrg fi 5573a4f78defSmrg ;; 5574a4f78defSmrg 5575a4f78defSmrg amigaos*) 5576a4f78defSmrg case $host_cpu in 5577a4f78defSmrg powerpc) 5578a4f78defSmrg # see comment about AmigaOS4 .so support 5579a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5580a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5581a4f78defSmrg ;; 5582a4f78defSmrg m68k) 5583a4f78defSmrg _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)' 5584a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5585a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5586a4f78defSmrg ;; 5587a4f78defSmrg esac 5588a4f78defSmrg ;; 5589a4f78defSmrg 5590a4f78defSmrg bsdi[[45]]*) 5591a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5592a4f78defSmrg ;; 5593a4f78defSmrg 5594a4f78defSmrg cygwin* | mingw* | pw32* | cegcc*) 5595a4f78defSmrg # When not using gcc, we currently assume that we are using 5596fb570538Smrg # Microsoft Visual C++ or Intel C++ Compiler. 5597a4f78defSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5598a4f78defSmrg # no search path for DLLs. 5599a4f78defSmrg case $cc_basename in 5600fb570538Smrg cl* | icl*) 5601fb570538Smrg # Native MSVC or ICC 5602a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5603a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5604a4f78defSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5605a4f78defSmrg _LT_TAGVAR(file_list_spec, $1)='@' 5606a4f78defSmrg # Tell ltmain to make .lib files, not .a files. 5607a4f78defSmrg libext=lib 5608a4f78defSmrg # Tell ltmain to make .dll files, not .so files. 5609a4f78defSmrg shrext_cmds=.dll 5610a4f78defSmrg # FIXME: Setting linknames here is a bad hack. 5611a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5612a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5613a4f78defSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 5614a4f78defSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5615a4f78defSmrg else 5616a4f78defSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5617a4f78defSmrg fi~ 5618a4f78defSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5619a4f78defSmrg linknames=' 5620a4f78defSmrg # The linker will not automatically build a static lib if we build a DLL. 5621a4f78defSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5622a4f78defSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5623a4f78defSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5624a4f78defSmrg _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' 5625a4f78defSmrg # Don't use ranlib 5626a4f78defSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5627a4f78defSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5628a4f78defSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5629a4f78defSmrg case $lt_outputfile in 5630a4f78defSmrg *.exe|*.EXE) ;; 5631a4f78defSmrg *) 5632a4f78defSmrg lt_outputfile=$lt_outputfile.exe 5633a4f78defSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 5634a4f78defSmrg ;; 5635a4f78defSmrg esac~ 5636a4f78defSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5637a4f78defSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5638a4f78defSmrg $RM "$lt_outputfile.manifest"; 5639a4f78defSmrg fi' 5640a4f78defSmrg ;; 5641a4f78defSmrg *) 5642fb570538Smrg # Assume MSVC and ICC wrapper 5643a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5644a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5645a4f78defSmrg # Tell ltmain to make .lib files, not .a files. 5646a4f78defSmrg libext=lib 5647a4f78defSmrg # Tell ltmain to make .dll files, not .so files. 5648a4f78defSmrg shrext_cmds=.dll 5649a4f78defSmrg # FIXME: Setting linknames here is a bad hack. 5650a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5651a4f78defSmrg # The linker will automatically build a .lib file if we build a DLL. 5652a4f78defSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5653a4f78defSmrg # FIXME: Should let the user specify the lib program. 5654a4f78defSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5655a4f78defSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5656a4f78defSmrg ;; 5657a4f78defSmrg esac 5658a4f78defSmrg ;; 5659a4f78defSmrg 5660a4f78defSmrg darwin* | rhapsody*) 5661a4f78defSmrg _LT_DARWIN_LINKER_FEATURES($1) 5662a4f78defSmrg ;; 5663a4f78defSmrg 5664a4f78defSmrg dgux*) 5665a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5666a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5667a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5668a4f78defSmrg ;; 5669a4f78defSmrg 5670a4f78defSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5671a4f78defSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 5672a4f78defSmrg # does not break anything, and helps significantly (at the cost of a little 5673a4f78defSmrg # extra space). 5674a4f78defSmrg freebsd2.2*) 5675a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5676a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5677a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5678a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5679a4f78defSmrg ;; 5680a4f78defSmrg 5681a4f78defSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5682a4f78defSmrg freebsd2.*) 5683a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5684a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5685a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5686a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5687a4f78defSmrg ;; 5688a4f78defSmrg 5689a4f78defSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5690a4f78defSmrg freebsd* | dragonfly*) 5691a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5692a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5693a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5694a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5695a4f78defSmrg ;; 5696a4f78defSmrg 5697a4f78defSmrg hpux9*) 5698a4f78defSmrg if test yes = "$GCC"; then 5699a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 5700a4f78defSmrg else 5701a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 5702a4f78defSmrg fi 5703a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5704a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5705a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5706a4f78defSmrg 5707a4f78defSmrg # hardcode_minus_L: Not really in the search PATH, 5708a4f78defSmrg # but as the default location of the library. 5709a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5710a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5711a4f78defSmrg ;; 5712a4f78defSmrg 5713a4f78defSmrg hpux10*) 5714a4f78defSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 5715a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5716a4f78defSmrg else 5717a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5718a4f78defSmrg fi 5719a4f78defSmrg if test no = "$with_gnu_ld"; then 5720a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5721a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5722a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5723a4f78defSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5724a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5725a4f78defSmrg # hardcode_minus_L: Not really in the search PATH, 5726a4f78defSmrg # but as the default location of the library. 5727a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5728a4f78defSmrg fi 5729a4f78defSmrg ;; 5730a4f78defSmrg 5731a4f78defSmrg hpux11*) 5732a4f78defSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 5733a4f78defSmrg case $host_cpu in 5734a4f78defSmrg hppa*64*) 5735a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5736a4f78defSmrg ;; 5737a4f78defSmrg ia64*) 5738a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5739a4f78defSmrg ;; 5740a4f78defSmrg *) 5741a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5742a4f78defSmrg ;; 5743a4f78defSmrg esac 5744a4f78defSmrg else 5745a4f78defSmrg case $host_cpu in 5746a4f78defSmrg hppa*64*) 5747a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5748a4f78defSmrg ;; 5749a4f78defSmrg ia64*) 5750a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5751a4f78defSmrg ;; 5752a4f78defSmrg *) 5753a4f78defSmrg m4_if($1, [], [ 5754a4f78defSmrg # Older versions of the 11.00 compiler do not understand -b yet 5755a4f78defSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5756a4f78defSmrg _LT_LINKER_OPTION([if $CC understands -b], 5757a4f78defSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5758a4f78defSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5759a4f78defSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5760a4f78defSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5761a4f78defSmrg ;; 5762a4f78defSmrg esac 5763a4f78defSmrg fi 5764a4f78defSmrg if test no = "$with_gnu_ld"; then 5765a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5766a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5767a4f78defSmrg 5768a4f78defSmrg case $host_cpu in 5769a4f78defSmrg hppa*64*|ia64*) 5770a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5771a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5772a4f78defSmrg ;; 5773a4f78defSmrg *) 5774a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5775a4f78defSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5776a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5777a4f78defSmrg 5778a4f78defSmrg # hardcode_minus_L: Not really in the search PATH, 5779a4f78defSmrg # but as the default location of the library. 5780a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5781a4f78defSmrg ;; 5782a4f78defSmrg esac 5783a4f78defSmrg fi 5784a4f78defSmrg ;; 5785a4f78defSmrg 5786a4f78defSmrg irix5* | irix6* | nonstopux*) 5787a4f78defSmrg if test yes = "$GCC"; then 5788a4f78defSmrg _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' 5789a4f78defSmrg # Try to use the -exported_symbol ld option, if it does not 5790a4f78defSmrg # work, assume that -exports_file does not work either and 5791a4f78defSmrg # implicitly export all symbols. 5792a4f78defSmrg # This should be the same for all languages, so no per-tag cache variable. 5793a4f78defSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5794a4f78defSmrg [lt_cv_irix_exported_symbol], 5795a4f78defSmrg [save_LDFLAGS=$LDFLAGS 5796a4f78defSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5797a4f78defSmrg AC_LINK_IFELSE( 5798a4f78defSmrg [AC_LANG_SOURCE( 5799a4f78defSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5800a4f78defSmrg [C++], [[int foo (void) { return 0; }]], 5801a4f78defSmrg [Fortran 77], [[ 5802a4f78defSmrg subroutine foo 5803a4f78defSmrg end]], 5804a4f78defSmrg [Fortran], [[ 5805a4f78defSmrg subroutine foo 5806a4f78defSmrg end]])])], 5807a4f78defSmrg [lt_cv_irix_exported_symbol=yes], 5808a4f78defSmrg [lt_cv_irix_exported_symbol=no]) 5809a4f78defSmrg LDFLAGS=$save_LDFLAGS]) 5810a4f78defSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 5811a4f78defSmrg _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' 5812a4f78defSmrg fi 5813a4f78defSmrg else 5814a4f78defSmrg _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' 5815a4f78defSmrg _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' 5816a4f78defSmrg fi 5817a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5818a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5819a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5820a4f78defSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 5821a4f78defSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5822a4f78defSmrg ;; 5823a4f78defSmrg 5824a4f78defSmrg linux*) 5825a4f78defSmrg case $cc_basename in 5826a4f78defSmrg tcc*) 5827a4f78defSmrg # Fabrice Bellard et al's Tiny C Compiler 5828a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5829a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5830a4f78defSmrg ;; 5831a4f78defSmrg esac 5832a4f78defSmrg ;; 5833a4f78defSmrg 5834a4f78defSmrg netbsd*) 5835a4f78defSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5836a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5837a4f78defSmrg else 5838a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5839a4f78defSmrg fi 5840a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5841a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5842a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5843a4f78defSmrg ;; 5844a4f78defSmrg 5845a4f78defSmrg newsos6) 5846a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5847a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5848a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5849a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5850a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5851a4f78defSmrg ;; 5852a4f78defSmrg 5853a4f78defSmrg *nto* | *qnx*) 5854a4f78defSmrg ;; 5855a4f78defSmrg 5856a4f78defSmrg openbsd* | bitrig*) 5857a4f78defSmrg if test -f /usr/libexec/ld.so; then 5858a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5859a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5860a4f78defSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5861a4f78defSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5862a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5863a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5864a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5865a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5866a4f78defSmrg else 5867a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5868a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5869a4f78defSmrg fi 5870a4f78defSmrg else 5871a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5872a4f78defSmrg fi 5873a4f78defSmrg ;; 5874a4f78defSmrg 5875a4f78defSmrg os2*) 5876a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5877a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5878a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5879a4f78defSmrg shrext_cmds=.dll 5880a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5881a4f78defSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5882a4f78defSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5883a4f78defSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5884a4f78defSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5885a4f78defSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5886a4f78defSmrg emximp -o $lib $output_objdir/$libname.def' 5887a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5888a4f78defSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5889a4f78defSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5890a4f78defSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5891a4f78defSmrg prefix_cmds="$SED"~ 5892a4f78defSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5893a4f78defSmrg prefix_cmds="$prefix_cmds -e 1d"; 5894a4f78defSmrg fi~ 5895a4f78defSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5896a4f78defSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5897a4f78defSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5898a4f78defSmrg emximp -o $lib $output_objdir/$libname.def' 5899a4f78defSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5900a4f78defSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5901fb570538Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5902a4f78defSmrg ;; 5903a4f78defSmrg 5904a4f78defSmrg osf3*) 5905a4f78defSmrg if test yes = "$GCC"; then 5906a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5907a4f78defSmrg _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' 5908a4f78defSmrg else 5909a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5910a4f78defSmrg _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' 5911a4f78defSmrg fi 5912a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5913a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5914a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5915a4f78defSmrg ;; 5916a4f78defSmrg 5917a4f78defSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5918a4f78defSmrg if test yes = "$GCC"; then 5919a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5920a4f78defSmrg _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' 5921a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5922a4f78defSmrg else 5923a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5924a4f78defSmrg _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' 5925a4f78defSmrg _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~ 5926a4f78defSmrg $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' 5927a4f78defSmrg 5928a4f78defSmrg # Both c and cxx compiler support -rpath directly 5929a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5930a4f78defSmrg fi 5931a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5932a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5933a4f78defSmrg ;; 5934a4f78defSmrg 5935a4f78defSmrg solaris*) 5936a4f78defSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5937a4f78defSmrg if test yes = "$GCC"; then 5938a4f78defSmrg wlarc='$wl' 5939a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5940a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5941a4f78defSmrg $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' 5942a4f78defSmrg else 5943a4f78defSmrg case `$CC -V 2>&1` in 5944a4f78defSmrg *"Compilers 5.0"*) 5945a4f78defSmrg wlarc='' 5946a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5947a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5948a4f78defSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5949a4f78defSmrg ;; 5950a4f78defSmrg *) 5951a4f78defSmrg wlarc='$wl' 5952a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5953a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5954a4f78defSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5955a4f78defSmrg ;; 5956a4f78defSmrg esac 5957a4f78defSmrg fi 5958a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5959a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5960a4f78defSmrg case $host_os in 5961a4f78defSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5962a4f78defSmrg *) 5963a4f78defSmrg # The compiler driver will combine and reorder linker options, 5964a4f78defSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 5965a4f78defSmrg # but is careful enough not to reorder. 5966a4f78defSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5967a4f78defSmrg if test yes = "$GCC"; then 5968a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5969a4f78defSmrg else 5970a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5971a4f78defSmrg fi 5972a4f78defSmrg ;; 5973a4f78defSmrg esac 5974a4f78defSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5975a4f78defSmrg ;; 5976a4f78defSmrg 5977a4f78defSmrg sunos4*) 5978a4f78defSmrg if test sequent = "$host_vendor"; then 5979a4f78defSmrg # Use $CC to link under sequent, because it throws in some extra .o 5980a4f78defSmrg # files that make .init and .fini sections work. 5981a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5982a4f78defSmrg else 5983a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5984a4f78defSmrg fi 5985a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5986a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5987a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5988a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5989a4f78defSmrg ;; 5990a4f78defSmrg 5991a4f78defSmrg sysv4) 5992a4f78defSmrg case $host_vendor in 5993a4f78defSmrg sni) 5994a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5995a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5996a4f78defSmrg ;; 5997a4f78defSmrg siemens) 5998a4f78defSmrg ## LD is ld it makes a PLAMLIB 5999a4f78defSmrg ## CC just makes a GrossModule. 6000a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6001a4f78defSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6002a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6003a4f78defSmrg ;; 6004a4f78defSmrg motorola) 6005a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6006a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6007a4f78defSmrg ;; 6008a4f78defSmrg esac 6009a4f78defSmrg runpath_var='LD_RUN_PATH' 6010a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6011a4f78defSmrg ;; 6012a4f78defSmrg 6013a4f78defSmrg sysv4.3*) 6014a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6015a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6016a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6017a4f78defSmrg ;; 6018a4f78defSmrg 6019a4f78defSmrg sysv4*MP*) 6020a4f78defSmrg if test -d /usr/nec; then 6021a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6022a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6023a4f78defSmrg runpath_var=LD_RUN_PATH 6024a4f78defSmrg hardcode_runpath_var=yes 6025a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6026a4f78defSmrg fi 6027a4f78defSmrg ;; 6028a4f78defSmrg 6029a4f78defSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6030a4f78defSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6031a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6032a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6033a4f78defSmrg runpath_var='LD_RUN_PATH' 6034a4f78defSmrg 6035a4f78defSmrg if test yes = "$GCC"; then 6036a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6037a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6038a4f78defSmrg else 6039a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6040a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6041a4f78defSmrg fi 6042a4f78defSmrg ;; 6043a4f78defSmrg 6044a4f78defSmrg sysv5* | sco3.2v5* | sco5v6*) 6045a4f78defSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 6046a4f78defSmrg # link with -lc, and that would cause any symbols used from libc to 6047a4f78defSmrg # always be unresolved, which means just about no library would 6048a4f78defSmrg # ever link correctly. If we're not using GNU ld we use -z text 6049a4f78defSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6050a4f78defSmrg # as -z defs. 6051a4f78defSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6052a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6053a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6054a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6055a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6056a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6057a4f78defSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6058a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6059a4f78defSmrg runpath_var='LD_RUN_PATH' 6060a4f78defSmrg 6061a4f78defSmrg if test yes = "$GCC"; then 6062a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6063a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6064a4f78defSmrg else 6065a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6066a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6067a4f78defSmrg fi 6068a4f78defSmrg ;; 6069a4f78defSmrg 6070a4f78defSmrg uts4*) 6071a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6072a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6073a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6074a4f78defSmrg ;; 6075a4f78defSmrg 6076a4f78defSmrg *) 6077a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6078a4f78defSmrg ;; 6079a4f78defSmrg esac 6080a4f78defSmrg 6081a4f78defSmrg if test sni = "$host_vendor"; then 6082a4f78defSmrg case $host in 6083a4f78defSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6084a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6085a4f78defSmrg ;; 6086a4f78defSmrg esac 6087a4f78defSmrg fi 6088a4f78defSmrg fi 6089a4f78defSmrg]) 6090a4f78defSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6091a4f78defSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6092a4f78defSmrg 6093a4f78defSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6094a4f78defSmrg 6095a4f78defSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6096a4f78defSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6097a4f78defSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 6098a4f78defSmrg [The commands to extract the exported symbol list from a shared archive]) 6099a4f78defSmrg 6100a4f78defSmrg# 6101a4f78defSmrg# Do we need to explicitly link libc? 6102a4f78defSmrg# 6103a4f78defSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6104a4f78defSmrgx|xyes) 6105a4f78defSmrg # Assume -lc should be added 6106a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6107a4f78defSmrg 6108a4f78defSmrg if test yes,yes = "$GCC,$enable_shared"; then 6109a4f78defSmrg case $_LT_TAGVAR(archive_cmds, $1) in 6110a4f78defSmrg *'~'*) 6111a4f78defSmrg # FIXME: we may have to deal with multi-command sequences. 6112a4f78defSmrg ;; 6113a4f78defSmrg '$CC '*) 6114a4f78defSmrg # Test whether the compiler implicitly links with -lc since on some 6115a4f78defSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6116a4f78defSmrg # to ld, don't add -lc before -lgcc. 6117a4f78defSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6118a4f78defSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6119a4f78defSmrg [$RM conftest* 6120a4f78defSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6121a4f78defSmrg 6122a4f78defSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6123a4f78defSmrg soname=conftest 6124a4f78defSmrg lib=conftest 6125a4f78defSmrg libobjs=conftest.$ac_objext 6126a4f78defSmrg deplibs= 6127a4f78defSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6128a4f78defSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6129a4f78defSmrg compiler_flags=-v 6130a4f78defSmrg linker_flags=-v 6131a4f78defSmrg verstring= 6132a4f78defSmrg output_objdir=. 6133a4f78defSmrg libname=conftest 6134a4f78defSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6135a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 6136a4f78defSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6137a4f78defSmrg then 6138a4f78defSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6139a4f78defSmrg else 6140a4f78defSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6141a4f78defSmrg fi 6142a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6143a4f78defSmrg else 6144a4f78defSmrg cat conftest.err 1>&5 6145a4f78defSmrg fi 6146a4f78defSmrg $RM conftest* 6147a4f78defSmrg ]) 6148a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6149a4f78defSmrg ;; 6150a4f78defSmrg esac 6151a4f78defSmrg fi 6152a4f78defSmrg ;; 6153a4f78defSmrgesac 6154a4f78defSmrg 6155a4f78defSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6156a4f78defSmrg [Whether or not to add -lc for building shared libraries]) 6157a4f78defSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6158a4f78defSmrg [enable_shared_with_static_runtimes], [0], 6159a4f78defSmrg [Whether or not to disallow shared libs when runtime libs are static]) 6160a4f78defSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6161a4f78defSmrg [Compiler flag to allow reflexive dlopens]) 6162a4f78defSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6163a4f78defSmrg [Compiler flag to generate shared objects directly from archives]) 6164a4f78defSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 6165a4f78defSmrg [Whether the compiler copes with passing no objects directly]) 6166a4f78defSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6167a4f78defSmrg [Create an old-style archive from a shared archive]) 6168a4f78defSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6169a4f78defSmrg [Create a temporary old-style archive to link instead of a shared archive]) 6170a4f78defSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6171a4f78defSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6172a4f78defSmrg_LT_TAGDECL([], [module_cmds], [2], 6173a4f78defSmrg [Commands used to build a loadable module if different from building 6174a4f78defSmrg a shared archive.]) 6175a4f78defSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6176a4f78defSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 6177a4f78defSmrg [Whether we are building with GNU ld or not]) 6178a4f78defSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6179a4f78defSmrg [Flag that allows shared libraries with undefined symbols to be built]) 6180a4f78defSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 6181a4f78defSmrg [Flag that enforces no undefined symbols]) 6182a4f78defSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6183a4f78defSmrg [Flag to hardcode $libdir into a binary during linking. 6184a4f78defSmrg This must work even if $libdir does not exist]) 6185a4f78defSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6186a4f78defSmrg [Whether we need a single "-rpath" flag with a separated argument]) 6187a4f78defSmrg_LT_TAGDECL([], [hardcode_direct], [0], 6188a4f78defSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6189a4f78defSmrg DIR into the resulting binary]) 6190a4f78defSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6191a4f78defSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6192a4f78defSmrg DIR into the resulting binary and the resulting library dependency is 6193a4f78defSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 6194a4f78defSmrg library is relocated]) 6195a4f78defSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6196a4f78defSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6197a4f78defSmrg into the resulting binary]) 6198a4f78defSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6199a4f78defSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6200a4f78defSmrg into the resulting binary]) 6201a4f78defSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 6202a4f78defSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 6203a4f78defSmrg into the library and all subsequent libraries and executables linked 6204a4f78defSmrg against it]) 6205a4f78defSmrg_LT_TAGDECL([], [inherit_rpath], [0], 6206a4f78defSmrg [Set to yes if linker adds runtime paths of dependent libraries 6207a4f78defSmrg to runtime path list]) 6208a4f78defSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 6209a4f78defSmrg [Whether libtool must link a program against all its dependency libraries]) 6210a4f78defSmrg_LT_TAGDECL([], [always_export_symbols], [0], 6211a4f78defSmrg [Set to "yes" if exported symbols are required]) 6212a4f78defSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6213a4f78defSmrg [The commands to list exported symbols]) 6214a4f78defSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 6215a4f78defSmrg [Symbols that should not be listed in the preloaded symbols]) 6216a4f78defSmrg_LT_TAGDECL([], [include_expsyms], [1], 6217a4f78defSmrg [Symbols that must always be exported]) 6218a4f78defSmrg_LT_TAGDECL([], [prelink_cmds], [2], 6219a4f78defSmrg [Commands necessary for linking programs (against libraries) with templates]) 6220a4f78defSmrg_LT_TAGDECL([], [postlink_cmds], [2], 6221a4f78defSmrg [Commands necessary for finishing linking programs]) 6222a4f78defSmrg_LT_TAGDECL([], [file_list_spec], [1], 6223a4f78defSmrg [Specify filename containing input files]) 6224a4f78defSmrgdnl FIXME: Not yet implemented 6225a4f78defSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6226a4f78defSmrgdnl [Compiler flag to generate thread safe objects]) 6227a4f78defSmrg])# _LT_LINKER_SHLIBS 6228a4f78defSmrg 6229a4f78defSmrg 6230a4f78defSmrg# _LT_LANG_C_CONFIG([TAG]) 6231a4f78defSmrg# ------------------------ 6232a4f78defSmrg# Ensure that the configuration variables for a C compiler are suitably 6233a4f78defSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6234a4f78defSmrg# the compiler configuration to 'libtool'. 6235a4f78defSmrgm4_defun([_LT_LANG_C_CONFIG], 6236a4f78defSmrg[m4_require([_LT_DECL_EGREP])dnl 6237a4f78defSmrglt_save_CC=$CC 6238a4f78defSmrgAC_LANG_PUSH(C) 6239a4f78defSmrg 6240a4f78defSmrg# Source file extension for C test sources. 6241a4f78defSmrgac_ext=c 6242a4f78defSmrg 6243a4f78defSmrg# Object file extension for compiled C test sources. 6244a4f78defSmrgobjext=o 6245a4f78defSmrg_LT_TAGVAR(objext, $1)=$objext 6246a4f78defSmrg 6247a4f78defSmrg# Code to be used in simple compile tests 6248a4f78defSmrglt_simple_compile_test_code="int some_variable = 0;" 6249a4f78defSmrg 6250a4f78defSmrg# Code to be used in simple link tests 6251a4f78defSmrglt_simple_link_test_code='int main(){return(0);}' 6252a4f78defSmrg 6253a4f78defSmrg_LT_TAG_COMPILER 6254a4f78defSmrg# Save the default compiler, since it gets overwritten when the other 6255a4f78defSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6256a4f78defSmrgcompiler_DEFAULT=$CC 6257a4f78defSmrg 6258a4f78defSmrg# save warnings/boilerplate of simple test code 6259a4f78defSmrg_LT_COMPILER_BOILERPLATE 6260a4f78defSmrg_LT_LINKER_BOILERPLATE 6261a4f78defSmrg 6262a4f78defSmrgif test -n "$compiler"; then 6263a4f78defSmrg _LT_COMPILER_NO_RTTI($1) 6264a4f78defSmrg _LT_COMPILER_PIC($1) 6265a4f78defSmrg _LT_COMPILER_C_O($1) 6266a4f78defSmrg _LT_COMPILER_FILE_LOCKS($1) 6267a4f78defSmrg _LT_LINKER_SHLIBS($1) 6268a4f78defSmrg _LT_SYS_DYNAMIC_LINKER($1) 6269a4f78defSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6270a4f78defSmrg LT_SYS_DLOPEN_SELF 6271a4f78defSmrg _LT_CMD_STRIPLIB 6272a4f78defSmrg 6273a4f78defSmrg # Report what library types will actually be built 6274a4f78defSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6275a4f78defSmrg AC_MSG_RESULT([$can_build_shared]) 6276a4f78defSmrg 6277a4f78defSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6278a4f78defSmrg test no = "$can_build_shared" && enable_shared=no 6279a4f78defSmrg 6280a4f78defSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6281a4f78defSmrg # are all built from PIC. 6282a4f78defSmrg case $host_os in 6283a4f78defSmrg aix3*) 6284a4f78defSmrg test yes = "$enable_shared" && enable_static=no 6285a4f78defSmrg if test -n "$RANLIB"; then 6286a4f78defSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6287a4f78defSmrg postinstall_cmds='$RANLIB $lib' 6288a4f78defSmrg fi 6289a4f78defSmrg ;; 6290a4f78defSmrg 6291a4f78defSmrg aix[[4-9]]*) 6292a4f78defSmrg if test ia64 != "$host_cpu"; then 6293a4f78defSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6294a4f78defSmrg yes,aix,yes) ;; # shared object as lib.so file only 6295a4f78defSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 6296a4f78defSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6297a4f78defSmrg esac 6298a4f78defSmrg fi 6299a4f78defSmrg ;; 6300a4f78defSmrg esac 6301a4f78defSmrg AC_MSG_RESULT([$enable_shared]) 6302a4f78defSmrg 6303a4f78defSmrg AC_MSG_CHECKING([whether to build static libraries]) 6304a4f78defSmrg # Make sure either enable_shared or enable_static is yes. 6305a4f78defSmrg test yes = "$enable_shared" || enable_static=yes 6306a4f78defSmrg AC_MSG_RESULT([$enable_static]) 6307a4f78defSmrg 6308a4f78defSmrg _LT_CONFIG($1) 6309a4f78defSmrgfi 6310a4f78defSmrgAC_LANG_POP 6311a4f78defSmrgCC=$lt_save_CC 6312a4f78defSmrg])# _LT_LANG_C_CONFIG 6313a4f78defSmrg 6314a4f78defSmrg 6315a4f78defSmrg# _LT_LANG_CXX_CONFIG([TAG]) 6316a4f78defSmrg# -------------------------- 6317a4f78defSmrg# Ensure that the configuration variables for a C++ compiler are suitably 6318a4f78defSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6319a4f78defSmrg# the compiler configuration to 'libtool'. 6320a4f78defSmrgm4_defun([_LT_LANG_CXX_CONFIG], 6321a4f78defSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6322a4f78defSmrgm4_require([_LT_DECL_EGREP])dnl 6323a4f78defSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6324a4f78defSmrgif test -n "$CXX" && ( test no != "$CXX" && 6325a4f78defSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6326a4f78defSmrg (test g++ != "$CXX"))); then 6327a4f78defSmrg AC_PROG_CXXCPP 6328a4f78defSmrgelse 6329a4f78defSmrg _lt_caught_CXX_error=yes 6330a4f78defSmrgfi 6331a4f78defSmrg 6332a4f78defSmrgAC_LANG_PUSH(C++) 6333a4f78defSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6334a4f78defSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6335a4f78defSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6336a4f78defSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6337a4f78defSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 6338a4f78defSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6339a4f78defSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6340a4f78defSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6341a4f78defSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6342a4f78defSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6343a4f78defSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6344a4f78defSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6345a4f78defSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6346a4f78defSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6347a4f78defSmrg_LT_TAGVAR(module_cmds, $1)= 6348a4f78defSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6349a4f78defSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6350a4f78defSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6351a4f78defSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6352a4f78defSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6353a4f78defSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6354a4f78defSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6355a4f78defSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6356a4f78defSmrg 6357a4f78defSmrg# Source file extension for C++ test sources. 6358a4f78defSmrgac_ext=cpp 6359a4f78defSmrg 6360a4f78defSmrg# Object file extension for compiled C++ test sources. 6361a4f78defSmrgobjext=o 6362a4f78defSmrg_LT_TAGVAR(objext, $1)=$objext 6363a4f78defSmrg 6364a4f78defSmrg# No sense in running all these tests if we already determined that 6365a4f78defSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 6366a4f78defSmrg# are currently assumed to apply to all compilers on this platform, 6367a4f78defSmrg# and will be corrupted by setting them based on a non-working compiler. 6368a4f78defSmrgif test yes != "$_lt_caught_CXX_error"; then 6369a4f78defSmrg # Code to be used in simple compile tests 6370a4f78defSmrg lt_simple_compile_test_code="int some_variable = 0;" 6371a4f78defSmrg 6372a4f78defSmrg # Code to be used in simple link tests 6373a4f78defSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6374a4f78defSmrg 6375a4f78defSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6376a4f78defSmrg _LT_TAG_COMPILER 6377a4f78defSmrg 6378a4f78defSmrg # save warnings/boilerplate of simple test code 6379a4f78defSmrg _LT_COMPILER_BOILERPLATE 6380a4f78defSmrg _LT_LINKER_BOILERPLATE 6381a4f78defSmrg 6382a4f78defSmrg # Allow CC to be a program name with arguments. 6383a4f78defSmrg lt_save_CC=$CC 6384a4f78defSmrg lt_save_CFLAGS=$CFLAGS 6385a4f78defSmrg lt_save_LD=$LD 6386a4f78defSmrg lt_save_GCC=$GCC 6387a4f78defSmrg GCC=$GXX 6388a4f78defSmrg lt_save_with_gnu_ld=$with_gnu_ld 6389a4f78defSmrg lt_save_path_LD=$lt_cv_path_LD 6390a4f78defSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6391a4f78defSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6392a4f78defSmrg else 6393a4f78defSmrg $as_unset lt_cv_prog_gnu_ld 6394a4f78defSmrg fi 6395a4f78defSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 6396a4f78defSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 6397a4f78defSmrg else 6398a4f78defSmrg $as_unset lt_cv_path_LD 6399a4f78defSmrg fi 6400a4f78defSmrg test -z "${LDCXX+set}" || LD=$LDCXX 6401a4f78defSmrg CC=${CXX-"c++"} 6402a4f78defSmrg CFLAGS=$CXXFLAGS 6403a4f78defSmrg compiler=$CC 6404a4f78defSmrg _LT_TAGVAR(compiler, $1)=$CC 6405a4f78defSmrg _LT_CC_BASENAME([$compiler]) 6406a4f78defSmrg 6407a4f78defSmrg if test -n "$compiler"; then 6408a4f78defSmrg # We don't want -fno-exception when compiling C++ code, so set the 6409a4f78defSmrg # no_builtin_flag separately 6410a4f78defSmrg if test yes = "$GXX"; then 6411a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6412a4f78defSmrg else 6413a4f78defSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6414a4f78defSmrg fi 6415a4f78defSmrg 6416a4f78defSmrg if test yes = "$GXX"; then 6417a4f78defSmrg # Set up default GNU C++ configuration 6418a4f78defSmrg 6419a4f78defSmrg LT_PATH_LD 6420a4f78defSmrg 6421a4f78defSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 6422a4f78defSmrg # archiving commands below assume that GNU ld is being used. 6423a4f78defSmrg if test yes = "$with_gnu_ld"; then 6424a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6425a4f78defSmrg _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' 6426a4f78defSmrg 6427a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6428a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6429a4f78defSmrg 6430a4f78defSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 6431a4f78defSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6432a4f78defSmrg # investigate it a little bit more. (MM) 6433a4f78defSmrg wlarc='$wl' 6434a4f78defSmrg 6435a4f78defSmrg # ancient GNU ld didn't support --whole-archive et. al. 6436a4f78defSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6437a4f78defSmrg $GREP 'no-whole-archive' > /dev/null; then 6438a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6439a4f78defSmrg else 6440a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6441a4f78defSmrg fi 6442a4f78defSmrg else 6443a4f78defSmrg with_gnu_ld=no 6444a4f78defSmrg wlarc= 6445a4f78defSmrg 6446a4f78defSmrg # A generic and very simple default shared library creation 6447a4f78defSmrg # command for GNU C++ for the case where it uses the native 6448a4f78defSmrg # linker, instead of GNU ld. If possible, this setting should 6449a4f78defSmrg # overridden to take advantage of the native linker features on 6450a4f78defSmrg # the platform it is being used on. 6451a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6452a4f78defSmrg fi 6453a4f78defSmrg 6454a4f78defSmrg # Commands to make compiler produce verbose output that lists 6455a4f78defSmrg # what "hidden" libraries, object files and flags are used when 6456a4f78defSmrg # linking a shared library. 6457a4f78defSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6458a4f78defSmrg 6459a4f78defSmrg else 6460a4f78defSmrg GXX=no 6461a4f78defSmrg with_gnu_ld=no 6462a4f78defSmrg wlarc= 6463a4f78defSmrg fi 6464a4f78defSmrg 6465a4f78defSmrg # PORTME: fill in a description of your system's C++ link characteristics 6466a4f78defSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6467a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6468a4f78defSmrg case $host_os in 6469a4f78defSmrg aix3*) 6470a4f78defSmrg # FIXME: insert proper C++ library support 6471a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6472a4f78defSmrg ;; 6473a4f78defSmrg aix[[4-9]]*) 6474a4f78defSmrg if test ia64 = "$host_cpu"; then 6475a4f78defSmrg # On IA64, the linker does run time linking by default, so we don't 6476a4f78defSmrg # have to do anything special. 6477a4f78defSmrg aix_use_runtimelinking=no 6478a4f78defSmrg exp_sym_flag='-Bexport' 6479a4f78defSmrg no_entry_flag= 6480a4f78defSmrg else 6481a4f78defSmrg aix_use_runtimelinking=no 6482a4f78defSmrg 6483a4f78defSmrg # Test if we are trying to use run time linking or normal 6484a4f78defSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6485a4f78defSmrg # have runtime linking enabled, and use it for executables. 6486a4f78defSmrg # For shared libraries, we enable/disable runtime linking 6487a4f78defSmrg # depending on the kind of the shared library created - 6488a4f78defSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 6489a4f78defSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6490a4f78defSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 6491a4f78defSmrg # lib.a static archive 6492a4f78defSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6493a4f78defSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 6494a4f78defSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6495a4f78defSmrg # lib.a(lib.so.V) shared, rtl:no 6496a4f78defSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6497a4f78defSmrg # lib.a static archive 6498a4f78defSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6499a4f78defSmrg for ld_flag in $LDFLAGS; do 6500a4f78defSmrg case $ld_flag in 6501a4f78defSmrg *-brtl*) 6502a4f78defSmrg aix_use_runtimelinking=yes 6503a4f78defSmrg break 6504a4f78defSmrg ;; 6505a4f78defSmrg esac 6506a4f78defSmrg done 6507a4f78defSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6508a4f78defSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6509a4f78defSmrg # so we don't have lib.a shared libs to link our executables. 6510a4f78defSmrg # We have to force runtime linking in this case. 6511a4f78defSmrg aix_use_runtimelinking=yes 6512a4f78defSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6513a4f78defSmrg fi 6514a4f78defSmrg ;; 6515a4f78defSmrg esac 6516a4f78defSmrg 6517a4f78defSmrg exp_sym_flag='-bexport' 6518a4f78defSmrg no_entry_flag='-bnoentry' 6519a4f78defSmrg fi 6520a4f78defSmrg 6521a4f78defSmrg # When large executables or shared objects are built, AIX ld can 6522a4f78defSmrg # have problems creating the table of contents. If linking a library 6523a4f78defSmrg # or program results in "error TOC overflow" add -mminimal-toc to 6524a4f78defSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6525a4f78defSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6526a4f78defSmrg 6527a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='' 6528a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6529a4f78defSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6530a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6531a4f78defSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6532a4f78defSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6533a4f78defSmrg case $with_aix_soname,$aix_use_runtimelinking in 6534a4f78defSmrg aix,*) ;; # no import file 6535a4f78defSmrg svr4,* | *,yes) # use import file 6536a4f78defSmrg # The Import File defines what to hardcode. 6537a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6538a4f78defSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6539a4f78defSmrg ;; 6540a4f78defSmrg esac 6541a4f78defSmrg 6542a4f78defSmrg if test yes = "$GXX"; then 6543a4f78defSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6544a4f78defSmrg # We only want to do this on AIX 4.2 and lower, the check 6545a4f78defSmrg # below for broken collect2 doesn't work under 4.3+ 6546a4f78defSmrg collect2name=`$CC -print-prog-name=collect2` 6547a4f78defSmrg if test -f "$collect2name" && 6548a4f78defSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6549a4f78defSmrg then 6550a4f78defSmrg # We have reworked collect2 6551a4f78defSmrg : 6552a4f78defSmrg else 6553a4f78defSmrg # We have old collect2 6554a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6555a4f78defSmrg # It fails to find uninstalled libraries when the uninstalled 6556a4f78defSmrg # path is not listed in the libpath. Setting hardcode_minus_L 6557a4f78defSmrg # to unsupported forces relinking 6558a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6559a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6560a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6561a4f78defSmrg fi 6562a4f78defSmrg esac 6563a4f78defSmrg shared_flag='-shared' 6564a4f78defSmrg if test yes = "$aix_use_runtimelinking"; then 6565a4f78defSmrg shared_flag=$shared_flag' $wl-G' 6566a4f78defSmrg fi 6567a4f78defSmrg # Need to ensure runtime linking is disabled for the traditional 6568a4f78defSmrg # shared library, or the linker may eventually find shared libraries 6569a4f78defSmrg # /with/ Import File - we do not want to mix them. 6570a4f78defSmrg shared_flag_aix='-shared' 6571a4f78defSmrg shared_flag_svr4='-shared $wl-G' 6572a4f78defSmrg else 6573a4f78defSmrg # not using gcc 6574a4f78defSmrg if test ia64 = "$host_cpu"; then 6575a4f78defSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6576a4f78defSmrg # chokes on -Wl,-G. The following line is correct: 6577a4f78defSmrg shared_flag='-G' 6578a4f78defSmrg else 6579a4f78defSmrg if test yes = "$aix_use_runtimelinking"; then 6580a4f78defSmrg shared_flag='$wl-G' 6581a4f78defSmrg else 6582a4f78defSmrg shared_flag='$wl-bM:SRE' 6583a4f78defSmrg fi 6584a4f78defSmrg shared_flag_aix='$wl-bM:SRE' 6585a4f78defSmrg shared_flag_svr4='$wl-G' 6586a4f78defSmrg fi 6587a4f78defSmrg fi 6588a4f78defSmrg 6589a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6590a4f78defSmrg # It seems that -bexpall does not export symbols beginning with 6591a4f78defSmrg # underscore (_), so it is better to generate a list of symbols to 6592a4f78defSmrg # export. 6593a4f78defSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6594a4f78defSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6595a4f78defSmrg # Warning - without using the other runtime loading flags (-brtl), 6596a4f78defSmrg # -berok will link without error, but may produce a broken library. 6597a4f78defSmrg # The "-G" linker flag allows undefined symbols. 6598a4f78defSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6599a4f78defSmrg # Determine the default libpath from the value encoded in an empty 6600a4f78defSmrg # executable. 6601a4f78defSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6602a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6603a4f78defSmrg 6604a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 6605a4f78defSmrg else 6606a4f78defSmrg if test ia64 = "$host_cpu"; then 6607a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6608a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6609a4f78defSmrg _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" 6610a4f78defSmrg else 6611a4f78defSmrg # Determine the default libpath from the value encoded in an 6612a4f78defSmrg # empty executable. 6613a4f78defSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6614a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6615a4f78defSmrg # Warning - without using the other run time loading flags, 6616a4f78defSmrg # -berok will link without error, but may produce a broken library. 6617a4f78defSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6618a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6619a4f78defSmrg if test yes = "$with_gnu_ld"; then 6620a4f78defSmrg # We only use this code for GNU lds that support --whole-archive. 6621a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6622a4f78defSmrg else 6623a4f78defSmrg # Exported symbols can be pulled into shared objects from archives 6624a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6625a4f78defSmrg fi 6626a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6627a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6628a4f78defSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6629a4f78defSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6630a4f78defSmrg if test svr4 != "$with_aix_soname"; then 6631a4f78defSmrg # This is similar to how AIX traditionally builds its shared 6632a4f78defSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6633a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 6634a4f78defSmrg fi 6635a4f78defSmrg if test aix != "$with_aix_soname"; then 6636a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 6637a4f78defSmrg else 6638a4f78defSmrg # used by -dlpreopen to get the symbols 6639a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6640a4f78defSmrg fi 6641a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6642a4f78defSmrg fi 6643a4f78defSmrg fi 6644a4f78defSmrg ;; 6645a4f78defSmrg 6646a4f78defSmrg beos*) 6647a4f78defSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6648a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6649a4f78defSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6650a4f78defSmrg # support --undefined. This deserves some investigation. FIXME 6651a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6652a4f78defSmrg else 6653a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6654a4f78defSmrg fi 6655a4f78defSmrg ;; 6656a4f78defSmrg 6657a4f78defSmrg chorus*) 6658a4f78defSmrg case $cc_basename in 6659a4f78defSmrg *) 6660a4f78defSmrg # FIXME: insert proper C++ library support 6661a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6662a4f78defSmrg ;; 6663a4f78defSmrg esac 6664a4f78defSmrg ;; 6665a4f78defSmrg 6666a4f78defSmrg cygwin* | mingw* | pw32* | cegcc*) 6667a4f78defSmrg case $GXX,$cc_basename in 6668fb570538Smrg ,cl* | no,cl* | ,icl* | no,icl*) 6669fb570538Smrg # Native MSVC or ICC 6670a4f78defSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6671a4f78defSmrg # no search path for DLLs. 6672a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6673a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6674a4f78defSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6675a4f78defSmrg _LT_TAGVAR(file_list_spec, $1)='@' 6676a4f78defSmrg # Tell ltmain to make .lib files, not .a files. 6677a4f78defSmrg libext=lib 6678a4f78defSmrg # Tell ltmain to make .dll files, not .so files. 6679a4f78defSmrg shrext_cmds=.dll 6680a4f78defSmrg # FIXME: Setting linknames here is a bad hack. 6681a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6682a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6683a4f78defSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 6684a4f78defSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6685a4f78defSmrg else 6686a4f78defSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6687a4f78defSmrg fi~ 6688a4f78defSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6689a4f78defSmrg linknames=' 6690a4f78defSmrg # The linker will not automatically build a static lib if we build a DLL. 6691a4f78defSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6692a4f78defSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6693a4f78defSmrg # Don't use ranlib 6694a4f78defSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6695a4f78defSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6696a4f78defSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6697a4f78defSmrg case $lt_outputfile in 6698a4f78defSmrg *.exe|*.EXE) ;; 6699a4f78defSmrg *) 6700a4f78defSmrg lt_outputfile=$lt_outputfile.exe 6701a4f78defSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 6702a4f78defSmrg ;; 6703a4f78defSmrg esac~ 6704a4f78defSmrg func_to_tool_file "$lt_outputfile"~ 6705a4f78defSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6706a4f78defSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6707a4f78defSmrg $RM "$lt_outputfile.manifest"; 6708a4f78defSmrg fi' 6709a4f78defSmrg ;; 6710a4f78defSmrg *) 6711a4f78defSmrg # g++ 6712a4f78defSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6713a4f78defSmrg # as there is no search path for DLLs. 6714a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6715a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6716a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6717a4f78defSmrg _LT_TAGVAR(always_export_symbols, $1)=no 6718a4f78defSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6719a4f78defSmrg 6720a4f78defSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6721a4f78defSmrg _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' 6722a4f78defSmrg # If the export-symbols file already is a .def file, use it as 6723a4f78defSmrg # is; otherwise, prepend EXPORTS... 6724a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6725a4f78defSmrg cp $export_symbols $output_objdir/$soname.def; 6726a4f78defSmrg else 6727a4f78defSmrg echo EXPORTS > $output_objdir/$soname.def; 6728a4f78defSmrg cat $export_symbols >> $output_objdir/$soname.def; 6729a4f78defSmrg fi~ 6730a4f78defSmrg $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' 6731a4f78defSmrg else 6732a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6733a4f78defSmrg fi 6734a4f78defSmrg ;; 6735a4f78defSmrg esac 6736a4f78defSmrg ;; 6737a4f78defSmrg darwin* | rhapsody*) 6738a4f78defSmrg _LT_DARWIN_LINKER_FEATURES($1) 6739a4f78defSmrg ;; 6740a4f78defSmrg 6741a4f78defSmrg os2*) 6742a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6743a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6744a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6745a4f78defSmrg shrext_cmds=.dll 6746a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6747a4f78defSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6748a4f78defSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6749a4f78defSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6750a4f78defSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6751a4f78defSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6752a4f78defSmrg emximp -o $lib $output_objdir/$libname.def' 6753a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6754a4f78defSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6755a4f78defSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6756a4f78defSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6757a4f78defSmrg prefix_cmds="$SED"~ 6758a4f78defSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6759a4f78defSmrg prefix_cmds="$prefix_cmds -e 1d"; 6760a4f78defSmrg fi~ 6761a4f78defSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6762a4f78defSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6763a4f78defSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6764a4f78defSmrg emximp -o $lib $output_objdir/$libname.def' 6765a4f78defSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6766a4f78defSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6767fb570538Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6768a4f78defSmrg ;; 6769a4f78defSmrg 6770a4f78defSmrg dgux*) 6771a4f78defSmrg case $cc_basename in 6772a4f78defSmrg ec++*) 6773a4f78defSmrg # FIXME: insert proper C++ library support 6774a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6775a4f78defSmrg ;; 6776a4f78defSmrg ghcx*) 6777a4f78defSmrg # Green Hills C++ Compiler 6778a4f78defSmrg # FIXME: insert proper C++ library support 6779a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6780a4f78defSmrg ;; 6781a4f78defSmrg *) 6782a4f78defSmrg # FIXME: insert proper C++ library support 6783a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6784a4f78defSmrg ;; 6785a4f78defSmrg esac 6786a4f78defSmrg ;; 6787a4f78defSmrg 6788a4f78defSmrg freebsd2.*) 6789a4f78defSmrg # C++ shared libraries reported to be fairly broken before 6790a4f78defSmrg # switch to ELF 6791a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6792a4f78defSmrg ;; 6793a4f78defSmrg 6794a4f78defSmrg freebsd-elf*) 6795a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6796a4f78defSmrg ;; 6797a4f78defSmrg 6798a4f78defSmrg freebsd* | dragonfly*) 6799a4f78defSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6800a4f78defSmrg # conventions 6801a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6802a4f78defSmrg ;; 6803a4f78defSmrg 6804a4f78defSmrg haiku*) 6805a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6806a4f78defSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6807a4f78defSmrg ;; 6808a4f78defSmrg 6809a4f78defSmrg hpux9*) 6810a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6811a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6812a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6813a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6814a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6815a4f78defSmrg # but as the default 6816a4f78defSmrg # location of the library. 6817a4f78defSmrg 6818a4f78defSmrg case $cc_basename in 6819a4f78defSmrg CC*) 6820a4f78defSmrg # FIXME: insert proper C++ library support 6821a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6822a4f78defSmrg ;; 6823a4f78defSmrg aCC*) 6824a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 6825a4f78defSmrg # Commands to make compiler produce verbose output that lists 6826a4f78defSmrg # what "hidden" libraries, object files and flags are used when 6827a4f78defSmrg # linking a shared library. 6828a4f78defSmrg # 6829a4f78defSmrg # There doesn't appear to be a way to prevent this compiler from 6830a4f78defSmrg # explicitly linking system object files so we need to strip them 6831a4f78defSmrg # from the output so that they don't get included in the library 6832a4f78defSmrg # dependencies. 6833a4f78defSmrg 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"' 6834a4f78defSmrg ;; 6835a4f78defSmrg *) 6836a4f78defSmrg if test yes = "$GXX"; then 6837a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 6838a4f78defSmrg else 6839a4f78defSmrg # FIXME: insert proper C++ library support 6840a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6841a4f78defSmrg fi 6842a4f78defSmrg ;; 6843a4f78defSmrg esac 6844a4f78defSmrg ;; 6845a4f78defSmrg 6846a4f78defSmrg hpux10*|hpux11*) 6847a4f78defSmrg if test no = "$with_gnu_ld"; then 6848a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6849a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6850a4f78defSmrg 6851a4f78defSmrg case $host_cpu in 6852a4f78defSmrg hppa*64*|ia64*) 6853a4f78defSmrg ;; 6854a4f78defSmrg *) 6855a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6856a4f78defSmrg ;; 6857a4f78defSmrg esac 6858a4f78defSmrg fi 6859a4f78defSmrg case $host_cpu in 6860a4f78defSmrg hppa*64*|ia64*) 6861a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6862a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6863a4f78defSmrg ;; 6864a4f78defSmrg *) 6865a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6866a4f78defSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6867a4f78defSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6868a4f78defSmrg # but as the default 6869a4f78defSmrg # location of the library. 6870a4f78defSmrg ;; 6871a4f78defSmrg esac 6872a4f78defSmrg 6873a4f78defSmrg case $cc_basename in 6874a4f78defSmrg CC*) 6875a4f78defSmrg # FIXME: insert proper C++ library support 6876a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6877a4f78defSmrg ;; 6878a4f78defSmrg aCC*) 6879a4f78defSmrg case $host_cpu in 6880a4f78defSmrg hppa*64*) 6881a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6882a4f78defSmrg ;; 6883a4f78defSmrg ia64*) 6884a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6885a4f78defSmrg ;; 6886a4f78defSmrg *) 6887a4f78defSmrg _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' 6888a4f78defSmrg ;; 6889a4f78defSmrg esac 6890a4f78defSmrg # Commands to make compiler produce verbose output that lists 6891a4f78defSmrg # what "hidden" libraries, object files and flags are used when 6892a4f78defSmrg # linking a shared library. 6893a4f78defSmrg # 6894a4f78defSmrg # There doesn't appear to be a way to prevent this compiler from 6895a4f78defSmrg # explicitly linking system object files so we need to strip them 6896a4f78defSmrg # from the output so that they don't get included in the library 6897a4f78defSmrg # dependencies. 6898a4f78defSmrg 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"' 6899a4f78defSmrg ;; 6900a4f78defSmrg *) 6901a4f78defSmrg if test yes = "$GXX"; then 6902a4f78defSmrg if test no = "$with_gnu_ld"; then 6903a4f78defSmrg case $host_cpu in 6904a4f78defSmrg hppa*64*) 6905a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6906a4f78defSmrg ;; 6907a4f78defSmrg ia64*) 6908a4f78defSmrg _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' 6909a4f78defSmrg ;; 6910a4f78defSmrg *) 6911a4f78defSmrg _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' 6912a4f78defSmrg ;; 6913a4f78defSmrg esac 6914a4f78defSmrg fi 6915a4f78defSmrg else 6916a4f78defSmrg # FIXME: insert proper C++ library support 6917a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6918a4f78defSmrg fi 6919a4f78defSmrg ;; 6920a4f78defSmrg esac 6921a4f78defSmrg ;; 6922a4f78defSmrg 6923a4f78defSmrg interix[[3-9]]*) 6924a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6925a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6926a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6927a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6928a4f78defSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6929a4f78defSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6930a4f78defSmrg # default) and relocated if they conflict, which is a slow very memory 6931a4f78defSmrg # consuming and fragmenting process. To avoid this, we pick a random, 6932a4f78defSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6933a4f78defSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6934a4f78defSmrg _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' 6935a4f78defSmrg _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' 6936a4f78defSmrg ;; 6937a4f78defSmrg irix5* | irix6*) 6938a4f78defSmrg case $cc_basename in 6939a4f78defSmrg CC*) 6940a4f78defSmrg # SGI C++ 6941a4f78defSmrg _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' 6942a4f78defSmrg 6943a4f78defSmrg # Archives containing C++ object files must be created using 6944a4f78defSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6945a4f78defSmrg # necessary to make sure instantiated templates are included 6946a4f78defSmrg # in the archive. 6947a4f78defSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6948a4f78defSmrg ;; 6949a4f78defSmrg *) 6950a4f78defSmrg if test yes = "$GXX"; then 6951a4f78defSmrg if test no = "$with_gnu_ld"; then 6952a4f78defSmrg _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' 6953a4f78defSmrg else 6954a4f78defSmrg _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' 6955a4f78defSmrg fi 6956a4f78defSmrg fi 6957a4f78defSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6958a4f78defSmrg ;; 6959a4f78defSmrg esac 6960a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6961a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6962a4f78defSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 6963a4f78defSmrg ;; 6964a4f78defSmrg 6965a4f78defSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6966a4f78defSmrg case $cc_basename in 6967a4f78defSmrg KCC*) 6968a4f78defSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6969a4f78defSmrg 6970a4f78defSmrg # KCC will only create a shared library if the output file 6971a4f78defSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6972a4f78defSmrg # to its proper name (with version) after linking. 6973a4f78defSmrg _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' 6974a4f78defSmrg _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' 6975a4f78defSmrg # Commands to make compiler produce verbose output that lists 6976a4f78defSmrg # what "hidden" libraries, object files and flags are used when 6977a4f78defSmrg # linking a shared library. 6978a4f78defSmrg # 6979a4f78defSmrg # There doesn't appear to be a way to prevent this compiler from 6980a4f78defSmrg # explicitly linking system object files so we need to strip them 6981a4f78defSmrg # from the output so that they don't get included in the library 6982a4f78defSmrg # dependencies. 6983a4f78defSmrg 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"' 6984a4f78defSmrg 6985a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6986a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6987a4f78defSmrg 6988a4f78defSmrg # Archives containing C++ object files must be created using 6989a4f78defSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6990a4f78defSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6991a4f78defSmrg ;; 6992a4f78defSmrg icpc* | ecpc* ) 6993a4f78defSmrg # Intel C++ 6994a4f78defSmrg with_gnu_ld=yes 6995a4f78defSmrg # version 8.0 and above of icpc choke on multiply defined symbols 6996a4f78defSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6997a4f78defSmrg # earlier do not add the objects themselves. 6998a4f78defSmrg case `$CC -V 2>&1` in 6999a4f78defSmrg *"Version 7."*) 7000a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7001a4f78defSmrg _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' 7002a4f78defSmrg ;; 7003a4f78defSmrg *) # Version 8.0 or newer 7004a4f78defSmrg tmp_idyn= 7005a4f78defSmrg case $host_cpu in 7006a4f78defSmrg ia64*) tmp_idyn=' -i_dynamic';; 7007a4f78defSmrg esac 7008a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7009a4f78defSmrg _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' 7010a4f78defSmrg ;; 7011a4f78defSmrg esac 7012a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7013a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7014a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7015a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7016a4f78defSmrg ;; 7017a4f78defSmrg pgCC* | pgcpp*) 7018a4f78defSmrg # Portland Group C++ compiler 7019a4f78defSmrg case `$CC -V` in 7020a4f78defSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7021a4f78defSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7022a4f78defSmrg rm -rf $tpldir~ 7023a4f78defSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7024a4f78defSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7025a4f78defSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7026a4f78defSmrg rm -rf $tpldir~ 7027a4f78defSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7028a4f78defSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7029a4f78defSmrg $RANLIB $oldlib' 7030a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7031a4f78defSmrg rm -rf $tpldir~ 7032a4f78defSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7033a4f78defSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7034a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7035a4f78defSmrg rm -rf $tpldir~ 7036a4f78defSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7037a4f78defSmrg $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' 7038a4f78defSmrg ;; 7039a4f78defSmrg *) # Version 6 and above use weak symbols 7040a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7041a4f78defSmrg _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' 7042a4f78defSmrg ;; 7043a4f78defSmrg esac 7044a4f78defSmrg 7045a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7046a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7047a4f78defSmrg _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' 7048a4f78defSmrg ;; 7049a4f78defSmrg cxx*) 7050a4f78defSmrg # Compaq C++ 7051a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7052a4f78defSmrg _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' 7053a4f78defSmrg 7054a4f78defSmrg runpath_var=LD_RUN_PATH 7055a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7056a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7057a4f78defSmrg 7058a4f78defSmrg # Commands to make compiler produce verbose output that lists 7059a4f78defSmrg # what "hidden" libraries, object files and flags are used when 7060a4f78defSmrg # linking a shared library. 7061a4f78defSmrg # 7062a4f78defSmrg # There doesn't appear to be a way to prevent this compiler from 7063a4f78defSmrg # explicitly linking system object files so we need to strip them 7064a4f78defSmrg # from the output so that they don't get included in the library 7065a4f78defSmrg # dependencies. 7066a4f78defSmrg 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' 7067a4f78defSmrg ;; 7068a4f78defSmrg xl* | mpixl* | bgxl*) 7069a4f78defSmrg # IBM XL 8.0 on PPC, with GNU ld 7070a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7071a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7072a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7073a4f78defSmrg if test yes = "$supports_anon_versioning"; then 7074a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7075a4f78defSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7076a4f78defSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7077a4f78defSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7078a4f78defSmrg fi 7079a4f78defSmrg ;; 7080a4f78defSmrg *) 7081a4f78defSmrg case `$CC -V 2>&1 | sed 5q` in 7082a4f78defSmrg *Sun\ C*) 7083a4f78defSmrg # Sun C++ 5.9 7084a4f78defSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7085a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7086a4f78defSmrg _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' 7087a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7088a4f78defSmrg _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' 7089a4f78defSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7090a4f78defSmrg 7091a4f78defSmrg # Not sure whether something based on 7092a4f78defSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7093a4f78defSmrg # would be better. 7094a4f78defSmrg output_verbose_link_cmd='func_echo_all' 7095a4f78defSmrg 7096a4f78defSmrg # Archives containing C++ object files must be created using 7097a4f78defSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7098a4f78defSmrg # necessary to make sure instantiated templates are included 7099a4f78defSmrg # in the archive. 7100a4f78defSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7101a4f78defSmrg ;; 7102a4f78defSmrg esac 7103a4f78defSmrg ;; 7104a4f78defSmrg esac 7105a4f78defSmrg ;; 7106a4f78defSmrg 7107a4f78defSmrg lynxos*) 7108a4f78defSmrg # FIXME: insert proper C++ library support 7109a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7110a4f78defSmrg ;; 7111a4f78defSmrg 7112a4f78defSmrg m88k*) 7113a4f78defSmrg # FIXME: insert proper C++ library support 7114a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7115a4f78defSmrg ;; 7116a4f78defSmrg 7117a4f78defSmrg mvs*) 7118a4f78defSmrg case $cc_basename in 7119a4f78defSmrg cxx*) 7120a4f78defSmrg # FIXME: insert proper C++ library support 7121a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7122a4f78defSmrg ;; 7123a4f78defSmrg *) 7124a4f78defSmrg # FIXME: insert proper C++ library support 7125a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7126a4f78defSmrg ;; 7127a4f78defSmrg esac 7128a4f78defSmrg ;; 7129a4f78defSmrg 7130a4f78defSmrg netbsd*) 7131a4f78defSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7132a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7133a4f78defSmrg wlarc= 7134a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7135a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7136a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7137a4f78defSmrg fi 7138a4f78defSmrg # Workaround some broken pre-1.5 toolchains 7139a4f78defSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7140a4f78defSmrg ;; 7141a4f78defSmrg 7142a4f78defSmrg *nto* | *qnx*) 7143a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7144a4f78defSmrg ;; 7145a4f78defSmrg 7146a4f78defSmrg openbsd* | bitrig*) 7147a4f78defSmrg if test -f /usr/libexec/ld.so; then 7148a4f78defSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7149a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7150a4f78defSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7151a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7152a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7153a4f78defSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7154a4f78defSmrg _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' 7155a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7156a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7157a4f78defSmrg fi 7158a4f78defSmrg output_verbose_link_cmd=func_echo_all 7159a4f78defSmrg else 7160a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7161a4f78defSmrg fi 7162a4f78defSmrg ;; 7163a4f78defSmrg 7164a4f78defSmrg osf3* | osf4* | osf5*) 7165a4f78defSmrg case $cc_basename in 7166a4f78defSmrg KCC*) 7167a4f78defSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7168a4f78defSmrg 7169a4f78defSmrg # KCC will only create a shared library if the output file 7170a4f78defSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7171a4f78defSmrg # to its proper name (with version) after linking. 7172a4f78defSmrg _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' 7173a4f78defSmrg 7174a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7175a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7176a4f78defSmrg 7177a4f78defSmrg # Archives containing C++ object files must be created using 7178a4f78defSmrg # the KAI C++ compiler. 7179a4f78defSmrg case $host in 7180a4f78defSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7181a4f78defSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7182a4f78defSmrg esac 7183a4f78defSmrg ;; 7184a4f78defSmrg RCC*) 7185a4f78defSmrg # Rational C++ 2.4.1 7186a4f78defSmrg # FIXME: insert proper C++ library support 7187a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7188a4f78defSmrg ;; 7189a4f78defSmrg cxx*) 7190a4f78defSmrg case $host in 7191a4f78defSmrg osf3*) 7192a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7193a4f78defSmrg _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' 7194a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7195a4f78defSmrg ;; 7196a4f78defSmrg *) 7197a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7198a4f78defSmrg _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' 7199a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7200a4f78defSmrg echo "-hidden">> $lib.exp~ 7201a4f78defSmrg $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~ 7202a4f78defSmrg $RM $lib.exp' 7203a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7204a4f78defSmrg ;; 7205a4f78defSmrg esac 7206a4f78defSmrg 7207a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7208a4f78defSmrg 7209a4f78defSmrg # Commands to make compiler produce verbose output that lists 7210a4f78defSmrg # what "hidden" libraries, object files and flags are used when 7211a4f78defSmrg # linking a shared library. 7212a4f78defSmrg # 7213a4f78defSmrg # There doesn't appear to be a way to prevent this compiler from 7214a4f78defSmrg # explicitly linking system object files so we need to strip them 7215a4f78defSmrg # from the output so that they don't get included in the library 7216a4f78defSmrg # dependencies. 7217a4f78defSmrg 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"' 7218a4f78defSmrg ;; 7219a4f78defSmrg *) 7220a4f78defSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 7221a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7222a4f78defSmrg case $host in 7223a4f78defSmrg osf3*) 7224a4f78defSmrg _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' 7225a4f78defSmrg ;; 7226a4f78defSmrg *) 7227a4f78defSmrg _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' 7228a4f78defSmrg ;; 7229a4f78defSmrg esac 7230a4f78defSmrg 7231a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7232a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7233a4f78defSmrg 7234a4f78defSmrg # Commands to make compiler produce verbose output that lists 7235a4f78defSmrg # what "hidden" libraries, object files and flags are used when 7236a4f78defSmrg # linking a shared library. 7237a4f78defSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7238a4f78defSmrg 7239a4f78defSmrg else 7240a4f78defSmrg # FIXME: insert proper C++ library support 7241a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7242a4f78defSmrg fi 7243a4f78defSmrg ;; 7244a4f78defSmrg esac 7245a4f78defSmrg ;; 7246a4f78defSmrg 7247a4f78defSmrg psos*) 7248a4f78defSmrg # FIXME: insert proper C++ library support 7249a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7250a4f78defSmrg ;; 7251a4f78defSmrg 7252a4f78defSmrg sunos4*) 7253a4f78defSmrg case $cc_basename in 7254a4f78defSmrg CC*) 7255a4f78defSmrg # Sun C++ 4.x 7256a4f78defSmrg # FIXME: insert proper C++ library support 7257a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7258a4f78defSmrg ;; 7259a4f78defSmrg lcc*) 7260a4f78defSmrg # Lucid 7261a4f78defSmrg # FIXME: insert proper C++ library support 7262a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7263a4f78defSmrg ;; 7264a4f78defSmrg *) 7265a4f78defSmrg # FIXME: insert proper C++ library support 7266a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7267a4f78defSmrg ;; 7268a4f78defSmrg esac 7269a4f78defSmrg ;; 7270a4f78defSmrg 7271a4f78defSmrg solaris*) 7272a4f78defSmrg case $cc_basename in 7273a4f78defSmrg CC* | sunCC*) 7274a4f78defSmrg # Sun C++ 4.2, 5.x and Centerline C++ 7275a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7276a4f78defSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7277a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7278a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7279a4f78defSmrg $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' 7280a4f78defSmrg 7281a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7282a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7283a4f78defSmrg case $host_os in 7284a4f78defSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7285a4f78defSmrg *) 7286a4f78defSmrg # The compiler driver will combine and reorder linker options, 7287a4f78defSmrg # but understands '-z linker_flag'. 7288a4f78defSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7289a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7290a4f78defSmrg ;; 7291a4f78defSmrg esac 7292a4f78defSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7293a4f78defSmrg 7294a4f78defSmrg output_verbose_link_cmd='func_echo_all' 7295a4f78defSmrg 7296a4f78defSmrg # Archives containing C++ object files must be created using 7297a4f78defSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7298a4f78defSmrg # necessary to make sure instantiated templates are included 7299a4f78defSmrg # in the archive. 7300a4f78defSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7301a4f78defSmrg ;; 7302a4f78defSmrg gcx*) 7303a4f78defSmrg # Green Hills C++ Compiler 7304a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7305a4f78defSmrg 7306a4f78defSmrg # The C++ compiler must be used to create the archive. 7307a4f78defSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7308a4f78defSmrg ;; 7309a4f78defSmrg *) 7310a4f78defSmrg # GNU C++ compiler with Solaris linker 7311a4f78defSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 7312a4f78defSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7313a4f78defSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7314a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7315a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7316a4f78defSmrg $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7317a4f78defSmrg 7318a4f78defSmrg # Commands to make compiler produce verbose output that lists 7319a4f78defSmrg # what "hidden" libraries, object files and flags are used when 7320a4f78defSmrg # linking a shared library. 7321a4f78defSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7322a4f78defSmrg else 7323a4f78defSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 7324a4f78defSmrg # platform. 7325a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7326a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7327a4f78defSmrg $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7328a4f78defSmrg 7329a4f78defSmrg # Commands to make compiler produce verbose output that lists 7330a4f78defSmrg # what "hidden" libraries, object files and flags are used when 7331a4f78defSmrg # linking a shared library. 7332a4f78defSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7333a4f78defSmrg fi 7334a4f78defSmrg 7335a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7336a4f78defSmrg case $host_os in 7337a4f78defSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7338a4f78defSmrg *) 7339a4f78defSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7340a4f78defSmrg ;; 7341a4f78defSmrg esac 7342a4f78defSmrg fi 7343a4f78defSmrg ;; 7344a4f78defSmrg esac 7345a4f78defSmrg ;; 7346a4f78defSmrg 7347a4f78defSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7348a4f78defSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7349a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7350a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7351a4f78defSmrg runpath_var='LD_RUN_PATH' 7352a4f78defSmrg 7353a4f78defSmrg case $cc_basename in 7354a4f78defSmrg CC*) 7355a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7356a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7357a4f78defSmrg ;; 7358a4f78defSmrg *) 7359a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7360a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7361a4f78defSmrg ;; 7362a4f78defSmrg esac 7363a4f78defSmrg ;; 7364a4f78defSmrg 7365a4f78defSmrg sysv5* | sco3.2v5* | sco5v6*) 7366a4f78defSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 7367a4f78defSmrg # link with -lc, and that would cause any symbols used from libc to 7368a4f78defSmrg # always be unresolved, which means just about no library would 7369a4f78defSmrg # ever link correctly. If we're not using GNU ld we use -z text 7370a4f78defSmrg # though, which does catch some bad symbols but isn't as heavy-handed 7371a4f78defSmrg # as -z defs. 7372a4f78defSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7373a4f78defSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7374a4f78defSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7375a4f78defSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7376a4f78defSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7377a4f78defSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7378a4f78defSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7379a4f78defSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7380a4f78defSmrg runpath_var='LD_RUN_PATH' 7381a4f78defSmrg 7382a4f78defSmrg case $cc_basename in 7383a4f78defSmrg CC*) 7384a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7385a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7386a4f78defSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7387a4f78defSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 7388a4f78defSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7389a4f78defSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 7390a4f78defSmrg ;; 7391a4f78defSmrg *) 7392a4f78defSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7393a4f78defSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7394a4f78defSmrg ;; 7395a4f78defSmrg esac 7396a4f78defSmrg ;; 7397a4f78defSmrg 7398a4f78defSmrg tandem*) 7399a4f78defSmrg case $cc_basename in 7400a4f78defSmrg NCC*) 7401a4f78defSmrg # NonStop-UX NCC 3.20 7402a4f78defSmrg # FIXME: insert proper C++ library support 7403a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7404a4f78defSmrg ;; 7405a4f78defSmrg *) 7406a4f78defSmrg # FIXME: insert proper C++ library support 7407a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7408a4f78defSmrg ;; 7409a4f78defSmrg esac 7410a4f78defSmrg ;; 7411a4f78defSmrg 7412a4f78defSmrg vxworks*) 7413a4f78defSmrg # FIXME: insert proper C++ library support 7414a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7415a4f78defSmrg ;; 7416a4f78defSmrg 7417a4f78defSmrg *) 7418a4f78defSmrg # FIXME: insert proper C++ library support 7419a4f78defSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7420a4f78defSmrg ;; 7421a4f78defSmrg esac 7422a4f78defSmrg 7423a4f78defSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7424a4f78defSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7425a4f78defSmrg 7426a4f78defSmrg _LT_TAGVAR(GCC, $1)=$GXX 7427a4f78defSmrg _LT_TAGVAR(LD, $1)=$LD 7428a4f78defSmrg 7429a4f78defSmrg ## CAVEAT EMPTOR: 7430a4f78defSmrg ## There is no encapsulation within the following macros, do not change 7431a4f78defSmrg ## the running order or otherwise move them around unless you know exactly 7432a4f78defSmrg ## what you are doing... 7433a4f78defSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7434a4f78defSmrg _LT_COMPILER_PIC($1) 7435a4f78defSmrg _LT_COMPILER_C_O($1) 7436a4f78defSmrg _LT_COMPILER_FILE_LOCKS($1) 7437a4f78defSmrg _LT_LINKER_SHLIBS($1) 7438a4f78defSmrg _LT_SYS_DYNAMIC_LINKER($1) 7439a4f78defSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7440a4f78defSmrg 7441a4f78defSmrg _LT_CONFIG($1) 7442a4f78defSmrg fi # test -n "$compiler" 7443a4f78defSmrg 7444a4f78defSmrg CC=$lt_save_CC 7445a4f78defSmrg CFLAGS=$lt_save_CFLAGS 7446a4f78defSmrg LDCXX=$LD 7447a4f78defSmrg LD=$lt_save_LD 7448a4f78defSmrg GCC=$lt_save_GCC 7449a4f78defSmrg with_gnu_ld=$lt_save_with_gnu_ld 7450a4f78defSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 7451a4f78defSmrg lt_cv_path_LD=$lt_save_path_LD 7452a4f78defSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7453a4f78defSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7454a4f78defSmrgfi # test yes != "$_lt_caught_CXX_error" 7455a4f78defSmrg 7456a4f78defSmrgAC_LANG_POP 7457a4f78defSmrg])# _LT_LANG_CXX_CONFIG 7458a4f78defSmrg 7459a4f78defSmrg 7460a4f78defSmrg# _LT_FUNC_STRIPNAME_CNF 7461a4f78defSmrg# ---------------------- 7462a4f78defSmrg# func_stripname_cnf prefix suffix name 7463a4f78defSmrg# strip PREFIX and SUFFIX off of NAME. 7464a4f78defSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7465a4f78defSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7466a4f78defSmrg# dot (in which case that matches only a dot). 7467a4f78defSmrg# 7468a4f78defSmrg# This function is identical to the (non-XSI) version of func_stripname, 7469a4f78defSmrg# except this one can be used by m4 code that may be executed by configure, 7470a4f78defSmrg# rather than the libtool script. 7471a4f78defSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7472a4f78defSmrgAC_REQUIRE([_LT_DECL_SED]) 7473a4f78defSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7474a4f78defSmrgfunc_stripname_cnf () 7475a4f78defSmrg{ 7476a4f78defSmrg case @S|@2 in 7477a4f78defSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7478a4f78defSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7479a4f78defSmrg esac 7480a4f78defSmrg} # func_stripname_cnf 7481a4f78defSmrg])# _LT_FUNC_STRIPNAME_CNF 7482a4f78defSmrg 7483a4f78defSmrg 7484a4f78defSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7485a4f78defSmrg# --------------------------------- 7486a4f78defSmrg# Figure out "hidden" library dependencies from verbose 7487a4f78defSmrg# compiler output when linking a shared library. 7488a4f78defSmrg# Parse the compiler output and extract the necessary 7489a4f78defSmrg# objects, libraries and library flags. 7490a4f78defSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7491a4f78defSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7492a4f78defSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7493a4f78defSmrg# Dependencies to place before and after the object being linked: 7494a4f78defSmrg_LT_TAGVAR(predep_objects, $1)= 7495a4f78defSmrg_LT_TAGVAR(postdep_objects, $1)= 7496a4f78defSmrg_LT_TAGVAR(predeps, $1)= 7497a4f78defSmrg_LT_TAGVAR(postdeps, $1)= 7498a4f78defSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7499a4f78defSmrg 7500a4f78defSmrgdnl we can't use the lt_simple_compile_test_code here, 7501a4f78defSmrgdnl because it contains code intended for an executable, 7502a4f78defSmrgdnl not a library. It's possible we should let each 7503a4f78defSmrgdnl tag define a new lt_????_link_test_code variable, 7504a4f78defSmrgdnl but it's only used here... 7505a4f78defSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7506a4f78defSmrgint a; 7507a4f78defSmrgvoid foo (void) { a = 0; } 7508a4f78defSmrg_LT_EOF 7509a4f78defSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7510a4f78defSmrgclass Foo 7511a4f78defSmrg{ 7512a4f78defSmrgpublic: 7513a4f78defSmrg Foo (void) { a = 0; } 7514a4f78defSmrgprivate: 7515a4f78defSmrg int a; 7516a4f78defSmrg}; 7517a4f78defSmrg_LT_EOF 7518a4f78defSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7519a4f78defSmrg subroutine foo 7520a4f78defSmrg implicit none 7521a4f78defSmrg integer*4 a 7522a4f78defSmrg a=0 7523a4f78defSmrg return 7524a4f78defSmrg end 7525a4f78defSmrg_LT_EOF 7526a4f78defSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7527a4f78defSmrg subroutine foo 7528a4f78defSmrg implicit none 7529a4f78defSmrg integer a 7530a4f78defSmrg a=0 7531a4f78defSmrg return 7532a4f78defSmrg end 7533a4f78defSmrg_LT_EOF 7534a4f78defSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7535a4f78defSmrgpublic class foo { 7536a4f78defSmrg private int a; 7537a4f78defSmrg public void bar (void) { 7538a4f78defSmrg a = 0; 7539a4f78defSmrg } 7540a4f78defSmrg}; 7541a4f78defSmrg_LT_EOF 7542a4f78defSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7543a4f78defSmrgpackage foo 7544a4f78defSmrgfunc foo() { 7545a4f78defSmrg} 7546a4f78defSmrg_LT_EOF 7547a4f78defSmrg]) 7548a4f78defSmrg 7549a4f78defSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 7550a4f78defSmrgcase "$CC $CFLAGS " in #( 7551a4f78defSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7552a4f78defSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7553a4f78defSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7554a4f78defSmrgesac 7555a4f78defSmrg 7556a4f78defSmrgdnl Parse the compiler output and extract the necessary 7557a4f78defSmrgdnl objects, libraries and library flags. 7558a4f78defSmrgif AC_TRY_EVAL(ac_compile); then 7559a4f78defSmrg # Parse the compiler output and extract the necessary 7560a4f78defSmrg # objects, libraries and library flags. 7561a4f78defSmrg 7562a4f78defSmrg # Sentinel used to keep track of whether or not we are before 7563a4f78defSmrg # the conftest object file. 7564a4f78defSmrg pre_test_object_deps_done=no 7565a4f78defSmrg 7566a4f78defSmrg for p in `eval "$output_verbose_link_cmd"`; do 7567a4f78defSmrg case $prev$p in 7568a4f78defSmrg 7569a4f78defSmrg -L* | -R* | -l*) 7570a4f78defSmrg # Some compilers place space between "-{L,R}" and the path. 7571a4f78defSmrg # Remove the space. 7572a4f78defSmrg if test x-L = "$p" || 7573a4f78defSmrg test x-R = "$p"; then 7574a4f78defSmrg prev=$p 7575a4f78defSmrg continue 7576a4f78defSmrg fi 7577a4f78defSmrg 7578a4f78defSmrg # Expand the sysroot to ease extracting the directories later. 7579a4f78defSmrg if test -z "$prev"; then 7580a4f78defSmrg case $p in 7581a4f78defSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7582a4f78defSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7583a4f78defSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7584a4f78defSmrg esac 7585a4f78defSmrg fi 7586a4f78defSmrg case $p in 7587a4f78defSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7588a4f78defSmrg esac 7589a4f78defSmrg if test no = "$pre_test_object_deps_done"; then 7590a4f78defSmrg case $prev in 7591a4f78defSmrg -L | -R) 7592a4f78defSmrg # Internal compiler library paths should come after those 7593a4f78defSmrg # provided the user. The postdeps already come after the 7594a4f78defSmrg # user supplied libs so there is no need to process them. 7595a4f78defSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7596a4f78defSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7597a4f78defSmrg else 7598a4f78defSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7599a4f78defSmrg fi 7600a4f78defSmrg ;; 7601a4f78defSmrg # The "-l" case would never come before the object being 7602a4f78defSmrg # linked, so don't bother handling this case. 7603a4f78defSmrg esac 7604a4f78defSmrg else 7605a4f78defSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7606a4f78defSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 7607a4f78defSmrg else 7608a4f78defSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7609a4f78defSmrg fi 7610a4f78defSmrg fi 7611a4f78defSmrg prev= 7612a4f78defSmrg ;; 7613a4f78defSmrg 7614a4f78defSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 7615a4f78defSmrg *.$objext) 7616a4f78defSmrg # This assumes that the test object file only shows up 7617a4f78defSmrg # once in the compiler output. 7618a4f78defSmrg if test "$p" = "conftest.$objext"; then 7619a4f78defSmrg pre_test_object_deps_done=yes 7620a4f78defSmrg continue 7621a4f78defSmrg fi 7622a4f78defSmrg 7623a4f78defSmrg if test no = "$pre_test_object_deps_done"; then 7624a4f78defSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7625a4f78defSmrg _LT_TAGVAR(predep_objects, $1)=$p 7626a4f78defSmrg else 7627a4f78defSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7628a4f78defSmrg fi 7629a4f78defSmrg else 7630a4f78defSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7631a4f78defSmrg _LT_TAGVAR(postdep_objects, $1)=$p 7632a4f78defSmrg else 7633a4f78defSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7634a4f78defSmrg fi 7635a4f78defSmrg fi 7636a4f78defSmrg ;; 7637a4f78defSmrg 7638a4f78defSmrg *) ;; # Ignore the rest. 7639a4f78defSmrg 7640a4f78defSmrg esac 7641a4f78defSmrg done 7642a4f78defSmrg 7643a4f78defSmrg # Clean up. 7644a4f78defSmrg rm -f a.out a.exe 7645a4f78defSmrgelse 7646a4f78defSmrg echo "libtool.m4: error: problem compiling $1 test program" 7647a4f78defSmrgfi 7648a4f78defSmrg 7649a4f78defSmrg$RM -f confest.$objext 7650a4f78defSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7651a4f78defSmrg 7652a4f78defSmrg# PORTME: override above test on systems where it is broken 7653a4f78defSmrgm4_if([$1], [CXX], 7654a4f78defSmrg[case $host_os in 7655a4f78defSmrginterix[[3-9]]*) 7656a4f78defSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7657a4f78defSmrg # hack all around it, let's just trust "g++" to DTRT. 7658a4f78defSmrg _LT_TAGVAR(predep_objects,$1)= 7659a4f78defSmrg _LT_TAGVAR(postdep_objects,$1)= 7660a4f78defSmrg _LT_TAGVAR(postdeps,$1)= 7661a4f78defSmrg ;; 7662a4f78defSmrgesac 7663a4f78defSmrg]) 7664a4f78defSmrg 7665a4f78defSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 7666a4f78defSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7667a4f78defSmrgesac 7668a4f78defSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7669a4f78defSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7670a4f78defSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7671a4f78defSmrgfi 7672a4f78defSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7673a4f78defSmrg [The directories searched by this compiler when creating a shared library]) 7674a4f78defSmrg_LT_TAGDECL([], [predep_objects], [1], 7675a4f78defSmrg [Dependencies to place before and after the objects being linked to 7676a4f78defSmrg create a shared library]) 7677a4f78defSmrg_LT_TAGDECL([], [postdep_objects], [1]) 7678a4f78defSmrg_LT_TAGDECL([], [predeps], [1]) 7679a4f78defSmrg_LT_TAGDECL([], [postdeps], [1]) 7680a4f78defSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7681a4f78defSmrg [The library search path used internally by the compiler when linking 7682a4f78defSmrg a shared library]) 7683a4f78defSmrg])# _LT_SYS_HIDDEN_LIBDEPS 7684a4f78defSmrg 7685a4f78defSmrg 7686a4f78defSmrg# _LT_LANG_F77_CONFIG([TAG]) 7687a4f78defSmrg# -------------------------- 7688a4f78defSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 7689a4f78defSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7690a4f78defSmrg# to write the compiler configuration to 'libtool'. 7691a4f78defSmrgm4_defun([_LT_LANG_F77_CONFIG], 7692a4f78defSmrg[AC_LANG_PUSH(Fortran 77) 7693a4f78defSmrgif test -z "$F77" || test no = "$F77"; then 7694a4f78defSmrg _lt_disable_F77=yes 7695a4f78defSmrgfi 7696a4f78defSmrg 7697a4f78defSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7698a4f78defSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7699a4f78defSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7700a4f78defSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7701a4f78defSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7702a4f78defSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7703a4f78defSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7704a4f78defSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7705a4f78defSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7706a4f78defSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7707a4f78defSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7708a4f78defSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7709a4f78defSmrg_LT_TAGVAR(module_cmds, $1)= 7710a4f78defSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7711a4f78defSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7712a4f78defSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7713a4f78defSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7714a4f78defSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7715a4f78defSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7716a4f78defSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7717a4f78defSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7718a4f78defSmrg 7719a4f78defSmrg# Source file extension for f77 test sources. 7720a4f78defSmrgac_ext=f 7721a4f78defSmrg 7722a4f78defSmrg# Object file extension for compiled f77 test sources. 7723a4f78defSmrgobjext=o 7724a4f78defSmrg_LT_TAGVAR(objext, $1)=$objext 7725a4f78defSmrg 7726a4f78defSmrg# No sense in running all these tests if we already determined that 7727a4f78defSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 7728a4f78defSmrg# are currently assumed to apply to all compilers on this platform, 7729a4f78defSmrg# and will be corrupted by setting them based on a non-working compiler. 7730a4f78defSmrgif test yes != "$_lt_disable_F77"; then 7731a4f78defSmrg # Code to be used in simple compile tests 7732a4f78defSmrg lt_simple_compile_test_code="\ 7733a4f78defSmrg subroutine t 7734a4f78defSmrg return 7735a4f78defSmrg end 7736a4f78defSmrg" 7737a4f78defSmrg 7738a4f78defSmrg # Code to be used in simple link tests 7739a4f78defSmrg lt_simple_link_test_code="\ 7740a4f78defSmrg program t 7741a4f78defSmrg end 7742a4f78defSmrg" 7743a4f78defSmrg 7744a4f78defSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7745a4f78defSmrg _LT_TAG_COMPILER 7746a4f78defSmrg 7747a4f78defSmrg # save warnings/boilerplate of simple test code 7748a4f78defSmrg _LT_COMPILER_BOILERPLATE 7749a4f78defSmrg _LT_LINKER_BOILERPLATE 7750a4f78defSmrg 7751a4f78defSmrg # Allow CC to be a program name with arguments. 7752a4f78defSmrg lt_save_CC=$CC 7753a4f78defSmrg lt_save_GCC=$GCC 7754a4f78defSmrg lt_save_CFLAGS=$CFLAGS 7755a4f78defSmrg CC=${F77-"f77"} 7756a4f78defSmrg CFLAGS=$FFLAGS 7757a4f78defSmrg compiler=$CC 7758a4f78defSmrg _LT_TAGVAR(compiler, $1)=$CC 7759a4f78defSmrg _LT_CC_BASENAME([$compiler]) 7760a4f78defSmrg GCC=$G77 7761a4f78defSmrg if test -n "$compiler"; then 7762a4f78defSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7763a4f78defSmrg AC_MSG_RESULT([$can_build_shared]) 7764a4f78defSmrg 7765a4f78defSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7766a4f78defSmrg test no = "$can_build_shared" && enable_shared=no 7767a4f78defSmrg 7768a4f78defSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7769a4f78defSmrg # are all built from PIC. 7770a4f78defSmrg case $host_os in 7771a4f78defSmrg aix3*) 7772a4f78defSmrg test yes = "$enable_shared" && enable_static=no 7773a4f78defSmrg if test -n "$RANLIB"; then 7774a4f78defSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7775a4f78defSmrg postinstall_cmds='$RANLIB $lib' 7776a4f78defSmrg fi 7777a4f78defSmrg ;; 7778a4f78defSmrg aix[[4-9]]*) 7779a4f78defSmrg if test ia64 != "$host_cpu"; then 7780a4f78defSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7781a4f78defSmrg yes,aix,yes) ;; # shared object as lib.so file only 7782a4f78defSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 7783a4f78defSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7784a4f78defSmrg esac 7785a4f78defSmrg fi 7786a4f78defSmrg ;; 7787a4f78defSmrg esac 7788a4f78defSmrg AC_MSG_RESULT([$enable_shared]) 7789a4f78defSmrg 7790a4f78defSmrg AC_MSG_CHECKING([whether to build static libraries]) 7791a4f78defSmrg # Make sure either enable_shared or enable_static is yes. 7792a4f78defSmrg test yes = "$enable_shared" || enable_static=yes 7793a4f78defSmrg AC_MSG_RESULT([$enable_static]) 7794a4f78defSmrg 7795a4f78defSmrg _LT_TAGVAR(GCC, $1)=$G77 7796a4f78defSmrg _LT_TAGVAR(LD, $1)=$LD 7797a4f78defSmrg 7798a4f78defSmrg ## CAVEAT EMPTOR: 7799a4f78defSmrg ## There is no encapsulation within the following macros, do not change 7800a4f78defSmrg ## the running order or otherwise move them around unless you know exactly 7801a4f78defSmrg ## what you are doing... 7802a4f78defSmrg _LT_COMPILER_PIC($1) 7803a4f78defSmrg _LT_COMPILER_C_O($1) 7804a4f78defSmrg _LT_COMPILER_FILE_LOCKS($1) 7805a4f78defSmrg _LT_LINKER_SHLIBS($1) 7806a4f78defSmrg _LT_SYS_DYNAMIC_LINKER($1) 7807a4f78defSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7808a4f78defSmrg 7809a4f78defSmrg _LT_CONFIG($1) 7810a4f78defSmrg fi # test -n "$compiler" 7811a4f78defSmrg 7812a4f78defSmrg GCC=$lt_save_GCC 7813a4f78defSmrg CC=$lt_save_CC 7814a4f78defSmrg CFLAGS=$lt_save_CFLAGS 7815a4f78defSmrgfi # test yes != "$_lt_disable_F77" 7816a4f78defSmrg 7817a4f78defSmrgAC_LANG_POP 7818a4f78defSmrg])# _LT_LANG_F77_CONFIG 7819a4f78defSmrg 7820a4f78defSmrg 7821a4f78defSmrg# _LT_LANG_FC_CONFIG([TAG]) 7822a4f78defSmrg# ------------------------- 7823a4f78defSmrg# Ensure that the configuration variables for a Fortran compiler are 7824a4f78defSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7825a4f78defSmrg# to write the compiler configuration to 'libtool'. 7826a4f78defSmrgm4_defun([_LT_LANG_FC_CONFIG], 7827a4f78defSmrg[AC_LANG_PUSH(Fortran) 7828a4f78defSmrg 7829a4f78defSmrgif test -z "$FC" || test no = "$FC"; then 7830a4f78defSmrg _lt_disable_FC=yes 7831a4f78defSmrgfi 7832a4f78defSmrg 7833a4f78defSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7834a4f78defSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7835a4f78defSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7836a4f78defSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7837a4f78defSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7838a4f78defSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7839a4f78defSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7840a4f78defSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7841a4f78defSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7842a4f78defSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7843a4f78defSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7844a4f78defSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7845a4f78defSmrg_LT_TAGVAR(module_cmds, $1)= 7846a4f78defSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7847a4f78defSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7848a4f78defSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7849a4f78defSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7850a4f78defSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7851a4f78defSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7852a4f78defSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7853a4f78defSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7854a4f78defSmrg 7855a4f78defSmrg# Source file extension for fc test sources. 7856a4f78defSmrgac_ext=${ac_fc_srcext-f} 7857a4f78defSmrg 7858a4f78defSmrg# Object file extension for compiled fc test sources. 7859a4f78defSmrgobjext=o 7860a4f78defSmrg_LT_TAGVAR(objext, $1)=$objext 7861a4f78defSmrg 7862a4f78defSmrg# No sense in running all these tests if we already determined that 7863a4f78defSmrg# the FC compiler isn't working. Some variables (like enable_shared) 7864a4f78defSmrg# are currently assumed to apply to all compilers on this platform, 7865a4f78defSmrg# and will be corrupted by setting them based on a non-working compiler. 7866a4f78defSmrgif test yes != "$_lt_disable_FC"; then 7867a4f78defSmrg # Code to be used in simple compile tests 7868a4f78defSmrg lt_simple_compile_test_code="\ 7869a4f78defSmrg subroutine t 7870a4f78defSmrg return 7871a4f78defSmrg end 7872a4f78defSmrg" 7873a4f78defSmrg 7874a4f78defSmrg # Code to be used in simple link tests 7875a4f78defSmrg lt_simple_link_test_code="\ 7876a4f78defSmrg program t 7877a4f78defSmrg end 7878a4f78defSmrg" 7879a4f78defSmrg 7880a4f78defSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7881a4f78defSmrg _LT_TAG_COMPILER 7882a4f78defSmrg 7883a4f78defSmrg # save warnings/boilerplate of simple test code 7884a4f78defSmrg _LT_COMPILER_BOILERPLATE 7885a4f78defSmrg _LT_LINKER_BOILERPLATE 7886a4f78defSmrg 7887a4f78defSmrg # Allow CC to be a program name with arguments. 7888a4f78defSmrg lt_save_CC=$CC 7889a4f78defSmrg lt_save_GCC=$GCC 7890a4f78defSmrg lt_save_CFLAGS=$CFLAGS 7891a4f78defSmrg CC=${FC-"f95"} 7892a4f78defSmrg CFLAGS=$FCFLAGS 7893a4f78defSmrg compiler=$CC 7894a4f78defSmrg GCC=$ac_cv_fc_compiler_gnu 7895a4f78defSmrg 7896a4f78defSmrg _LT_TAGVAR(compiler, $1)=$CC 7897a4f78defSmrg _LT_CC_BASENAME([$compiler]) 7898a4f78defSmrg 7899a4f78defSmrg if test -n "$compiler"; then 7900a4f78defSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7901a4f78defSmrg AC_MSG_RESULT([$can_build_shared]) 7902a4f78defSmrg 7903a4f78defSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7904a4f78defSmrg test no = "$can_build_shared" && enable_shared=no 7905a4f78defSmrg 7906a4f78defSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7907a4f78defSmrg # are all built from PIC. 7908a4f78defSmrg case $host_os in 7909a4f78defSmrg aix3*) 7910a4f78defSmrg test yes = "$enable_shared" && enable_static=no 7911a4f78defSmrg if test -n "$RANLIB"; then 7912a4f78defSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7913a4f78defSmrg postinstall_cmds='$RANLIB $lib' 7914a4f78defSmrg fi 7915a4f78defSmrg ;; 7916a4f78defSmrg aix[[4-9]]*) 7917a4f78defSmrg if test ia64 != "$host_cpu"; then 7918a4f78defSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7919a4f78defSmrg yes,aix,yes) ;; # shared object as lib.so file only 7920a4f78defSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 7921a4f78defSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7922a4f78defSmrg esac 7923a4f78defSmrg fi 7924a4f78defSmrg ;; 7925a4f78defSmrg esac 7926a4f78defSmrg AC_MSG_RESULT([$enable_shared]) 7927a4f78defSmrg 7928a4f78defSmrg AC_MSG_CHECKING([whether to build static libraries]) 7929a4f78defSmrg # Make sure either enable_shared or enable_static is yes. 7930a4f78defSmrg test yes = "$enable_shared" || enable_static=yes 7931a4f78defSmrg AC_MSG_RESULT([$enable_static]) 7932a4f78defSmrg 7933a4f78defSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7934a4f78defSmrg _LT_TAGVAR(LD, $1)=$LD 7935a4f78defSmrg 7936a4f78defSmrg ## CAVEAT EMPTOR: 7937a4f78defSmrg ## There is no encapsulation within the following macros, do not change 7938a4f78defSmrg ## the running order or otherwise move them around unless you know exactly 7939a4f78defSmrg ## what you are doing... 7940a4f78defSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7941a4f78defSmrg _LT_COMPILER_PIC($1) 7942a4f78defSmrg _LT_COMPILER_C_O($1) 7943a4f78defSmrg _LT_COMPILER_FILE_LOCKS($1) 7944a4f78defSmrg _LT_LINKER_SHLIBS($1) 7945a4f78defSmrg _LT_SYS_DYNAMIC_LINKER($1) 7946a4f78defSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7947a4f78defSmrg 7948a4f78defSmrg _LT_CONFIG($1) 7949a4f78defSmrg fi # test -n "$compiler" 7950a4f78defSmrg 7951a4f78defSmrg GCC=$lt_save_GCC 7952a4f78defSmrg CC=$lt_save_CC 7953a4f78defSmrg CFLAGS=$lt_save_CFLAGS 7954a4f78defSmrgfi # test yes != "$_lt_disable_FC" 7955a4f78defSmrg 7956a4f78defSmrgAC_LANG_POP 7957a4f78defSmrg])# _LT_LANG_FC_CONFIG 7958a4f78defSmrg 7959a4f78defSmrg 7960a4f78defSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 7961a4f78defSmrg# -------------------------- 7962a4f78defSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7963a4f78defSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7964a4f78defSmrg# to write the compiler configuration to 'libtool'. 7965a4f78defSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 7966a4f78defSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7967a4f78defSmrgAC_LANG_SAVE 7968a4f78defSmrg 7969a4f78defSmrg# Source file extension for Java test sources. 7970a4f78defSmrgac_ext=java 7971a4f78defSmrg 7972a4f78defSmrg# Object file extension for compiled Java test sources. 7973a4f78defSmrgobjext=o 7974a4f78defSmrg_LT_TAGVAR(objext, $1)=$objext 7975a4f78defSmrg 7976a4f78defSmrg# Code to be used in simple compile tests 7977a4f78defSmrglt_simple_compile_test_code="class foo {}" 7978a4f78defSmrg 7979a4f78defSmrg# Code to be used in simple link tests 7980a4f78defSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7981a4f78defSmrg 7982a4f78defSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7983a4f78defSmrg_LT_TAG_COMPILER 7984a4f78defSmrg 7985a4f78defSmrg# save warnings/boilerplate of simple test code 7986a4f78defSmrg_LT_COMPILER_BOILERPLATE 7987a4f78defSmrg_LT_LINKER_BOILERPLATE 7988a4f78defSmrg 7989a4f78defSmrg# Allow CC to be a program name with arguments. 7990a4f78defSmrglt_save_CC=$CC 7991a4f78defSmrglt_save_CFLAGS=$CFLAGS 7992a4f78defSmrglt_save_GCC=$GCC 7993a4f78defSmrgGCC=yes 7994a4f78defSmrgCC=${GCJ-"gcj"} 7995a4f78defSmrgCFLAGS=$GCJFLAGS 7996a4f78defSmrgcompiler=$CC 7997a4f78defSmrg_LT_TAGVAR(compiler, $1)=$CC 7998a4f78defSmrg_LT_TAGVAR(LD, $1)=$LD 7999a4f78defSmrg_LT_CC_BASENAME([$compiler]) 8000a4f78defSmrg 8001a4f78defSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 8002a4f78defSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8003a4f78defSmrg 8004a4f78defSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8005a4f78defSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8006a4f78defSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8007a4f78defSmrg 8008a4f78defSmrgif test -n "$compiler"; then 8009a4f78defSmrg _LT_COMPILER_NO_RTTI($1) 8010a4f78defSmrg _LT_COMPILER_PIC($1) 8011a4f78defSmrg _LT_COMPILER_C_O($1) 8012a4f78defSmrg _LT_COMPILER_FILE_LOCKS($1) 8013a4f78defSmrg _LT_LINKER_SHLIBS($1) 8014a4f78defSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8015a4f78defSmrg 8016a4f78defSmrg _LT_CONFIG($1) 8017a4f78defSmrgfi 8018a4f78defSmrg 8019a4f78defSmrgAC_LANG_RESTORE 8020a4f78defSmrg 8021a4f78defSmrgGCC=$lt_save_GCC 8022a4f78defSmrgCC=$lt_save_CC 8023a4f78defSmrgCFLAGS=$lt_save_CFLAGS 8024a4f78defSmrg])# _LT_LANG_GCJ_CONFIG 8025a4f78defSmrg 8026a4f78defSmrg 8027a4f78defSmrg# _LT_LANG_GO_CONFIG([TAG]) 8028a4f78defSmrg# -------------------------- 8029a4f78defSmrg# Ensure that the configuration variables for the GNU Go compiler 8030a4f78defSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8031a4f78defSmrg# to write the compiler configuration to 'libtool'. 8032a4f78defSmrgm4_defun([_LT_LANG_GO_CONFIG], 8033a4f78defSmrg[AC_REQUIRE([LT_PROG_GO])dnl 8034a4f78defSmrgAC_LANG_SAVE 8035a4f78defSmrg 8036a4f78defSmrg# Source file extension for Go test sources. 8037a4f78defSmrgac_ext=go 8038a4f78defSmrg 8039a4f78defSmrg# Object file extension for compiled Go test sources. 8040a4f78defSmrgobjext=o 8041a4f78defSmrg_LT_TAGVAR(objext, $1)=$objext 8042a4f78defSmrg 8043a4f78defSmrg# Code to be used in simple compile tests 8044a4f78defSmrglt_simple_compile_test_code="package main; func main() { }" 8045a4f78defSmrg 8046a4f78defSmrg# Code to be used in simple link tests 8047a4f78defSmrglt_simple_link_test_code='package main; func main() { }' 8048a4f78defSmrg 8049a4f78defSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8050a4f78defSmrg_LT_TAG_COMPILER 8051a4f78defSmrg 8052a4f78defSmrg# save warnings/boilerplate of simple test code 8053a4f78defSmrg_LT_COMPILER_BOILERPLATE 8054a4f78defSmrg_LT_LINKER_BOILERPLATE 8055a4f78defSmrg 8056a4f78defSmrg# Allow CC to be a program name with arguments. 8057a4f78defSmrglt_save_CC=$CC 8058a4f78defSmrglt_save_CFLAGS=$CFLAGS 8059a4f78defSmrglt_save_GCC=$GCC 8060a4f78defSmrgGCC=yes 8061a4f78defSmrgCC=${GOC-"gccgo"} 8062a4f78defSmrgCFLAGS=$GOFLAGS 8063a4f78defSmrgcompiler=$CC 8064a4f78defSmrg_LT_TAGVAR(compiler, $1)=$CC 8065a4f78defSmrg_LT_TAGVAR(LD, $1)=$LD 8066a4f78defSmrg_LT_CC_BASENAME([$compiler]) 8067a4f78defSmrg 8068a4f78defSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 8069a4f78defSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8070a4f78defSmrg 8071a4f78defSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8072a4f78defSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8073a4f78defSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8074a4f78defSmrg 8075a4f78defSmrgif test -n "$compiler"; then 8076a4f78defSmrg _LT_COMPILER_NO_RTTI($1) 8077a4f78defSmrg _LT_COMPILER_PIC($1) 8078a4f78defSmrg _LT_COMPILER_C_O($1) 8079a4f78defSmrg _LT_COMPILER_FILE_LOCKS($1) 8080a4f78defSmrg _LT_LINKER_SHLIBS($1) 8081a4f78defSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8082a4f78defSmrg 8083a4f78defSmrg _LT_CONFIG($1) 8084a4f78defSmrgfi 8085a4f78defSmrg 8086a4f78defSmrgAC_LANG_RESTORE 8087a4f78defSmrg 8088a4f78defSmrgGCC=$lt_save_GCC 8089a4f78defSmrgCC=$lt_save_CC 8090a4f78defSmrgCFLAGS=$lt_save_CFLAGS 8091a4f78defSmrg])# _LT_LANG_GO_CONFIG 8092a4f78defSmrg 8093a4f78defSmrg 8094a4f78defSmrg# _LT_LANG_RC_CONFIG([TAG]) 8095a4f78defSmrg# ------------------------- 8096a4f78defSmrg# Ensure that the configuration variables for the Windows resource compiler 8097a4f78defSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8098a4f78defSmrg# to write the compiler configuration to 'libtool'. 8099a4f78defSmrgm4_defun([_LT_LANG_RC_CONFIG], 8100a4f78defSmrg[AC_REQUIRE([LT_PROG_RC])dnl 8101a4f78defSmrgAC_LANG_SAVE 8102a4f78defSmrg 8103a4f78defSmrg# Source file extension for RC test sources. 8104a4f78defSmrgac_ext=rc 8105a4f78defSmrg 8106a4f78defSmrg# Object file extension for compiled RC test sources. 8107a4f78defSmrgobjext=o 8108a4f78defSmrg_LT_TAGVAR(objext, $1)=$objext 8109a4f78defSmrg 8110a4f78defSmrg# Code to be used in simple compile tests 8111a4f78defSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8112a4f78defSmrg 8113a4f78defSmrg# Code to be used in simple link tests 8114a4f78defSmrglt_simple_link_test_code=$lt_simple_compile_test_code 8115a4f78defSmrg 8116a4f78defSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8117a4f78defSmrg_LT_TAG_COMPILER 8118a4f78defSmrg 8119a4f78defSmrg# save warnings/boilerplate of simple test code 8120a4f78defSmrg_LT_COMPILER_BOILERPLATE 8121a4f78defSmrg_LT_LINKER_BOILERPLATE 8122a4f78defSmrg 8123a4f78defSmrg# Allow CC to be a program name with arguments. 8124a4f78defSmrglt_save_CC=$CC 8125a4f78defSmrglt_save_CFLAGS=$CFLAGS 8126a4f78defSmrglt_save_GCC=$GCC 8127a4f78defSmrgGCC= 8128a4f78defSmrgCC=${RC-"windres"} 8129a4f78defSmrgCFLAGS= 8130a4f78defSmrgcompiler=$CC 8131a4f78defSmrg_LT_TAGVAR(compiler, $1)=$CC 8132a4f78defSmrg_LT_CC_BASENAME([$compiler]) 8133a4f78defSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8134a4f78defSmrg 8135a4f78defSmrgif test -n "$compiler"; then 8136a4f78defSmrg : 8137a4f78defSmrg _LT_CONFIG($1) 8138a4f78defSmrgfi 8139a4f78defSmrg 8140a4f78defSmrgGCC=$lt_save_GCC 8141a4f78defSmrgAC_LANG_RESTORE 8142a4f78defSmrgCC=$lt_save_CC 8143a4f78defSmrgCFLAGS=$lt_save_CFLAGS 8144a4f78defSmrg])# _LT_LANG_RC_CONFIG 8145a4f78defSmrg 8146a4f78defSmrg 8147a4f78defSmrg# LT_PROG_GCJ 8148a4f78defSmrg# ----------- 8149a4f78defSmrgAC_DEFUN([LT_PROG_GCJ], 8150a4f78defSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8151a4f78defSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8152a4f78defSmrg [AC_CHECK_TOOL(GCJ, gcj,) 8153a4f78defSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8154a4f78defSmrg AC_SUBST(GCJFLAGS)])])[]dnl 8155a4f78defSmrg]) 8156a4f78defSmrg 8157a4f78defSmrg# Old name: 8158a4f78defSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8159a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 8160a4f78defSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8161a4f78defSmrg 8162a4f78defSmrg 8163a4f78defSmrg# LT_PROG_GO 8164a4f78defSmrg# ---------- 8165a4f78defSmrgAC_DEFUN([LT_PROG_GO], 8166a4f78defSmrg[AC_CHECK_TOOL(GOC, gccgo,) 8167a4f78defSmrg]) 8168a4f78defSmrg 8169a4f78defSmrg 8170a4f78defSmrg# LT_PROG_RC 8171a4f78defSmrg# ---------- 8172a4f78defSmrgAC_DEFUN([LT_PROG_RC], 8173a4f78defSmrg[AC_CHECK_TOOL(RC, windres,) 8174a4f78defSmrg]) 8175a4f78defSmrg 8176a4f78defSmrg# Old name: 8177a4f78defSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8178a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 8179a4f78defSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8180a4f78defSmrg 8181a4f78defSmrg 8182a4f78defSmrg# _LT_DECL_EGREP 8183a4f78defSmrg# -------------- 8184a4f78defSmrg# If we don't have a new enough Autoconf to choose the best grep 8185a4f78defSmrg# available, choose the one first in the user's PATH. 8186a4f78defSmrgm4_defun([_LT_DECL_EGREP], 8187a4f78defSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8188a4f78defSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8189a4f78defSmrgtest -z "$GREP" && GREP=grep 8190a4f78defSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8191a4f78defSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8192a4f78defSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8193a4f78defSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8194a4f78defSmrgAC_SUBST([GREP]) 8195a4f78defSmrg]) 8196a4f78defSmrg 8197a4f78defSmrg 8198a4f78defSmrg# _LT_DECL_OBJDUMP 8199a4f78defSmrg# -------------- 8200a4f78defSmrg# If we don't have a new enough Autoconf to choose the best objdump 8201a4f78defSmrg# available, choose the one first in the user's PATH. 8202a4f78defSmrgm4_defun([_LT_DECL_OBJDUMP], 8203a4f78defSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8204a4f78defSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8205a4f78defSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8206a4f78defSmrgAC_SUBST([OBJDUMP]) 8207a4f78defSmrg]) 8208a4f78defSmrg 8209a4f78defSmrg# _LT_DECL_DLLTOOL 8210a4f78defSmrg# ---------------- 8211a4f78defSmrg# Ensure DLLTOOL variable is set. 8212a4f78defSmrgm4_defun([_LT_DECL_DLLTOOL], 8213a4f78defSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8214a4f78defSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8215a4f78defSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8216a4f78defSmrgAC_SUBST([DLLTOOL]) 8217a4f78defSmrg]) 8218a4f78defSmrg 8219a4f78defSmrg# _LT_DECL_SED 8220a4f78defSmrg# ------------ 8221a4f78defSmrg# Check for a fully-functional sed program, that truncates 8222a4f78defSmrg# as few characters as possible. Prefer GNU sed if found. 8223a4f78defSmrgm4_defun([_LT_DECL_SED], 8224a4f78defSmrg[AC_PROG_SED 8225a4f78defSmrgtest -z "$SED" && SED=sed 8226a4f78defSmrgXsed="$SED -e 1s/^X//" 8227a4f78defSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8228a4f78defSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8229a4f78defSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8230a4f78defSmrg])# _LT_DECL_SED 8231a4f78defSmrg 8232a4f78defSmrgm4_ifndef([AC_PROG_SED], [ 8233a4f78defSmrg# NOTE: This macro has been submitted for inclusion into # 8234a4f78defSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8235a4f78defSmrg# a released version of Autoconf we should remove this # 8236a4f78defSmrg# macro and use it instead. # 8237a4f78defSmrg 8238a4f78defSmrgm4_defun([AC_PROG_SED], 8239a4f78defSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8240a4f78defSmrgAC_CACHE_VAL(lt_cv_path_SED, 8241a4f78defSmrg[# Loop through the user's path and test for sed and gsed. 8242a4f78defSmrg# Then use that list of sed's as ones to test for truncation. 8243a4f78defSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8244a4f78defSmrgfor as_dir in $PATH 8245a4f78defSmrgdo 8246a4f78defSmrg IFS=$as_save_IFS 8247a4f78defSmrg test -z "$as_dir" && as_dir=. 8248a4f78defSmrg for lt_ac_prog in sed gsed; do 8249a4f78defSmrg for ac_exec_ext in '' $ac_executable_extensions; do 8250a4f78defSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8251a4f78defSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8252a4f78defSmrg fi 8253a4f78defSmrg done 8254a4f78defSmrg done 8255a4f78defSmrgdone 8256a4f78defSmrgIFS=$as_save_IFS 8257a4f78defSmrglt_ac_max=0 8258a4f78defSmrglt_ac_count=0 8259a4f78defSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8260a4f78defSmrg# along with /bin/sed that truncates output. 8261a4f78defSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8262a4f78defSmrg test ! -f "$lt_ac_sed" && continue 8263a4f78defSmrg cat /dev/null > conftest.in 8264a4f78defSmrg lt_ac_count=0 8265a4f78defSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8266a4f78defSmrg # Check for GNU sed and select it if it is found. 8267a4f78defSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8268a4f78defSmrg lt_cv_path_SED=$lt_ac_sed 8269a4f78defSmrg break 8270a4f78defSmrg fi 8271a4f78defSmrg while true; do 8272a4f78defSmrg cat conftest.in conftest.in >conftest.tmp 8273a4f78defSmrg mv conftest.tmp conftest.in 8274a4f78defSmrg cp conftest.in conftest.nl 8275a4f78defSmrg echo >>conftest.nl 8276a4f78defSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8277a4f78defSmrg cmp -s conftest.out conftest.nl || break 8278a4f78defSmrg # 10000 chars as input seems more than enough 8279a4f78defSmrg test 10 -lt "$lt_ac_count" && break 8280a4f78defSmrg lt_ac_count=`expr $lt_ac_count + 1` 8281a4f78defSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 8282a4f78defSmrg lt_ac_max=$lt_ac_count 8283a4f78defSmrg lt_cv_path_SED=$lt_ac_sed 8284a4f78defSmrg fi 8285a4f78defSmrg done 8286a4f78defSmrgdone 8287a4f78defSmrg]) 8288a4f78defSmrgSED=$lt_cv_path_SED 8289a4f78defSmrgAC_SUBST([SED]) 8290a4f78defSmrgAC_MSG_RESULT([$SED]) 8291a4f78defSmrg])#AC_PROG_SED 8292a4f78defSmrg])#m4_ifndef 8293a4f78defSmrg 8294a4f78defSmrg# Old name: 8295a4f78defSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8296a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 8297a4f78defSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8298a4f78defSmrg 8299a4f78defSmrg 8300a4f78defSmrg# _LT_CHECK_SHELL_FEATURES 8301a4f78defSmrg# ------------------------ 8302a4f78defSmrg# Find out whether the shell is Bourne or XSI compatible, 8303a4f78defSmrg# or has some other useful features. 8304a4f78defSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8305a4f78defSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8306a4f78defSmrg lt_unset=unset 8307a4f78defSmrgelse 8308a4f78defSmrg lt_unset=false 8309a4f78defSmrgfi 8310a4f78defSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8311a4f78defSmrg 8312a4f78defSmrg# test EBCDIC or ASCII 8313a4f78defSmrgcase `echo X|tr X '\101'` in 8314a4f78defSmrg A) # ASCII based system 8315a4f78defSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8316a4f78defSmrg lt_SP2NL='tr \040 \012' 8317a4f78defSmrg lt_NL2SP='tr \015\012 \040\040' 8318a4f78defSmrg ;; 8319a4f78defSmrg *) # EBCDIC based system 8320a4f78defSmrg lt_SP2NL='tr \100 \n' 8321a4f78defSmrg lt_NL2SP='tr \r\n \100\100' 8322a4f78defSmrg ;; 8323a4f78defSmrgesac 8324a4f78defSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8325a4f78defSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8326a4f78defSmrg])# _LT_CHECK_SHELL_FEATURES 8327a4f78defSmrg 8328a4f78defSmrg 8329a4f78defSmrg# _LT_PATH_CONVERSION_FUNCTIONS 8330a4f78defSmrg# ----------------------------- 8331a4f78defSmrg# Determine what file name conversion functions should be used by 8332a4f78defSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8333a4f78defSmrg# for certain cross-compile configurations and native mingw. 8334a4f78defSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8335a4f78defSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8336a4f78defSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8337a4f78defSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 8338a4f78defSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8339a4f78defSmrg[case $host in 8340a4f78defSmrg *-*-mingw* ) 8341a4f78defSmrg case $build in 8342a4f78defSmrg *-*-mingw* ) # actually msys 8343a4f78defSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8344a4f78defSmrg ;; 8345a4f78defSmrg *-*-cygwin* ) 8346a4f78defSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8347a4f78defSmrg ;; 8348a4f78defSmrg * ) # otherwise, assume *nix 8349a4f78defSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8350a4f78defSmrg ;; 8351a4f78defSmrg esac 8352a4f78defSmrg ;; 8353a4f78defSmrg *-*-cygwin* ) 8354a4f78defSmrg case $build in 8355a4f78defSmrg *-*-mingw* ) # actually msys 8356a4f78defSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8357a4f78defSmrg ;; 8358a4f78defSmrg *-*-cygwin* ) 8359a4f78defSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 8360a4f78defSmrg ;; 8361a4f78defSmrg * ) # otherwise, assume *nix 8362a4f78defSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8363a4f78defSmrg ;; 8364a4f78defSmrg esac 8365a4f78defSmrg ;; 8366a4f78defSmrg * ) # unhandled hosts (and "normal" native builds) 8367a4f78defSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 8368a4f78defSmrg ;; 8369a4f78defSmrgesac 8370a4f78defSmrg]) 8371a4f78defSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 8372a4f78defSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8373a4f78defSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8374a4f78defSmrg [0], [convert $build file names to $host format])dnl 8375a4f78defSmrg 8376a4f78defSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8377a4f78defSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8378a4f78defSmrg[#assume ordinary cross tools, or native build. 8379a4f78defSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 8380a4f78defSmrgcase $host in 8381a4f78defSmrg *-*-mingw* ) 8382a4f78defSmrg case $build in 8383a4f78defSmrg *-*-mingw* ) # actually msys 8384a4f78defSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8385a4f78defSmrg ;; 8386a4f78defSmrg esac 8387a4f78defSmrg ;; 8388a4f78defSmrgesac 8389a4f78defSmrg]) 8390a4f78defSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8391a4f78defSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8392a4f78defSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8393a4f78defSmrg [0], [convert $build files to toolchain format])dnl 8394a4f78defSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 8395a4f78defSmrg 8396a4f78defSmrg# Helper functions for option handling. -*- Autoconf -*- 8397a4f78defSmrg# 8398fb570538Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2018 Free Software 8399a4f78defSmrg# Foundation, Inc. 8400a4f78defSmrg# Written by Gary V. Vaughan, 2004 8401a4f78defSmrg# 8402a4f78defSmrg# This file is free software; the Free Software Foundation gives 8403a4f78defSmrg# unlimited permission to copy and/or distribute it, with or without 8404a4f78defSmrg# modifications, as long as this notice is preserved. 8405a4f78defSmrg 8406a4f78defSmrg# serial 8 ltoptions.m4 8407a4f78defSmrg 8408a4f78defSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8409a4f78defSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8410a4f78defSmrg 8411a4f78defSmrg 8412a4f78defSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8413a4f78defSmrg# ------------------------------------------ 8414a4f78defSmrgm4_define([_LT_MANGLE_OPTION], 8415a4f78defSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8416a4f78defSmrg 8417a4f78defSmrg 8418a4f78defSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8419a4f78defSmrg# --------------------------------------- 8420a4f78defSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8421a4f78defSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8422a4f78defSmrg# saved as a flag. 8423a4f78defSmrgm4_define([_LT_SET_OPTION], 8424a4f78defSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8425a4f78defSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8426a4f78defSmrg _LT_MANGLE_DEFUN([$1], [$2]), 8427a4f78defSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 8428a4f78defSmrg]) 8429a4f78defSmrg 8430a4f78defSmrg 8431a4f78defSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8432a4f78defSmrg# ------------------------------------------------------------ 8433a4f78defSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8434a4f78defSmrgm4_define([_LT_IF_OPTION], 8435a4f78defSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8436a4f78defSmrg 8437a4f78defSmrg 8438a4f78defSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8439a4f78defSmrg# ------------------------------------------------------- 8440a4f78defSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8441a4f78defSmrg# are set. 8442a4f78defSmrgm4_define([_LT_UNLESS_OPTIONS], 8443a4f78defSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8444a4f78defSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8445a4f78defSmrg [m4_define([$0_found])])])[]dnl 8446a4f78defSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8447a4f78defSmrg])[]dnl 8448a4f78defSmrg]) 8449a4f78defSmrg 8450a4f78defSmrg 8451a4f78defSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8452a4f78defSmrg# ---------------------------------------- 8453a4f78defSmrg# OPTION-LIST is a space-separated list of Libtool options associated 8454a4f78defSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8455a4f78defSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8456a4f78defSmrg# the unknown option and exit. 8457a4f78defSmrgm4_defun([_LT_SET_OPTIONS], 8458a4f78defSmrg[# Set options 8459a4f78defSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8460a4f78defSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 8461a4f78defSmrg 8462a4f78defSmrgm4_if([$1],[LT_INIT],[ 8463a4f78defSmrg dnl 8464a4f78defSmrg dnl Simply set some default values (i.e off) if boolean options were not 8465a4f78defSmrg dnl specified: 8466a4f78defSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8467a4f78defSmrg ]) 8468a4f78defSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8469a4f78defSmrg ]) 8470a4f78defSmrg dnl 8471a4f78defSmrg dnl If no reference was made to various pairs of opposing options, then 8472a4f78defSmrg dnl we run the default mode handler for the pair. For example, if neither 8473a4f78defSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8474a4f78defSmrg dnl archives by default: 8475a4f78defSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8476a4f78defSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8477a4f78defSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8478a4f78defSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8479a4f78defSmrg [_LT_ENABLE_FAST_INSTALL]) 8480a4f78defSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8481a4f78defSmrg [_LT_WITH_AIX_SONAME([aix])]) 8482a4f78defSmrg ]) 8483a4f78defSmrg])# _LT_SET_OPTIONS 8484a4f78defSmrg 8485a4f78defSmrg 8486a4f78defSmrg 8487a4f78defSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8488a4f78defSmrg# ----------------------------------------- 8489a4f78defSmrgm4_define([_LT_MANGLE_DEFUN], 8490a4f78defSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8491a4f78defSmrg 8492a4f78defSmrg 8493a4f78defSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8494a4f78defSmrg# ----------------------------------------------- 8495a4f78defSmrgm4_define([LT_OPTION_DEFINE], 8496a4f78defSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8497a4f78defSmrg])# LT_OPTION_DEFINE 8498a4f78defSmrg 8499a4f78defSmrg 8500a4f78defSmrg# dlopen 8501a4f78defSmrg# ------ 8502a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8503a4f78defSmrg]) 8504a4f78defSmrg 8505a4f78defSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8506a4f78defSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8507a4f78defSmrgAC_DIAGNOSE([obsolete], 8508a4f78defSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8509a4f78defSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 8510a4f78defSmrg]) 8511a4f78defSmrg 8512a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 8513a4f78defSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8514a4f78defSmrg 8515a4f78defSmrg 8516a4f78defSmrg# win32-dll 8517a4f78defSmrg# --------- 8518a4f78defSmrg# Declare package support for building win32 dll's. 8519a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8520a4f78defSmrg[enable_win32_dll=yes 8521a4f78defSmrg 8522a4f78defSmrgcase $host in 8523a4f78defSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8524a4f78defSmrg AC_CHECK_TOOL(AS, as, false) 8525a4f78defSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8526a4f78defSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8527a4f78defSmrg ;; 8528a4f78defSmrgesac 8529a4f78defSmrg 8530a4f78defSmrgtest -z "$AS" && AS=as 8531a4f78defSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8532a4f78defSmrg 8533a4f78defSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8534a4f78defSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8535a4f78defSmrg 8536a4f78defSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8537a4f78defSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8538a4f78defSmrg])# win32-dll 8539a4f78defSmrg 8540a4f78defSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8541a4f78defSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8542a4f78defSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8543a4f78defSmrgAC_DIAGNOSE([obsolete], 8544a4f78defSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8545a4f78defSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 8546a4f78defSmrg]) 8547a4f78defSmrg 8548a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 8549a4f78defSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8550a4f78defSmrg 8551a4f78defSmrg 8552a4f78defSmrg# _LT_ENABLE_SHARED([DEFAULT]) 8553a4f78defSmrg# ---------------------------- 8554a4f78defSmrg# implement the --enable-shared flag, and supports the 'shared' and 8555a4f78defSmrg# 'disable-shared' LT_INIT options. 8556a4f78defSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8557a4f78defSmrgm4_define([_LT_ENABLE_SHARED], 8558a4f78defSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8559a4f78defSmrgAC_ARG_ENABLE([shared], 8560a4f78defSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8561a4f78defSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8562a4f78defSmrg [p=${PACKAGE-default} 8563a4f78defSmrg case $enableval in 8564a4f78defSmrg yes) enable_shared=yes ;; 8565a4f78defSmrg no) enable_shared=no ;; 8566a4f78defSmrg *) 8567a4f78defSmrg enable_shared=no 8568a4f78defSmrg # Look at the argument we got. We use all the common list separators. 8569a4f78defSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8570a4f78defSmrg for pkg in $enableval; do 8571a4f78defSmrg IFS=$lt_save_ifs 8572a4f78defSmrg if test "X$pkg" = "X$p"; then 8573a4f78defSmrg enable_shared=yes 8574a4f78defSmrg fi 8575a4f78defSmrg done 8576a4f78defSmrg IFS=$lt_save_ifs 8577a4f78defSmrg ;; 8578a4f78defSmrg esac], 8579a4f78defSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8580a4f78defSmrg 8581a4f78defSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8582a4f78defSmrg [Whether or not to build shared libraries]) 8583a4f78defSmrg])# _LT_ENABLE_SHARED 8584a4f78defSmrg 8585a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8586a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8587a4f78defSmrg 8588a4f78defSmrg# Old names: 8589a4f78defSmrgAC_DEFUN([AC_ENABLE_SHARED], 8590a4f78defSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8591a4f78defSmrg]) 8592a4f78defSmrg 8593a4f78defSmrgAC_DEFUN([AC_DISABLE_SHARED], 8594a4f78defSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8595a4f78defSmrg]) 8596a4f78defSmrg 8597a4f78defSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8598a4f78defSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8599a4f78defSmrg 8600a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 8601a4f78defSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8602a4f78defSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8603a4f78defSmrg 8604a4f78defSmrg 8605a4f78defSmrg 8606a4f78defSmrg# _LT_ENABLE_STATIC([DEFAULT]) 8607a4f78defSmrg# ---------------------------- 8608a4f78defSmrg# implement the --enable-static flag, and support the 'static' and 8609a4f78defSmrg# 'disable-static' LT_INIT options. 8610a4f78defSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8611a4f78defSmrgm4_define([_LT_ENABLE_STATIC], 8612a4f78defSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8613a4f78defSmrgAC_ARG_ENABLE([static], 8614a4f78defSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8615a4f78defSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8616a4f78defSmrg [p=${PACKAGE-default} 8617a4f78defSmrg case $enableval in 8618a4f78defSmrg yes) enable_static=yes ;; 8619a4f78defSmrg no) enable_static=no ;; 8620a4f78defSmrg *) 8621a4f78defSmrg enable_static=no 8622a4f78defSmrg # Look at the argument we got. We use all the common list separators. 8623a4f78defSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8624a4f78defSmrg for pkg in $enableval; do 8625a4f78defSmrg IFS=$lt_save_ifs 8626a4f78defSmrg if test "X$pkg" = "X$p"; then 8627a4f78defSmrg enable_static=yes 8628a4f78defSmrg fi 8629a4f78defSmrg done 8630a4f78defSmrg IFS=$lt_save_ifs 8631a4f78defSmrg ;; 8632a4f78defSmrg esac], 8633a4f78defSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8634a4f78defSmrg 8635a4f78defSmrg _LT_DECL([build_old_libs], [enable_static], [0], 8636a4f78defSmrg [Whether or not to build static libraries]) 8637a4f78defSmrg])# _LT_ENABLE_STATIC 8638a4f78defSmrg 8639a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8640a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8641a4f78defSmrg 8642a4f78defSmrg# Old names: 8643a4f78defSmrgAC_DEFUN([AC_ENABLE_STATIC], 8644a4f78defSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8645a4f78defSmrg]) 8646a4f78defSmrg 8647a4f78defSmrgAC_DEFUN([AC_DISABLE_STATIC], 8648a4f78defSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8649a4f78defSmrg]) 8650a4f78defSmrg 8651a4f78defSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8652a4f78defSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8653a4f78defSmrg 8654a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 8655a4f78defSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8656a4f78defSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8657a4f78defSmrg 8658a4f78defSmrg 8659a4f78defSmrg 8660a4f78defSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8661a4f78defSmrg# ---------------------------------- 8662a4f78defSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 8663a4f78defSmrg# and 'disable-fast-install' LT_INIT options. 8664a4f78defSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8665a4f78defSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 8666a4f78defSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8667a4f78defSmrgAC_ARG_ENABLE([fast-install], 8668a4f78defSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8669a4f78defSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8670a4f78defSmrg [p=${PACKAGE-default} 8671a4f78defSmrg case $enableval in 8672a4f78defSmrg yes) enable_fast_install=yes ;; 8673a4f78defSmrg no) enable_fast_install=no ;; 8674a4f78defSmrg *) 8675a4f78defSmrg enable_fast_install=no 8676a4f78defSmrg # Look at the argument we got. We use all the common list separators. 8677a4f78defSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8678a4f78defSmrg for pkg in $enableval; do 8679a4f78defSmrg IFS=$lt_save_ifs 8680a4f78defSmrg if test "X$pkg" = "X$p"; then 8681a4f78defSmrg enable_fast_install=yes 8682a4f78defSmrg fi 8683a4f78defSmrg done 8684a4f78defSmrg IFS=$lt_save_ifs 8685a4f78defSmrg ;; 8686a4f78defSmrg esac], 8687a4f78defSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8688a4f78defSmrg 8689a4f78defSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 8690a4f78defSmrg [Whether or not to optimize for fast installation])dnl 8691a4f78defSmrg])# _LT_ENABLE_FAST_INSTALL 8692a4f78defSmrg 8693a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8694a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8695a4f78defSmrg 8696a4f78defSmrg# Old names: 8697a4f78defSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8698a4f78defSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8699a4f78defSmrgAC_DIAGNOSE([obsolete], 8700a4f78defSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8701a4f78defSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 8702a4f78defSmrg]) 8703a4f78defSmrg 8704a4f78defSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8705a4f78defSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8706a4f78defSmrgAC_DIAGNOSE([obsolete], 8707a4f78defSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8708a4f78defSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 8709a4f78defSmrg]) 8710a4f78defSmrg 8711a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 8712a4f78defSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8713a4f78defSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8714a4f78defSmrg 8715a4f78defSmrg 8716a4f78defSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 8717a4f78defSmrg# ---------------------------------- 8718a4f78defSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8719a4f78defSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8720a4f78defSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8721a4f78defSmrgm4_define([_LT_WITH_AIX_SONAME], 8722a4f78defSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8723a4f78defSmrgshared_archive_member_spec= 8724a4f78defSmrgcase $host,$enable_shared in 8725a4f78defSmrgpower*-*-aix[[5-9]]*,yes) 8726a4f78defSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8727a4f78defSmrg AC_ARG_WITH([aix-soname], 8728a4f78defSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8729a4f78defSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8730a4f78defSmrg [case $withval in 8731a4f78defSmrg aix|svr4|both) 8732a4f78defSmrg ;; 8733a4f78defSmrg *) 8734a4f78defSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8735a4f78defSmrg ;; 8736a4f78defSmrg esac 8737a4f78defSmrg lt_cv_with_aix_soname=$with_aix_soname], 8738a4f78defSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 8739a4f78defSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8740a4f78defSmrg with_aix_soname=$lt_cv_with_aix_soname]) 8741a4f78defSmrg AC_MSG_RESULT([$with_aix_soname]) 8742a4f78defSmrg if test aix != "$with_aix_soname"; then 8743a4f78defSmrg # For the AIX way of multilib, we name the shared archive member 8744a4f78defSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8745a4f78defSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8746a4f78defSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8747a4f78defSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 8748a4f78defSmrg if test 64 = "${OBJECT_MODE-32}"; then 8749a4f78defSmrg shared_archive_member_spec=shr_64 8750a4f78defSmrg else 8751a4f78defSmrg shared_archive_member_spec=shr 8752a4f78defSmrg fi 8753a4f78defSmrg fi 8754a4f78defSmrg ;; 8755a4f78defSmrg*) 8756a4f78defSmrg with_aix_soname=aix 8757a4f78defSmrg ;; 8758a4f78defSmrgesac 8759a4f78defSmrg 8760a4f78defSmrg_LT_DECL([], [shared_archive_member_spec], [0], 8761a4f78defSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8762a4f78defSmrg])# _LT_WITH_AIX_SONAME 8763a4f78defSmrg 8764a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8765a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8766a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8767a4f78defSmrg 8768a4f78defSmrg 8769a4f78defSmrg# _LT_WITH_PIC([MODE]) 8770a4f78defSmrg# -------------------- 8771a4f78defSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8772a4f78defSmrg# LT_INIT options. 8773a4f78defSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8774a4f78defSmrgm4_define([_LT_WITH_PIC], 8775a4f78defSmrg[AC_ARG_WITH([pic], 8776a4f78defSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8777a4f78defSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8778a4f78defSmrg [lt_p=${PACKAGE-default} 8779a4f78defSmrg case $withval in 8780a4f78defSmrg yes|no) pic_mode=$withval ;; 8781a4f78defSmrg *) 8782a4f78defSmrg pic_mode=default 8783a4f78defSmrg # Look at the argument we got. We use all the common list separators. 8784a4f78defSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8785a4f78defSmrg for lt_pkg in $withval; do 8786a4f78defSmrg IFS=$lt_save_ifs 8787a4f78defSmrg if test "X$lt_pkg" = "X$lt_p"; then 8788a4f78defSmrg pic_mode=yes 8789a4f78defSmrg fi 8790a4f78defSmrg done 8791a4f78defSmrg IFS=$lt_save_ifs 8792a4f78defSmrg ;; 8793a4f78defSmrg esac], 8794a4f78defSmrg [pic_mode=m4_default([$1], [default])]) 8795a4f78defSmrg 8796a4f78defSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8797a4f78defSmrg])# _LT_WITH_PIC 8798a4f78defSmrg 8799a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8800a4f78defSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8801a4f78defSmrg 8802a4f78defSmrg# Old name: 8803a4f78defSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8804a4f78defSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8805a4f78defSmrgAC_DIAGNOSE([obsolete], 8806a4f78defSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8807a4f78defSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 8808a4f78defSmrg]) 8809a4f78defSmrg 8810a4f78defSmrgdnl aclocal-1.4 backwards compatibility: 8811a4f78defSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8812a4f78defSmrg 8813a4f78defSmrg 8814a4f78defSmrgm4_define([_LTDL_MODE], []) 8815a4f78defSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8816a4f78defSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8817a4f78defSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8818a4f78defSmrg [m4_define([_LTDL_MODE], [recursive])]) 8819a4f78defSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8820a4f78defSmrg [m4_define([_LTDL_MODE], [subproject])]) 8821a4f78defSmrg 8822a4f78defSmrgm4_define([_LTDL_TYPE], []) 8823a4f78defSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8824a4f78defSmrg [m4_define([_LTDL_TYPE], [installable])]) 8825a4f78defSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8826a4f78defSmrg [m4_define([_LTDL_TYPE], [convenience])]) 8827a4f78defSmrg 8828a4f78defSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8829a4f78defSmrg# 8830fb570538Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2018 Free Software 8831a4f78defSmrg# Foundation, Inc. 8832a4f78defSmrg# Written by Gary V. Vaughan, 2004 8833a4f78defSmrg# 8834a4f78defSmrg# This file is free software; the Free Software Foundation gives 8835a4f78defSmrg# unlimited permission to copy and/or distribute it, with or without 8836a4f78defSmrg# modifications, as long as this notice is preserved. 8837a4f78defSmrg 8838a4f78defSmrg# serial 6 ltsugar.m4 8839a4f78defSmrg 8840a4f78defSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8841a4f78defSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8842a4f78defSmrg 8843a4f78defSmrg 8844a4f78defSmrg# lt_join(SEP, ARG1, [ARG2...]) 8845a4f78defSmrg# ----------------------------- 8846a4f78defSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8847a4f78defSmrg# associated separator. 8848a4f78defSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8849a4f78defSmrg# versions in m4sugar had bugs. 8850a4f78defSmrgm4_define([lt_join], 8851a4f78defSmrg[m4_if([$#], [1], [], 8852a4f78defSmrg [$#], [2], [[$2]], 8853a4f78defSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8854a4f78defSmrgm4_define([_lt_join], 8855a4f78defSmrg[m4_if([$#$2], [2], [], 8856a4f78defSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8857a4f78defSmrg 8858a4f78defSmrg 8859a4f78defSmrg# lt_car(LIST) 8860a4f78defSmrg# lt_cdr(LIST) 8861a4f78defSmrg# ------------ 8862a4f78defSmrg# Manipulate m4 lists. 8863a4f78defSmrg# These macros are necessary as long as will still need to support 8864a4f78defSmrg# Autoconf-2.59, which quotes differently. 8865a4f78defSmrgm4_define([lt_car], [[$1]]) 8866a4f78defSmrgm4_define([lt_cdr], 8867a4f78defSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8868a4f78defSmrg [$#], 1, [], 8869a4f78defSmrg [m4_dquote(m4_shift($@))])]) 8870a4f78defSmrgm4_define([lt_unquote], $1) 8871a4f78defSmrg 8872a4f78defSmrg 8873a4f78defSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8874a4f78defSmrg# ------------------------------------------ 8875a4f78defSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8876a4f78defSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8877a4f78defSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8878a4f78defSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8879a4f78defSmrg# than defined and empty). 8880a4f78defSmrg# 8881a4f78defSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8882a4f78defSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8883a4f78defSmrgm4_define([lt_append], 8884a4f78defSmrg[m4_define([$1], 8885a4f78defSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8886a4f78defSmrg 8887a4f78defSmrg 8888a4f78defSmrg 8889a4f78defSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8890a4f78defSmrg# ---------------------------------------------------------- 8891a4f78defSmrg# Produce a SEP delimited list of all paired combinations of elements of 8892a4f78defSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8893a4f78defSmrg# has the form PREFIXmINFIXSUFFIXn. 8894a4f78defSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8895a4f78defSmrgm4_define([lt_combine], 8896a4f78defSmrg[m4_if(m4_eval([$# > 3]), [1], 8897a4f78defSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8898a4f78defSmrg[[m4_foreach([_Lt_prefix], [$2], 8899a4f78defSmrg [m4_foreach([_Lt_suffix], 8900a4f78defSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8901a4f78defSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8902a4f78defSmrg 8903a4f78defSmrg 8904a4f78defSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8905a4f78defSmrg# ----------------------------------------------------------------------- 8906a4f78defSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8907a4f78defSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8908a4f78defSmrgm4_define([lt_if_append_uniq], 8909a4f78defSmrg[m4_ifdef([$1], 8910a4f78defSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8911a4f78defSmrg [lt_append([$1], [$2], [$3])$4], 8912a4f78defSmrg [$5])], 8913a4f78defSmrg [lt_append([$1], [$2], [$3])$4])]) 8914a4f78defSmrg 8915a4f78defSmrg 8916a4f78defSmrg# lt_dict_add(DICT, KEY, VALUE) 8917a4f78defSmrg# ----------------------------- 8918a4f78defSmrgm4_define([lt_dict_add], 8919a4f78defSmrg[m4_define([$1($2)], [$3])]) 8920a4f78defSmrg 8921a4f78defSmrg 8922a4f78defSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8923a4f78defSmrg# -------------------------------------------- 8924a4f78defSmrgm4_define([lt_dict_add_subkey], 8925a4f78defSmrg[m4_define([$1($2:$3)], [$4])]) 8926a4f78defSmrg 8927a4f78defSmrg 8928a4f78defSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8929a4f78defSmrg# ---------------------------------- 8930a4f78defSmrgm4_define([lt_dict_fetch], 8931a4f78defSmrg[m4_ifval([$3], 8932a4f78defSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8933a4f78defSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8934a4f78defSmrg 8935a4f78defSmrg 8936a4f78defSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8937a4f78defSmrg# ----------------------------------------------------------------- 8938a4f78defSmrgm4_define([lt_if_dict_fetch], 8939a4f78defSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8940a4f78defSmrg [$5], 8941a4f78defSmrg [$6])]) 8942a4f78defSmrg 8943a4f78defSmrg 8944a4f78defSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8945a4f78defSmrg# -------------------------------------------------------------- 8946a4f78defSmrgm4_define([lt_dict_filter], 8947a4f78defSmrg[m4_if([$5], [], [], 8948a4f78defSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8949a4f78defSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8950a4f78defSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8951a4f78defSmrg]) 8952a4f78defSmrg 8953a4f78defSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8954a4f78defSmrg# 8955fb570538Smrg# Copyright (C) 2004, 2011-2018 Free Software Foundation, Inc. 8956a4f78defSmrg# Written by Scott James Remnant, 2004 8957a4f78defSmrg# 8958a4f78defSmrg# This file is free software; the Free Software Foundation gives 8959a4f78defSmrg# unlimited permission to copy and/or distribute it, with or without 8960a4f78defSmrg# modifications, as long as this notice is preserved. 8961a4f78defSmrg 8962a4f78defSmrg# @configure_input@ 8963a4f78defSmrg 8964fb570538Smrg# serial 4221 ltversion.m4 8965a4f78defSmrg# This file is part of GNU Libtool 8966a4f78defSmrg 8967fb570538Smrgm4_define([LT_PACKAGE_VERSION], [2.4.6.42-b88ce]) 8968fb570538Smrgm4_define([LT_PACKAGE_REVISION], [2.4.6.42]) 8969a4f78defSmrg 8970a4f78defSmrgAC_DEFUN([LTVERSION_VERSION], 8971fb570538Smrg[macro_version='2.4.6.42-b88ce' 8972fb570538Smrgmacro_revision='2.4.6.42' 8973a4f78defSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8974a4f78defSmrg_LT_DECL(, macro_revision, 0) 8975a4f78defSmrg]) 8976a4f78defSmrg 8977a4f78defSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8978a4f78defSmrg# 8979fb570538Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2018 Free Software 8980a4f78defSmrg# Foundation, Inc. 8981a4f78defSmrg# Written by Scott James Remnant, 2004. 8982a4f78defSmrg# 8983a4f78defSmrg# This file is free software; the Free Software Foundation gives 8984a4f78defSmrg# unlimited permission to copy and/or distribute it, with or without 8985a4f78defSmrg# modifications, as long as this notice is preserved. 8986a4f78defSmrg 8987a4f78defSmrg# serial 5 lt~obsolete.m4 8988a4f78defSmrg 8989a4f78defSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 8990a4f78defSmrg# 8991a4f78defSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8992a4f78defSmrg# which have later been changed to m4_define as they aren't part of the 8993a4f78defSmrg# exported API, or moved to Autoconf or Automake where they belong. 8994a4f78defSmrg# 8995a4f78defSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8996a4f78defSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8997a4f78defSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 8998a4f78defSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8999a4f78defSmrg# and doesn't know about Autoconf macros at all.) 9000a4f78defSmrg# 9001a4f78defSmrg# So we provide this file, which has a silly filename so it's always 9002a4f78defSmrg# included after everything else. This provides aclocal with the 9003a4f78defSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9004a4f78defSmrg# because those macros already exist, or will be overwritten later. 9005a4f78defSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9006a4f78defSmrg# 9007a4f78defSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9008a4f78defSmrg# Yes, that means every name once taken will need to remain here until 9009a4f78defSmrg# we give up compatibility with versions before 1.7, at which point 9010a4f78defSmrg# we need to keep only those names which we still refer to. 9011a4f78defSmrg 9012a4f78defSmrg# This is to help aclocal find these macros, as it can't see m4_define. 9013a4f78defSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9014a4f78defSmrg 9015a4f78defSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9016a4f78defSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9017a4f78defSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9018a4f78defSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9019a4f78defSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9020a4f78defSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9021a4f78defSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9022a4f78defSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9023a4f78defSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9024a4f78defSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9025a4f78defSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9026a4f78defSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9027a4f78defSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9028a4f78defSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9029a4f78defSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9030a4f78defSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9031a4f78defSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9032a4f78defSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9033a4f78defSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9034a4f78defSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9035a4f78defSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9036a4f78defSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9037a4f78defSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9038a4f78defSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9039a4f78defSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9040a4f78defSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9041a4f78defSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9042a4f78defSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9043a4f78defSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9044a4f78defSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9045a4f78defSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9046a4f78defSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9047a4f78defSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9048a4f78defSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9049a4f78defSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9050a4f78defSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9051a4f78defSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9052a4f78defSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9053a4f78defSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9054a4f78defSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9055a4f78defSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9056a4f78defSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9057a4f78defSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9058a4f78defSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9059a4f78defSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9060a4f78defSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9061a4f78defSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9062a4f78defSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9063a4f78defSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9064a4f78defSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9065a4f78defSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9066a4f78defSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9067a4f78defSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9068a4f78defSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9069a4f78defSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9070a4f78defSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9071a4f78defSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9072a4f78defSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9073a4f78defSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9074a4f78defSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9075a4f78defSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9076a4f78defSmrg 9077fb570538Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9078fb570538Smrg# serial 11 (pkg-config-0.29.1) 9079a4f78defSmrg 9080fb570538Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9081fb570538Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9082fb570538Smrgdnl 9083fb570538Smrgdnl This program is free software; you can redistribute it and/or modify 9084fb570538Smrgdnl it under the terms of the GNU General Public License as published by 9085fb570538Smrgdnl the Free Software Foundation; either version 2 of the License, or 9086fb570538Smrgdnl (at your option) any later version. 9087fb570538Smrgdnl 9088fb570538Smrgdnl This program is distributed in the hope that it will be useful, but 9089fb570538Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 9090fb570538Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9091fb570538Smrgdnl General Public License for more details. 9092fb570538Smrgdnl 9093fb570538Smrgdnl You should have received a copy of the GNU General Public License 9094fb570538Smrgdnl along with this program; if not, write to the Free Software 9095fb570538Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9096fb570538Smrgdnl 02111-1307, USA. 9097fb570538Smrgdnl 9098fb570538Smrgdnl As a special exception to the GNU General Public License, if you 9099fb570538Smrgdnl distribute this file as part of a program that contains a 9100fb570538Smrgdnl configuration script generated by Autoconf, you may include it under 9101fb570538Smrgdnl the same distribution terms that you use for the rest of that 9102fb570538Smrgdnl program. 9103fb570538Smrg 9104fb570538Smrgdnl PKG_PREREQ(MIN-VERSION) 9105fb570538Smrgdnl ----------------------- 9106fb570538Smrgdnl Since: 0.29 9107fb570538Smrgdnl 9108fb570538Smrgdnl Verify that the version of the pkg-config macros are at least 9109fb570538Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9110fb570538Smrgdnl installed version of pkg-config, this checks the developer's version 9111fb570538Smrgdnl of pkg.m4 when generating configure. 9112fb570538Smrgdnl 9113fb570538Smrgdnl To ensure that this macro is defined, also add: 9114fb570538Smrgdnl m4_ifndef([PKG_PREREQ], 9115fb570538Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9116fb570538Smrgdnl 9117fb570538Smrgdnl See the "Since" comment for each macro you use to see what version 9118fb570538Smrgdnl of the macros you require. 9119fb570538Smrgm4_defun([PKG_PREREQ], 9120fb570538Smrg[m4_define([PKG_MACROS_VERSION], [0.29.1]) 9121fb570538Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9122fb570538Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9123fb570538Smrg])dnl PKG_PREREQ 9124fb570538Smrg 9125fb570538Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9126fb570538Smrgdnl ---------------------------------- 9127fb570538Smrgdnl Since: 0.16 9128fb570538Smrgdnl 9129fb570538Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9130fb570538Smrgdnl first found in the path. Checks that the version of pkg-config found 9131fb570538Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9132fb570538Smrgdnl used since that's the first version where most current features of 9133fb570538Smrgdnl pkg-config existed. 9134a4f78defSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9135a4f78defSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9136a4f78defSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9137a4f78defSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9138a4f78defSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9139a4f78defSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9140a4f78defSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9141a4f78defSmrg 9142a4f78defSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9143a4f78defSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9144a4f78defSmrgfi 9145a4f78defSmrgif test -n "$PKG_CONFIG"; then 9146a4f78defSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 9147a4f78defSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9148a4f78defSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9149a4f78defSmrg AC_MSG_RESULT([yes]) 9150a4f78defSmrg else 9151a4f78defSmrg AC_MSG_RESULT([no]) 9152a4f78defSmrg PKG_CONFIG="" 9153a4f78defSmrg fi 9154a4f78defSmrgfi[]dnl 9155fb570538Smrg])dnl PKG_PROG_PKG_CONFIG 9156a4f78defSmrg 9157fb570538Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9158fb570538Smrgdnl ------------------------------------------------------------------- 9159fb570538Smrgdnl Since: 0.18 9160fb570538Smrgdnl 9161fb570538Smrgdnl Check to see whether a particular set of modules exists. Similar to 9162fb570538Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9163fb570538Smrgdnl 9164fb570538Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9165fb570538Smrgdnl only at the first occurence in configure.ac, so if the first place 9166fb570538Smrgdnl it's called might be skipped (such as if it is within an "if", you 9167fb570538Smrgdnl have to call PKG_CHECK_EXISTS manually 9168a4f78defSmrgAC_DEFUN([PKG_CHECK_EXISTS], 9169a4f78defSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9170a4f78defSmrgif test -n "$PKG_CONFIG" && \ 9171a4f78defSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9172a4f78defSmrg m4_default([$2], [:]) 9173a4f78defSmrgm4_ifvaln([$3], [else 9174a4f78defSmrg $3])dnl 9175a4f78defSmrgfi]) 9176a4f78defSmrg 9177fb570538Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9178fb570538Smrgdnl --------------------------------------------- 9179fb570538Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9180fb570538Smrgdnl pkg_failed based on the result. 9181a4f78defSmrgm4_define([_PKG_CONFIG], 9182a4f78defSmrg[if test -n "$$1"; then 9183a4f78defSmrg pkg_cv_[]$1="$$1" 9184a4f78defSmrg elif test -n "$PKG_CONFIG"; then 9185a4f78defSmrg PKG_CHECK_EXISTS([$3], 9186a4f78defSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9187a4f78defSmrg test "x$?" != "x0" && pkg_failed=yes ], 9188a4f78defSmrg [pkg_failed=yes]) 9189a4f78defSmrg else 9190a4f78defSmrg pkg_failed=untried 9191a4f78defSmrgfi[]dnl 9192fb570538Smrg])dnl _PKG_CONFIG 9193a4f78defSmrg 9194fb570538Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 9195fb570538Smrgdnl --------------------------- 9196fb570538Smrgdnl Internal check to see if pkg-config supports short errors. 9197a4f78defSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9198a4f78defSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9199a4f78defSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9200a4f78defSmrg _pkg_short_errors_supported=yes 9201a4f78defSmrgelse 9202a4f78defSmrg _pkg_short_errors_supported=no 9203a4f78defSmrgfi[]dnl 9204fb570538Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 9205a4f78defSmrg 9206a4f78defSmrg 9207fb570538Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9208fb570538Smrgdnl [ACTION-IF-NOT-FOUND]) 9209fb570538Smrgdnl -------------------------------------------------------------- 9210fb570538Smrgdnl Since: 0.4.0 9211fb570538Smrgdnl 9212fb570538Smrgdnl Note that if there is a possibility the first call to 9213fb570538Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9214fb570538Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9215a4f78defSmrgAC_DEFUN([PKG_CHECK_MODULES], 9216a4f78defSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9217a4f78defSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9218a4f78defSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9219a4f78defSmrg 9220a4f78defSmrgpkg_failed=no 9221a4f78defSmrgAC_MSG_CHECKING([for $1]) 9222a4f78defSmrg 9223a4f78defSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9224a4f78defSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9225a4f78defSmrg 9226a4f78defSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9227a4f78defSmrgand $1[]_LIBS to avoid the need to call pkg-config. 9228a4f78defSmrgSee the pkg-config man page for more details.]) 9229a4f78defSmrg 9230a4f78defSmrgif test $pkg_failed = yes; then 9231a4f78defSmrg AC_MSG_RESULT([no]) 9232a4f78defSmrg _PKG_SHORT_ERRORS_SUPPORTED 9233a4f78defSmrg if test $_pkg_short_errors_supported = yes; then 9234a4f78defSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9235a4f78defSmrg else 9236a4f78defSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9237a4f78defSmrg fi 9238a4f78defSmrg # Put the nasty error message in config.log where it belongs 9239a4f78defSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9240a4f78defSmrg 9241a4f78defSmrg m4_default([$4], [AC_MSG_ERROR( 9242a4f78defSmrg[Package requirements ($2) were not met: 9243a4f78defSmrg 9244a4f78defSmrg$$1_PKG_ERRORS 9245a4f78defSmrg 9246a4f78defSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9247a4f78defSmrginstalled software in a non-standard prefix. 9248a4f78defSmrg 9249a4f78defSmrg_PKG_TEXT])[]dnl 9250a4f78defSmrg ]) 9251a4f78defSmrgelif test $pkg_failed = untried; then 9252a4f78defSmrg AC_MSG_RESULT([no]) 9253a4f78defSmrg m4_default([$4], [AC_MSG_FAILURE( 9254a4f78defSmrg[The pkg-config script could not be found or is too old. Make sure it 9255a4f78defSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 9256a4f78defSmrgpath to pkg-config. 9257a4f78defSmrg 9258a4f78defSmrg_PKG_TEXT 9259a4f78defSmrg 9260a4f78defSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9261a4f78defSmrg ]) 9262a4f78defSmrgelse 9263a4f78defSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9264a4f78defSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9265a4f78defSmrg AC_MSG_RESULT([yes]) 9266a4f78defSmrg $3 9267a4f78defSmrgfi[]dnl 9268fb570538Smrg])dnl PKG_CHECK_MODULES 9269a4f78defSmrg 9270a4f78defSmrg 9271fb570538Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9272fb570538Smrgdnl [ACTION-IF-NOT-FOUND]) 9273fb570538Smrgdnl --------------------------------------------------------------------- 9274fb570538Smrgdnl Since: 0.29 9275fb570538Smrgdnl 9276fb570538Smrgdnl Checks for existence of MODULES and gathers its build flags with 9277fb570538Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9278fb570538Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 9279fb570538Smrgdnl 9280fb570538Smrgdnl Note that if there is a possibility the first call to 9281fb570538Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9282fb570538Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9283fb570538Smrgdnl configure.ac. 9284fb570538SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 9285fb570538Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9286fb570538Smrg_save_PKG_CONFIG=$PKG_CONFIG 9287fb570538SmrgPKG_CONFIG="$PKG_CONFIG --static" 9288fb570538SmrgPKG_CHECK_MODULES($@) 9289fb570538SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 9290fb570538Smrg])dnl PKG_CHECK_MODULES_STATIC 9291fb570538Smrg 9292fb570538Smrg 9293fb570538Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 9294fb570538Smrgdnl ------------------------- 9295fb570538Smrgdnl Since: 0.27 9296fb570538Smrgdnl 9297fb570538Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 9298fb570538Smrgdnl should install pkg-config .pc files. By default the directory is 9299fb570538Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 9300fb570538Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 9301fb570538Smrgdnl parameter. 9302a4f78defSmrgAC_DEFUN([PKG_INSTALLDIR], 9303a4f78defSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9304a4f78defSmrgm4_pushdef([pkg_description], 9305a4f78defSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 9306a4f78defSmrgAC_ARG_WITH([pkgconfigdir], 9307a4f78defSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9308a4f78defSmrg [with_pkgconfigdir=]pkg_default) 9309a4f78defSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9310a4f78defSmrgm4_popdef([pkg_default]) 9311a4f78defSmrgm4_popdef([pkg_description]) 9312fb570538Smrg])dnl PKG_INSTALLDIR 9313a4f78defSmrg 9314a4f78defSmrg 9315fb570538Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9316fb570538Smrgdnl -------------------------------- 9317fb570538Smrgdnl Since: 0.27 9318fb570538Smrgdnl 9319fb570538Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 9320fb570538Smrgdnl module should install arch-independent pkg-config .pc files. By 9321fb570538Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 9322fb570538Smrgdnl changed by passing DIRECTORY. The user can override through the 9323fb570538Smrgdnl --with-noarch-pkgconfigdir parameter. 9324a4f78defSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 9325a4f78defSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9326a4f78defSmrgm4_pushdef([pkg_description], 9327a4f78defSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9328a4f78defSmrgAC_ARG_WITH([noarch-pkgconfigdir], 9329a4f78defSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9330a4f78defSmrg [with_noarch_pkgconfigdir=]pkg_default) 9331a4f78defSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9332a4f78defSmrgm4_popdef([pkg_default]) 9333a4f78defSmrgm4_popdef([pkg_description]) 9334fb570538Smrg])dnl PKG_NOARCH_INSTALLDIR 9335a4f78defSmrg 9336a4f78defSmrg 9337fb570538Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9338fb570538Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9339fb570538Smrgdnl ------------------------------------------- 9340fb570538Smrgdnl Since: 0.28 9341fb570538Smrgdnl 9342fb570538Smrgdnl Retrieves the value of the pkg-config variable for the given module. 9343a4f78defSmrgAC_DEFUN([PKG_CHECK_VAR], 9344a4f78defSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9345a4f78defSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9346a4f78defSmrg 9347a4f78defSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9348a4f78defSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 9349a4f78defSmrg 9350a4f78defSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 9351fb570538Smrg])dnl PKG_CHECK_VAR 9352fb570538Smrg 9353fb570538Smrgdnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9354fb570538Smrgdnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 9355fb570538Smrgdnl [DESCRIPTION], [DEFAULT]) 9356fb570538Smrgdnl ------------------------------------------ 9357fb570538Smrgdnl 9358fb570538Smrgdnl Prepare a "--with-" configure option using the lowercase 9359fb570538Smrgdnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 9360fb570538Smrgdnl PKG_CHECK_MODULES in a single macro. 9361fb570538SmrgAC_DEFUN([PKG_WITH_MODULES], 9362fb570538Smrg[ 9363fb570538Smrgm4_pushdef([with_arg], m4_tolower([$1])) 9364fb570538Smrg 9365fb570538Smrgm4_pushdef([description], 9366fb570538Smrg [m4_default([$5], [build with ]with_arg[ support])]) 9367fb570538Smrg 9368fb570538Smrgm4_pushdef([def_arg], [m4_default([$6], [auto])]) 9369fb570538Smrgm4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 9370fb570538Smrgm4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 9371fb570538Smrg 9372fb570538Smrgm4_case(def_arg, 9373fb570538Smrg [yes],[m4_pushdef([with_without], [--without-]with_arg)], 9374fb570538Smrg [m4_pushdef([with_without],[--with-]with_arg)]) 9375fb570538Smrg 9376fb570538SmrgAC_ARG_WITH(with_arg, 9377fb570538Smrg AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 9378fb570538Smrg [AS_TR_SH([with_]with_arg)=def_arg]) 9379fb570538Smrg 9380fb570538SmrgAS_CASE([$AS_TR_SH([with_]with_arg)], 9381fb570538Smrg [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 9382fb570538Smrg [auto],[PKG_CHECK_MODULES([$1],[$2], 9383fb570538Smrg [m4_n([def_action_if_found]) $3], 9384fb570538Smrg [m4_n([def_action_if_not_found]) $4])]) 9385a4f78defSmrg 9386fb570538Smrgm4_popdef([with_arg]) 9387fb570538Smrgm4_popdef([description]) 9388fb570538Smrgm4_popdef([def_arg]) 9389fb570538Smrg 9390fb570538Smrg])dnl PKG_WITH_MODULES 9391fb570538Smrg 9392fb570538Smrgdnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9393fb570538Smrgdnl [DESCRIPTION], [DEFAULT]) 9394fb570538Smrgdnl ----------------------------------------------- 9395fb570538Smrgdnl 9396fb570538Smrgdnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 9397fb570538Smrgdnl check._[VARIABLE-PREFIX] is exported as make variable. 9398fb570538SmrgAC_DEFUN([PKG_HAVE_WITH_MODULES], 9399fb570538Smrg[ 9400fb570538SmrgPKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 9401fb570538Smrg 9402fb570538SmrgAM_CONDITIONAL([HAVE_][$1], 9403fb570538Smrg [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 9404fb570538Smrg])dnl PKG_HAVE_WITH_MODULES 9405fb570538Smrg 9406fb570538Smrgdnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 9407fb570538Smrgdnl [DESCRIPTION], [DEFAULT]) 9408fb570538Smrgdnl ------------------------------------------------------ 9409fb570538Smrgdnl 9410fb570538Smrgdnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 9411fb570538Smrgdnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 9412fb570538Smrgdnl and preprocessor variable. 9413fb570538SmrgAC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 9414fb570538Smrg[ 9415fb570538SmrgPKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 9416fb570538Smrg 9417fb570538SmrgAS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 9418fb570538Smrg [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 9419fb570538Smrg])dnl PKG_HAVE_DEFINE_WITH_MODULES 9420fb570538Smrg 9421fb570538Smrg# Copyright (C) 2002-2018 Free Software Foundation, Inc. 9422a4f78defSmrg# 9423a4f78defSmrg# This file is free software; the Free Software Foundation 9424a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 9425a4f78defSmrg# with or without modifications, as long as this notice is preserved. 9426a4f78defSmrg 9427a4f78defSmrg# AM_AUTOMAKE_VERSION(VERSION) 9428a4f78defSmrg# ---------------------------- 9429a4f78defSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 9430a4f78defSmrg# generated from the m4 files accompanying Automake X.Y. 9431a4f78defSmrg# (This private macro should not be called outside this file.) 9432a4f78defSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 9433fb570538Smrg[am__api_version='1.16' 9434a4f78defSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 9435a4f78defSmrgdnl require some minimum version. Point them to the right macro. 9436fb570538Smrgm4_if([$1], [1.16.1], [], 9437a4f78defSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 9438a4f78defSmrg]) 9439a4f78defSmrg 9440a4f78defSmrg# _AM_AUTOCONF_VERSION(VERSION) 9441a4f78defSmrg# ----------------------------- 9442a4f78defSmrg# aclocal traces this macro to find the Autoconf version. 9443a4f78defSmrg# This is a private macro too. Using m4_define simplifies 9444a4f78defSmrg# the logic in aclocal, which can simply ignore this definition. 9445a4f78defSmrgm4_define([_AM_AUTOCONF_VERSION], []) 9446a4f78defSmrg 9447a4f78defSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 9448a4f78defSmrg# ------------------------------- 9449a4f78defSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 9450a4f78defSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 9451a4f78defSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 9452fb570538Smrg[AM_AUTOMAKE_VERSION([1.16.1])dnl 9453a4f78defSmrgm4_ifndef([AC_AUTOCONF_VERSION], 9454a4f78defSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 9455a4f78defSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 9456a4f78defSmrg 9457a4f78defSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 9458a4f78defSmrg 9459fb570538Smrg# Copyright (C) 2001-2018 Free Software Foundation, Inc. 9460a4f78defSmrg# 9461a4f78defSmrg# This file is free software; the Free Software Foundation 9462a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 9463a4f78defSmrg# with or without modifications, as long as this notice is preserved. 9464a4f78defSmrg 9465a4f78defSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 9466a4f78defSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 9467a4f78defSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 9468a4f78defSmrg# 9469a4f78defSmrg# Of course, Automake must honor this variable whenever it calls a 9470a4f78defSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 9471a4f78defSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 9472a4f78defSmrg# depending on how configure is run. This is pretty annoying, since 9473a4f78defSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 9474a4f78defSmrg# source directory, any form will work fine, but in subdirectories a 9475a4f78defSmrg# relative path needs to be adjusted first. 9476a4f78defSmrg# 9477a4f78defSmrg# $ac_aux_dir/missing 9478a4f78defSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 9479a4f78defSmrg# $top_srcdir/$ac_aux_dir/missing 9480a4f78defSmrg# fails if $ac_aux_dir is absolute, 9481a4f78defSmrg# fails when called from a subdirectory in a VPATH build with 9482a4f78defSmrg# a relative $ac_aux_dir 9483a4f78defSmrg# 9484a4f78defSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 9485a4f78defSmrg# are both prefixed by $srcdir. In an in-source build this is usually 9486a4f78defSmrg# harmless because $srcdir is '.', but things will broke when you 9487a4f78defSmrg# start a VPATH build or use an absolute $srcdir. 9488a4f78defSmrg# 9489a4f78defSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9490a4f78defSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9491a4f78defSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9492a4f78defSmrg# and then we would define $MISSING as 9493a4f78defSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 9494a4f78defSmrg# This will work as long as MISSING is not called from configure, because 9495a4f78defSmrg# unfortunately $(top_srcdir) has no meaning in configure. 9496a4f78defSmrg# However there are other variables, like CC, which are often used in 9497a4f78defSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 9498a4f78defSmrg# 9499a4f78defSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 9500a4f78defSmrg# absolute PATH. The drawback is that using absolute paths prevent a 9501a4f78defSmrg# configured tree to be moved without reconfiguration. 9502a4f78defSmrg 9503a4f78defSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 9504a4f78defSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 9505a4f78defSmrg# Expand $ac_aux_dir to an absolute path. 9506a4f78defSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 9507a4f78defSmrg]) 9508a4f78defSmrg 9509a4f78defSmrg# AM_CONDITIONAL -*- Autoconf -*- 9510a4f78defSmrg 9511fb570538Smrg# Copyright (C) 1997-2018 Free Software Foundation, Inc. 9512a4f78defSmrg# 9513a4f78defSmrg# This file is free software; the Free Software Foundation 9514a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 9515a4f78defSmrg# with or without modifications, as long as this notice is preserved. 9516a4f78defSmrg 9517a4f78defSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 9518a4f78defSmrg# ------------------------------------- 9519a4f78defSmrg# Define a conditional. 9520a4f78defSmrgAC_DEFUN([AM_CONDITIONAL], 9521a4f78defSmrg[AC_PREREQ([2.52])dnl 9522a4f78defSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 9523a4f78defSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 9524a4f78defSmrgAC_SUBST([$1_TRUE])dnl 9525a4f78defSmrgAC_SUBST([$1_FALSE])dnl 9526a4f78defSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 9527a4f78defSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 9528a4f78defSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 9529a4f78defSmrgif $2; then 9530a4f78defSmrg $1_TRUE= 9531a4f78defSmrg $1_FALSE='#' 9532a4f78defSmrgelse 9533a4f78defSmrg $1_TRUE='#' 9534a4f78defSmrg $1_FALSE= 9535a4f78defSmrgfi 9536a4f78defSmrgAC_CONFIG_COMMANDS_PRE( 9537a4f78defSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 9538a4f78defSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 9539a4f78defSmrgUsually this means the macro was only invoked conditionally.]]) 9540a4f78defSmrgfi])]) 9541a4f78defSmrg 9542fb570538Smrg# Copyright (C) 1999-2018 Free Software Foundation, Inc. 9543a4f78defSmrg# 9544a4f78defSmrg# This file is free software; the Free Software Foundation 9545a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 9546a4f78defSmrg# with or without modifications, as long as this notice is preserved. 9547a4f78defSmrg 9548a4f78defSmrg 9549a4f78defSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 9550a4f78defSmrg# written in clear, in which case automake, when reading aclocal.m4, 9551a4f78defSmrg# will think it sees a *use*, and therefore will trigger all it's 9552a4f78defSmrg# C support machinery. Also note that it means that autoscan, seeing 9553a4f78defSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 9554a4f78defSmrg 9555a4f78defSmrg 9556a4f78defSmrg# _AM_DEPENDENCIES(NAME) 9557a4f78defSmrg# ---------------------- 9558a4f78defSmrg# See how the compiler implements dependency checking. 9559a4f78defSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 9560a4f78defSmrg# We try a few techniques and use that to set a single cache variable. 9561a4f78defSmrg# 9562a4f78defSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 9563a4f78defSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 9564a4f78defSmrg# dependency, and given that the user is not expected to run this macro, 9565a4f78defSmrg# just rely on AC_PROG_CC. 9566a4f78defSmrgAC_DEFUN([_AM_DEPENDENCIES], 9567a4f78defSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 9568a4f78defSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 9569a4f78defSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 9570a4f78defSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 9571a4f78defSmrg 9572a4f78defSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 9573a4f78defSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 9574a4f78defSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 9575a4f78defSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 9576a4f78defSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 9577a4f78defSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 9578a4f78defSmrg [depcc="$$1" am_compiler_list=]) 9579a4f78defSmrg 9580a4f78defSmrgAC_CACHE_CHECK([dependency style of $depcc], 9581a4f78defSmrg [am_cv_$1_dependencies_compiler_type], 9582a4f78defSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 9583a4f78defSmrg # We make a subdir and do the tests there. Otherwise we can end up 9584a4f78defSmrg # making bogus files that we don't know about and never remove. For 9585a4f78defSmrg # instance it was reported that on HP-UX the gcc test will end up 9586a4f78defSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 9587a4f78defSmrg # in D". 9588a4f78defSmrg rm -rf conftest.dir 9589a4f78defSmrg mkdir conftest.dir 9590a4f78defSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 9591a4f78defSmrg # using a relative directory. 9592a4f78defSmrg cp "$am_depcomp" conftest.dir 9593a4f78defSmrg cd conftest.dir 9594a4f78defSmrg # We will build objects and dependencies in a subdirectory because 9595a4f78defSmrg # it helps to detect inapplicable dependency modes. For instance 9596a4f78defSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 9597a4f78defSmrg # side effect of compilation, but ICC will put the dependencies in 9598a4f78defSmrg # the current directory while Tru64 will put them in the object 9599a4f78defSmrg # directory. 9600a4f78defSmrg mkdir sub 9601a4f78defSmrg 9602a4f78defSmrg am_cv_$1_dependencies_compiler_type=none 9603a4f78defSmrg if test "$am_compiler_list" = ""; then 9604a4f78defSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 9605a4f78defSmrg fi 9606a4f78defSmrg am__universal=false 9607a4f78defSmrg m4_case([$1], [CC], 9608a4f78defSmrg [case " $depcc " in #( 9609a4f78defSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 9610a4f78defSmrg esac], 9611a4f78defSmrg [CXX], 9612a4f78defSmrg [case " $depcc " in #( 9613a4f78defSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 9614a4f78defSmrg esac]) 9615a4f78defSmrg 9616a4f78defSmrg for depmode in $am_compiler_list; do 9617a4f78defSmrg # Setup a source with many dependencies, because some compilers 9618a4f78defSmrg # like to wrap large dependency lists on column 80 (with \), and 9619a4f78defSmrg # we should not choose a depcomp mode which is confused by this. 9620a4f78defSmrg # 9621a4f78defSmrg # We need to recreate these files for each test, as the compiler may 9622a4f78defSmrg # overwrite some of them when testing with obscure command lines. 9623a4f78defSmrg # This happens at least with the AIX C compiler. 9624a4f78defSmrg : > sub/conftest.c 9625a4f78defSmrg for i in 1 2 3 4 5 6; do 9626a4f78defSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 9627a4f78defSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 9628a4f78defSmrg # Solaris 10 /bin/sh. 9629a4f78defSmrg echo '/* dummy */' > sub/conftst$i.h 9630a4f78defSmrg done 9631a4f78defSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 9632a4f78defSmrg 9633a4f78defSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 9634a4f78defSmrg # mode. It turns out that the SunPro C++ compiler does not properly 9635a4f78defSmrg # handle '-M -o', and we need to detect this. Also, some Intel 9636a4f78defSmrg # versions had trouble with output in subdirs. 9637a4f78defSmrg am__obj=sub/conftest.${OBJEXT-o} 9638a4f78defSmrg am__minus_obj="-o $am__obj" 9639a4f78defSmrg case $depmode in 9640a4f78defSmrg gcc) 9641a4f78defSmrg # This depmode causes a compiler race in universal mode. 9642a4f78defSmrg test "$am__universal" = false || continue 9643a4f78defSmrg ;; 9644a4f78defSmrg nosideeffect) 9645a4f78defSmrg # After this tag, mechanisms are not by side-effect, so they'll 9646a4f78defSmrg # only be used when explicitly requested. 9647a4f78defSmrg if test "x$enable_dependency_tracking" = xyes; then 9648a4f78defSmrg continue 9649a4f78defSmrg else 9650a4f78defSmrg break 9651a4f78defSmrg fi 9652a4f78defSmrg ;; 9653a4f78defSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 9654a4f78defSmrg # This compiler won't grok '-c -o', but also, the minuso test has 9655a4f78defSmrg # not run yet. These depmodes are late enough in the game, and 9656a4f78defSmrg # so weak that their functioning should not be impacted. 9657a4f78defSmrg am__obj=conftest.${OBJEXT-o} 9658a4f78defSmrg am__minus_obj= 9659a4f78defSmrg ;; 9660a4f78defSmrg none) break ;; 9661a4f78defSmrg esac 9662a4f78defSmrg if depmode=$depmode \ 9663a4f78defSmrg source=sub/conftest.c object=$am__obj \ 9664a4f78defSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 9665a4f78defSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 9666a4f78defSmrg >/dev/null 2>conftest.err && 9667a4f78defSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 9668a4f78defSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 9669a4f78defSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 9670a4f78defSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 9671a4f78defSmrg # icc doesn't choke on unknown options, it will just issue warnings 9672a4f78defSmrg # or remarks (even with -Werror). So we grep stderr for any message 9673a4f78defSmrg # that says an option was ignored or not supported. 9674a4f78defSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 9675a4f78defSmrg # icc: Command line warning: ignoring option '-M'; no argument required 9676a4f78defSmrg # The diagnosis changed in icc 8.0: 9677a4f78defSmrg # icc: Command line remark: option '-MP' not supported 9678a4f78defSmrg if (grep 'ignoring option' conftest.err || 9679a4f78defSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 9680a4f78defSmrg am_cv_$1_dependencies_compiler_type=$depmode 9681a4f78defSmrg break 9682a4f78defSmrg fi 9683a4f78defSmrg fi 9684a4f78defSmrg done 9685a4f78defSmrg 9686a4f78defSmrg cd .. 9687a4f78defSmrg rm -rf conftest.dir 9688a4f78defSmrgelse 9689a4f78defSmrg am_cv_$1_dependencies_compiler_type=none 9690a4f78defSmrgfi 9691a4f78defSmrg]) 9692a4f78defSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 9693a4f78defSmrgAM_CONDITIONAL([am__fastdep$1], [ 9694a4f78defSmrg test "x$enable_dependency_tracking" != xno \ 9695a4f78defSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 9696a4f78defSmrg]) 9697a4f78defSmrg 9698a4f78defSmrg 9699a4f78defSmrg# AM_SET_DEPDIR 9700a4f78defSmrg# ------------- 9701a4f78defSmrg# Choose a directory name for dependency files. 9702a4f78defSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 9703a4f78defSmrgAC_DEFUN([AM_SET_DEPDIR], 9704a4f78defSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 9705a4f78defSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 9706a4f78defSmrg]) 9707a4f78defSmrg 9708a4f78defSmrg 9709a4f78defSmrg# AM_DEP_TRACK 9710a4f78defSmrg# ------------ 9711a4f78defSmrgAC_DEFUN([AM_DEP_TRACK], 9712a4f78defSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 9713a4f78defSmrgAS_HELP_STRING( 9714a4f78defSmrg [--enable-dependency-tracking], 9715a4f78defSmrg [do not reject slow dependency extractors]) 9716a4f78defSmrgAS_HELP_STRING( 9717a4f78defSmrg [--disable-dependency-tracking], 9718a4f78defSmrg [speeds up one-time build])]) 9719a4f78defSmrgif test "x$enable_dependency_tracking" != xno; then 9720a4f78defSmrg am_depcomp="$ac_aux_dir/depcomp" 9721a4f78defSmrg AMDEPBACKSLASH='\' 9722a4f78defSmrg am__nodep='_no' 9723a4f78defSmrgfi 9724a4f78defSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 9725a4f78defSmrgAC_SUBST([AMDEPBACKSLASH])dnl 9726a4f78defSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 9727a4f78defSmrgAC_SUBST([am__nodep])dnl 9728a4f78defSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 9729a4f78defSmrg]) 9730a4f78defSmrg 9731a4f78defSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 9732a4f78defSmrg 9733fb570538Smrg# Copyright (C) 1999-2018 Free Software Foundation, Inc. 9734a4f78defSmrg# 9735a4f78defSmrg# This file is free software; the Free Software Foundation 9736a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 9737a4f78defSmrg# with or without modifications, as long as this notice is preserved. 9738a4f78defSmrg 9739a4f78defSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 9740a4f78defSmrg# ------------------------------ 9741a4f78defSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 9742a4f78defSmrg[{ 9743a4f78defSmrg # Older Autoconf quotes --file arguments for eval, but not when files 9744a4f78defSmrg # are listed without --file. Let's play safe and only enable the eval 9745a4f78defSmrg # if we detect the quoting. 9746fb570538Smrg # TODO: see whether this extra hack can be removed once we start 9747fb570538Smrg # requiring Autoconf 2.70 or later. 9748fb570538Smrg AS_CASE([$CONFIG_FILES], 9749fb570538Smrg [*\'*], [eval set x "$CONFIG_FILES"], 9750fb570538Smrg [*], [set x $CONFIG_FILES]) 9751a4f78defSmrg shift 9752fb570538Smrg # Used to flag and report bootstrapping failures. 9753fb570538Smrg am_rc=0 9754fb570538Smrg for am_mf 9755a4f78defSmrg do 9756a4f78defSmrg # Strip MF so we end up with the name of the file. 9757fb570538Smrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 9758fb570538Smrg # Check whether this is an Automake generated Makefile which includes 9759fb570538Smrg # dependency-tracking related rules and includes. 9760fb570538Smrg # Grep'ing the whole file directly is not great: AIX grep has a line 9761a4f78defSmrg # limit of 2048, but all sed's we know have understand at least 4000. 9762fb570538Smrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 9763fb570538Smrg || continue 9764fb570538Smrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 9765fb570538Smrg am_filepart=`AS_BASENAME(["$am_mf"])` 9766fb570538Smrg AM_RUN_LOG([cd "$am_dirpart" \ 9767fb570538Smrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 9768fb570538Smrg | $MAKE -f - am--depfiles]) || am_rc=$? 9769a4f78defSmrg done 9770fb570538Smrg if test $am_rc -ne 0; then 9771fb570538Smrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 9772fb570538Smrg for automatic dependency tracking. Try re-running configure with the 9773fb570538Smrg '--disable-dependency-tracking' option to at least be able to build 9774fb570538Smrg the package (albeit without support for automatic dependency tracking).]) 9775fb570538Smrg fi 9776fb570538Smrg AS_UNSET([am_dirpart]) 9777fb570538Smrg AS_UNSET([am_filepart]) 9778fb570538Smrg AS_UNSET([am_mf]) 9779fb570538Smrg AS_UNSET([am_rc]) 9780fb570538Smrg rm -f conftest-deps.mk 9781a4f78defSmrg} 9782a4f78defSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 9783a4f78defSmrg 9784a4f78defSmrg 9785a4f78defSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 9786a4f78defSmrg# ----------------------------- 9787a4f78defSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 9788a4f78defSmrg# 9789fb570538Smrg# This code is only required when automatic dependency tracking is enabled. 9790fb570538Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 9791fb570538Smrg# order to bootstrap the dependency handling code. 9792a4f78defSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 9793a4f78defSmrg[AC_CONFIG_COMMANDS([depfiles], 9794a4f78defSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 9795fb570538Smrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 9796a4f78defSmrg 9797a4f78defSmrg# Do all the work for Automake. -*- Autoconf -*- 9798a4f78defSmrg 9799fb570538Smrg# Copyright (C) 1996-2018 Free Software Foundation, Inc. 9800a4f78defSmrg# 9801a4f78defSmrg# This file is free software; the Free Software Foundation 9802a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 9803a4f78defSmrg# with or without modifications, as long as this notice is preserved. 9804a4f78defSmrg 9805a4f78defSmrg# This macro actually does too much. Some checks are only needed if 9806a4f78defSmrg# your package does certain things. But this isn't really a big deal. 9807a4f78defSmrg 9808a4f78defSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 9809a4f78defSmrgm4_define([AC_PROG_CC], 9810a4f78defSmrgm4_defn([AC_PROG_CC]) 9811a4f78defSmrg[_AM_PROG_CC_C_O 9812a4f78defSmrg]) 9813a4f78defSmrg 9814a4f78defSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 9815a4f78defSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 9816a4f78defSmrg# ----------------------------------------------- 9817a4f78defSmrg# The call with PACKAGE and VERSION arguments is the old style 9818a4f78defSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 9819a4f78defSmrg# and VERSION should now be passed to AC_INIT and removed from 9820a4f78defSmrg# the call to AM_INIT_AUTOMAKE. 9821a4f78defSmrg# We support both call styles for the transition. After 9822a4f78defSmrg# the next Automake release, Autoconf can make the AC_INIT 9823a4f78defSmrg# arguments mandatory, and then we can depend on a new Autoconf 9824a4f78defSmrg# release and drop the old call support. 9825a4f78defSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 9826a4f78defSmrg[AC_PREREQ([2.65])dnl 9827a4f78defSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 9828a4f78defSmrgdnl the ones we care about. 9829a4f78defSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 9830a4f78defSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 9831a4f78defSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 9832a4f78defSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 9833a4f78defSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 9834a4f78defSmrg # is not polluted with repeated "-I." 9835a4f78defSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 9836a4f78defSmrg # test to see if srcdir already configured 9837a4f78defSmrg if test -f $srcdir/config.status; then 9838a4f78defSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 9839a4f78defSmrg fi 9840a4f78defSmrgfi 9841a4f78defSmrg 9842a4f78defSmrg# test whether we have cygpath 9843a4f78defSmrgif test -z "$CYGPATH_W"; then 9844a4f78defSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 9845a4f78defSmrg CYGPATH_W='cygpath -w' 9846a4f78defSmrg else 9847a4f78defSmrg CYGPATH_W=echo 9848a4f78defSmrg fi 9849a4f78defSmrgfi 9850a4f78defSmrgAC_SUBST([CYGPATH_W]) 9851a4f78defSmrg 9852a4f78defSmrg# Define the identity of the package. 9853a4f78defSmrgdnl Distinguish between old-style and new-style calls. 9854a4f78defSmrgm4_ifval([$2], 9855a4f78defSmrg[AC_DIAGNOSE([obsolete], 9856a4f78defSmrg [$0: two- and three-arguments forms are deprecated.]) 9857a4f78defSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 9858a4f78defSmrg AC_SUBST([PACKAGE], [$1])dnl 9859a4f78defSmrg AC_SUBST([VERSION], [$2])], 9860a4f78defSmrg[_AM_SET_OPTIONS([$1])dnl 9861a4f78defSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 9862a4f78defSmrgm4_if( 9863a4f78defSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 9864a4f78defSmrg [ok:ok],, 9865a4f78defSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 9866a4f78defSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 9867a4f78defSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 9868a4f78defSmrg 9869a4f78defSmrg_AM_IF_OPTION([no-define],, 9870a4f78defSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 9871a4f78defSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 9872a4f78defSmrg 9873a4f78defSmrg# Some tools Automake needs. 9874a4f78defSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 9875a4f78defSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 9876a4f78defSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 9877a4f78defSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 9878a4f78defSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 9879a4f78defSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 9880a4f78defSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 9881a4f78defSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9882a4f78defSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 9883a4f78defSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 9884a4f78defSmrg# For better backward compatibility. To be removed once Automake 1.9.x 9885a4f78defSmrg# dies out for good. For more background, see: 9886fb570538Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 9887fb570538Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 9888a4f78defSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 9889a4f78defSmrg# We need awk for the "check" target (and possibly the TAP driver). The 9890a4f78defSmrg# system "awk" is bad on some platforms. 9891a4f78defSmrgAC_REQUIRE([AC_PROG_AWK])dnl 9892a4f78defSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 9893a4f78defSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 9894a4f78defSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 9895a4f78defSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 9896a4f78defSmrg [_AM_PROG_TAR([v7])])]) 9897a4f78defSmrg_AM_IF_OPTION([no-dependencies],, 9898a4f78defSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 9899a4f78defSmrg [_AM_DEPENDENCIES([CC])], 9900a4f78defSmrg [m4_define([AC_PROG_CC], 9901a4f78defSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 9902a4f78defSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 9903a4f78defSmrg [_AM_DEPENDENCIES([CXX])], 9904a4f78defSmrg [m4_define([AC_PROG_CXX], 9905a4f78defSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 9906a4f78defSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 9907a4f78defSmrg [_AM_DEPENDENCIES([OBJC])], 9908a4f78defSmrg [m4_define([AC_PROG_OBJC], 9909a4f78defSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 9910a4f78defSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 9911a4f78defSmrg [_AM_DEPENDENCIES([OBJCXX])], 9912a4f78defSmrg [m4_define([AC_PROG_OBJCXX], 9913a4f78defSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 9914a4f78defSmrg]) 9915a4f78defSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 9916a4f78defSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 9917a4f78defSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 9918a4f78defSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 9919a4f78defSmrgAC_CONFIG_COMMANDS_PRE(dnl 9920a4f78defSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 9921a4f78defSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 9922a4f78defSmrg 9923a4f78defSmrg# POSIX will say in a future version that running "rm -f" with no argument 9924a4f78defSmrg# is OK; and we want to be able to make that assumption in our Makefile 9925a4f78defSmrg# recipes. So use an aggressive probe to check that the usage we want is 9926a4f78defSmrg# actually supported "in the wild" to an acceptable degree. 9927a4f78defSmrg# See automake bug#10828. 9928a4f78defSmrg# To make any issue more visible, cause the running configure to be aborted 9929a4f78defSmrg# by default if the 'rm' program in use doesn't match our expectations; the 9930a4f78defSmrg# user can still override this though. 9931a4f78defSmrgif rm -f && rm -fr && rm -rf; then : OK; else 9932a4f78defSmrg cat >&2 <<'END' 9933a4f78defSmrgOops! 9934a4f78defSmrg 9935a4f78defSmrgYour 'rm' program seems unable to run without file operands specified 9936a4f78defSmrgon the command line, even when the '-f' option is present. This is contrary 9937a4f78defSmrgto the behaviour of most rm programs out there, and not conforming with 9938a4f78defSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 9939a4f78defSmrg 9940a4f78defSmrgPlease tell bug-automake@gnu.org about your system, including the value 9941a4f78defSmrgof your $PATH and any error possibly output before this message. This 9942a4f78defSmrgcan help us improve future automake versions. 9943a4f78defSmrg 9944a4f78defSmrgEND 9945a4f78defSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 9946a4f78defSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 9947a4f78defSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 9948a4f78defSmrg echo >&2 9949a4f78defSmrg else 9950a4f78defSmrg cat >&2 <<'END' 9951a4f78defSmrgAborting the configuration process, to ensure you take notice of the issue. 9952a4f78defSmrg 9953a4f78defSmrgYou can download and install GNU coreutils to get an 'rm' implementation 9954fb570538Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 9955a4f78defSmrg 9956a4f78defSmrgIf you want to complete the configuration process using your problematic 9957a4f78defSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 9958a4f78defSmrgto "yes", and re-run configure. 9959a4f78defSmrg 9960a4f78defSmrgEND 9961a4f78defSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 9962a4f78defSmrg fi 9963a4f78defSmrgfi 9964a4f78defSmrgdnl The trailing newline in this macro's definition is deliberate, for 9965a4f78defSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 9966a4f78defSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 9967a4f78defSmrg]) 9968a4f78defSmrg 9969a4f78defSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 9970a4f78defSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 9971a4f78defSmrgdnl mangled by Autoconf and run in a shell conditional statement. 9972a4f78defSmrgm4_define([_AC_COMPILER_EXEEXT], 9973a4f78defSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 9974a4f78defSmrg 9975a4f78defSmrg# When config.status generates a header, we must update the stamp-h file. 9976a4f78defSmrg# This file resides in the same directory as the config header 9977a4f78defSmrg# that is generated. The stamp files are numbered to have different names. 9978a4f78defSmrg 9979a4f78defSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 9980a4f78defSmrg# loop where config.status creates the headers, so we can generate 9981a4f78defSmrg# our stamp files there. 9982a4f78defSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 9983a4f78defSmrg[# Compute $1's index in $config_headers. 9984a4f78defSmrg_am_arg=$1 9985a4f78defSmrg_am_stamp_count=1 9986a4f78defSmrgfor _am_header in $config_headers :; do 9987a4f78defSmrg case $_am_header in 9988a4f78defSmrg $_am_arg | $_am_arg:* ) 9989a4f78defSmrg break ;; 9990a4f78defSmrg * ) 9991a4f78defSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 9992a4f78defSmrg esac 9993a4f78defSmrgdone 9994a4f78defSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 9995a4f78defSmrg 9996fb570538Smrg# Copyright (C) 2001-2018 Free Software Foundation, Inc. 9997a4f78defSmrg# 9998a4f78defSmrg# This file is free software; the Free Software Foundation 9999a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 10000a4f78defSmrg# with or without modifications, as long as this notice is preserved. 10001a4f78defSmrg 10002a4f78defSmrg# AM_PROG_INSTALL_SH 10003a4f78defSmrg# ------------------ 10004a4f78defSmrg# Define $install_sh. 10005a4f78defSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 10006a4f78defSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 10007a4f78defSmrgif test x"${install_sh+set}" != xset; then 10008a4f78defSmrg case $am_aux_dir in 10009a4f78defSmrg *\ * | *\ *) 10010a4f78defSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 10011a4f78defSmrg *) 10012a4f78defSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 10013a4f78defSmrg esac 10014a4f78defSmrgfi 10015a4f78defSmrgAC_SUBST([install_sh])]) 10016a4f78defSmrg 10017fb570538Smrg# Copyright (C) 2003-2018 Free Software Foundation, Inc. 10018a4f78defSmrg# 10019a4f78defSmrg# This file is free software; the Free Software Foundation 10020a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 10021a4f78defSmrg# with or without modifications, as long as this notice is preserved. 10022a4f78defSmrg 10023a4f78defSmrg# Check whether the underlying file-system supports filenames 10024a4f78defSmrg# with a leading dot. For instance MS-DOS doesn't. 10025a4f78defSmrgAC_DEFUN([AM_SET_LEADING_DOT], 10026a4f78defSmrg[rm -rf .tst 2>/dev/null 10027a4f78defSmrgmkdir .tst 2>/dev/null 10028a4f78defSmrgif test -d .tst; then 10029a4f78defSmrg am__leading_dot=. 10030a4f78defSmrgelse 10031a4f78defSmrg am__leading_dot=_ 10032a4f78defSmrgfi 10033a4f78defSmrgrmdir .tst 2>/dev/null 10034a4f78defSmrgAC_SUBST([am__leading_dot])]) 10035a4f78defSmrg 10036a4f78defSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 10037a4f78defSmrg 10038fb570538Smrg# Copyright (C) 2001-2018 Free Software Foundation, Inc. 10039a4f78defSmrg# 10040a4f78defSmrg# This file is free software; the Free Software Foundation 10041a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 10042a4f78defSmrg# with or without modifications, as long as this notice is preserved. 10043a4f78defSmrg 10044a4f78defSmrg# AM_MAKE_INCLUDE() 10045a4f78defSmrg# ----------------- 10046fb570538Smrg# Check whether make has an 'include' directive that can support all 10047fb570538Smrg# the idioms we need for our automatic dependency tracking code. 10048a4f78defSmrgAC_DEFUN([AM_MAKE_INCLUDE], 10049fb570538Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 10050fb570538Smrgcat > confinc.mk << 'END' 10051a4f78defSmrgam__doit: 10052fb570538Smrg @echo this is the am__doit target >confinc.out 10053a4f78defSmrg.PHONY: am__doit 10054a4f78defSmrgEND 10055a4f78defSmrgam__include="#" 10056a4f78defSmrgam__quote= 10057fb570538Smrg# BSD make does it like this. 10058fb570538Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD 10059fb570538Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 10060fb570538Smrgecho 'include confinc.mk # ignored' > confmf.GNU 10061fb570538Smrg_am_result=no 10062fb570538Smrgfor s in GNU BSD; do 10063fb570538Smrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 10064fb570538Smrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 10065fb570538Smrg ['0:this is the am__doit target'], 10066fb570538Smrg [AS_CASE([$s], 10067fb570538Smrg [BSD], [am__include='.include' am__quote='"'], 10068fb570538Smrg [am__include='include' am__quote=''])]) 10069fb570538Smrg if test "$am__include" != "#"; then 10070fb570538Smrg _am_result="yes ($s style)" 10071fb570538Smrg break 10072fb570538Smrg fi 10073fb570538Smrgdone 10074fb570538Smrgrm -f confinc.* confmf.* 10075fb570538SmrgAC_MSG_RESULT([${_am_result}]) 10076fb570538SmrgAC_SUBST([am__include])]) 10077fb570538SmrgAC_SUBST([am__quote])]) 10078a4f78defSmrg 10079a4f78defSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 10080a4f78defSmrg 10081fb570538Smrg# Copyright (C) 1997-2018 Free Software Foundation, Inc. 10082a4f78defSmrg# 10083a4f78defSmrg# This file is free software; the Free Software Foundation 10084a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 10085a4f78defSmrg# with or without modifications, as long as this notice is preserved. 10086a4f78defSmrg 10087a4f78defSmrg# AM_MISSING_PROG(NAME, PROGRAM) 10088a4f78defSmrg# ------------------------------ 10089a4f78defSmrgAC_DEFUN([AM_MISSING_PROG], 10090a4f78defSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 10091a4f78defSmrg$1=${$1-"${am_missing_run}$2"} 10092a4f78defSmrgAC_SUBST($1)]) 10093a4f78defSmrg 10094a4f78defSmrg# AM_MISSING_HAS_RUN 10095a4f78defSmrg# ------------------ 10096a4f78defSmrg# Define MISSING if not defined so far and test if it is modern enough. 10097a4f78defSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 10098a4f78defSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 10099a4f78defSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 10100a4f78defSmrgAC_REQUIRE_AUX_FILE([missing])dnl 10101a4f78defSmrgif test x"${MISSING+set}" != xset; then 10102a4f78defSmrg case $am_aux_dir in 10103a4f78defSmrg *\ * | *\ *) 10104a4f78defSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 10105a4f78defSmrg *) 10106a4f78defSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 10107a4f78defSmrg esac 10108a4f78defSmrgfi 10109a4f78defSmrg# Use eval to expand $SHELL 10110a4f78defSmrgif eval "$MISSING --is-lightweight"; then 10111a4f78defSmrg am_missing_run="$MISSING " 10112a4f78defSmrgelse 10113a4f78defSmrg am_missing_run= 10114a4f78defSmrg AC_MSG_WARN(['missing' script is too old or missing]) 10115a4f78defSmrgfi 10116a4f78defSmrg]) 10117a4f78defSmrg 10118a4f78defSmrg# Helper functions for option handling. -*- Autoconf -*- 10119a4f78defSmrg 10120fb570538Smrg# Copyright (C) 2001-2018 Free Software Foundation, Inc. 10121a4f78defSmrg# 10122a4f78defSmrg# This file is free software; the Free Software Foundation 10123a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 10124a4f78defSmrg# with or without modifications, as long as this notice is preserved. 10125a4f78defSmrg 10126a4f78defSmrg# _AM_MANGLE_OPTION(NAME) 10127a4f78defSmrg# ----------------------- 10128a4f78defSmrgAC_DEFUN([_AM_MANGLE_OPTION], 10129a4f78defSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 10130a4f78defSmrg 10131a4f78defSmrg# _AM_SET_OPTION(NAME) 10132a4f78defSmrg# -------------------- 10133a4f78defSmrg# Set option NAME. Presently that only means defining a flag for this option. 10134a4f78defSmrgAC_DEFUN([_AM_SET_OPTION], 10135a4f78defSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 10136a4f78defSmrg 10137a4f78defSmrg# _AM_SET_OPTIONS(OPTIONS) 10138a4f78defSmrg# ------------------------ 10139a4f78defSmrg# OPTIONS is a space-separated list of Automake options. 10140a4f78defSmrgAC_DEFUN([_AM_SET_OPTIONS], 10141a4f78defSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 10142a4f78defSmrg 10143a4f78defSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 10144a4f78defSmrg# ------------------------------------------- 10145a4f78defSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 10146a4f78defSmrgAC_DEFUN([_AM_IF_OPTION], 10147a4f78defSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 10148a4f78defSmrg 10149fb570538Smrg# Copyright (C) 1999-2018 Free Software Foundation, Inc. 10150a4f78defSmrg# 10151a4f78defSmrg# This file is free software; the Free Software Foundation 10152a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 10153a4f78defSmrg# with or without modifications, as long as this notice is preserved. 10154a4f78defSmrg 10155a4f78defSmrg# _AM_PROG_CC_C_O 10156a4f78defSmrg# --------------- 10157a4f78defSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 10158a4f78defSmrg# to automatically call this. 10159a4f78defSmrgAC_DEFUN([_AM_PROG_CC_C_O], 10160a4f78defSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 10161a4f78defSmrgAC_REQUIRE_AUX_FILE([compile])dnl 10162a4f78defSmrgAC_LANG_PUSH([C])dnl 10163a4f78defSmrgAC_CACHE_CHECK( 10164a4f78defSmrg [whether $CC understands -c and -o together], 10165a4f78defSmrg [am_cv_prog_cc_c_o], 10166a4f78defSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 10167a4f78defSmrg # Make sure it works both with $CC and with simple cc. 10168a4f78defSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 10169a4f78defSmrg # compilers refuse to overwrite an existing .o file with -o, 10170a4f78defSmrg # though they will create one. 10171a4f78defSmrg am_cv_prog_cc_c_o=yes 10172a4f78defSmrg for am_i in 1 2; do 10173a4f78defSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 10174a4f78defSmrg && test -f conftest2.$ac_objext; then 10175a4f78defSmrg : OK 10176a4f78defSmrg else 10177a4f78defSmrg am_cv_prog_cc_c_o=no 10178a4f78defSmrg break 10179a4f78defSmrg fi 10180a4f78defSmrg done 10181a4f78defSmrg rm -f core conftest* 10182a4f78defSmrg unset am_i]) 10183a4f78defSmrgif test "$am_cv_prog_cc_c_o" != yes; then 10184a4f78defSmrg # Losing compiler, so override with the script. 10185a4f78defSmrg # FIXME: It is wrong to rewrite CC. 10186a4f78defSmrg # But if we don't then we get into trouble of one sort or another. 10187a4f78defSmrg # A longer-term fix would be to have automake use am__CC in this case, 10188a4f78defSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 10189a4f78defSmrg CC="$am_aux_dir/compile $CC" 10190a4f78defSmrgfi 10191a4f78defSmrgAC_LANG_POP([C])]) 10192a4f78defSmrg 10193a4f78defSmrg# For backward compatibility. 10194a4f78defSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 10195a4f78defSmrg 10196fb570538Smrg# Copyright (C) 2001-2018 Free Software Foundation, Inc. 10197a4f78defSmrg# 10198a4f78defSmrg# This file is free software; the Free Software Foundation 10199a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 10200a4f78defSmrg# with or without modifications, as long as this notice is preserved. 10201a4f78defSmrg 10202a4f78defSmrg# AM_RUN_LOG(COMMAND) 10203a4f78defSmrg# ------------------- 10204a4f78defSmrg# Run COMMAND, save the exit status in ac_status, and log it. 10205a4f78defSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 10206a4f78defSmrgAC_DEFUN([AM_RUN_LOG], 10207a4f78defSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 10208a4f78defSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 10209a4f78defSmrg ac_status=$? 10210a4f78defSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 10211a4f78defSmrg (exit $ac_status); }]) 10212a4f78defSmrg 10213a4f78defSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 10214a4f78defSmrg 10215fb570538Smrg# Copyright (C) 1996-2018 Free Software Foundation, Inc. 10216a4f78defSmrg# 10217a4f78defSmrg# This file is free software; the Free Software Foundation 10218a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 10219a4f78defSmrg# with or without modifications, as long as this notice is preserved. 10220a4f78defSmrg 10221a4f78defSmrg# AM_SANITY_CHECK 10222a4f78defSmrg# --------------- 10223a4f78defSmrgAC_DEFUN([AM_SANITY_CHECK], 10224a4f78defSmrg[AC_MSG_CHECKING([whether build environment is sane]) 10225a4f78defSmrg# Reject unsafe characters in $srcdir or the absolute working directory 10226a4f78defSmrg# name. Accept space and tab only in the latter. 10227a4f78defSmrgam_lf=' 10228a4f78defSmrg' 10229a4f78defSmrgcase `pwd` in 10230a4f78defSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 10231a4f78defSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 10232a4f78defSmrgesac 10233a4f78defSmrgcase $srcdir in 10234a4f78defSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 10235a4f78defSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 10236a4f78defSmrgesac 10237a4f78defSmrg 10238a4f78defSmrg# Do 'set' in a subshell so we don't clobber the current shell's 10239a4f78defSmrg# arguments. Must try -L first in case configure is actually a 10240a4f78defSmrg# symlink; some systems play weird games with the mod time of symlinks 10241a4f78defSmrg# (eg FreeBSD returns the mod time of the symlink's containing 10242a4f78defSmrg# directory). 10243a4f78defSmrgif ( 10244a4f78defSmrg am_has_slept=no 10245a4f78defSmrg for am_try in 1 2; do 10246a4f78defSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 10247a4f78defSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 10248a4f78defSmrg if test "$[*]" = "X"; then 10249a4f78defSmrg # -L didn't work. 10250a4f78defSmrg set X `ls -t "$srcdir/configure" conftest.file` 10251a4f78defSmrg fi 10252a4f78defSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 10253a4f78defSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 10254a4f78defSmrg 10255a4f78defSmrg # If neither matched, then we have a broken ls. This can happen 10256a4f78defSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 10257a4f78defSmrg # broken ls alias from the environment. This has actually 10258a4f78defSmrg # happened. Such a system could not be considered "sane". 10259a4f78defSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 10260a4f78defSmrg alias in your environment]) 10261a4f78defSmrg fi 10262a4f78defSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 10263a4f78defSmrg break 10264a4f78defSmrg fi 10265a4f78defSmrg # Just in case. 10266a4f78defSmrg sleep 1 10267a4f78defSmrg am_has_slept=yes 10268a4f78defSmrg done 10269a4f78defSmrg test "$[2]" = conftest.file 10270a4f78defSmrg ) 10271a4f78defSmrgthen 10272a4f78defSmrg # Ok. 10273a4f78defSmrg : 10274a4f78defSmrgelse 10275a4f78defSmrg AC_MSG_ERROR([newly created file is older than distributed files! 10276a4f78defSmrgCheck your system clock]) 10277a4f78defSmrgfi 10278a4f78defSmrgAC_MSG_RESULT([yes]) 10279a4f78defSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 10280a4f78defSmrg# generated files are strictly newer. 10281a4f78defSmrgam_sleep_pid= 10282a4f78defSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 10283a4f78defSmrg ( sleep 1 ) & 10284a4f78defSmrg am_sleep_pid=$! 10285a4f78defSmrgfi 10286a4f78defSmrgAC_CONFIG_COMMANDS_PRE( 10287a4f78defSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 10288a4f78defSmrg if test -n "$am_sleep_pid"; then 10289a4f78defSmrg # Hide warnings about reused PIDs. 10290a4f78defSmrg wait $am_sleep_pid 2>/dev/null 10291a4f78defSmrg fi 10292a4f78defSmrg AC_MSG_RESULT([done])]) 10293a4f78defSmrgrm -f conftest.file 10294a4f78defSmrg]) 10295a4f78defSmrg 10296fb570538Smrg# Copyright (C) 2009-2018 Free Software Foundation, Inc. 10297a4f78defSmrg# 10298a4f78defSmrg# This file is free software; the Free Software Foundation 10299a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 10300a4f78defSmrg# with or without modifications, as long as this notice is preserved. 10301a4f78defSmrg 10302a4f78defSmrg# AM_SILENT_RULES([DEFAULT]) 10303a4f78defSmrg# -------------------------- 10304a4f78defSmrg# Enable less verbose build rules; with the default set to DEFAULT 10305a4f78defSmrg# ("yes" being less verbose, "no" or empty being verbose). 10306a4f78defSmrgAC_DEFUN([AM_SILENT_RULES], 10307a4f78defSmrg[AC_ARG_ENABLE([silent-rules], [dnl 10308a4f78defSmrgAS_HELP_STRING( 10309a4f78defSmrg [--enable-silent-rules], 10310a4f78defSmrg [less verbose build output (undo: "make V=1")]) 10311a4f78defSmrgAS_HELP_STRING( 10312a4f78defSmrg [--disable-silent-rules], 10313a4f78defSmrg [verbose build output (undo: "make V=0")])dnl 10314a4f78defSmrg]) 10315a4f78defSmrgcase $enable_silent_rules in @%:@ ((( 10316a4f78defSmrg yes) AM_DEFAULT_VERBOSITY=0;; 10317a4f78defSmrg no) AM_DEFAULT_VERBOSITY=1;; 10318a4f78defSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 10319a4f78defSmrgesac 10320a4f78defSmrgdnl 10321a4f78defSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 10322a4f78defSmrgdnl do not support nested variable expansions. 10323a4f78defSmrgdnl See automake bug#9928 and bug#10237. 10324a4f78defSmrgam_make=${MAKE-make} 10325a4f78defSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 10326a4f78defSmrg [am_cv_make_support_nested_variables], 10327a4f78defSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 10328a4f78defSmrgBAR0=false 10329a4f78defSmrgBAR1=true 10330a4f78defSmrgV=1 10331a4f78defSmrgam__doit: 10332a4f78defSmrg @$(TRUE) 10333a4f78defSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 10334a4f78defSmrg am_cv_make_support_nested_variables=yes 10335a4f78defSmrgelse 10336a4f78defSmrg am_cv_make_support_nested_variables=no 10337a4f78defSmrgfi]) 10338a4f78defSmrgif test $am_cv_make_support_nested_variables = yes; then 10339a4f78defSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 10340a4f78defSmrg AM_V='$(V)' 10341a4f78defSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 10342a4f78defSmrgelse 10343a4f78defSmrg AM_V=$AM_DEFAULT_VERBOSITY 10344a4f78defSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 10345a4f78defSmrgfi 10346a4f78defSmrgAC_SUBST([AM_V])dnl 10347a4f78defSmrgAM_SUBST_NOTMAKE([AM_V])dnl 10348a4f78defSmrgAC_SUBST([AM_DEFAULT_V])dnl 10349a4f78defSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 10350a4f78defSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 10351a4f78defSmrgAM_BACKSLASH='\' 10352a4f78defSmrgAC_SUBST([AM_BACKSLASH])dnl 10353a4f78defSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 10354a4f78defSmrg]) 10355a4f78defSmrg 10356fb570538Smrg# Copyright (C) 2001-2018 Free Software Foundation, Inc. 10357a4f78defSmrg# 10358a4f78defSmrg# This file is free software; the Free Software Foundation 10359a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 10360a4f78defSmrg# with or without modifications, as long as this notice is preserved. 10361a4f78defSmrg 10362a4f78defSmrg# AM_PROG_INSTALL_STRIP 10363a4f78defSmrg# --------------------- 10364a4f78defSmrg# One issue with vendor 'install' (even GNU) is that you can't 10365a4f78defSmrg# specify the program used to strip binaries. This is especially 10366a4f78defSmrg# annoying in cross-compiling environments, where the build's strip 10367a4f78defSmrg# is unlikely to handle the host's binaries. 10368a4f78defSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 10369a4f78defSmrg# always use install-sh in "make install-strip", and initialize 10370a4f78defSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 10371a4f78defSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 10372a4f78defSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 10373a4f78defSmrg# Installed binaries are usually stripped using 'strip' when the user 10374a4f78defSmrg# run "make install-strip". However 'strip' might not be the right 10375a4f78defSmrg# tool to use in cross-compilation environments, therefore Automake 10376a4f78defSmrg# will honor the 'STRIP' environment variable to overrule this program. 10377a4f78defSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 10378a4f78defSmrgif test "$cross_compiling" != no; then 10379a4f78defSmrg AC_CHECK_TOOL([STRIP], [strip], :) 10380a4f78defSmrgfi 10381a4f78defSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 10382a4f78defSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 10383a4f78defSmrg 10384fb570538Smrg# Copyright (C) 2006-2018 Free Software Foundation, Inc. 10385a4f78defSmrg# 10386a4f78defSmrg# This file is free software; the Free Software Foundation 10387a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 10388a4f78defSmrg# with or without modifications, as long as this notice is preserved. 10389a4f78defSmrg 10390a4f78defSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 10391a4f78defSmrg# --------------------------- 10392a4f78defSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 10393a4f78defSmrg# This macro is traced by Automake. 10394a4f78defSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 10395a4f78defSmrg 10396a4f78defSmrg# AM_SUBST_NOTMAKE(VARIABLE) 10397a4f78defSmrg# -------------------------- 10398a4f78defSmrg# Public sister of _AM_SUBST_NOTMAKE. 10399a4f78defSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10400a4f78defSmrg 10401a4f78defSmrg# Check how to create a tarball. -*- Autoconf -*- 10402a4f78defSmrg 10403fb570538Smrg# Copyright (C) 2004-2018 Free Software Foundation, Inc. 10404a4f78defSmrg# 10405a4f78defSmrg# This file is free software; the Free Software Foundation 10406a4f78defSmrg# gives unlimited permission to copy and/or distribute it, 10407a4f78defSmrg# with or without modifications, as long as this notice is preserved. 10408a4f78defSmrg 10409a4f78defSmrg# _AM_PROG_TAR(FORMAT) 10410a4f78defSmrg# -------------------- 10411a4f78defSmrg# Check how to create a tarball in format FORMAT. 10412a4f78defSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 10413a4f78defSmrg# 10414a4f78defSmrg# Substitute a variable $(am__tar) that is a command 10415a4f78defSmrg# writing to stdout a FORMAT-tarball containing the directory 10416a4f78defSmrg# $tardir. 10417a4f78defSmrg# tardir=directory && $(am__tar) > result.tar 10418a4f78defSmrg# 10419a4f78defSmrg# Substitute a variable $(am__untar) that extract such 10420a4f78defSmrg# a tarball read from stdin. 10421a4f78defSmrg# $(am__untar) < result.tar 10422a4f78defSmrg# 10423a4f78defSmrgAC_DEFUN([_AM_PROG_TAR], 10424a4f78defSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 10425a4f78defSmrg# in the wild :-( We should find a proper way to deprecate it ... 10426a4f78defSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 10427a4f78defSmrg 10428a4f78defSmrg# We'll loop over all known methods to create a tar archive until one works. 10429a4f78defSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 10430a4f78defSmrg 10431a4f78defSmrgm4_if([$1], [v7], 10432a4f78defSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 10433a4f78defSmrg 10434a4f78defSmrg [m4_case([$1], 10435a4f78defSmrg [ustar], 10436a4f78defSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 10437a4f78defSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 10438a4f78defSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 10439a4f78defSmrg # and bug#13588). 10440a4f78defSmrg am_max_uid=2097151 # 2^21 - 1 10441a4f78defSmrg am_max_gid=$am_max_uid 10442a4f78defSmrg # The $UID and $GID variables are not portable, so we need to resort 10443a4f78defSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 10444a4f78defSmrg # below are definitely unexpected, so allow the users to see them 10445a4f78defSmrg # (that is, avoid stderr redirection). 10446a4f78defSmrg am_uid=`id -u || echo unknown` 10447a4f78defSmrg am_gid=`id -g || echo unknown` 10448a4f78defSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 10449a4f78defSmrg if test $am_uid -le $am_max_uid; then 10450a4f78defSmrg AC_MSG_RESULT([yes]) 10451a4f78defSmrg else 10452a4f78defSmrg AC_MSG_RESULT([no]) 10453a4f78defSmrg _am_tools=none 10454a4f78defSmrg fi 10455a4f78defSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 10456a4f78defSmrg if test $am_gid -le $am_max_gid; then 10457a4f78defSmrg AC_MSG_RESULT([yes]) 10458a4f78defSmrg else 10459a4f78defSmrg AC_MSG_RESULT([no]) 10460a4f78defSmrg _am_tools=none 10461a4f78defSmrg fi], 10462a4f78defSmrg 10463a4f78defSmrg [pax], 10464a4f78defSmrg [], 10465a4f78defSmrg 10466a4f78defSmrg [m4_fatal([Unknown tar format])]) 10467a4f78defSmrg 10468a4f78defSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 10469a4f78defSmrg 10470a4f78defSmrg # Go ahead even if we have the value already cached. We do so because we 10471a4f78defSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 10472a4f78defSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10473a4f78defSmrg 10474a4f78defSmrg for _am_tool in $_am_tools; do 10475a4f78defSmrg case $_am_tool in 10476a4f78defSmrg gnutar) 10477a4f78defSmrg for _am_tar in tar gnutar gtar; do 10478a4f78defSmrg AM_RUN_LOG([$_am_tar --version]) && break 10479a4f78defSmrg done 10480a4f78defSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 10481a4f78defSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 10482a4f78defSmrg am__untar="$_am_tar -xf -" 10483a4f78defSmrg ;; 10484a4f78defSmrg plaintar) 10485a4f78defSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 10486a4f78defSmrg # ustar tarball either. 10487a4f78defSmrg (tar --version) >/dev/null 2>&1 && continue 10488a4f78defSmrg am__tar='tar chf - "$$tardir"' 10489a4f78defSmrg am__tar_='tar chf - "$tardir"' 10490a4f78defSmrg am__untar='tar xf -' 10491a4f78defSmrg ;; 10492a4f78defSmrg pax) 10493a4f78defSmrg am__tar='pax -L -x $1 -w "$$tardir"' 10494a4f78defSmrg am__tar_='pax -L -x $1 -w "$tardir"' 10495a4f78defSmrg am__untar='pax -r' 10496a4f78defSmrg ;; 10497a4f78defSmrg cpio) 10498a4f78defSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 10499a4f78defSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 10500a4f78defSmrg am__untar='cpio -i -H $1 -d' 10501a4f78defSmrg ;; 10502a4f78defSmrg none) 10503a4f78defSmrg am__tar=false 10504a4f78defSmrg am__tar_=false 10505a4f78defSmrg am__untar=false 10506a4f78defSmrg ;; 10507a4f78defSmrg esac 10508a4f78defSmrg 10509a4f78defSmrg # If the value was cached, stop now. We just wanted to have am__tar 10510a4f78defSmrg # and am__untar set. 10511a4f78defSmrg test -n "${am_cv_prog_tar_$1}" && break 10512a4f78defSmrg 10513a4f78defSmrg # tar/untar a dummy directory, and stop if the command works. 10514a4f78defSmrg rm -rf conftest.dir 10515a4f78defSmrg mkdir conftest.dir 10516a4f78defSmrg echo GrepMe > conftest.dir/file 10517a4f78defSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10518a4f78defSmrg rm -rf conftest.dir 10519a4f78defSmrg if test -s conftest.tar; then 10520a4f78defSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 10521a4f78defSmrg AM_RUN_LOG([cat conftest.dir/file]) 10522a4f78defSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10523a4f78defSmrg fi 10524a4f78defSmrg done 10525a4f78defSmrg rm -rf conftest.dir 10526a4f78defSmrg 10527a4f78defSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10528a4f78defSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10529a4f78defSmrg 10530a4f78defSmrgAC_SUBST([am__tar]) 10531a4f78defSmrgAC_SUBST([am__untar]) 10532a4f78defSmrg]) # _AM_PROG_TAR 10533a4f78defSmrg 10534a4f78defSmrgm4_include([acinclude.m4]) 10535