1ae545d91Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2ae545d91Smrg# 3ae545d91Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software 4ae545d91Smrg# Foundation, Inc. 5ae545d91Smrg# Written by Gordon Matzigkeit, 1996 6ae545d91Smrg# 7ae545d91Smrg# This file is free software; the Free Software Foundation gives 8ae545d91Smrg# unlimited permission to copy and/or distribute it, with or without 9ae545d91Smrg# modifications, as long as this notice is preserved. 10ae545d91Smrg 11ae545d91Smrgm4_define([_LT_COPYING], [dnl 12ae545d91Smrg# Copyright (C) 2024 Free Software Foundation, Inc. 13ae545d91Smrg# This is free software; see the source for copying conditions. There is NO 14ae545d91Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15ae545d91Smrg 16ae545d91Smrg# GNU Libtool is free software; you can redistribute it and/or modify 17ae545d91Smrg# it under the terms of the GNU General Public License as published by 18ae545d91Smrg# the Free Software Foundation; either version 2 of the License, or 19ae545d91Smrg# (at your option) any later version. 20ae545d91Smrg# 21ae545d91Smrg# As a special exception to the GNU General Public License, if you 22ae545d91Smrg# distribute this file as part of a program or library that is built 23ae545d91Smrg# using GNU Libtool, you may include this file under the same 24ae545d91Smrg# distribution terms that you use for the rest of that program. 25ae545d91Smrg# 26ae545d91Smrg# GNU Libtool is distributed in the hope that it will be useful, but 27ae545d91Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 28ae545d91Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29ae545d91Smrg# GNU General Public License for more details. 30ae545d91Smrg# 31ae545d91Smrg# You should have received a copy of the GNU General Public License 32ae545d91Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 33ae545d91Smrg]) 34ae545d91Smrg 35ae545d91Smrg# serial 63 LT_INIT 36ae545d91Smrg 37ae545d91Smrg 38ae545d91Smrg# LT_PREREQ(VERSION) 39ae545d91Smrg# ------------------ 40ae545d91Smrg# Complain and exit if this libtool version is less that VERSION. 41ae545d91Smrgm4_defun([LT_PREREQ], 42ae545d91Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 43ae545d91Smrg [m4_default([$3], 44ae545d91Smrg [m4_fatal([Libtool version $1 or higher is required], 45ae545d91Smrg 63)])], 46ae545d91Smrg [$2])]) 47ae545d91Smrg 48ae545d91Smrg 49ae545d91Smrg# _LT_CHECK_BUILDDIR 50ae545d91Smrg# ------------------ 51ae545d91Smrg# Complain if the absolute build directory name contains unusual characters 52ae545d91Smrgm4_defun([_LT_CHECK_BUILDDIR], 53ae545d91Smrg[case `pwd` in 54ae545d91Smrg *\ * | *\ *) 55ae545d91Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 56ae545d91Smrgesac 57ae545d91Smrg]) 58ae545d91Smrg 59ae545d91Smrg 60ae545d91Smrg# LT_INIT([OPTIONS]) 61ae545d91Smrg# ------------------ 62ae545d91SmrgAC_DEFUN([LT_INIT], 63ae545d91Smrg[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK 64ae545d91SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 65ae545d91SmrgAC_BEFORE([$0], [LT_LANG])dnl 66ae545d91SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 67ae545d91SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 68ae545d91Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 69ae545d91Smrg 70ae545d91Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 71ae545d91Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 72ae545d91Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 73ae545d91Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 74ae545d91Smrgdnl unless we require an AC_DEFUNed macro: 75ae545d91SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 76ae545d91SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 77ae545d91SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 78ae545d91SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 79ae545d91Smrgm4_require([_LT_PROG_LTMAIN])dnl 80ae545d91Smrg 81ae545d91Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 82ae545d91Smrg 83ae545d91Smrgdnl Parse OPTIONS 84ae545d91Smrg_LT_SET_OPTIONS([$0], [$1]) 85ae545d91Smrg 86ae545d91Smrg# This can be used to rebuild libtool when needed 87ae545d91SmrgLIBTOOL_DEPS=$ltmain 88ae545d91Smrg 89ae545d91Smrg# Always use our own libtool. 90ae545d91SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 91ae545d91SmrgAC_SUBST(LIBTOOL)dnl 92ae545d91Smrg 93ae545d91Smrg_LT_SETUP 94ae545d91Smrg 95ae545d91Smrg# Only expand once: 96ae545d91Smrgm4_define([LT_INIT]) 97ae545d91Smrg])# LT_INIT 98ae545d91Smrg 99ae545d91Smrg# Old names: 100ae545d91SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 101ae545d91SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 102ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 103ae545d91Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 104ae545d91Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 105ae545d91Smrg 106ae545d91Smrg 107ae545d91Smrg# _LT_PREPARE_CC_BASENAME 108ae545d91Smrg# ----------------------- 109ae545d91Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 110ae545d91Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 111ae545d91Smrgfunc_cc_basename () 112ae545d91Smrg{ 113ae545d91Smrg for cc_temp in @S|@*""; do 114ae545d91Smrg case $cc_temp in 115ae545d91Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 116ae545d91Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 117ae545d91Smrg \-*) ;; 118ae545d91Smrg *) break;; 119ae545d91Smrg esac 120ae545d91Smrg done 121ae545d91Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 122ae545d91Smrg} 123ae545d91Smrg])# _LT_PREPARE_CC_BASENAME 124ae545d91Smrg 125ae545d91Smrg 126ae545d91Smrg# _LT_CC_BASENAME(CC) 127ae545d91Smrg# ------------------- 128ae545d91Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 129ae545d91Smrg# but that macro is also expanded into generated libtool script, which 130ae545d91Smrg# arranges for $SED and $ECHO to be set by different means. 131ae545d91Smrgm4_defun([_LT_CC_BASENAME], 132ae545d91Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 133ae545d91SmrgAC_REQUIRE([_LT_DECL_SED])dnl 134ae545d91SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 135ae545d91Smrgfunc_cc_basename $1 136ae545d91Smrgcc_basename=$func_cc_basename_result 137ae545d91Smrg]) 138ae545d91Smrg 139ae545d91Smrg 140ae545d91Smrg# _LT_FILEUTILS_DEFAULTS 141ae545d91Smrg# ---------------------- 142ae545d91Smrg# It is okay to use these file commands and assume they have been set 143ae545d91Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 144ae545d91Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 145ae545d91Smrg[: ${CP="cp -f"} 146ae545d91Smrg: ${MV="mv -f"} 147ae545d91Smrg: ${RM="rm -f"} 148ae545d91Smrg])# _LT_FILEUTILS_DEFAULTS 149ae545d91Smrg 150ae545d91Smrg 151ae545d91Smrg# _LT_SETUP 152ae545d91Smrg# --------- 153ae545d91Smrgm4_defun([_LT_SETUP], 154ae545d91Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 155ae545d91SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 156ae545d91SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 157ae545d91SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 158ae545d91Smrg 159ae545d91Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 160ae545d91Smrgdnl 161ae545d91Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 162ae545d91Smrg_LT_DECL([], [host], [0])dnl 163ae545d91Smrg_LT_DECL([], [host_os], [0])dnl 164ae545d91Smrgdnl 165ae545d91Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 166ae545d91Smrg_LT_DECL([], [build], [0])dnl 167ae545d91Smrg_LT_DECL([], [build_os], [0])dnl 168ae545d91Smrgdnl 169ae545d91SmrgAC_REQUIRE([AC_PROG_CC])dnl 170ae545d91SmrgAC_REQUIRE([LT_PATH_LD])dnl 171ae545d91SmrgAC_REQUIRE([LT_PATH_NM])dnl 172ae545d91Smrgdnl 173ae545d91SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 174ae545d91Smrgtest -z "$LN_S" && LN_S="ln -s" 175ae545d91Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 176ae545d91Smrgdnl 177ae545d91SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 178ae545d91Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 179ae545d91Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 180ae545d91Smrgdnl 181ae545d91Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 182ae545d91Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 183ae545d91Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 184ae545d91Smrgm4_require([_LT_CMD_RELOAD])dnl 185ae545d91Smrgm4_require([_LT_DECL_FILECMD])dnl 186ae545d91Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 187ae545d91Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 188ae545d91Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 189ae545d91Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 190ae545d91Smrgm4_require([_LT_WITH_SYSROOT])dnl 191ae545d91Smrgm4_require([_LT_CMD_TRUNCATE])dnl 192ae545d91Smrg 193ae545d91Smrg_LT_CONFIG_LIBTOOL_INIT([ 194ae545d91Smrg# See if we are running on zsh, and set the options that allow our 195ae545d91Smrg# commands through without removal of \ escapes INIT. 196ae545d91Smrgif test -n "\${ZSH_VERSION+set}"; then 197ae545d91Smrg setopt NO_GLOB_SUBST 198ae545d91Smrgfi 199ae545d91Smrg]) 200ae545d91Smrgif test -n "${ZSH_VERSION+set}"; then 201ae545d91Smrg setopt NO_GLOB_SUBST 202ae545d91Smrgfi 203ae545d91Smrg 204ae545d91Smrg_LT_CHECK_OBJDIR 205ae545d91Smrg 206ae545d91Smrgm4_require([_LT_TAG_COMPILER])dnl 207ae545d91Smrg 208ae545d91Smrgcase $host_os in 209ae545d91Smrgaix3*) 210ae545d91Smrg # AIX sometimes has problems with the GCC collect2 program. For some 211ae545d91Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 212ae545d91Smrg # vanish in a puff of smoke. 213ae545d91Smrg if test set != "${COLLECT_NAMES+set}"; then 214ae545d91Smrg COLLECT_NAMES= 215ae545d91Smrg export COLLECT_NAMES 216ae545d91Smrg fi 217ae545d91Smrg ;; 218ae545d91Smrgesac 219ae545d91Smrg 220ae545d91Smrg# Global variables: 221ae545d91Smrgofile=libtool 222ae545d91Smrgcan_build_shared=yes 223ae545d91Smrg 224ae545d91Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 225ae545d91Smrg# ICC, which need '.lib'). 226ae545d91Smrglibext=a 227ae545d91Smrg 228ae545d91Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 229ae545d91Smrg 230ae545d91Smrgold_CC=$CC 231ae545d91Smrgold_CFLAGS=$CFLAGS 232ae545d91Smrg 233ae545d91Smrg# Set sane defaults for various variables 234ae545d91Smrgtest -z "$CC" && CC=cc 235ae545d91Smrgtest -z "$LTCC" && LTCC=$CC 236ae545d91Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 237ae545d91Smrgtest -z "$LD" && LD=ld 238ae545d91Smrgtest -z "$ac_objext" && ac_objext=o 239ae545d91Smrg 240ae545d91Smrg_LT_CC_BASENAME([$compiler]) 241ae545d91Smrg 242ae545d91Smrg# Only perform the check for file, if the check method requires it 243ae545d91Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 244ae545d91Smrgcase $deplibs_check_method in 245ae545d91Smrgfile_magic*) 246ae545d91Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 247ae545d91Smrg _LT_PATH_MAGIC 248ae545d91Smrg fi 249ae545d91Smrg ;; 250ae545d91Smrgesac 251ae545d91Smrg 252ae545d91Smrg# Use C for the default configuration in the libtool script 253ae545d91SmrgLT_SUPPORTED_TAG([CC]) 254ae545d91Smrg_LT_LANG_C_CONFIG 255ae545d91Smrg_LT_LANG_DEFAULT_CONFIG 256ae545d91Smrg_LT_CONFIG_COMMANDS 257ae545d91Smrg])# _LT_SETUP 258ae545d91Smrg 259ae545d91Smrg 260ae545d91Smrg# _LT_PREPARE_SED_QUOTE_VARS 261ae545d91Smrg# -------------------------- 262ae545d91Smrg# Define a few sed substitution that help us do robust quoting. 263ae545d91Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 264ae545d91Smrg[# Backslashify metacharacters that are still active within 265ae545d91Smrg# double-quoted strings. 266ae545d91Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 267ae545d91Smrg 268ae545d91Smrg# Same as above, but do not quote variable references. 269ae545d91Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 270ae545d91Smrg 271ae545d91Smrg# Sed substitution to delay expansion of an escaped shell variable in a 272ae545d91Smrg# double_quote_subst'ed string. 273ae545d91Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 274ae545d91Smrg 275ae545d91Smrg# Sed substitution to delay expansion of an escaped single quote. 276ae545d91Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 277ae545d91Smrg 278ae545d91Smrg# Sed substitution to avoid accidental globbing in evaled expressions 279ae545d91Smrgno_glob_subst='s/\*/\\\*/g' 280ae545d91Smrg]) 281ae545d91Smrg 282ae545d91Smrg# _LT_PROG_LTMAIN 283ae545d91Smrg# --------------- 284ae545d91Smrg# Note that this code is called both from 'configure', and 'config.status' 285ae545d91Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 286ae545d91Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 287ae545d91Smrg# so we pass a copy along to make sure it has a sensible value anyway. 288ae545d91Smrgm4_defun([_LT_PROG_LTMAIN], 289ae545d91Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 290ae545d91Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 291ae545d91Smrgltmain=$ac_aux_dir/ltmain.sh 292ae545d91Smrg])# _LT_PROG_LTMAIN 293ae545d91Smrg 294ae545d91Smrg 295ae545d91Smrg## ------------------------------------- ## 296ae545d91Smrg## Accumulate code for creating libtool. ## 297ae545d91Smrg## ------------------------------------- ## 298ae545d91Smrg 299ae545d91Smrg# So that we can recreate a full libtool script including additional 300ae545d91Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 301ae545d91Smrg# in macros and then make a single call at the end using the 'libtool' 302ae545d91Smrg# label. 303ae545d91Smrg 304ae545d91Smrg 305ae545d91Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 306ae545d91Smrg# ---------------------------------------- 307ae545d91Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 308ae545d91Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 309ae545d91Smrg[m4_ifval([$1], 310ae545d91Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 311ae545d91Smrg [$1 312ae545d91Smrg])])]) 313ae545d91Smrg 314ae545d91Smrg# Initialize. 315ae545d91Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 316ae545d91Smrg 317ae545d91Smrg 318ae545d91Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 319ae545d91Smrg# ------------------------------ 320ae545d91Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 321ae545d91Smrgm4_define([_LT_CONFIG_LIBTOOL], 322ae545d91Smrg[m4_ifval([$1], 323ae545d91Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 324ae545d91Smrg [$1 325ae545d91Smrg])])]) 326ae545d91Smrg 327ae545d91Smrg# Initialize. 328ae545d91Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 329ae545d91Smrg 330ae545d91Smrg 331ae545d91Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 332ae545d91Smrg# ----------------------------------------------------- 333ae545d91Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 334ae545d91Smrg[_LT_CONFIG_LIBTOOL([$1]) 335ae545d91Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 336ae545d91Smrg]) 337ae545d91Smrg 338ae545d91Smrg 339ae545d91Smrg# _LT_FORMAT_COMMENT([COMMENT]) 340ae545d91Smrg# ----------------------------- 341ae545d91Smrg# Add leading comment marks to the start of each line, and a trailing 342ae545d91Smrg# full-stop to the whole comment if one is not present already. 343ae545d91Smrgm4_define([_LT_FORMAT_COMMENT], 344ae545d91Smrg[m4_ifval([$1], [ 345ae545d91Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 346ae545d91Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 347ae545d91Smrg)]) 348ae545d91Smrg 349ae545d91Smrg 350ae545d91Smrg 351ae545d91Smrg## ------------------------ ## 352ae545d91Smrg## FIXME: Eliminate VARNAME ## 353ae545d91Smrg## ------------------------ ## 354ae545d91Smrg 355ae545d91Smrg 356ae545d91Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 357ae545d91Smrg# ------------------------------------------------------------------- 358ae545d91Smrg# CONFIGNAME is the name given to the value in the libtool script. 359ae545d91Smrg# VARNAME is the (base) name used in the configure script. 360ae545d91Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 361ae545d91Smrg# VARNAME. Any other value will be used directly. 362ae545d91Smrgm4_define([_LT_DECL], 363ae545d91Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 364ae545d91Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 365ae545d91Smrg [m4_ifval([$1], [$1], [$2])]) 366ae545d91Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 367ae545d91Smrg m4_ifval([$4], 368ae545d91Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 369ae545d91Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 370ae545d91Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 371ae545d91Smrg]) 372ae545d91Smrg 373ae545d91Smrg 374ae545d91Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 375ae545d91Smrg# -------------------------------------------------------- 376ae545d91Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 377ae545d91Smrg 378ae545d91Smrg 379ae545d91Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 380ae545d91Smrg# ------------------------------------------------ 381ae545d91Smrgm4_define([lt_decl_tag_varnames], 382ae545d91Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 383ae545d91Smrg 384ae545d91Smrg 385ae545d91Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 386ae545d91Smrg# --------------------------------------------------------- 387ae545d91Smrgm4_define([_lt_decl_filter], 388ae545d91Smrg[m4_case([$#], 389ae545d91Smrg [0], [m4_fatal([$0: too few arguments: $#])], 390ae545d91Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 391ae545d91Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 392ae545d91Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 393ae545d91Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 394ae545d91Smrg]) 395ae545d91Smrg 396ae545d91Smrg 397ae545d91Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 398ae545d91Smrg# -------------------------------------------------- 399ae545d91Smrgm4_define([lt_decl_quote_varnames], 400ae545d91Smrg[_lt_decl_filter([value], [1], $@)]) 401ae545d91Smrg 402ae545d91Smrg 403ae545d91Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 404ae545d91Smrg# --------------------------------------------------- 405ae545d91Smrgm4_define([lt_decl_dquote_varnames], 406ae545d91Smrg[_lt_decl_filter([value], [2], $@)]) 407ae545d91Smrg 408ae545d91Smrg 409ae545d91Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 410ae545d91Smrg# --------------------------------------------------- 411ae545d91Smrgm4_define([lt_decl_varnames_tagged], 412ae545d91Smrg[m4_assert([$# <= 2])dnl 413ae545d91Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 414ae545d91Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 415ae545d91Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 416ae545d91Smrgm4_define([_lt_decl_varnames_tagged], 417ae545d91Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 418ae545d91Smrg 419ae545d91Smrg 420ae545d91Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 421ae545d91Smrg# ------------------------------------------------ 422ae545d91Smrgm4_define([lt_decl_all_varnames], 423ae545d91Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 424ae545d91Smrg m4_if([$2], [], 425ae545d91Smrg m4_quote(lt_decl_varnames), 426ae545d91Smrg m4_quote(m4_shift($@))))[]dnl 427ae545d91Smrg]) 428ae545d91Smrgm4_define([_lt_decl_all_varnames], 429ae545d91Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 430ae545d91Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 431ae545d91Smrg]) 432ae545d91Smrg 433ae545d91Smrg 434ae545d91Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 435ae545d91Smrg# ------------------------------------ 436ae545d91Smrg# Quote a variable value, and forward it to 'config.status' so that its 437ae545d91Smrg# declaration there will have the same value as in 'configure'. VARNAME 438ae545d91Smrg# must have a single quote delimited value for this to work. 439ae545d91Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 440ae545d91Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 441ae545d91Smrg 442ae545d91Smrg 443ae545d91Smrg# _LT_CONFIG_STATUS_DECLARATIONS 444ae545d91Smrg# ------------------------------ 445ae545d91Smrg# We delimit libtool config variables with single quotes, so when 446ae545d91Smrg# we write them to config.status, we have to be sure to quote all 447ae545d91Smrg# embedded single quotes properly. In configure, this macro expands 448ae545d91Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 449ae545d91Smrg# 450ae545d91Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 451ae545d91Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 452ae545d91Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 453ae545d91Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 454ae545d91Smrg 455ae545d91Smrg 456ae545d91Smrg# _LT_LIBTOOL_TAGS 457ae545d91Smrg# ---------------- 458ae545d91Smrg# Output comment and list of tags supported by the script 459ae545d91Smrgm4_defun([_LT_LIBTOOL_TAGS], 460ae545d91Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 461ae545d91Smrgavailable_tags='_LT_TAGS'dnl 462ae545d91Smrg]) 463ae545d91Smrg 464ae545d91Smrg 465ae545d91Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 466ae545d91Smrg# ----------------------------------- 467ae545d91Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 468ae545d91Smrg# expand to a commented shell variable setting: 469ae545d91Smrg# 470ae545d91Smrg# # Some comment about what VAR is for. 471ae545d91Smrg# visible_name=$lt_internal_name 472ae545d91Smrgm4_define([_LT_LIBTOOL_DECLARE], 473ae545d91Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 474ae545d91Smrg [description])))[]dnl 475ae545d91Smrgm4_pushdef([_libtool_name], 476ae545d91Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 477ae545d91Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 478ae545d91Smrg [0], [_libtool_name=[$]$1], 479ae545d91Smrg [1], [_libtool_name=$lt_[]$1], 480ae545d91Smrg [2], [_libtool_name=$lt_[]$1], 481ae545d91Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 482ae545d91Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 483ae545d91Smrg]) 484ae545d91Smrg 485ae545d91Smrg 486ae545d91Smrg# _LT_LIBTOOL_CONFIG_VARS 487ae545d91Smrg# ----------------------- 488ae545d91Smrg# Produce commented declarations of non-tagged libtool config variables 489ae545d91Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 490ae545d91Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 491ae545d91Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 492ae545d91Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 493ae545d91Smrg[m4_foreach([_lt_var], 494ae545d91Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 495ae545d91Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 496ae545d91Smrg 497ae545d91Smrg 498ae545d91Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 499ae545d91Smrg# ------------------------- 500ae545d91Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 501ae545d91Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 502ae545d91Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 503ae545d91Smrg 504ae545d91Smrg 505ae545d91Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 506ae545d91Smrg# ------------------------------ 507ae545d91Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 508ae545d91Smrg 509ae545d91Smrg 510ae545d91Smrg# _LT_CONFIG_COMMANDS 511ae545d91Smrg# ------------------- 512ae545d91Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 513ae545d91Smrg# variables for single and double quote escaping we saved from calls 514ae545d91Smrg# to _LT_DECL, we can put quote escaped variables declarations 515ae545d91Smrg# into 'config.status', and then the shell code to quote escape them in 516ae545d91Smrg# for loops in 'config.status'. Finally, any additional code accumulated 517ae545d91Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 518ae545d91Smrgm4_defun([_LT_CONFIG_COMMANDS], 519ae545d91Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 520ae545d91Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 521ae545d91Smrg dnl instead of duplicating it all over again into config.status, 522ae545d91Smrg dnl then we will have config.status run $CONFIG_LT later, so it 523ae545d91Smrg dnl needs to know what name is stored there: 524ae545d91Smrg [AC_CONFIG_COMMANDS([libtool], 525ae545d91Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 526ae545d91Smrg dnl If the libtool generation code is destined for config.status, 527ae545d91Smrg dnl expand the accumulated commands and init code now: 528ae545d91Smrg [AC_CONFIG_COMMANDS([libtool], 529ae545d91Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 530ae545d91Smrg])#_LT_CONFIG_COMMANDS 531ae545d91Smrg 532ae545d91Smrg 533ae545d91Smrg# Initialize. 534ae545d91Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 535ae545d91Smrg[ 536ae545d91Smrg 537ae545d91Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 538ae545d91Smrg# if CDPATH is set. 539ae545d91Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 540ae545d91Smrg 541ae545d91Smrgsed_quote_subst='$sed_quote_subst' 542ae545d91Smrgdouble_quote_subst='$double_quote_subst' 543ae545d91Smrgdelay_variable_subst='$delay_variable_subst' 544ae545d91Smrg_LT_CONFIG_STATUS_DECLARATIONS 545ae545d91SmrgLTCC='$LTCC' 546ae545d91SmrgLTCFLAGS='$LTCFLAGS' 547ae545d91Smrgcompiler='$compiler_DEFAULT' 548ae545d91Smrg 549ae545d91Smrg# A function that is used when there is no print builtin or printf. 550ae545d91Smrgfunc_fallback_echo () 551ae545d91Smrg{ 552ae545d91Smrg eval 'cat <<_LTECHO_EOF 553ae545d91Smrg\$[]1 554ae545d91Smrg_LTECHO_EOF' 555ae545d91Smrg} 556ae545d91Smrg 557ae545d91Smrg# Quote evaled strings. 558ae545d91Smrgfor var in lt_decl_all_varnames([[ \ 559ae545d91Smrg]], lt_decl_quote_varnames); do 560ae545d91Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 561ae545d91Smrg *[[\\\\\\\`\\"\\\$]]*) 562ae545d91Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 563ae545d91Smrg ;; 564ae545d91Smrg *) 565ae545d91Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 566ae545d91Smrg ;; 567ae545d91Smrg esac 568ae545d91Smrgdone 569ae545d91Smrg 570ae545d91Smrg# Double-quote double-evaled strings. 571ae545d91Smrgfor var in lt_decl_all_varnames([[ \ 572ae545d91Smrg]], lt_decl_dquote_varnames); do 573ae545d91Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 574ae545d91Smrg *[[\\\\\\\`\\"\\\$]]*) 575ae545d91Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 576ae545d91Smrg ;; 577ae545d91Smrg *) 578ae545d91Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 579ae545d91Smrg ;; 580ae545d91Smrg esac 581ae545d91Smrgdone 582ae545d91Smrg 583ae545d91Smrg_LT_OUTPUT_LIBTOOL_INIT 584ae545d91Smrg]) 585ae545d91Smrg 586ae545d91Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 587ae545d91Smrg# ------------------------------------ 588ae545d91Smrg# Generate a child script FILE with all initialization necessary to 589ae545d91Smrg# reuse the environment learned by the parent script, and make the 590ae545d91Smrg# file executable. If COMMENT is supplied, it is inserted after the 591ae545d91Smrg# '#!' sequence but before initialization text begins. After this 592ae545d91Smrg# macro, additional text can be appended to FILE to form the body of 593ae545d91Smrg# the child script. The macro ends with non-zero status if the 594ae545d91Smrg# file could not be fully written (such as if the disk is full). 595ae545d91Smrgm4_ifdef([AS_INIT_GENERATED], 596ae545d91Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 597ae545d91Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 598ae545d91Smrg[m4_require([AS_PREPARE])]dnl 599ae545d91Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 600ae545d91Smrg[lt_write_fail=0 601ae545d91Smrgcat >$1 <<_ASEOF || lt_write_fail=1 602ae545d91Smrg#! $SHELL 603ae545d91Smrg# Generated by $as_me. 604ae545d91Smrg$2 605ae545d91SmrgSHELL=\${CONFIG_SHELL-$SHELL} 606ae545d91Smrgexport SHELL 607ae545d91Smrg_ASEOF 608ae545d91Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 609ae545d91SmrgAS_SHELL_SANITIZE 610ae545d91Smrg_AS_PREPARE 611ae545d91Smrgexec AS_MESSAGE_FD>&1 612ae545d91Smrg_ASEOF 613ae545d91Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 614ae545d91Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 615ae545d91Smrg 616ae545d91Smrg# LT_OUTPUT 617ae545d91Smrg# --------- 618ae545d91Smrg# This macro allows early generation of the libtool script (before 619ae545d91Smrg# AC_OUTPUT is called), in case it is used in configure for compilation 620ae545d91Smrg# tests. 621ae545d91SmrgAC_DEFUN([LT_OUTPUT], 622ae545d91Smrg[: ${CONFIG_LT=./config.lt} 623ae545d91SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 624ae545d91Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 625ae545d91Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 626ae545d91Smrg 627ae545d91Smrgcat >>"$CONFIG_LT" <<\_LTEOF 628ae545d91Smrglt_cl_silent=false 629ae545d91Smrgexec AS_MESSAGE_LOG_FD>>config.log 630ae545d91Smrg{ 631ae545d91Smrg echo 632ae545d91Smrg AS_BOX([Running $as_me.]) 633ae545d91Smrg} >&AS_MESSAGE_LOG_FD 634ae545d91Smrg 635ae545d91Smrglt_cl_help="\ 636ae545d91Smrg'$as_me' creates a local libtool stub from the current configuration, 637ae545d91Smrgfor use in further configure time tests before the real libtool is 638ae545d91Smrggenerated. 639ae545d91Smrg 640ae545d91SmrgUsage: $[0] [[OPTIONS]] 641ae545d91Smrg 642ae545d91Smrg -h, --help print this help, then exit 643ae545d91Smrg -V, --version print version number, then exit 644ae545d91Smrg -q, --quiet do not print progress messages 645ae545d91Smrg -d, --debug don't remove temporary files 646ae545d91Smrg 647ae545d91SmrgReport bugs to <bug-libtool@gnu.org>." 648ae545d91Smrg 649ae545d91Smrglt_cl_version="\ 650ae545d91Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 651ae545d91Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 652ae545d91Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 653ae545d91Smrg 654ae545d91SmrgCopyright (C) 2024 Free Software Foundation, Inc. 655ae545d91SmrgThis config.lt script is free software; the Free Software Foundation 656ae545d91Smrggives unlimited permission to copy, distribute and modify it." 657ae545d91Smrg 658ae545d91Smrgwhile test 0 != $[#] 659ae545d91Smrgdo 660ae545d91Smrg case $[1] in 661ae545d91Smrg --version | --v* | -V ) 662ae545d91Smrg echo "$lt_cl_version"; exit 0 ;; 663ae545d91Smrg --help | --h* | -h ) 664ae545d91Smrg echo "$lt_cl_help"; exit 0 ;; 665ae545d91Smrg --debug | --d* | -d ) 666ae545d91Smrg debug=: ;; 667ae545d91Smrg --quiet | --q* | --silent | --s* | -q ) 668ae545d91Smrg lt_cl_silent=: ;; 669ae545d91Smrg 670ae545d91Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 671ae545d91SmrgTry '$[0] --help' for more information.]) ;; 672ae545d91Smrg 673ae545d91Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 674ae545d91SmrgTry '$[0] --help' for more information.]) ;; 675ae545d91Smrg esac 676ae545d91Smrg shift 677ae545d91Smrgdone 678ae545d91Smrg 679ae545d91Smrgif $lt_cl_silent; then 680ae545d91Smrg exec AS_MESSAGE_FD>/dev/null 681ae545d91Smrgfi 682ae545d91Smrg_LTEOF 683ae545d91Smrg 684ae545d91Smrgcat >>"$CONFIG_LT" <<_LTEOF 685ae545d91Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 686ae545d91Smrg_LTEOF 687ae545d91Smrg 688ae545d91Smrgcat >>"$CONFIG_LT" <<\_LTEOF 689ae545d91SmrgAC_MSG_NOTICE([creating $ofile]) 690ae545d91Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 691ae545d91SmrgAS_EXIT(0) 692ae545d91Smrg_LTEOF 693ae545d91Smrgchmod +x "$CONFIG_LT" 694ae545d91Smrg 695ae545d91Smrg# configure is writing to config.log, but config.lt does its own redirection, 696ae545d91Smrg# appending to config.log, which fails on DOS, as config.log is still kept 697ae545d91Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 698ae545d91Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 699ae545d91Smrglt_cl_success=: 700ae545d91Smrgtest yes = "$silent" && 701ae545d91Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 702ae545d91Smrgexec AS_MESSAGE_LOG_FD>/dev/null 703ae545d91Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 704ae545d91Smrgexec AS_MESSAGE_LOG_FD>>config.log 705ae545d91Smrg$lt_cl_success || AS_EXIT(1) 706ae545d91Smrg])# LT_OUTPUT 707ae545d91Smrg 708ae545d91Smrg 709ae545d91Smrg# _LT_CONFIG(TAG) 710ae545d91Smrg# --------------- 711ae545d91Smrg# If TAG is the built-in tag, create an initial libtool script with a 712ae545d91Smrg# default configuration from the untagged config vars. Otherwise add code 713ae545d91Smrg# to config.status for appending the configuration named by TAG from the 714ae545d91Smrg# matching tagged config vars. 715ae545d91Smrgm4_defun([_LT_CONFIG], 716ae545d91Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 717ae545d91Smrg_LT_CONFIG_SAVE_COMMANDS([ 718ae545d91Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 719ae545d91Smrg m4_if(_LT_TAG, [C], [ 720ae545d91Smrg # See if we are running on zsh, and set the options that allow our 721ae545d91Smrg # commands through without removal of \ escapes. 722ae545d91Smrg if test -n "${ZSH_VERSION+set}"; then 723ae545d91Smrg setopt NO_GLOB_SUBST 724ae545d91Smrg fi 725ae545d91Smrg 726ae545d91Smrg cfgfile=${ofile}T 727ae545d91Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 728ae545d91Smrg $RM "$cfgfile" 729ae545d91Smrg 730ae545d91Smrg cat <<_LT_EOF >> "$cfgfile" 731ae545d91Smrg#! $SHELL 732ae545d91Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 733ae545d91Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 734ae545d91Smrg 735ae545d91Smrg# Provide generalized library-building support services. 736ae545d91Smrg# Written by Gordon Matzigkeit, 1996 737ae545d91Smrg 738ae545d91Smrg_LT_COPYING 739ae545d91Smrg_LT_LIBTOOL_TAGS 740ae545d91Smrg 741ae545d91Smrg# Configured defaults for sys_lib_dlsearch_path munging. 742ae545d91Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 743ae545d91Smrg 744ae545d91Smrg# ### BEGIN LIBTOOL CONFIG 745ae545d91Smrg_LT_LIBTOOL_CONFIG_VARS 746ae545d91Smrg_LT_LIBTOOL_TAG_VARS 747ae545d91Smrg# ### END LIBTOOL CONFIG 748ae545d91Smrg 749ae545d91Smrg_LT_EOF 750ae545d91Smrg 751ae545d91Smrg cat <<'_LT_EOF' >> "$cfgfile" 752ae545d91Smrg 753ae545d91Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 754ae545d91Smrg 755ae545d91Smrg_LT_PREPARE_MUNGE_PATH_LIST 756ae545d91Smrg_LT_PREPARE_CC_BASENAME 757ae545d91Smrg 758ae545d91Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 759ae545d91Smrg 760ae545d91Smrg_LT_EOF 761ae545d91Smrg 762ae545d91Smrg case $host_os in 763ae545d91Smrg aix3*) 764ae545d91Smrg cat <<\_LT_EOF >> "$cfgfile" 765ae545d91Smrg# AIX sometimes has problems with the GCC collect2 program. For some 766ae545d91Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 767ae545d91Smrg# vanish in a puff of smoke. 768ae545d91Smrgif test set != "${COLLECT_NAMES+set}"; then 769ae545d91Smrg COLLECT_NAMES= 770ae545d91Smrg export COLLECT_NAMES 771ae545d91Smrgfi 772ae545d91Smrg_LT_EOF 773ae545d91Smrg ;; 774ae545d91Smrg esac 775ae545d91Smrg 776ae545d91Smrg _LT_PROG_LTMAIN 777ae545d91Smrg 778ae545d91Smrg # We use sed instead of cat because bash on DJGPP gets confused if 779ae545d91Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 780ae545d91Smrg # text mode, it properly converts lines to CR/LF. This bash problem 781ae545d91Smrg # is reportedly fixed, but why not run on old versions too? 782ae545d91Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 783ae545d91Smrg || (rm -f "$cfgfile"; exit 1) 784ae545d91Smrg 785ae545d91Smrg mv -f "$cfgfile" "$ofile" || 786ae545d91Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 787ae545d91Smrg chmod +x "$ofile" 788ae545d91Smrg], 789ae545d91Smrg[cat <<_LT_EOF >> "$ofile" 790ae545d91Smrg 791ae545d91Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 792ae545d91Smrgdnl in a comment (ie after a #). 793ae545d91Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 794ae545d91Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 795ae545d91Smrg# ### END LIBTOOL TAG CONFIG: $1 796ae545d91Smrg_LT_EOF 797ae545d91Smrg])dnl /m4_if 798ae545d91Smrg], 799ae545d91Smrg[m4_if([$1], [], [ 800ae545d91Smrg PACKAGE='$PACKAGE' 801ae545d91Smrg VERSION='$VERSION' 802ae545d91Smrg RM='$RM' 803ae545d91Smrg ofile='$ofile'], []) 804ae545d91Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 805ae545d91Smrg])# _LT_CONFIG 806ae545d91Smrg 807ae545d91Smrg 808ae545d91Smrg# LT_SUPPORTED_TAG(TAG) 809ae545d91Smrg# --------------------- 810ae545d91Smrg# Trace this macro to discover what tags are supported by the libtool 811ae545d91Smrg# --tag option, using: 812ae545d91Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 813ae545d91SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 814ae545d91Smrg 815ae545d91Smrg 816ae545d91Smrg# C support is built-in for now 817ae545d91Smrgm4_define([_LT_LANG_C_enabled], []) 818ae545d91Smrgm4_define([_LT_TAGS], []) 819ae545d91Smrg 820ae545d91Smrg 821ae545d91Smrg# LT_LANG(LANG) 822ae545d91Smrg# ------------- 823ae545d91Smrg# Enable libtool support for the given language if not already enabled. 824ae545d91SmrgAC_DEFUN([LT_LANG], 825ae545d91Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 826ae545d91Smrgm4_case([$1], 827ae545d91Smrg [C], [_LT_LANG(C)], 828ae545d91Smrg [C++], [_LT_LANG(CXX)], 829ae545d91Smrg [Go], [_LT_LANG(GO)], 830ae545d91Smrg [Java], [_LT_LANG(GCJ)], 831ae545d91Smrg [Fortran 77], [_LT_LANG(F77)], 832ae545d91Smrg [Fortran], [_LT_LANG(FC)], 833ae545d91Smrg [Windows Resource], [_LT_LANG(RC)], 834ae545d91Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 835ae545d91Smrg [_LT_LANG($1)], 836ae545d91Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 837ae545d91Smrg])# LT_LANG 838ae545d91Smrg 839ae545d91Smrg 840ae545d91Smrg# _LT_LANG(LANGNAME) 841ae545d91Smrg# ------------------ 842ae545d91Smrgm4_defun([_LT_LANG], 843ae545d91Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 844ae545d91Smrg [LT_SUPPORTED_TAG([$1])dnl 845ae545d91Smrg m4_append([_LT_TAGS], [$1 ])dnl 846ae545d91Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 847ae545d91Smrg _LT_LANG_$1_CONFIG($1)])dnl 848ae545d91Smrg])# _LT_LANG 849ae545d91Smrg 850ae545d91Smrg 851ae545d91Smrgm4_ifndef([AC_PROG_GO], [ 852ae545d91Smrg############################################################ 853ae545d91Smrg# NOTE: This macro has been submitted for inclusion into # 854ae545d91Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 855ae545d91Smrg# a released version of Autoconf we should remove this # 856ae545d91Smrg# macro and use it instead. # 857ae545d91Smrg############################################################ 858ae545d91Smrgm4_defun([AC_PROG_GO], 859ae545d91Smrg[AC_LANG_PUSH(Go)dnl 860ae545d91SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 861ae545d91SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 862ae545d91Smrg_AC_ARG_VAR_LDFLAGS()dnl 863ae545d91SmrgAC_CHECK_TOOL(GOC, gccgo) 864ae545d91Smrgif test -z "$GOC"; then 865ae545d91Smrg if test -n "$ac_tool_prefix"; then 866ae545d91Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 867ae545d91Smrg fi 868ae545d91Smrgfi 869ae545d91Smrgif test -z "$GOC"; then 870ae545d91Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 871ae545d91Smrgfi 872ae545d91Smrg])#m4_defun 873ae545d91Smrg])#m4_ifndef 874ae545d91Smrg 875ae545d91Smrg 876ae545d91Smrg# _LT_LANG_DEFAULT_CONFIG 877ae545d91Smrg# ----------------------- 878ae545d91Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 879ae545d91Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 880ae545d91Smrg [LT_LANG(CXX)], 881ae545d91Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 882ae545d91Smrg 883ae545d91SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 884ae545d91Smrg [LT_LANG(F77)], 885ae545d91Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 886ae545d91Smrg 887ae545d91SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 888ae545d91Smrg [LT_LANG(FC)], 889ae545d91Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 890ae545d91Smrg 891ae545d91Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 892ae545d91Smrgdnl pulling things in needlessly. 893ae545d91SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 894ae545d91Smrg [LT_LANG(GCJ)], 895ae545d91Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 896ae545d91Smrg [LT_LANG(GCJ)], 897ae545d91Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 898ae545d91Smrg [LT_LANG(GCJ)], 899ae545d91Smrg [m4_ifdef([AC_PROG_GCJ], 900ae545d91Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 901ae545d91Smrg m4_ifdef([A][M_PROG_GCJ], 902ae545d91Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 903ae545d91Smrg m4_ifdef([LT_PROG_GCJ], 904ae545d91Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 905ae545d91Smrg 906ae545d91SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 907ae545d91Smrg [LT_LANG(GO)], 908ae545d91Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 909ae545d91Smrg 910ae545d91SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 911ae545d91Smrg [LT_LANG(RC)], 912ae545d91Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 913ae545d91Smrg])# _LT_LANG_DEFAULT_CONFIG 914ae545d91Smrg 915ae545d91Smrg# Obsolete macros: 916ae545d91SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 917ae545d91SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 918ae545d91SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 919ae545d91SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 920ae545d91SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 921ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 922ae545d91Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 923ae545d91Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 924ae545d91Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 925ae545d91Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 926ae545d91Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 927ae545d91Smrg 928ae545d91Smrg 929ae545d91Smrg# _LT_TAG_COMPILER 930ae545d91Smrg# ---------------- 931ae545d91Smrgm4_defun([_LT_TAG_COMPILER], 932ae545d91Smrg[AC_REQUIRE([AC_PROG_CC])dnl 933ae545d91Smrg 934ae545d91Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 935ae545d91Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 936ae545d91Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 937ae545d91Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 938ae545d91Smrg 939ae545d91Smrg# If no C compiler was specified, use CC. 940ae545d91SmrgLTCC=${LTCC-"$CC"} 941ae545d91Smrg 942ae545d91Smrg# If no C compiler flags were specified, use CFLAGS. 943ae545d91SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 944ae545d91Smrg 945ae545d91Smrg# Allow CC to be a program name with arguments. 946ae545d91Smrgcompiler=$CC 947ae545d91Smrg])# _LT_TAG_COMPILER 948ae545d91Smrg 949ae545d91Smrg 950ae545d91Smrg# _LT_COMPILER_BOILERPLATE 951ae545d91Smrg# ------------------------ 952ae545d91Smrg# Check for compiler boilerplate output or warnings with 953ae545d91Smrg# the simple compiler test code. 954ae545d91Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 955ae545d91Smrg[m4_require([_LT_DECL_SED])dnl 956ae545d91Smrgac_outfile=conftest.$ac_objext 957ae545d91Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 958ae545d91Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 959ae545d91Smrg_lt_compiler_boilerplate=`cat conftest.err` 960ae545d91Smrg$RM conftest* 961ae545d91Smrg])# _LT_COMPILER_BOILERPLATE 962ae545d91Smrg 963ae545d91Smrg 964ae545d91Smrg# _LT_LINKER_BOILERPLATE 965ae545d91Smrg# ---------------------- 966ae545d91Smrg# Check for linker boilerplate output or warnings with 967ae545d91Smrg# the simple link test code. 968ae545d91Smrgm4_defun([_LT_LINKER_BOILERPLATE], 969ae545d91Smrg[m4_require([_LT_DECL_SED])dnl 970ae545d91Smrgac_outfile=conftest.$ac_objext 971ae545d91Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 972ae545d91Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 973ae545d91Smrg_lt_linker_boilerplate=`cat conftest.err` 974ae545d91Smrg$RM -r conftest* 975ae545d91Smrg])# _LT_LINKER_BOILERPLATE 976ae545d91Smrg 977ae545d91Smrg 978ae545d91Smrg# _LT_REQUIRED_DARWIN_CHECKS 979ae545d91Smrg# ------------------------- 980ae545d91Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 981ae545d91Smrg case $host_os in 982ae545d91Smrg rhapsody* | darwin*) 983ae545d91Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 984ae545d91Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 985ae545d91Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 986ae545d91Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 987ae545d91Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 988ae545d91Smrg _LT_DECL([], [DSYMUTIL], [1], 989ae545d91Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 990ae545d91Smrg _LT_DECL([], [NMEDIT], [1], 991ae545d91Smrg [Tool to change global to local symbols on Mac OS X]) 992ae545d91Smrg _LT_DECL([], [LIPO], [1], 993ae545d91Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 994ae545d91Smrg _LT_DECL([], [OTOOL], [1], 995ae545d91Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 996ae545d91Smrg _LT_DECL([], [OTOOL64], [1], 997ae545d91Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 998ae545d91Smrg 999ae545d91Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1000ae545d91Smrg [lt_cv_apple_cc_single_mod=no 1001ae545d91Smrg if test -z "$LT_MULTI_MODULE"; then 1002ae545d91Smrg # By default we will add the -single_module flag. You can override 1003ae545d91Smrg # by either setting the environment variable LT_MULTI_MODULE 1004ae545d91Smrg # non-empty at configure time, or by adding -multi_module to the 1005ae545d91Smrg # link flags. 1006ae545d91Smrg rm -rf libconftest.dylib* 1007ae545d91Smrg echo "int foo(void){return 1;}" > conftest.c 1008ae545d91Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1009ae545d91Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1010ae545d91Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1011ae545d91Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1012ae545d91Smrg _lt_result=$? 1013ae545d91Smrg # If there is a non-empty error log, and "single_module" 1014ae545d91Smrg # appears in it, assume the flag caused a linker warning 1015ae545d91Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1016ae545d91Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1017ae545d91Smrg # Otherwise, if the output was created with a 0 exit code from 1018ae545d91Smrg # the compiler, it worked. 1019ae545d91Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1020ae545d91Smrg lt_cv_apple_cc_single_mod=yes 1021ae545d91Smrg else 1022ae545d91Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1023ae545d91Smrg fi 1024ae545d91Smrg rm -rf libconftest.dylib* 1025ae545d91Smrg rm -f conftest.* 1026ae545d91Smrg fi]) 1027ae545d91Smrg 1028ae545d91Smrg # Feature test to disable chained fixups since it is not 1029ae545d91Smrg # compatible with '-undefined dynamic_lookup' 1030ae545d91Smrg AC_CACHE_CHECK([for -no_fixup_chains linker flag], 1031ae545d91Smrg [lt_cv_support_no_fixup_chains], 1032ae545d91Smrg [ save_LDFLAGS=$LDFLAGS 1033ae545d91Smrg LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" 1034ae545d91Smrg AC_LINK_IFELSE( 1035ae545d91Smrg [AC_LANG_PROGRAM([],[])], 1036ae545d91Smrg lt_cv_support_no_fixup_chains=yes, 1037ae545d91Smrg lt_cv_support_no_fixup_chains=no 1038ae545d91Smrg ) 1039ae545d91Smrg LDFLAGS=$save_LDFLAGS 1040ae545d91Smrg ] 1041ae545d91Smrg ) 1042ae545d91Smrg 1043ae545d91Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1044ae545d91Smrg [lt_cv_ld_exported_symbols_list], 1045ae545d91Smrg [lt_cv_ld_exported_symbols_list=no 1046ae545d91Smrg save_LDFLAGS=$LDFLAGS 1047ae545d91Smrg echo "_main" > conftest.sym 1048ae545d91Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1049ae545d91Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1050ae545d91Smrg [lt_cv_ld_exported_symbols_list=yes], 1051ae545d91Smrg [lt_cv_ld_exported_symbols_list=no]) 1052ae545d91Smrg LDFLAGS=$save_LDFLAGS 1053ae545d91Smrg ]) 1054ae545d91Smrg 1055ae545d91Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1056ae545d91Smrg [lt_cv_ld_force_load=no 1057ae545d91Smrg cat > conftest.c << _LT_EOF 1058ae545d91Smrgint forced_loaded() { return 2;} 1059ae545d91Smrg_LT_EOF 1060ae545d91Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1061ae545d91Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1062ae545d91Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1063ae545d91Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1064ae545d91Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1065ae545d91Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1066ae545d91Smrg cat > conftest.c << _LT_EOF 1067ae545d91Smrgint main(void) { return 0;} 1068ae545d91Smrg_LT_EOF 1069ae545d91Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1070ae545d91Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1071ae545d91Smrg _lt_result=$? 1072ae545d91Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1073ae545d91Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1074ae545d91Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1075ae545d91Smrg lt_cv_ld_force_load=yes 1076ae545d91Smrg else 1077ae545d91Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1078ae545d91Smrg fi 1079ae545d91Smrg rm -f conftest.err libconftest.a conftest conftest.c 1080ae545d91Smrg rm -rf conftest.dSYM 1081ae545d91Smrg ]) 1082ae545d91Smrg case $host_os in 1083ae545d91Smrg rhapsody* | darwin1.[[012]]) 1084ae545d91Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1085ae545d91Smrg darwin1.*) 1086ae545d91Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1087ae545d91Smrg darwin*) 1088ae545d91Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 1089ae545d91Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 1090ae545d91Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1091ae545d91Smrg *) 1092ae545d91Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' 1093ae545d91Smrg if test yes = "$lt_cv_support_no_fixup_chains"; then 1094ae545d91Smrg AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains']) 1095ae545d91Smrg fi 1096ae545d91Smrg ;; 1097ae545d91Smrg esac 1098ae545d91Smrg ;; 1099ae545d91Smrg esac 1100ae545d91Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1101ae545d91Smrg _lt_dar_single_mod='$single_module' 1102ae545d91Smrg fi 1103ae545d91Smrg _lt_dar_needs_single_mod=no 1104ae545d91Smrg case $host_os in 1105ae545d91Smrg rhapsody* | darwin1.*) 1106ae545d91Smrg _lt_dar_needs_single_mod=yes ;; 1107ae545d91Smrg darwin*) 1108ae545d91Smrg # When targeting Mac OS X 10.4 (darwin 8) or later, 1109ae545d91Smrg # -single_module is the default and -multi_module is unsupported. 1110ae545d91Smrg # The toolchain on macOS 10.14 (darwin 18) and later cannot 1111ae545d91Smrg # target any OS version that needs -single_module. 1112ae545d91Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1113ae545d91Smrg 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*) 1114ae545d91Smrg _lt_dar_needs_single_mod=yes ;; 1115ae545d91Smrg esac 1116ae545d91Smrg ;; 1117ae545d91Smrg esac 1118ae545d91Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1119ae545d91Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1120ae545d91Smrg else 1121ae545d91Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1122ae545d91Smrg fi 1123ae545d91Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1124ae545d91Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1125ae545d91Smrg else 1126ae545d91Smrg _lt_dsymutil= 1127ae545d91Smrg fi 1128ae545d91Smrg ;; 1129ae545d91Smrg esac 1130ae545d91Smrg]) 1131ae545d91Smrg 1132ae545d91Smrg 1133ae545d91Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1134ae545d91Smrg# --------------------------------- 1135ae545d91Smrg# Checks for linker and compiler features on darwin 1136ae545d91Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1137ae545d91Smrg[ 1138ae545d91Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1139ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1140ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1141ae545d91Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1142ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1143ae545d91Smrg if test yes = "$lt_cv_ld_force_load"; then 1144ae545d91Smrg _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\"`' 1145ae545d91Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1146ae545d91Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1147ae545d91Smrg else 1148ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1149ae545d91Smrg fi 1150ae545d91Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1151ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1152ae545d91Smrg case $cc_basename in 1153ae545d91Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1154ae545d91Smrg *) _lt_dar_can_shared=$GCC ;; 1155ae545d91Smrg esac 1156ae545d91Smrg if test yes = "$_lt_dar_can_shared"; then 1157ae545d91Smrg output_verbose_link_cmd=func_echo_all 1158ae545d91Smrg _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" 1159ae545d91Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1160ae545d91Smrg _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" 1161ae545d91Smrg _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" 1162ae545d91Smrg m4_if([$1], [CXX], 1163ae545d91Smrg[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then 1164ae545d91Smrg _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" 1165ae545d91Smrg _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" 1166ae545d91Smrg fi 1167ae545d91Smrg],[]) 1168ae545d91Smrg else 1169ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1170ae545d91Smrg fi 1171ae545d91Smrg]) 1172ae545d91Smrg 1173ae545d91Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1174ae545d91Smrg# ---------------------------------- 1175ae545d91Smrg# Links a minimal program and checks the executable 1176ae545d91Smrg# for the system default hardcoded library path. In most cases, 1177ae545d91Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 1178ae545d91Smrg# the location of the communication and MPI libs are included too. 1179ae545d91Smrg# If we don't find anything, use the default library path according 1180ae545d91Smrg# to the aix ld manual. 1181ae545d91Smrg# Store the results from the different compilers for each TAGNAME. 1182ae545d91Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1183ae545d91Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1184ae545d91Smrg[m4_require([_LT_DECL_SED])dnl 1185ae545d91Smrgif test set = "${lt_cv_aix_libpath+set}"; then 1186ae545d91Smrg aix_libpath=$lt_cv_aix_libpath 1187ae545d91Smrgelse 1188ae545d91Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1189ae545d91Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1190ae545d91Smrg lt_aix_libpath_sed='[ 1191ae545d91Smrg /Import File Strings/,/^$/ { 1192ae545d91Smrg /^0/ { 1193ae545d91Smrg s/^0 *\([^ ]*\) *$/\1/ 1194ae545d91Smrg p 1195ae545d91Smrg } 1196ae545d91Smrg }]' 1197ae545d91Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1198ae545d91Smrg # Check for a 64-bit object if we didn't find anything. 1199ae545d91Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1200ae545d91Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1201ae545d91Smrg fi],[]) 1202ae545d91Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1203ae545d91Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1204ae545d91Smrg fi 1205ae545d91Smrg ]) 1206ae545d91Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1207ae545d91Smrgfi 1208ae545d91Smrg])# _LT_SYS_MODULE_PATH_AIX 1209ae545d91Smrg 1210ae545d91Smrg 1211ae545d91Smrg# _LT_SHELL_INIT(ARG) 1212ae545d91Smrg# ------------------- 1213ae545d91Smrgm4_define([_LT_SHELL_INIT], 1214ae545d91Smrg[m4_divert_text([M4SH-INIT], [$1 1215ae545d91Smrg])])# _LT_SHELL_INIT 1216ae545d91Smrg 1217ae545d91Smrg 1218ae545d91Smrg 1219ae545d91Smrg# _LT_PROG_ECHO_BACKSLASH 1220ae545d91Smrg# ----------------------- 1221ae545d91Smrg# Find how we can fake an echo command that does not interpret backslash. 1222ae545d91Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1223ae545d91Smrg# of the generated configure script that will find a shell with a builtin 1224ae545d91Smrg# printf (that we can use as an echo command). 1225ae545d91Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1226ae545d91Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1227ae545d91SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1228ae545d91SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1229ae545d91Smrg 1230ae545d91SmrgAC_MSG_CHECKING([how to print strings]) 1231ae545d91Smrg# Test print first, because it will be a builtin if present. 1232ae545d91Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1233ae545d91Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1234ae545d91Smrg ECHO='print -r --' 1235ae545d91Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1236ae545d91Smrg ECHO='printf %s\n' 1237ae545d91Smrgelse 1238ae545d91Smrg # Use this function as a fallback that always works. 1239ae545d91Smrg func_fallback_echo () 1240ae545d91Smrg { 1241ae545d91Smrg eval 'cat <<_LTECHO_EOF 1242ae545d91Smrg$[]1 1243ae545d91Smrg_LTECHO_EOF' 1244ae545d91Smrg } 1245ae545d91Smrg ECHO='func_fallback_echo' 1246ae545d91Smrgfi 1247ae545d91Smrg 1248ae545d91Smrg# func_echo_all arg... 1249ae545d91Smrg# Invoke $ECHO with all args, space-separated. 1250ae545d91Smrgfunc_echo_all () 1251ae545d91Smrg{ 1252ae545d91Smrg $ECHO "$*" 1253ae545d91Smrg} 1254ae545d91Smrg 1255ae545d91Smrgcase $ECHO in 1256ae545d91Smrg printf*) AC_MSG_RESULT([printf]) ;; 1257ae545d91Smrg print*) AC_MSG_RESULT([print -r]) ;; 1258ae545d91Smrg *) AC_MSG_RESULT([cat]) ;; 1259ae545d91Smrgesac 1260ae545d91Smrg 1261ae545d91Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1262ae545d91Smrg[_AS_DETECT_SUGGESTED([ 1263ae545d91Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1264ae545d91Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1265ae545d91Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1266ae545d91Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1267ae545d91Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1268ae545d91Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1269ae545d91Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1270ae545d91Smrg 1271ae545d91Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1272ae545d91Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1273ae545d91Smrg])# _LT_PROG_ECHO_BACKSLASH 1274ae545d91Smrg 1275ae545d91Smrg 1276ae545d91Smrg# _LT_WITH_SYSROOT 1277ae545d91Smrg# ---------------- 1278ae545d91SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1279ae545d91Smrg[m4_require([_LT_DECL_SED])dnl 1280ae545d91SmrgAC_MSG_CHECKING([for sysroot]) 1281ae545d91SmrgAC_ARG_WITH([sysroot], 1282ae545d91Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1283ae545d91Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 1284ae545d91Smrg if not specified).])], 1285ae545d91Smrg[], [with_sysroot=no]) 1286ae545d91Smrg 1287ae545d91Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1288ae545d91Smrgdnl in case the user passed a directory name. 1289ae545d91Smrglt_sysroot= 1290ae545d91Smrgcase $with_sysroot in #( 1291ae545d91Smrg yes) 1292ae545d91Smrg if test yes = "$GCC"; then 1293ae545d91Smrg # Trim trailing / since we'll always append absolute paths and we want 1294ae545d91Smrg # to avoid //, if only for less confusing output for the user. 1295ae545d91Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` 1296ae545d91Smrg fi 1297ae545d91Smrg ;; #( 1298ae545d91Smrg /*) 1299ae545d91Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 1300ae545d91Smrg ;; #( 1301ae545d91Smrg no|'') 1302ae545d91Smrg ;; #( 1303ae545d91Smrg *) 1304ae545d91Smrg AC_MSG_RESULT([$with_sysroot]) 1305ae545d91Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1306ae545d91Smrg ;; 1307ae545d91Smrgesac 1308ae545d91Smrg 1309ae545d91Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1310ae545d91Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1311ae545d91Smrg[dependent libraries, and where our libraries should be installed.])]) 1312ae545d91Smrg 1313ae545d91Smrg# _LT_ENABLE_LOCK 1314ae545d91Smrg# --------------- 1315ae545d91Smrgm4_defun([_LT_ENABLE_LOCK], 1316ae545d91Smrg[AC_ARG_ENABLE([libtool-lock], 1317ae545d91Smrg [AS_HELP_STRING([--disable-libtool-lock], 1318ae545d91Smrg [avoid locking (might break parallel builds)])]) 1319ae545d91Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1320ae545d91Smrg 1321ae545d91Smrg# Some flags need to be propagated to the compiler or linker for good 1322ae545d91Smrg# libtool support. 1323ae545d91Smrgcase $host in 1324ae545d91Smrgia64-*-hpux*) 1325ae545d91Smrg # Find out what ABI is being produced by ac_compile, and set mode 1326ae545d91Smrg # options accordingly. 1327ae545d91Smrg echo 'int i;' > conftest.$ac_ext 1328ae545d91Smrg if AC_TRY_EVAL(ac_compile); then 1329ae545d91Smrg case `$FILECMD conftest.$ac_objext` in 1330ae545d91Smrg *ELF-32*) 1331ae545d91Smrg HPUX_IA64_MODE=32 1332ae545d91Smrg ;; 1333ae545d91Smrg *ELF-64*) 1334ae545d91Smrg HPUX_IA64_MODE=64 1335ae545d91Smrg ;; 1336ae545d91Smrg esac 1337ae545d91Smrg fi 1338ae545d91Smrg rm -rf conftest* 1339ae545d91Smrg ;; 1340ae545d91Smrg*-*-irix6*) 1341ae545d91Smrg # Find out what ABI is being produced by ac_compile, and set linker 1342ae545d91Smrg # options accordingly. 1343ae545d91Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1344ae545d91Smrg if AC_TRY_EVAL(ac_compile); then 1345ae545d91Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 1346ae545d91Smrg case `$FILECMD conftest.$ac_objext` in 1347ae545d91Smrg *32-bit*) 1348ae545d91Smrg LD="${LD-ld} -melf32bsmip" 1349ae545d91Smrg ;; 1350ae545d91Smrg *N32*) 1351ae545d91Smrg LD="${LD-ld} -melf32bmipn32" 1352ae545d91Smrg ;; 1353ae545d91Smrg *64-bit*) 1354ae545d91Smrg LD="${LD-ld} -melf64bmip" 1355ae545d91Smrg ;; 1356ae545d91Smrg esac 1357ae545d91Smrg else 1358ae545d91Smrg case `$FILECMD conftest.$ac_objext` in 1359ae545d91Smrg *32-bit*) 1360ae545d91Smrg LD="${LD-ld} -32" 1361ae545d91Smrg ;; 1362ae545d91Smrg *N32*) 1363ae545d91Smrg LD="${LD-ld} -n32" 1364ae545d91Smrg ;; 1365ae545d91Smrg *64-bit*) 1366ae545d91Smrg LD="${LD-ld} -64" 1367ae545d91Smrg ;; 1368ae545d91Smrg esac 1369ae545d91Smrg fi 1370ae545d91Smrg fi 1371ae545d91Smrg rm -rf conftest* 1372ae545d91Smrg ;; 1373ae545d91Smrg 1374ae545d91Smrgmips64*-*linux*) 1375ae545d91Smrg # Find out what ABI is being produced by ac_compile, and set linker 1376ae545d91Smrg # options accordingly. 1377ae545d91Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1378ae545d91Smrg if AC_TRY_EVAL(ac_compile); then 1379ae545d91Smrg emul=elf 1380ae545d91Smrg case `$FILECMD conftest.$ac_objext` in 1381ae545d91Smrg *32-bit*) 1382ae545d91Smrg emul="${emul}32" 1383ae545d91Smrg ;; 1384ae545d91Smrg *64-bit*) 1385ae545d91Smrg emul="${emul}64" 1386ae545d91Smrg ;; 1387ae545d91Smrg esac 1388ae545d91Smrg case `$FILECMD conftest.$ac_objext` in 1389ae545d91Smrg *MSB*) 1390ae545d91Smrg emul="${emul}btsmip" 1391ae545d91Smrg ;; 1392ae545d91Smrg *LSB*) 1393ae545d91Smrg emul="${emul}ltsmip" 1394ae545d91Smrg ;; 1395ae545d91Smrg esac 1396ae545d91Smrg case `$FILECMD conftest.$ac_objext` in 1397ae545d91Smrg *N32*) 1398ae545d91Smrg emul="${emul}n32" 1399ae545d91Smrg ;; 1400ae545d91Smrg esac 1401ae545d91Smrg LD="${LD-ld} -m $emul" 1402ae545d91Smrg fi 1403ae545d91Smrg rm -rf conftest* 1404ae545d91Smrg ;; 1405ae545d91Smrg 1406ae545d91Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1407ae545d91Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) 1408ae545d91Smrg # Find out what ABI is being produced by ac_compile, and set linker 1409ae545d91Smrg # options accordingly. Note that the listed cases only cover the 1410ae545d91Smrg # situations where additional linker options are needed (such as when 1411ae545d91Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1412ae545d91Smrg # vice versa); the common cases where no linker options are needed do 1413ae545d91Smrg # not appear in the list. 1414ae545d91Smrg echo 'int i;' > conftest.$ac_ext 1415ae545d91Smrg if AC_TRY_EVAL(ac_compile); then 1416ae545d91Smrg case `$FILECMD conftest.o` in 1417ae545d91Smrg *32-bit*) 1418ae545d91Smrg case $host in 1419ae545d91Smrg x86_64-*kfreebsd*-gnu) 1420ae545d91Smrg LD="${LD-ld} -m elf_i386_fbsd" 1421ae545d91Smrg ;; 1422ae545d91Smrg x86_64-*linux*|x86_64-gnu*) 1423ae545d91Smrg case `$FILECMD conftest.o` in 1424ae545d91Smrg *x86-64*) 1425ae545d91Smrg LD="${LD-ld} -m elf32_x86_64" 1426ae545d91Smrg ;; 1427ae545d91Smrg *) 1428ae545d91Smrg LD="${LD-ld} -m elf_i386" 1429ae545d91Smrg ;; 1430ae545d91Smrg esac 1431ae545d91Smrg ;; 1432ae545d91Smrg powerpc64le-*linux*) 1433ae545d91Smrg LD="${LD-ld} -m elf32lppclinux" 1434ae545d91Smrg ;; 1435ae545d91Smrg powerpc64-*linux*) 1436ae545d91Smrg LD="${LD-ld} -m elf32ppclinux" 1437ae545d91Smrg ;; 1438ae545d91Smrg s390x-*linux*) 1439ae545d91Smrg LD="${LD-ld} -m elf_s390" 1440ae545d91Smrg ;; 1441ae545d91Smrg sparc64-*linux*) 1442ae545d91Smrg LD="${LD-ld} -m elf32_sparc" 1443ae545d91Smrg ;; 1444ae545d91Smrg esac 1445ae545d91Smrg ;; 1446ae545d91Smrg *64-bit*) 1447ae545d91Smrg case $host in 1448ae545d91Smrg x86_64-*kfreebsd*-gnu) 1449ae545d91Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1450ae545d91Smrg ;; 1451ae545d91Smrg x86_64-*linux*|x86_64-gnu*) 1452ae545d91Smrg LD="${LD-ld} -m elf_x86_64" 1453ae545d91Smrg ;; 1454ae545d91Smrg powerpcle-*linux*) 1455ae545d91Smrg LD="${LD-ld} -m elf64lppc" 1456ae545d91Smrg ;; 1457ae545d91Smrg powerpc-*linux*) 1458ae545d91Smrg LD="${LD-ld} -m elf64ppc" 1459ae545d91Smrg ;; 1460ae545d91Smrg s390*-*linux*|s390*-*tpf*) 1461ae545d91Smrg LD="${LD-ld} -m elf64_s390" 1462ae545d91Smrg ;; 1463ae545d91Smrg sparc*-*linux*) 1464ae545d91Smrg LD="${LD-ld} -m elf64_sparc" 1465ae545d91Smrg ;; 1466ae545d91Smrg esac 1467ae545d91Smrg ;; 1468ae545d91Smrg esac 1469ae545d91Smrg fi 1470ae545d91Smrg rm -rf conftest* 1471ae545d91Smrg ;; 1472ae545d91Smrg 1473ae545d91Smrg*-*-sco3.2v5*) 1474ae545d91Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1475ae545d91Smrg SAVE_CFLAGS=$CFLAGS 1476ae545d91Smrg CFLAGS="$CFLAGS -belf" 1477ae545d91Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1478ae545d91Smrg [AC_LANG_PUSH(C) 1479ae545d91Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1480ae545d91Smrg AC_LANG_POP]) 1481ae545d91Smrg if test yes != "$lt_cv_cc_needs_belf"; then 1482ae545d91Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1483ae545d91Smrg CFLAGS=$SAVE_CFLAGS 1484ae545d91Smrg fi 1485ae545d91Smrg ;; 1486ae545d91Smrg*-*solaris*) 1487ae545d91Smrg # Find out what ABI is being produced by ac_compile, and set linker 1488ae545d91Smrg # options accordingly. 1489ae545d91Smrg echo 'int i;' > conftest.$ac_ext 1490ae545d91Smrg if AC_TRY_EVAL(ac_compile); then 1491ae545d91Smrg case `$FILECMD conftest.o` in 1492ae545d91Smrg *64-bit*) 1493ae545d91Smrg case $lt_cv_prog_gnu_ld in 1494ae545d91Smrg yes*) 1495ae545d91Smrg case $host in 1496ae545d91Smrg i?86-*-solaris*|x86_64-*-solaris*) 1497ae545d91Smrg LD="${LD-ld} -m elf_x86_64" 1498ae545d91Smrg ;; 1499ae545d91Smrg sparc*-*-solaris*) 1500ae545d91Smrg LD="${LD-ld} -m elf64_sparc" 1501ae545d91Smrg ;; 1502ae545d91Smrg esac 1503ae545d91Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1504ae545d91Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1505ae545d91Smrg LD=${LD-ld}_sol2 1506ae545d91Smrg fi 1507ae545d91Smrg ;; 1508ae545d91Smrg *) 1509ae545d91Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1510ae545d91Smrg LD="${LD-ld} -64" 1511ae545d91Smrg fi 1512ae545d91Smrg ;; 1513ae545d91Smrg esac 1514ae545d91Smrg ;; 1515ae545d91Smrg esac 1516ae545d91Smrg fi 1517ae545d91Smrg rm -rf conftest* 1518ae545d91Smrg ;; 1519ae545d91Smrgesac 1520ae545d91Smrg 1521ae545d91Smrgneed_locks=$enable_libtool_lock 1522ae545d91Smrg])# _LT_ENABLE_LOCK 1523ae545d91Smrg 1524ae545d91Smrg 1525ae545d91Smrg# _LT_PROG_AR 1526ae545d91Smrg# ----------- 1527ae545d91Smrgm4_defun([_LT_PROG_AR], 1528ae545d91Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1529ae545d91Smrg: ${AR=ar} 1530ae545d91Smrg_LT_DECL([], [AR], [1], [The archiver]) 1531ae545d91Smrg 1532ae545d91Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 1533ae545d91Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 1534ae545d91Smrg# higher priority because that's what people were doing historically (setting 1535ae545d91Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 1536ae545d91Smrg# variable obsoleted/removed. 1537ae545d91Smrg 1538ae545d91Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 1539ae545d91Smrglt_ar_flags=$AR_FLAGS 1540ae545d91Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 1541ae545d91Smrg 1542ae545d91Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 1543ae545d91Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 1544ae545d91Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 1545ae545d91Smrg [Flags to create an archive]) 1546ae545d91Smrg 1547ae545d91SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1548ae545d91Smrg [lt_cv_ar_at_file=no 1549ae545d91Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1550ae545d91Smrg [echo conftest.$ac_objext > conftest.lst 1551ae545d91Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1552ae545d91Smrg AC_TRY_EVAL([lt_ar_try]) 1553ae545d91Smrg if test 0 -eq "$ac_status"; then 1554ae545d91Smrg # Ensure the archiver fails upon bogus file names. 1555ae545d91Smrg rm -f conftest.$ac_objext libconftest.a 1556ae545d91Smrg AC_TRY_EVAL([lt_ar_try]) 1557ae545d91Smrg if test 0 -ne "$ac_status"; then 1558ae545d91Smrg lt_cv_ar_at_file=@ 1559ae545d91Smrg fi 1560ae545d91Smrg fi 1561ae545d91Smrg rm -f conftest.* libconftest.a 1562ae545d91Smrg ]) 1563ae545d91Smrg ]) 1564ae545d91Smrg 1565ae545d91Smrgif test no = "$lt_cv_ar_at_file"; then 1566ae545d91Smrg archiver_list_spec= 1567ae545d91Smrgelse 1568ae545d91Smrg archiver_list_spec=$lt_cv_ar_at_file 1569ae545d91Smrgfi 1570ae545d91Smrg_LT_DECL([], [archiver_list_spec], [1], 1571ae545d91Smrg [How to feed a file listing to the archiver]) 1572ae545d91Smrg])# _LT_PROG_AR 1573ae545d91Smrg 1574ae545d91Smrg 1575ae545d91Smrg# _LT_CMD_OLD_ARCHIVE 1576ae545d91Smrg# ------------------- 1577ae545d91Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1578ae545d91Smrg[_LT_PROG_AR 1579ae545d91Smrg 1580ae545d91SmrgAC_CHECK_TOOL(STRIP, strip, :) 1581ae545d91Smrgtest -z "$STRIP" && STRIP=: 1582ae545d91Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1583ae545d91Smrg 1584ae545d91SmrgAC_REQUIRE([AC_PROG_RANLIB]) 1585ae545d91Smrgtest -z "$RANLIB" && RANLIB=: 1586ae545d91Smrg_LT_DECL([], [RANLIB], [1], 1587ae545d91Smrg [Commands used to install an old-style archive]) 1588ae545d91Smrg 1589ae545d91Smrg# Determine commands to create old-style static archives. 1590ae545d91Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1591ae545d91Smrgold_postinstall_cmds='chmod 644 $oldlib' 1592ae545d91Smrgold_postuninstall_cmds= 1593ae545d91Smrg 1594ae545d91Smrgif test -n "$RANLIB"; then 1595ae545d91Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1596ae545d91Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1597ae545d91Smrgfi 1598ae545d91Smrg 1599ae545d91Smrgcase $host_os in 1600ae545d91Smrg darwin*) 1601ae545d91Smrg lock_old_archive_extraction=yes ;; 1602ae545d91Smrg *) 1603ae545d91Smrg lock_old_archive_extraction=no ;; 1604ae545d91Smrgesac 1605ae545d91Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1606ae545d91Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1607ae545d91Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1608ae545d91Smrg [Commands used to build an old-style archive]) 1609ae545d91Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1610ae545d91Smrg [Whether to use a lock for old archive extraction]) 1611ae545d91Smrg])# _LT_CMD_OLD_ARCHIVE 1612ae545d91Smrg 1613ae545d91Smrg 1614ae545d91Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1615ae545d91Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1616ae545d91Smrg# ---------------------------------------------------------------- 1617ae545d91Smrg# Check whether the given compiler option works 1618ae545d91SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1619ae545d91Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1620ae545d91Smrgm4_require([_LT_DECL_SED])dnl 1621ae545d91SmrgAC_CACHE_CHECK([$1], [$2], 1622ae545d91Smrg [$2=no 1623ae545d91Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1624ae545d91Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1625ae545d91Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1626ae545d91Smrg # Insert the option either (1) after the last *FLAGS variable, or 1627ae545d91Smrg # (2) before a word containing "conftest.", or (3) at the end. 1628ae545d91Smrg # Note that $ac_compile itself does not contain backslashes and begins 1629ae545d91Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1630ae545d91Smrg # The option is referenced via a variable to avoid confusing sed. 1631ae545d91Smrg lt_compile=`echo "$ac_compile" | $SED \ 1632ae545d91Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1633ae545d91Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1634ae545d91Smrg -e 's:$: $lt_compiler_flag:'` 1635ae545d91Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1636ae545d91Smrg (eval "$lt_compile" 2>conftest.err) 1637ae545d91Smrg ac_status=$? 1638ae545d91Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1639ae545d91Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1640ae545d91Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 1641ae545d91Smrg # The compiler can only warn and ignore the option if not recognized 1642ae545d91Smrg # So say no if there are warnings other than the usual output. 1643ae545d91Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1644ae545d91Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1645ae545d91Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1646ae545d91Smrg $2=yes 1647ae545d91Smrg fi 1648ae545d91Smrg fi 1649ae545d91Smrg $RM conftest* 1650ae545d91Smrg]) 1651ae545d91Smrg 1652ae545d91Smrgif test yes = "[$]$2"; then 1653ae545d91Smrg m4_if([$5], , :, [$5]) 1654ae545d91Smrgelse 1655ae545d91Smrg m4_if([$6], , :, [$6]) 1656ae545d91Smrgfi 1657ae545d91Smrg])# _LT_COMPILER_OPTION 1658ae545d91Smrg 1659ae545d91Smrg# Old name: 1660ae545d91SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1661ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 1662ae545d91Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1663ae545d91Smrg 1664ae545d91Smrg 1665ae545d91Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1666ae545d91Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1667ae545d91Smrg# ---------------------------------------------------- 1668ae545d91Smrg# Check whether the given linker option works 1669ae545d91SmrgAC_DEFUN([_LT_LINKER_OPTION], 1670ae545d91Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1671ae545d91Smrgm4_require([_LT_DECL_SED])dnl 1672ae545d91SmrgAC_CACHE_CHECK([$1], [$2], 1673ae545d91Smrg [$2=no 1674ae545d91Smrg save_LDFLAGS=$LDFLAGS 1675ae545d91Smrg LDFLAGS="$LDFLAGS $3" 1676ae545d91Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1677ae545d91Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1678ae545d91Smrg # The linker can only warn and ignore the option if not recognized 1679ae545d91Smrg # So say no if there are warnings 1680ae545d91Smrg if test -s conftest.err; then 1681ae545d91Smrg # Append any errors to the config.log. 1682ae545d91Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1683ae545d91Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1684ae545d91Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1685ae545d91Smrg if diff conftest.exp conftest.er2 >/dev/null; then 1686ae545d91Smrg $2=yes 1687ae545d91Smrg fi 1688ae545d91Smrg else 1689ae545d91Smrg $2=yes 1690ae545d91Smrg fi 1691ae545d91Smrg fi 1692ae545d91Smrg $RM -r conftest* 1693ae545d91Smrg LDFLAGS=$save_LDFLAGS 1694ae545d91Smrg]) 1695ae545d91Smrg 1696ae545d91Smrgif test yes = "[$]$2"; then 1697ae545d91Smrg m4_if([$4], , :, [$4]) 1698ae545d91Smrgelse 1699ae545d91Smrg m4_if([$5], , :, [$5]) 1700ae545d91Smrgfi 1701ae545d91Smrg])# _LT_LINKER_OPTION 1702ae545d91Smrg 1703ae545d91Smrg# Old name: 1704ae545d91SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1705ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 1706ae545d91Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1707ae545d91Smrg 1708ae545d91Smrg 1709ae545d91Smrg# LT_CMD_MAX_LEN 1710ae545d91Smrg#--------------- 1711ae545d91SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1712ae545d91Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1713ae545d91Smrg# find the maximum length of command line arguments 1714ae545d91SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1715ae545d91SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1716ae545d91Smrg i=0 1717ae545d91Smrg teststring=ABCD 1718ae545d91Smrg 1719ae545d91Smrg case $build_os in 1720ae545d91Smrg msdosdjgpp*) 1721ae545d91Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1722ae545d91Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1723ae545d91Smrg # during glob expansion). Even if it were fixed, the result of this 1724ae545d91Smrg # check would be larger than it should be. 1725ae545d91Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1726ae545d91Smrg ;; 1727ae545d91Smrg 1728ae545d91Smrg gnu* | ironclad*) 1729ae545d91Smrg # Under GNU Hurd and Ironclad, this test is not required because there 1730ae545d91Smrg # is no limit to the length of command line arguments. 1731ae545d91Smrg # Libtool will interpret -1 as no limit whatsoever 1732ae545d91Smrg lt_cv_sys_max_cmd_len=-1; 1733ae545d91Smrg ;; 1734ae545d91Smrg 1735ae545d91Smrg cygwin* | mingw* | windows* | cegcc*) 1736ae545d91Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1737ae545d91Smrg # about 5 minutes as the teststring grows exponentially. 1738ae545d91Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 1739ae545d91Smrg # you end up with a "frozen" computer, even though with patience 1740ae545d91Smrg # the test eventually succeeds (with a max line length of 256k). 1741ae545d91Smrg # Instead, let's just punt: use the minimum linelength reported by 1742ae545d91Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 1743ae545d91Smrg lt_cv_sys_max_cmd_len=8192; 1744ae545d91Smrg ;; 1745ae545d91Smrg 1746ae545d91Smrg mint*) 1747ae545d91Smrg # On MiNT this can take a long time and run out of memory. 1748ae545d91Smrg lt_cv_sys_max_cmd_len=8192; 1749ae545d91Smrg ;; 1750ae545d91Smrg 1751ae545d91Smrg amigaos*) 1752ae545d91Smrg # On AmigaOS with pdksh, this test takes hours, literally. 1753ae545d91Smrg # So we just punt and use a minimum line length of 8192. 1754ae545d91Smrg lt_cv_sys_max_cmd_len=8192; 1755ae545d91Smrg ;; 1756ae545d91Smrg 1757ae545d91Smrg darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 1758ae545d91Smrg # This has been around since 386BSD, at least. Likely further. 1759ae545d91Smrg if test -x /sbin/sysctl; then 1760ae545d91Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1761ae545d91Smrg elif test -x /usr/sbin/sysctl; then 1762ae545d91Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1763ae545d91Smrg else 1764ae545d91Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1765ae545d91Smrg fi 1766ae545d91Smrg # And add a safety zone 1767ae545d91Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1768ae545d91Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1769ae545d91Smrg ;; 1770ae545d91Smrg 1771ae545d91Smrg interix*) 1772ae545d91Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1773ae545d91Smrg lt_cv_sys_max_cmd_len=196608 1774ae545d91Smrg ;; 1775ae545d91Smrg 1776ae545d91Smrg os2*) 1777ae545d91Smrg # The test takes a long time on OS/2. 1778ae545d91Smrg lt_cv_sys_max_cmd_len=8192 1779ae545d91Smrg ;; 1780ae545d91Smrg 1781ae545d91Smrg osf*) 1782ae545d91Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1783ae545d91Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1784ae545d91Smrg # nice to cause kernel panics so lets avoid the loop below. 1785ae545d91Smrg # First set a reasonable default. 1786ae545d91Smrg lt_cv_sys_max_cmd_len=16384 1787ae545d91Smrg # 1788ae545d91Smrg if test -x /sbin/sysconfig; then 1789ae545d91Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1790ae545d91Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1791ae545d91Smrg esac 1792ae545d91Smrg fi 1793ae545d91Smrg ;; 1794ae545d91Smrg sco3.2v5*) 1795ae545d91Smrg lt_cv_sys_max_cmd_len=102400 1796ae545d91Smrg ;; 1797ae545d91Smrg sysv5* | sco5v6* | sysv4.2uw2*) 1798ae545d91Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1799ae545d91Smrg if test -n "$kargmax"; then 1800ae545d91Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 1801ae545d91Smrg else 1802ae545d91Smrg lt_cv_sys_max_cmd_len=32768 1803ae545d91Smrg fi 1804ae545d91Smrg ;; 1805ae545d91Smrg *) 1806ae545d91Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1807ae545d91Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1808ae545d91Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 1809ae545d91Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1810ae545d91Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1811ae545d91Smrg else 1812ae545d91Smrg # Make teststring a little bigger before we do anything with it. 1813ae545d91Smrg # a 1K string should be a reasonable start. 1814ae545d91Smrg for i in 1 2 3 4 5 6 7 8; do 1815ae545d91Smrg teststring=$teststring$teststring 1816ae545d91Smrg done 1817ae545d91Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1818ae545d91Smrg # If test is not a shell built-in, we'll probably end up computing a 1819ae545d91Smrg # maximum length that is only half of the actual maximum length, but 1820ae545d91Smrg # we can't tell. 1821ae545d91Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1822ae545d91Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1823ae545d91Smrg test 17 != "$i" # 1/2 MB should be enough 1824ae545d91Smrg do 1825ae545d91Smrg i=`expr $i + 1` 1826ae545d91Smrg teststring=$teststring$teststring 1827ae545d91Smrg done 1828ae545d91Smrg # Only check the string length outside the loop. 1829ae545d91Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1830ae545d91Smrg teststring= 1831ae545d91Smrg # Add a significant safety factor because C++ compilers can tack on 1832ae545d91Smrg # massive amounts of additional arguments before passing them to the 1833ae545d91Smrg # linker. It appears as though 1/2 is a usable value. 1834ae545d91Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1835ae545d91Smrg fi 1836ae545d91Smrg ;; 1837ae545d91Smrg esac 1838ae545d91Smrg]) 1839ae545d91Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 1840ae545d91Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1841ae545d91Smrgelse 1842ae545d91Smrg AC_MSG_RESULT(none) 1843ae545d91Smrgfi 1844ae545d91Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1845ae545d91Smrg_LT_DECL([], [max_cmd_len], [0], 1846ae545d91Smrg [What is the maximum length of a command?]) 1847ae545d91Smrg])# LT_CMD_MAX_LEN 1848ae545d91Smrg 1849ae545d91Smrg# Old name: 1850ae545d91SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1851ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 1852ae545d91Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1853ae545d91Smrg 1854ae545d91Smrg 1855ae545d91Smrg# _LT_HEADER_DLFCN 1856ae545d91Smrg# ---------------- 1857ae545d91Smrgm4_defun([_LT_HEADER_DLFCN], 1858ae545d91Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1859ae545d91Smrg])# _LT_HEADER_DLFCN 1860ae545d91Smrg 1861ae545d91Smrg 1862ae545d91Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1863ae545d91Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1864ae545d91Smrg# ---------------------------------------------------------------- 1865ae545d91Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1866ae545d91Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1867ae545d91Smrgif test yes = "$cross_compiling"; then : 1868ae545d91Smrg [$4] 1869ae545d91Smrgelse 1870ae545d91Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1871ae545d91Smrg lt_status=$lt_dlunknown 1872ae545d91Smrg cat > conftest.$ac_ext <<_LT_EOF 1873ae545d91Smrg[#line $LINENO "configure" 1874ae545d91Smrg#include "confdefs.h" 1875ae545d91Smrg 1876ae545d91Smrg#if HAVE_DLFCN_H 1877ae545d91Smrg#include <dlfcn.h> 1878ae545d91Smrg#endif 1879ae545d91Smrg 1880ae545d91Smrg#include <stdio.h> 1881ae545d91Smrg 1882ae545d91Smrg#ifdef RTLD_GLOBAL 1883ae545d91Smrg# define LT_DLGLOBAL RTLD_GLOBAL 1884ae545d91Smrg#else 1885ae545d91Smrg# ifdef DL_GLOBAL 1886ae545d91Smrg# define LT_DLGLOBAL DL_GLOBAL 1887ae545d91Smrg# else 1888ae545d91Smrg# define LT_DLGLOBAL 0 1889ae545d91Smrg# endif 1890ae545d91Smrg#endif 1891ae545d91Smrg 1892ae545d91Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1893ae545d91Smrg find out it does not work in some platform. */ 1894ae545d91Smrg#ifndef LT_DLLAZY_OR_NOW 1895ae545d91Smrg# ifdef RTLD_LAZY 1896ae545d91Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1897ae545d91Smrg# else 1898ae545d91Smrg# ifdef DL_LAZY 1899ae545d91Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 1900ae545d91Smrg# else 1901ae545d91Smrg# ifdef RTLD_NOW 1902ae545d91Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1903ae545d91Smrg# else 1904ae545d91Smrg# ifdef DL_NOW 1905ae545d91Smrg# define LT_DLLAZY_OR_NOW DL_NOW 1906ae545d91Smrg# else 1907ae545d91Smrg# define LT_DLLAZY_OR_NOW 0 1908ae545d91Smrg# endif 1909ae545d91Smrg# endif 1910ae545d91Smrg# endif 1911ae545d91Smrg# endif 1912ae545d91Smrg#endif 1913ae545d91Smrg 1914ae545d91Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 1915ae545d91Smrg correspondingly for the symbols needed. */ 1916ae545d91Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1917ae545d91Smrgint fnord (void) __attribute__((visibility("default"))); 1918ae545d91Smrg#endif 1919ae545d91Smrg 1920ae545d91Smrgint fnord (void) { return 42; } 1921ae545d91Smrgint main (void) 1922ae545d91Smrg{ 1923ae545d91Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1924ae545d91Smrg int status = $lt_dlunknown; 1925ae545d91Smrg 1926ae545d91Smrg if (self) 1927ae545d91Smrg { 1928ae545d91Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1929ae545d91Smrg else 1930ae545d91Smrg { 1931ae545d91Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1932ae545d91Smrg else puts (dlerror ()); 1933ae545d91Smrg } 1934ae545d91Smrg /* dlclose (self); */ 1935ae545d91Smrg } 1936ae545d91Smrg else 1937ae545d91Smrg puts (dlerror ()); 1938ae545d91Smrg 1939ae545d91Smrg return status; 1940ae545d91Smrg}] 1941ae545d91Smrg_LT_EOF 1942ae545d91Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1943ae545d91Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1944ae545d91Smrg lt_status=$? 1945ae545d91Smrg case x$lt_status in 1946ae545d91Smrg x$lt_dlno_uscore) $1 ;; 1947ae545d91Smrg x$lt_dlneed_uscore) $2 ;; 1948ae545d91Smrg x$lt_dlunknown|x*) $3 ;; 1949ae545d91Smrg esac 1950ae545d91Smrg else : 1951ae545d91Smrg # compilation failed 1952ae545d91Smrg $3 1953ae545d91Smrg fi 1954ae545d91Smrgfi 1955ae545d91Smrgrm -fr conftest* 1956ae545d91Smrg])# _LT_TRY_DLOPEN_SELF 1957ae545d91Smrg 1958ae545d91Smrg 1959ae545d91Smrg# LT_SYS_DLOPEN_SELF 1960ae545d91Smrg# ------------------ 1961ae545d91SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1962ae545d91Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1963ae545d91Smrgif test yes != "$enable_dlopen"; then 1964ae545d91Smrg enable_dlopen=unknown 1965ae545d91Smrg enable_dlopen_self=unknown 1966ae545d91Smrg enable_dlopen_self_static=unknown 1967ae545d91Smrgelse 1968ae545d91Smrg lt_cv_dlopen=no 1969ae545d91Smrg lt_cv_dlopen_libs= 1970ae545d91Smrg 1971ae545d91Smrg case $host_os in 1972ae545d91Smrg beos*) 1973ae545d91Smrg lt_cv_dlopen=load_add_on 1974ae545d91Smrg lt_cv_dlopen_libs= 1975ae545d91Smrg lt_cv_dlopen_self=yes 1976ae545d91Smrg ;; 1977ae545d91Smrg 1978ae545d91Smrg mingw* | windows* | pw32* | cegcc*) 1979ae545d91Smrg lt_cv_dlopen=LoadLibrary 1980ae545d91Smrg lt_cv_dlopen_libs= 1981ae545d91Smrg ;; 1982ae545d91Smrg 1983ae545d91Smrg cygwin*) 1984ae545d91Smrg lt_cv_dlopen=dlopen 1985ae545d91Smrg lt_cv_dlopen_libs= 1986ae545d91Smrg ;; 1987ae545d91Smrg 1988ae545d91Smrg darwin*) 1989ae545d91Smrg # if libdl is installed we need to link against it 1990ae545d91Smrg AC_CHECK_LIB([dl], [dlopen], 1991ae545d91Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1992ae545d91Smrg lt_cv_dlopen=dyld 1993ae545d91Smrg lt_cv_dlopen_libs= 1994ae545d91Smrg lt_cv_dlopen_self=yes 1995ae545d91Smrg ]) 1996ae545d91Smrg ;; 1997ae545d91Smrg 1998ae545d91Smrg tpf*) 1999ae545d91Smrg # Don't try to run any link tests for TPF. We know it's impossible 2000ae545d91Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 2001ae545d91Smrg lt_cv_dlopen=dlopen 2002ae545d91Smrg lt_cv_dlopen_libs= 2003ae545d91Smrg lt_cv_dlopen_self=no 2004ae545d91Smrg ;; 2005ae545d91Smrg 2006ae545d91Smrg *) 2007ae545d91Smrg AC_CHECK_FUNC([shl_load], 2008ae545d91Smrg [lt_cv_dlopen=shl_load], 2009ae545d91Smrg [AC_CHECK_LIB([dld], [shl_load], 2010ae545d91Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 2011ae545d91Smrg [AC_CHECK_FUNC([dlopen], 2012ae545d91Smrg [lt_cv_dlopen=dlopen], 2013ae545d91Smrg [AC_CHECK_LIB([dl], [dlopen], 2014ae545d91Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 2015ae545d91Smrg [AC_CHECK_LIB([svld], [dlopen], 2016ae545d91Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 2017ae545d91Smrg [AC_CHECK_LIB([dld], [dld_link], 2018ae545d91Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 2019ae545d91Smrg ]) 2020ae545d91Smrg ]) 2021ae545d91Smrg ]) 2022ae545d91Smrg ]) 2023ae545d91Smrg ]) 2024ae545d91Smrg ;; 2025ae545d91Smrg esac 2026ae545d91Smrg 2027ae545d91Smrg if test no = "$lt_cv_dlopen"; then 2028ae545d91Smrg enable_dlopen=no 2029ae545d91Smrg else 2030ae545d91Smrg enable_dlopen=yes 2031ae545d91Smrg fi 2032ae545d91Smrg 2033ae545d91Smrg case $lt_cv_dlopen in 2034ae545d91Smrg dlopen) 2035ae545d91Smrg save_CPPFLAGS=$CPPFLAGS 2036ae545d91Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2037ae545d91Smrg 2038ae545d91Smrg save_LDFLAGS=$LDFLAGS 2039ae545d91Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2040ae545d91Smrg 2041ae545d91Smrg save_LIBS=$LIBS 2042ae545d91Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 2043ae545d91Smrg 2044ae545d91Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 2045ae545d91Smrg lt_cv_dlopen_self, [dnl 2046ae545d91Smrg _LT_TRY_DLOPEN_SELF( 2047ae545d91Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2048ae545d91Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2049ae545d91Smrg ]) 2050ae545d91Smrg 2051ae545d91Smrg if test yes = "$lt_cv_dlopen_self"; then 2052ae545d91Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2053ae545d91Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2054ae545d91Smrg lt_cv_dlopen_self_static, [dnl 2055ae545d91Smrg _LT_TRY_DLOPEN_SELF( 2056ae545d91Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2057ae545d91Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2058ae545d91Smrg ]) 2059ae545d91Smrg fi 2060ae545d91Smrg 2061ae545d91Smrg CPPFLAGS=$save_CPPFLAGS 2062ae545d91Smrg LDFLAGS=$save_LDFLAGS 2063ae545d91Smrg LIBS=$save_LIBS 2064ae545d91Smrg ;; 2065ae545d91Smrg esac 2066ae545d91Smrg 2067ae545d91Smrg case $lt_cv_dlopen_self in 2068ae545d91Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2069ae545d91Smrg *) enable_dlopen_self=unknown ;; 2070ae545d91Smrg esac 2071ae545d91Smrg 2072ae545d91Smrg case $lt_cv_dlopen_self_static in 2073ae545d91Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2074ae545d91Smrg *) enable_dlopen_self_static=unknown ;; 2075ae545d91Smrg esac 2076ae545d91Smrgfi 2077ae545d91Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2078ae545d91Smrg [Whether dlopen is supported]) 2079ae545d91Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2080ae545d91Smrg [Whether dlopen of programs is supported]) 2081ae545d91Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2082ae545d91Smrg [Whether dlopen of statically linked programs is supported]) 2083ae545d91Smrg])# LT_SYS_DLOPEN_SELF 2084ae545d91Smrg 2085ae545d91Smrg# Old name: 2086ae545d91SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2087ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 2088ae545d91Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2089ae545d91Smrg 2090ae545d91Smrg 2091ae545d91Smrg# _LT_COMPILER_C_O([TAGNAME]) 2092ae545d91Smrg# --------------------------- 2093ae545d91Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 2094ae545d91Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2095ae545d91Smrgm4_defun([_LT_COMPILER_C_O], 2096ae545d91Smrg[m4_require([_LT_DECL_SED])dnl 2097ae545d91Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2098ae545d91Smrgm4_require([_LT_TAG_COMPILER])dnl 2099ae545d91SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2100ae545d91Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2101ae545d91Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2102ae545d91Smrg $RM -r conftest 2>/dev/null 2103ae545d91Smrg mkdir conftest 2104ae545d91Smrg cd conftest 2105ae545d91Smrg mkdir out 2106ae545d91Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2107ae545d91Smrg 2108ae545d91Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2109ae545d91Smrg # Insert the option either (1) after the last *FLAGS variable, or 2110ae545d91Smrg # (2) before a word containing "conftest.", or (3) at the end. 2111ae545d91Smrg # Note that $ac_compile itself does not contain backslashes and begins 2112ae545d91Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2113ae545d91Smrg lt_compile=`echo "$ac_compile" | $SED \ 2114ae545d91Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2115ae545d91Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2116ae545d91Smrg -e 's:$: $lt_compiler_flag:'` 2117ae545d91Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2118ae545d91Smrg (eval "$lt_compile" 2>out/conftest.err) 2119ae545d91Smrg ac_status=$? 2120ae545d91Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2121ae545d91Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2122ae545d91Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2123ae545d91Smrg then 2124ae545d91Smrg # The compiler can only warn and ignore the option if not recognized 2125ae545d91Smrg # So say no if there are warnings 2126ae545d91Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2127ae545d91Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2128ae545d91Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2129ae545d91Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2130ae545d91Smrg fi 2131ae545d91Smrg fi 2132ae545d91Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2133ae545d91Smrg $RM conftest* 2134ae545d91Smrg # SGI C++ compiler will create directory out/ii_files/ for 2135ae545d91Smrg # template instantiation 2136ae545d91Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2137ae545d91Smrg $RM out/* && rmdir out 2138ae545d91Smrg cd .. 2139ae545d91Smrg $RM -r conftest 2140ae545d91Smrg $RM conftest* 2141ae545d91Smrg]) 2142ae545d91Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2143ae545d91Smrg [Does compiler simultaneously support -c and -o options?]) 2144ae545d91Smrg])# _LT_COMPILER_C_O 2145ae545d91Smrg 2146ae545d91Smrg 2147ae545d91Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2148ae545d91Smrg# ---------------------------------- 2149ae545d91Smrg# Check to see if we can do hard links to lock some files if needed 2150ae545d91Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2151ae545d91Smrg[m4_require([_LT_ENABLE_LOCK])dnl 2152ae545d91Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2153ae545d91Smrg_LT_COMPILER_C_O([$1]) 2154ae545d91Smrg 2155ae545d91Smrghard_links=nottested 2156ae545d91Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2157ae545d91Smrg # do not overwrite the value of need_locks provided by the user 2158ae545d91Smrg AC_MSG_CHECKING([if we can lock with hard links]) 2159ae545d91Smrg hard_links=yes 2160ae545d91Smrg $RM conftest* 2161ae545d91Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2162ae545d91Smrg touch conftest.a 2163ae545d91Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 2164ae545d91Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2165ae545d91Smrg AC_MSG_RESULT([$hard_links]) 2166ae545d91Smrg if test no = "$hard_links"; then 2167ae545d91Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2168ae545d91Smrg need_locks=warn 2169ae545d91Smrg fi 2170ae545d91Smrgelse 2171ae545d91Smrg need_locks=no 2172ae545d91Smrgfi 2173ae545d91Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2174ae545d91Smrg])# _LT_COMPILER_FILE_LOCKS 2175ae545d91Smrg 2176ae545d91Smrg 2177ae545d91Smrg# _LT_CHECK_OBJDIR 2178ae545d91Smrg# ---------------- 2179ae545d91Smrgm4_defun([_LT_CHECK_OBJDIR], 2180ae545d91Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2181ae545d91Smrg[rm -f .libs 2>/dev/null 2182ae545d91Smrgmkdir .libs 2>/dev/null 2183ae545d91Smrgif test -d .libs; then 2184ae545d91Smrg lt_cv_objdir=.libs 2185ae545d91Smrgelse 2186ae545d91Smrg # MS-DOS does not allow filenames that begin with a dot. 2187ae545d91Smrg lt_cv_objdir=_libs 2188ae545d91Smrgfi 2189ae545d91Smrgrmdir .libs 2>/dev/null]) 2190ae545d91Smrgobjdir=$lt_cv_objdir 2191ae545d91Smrg_LT_DECL([], [objdir], [0], 2192ae545d91Smrg [The name of the directory that contains temporary libtool files])dnl 2193ae545d91Smrgm4_pattern_allow([LT_OBJDIR])dnl 2194ae545d91SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2195ae545d91Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2196ae545d91Smrg])# _LT_CHECK_OBJDIR 2197ae545d91Smrg 2198ae545d91Smrg 2199ae545d91Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2200ae545d91Smrg# -------------------------------------- 2201ae545d91Smrg# Check hardcoding attributes. 2202ae545d91Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2203ae545d91Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2204ae545d91Smrg_LT_TAGVAR(hardcode_action, $1)= 2205ae545d91Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2206ae545d91Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2207ae545d91Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2208ae545d91Smrg 2209ae545d91Smrg # We can hardcode non-existent directories. 2210ae545d91Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2211ae545d91Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2212ae545d91Smrg # have to relink, otherwise we might link with an installed library 2213ae545d91Smrg # when we should be linking with a yet-to-be-installed one 2214ae545d91Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2215ae545d91Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2216ae545d91Smrg # Linking always hardcodes the temporary library directory. 2217ae545d91Smrg _LT_TAGVAR(hardcode_action, $1)=relink 2218ae545d91Smrg else 2219ae545d91Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2220ae545d91Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 2221ae545d91Smrg fi 2222ae545d91Smrgelse 2223ae545d91Smrg # We cannot hardcode anything, or else we can only hardcode existing 2224ae545d91Smrg # directories. 2225ae545d91Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2226ae545d91Smrgfi 2227ae545d91SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2228ae545d91Smrg 2229ae545d91Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2230ae545d91Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2231ae545d91Smrg # Fast installation is not supported 2232ae545d91Smrg enable_fast_install=no 2233ae545d91Smrgelif test yes = "$shlibpath_overrides_runpath" || 2234ae545d91Smrg test no = "$enable_shared"; then 2235ae545d91Smrg # Fast installation is not necessary 2236ae545d91Smrg enable_fast_install=needless 2237ae545d91Smrgfi 2238ae545d91Smrg_LT_TAGDECL([], [hardcode_action], [0], 2239ae545d91Smrg [How to hardcode a shared library path into an executable]) 2240ae545d91Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2241ae545d91Smrg 2242ae545d91Smrg 2243ae545d91Smrg# _LT_CMD_STRIPLIB 2244ae545d91Smrg# ---------------- 2245ae545d91Smrgm4_defun([_LT_CMD_STRIPLIB], 2246ae545d91Smrg[m4_require([_LT_DECL_EGREP]) 2247ae545d91Smrgstriplib= 2248ae545d91Smrgold_striplib= 2249ae545d91SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2250ae545d91Smrgif test -z "$STRIP"; then 2251ae545d91Smrg AC_MSG_RESULT([no]) 2252ae545d91Smrgelse 2253ae545d91Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2254ae545d91Smrg old_striplib="$STRIP --strip-debug" 2255ae545d91Smrg striplib="$STRIP --strip-unneeded" 2256ae545d91Smrg AC_MSG_RESULT([yes]) 2257ae545d91Smrg else 2258ae545d91Smrg case $host_os in 2259ae545d91Smrg darwin*) 2260ae545d91Smrg # FIXME - insert some real tests, host_os isn't really good enough 2261ae545d91Smrg striplib="$STRIP -x" 2262ae545d91Smrg old_striplib="$STRIP -S" 2263ae545d91Smrg AC_MSG_RESULT([yes]) 2264ae545d91Smrg ;; 2265ae545d91Smrg freebsd*) 2266ae545d91Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 2267ae545d91Smrg old_striplib="$STRIP --strip-debug" 2268ae545d91Smrg striplib="$STRIP --strip-unneeded" 2269ae545d91Smrg AC_MSG_RESULT([yes]) 2270ae545d91Smrg else 2271ae545d91Smrg AC_MSG_RESULT([no]) 2272ae545d91Smrg fi 2273ae545d91Smrg ;; 2274ae545d91Smrg *) 2275ae545d91Smrg AC_MSG_RESULT([no]) 2276ae545d91Smrg ;; 2277ae545d91Smrg esac 2278ae545d91Smrg fi 2279ae545d91Smrgfi 2280ae545d91Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2281ae545d91Smrg_LT_DECL([], [striplib], [1]) 2282ae545d91Smrg])# _LT_CMD_STRIPLIB 2283ae545d91Smrg 2284ae545d91Smrg 2285ae545d91Smrg# _LT_PREPARE_MUNGE_PATH_LIST 2286ae545d91Smrg# --------------------------- 2287ae545d91Smrg# Make sure func_munge_path_list() is defined correctly. 2288ae545d91Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2289ae545d91Smrg[[# func_munge_path_list VARIABLE PATH 2290ae545d91Smrg# ----------------------------------- 2291ae545d91Smrg# VARIABLE is name of variable containing _space_ separated list of 2292ae545d91Smrg# directories to be munged by the contents of PATH, which is string 2293ae545d91Smrg# having a format: 2294ae545d91Smrg# "DIR[:DIR]:" 2295ae545d91Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 2296ae545d91Smrg# ":DIR[:DIR]" 2297ae545d91Smrg# string "DIR[ DIR]" will be appended to VARIABLE 2298ae545d91Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2299ae545d91Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2300ae545d91Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 2301ae545d91Smrg# "DIR[:DIR]" 2302ae545d91Smrg# VARIABLE will be replaced by "DIR[ DIR]" 2303ae545d91Smrgfunc_munge_path_list () 2304ae545d91Smrg{ 2305ae545d91Smrg case x@S|@2 in 2306ae545d91Smrg x) 2307ae545d91Smrg ;; 2308ae545d91Smrg *:) 2309ae545d91Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2310ae545d91Smrg ;; 2311ae545d91Smrg x:*) 2312ae545d91Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2313ae545d91Smrg ;; 2314ae545d91Smrg *::*) 2315ae545d91Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2316ae545d91Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2317ae545d91Smrg ;; 2318ae545d91Smrg *) 2319ae545d91Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2320ae545d91Smrg ;; 2321ae545d91Smrg esac 2322ae545d91Smrg} 2323ae545d91Smrg]])# _LT_PREPARE_PATH_LIST 2324ae545d91Smrg 2325ae545d91Smrg 2326ae545d91Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2327ae545d91Smrg# ----------------------------- 2328ae545d91Smrg# PORTME Fill in your ld.so characteristics 2329ae545d91Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2330ae545d91Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2331ae545d91Smrgm4_require([_LT_DECL_EGREP])dnl 2332ae545d91Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2333ae545d91Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2334ae545d91Smrgm4_require([_LT_DECL_SED])dnl 2335ae545d91Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2336ae545d91Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2337ae545d91SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2338ae545d91Smrgm4_if([$1], 2339ae545d91Smrg [], [ 2340ae545d91Smrgif test yes = "$GCC"; then 2341ae545d91Smrg case $host_os in 2342ae545d91Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2343ae545d91Smrg *) lt_awk_arg='/^libraries:/' ;; 2344ae545d91Smrg esac 2345ae545d91Smrg case $host_os in 2346ae545d91Smrg mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2347ae545d91Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 2348ae545d91Smrg esac 2349ae545d91Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2350ae545d91Smrg case $lt_search_path_spec in 2351ae545d91Smrg *\;*) 2352ae545d91Smrg # if the path contains ";" then we assume it to be the separator 2353ae545d91Smrg # otherwise default to the standard path separator (i.e. ":") - it is 2354ae545d91Smrg # assumed that no part of a normal pathname contains ";" but that should 2355ae545d91Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2356ae545d91Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2357ae545d91Smrg ;; 2358ae545d91Smrg *) 2359ae545d91Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2360ae545d91Smrg ;; 2361ae545d91Smrg esac 2362ae545d91Smrg # Ok, now we have the path, separated by spaces, we can step through it 2363ae545d91Smrg # and add multilib dir if necessary... 2364ae545d91Smrg lt_tmp_lt_search_path_spec= 2365ae545d91Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2366ae545d91Smrg # ...but if some path component already ends with the multilib dir we assume 2367ae545d91Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2368ae545d91Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2369ae545d91Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2370ae545d91Smrg lt_multi_os_dir= 2371ae545d91Smrg ;; 2372ae545d91Smrg esac 2373ae545d91Smrg for lt_sys_path in $lt_search_path_spec; do 2374ae545d91Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2375ae545d91Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2376ae545d91Smrg elif test -n "$lt_multi_os_dir"; then 2377ae545d91Smrg test -d "$lt_sys_path" && \ 2378ae545d91Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2379ae545d91Smrg fi 2380ae545d91Smrg done 2381ae545d91Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2382ae545d91SmrgBEGIN {RS = " "; FS = "/|\n";} { 2383ae545d91Smrg lt_foo = ""; 2384ae545d91Smrg lt_count = 0; 2385ae545d91Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 2386ae545d91Smrg if ($lt_i != "" && $lt_i != ".") { 2387ae545d91Smrg if ($lt_i == "..") { 2388ae545d91Smrg lt_count++; 2389ae545d91Smrg } else { 2390ae545d91Smrg if (lt_count == 0) { 2391ae545d91Smrg lt_foo = "/" $lt_i lt_foo; 2392ae545d91Smrg } else { 2393ae545d91Smrg lt_count--; 2394ae545d91Smrg } 2395ae545d91Smrg } 2396ae545d91Smrg } 2397ae545d91Smrg } 2398ae545d91Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2399ae545d91Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2400ae545d91Smrg}'` 2401ae545d91Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2402ae545d91Smrg # for these hosts. 2403ae545d91Smrg case $host_os in 2404ae545d91Smrg mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2405ae545d91Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2406ae545d91Smrg esac 2407ae545d91Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2408ae545d91Smrgelse 2409ae545d91Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2410ae545d91Smrgfi]) 2411ae545d91Smrglibrary_names_spec= 2412ae545d91Smrglibname_spec='lib$name' 2413ae545d91Smrgsoname_spec= 2414ae545d91Smrgshrext_cmds=.so 2415ae545d91Smrgpostinstall_cmds= 2416ae545d91Smrgpostuninstall_cmds= 2417ae545d91Smrgfinish_cmds= 2418ae545d91Smrgfinish_eval= 2419ae545d91Smrgshlibpath_var= 2420ae545d91Smrgshlibpath_overrides_runpath=unknown 2421ae545d91Smrgversion_type=none 2422ae545d91Smrgdynamic_linker="$host_os ld.so" 2423ae545d91Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2424ae545d91Smrgneed_lib_prefix=unknown 2425ae545d91Smrghardcode_into_libs=no 2426ae545d91Smrg 2427ae545d91Smrg# when you set need_version to no, make sure it does not cause -set_version 2428ae545d91Smrg# flags to be left without arguments 2429ae545d91Smrgneed_version=unknown 2430ae545d91Smrg 2431ae545d91SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2432ae545d91Smrg[User-defined run-time library search path.]) 2433ae545d91Smrg 2434ae545d91Smrgcase $host_os in 2435ae545d91Smrgaix3*) 2436ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 2437ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2438ae545d91Smrg shlibpath_var=LIBPATH 2439ae545d91Smrg 2440ae545d91Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2441ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2442ae545d91Smrg ;; 2443ae545d91Smrg 2444ae545d91Smrgaix[[4-9]]*) 2445ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 2446ae545d91Smrg need_lib_prefix=no 2447ae545d91Smrg need_version=no 2448ae545d91Smrg hardcode_into_libs=yes 2449ae545d91Smrg if test ia64 = "$host_cpu"; then 2450ae545d91Smrg # AIX 5 supports IA64 2451ae545d91Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2452ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 2453ae545d91Smrg else 2454ae545d91Smrg # With GCC up to 2.95.x, collect2 would create an import file 2455ae545d91Smrg # for dependence libraries. The import file would start with 2456ae545d91Smrg # the line '#! .'. This would cause the generated library to 2457ae545d91Smrg # depend on '.', always an invalid library. This was fixed in 2458ae545d91Smrg # development snapshots of GCC prior to 3.0. 2459ae545d91Smrg case $host_os in 2460ae545d91Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2461ae545d91Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2462ae545d91Smrg echo ' yes ' 2463ae545d91Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2464ae545d91Smrg : 2465ae545d91Smrg else 2466ae545d91Smrg can_build_shared=no 2467ae545d91Smrg fi 2468ae545d91Smrg ;; 2469ae545d91Smrg esac 2470ae545d91Smrg # Using Import Files as archive members, it is possible to support 2471ae545d91Smrg # filename-based versioning of shared library archives on AIX. While 2472ae545d91Smrg # this would work for both with and without runtime linking, it will 2473ae545d91Smrg # prevent static linking of such archives. So we do filename-based 2474ae545d91Smrg # shared library versioning with .so extension only, which is used 2475ae545d91Smrg # when both runtime linking and shared linking is enabled. 2476ae545d91Smrg # Unfortunately, runtime linking may impact performance, so we do 2477ae545d91Smrg # not want this to be the default eventually. Also, we use the 2478ae545d91Smrg # versioned .so libs for executables only if there is the -brtl 2479ae545d91Smrg # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. 2480ae545d91Smrg # To allow for filename-based versioning support, we need to create 2481ae545d91Smrg # libNAME.so.V as an archive file, containing: 2482ae545d91Smrg # *) an Import File, referring to the versioned filename of the 2483ae545d91Smrg # archive as well as the shared archive member, telling the 2484ae545d91Smrg # bitwidth (32 or 64) of that shared object, and providing the 2485ae545d91Smrg # list of exported symbols of that shared object, eventually 2486ae545d91Smrg # decorated with the 'weak' keyword 2487ae545d91Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2488ae545d91Smrg # it being seen by the linker. 2489ae545d91Smrg # At run time we better use the real file rather than another symlink, 2490ae545d91Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2491ae545d91Smrg 2492ae545d91Smrg case $with_aix_soname,$aix_use_runtimelinking in 2493ae545d91Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2494ae545d91Smrg # soname into executable. Probably we can add versioning support to 2495ae545d91Smrg # collect2, so additional links can be useful in future. 2496ae545d91Smrg aix,yes) # traditional libtool 2497ae545d91Smrg dynamic_linker='AIX unversionable lib.so' 2498ae545d91Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2499ae545d91Smrg # instead of lib<name>.a to let people know that these are not 2500ae545d91Smrg # typical AIX shared libraries. 2501ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2502ae545d91Smrg ;; 2503ae545d91Smrg aix,no) # traditional AIX only 2504ae545d91Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2505ae545d91Smrg # We preserve .a as extension for shared libraries through AIX4.2 2506ae545d91Smrg # and later when we are not doing run time linking. 2507ae545d91Smrg library_names_spec='$libname$release.a $libname.a' 2508ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2509ae545d91Smrg ;; 2510ae545d91Smrg svr4,*) # full svr4 only 2511ae545d91Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2512ae545d91Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2513ae545d91Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2514ae545d91Smrg shlibpath_overrides_runpath=yes 2515ae545d91Smrg ;; 2516ae545d91Smrg *,yes) # both, prefer svr4 2517ae545d91Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2518ae545d91Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2519ae545d91Smrg # unpreferred sharedlib libNAME.a needs extra handling 2520ae545d91Smrg 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"' 2521ae545d91Smrg 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"' 2522ae545d91Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2523ae545d91Smrg shlibpath_overrides_runpath=yes 2524ae545d91Smrg ;; 2525ae545d91Smrg *,no) # both, prefer aix 2526ae545d91Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2527ae545d91Smrg library_names_spec='$libname$release.a $libname.a' 2528ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2529ae545d91Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2530ae545d91Smrg 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)' 2531ae545d91Smrg 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"' 2532ae545d91Smrg ;; 2533ae545d91Smrg esac 2534ae545d91Smrg shlibpath_var=LIBPATH 2535ae545d91Smrg fi 2536ae545d91Smrg ;; 2537ae545d91Smrg 2538ae545d91Smrgamigaos*) 2539ae545d91Smrg case $host_cpu in 2540ae545d91Smrg powerpc) 2541ae545d91Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2542ae545d91Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2543ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2544ae545d91Smrg ;; 2545ae545d91Smrg m68k) 2546ae545d91Smrg library_names_spec='$libname.ixlibrary $libname.a' 2547ae545d91Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2548ae545d91Smrg 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' 2549ae545d91Smrg ;; 2550ae545d91Smrg esac 2551ae545d91Smrg ;; 2552ae545d91Smrg 2553ae545d91Smrgbeos*) 2554ae545d91Smrg library_names_spec='$libname$shared_ext' 2555ae545d91Smrg dynamic_linker="$host_os ld.so" 2556ae545d91Smrg shlibpath_var=LIBRARY_PATH 2557ae545d91Smrg ;; 2558ae545d91Smrg 2559ae545d91Smrgbsdi[[45]]*) 2560ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 2561ae545d91Smrg need_version=no 2562ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2563ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2564ae545d91Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2565ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 2566ae545d91Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2567ae545d91Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2568ae545d91Smrg # the default ld.so.conf also contains /usr/contrib/lib and 2569ae545d91Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2570ae545d91Smrg # libtool to hard-code these into programs 2571ae545d91Smrg ;; 2572ae545d91Smrg 2573ae545d91Smrgcygwin* | mingw* | windows* | pw32* | cegcc*) 2574ae545d91Smrg version_type=windows 2575ae545d91Smrg shrext_cmds=.dll 2576ae545d91Smrg need_version=no 2577ae545d91Smrg need_lib_prefix=no 2578ae545d91Smrg 2579ae545d91Smrg case $GCC,$cc_basename in 2580ae545d91Smrg yes,*) 2581ae545d91Smrg # gcc 2582ae545d91Smrg library_names_spec='$libname.dll.a' 2583ae545d91Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2584ae545d91Smrg # If user builds GCC with multilib enabled, 2585ae545d91Smrg # it should just install on $(libdir) 2586ae545d91Smrg # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. 2587ae545d91Smrg if test xyes = x"$multilib"; then 2588ae545d91Smrg postinstall_cmds='base_file=`basename \$file`~ 2589ae545d91Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2590ae545d91Smrg dldir=$destdir/`dirname \$dlpath`~ 2591ae545d91Smrg $install_prog $dir/$dlname $destdir/$dlname~ 2592ae545d91Smrg chmod a+x $destdir/$dlname~ 2593ae545d91Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2594ae545d91Smrg eval '\''$striplib $destdir/$dlname'\'' || exit \$?; 2595ae545d91Smrg fi' 2596ae545d91Smrg else 2597ae545d91Smrg postinstall_cmds='base_file=`basename \$file`~ 2598ae545d91Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2599ae545d91Smrg dldir=$destdir/`dirname \$dlpath`~ 2600ae545d91Smrg test -d \$dldir || mkdir -p \$dldir~ 2601ae545d91Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2602ae545d91Smrg chmod a+x \$dldir/$dlname~ 2603ae545d91Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2604ae545d91Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2605ae545d91Smrg fi' 2606ae545d91Smrg fi 2607ae545d91Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2608ae545d91Smrg dlpath=$dir/\$dldll~ 2609ae545d91Smrg $RM \$dlpath' 2610ae545d91Smrg shlibpath_overrides_runpath=yes 2611ae545d91Smrg 2612ae545d91Smrg case $host_os in 2613ae545d91Smrg cygwin*) 2614ae545d91Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2615ae545d91Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2616ae545d91Smrgm4_if([$1], [],[ 2617ae545d91Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2618ae545d91Smrg ;; 2619ae545d91Smrg mingw* | windows* | cegcc*) 2620ae545d91Smrg # MinGW DLLs use traditional 'lib' prefix 2621ae545d91Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2622ae545d91Smrg ;; 2623ae545d91Smrg pw32*) 2624ae545d91Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2625ae545d91Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2626ae545d91Smrg ;; 2627ae545d91Smrg esac 2628ae545d91Smrg dynamic_linker='Win32 ld.exe' 2629ae545d91Smrg ;; 2630ae545d91Smrg 2631ae545d91Smrg *,cl* | *,icl*) 2632ae545d91Smrg # Native MSVC or ICC 2633ae545d91Smrg libname_spec='$name' 2634ae545d91Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2635ae545d91Smrg library_names_spec='$libname.dll.lib' 2636ae545d91Smrg 2637ae545d91Smrg case $build_os in 2638ae545d91Smrg mingw* | windows*) 2639ae545d91Smrg sys_lib_search_path_spec= 2640ae545d91Smrg lt_save_ifs=$IFS 2641ae545d91Smrg IFS=';' 2642ae545d91Smrg for lt_path in $LIB 2643ae545d91Smrg do 2644ae545d91Smrg IFS=$lt_save_ifs 2645ae545d91Smrg # Let DOS variable expansion print the short 8.3 style file name. 2646ae545d91Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2647ae545d91Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2648ae545d91Smrg done 2649ae545d91Smrg IFS=$lt_save_ifs 2650ae545d91Smrg # Convert to MSYS style. 2651ae545d91Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2652ae545d91Smrg ;; 2653ae545d91Smrg cygwin*) 2654ae545d91Smrg # Convert to unix form, then to dos form, then back to unix form 2655ae545d91Smrg # but this time dos style (no spaces!) so that the unix form looks 2656ae545d91Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2657ae545d91Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2658ae545d91Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2659ae545d91Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2660ae545d91Smrg ;; 2661ae545d91Smrg *) 2662ae545d91Smrg sys_lib_search_path_spec=$LIB 2663ae545d91Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2664ae545d91Smrg # It is most probably a Windows format PATH. 2665ae545d91Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2666ae545d91Smrg else 2667ae545d91Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2668ae545d91Smrg fi 2669ae545d91Smrg # FIXME: find the short name or the path components, as spaces are 2670ae545d91Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2671ae545d91Smrg ;; 2672ae545d91Smrg esac 2673ae545d91Smrg 2674ae545d91Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2675ae545d91Smrg postinstall_cmds='base_file=`basename \$file`~ 2676ae545d91Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2677ae545d91Smrg dldir=$destdir/`dirname \$dlpath`~ 2678ae545d91Smrg test -d \$dldir || mkdir -p \$dldir~ 2679ae545d91Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2680ae545d91Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2681ae545d91Smrg dlpath=$dir/\$dldll~ 2682ae545d91Smrg $RM \$dlpath' 2683ae545d91Smrg shlibpath_overrides_runpath=yes 2684ae545d91Smrg dynamic_linker='Win32 link.exe' 2685ae545d91Smrg ;; 2686ae545d91Smrg 2687ae545d91Smrg *) 2688ae545d91Smrg # Assume MSVC and ICC wrapper 2689ae545d91Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2690ae545d91Smrg dynamic_linker='Win32 ld.exe' 2691ae545d91Smrg ;; 2692ae545d91Smrg esac 2693ae545d91Smrg # FIXME: first we should search . and the directory the executable is in 2694ae545d91Smrg shlibpath_var=PATH 2695ae545d91Smrg ;; 2696ae545d91Smrg 2697ae545d91Smrgdarwin* | rhapsody*) 2698ae545d91Smrg dynamic_linker="$host_os dyld" 2699ae545d91Smrg version_type=darwin 2700ae545d91Smrg need_lib_prefix=no 2701ae545d91Smrg need_version=no 2702ae545d91Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2703ae545d91Smrg soname_spec='$libname$release$major$shared_ext' 2704ae545d91Smrg shlibpath_overrides_runpath=yes 2705ae545d91Smrg shlibpath_var=DYLD_LIBRARY_PATH 2706ae545d91Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2707ae545d91Smrgm4_if([$1], [],[ 2708ae545d91Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2709ae545d91Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2710ae545d91Smrg ;; 2711ae545d91Smrg 2712ae545d91Smrgdgux*) 2713ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 2714ae545d91Smrg need_lib_prefix=no 2715ae545d91Smrg need_version=no 2716ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2717ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2718ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 2719ae545d91Smrg ;; 2720ae545d91Smrg 2721ae545d91Smrgfreebsd* | dragonfly* | midnightbsd*) 2722ae545d91Smrg # DragonFly does not have aout. When/if they implement a new 2723ae545d91Smrg # versioning mechanism, adjust this. 2724ae545d91Smrg if test -x /usr/bin/objformat; then 2725ae545d91Smrg objformat=`/usr/bin/objformat` 2726ae545d91Smrg else 2727ae545d91Smrg case $host_os in 2728ae545d91Smrg freebsd[[23]].*) objformat=aout ;; 2729ae545d91Smrg *) objformat=elf ;; 2730ae545d91Smrg esac 2731ae545d91Smrg fi 2732ae545d91Smrg version_type=freebsd-$objformat 2733ae545d91Smrg case $version_type in 2734ae545d91Smrg freebsd-elf*) 2735ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2736ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2737ae545d91Smrg need_version=no 2738ae545d91Smrg need_lib_prefix=no 2739ae545d91Smrg ;; 2740ae545d91Smrg freebsd-*) 2741ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2742ae545d91Smrg need_version=yes 2743ae545d91Smrg ;; 2744ae545d91Smrg esac 2745ae545d91Smrg case $host_cpu in 2746ae545d91Smrg powerpc64) 2747ae545d91Smrg # On FreeBSD bi-arch platforms, a different variable is used for 32-bit 2748ae545d91Smrg # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>. 2749ae545d91Smrg AC_COMPILE_IFELSE( 2750ae545d91Smrg [AC_LANG_SOURCE( 2751ae545d91Smrg [[int test_pointer_size[sizeof (void *) - 5]; 2752ae545d91Smrg ]])], 2753ae545d91Smrg [shlibpath_var=LD_LIBRARY_PATH], 2754ae545d91Smrg [shlibpath_var=LD_32_LIBRARY_PATH]) 2755ae545d91Smrg ;; 2756ae545d91Smrg *) 2757ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 2758ae545d91Smrg ;; 2759ae545d91Smrg esac 2760ae545d91Smrg case $host_os in 2761ae545d91Smrg freebsd2.*) 2762ae545d91Smrg shlibpath_overrides_runpath=yes 2763ae545d91Smrg ;; 2764ae545d91Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2765ae545d91Smrg shlibpath_overrides_runpath=yes 2766ae545d91Smrg hardcode_into_libs=yes 2767ae545d91Smrg ;; 2768ae545d91Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2769ae545d91Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2770ae545d91Smrg shlibpath_overrides_runpath=no 2771ae545d91Smrg hardcode_into_libs=yes 2772ae545d91Smrg ;; 2773ae545d91Smrg *) # from 4.6 on, and DragonFly 2774ae545d91Smrg shlibpath_overrides_runpath=yes 2775ae545d91Smrg hardcode_into_libs=yes 2776ae545d91Smrg ;; 2777ae545d91Smrg esac 2778ae545d91Smrg ;; 2779ae545d91Smrg 2780ae545d91Smrghaiku*) 2781ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 2782ae545d91Smrg need_lib_prefix=no 2783ae545d91Smrg need_version=no 2784ae545d91Smrg dynamic_linker="$host_os runtime_loader" 2785ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2786ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2787ae545d91Smrg shlibpath_var=LIBRARY_PATH 2788ae545d91Smrg shlibpath_overrides_runpath=no 2789ae545d91Smrg sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' 2790ae545d91Smrg sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' 2791ae545d91Smrg hardcode_into_libs=no 2792ae545d91Smrg ;; 2793ae545d91Smrg 2794ae545d91Smrghpux9* | hpux10* | hpux11*) 2795ae545d91Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 2796ae545d91Smrg # link against other versions. 2797ae545d91Smrg version_type=sunos 2798ae545d91Smrg need_lib_prefix=no 2799ae545d91Smrg need_version=no 2800ae545d91Smrg case $host_cpu in 2801ae545d91Smrg ia64*) 2802ae545d91Smrg shrext_cmds='.so' 2803ae545d91Smrg hardcode_into_libs=yes 2804ae545d91Smrg dynamic_linker="$host_os dld.so" 2805ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 2806ae545d91Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2807ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2808ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2809ae545d91Smrg if test 32 = "$HPUX_IA64_MODE"; then 2810ae545d91Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2811ae545d91Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2812ae545d91Smrg else 2813ae545d91Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2814ae545d91Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2815ae545d91Smrg fi 2816ae545d91Smrg ;; 2817ae545d91Smrg hppa*64*) 2818ae545d91Smrg shrext_cmds='.sl' 2819ae545d91Smrg hardcode_into_libs=yes 2820ae545d91Smrg dynamic_linker="$host_os dld.sl" 2821ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2822ae545d91Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2823ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2824ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2825ae545d91Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2826ae545d91Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2827ae545d91Smrg ;; 2828ae545d91Smrg *) 2829ae545d91Smrg shrext_cmds='.sl' 2830ae545d91Smrg dynamic_linker="$host_os dld.sl" 2831ae545d91Smrg shlibpath_var=SHLIB_PATH 2832ae545d91Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2833ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2834ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2835ae545d91Smrg ;; 2836ae545d91Smrg esac 2837ae545d91Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2838ae545d91Smrg postinstall_cmds='chmod 555 $lib' 2839ae545d91Smrg # or fails outright, so override atomically: 2840ae545d91Smrg install_override_mode=555 2841ae545d91Smrg ;; 2842ae545d91Smrg 2843ae545d91Smrginterix[[3-9]]*) 2844ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 2845ae545d91Smrg need_lib_prefix=no 2846ae545d91Smrg need_version=no 2847ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2848ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2849ae545d91Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2850ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 2851ae545d91Smrg shlibpath_overrides_runpath=no 2852ae545d91Smrg hardcode_into_libs=yes 2853ae545d91Smrg ;; 2854ae545d91Smrg 2855ae545d91Smrgirix5* | irix6* | nonstopux*) 2856ae545d91Smrg case $host_os in 2857ae545d91Smrg nonstopux*) version_type=nonstopux ;; 2858ae545d91Smrg *) 2859ae545d91Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 2860ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 2861ae545d91Smrg else 2862ae545d91Smrg version_type=irix 2863ae545d91Smrg fi ;; 2864ae545d91Smrg esac 2865ae545d91Smrg need_lib_prefix=no 2866ae545d91Smrg need_version=no 2867ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2868ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2869ae545d91Smrg case $host_os in 2870ae545d91Smrg irix5* | nonstopux*) 2871ae545d91Smrg libsuff= shlibsuff= 2872ae545d91Smrg ;; 2873ae545d91Smrg *) 2874ae545d91Smrg case $LD in # libtool.m4 will add one of these switches to LD 2875ae545d91Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2876ae545d91Smrg libsuff= shlibsuff= libmagic=32-bit;; 2877ae545d91Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2878ae545d91Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2879ae545d91Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2880ae545d91Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2881ae545d91Smrg *) libsuff= shlibsuff= libmagic=never-match;; 2882ae545d91Smrg esac 2883ae545d91Smrg ;; 2884ae545d91Smrg esac 2885ae545d91Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2886ae545d91Smrg shlibpath_overrides_runpath=no 2887ae545d91Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2888ae545d91Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2889ae545d91Smrg hardcode_into_libs=yes 2890ae545d91Smrg ;; 2891ae545d91Smrg 2892ae545d91Smrg# No shared lib support for Linux oldld, aout, or coff. 2893ae545d91Smrglinux*oldld* | linux*aout* | linux*coff*) 2894ae545d91Smrg dynamic_linker=no 2895ae545d91Smrg ;; 2896ae545d91Smrg 2897ae545d91Smrglinux*android*) 2898ae545d91Smrg version_type=none # Android doesn't support versioned libraries. 2899ae545d91Smrg need_lib_prefix=no 2900ae545d91Smrg need_version=no 2901ae545d91Smrg library_names_spec='$libname$release$shared_ext $libname$shared_ext' 2902ae545d91Smrg soname_spec='$libname$release$shared_ext' 2903ae545d91Smrg finish_cmds= 2904ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 2905ae545d91Smrg shlibpath_overrides_runpath=yes 2906ae545d91Smrg 2907ae545d91Smrg # This implies no fast_install, which is unacceptable. 2908ae545d91Smrg # Some rework will be needed to allow for fast_install 2909ae545d91Smrg # before this can be enabled. 2910ae545d91Smrg hardcode_into_libs=yes 2911ae545d91Smrg 2912ae545d91Smrg dynamic_linker='Android linker' 2913ae545d91Smrg # -rpath works at least for libraries that are not overridden by 2914ae545d91Smrg # libraries installed in system locations. 2915ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 2916ae545d91Smrg ;; 2917ae545d91Smrg 2918ae545d91Smrg# This must be glibc/ELF. 2919ae545d91Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2920ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 2921ae545d91Smrg need_lib_prefix=no 2922ae545d91Smrg need_version=no 2923ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2924ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2925ae545d91Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2926ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 2927ae545d91Smrg shlibpath_overrides_runpath=no 2928ae545d91Smrg 2929ae545d91Smrg # Some binutils ld are patched to set DT_RUNPATH 2930ae545d91Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2931ae545d91Smrg [lt_cv_shlibpath_overrides_runpath=no 2932ae545d91Smrg save_LDFLAGS=$LDFLAGS 2933ae545d91Smrg save_libdir=$libdir 2934ae545d91Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2935ae545d91Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2936ae545d91Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2937ae545d91Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2938ae545d91Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2939ae545d91Smrg LDFLAGS=$save_LDFLAGS 2940ae545d91Smrg libdir=$save_libdir 2941ae545d91Smrg ]) 2942ae545d91Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2943ae545d91Smrg 2944ae545d91Smrg # This implies no fast_install, which is unacceptable. 2945ae545d91Smrg # Some rework will be needed to allow for fast_install 2946ae545d91Smrg # before this can be enabled. 2947ae545d91Smrg hardcode_into_libs=yes 2948ae545d91Smrg 2949ae545d91Smrg # Ideally, we could use ldconfig to report *all* directories which are 2950ae545d91Smrg # searched for libraries, however this is still not possible. Aside from not 2951ae545d91Smrg # being certain /sbin/ldconfig is available, command 2952ae545d91Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2953ae545d91Smrg # even though it is searched at run-time. Try to do the best guess by 2954ae545d91Smrg # appending ld.so.conf contents (and includes) to the search path. 2955ae545d91Smrg if test -f /etc/ld.so.conf; then 2956ae545d91Smrg 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' ' '` 2957ae545d91Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2958ae545d91Smrg fi 2959ae545d91Smrg 2960ae545d91Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2961ae545d91Smrg # powerpc, because MkLinux only supported shared libraries with the 2962ae545d91Smrg # GNU dynamic linker. Since this was broken with cross compilers, 2963ae545d91Smrg # most powerpc-linux boxes support dynamic linking these days and 2964ae545d91Smrg # people can always --disable-shared, the test was removed, and we 2965ae545d91Smrg # assume the GNU/Linux dynamic linker is in use. 2966ae545d91Smrg dynamic_linker='GNU/Linux ld.so' 2967ae545d91Smrg ;; 2968ae545d91Smrg 2969ae545d91Smrgnetbsdelf*-gnu) 2970ae545d91Smrg version_type=linux 2971ae545d91Smrg need_lib_prefix=no 2972ae545d91Smrg need_version=no 2973ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2974ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2975ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 2976ae545d91Smrg shlibpath_overrides_runpath=no 2977ae545d91Smrg hardcode_into_libs=yes 2978ae545d91Smrg dynamic_linker='NetBSD ld.elf_so' 2979ae545d91Smrg ;; 2980ae545d91Smrg 2981ae545d91Smrgnetbsd*) 2982ae545d91Smrg version_type=sunos 2983ae545d91Smrg need_lib_prefix=no 2984ae545d91Smrg need_version=no 2985ae545d91Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2986ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2987ae545d91Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2988ae545d91Smrg dynamic_linker='NetBSD (a.out) ld.so' 2989ae545d91Smrg else 2990ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2991ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 2992ae545d91Smrg dynamic_linker='NetBSD ld.elf_so' 2993ae545d91Smrg fi 2994ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 2995ae545d91Smrg shlibpath_overrides_runpath=yes 2996ae545d91Smrg hardcode_into_libs=yes 2997ae545d91Smrg ;; 2998ae545d91Smrg 2999ae545d91Smrg*-mlibc) 3000ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 3001ae545d91Smrg need_lib_prefix=no 3002ae545d91Smrg need_version=no 3003ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3004ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 3005ae545d91Smrg dynamic_linker='mlibc ld.so' 3006ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3007ae545d91Smrg shlibpath_overrides_runpath=no 3008ae545d91Smrg hardcode_into_libs=yes 3009ae545d91Smrg ;; 3010ae545d91Smrg 3011ae545d91Smrgnewsos6) 3012ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 3013ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3014ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3015ae545d91Smrg shlibpath_overrides_runpath=yes 3016ae545d91Smrg ;; 3017ae545d91Smrg 3018ae545d91Smrg*nto* | *qnx*) 3019ae545d91Smrg version_type=qnx 3020ae545d91Smrg need_lib_prefix=no 3021ae545d91Smrg need_version=no 3022ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3023ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 3024ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3025ae545d91Smrg shlibpath_overrides_runpath=no 3026ae545d91Smrg hardcode_into_libs=yes 3027ae545d91Smrg dynamic_linker='ldqnx.so' 3028ae545d91Smrg ;; 3029ae545d91Smrg 3030ae545d91Smrgopenbsd*) 3031ae545d91Smrg version_type=sunos 3032ae545d91Smrg sys_lib_dlsearch_path_spec=/usr/lib 3033ae545d91Smrg need_lib_prefix=no 3034ae545d91Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3035ae545d91Smrg need_version=no 3036ae545d91Smrg else 3037ae545d91Smrg need_version=yes 3038ae545d91Smrg fi 3039ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3040ae545d91Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 3041ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3042ae545d91Smrg shlibpath_overrides_runpath=yes 3043ae545d91Smrg ;; 3044ae545d91Smrg 3045ae545d91Smrgos2*) 3046ae545d91Smrg libname_spec='$name' 3047ae545d91Smrg version_type=windows 3048ae545d91Smrg shrext_cmds=.dll 3049ae545d91Smrg need_version=no 3050ae545d91Smrg need_lib_prefix=no 3051ae545d91Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 3052ae545d91Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 3053ae545d91Smrg v=$($ECHO $release$versuffix | tr -d .-); 3054ae545d91Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 3055ae545d91Smrg $ECHO $n$v`$shared_ext' 3056ae545d91Smrg library_names_spec='${libname}_dll.$libext' 3057ae545d91Smrg dynamic_linker='OS/2 ld.exe' 3058ae545d91Smrg shlibpath_var=BEGINLIBPATH 3059ae545d91Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3060ae545d91Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3061ae545d91Smrg postinstall_cmds='base_file=`basename \$file`~ 3062ae545d91Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 3063ae545d91Smrg dldir=$destdir/`dirname \$dlpath`~ 3064ae545d91Smrg test -d \$dldir || mkdir -p \$dldir~ 3065ae545d91Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 3066ae545d91Smrg chmod a+x \$dldir/$dlname~ 3067ae545d91Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3068ae545d91Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3069ae545d91Smrg fi' 3070ae545d91Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 3071ae545d91Smrg dlpath=$dir/\$dldll~ 3072ae545d91Smrg $RM \$dlpath' 3073ae545d91Smrg ;; 3074ae545d91Smrg 3075ae545d91Smrgosf3* | osf4* | osf5*) 3076ae545d91Smrg version_type=osf 3077ae545d91Smrg need_lib_prefix=no 3078ae545d91Smrg need_version=no 3079ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 3080ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3081ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3082ae545d91Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3083ae545d91Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3084ae545d91Smrg ;; 3085ae545d91Smrg 3086ae545d91Smrgrdos*) 3087ae545d91Smrg dynamic_linker=no 3088ae545d91Smrg ;; 3089ae545d91Smrg 3090ae545d91Smrgserenity*) 3091ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 3092ae545d91Smrg need_lib_prefix=no 3093ae545d91Smrg need_version=no 3094ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3095ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 3096ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3097ae545d91Smrg shlibpath_overrides_runpath=no 3098ae545d91Smrg dynamic_linker='SerenityOS LibELF' 3099ae545d91Smrg ;; 3100ae545d91Smrg 3101ae545d91Smrgsolaris*) 3102ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 3103ae545d91Smrg need_lib_prefix=no 3104ae545d91Smrg need_version=no 3105ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3106ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 3107ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3108ae545d91Smrg shlibpath_overrides_runpath=yes 3109ae545d91Smrg hardcode_into_libs=yes 3110ae545d91Smrg # ldd complains unless libraries are executable 3111ae545d91Smrg postinstall_cmds='chmod +x $lib' 3112ae545d91Smrg ;; 3113ae545d91Smrg 3114ae545d91Smrgsunos4*) 3115ae545d91Smrg version_type=sunos 3116ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3117ae545d91Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3118ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3119ae545d91Smrg shlibpath_overrides_runpath=yes 3120ae545d91Smrg if test yes = "$with_gnu_ld"; then 3121ae545d91Smrg need_lib_prefix=no 3122ae545d91Smrg fi 3123ae545d91Smrg need_version=yes 3124ae545d91Smrg ;; 3125ae545d91Smrg 3126ae545d91Smrgsysv4 | sysv4.3*) 3127ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 3128ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3129ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 3130ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3131ae545d91Smrg case $host_vendor in 3132ae545d91Smrg sni) 3133ae545d91Smrg shlibpath_overrides_runpath=no 3134ae545d91Smrg need_lib_prefix=no 3135ae545d91Smrg runpath_var=LD_RUN_PATH 3136ae545d91Smrg ;; 3137ae545d91Smrg siemens) 3138ae545d91Smrg need_lib_prefix=no 3139ae545d91Smrg ;; 3140ae545d91Smrg motorola) 3141ae545d91Smrg need_lib_prefix=no 3142ae545d91Smrg need_version=no 3143ae545d91Smrg shlibpath_overrides_runpath=no 3144ae545d91Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3145ae545d91Smrg ;; 3146ae545d91Smrg esac 3147ae545d91Smrg ;; 3148ae545d91Smrg 3149ae545d91Smrgsysv4*MP*) 3150ae545d91Smrg if test -d /usr/nec; then 3151ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 3152ae545d91Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3153ae545d91Smrg soname_spec='$libname$shared_ext.$major' 3154ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3155ae545d91Smrg fi 3156ae545d91Smrg ;; 3157ae545d91Smrg 3158ae545d91Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3159ae545d91Smrg version_type=sco 3160ae545d91Smrg need_lib_prefix=no 3161ae545d91Smrg need_version=no 3162ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3163ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 3164ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3165ae545d91Smrg shlibpath_overrides_runpath=yes 3166ae545d91Smrg hardcode_into_libs=yes 3167ae545d91Smrg if test yes = "$with_gnu_ld"; then 3168ae545d91Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3169ae545d91Smrg else 3170ae545d91Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3171ae545d91Smrg case $host_os in 3172ae545d91Smrg sco3.2v5*) 3173ae545d91Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3174ae545d91Smrg ;; 3175ae545d91Smrg esac 3176ae545d91Smrg fi 3177ae545d91Smrg sys_lib_dlsearch_path_spec='/usr/lib' 3178ae545d91Smrg ;; 3179ae545d91Smrg 3180ae545d91Smrgtpf*) 3181ae545d91Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3182ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 3183ae545d91Smrg need_lib_prefix=no 3184ae545d91Smrg need_version=no 3185ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3186ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3187ae545d91Smrg shlibpath_overrides_runpath=no 3188ae545d91Smrg hardcode_into_libs=yes 3189ae545d91Smrg ;; 3190ae545d91Smrg 3191ae545d91Smrguts4*) 3192ae545d91Smrg version_type=linux # correct to gnu/linux during the next big refactor 3193ae545d91Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3194ae545d91Smrg soname_spec='$libname$release$shared_ext$major' 3195ae545d91Smrg shlibpath_var=LD_LIBRARY_PATH 3196ae545d91Smrg ;; 3197ae545d91Smrg 3198ae545d91Smrgemscripten*) 3199ae545d91Smrg version_type=none 3200ae545d91Smrg need_lib_prefix=no 3201ae545d91Smrg need_version=no 3202ae545d91Smrg library_names_spec='$libname$release$shared_ext' 3203ae545d91Smrg soname_spec='$libname$release$shared_ext' 3204ae545d91Smrg finish_cmds= 3205ae545d91Smrg dynamic_linker="Emscripten linker" 3206ae545d91Smrg _LT_COMPILER_PIC($1)='-fPIC' 3207ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' 3208ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' 3209ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 3210ae545d91Smrg _LT_TAGVAR(no_undefined_flag, $1)= 3211ae545d91Smrg ;; 3212ae545d91Smrg 3213ae545d91Smrg*) 3214ae545d91Smrg dynamic_linker=no 3215ae545d91Smrg ;; 3216ae545d91Smrgesac 3217ae545d91SmrgAC_MSG_RESULT([$dynamic_linker]) 3218ae545d91Smrgtest no = "$dynamic_linker" && can_build_shared=no 3219ae545d91Smrg 3220ae545d91Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3221ae545d91Smrgif test yes = "$GCC"; then 3222ae545d91Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3223ae545d91Smrgfi 3224ae545d91Smrg 3225ae545d91Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3226ae545d91Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3227ae545d91Smrgfi 3228ae545d91Smrg 3229ae545d91Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3230ae545d91Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3231ae545d91Smrgfi 3232ae545d91Smrg 3233ae545d91Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3234ae545d91Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3235ae545d91Smrg 3236ae545d91Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3237ae545d91Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3238ae545d91Smrg 3239ae545d91Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3240ae545d91Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3241ae545d91Smrg 3242ae545d91Smrg_LT_DECL([], [variables_saved_for_relink], [1], 3243ae545d91Smrg [Variables whose values should be saved in libtool wrapper scripts and 3244ae545d91Smrg restored at link time]) 3245ae545d91Smrg_LT_DECL([], [need_lib_prefix], [0], 3246ae545d91Smrg [Do we need the "lib" prefix for modules?]) 3247ae545d91Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3248ae545d91Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3249ae545d91Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3250ae545d91Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3251ae545d91Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3252ae545d91Smrg [Is shlibpath searched before the hard-coded library search path?]) 3253ae545d91Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3254ae545d91Smrg_LT_DECL([], [library_names_spec], [1], 3255ae545d91Smrg [[List of archive names. First name is the real one, the rest are links. 3256ae545d91Smrg The last name is the one that the linker finds with -lNAME]]) 3257ae545d91Smrg_LT_DECL([], [soname_spec], [1], 3258ae545d91Smrg [[The coded name of the library, if different from the real name]]) 3259ae545d91Smrg_LT_DECL([], [install_override_mode], [1], 3260ae545d91Smrg [Permission mode override for installation of shared libraries]) 3261ae545d91Smrg_LT_DECL([], [postinstall_cmds], [2], 3262ae545d91Smrg [Command to use after installation of a shared archive]) 3263ae545d91Smrg_LT_DECL([], [postuninstall_cmds], [2], 3264ae545d91Smrg [Command to use after uninstallation of a shared archive]) 3265ae545d91Smrg_LT_DECL([], [finish_cmds], [2], 3266ae545d91Smrg [Commands used to finish a libtool library installation in a directory]) 3267ae545d91Smrg_LT_DECL([], [finish_eval], [1], 3268ae545d91Smrg [[As "finish_cmds", except a single script fragment to be evaled but 3269ae545d91Smrg not shown]]) 3270ae545d91Smrg_LT_DECL([], [hardcode_into_libs], [0], 3271ae545d91Smrg [Whether we should hardcode library paths into libraries]) 3272ae545d91Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3273ae545d91Smrg [Compile-time system search path for libraries]) 3274ae545d91Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3275ae545d91Smrg [Detected run-time system search path for libraries]) 3276ae545d91Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3277ae545d91Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3278ae545d91Smrg])# _LT_SYS_DYNAMIC_LINKER 3279ae545d91Smrg 3280ae545d91Smrg 3281ae545d91Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 3282ae545d91Smrg# -------------------------- 3283ae545d91Smrg# find a file program that can recognize shared library 3284ae545d91SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3285ae545d91Smrg[m4_require([_LT_DECL_EGREP])dnl 3286ae545d91SmrgAC_MSG_CHECKING([for $1]) 3287ae545d91SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3288ae545d91Smrg[case $MAGIC_CMD in 3289ae545d91Smrg[[\\/*] | ?:[\\/]*]) 3290ae545d91Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3291ae545d91Smrg ;; 3292ae545d91Smrg*) 3293ae545d91Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 3294ae545d91Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3295ae545d91Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3296ae545d91Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3297ae545d91Smrgdnl not every word. This closes a longstanding sh security hole. 3298ae545d91Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3299ae545d91Smrg for ac_dir in $ac_dummy; do 3300ae545d91Smrg IFS=$lt_save_ifs 3301ae545d91Smrg test -z "$ac_dir" && ac_dir=. 3302ae545d91Smrg if test -f "$ac_dir/$1"; then 3303ae545d91Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3304ae545d91Smrg if test -n "$file_magic_test_file"; then 3305ae545d91Smrg case $deplibs_check_method in 3306ae545d91Smrg "file_magic "*) 3307ae545d91Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3308ae545d91Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3309ae545d91Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3310ae545d91Smrg $EGREP "$file_magic_regex" > /dev/null; then 3311ae545d91Smrg : 3312ae545d91Smrg else 3313ae545d91Smrg cat <<_LT_EOF 1>&2 3314ae545d91Smrg 3315ae545d91Smrg*** Warning: the command libtool uses to detect shared libraries, 3316ae545d91Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3317ae545d91Smrg*** The result is that libtool may fail to recognize shared libraries 3318ae545d91Smrg*** as such. This will affect the creation of libtool libraries that 3319ae545d91Smrg*** depend on shared libraries, but programs linked with such libtool 3320ae545d91Smrg*** libraries will work regardless of this problem. Nevertheless, you 3321ae545d91Smrg*** may want to report the problem to your system manager and/or to 3322ae545d91Smrg*** bug-libtool@gnu.org 3323ae545d91Smrg 3324ae545d91Smrg_LT_EOF 3325ae545d91Smrg fi ;; 3326ae545d91Smrg esac 3327ae545d91Smrg fi 3328ae545d91Smrg break 3329ae545d91Smrg fi 3330ae545d91Smrg done 3331ae545d91Smrg IFS=$lt_save_ifs 3332ae545d91Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 3333ae545d91Smrg ;; 3334ae545d91Smrgesac]) 3335ae545d91SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3336ae545d91Smrgif test -n "$MAGIC_CMD"; then 3337ae545d91Smrg AC_MSG_RESULT($MAGIC_CMD) 3338ae545d91Smrgelse 3339ae545d91Smrg AC_MSG_RESULT(no) 3340ae545d91Smrgfi 3341ae545d91Smrg_LT_DECL([], [MAGIC_CMD], [0], 3342ae545d91Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3343ae545d91Smrg])# _LT_PATH_TOOL_PREFIX 3344ae545d91Smrg 3345ae545d91Smrg# Old name: 3346ae545d91SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3347ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 3348ae545d91Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3349ae545d91Smrg 3350ae545d91Smrg 3351ae545d91Smrg# _LT_PATH_MAGIC 3352ae545d91Smrg# -------------- 3353ae545d91Smrg# find a file program that can recognize a shared library 3354ae545d91Smrgm4_defun([_LT_PATH_MAGIC], 3355ae545d91Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3356ae545d91Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3357ae545d91Smrg if test -n "$ac_tool_prefix"; then 3358ae545d91Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3359ae545d91Smrg else 3360ae545d91Smrg MAGIC_CMD=: 3361ae545d91Smrg fi 3362ae545d91Smrgfi 3363ae545d91Smrg])# _LT_PATH_MAGIC 3364ae545d91Smrg 3365ae545d91Smrg 3366ae545d91Smrg# LT_PATH_LD 3367ae545d91Smrg# ---------- 3368ae545d91Smrg# find the pathname to the GNU or non-GNU linker 3369ae545d91SmrgAC_DEFUN([LT_PATH_LD], 3370ae545d91Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3371ae545d91SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3372ae545d91SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3373ae545d91Smrgm4_require([_LT_DECL_SED])dnl 3374ae545d91Smrgm4_require([_LT_DECL_EGREP])dnl 3375ae545d91Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3376ae545d91Smrg 3377ae545d91SmrgAC_ARG_WITH([gnu-ld], 3378ae545d91Smrg [AS_HELP_STRING([--with-gnu-ld], 3379ae545d91Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3380ae545d91Smrg [test no = "$withval" || with_gnu_ld=yes], 3381ae545d91Smrg [with_gnu_ld=no])dnl 3382ae545d91Smrg 3383ae545d91Smrgac_prog=ld 3384ae545d91Smrgif test yes = "$GCC"; then 3385ae545d91Smrg # Check if gcc -print-prog-name=ld gives a path. 3386ae545d91Smrg AC_MSG_CHECKING([for ld used by $CC]) 3387ae545d91Smrg case $host in 3388ae545d91Smrg *-*-mingw* | *-*-windows*) 3389ae545d91Smrg # gcc leaves a trailing carriage return, which upsets mingw 3390ae545d91Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3391ae545d91Smrg *) 3392ae545d91Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3393ae545d91Smrg esac 3394ae545d91Smrg case $ac_prog in 3395ae545d91Smrg # Accept absolute paths. 3396ae545d91Smrg [[\\/]]* | ?:[[\\/]]*) 3397ae545d91Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 3398ae545d91Smrg # Canonicalize the pathname of ld 3399ae545d91Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3400ae545d91Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3401ae545d91Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3402ae545d91Smrg done 3403ae545d91Smrg test -z "$LD" && LD=$ac_prog 3404ae545d91Smrg ;; 3405ae545d91Smrg "") 3406ae545d91Smrg # If it fails, then pretend we aren't using GCC. 3407ae545d91Smrg ac_prog=ld 3408ae545d91Smrg ;; 3409ae545d91Smrg *) 3410ae545d91Smrg # If it is relative, then search for the first ld in PATH. 3411ae545d91Smrg with_gnu_ld=unknown 3412ae545d91Smrg ;; 3413ae545d91Smrg esac 3414ae545d91Smrgelif test yes = "$with_gnu_ld"; then 3415ae545d91Smrg AC_MSG_CHECKING([for GNU ld]) 3416ae545d91Smrgelse 3417ae545d91Smrg AC_MSG_CHECKING([for non-GNU ld]) 3418ae545d91Smrgfi 3419ae545d91SmrgAC_CACHE_VAL(lt_cv_path_LD, 3420ae545d91Smrg[if test -z "$LD"; then 3421ae545d91Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3422ae545d91Smrg for ac_dir in $PATH; do 3423ae545d91Smrg IFS=$lt_save_ifs 3424ae545d91Smrg test -z "$ac_dir" && ac_dir=. 3425ae545d91Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3426ae545d91Smrg lt_cv_path_LD=$ac_dir/$ac_prog 3427ae545d91Smrg # Check to see if the program is GNU ld. I'd rather use --version, 3428ae545d91Smrg # but apparently some variants of GNU ld only accept -v. 3429ae545d91Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 3430ae545d91Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3431ae545d91Smrg *GNU* | *'with BFD'*) 3432ae545d91Smrg test no != "$with_gnu_ld" && break 3433ae545d91Smrg ;; 3434ae545d91Smrg *) 3435ae545d91Smrg test yes != "$with_gnu_ld" && break 3436ae545d91Smrg ;; 3437ae545d91Smrg esac 3438ae545d91Smrg fi 3439ae545d91Smrg done 3440ae545d91Smrg IFS=$lt_save_ifs 3441ae545d91Smrgelse 3442ae545d91Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 3443ae545d91Smrgfi]) 3444ae545d91SmrgLD=$lt_cv_path_LD 3445ae545d91Smrgif test -n "$LD"; then 3446ae545d91Smrg AC_MSG_RESULT($LD) 3447ae545d91Smrgelse 3448ae545d91Smrg AC_MSG_RESULT(no) 3449ae545d91Smrgfi 3450ae545d91Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3451ae545d91Smrg_LT_PATH_LD_GNU 3452ae545d91SmrgAC_SUBST([LD]) 3453ae545d91Smrg 3454ae545d91Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3455ae545d91Smrg])# LT_PATH_LD 3456ae545d91Smrg 3457ae545d91Smrg# Old names: 3458ae545d91SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3459ae545d91SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3460ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 3461ae545d91Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3462ae545d91Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3463ae545d91Smrg 3464ae545d91Smrg 3465ae545d91Smrg# _LT_PATH_LD_GNU 3466ae545d91Smrg#- -------------- 3467ae545d91Smrgm4_defun([_LT_PATH_LD_GNU], 3468ae545d91Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3469ae545d91Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3470ae545d91Smrgcase `$LD -v 2>&1 </dev/null` in 3471ae545d91Smrg*GNU* | *'with BFD'*) 3472ae545d91Smrg lt_cv_prog_gnu_ld=yes 3473ae545d91Smrg ;; 3474ae545d91Smrg*) 3475ae545d91Smrg lt_cv_prog_gnu_ld=no 3476ae545d91Smrg ;; 3477ae545d91Smrgesac]) 3478ae545d91Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3479ae545d91Smrg])# _LT_PATH_LD_GNU 3480ae545d91Smrg 3481ae545d91Smrg 3482ae545d91Smrg# _LT_CMD_RELOAD 3483ae545d91Smrg# -------------- 3484ae545d91Smrg# find reload flag for linker 3485ae545d91Smrg# -- PORTME Some linkers may need a different reload flag. 3486ae545d91Smrgm4_defun([_LT_CMD_RELOAD], 3487ae545d91Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 3488ae545d91Smrg lt_cv_ld_reload_flag, 3489ae545d91Smrg [lt_cv_ld_reload_flag='-r']) 3490ae545d91Smrgreload_flag=$lt_cv_ld_reload_flag 3491ae545d91Smrgcase $reload_flag in 3492ae545d91Smrg"" | " "*) ;; 3493ae545d91Smrg*) reload_flag=" $reload_flag" ;; 3494ae545d91Smrgesac 3495ae545d91Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3496ae545d91Smrgcase $host_os in 3497ae545d91Smrg cygwin* | mingw* | windows* | pw32* | cegcc*) 3498ae545d91Smrg if test yes != "$GCC"; then 3499ae545d91Smrg reload_cmds=false 3500ae545d91Smrg fi 3501ae545d91Smrg ;; 3502ae545d91Smrg darwin*) 3503ae545d91Smrg if test yes = "$GCC"; then 3504ae545d91Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3505ae545d91Smrg else 3506ae545d91Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3507ae545d91Smrg fi 3508ae545d91Smrg ;; 3509ae545d91Smrgesac 3510ae545d91Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3511ae545d91Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3512ae545d91Smrg])# _LT_CMD_RELOAD 3513ae545d91Smrg 3514ae545d91Smrg 3515ae545d91Smrg# _LT_PATH_DD 3516ae545d91Smrg# ----------- 3517ae545d91Smrg# find a working dd 3518ae545d91Smrgm4_defun([_LT_PATH_DD], 3519ae545d91Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3520ae545d91Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3521ae545d91Smrgcat conftest.i conftest.i >conftest2.i 3522ae545d91Smrg: ${lt_DD:=$DD} 3523ae545d91SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3524ae545d91Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3525ae545d91Smrg cmp -s conftest.i conftest.out \ 3526ae545d91Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3527ae545d91Smrgfi]) 3528ae545d91Smrgrm -f conftest.i conftest2.i conftest.out]) 3529ae545d91Smrg])# _LT_PATH_DD 3530ae545d91Smrg 3531ae545d91Smrg 3532ae545d91Smrg# _LT_CMD_TRUNCATE 3533ae545d91Smrg# ---------------- 3534ae545d91Smrg# find command to truncate a binary pipe 3535ae545d91Smrgm4_defun([_LT_CMD_TRUNCATE], 3536ae545d91Smrg[m4_require([_LT_PATH_DD]) 3537ae545d91SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3538ae545d91Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3539ae545d91Smrgcat conftest.i conftest.i >conftest2.i 3540ae545d91Smrglt_cv_truncate_bin= 3541ae545d91Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3542ae545d91Smrg cmp -s conftest.i conftest.out \ 3543ae545d91Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3544ae545d91Smrgfi 3545ae545d91Smrgrm -f conftest.i conftest2.i conftest.out 3546ae545d91Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3547ae545d91Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3548ae545d91Smrg [Command to truncate a binary pipe]) 3549ae545d91Smrg])# _LT_CMD_TRUNCATE 3550ae545d91Smrg 3551ae545d91Smrg 3552ae545d91Smrg# _LT_CHECK_MAGIC_METHOD 3553ae545d91Smrg# ---------------------- 3554ae545d91Smrg# how to check for library dependencies 3555ae545d91Smrg# -- PORTME fill in with the dynamic library characteristics 3556ae545d91Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3557ae545d91Smrg[m4_require([_LT_DECL_EGREP]) 3558ae545d91Smrgm4_require([_LT_DECL_OBJDUMP]) 3559ae545d91SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3560ae545d91Smrglt_cv_deplibs_check_method, 3561ae545d91Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3562ae545d91Smrglt_cv_file_magic_test_file= 3563ae545d91Smrglt_cv_deplibs_check_method='unknown' 3564ae545d91Smrg# Need to set the preceding variable on all platforms that support 3565ae545d91Smrg# interlibrary dependencies. 3566ae545d91Smrg# 'none' -- dependencies not supported. 3567ae545d91Smrg# 'unknown' -- same as none, but documents that we really don't know. 3568ae545d91Smrg# 'pass_all' -- all dependencies passed with no checks. 3569ae545d91Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 3570ae545d91Smrg# that responds to the $file_magic_cmd with a given extended regex. 3571ae545d91Smrg# If you have 'file' or equivalent on your system and you're not sure 3572ae545d91Smrg# whether 'pass_all' will *always* work, you probably want this one. 3573ae545d91Smrg 3574ae545d91Smrgcase $host_os in 3575ae545d91Smrgaix[[4-9]]*) 3576ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3577ae545d91Smrg ;; 3578ae545d91Smrg 3579ae545d91Smrgbeos*) 3580ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3581ae545d91Smrg ;; 3582ae545d91Smrg 3583ae545d91Smrgbsdi[[45]]*) 3584ae545d91Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3585ae545d91Smrg lt_cv_file_magic_cmd='$FILECMD -L' 3586ae545d91Smrg lt_cv_file_magic_test_file=/shlib/libc.so 3587ae545d91Smrg ;; 3588ae545d91Smrg 3589ae545d91Smrgcygwin*) 3590ae545d91Smrg # func_win32_libid is a shell function defined in ltmain.sh 3591ae545d91Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3592ae545d91Smrg lt_cv_file_magic_cmd='func_win32_libid' 3593ae545d91Smrg ;; 3594ae545d91Smrg 3595ae545d91Smrgmingw* | windows* | pw32*) 3596ae545d91Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 3597ae545d91Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3598ae545d91Smrg # unless we find 'file', for example because we are cross-compiling. 3599ae545d91Smrg if ( file / ) >/dev/null 2>&1; then 3600ae545d91Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3601ae545d91Smrg lt_cv_file_magic_cmd='func_win32_libid' 3602ae545d91Smrg else 3603ae545d91Smrg # Keep this pattern in sync with the one in func_win32_libid. 3604ae545d91Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' 3605ae545d91Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3606ae545d91Smrg fi 3607ae545d91Smrg ;; 3608ae545d91Smrg 3609ae545d91Smrgcegcc*) 3610ae545d91Smrg # use the weaker test based on 'objdump'. See mingw*. 3611ae545d91Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3612ae545d91Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3613ae545d91Smrg ;; 3614ae545d91Smrg 3615ae545d91Smrgdarwin* | rhapsody*) 3616ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3617ae545d91Smrg ;; 3618ae545d91Smrg 3619ae545d91Smrgfreebsd* | dragonfly* | midnightbsd*) 3620ae545d91Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3621ae545d91Smrg case $host_cpu in 3622ae545d91Smrg i*86 ) 3623ae545d91Smrg # Not sure whether the presence of OpenBSD here was a mistake. 3624ae545d91Smrg # Let's accept both of them until this is cleared up. 3625ae545d91Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3626ae545d91Smrg lt_cv_file_magic_cmd=$FILECMD 3627ae545d91Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3628ae545d91Smrg ;; 3629ae545d91Smrg esac 3630ae545d91Smrg else 3631ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3632ae545d91Smrg fi 3633ae545d91Smrg ;; 3634ae545d91Smrg 3635ae545d91Smrghaiku*) 3636ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3637ae545d91Smrg ;; 3638ae545d91Smrg 3639ae545d91Smrghpux10.20* | hpux11*) 3640ae545d91Smrg lt_cv_file_magic_cmd=$FILECMD 3641ae545d91Smrg case $host_cpu in 3642ae545d91Smrg ia64*) 3643ae545d91Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3644ae545d91Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3645ae545d91Smrg ;; 3646ae545d91Smrg hppa*64*) 3647ae545d91Smrg [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]'] 3648ae545d91Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3649ae545d91Smrg ;; 3650ae545d91Smrg *) 3651ae545d91Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3652ae545d91Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3653ae545d91Smrg ;; 3654ae545d91Smrg esac 3655ae545d91Smrg ;; 3656ae545d91Smrg 3657ae545d91Smrginterix[[3-9]]*) 3658ae545d91Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3659ae545d91Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3660ae545d91Smrg ;; 3661ae545d91Smrg 3662ae545d91Smrgirix5* | irix6* | nonstopux*) 3663ae545d91Smrg case $LD in 3664ae545d91Smrg *-32|*"-32 ") libmagic=32-bit;; 3665ae545d91Smrg *-n32|*"-n32 ") libmagic=N32;; 3666ae545d91Smrg *-64|*"-64 ") libmagic=64-bit;; 3667ae545d91Smrg *) libmagic=never-match;; 3668ae545d91Smrg esac 3669ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3670ae545d91Smrg ;; 3671ae545d91Smrg 3672ae545d91Smrg# This must be glibc/ELF. 3673ae545d91Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3674ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3675ae545d91Smrg ;; 3676ae545d91Smrg 3677ae545d91Smrg*-mlibc) 3678ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3679ae545d91Smrg ;; 3680ae545d91Smrg 3681ae545d91Smrgnetbsd* | netbsdelf*-gnu) 3682ae545d91Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3683ae545d91Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3684ae545d91Smrg else 3685ae545d91Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3686ae545d91Smrg fi 3687ae545d91Smrg ;; 3688ae545d91Smrg 3689ae545d91Smrgnewos6*) 3690ae545d91Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3691ae545d91Smrg lt_cv_file_magic_cmd=$FILECMD 3692ae545d91Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3693ae545d91Smrg ;; 3694ae545d91Smrg 3695ae545d91Smrg*nto* | *qnx*) 3696ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3697ae545d91Smrg ;; 3698ae545d91Smrg 3699ae545d91Smrgopenbsd*) 3700ae545d91Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3701ae545d91Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3702ae545d91Smrg else 3703ae545d91Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3704ae545d91Smrg fi 3705ae545d91Smrg ;; 3706ae545d91Smrg 3707ae545d91Smrgosf3* | osf4* | osf5*) 3708ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3709ae545d91Smrg ;; 3710ae545d91Smrg 3711ae545d91Smrgrdos*) 3712ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3713ae545d91Smrg ;; 3714ae545d91Smrg 3715ae545d91Smrgserenity*) 3716ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3717ae545d91Smrg ;; 3718ae545d91Smrg 3719ae545d91Smrgsolaris*) 3720ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3721ae545d91Smrg ;; 3722ae545d91Smrg 3723ae545d91Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3724ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3725ae545d91Smrg ;; 3726ae545d91Smrg 3727ae545d91Smrgsysv4 | sysv4.3*) 3728ae545d91Smrg case $host_vendor in 3729ae545d91Smrg motorola) 3730ae545d91Smrg 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]]' 3731ae545d91Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3732ae545d91Smrg ;; 3733ae545d91Smrg ncr) 3734ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3735ae545d91Smrg ;; 3736ae545d91Smrg sequent) 3737ae545d91Smrg lt_cv_file_magic_cmd='/bin/file' 3738ae545d91Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3739ae545d91Smrg ;; 3740ae545d91Smrg sni) 3741ae545d91Smrg lt_cv_file_magic_cmd='/bin/file' 3742ae545d91Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3743ae545d91Smrg lt_cv_file_magic_test_file=/lib/libc.so 3744ae545d91Smrg ;; 3745ae545d91Smrg siemens) 3746ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3747ae545d91Smrg ;; 3748ae545d91Smrg pc) 3749ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3750ae545d91Smrg ;; 3751ae545d91Smrg esac 3752ae545d91Smrg ;; 3753ae545d91Smrg 3754ae545d91Smrgtpf*) 3755ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3756ae545d91Smrg ;; 3757ae545d91Smrgos2*) 3758ae545d91Smrg lt_cv_deplibs_check_method=pass_all 3759ae545d91Smrg ;; 3760ae545d91Smrgesac 3761ae545d91Smrg]) 3762ae545d91Smrg 3763ae545d91Smrgfile_magic_glob= 3764ae545d91Smrgwant_nocaseglob=no 3765ae545d91Smrgif test "$build" = "$host"; then 3766ae545d91Smrg case $host_os in 3767ae545d91Smrg mingw* | windows* | pw32*) 3768ae545d91Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3769ae545d91Smrg want_nocaseglob=yes 3770ae545d91Smrg else 3771ae545d91Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3772ae545d91Smrg fi 3773ae545d91Smrg ;; 3774ae545d91Smrg esac 3775ae545d91Smrgfi 3776ae545d91Smrg 3777ae545d91Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 3778ae545d91Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 3779ae545d91Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3780ae545d91Smrg 3781ae545d91Smrg_LT_DECL([], [deplibs_check_method], [1], 3782ae545d91Smrg [Method to check whether dependent libraries are shared objects]) 3783ae545d91Smrg_LT_DECL([], [file_magic_cmd], [1], 3784ae545d91Smrg [Command to use when deplibs_check_method = "file_magic"]) 3785ae545d91Smrg_LT_DECL([], [file_magic_glob], [1], 3786ae545d91Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3787ae545d91Smrg_LT_DECL([], [want_nocaseglob], [1], 3788ae545d91Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3789ae545d91Smrg])# _LT_CHECK_MAGIC_METHOD 3790ae545d91Smrg 3791ae545d91Smrg 3792ae545d91Smrg# LT_PATH_NM 3793ae545d91Smrg# ---------- 3794ae545d91Smrg# find the pathname to a BSD- or MS-compatible name lister 3795ae545d91SmrgAC_DEFUN([LT_PATH_NM], 3796ae545d91Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3797ae545d91SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3798ae545d91Smrg[if test -n "$NM"; then 3799ae545d91Smrg # Let the user override the test. 3800ae545d91Smrg lt_cv_path_NM=$NM 3801ae545d91Smrgelse 3802ae545d91Smrg lt_nm_to_check=${ac_tool_prefix}nm 3803ae545d91Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3804ae545d91Smrg lt_nm_to_check="$lt_nm_to_check nm" 3805ae545d91Smrg fi 3806ae545d91Smrg for lt_tmp_nm in $lt_nm_to_check; do 3807ae545d91Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3808ae545d91Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3809ae545d91Smrg IFS=$lt_save_ifs 3810ae545d91Smrg test -z "$ac_dir" && ac_dir=. 3811ae545d91Smrg tmp_nm=$ac_dir/$lt_tmp_nm 3812ae545d91Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3813ae545d91Smrg # Check to see if the nm accepts a BSD-compat flag. 3814ae545d91Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3815ae545d91Smrg # nm: unknown option "B" ignored 3816ae545d91Smrg # Tru64's nm complains that /dev/null is an invalid object file 3817ae545d91Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3818ae545d91Smrg case $build_os in 3819ae545d91Smrg mingw* | windows*) lt_bad_file=conftest.nm/nofile ;; 3820ae545d91Smrg *) lt_bad_file=/dev/null ;; 3821ae545d91Smrg esac 3822ae545d91Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 3823ae545d91Smrg *$lt_bad_file* | *'Invalid file or object type'*) 3824ae545d91Smrg lt_cv_path_NM="$tmp_nm -B" 3825ae545d91Smrg break 2 3826ae545d91Smrg ;; 3827ae545d91Smrg *) 3828ae545d91Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 3829ae545d91Smrg */dev/null*) 3830ae545d91Smrg lt_cv_path_NM="$tmp_nm -p" 3831ae545d91Smrg break 2 3832ae545d91Smrg ;; 3833ae545d91Smrg *) 3834ae545d91Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3835ae545d91Smrg continue # so that we can try to find one that supports BSD flags 3836ae545d91Smrg ;; 3837ae545d91Smrg esac 3838ae545d91Smrg ;; 3839ae545d91Smrg esac 3840ae545d91Smrg fi 3841ae545d91Smrg done 3842ae545d91Smrg IFS=$lt_save_ifs 3843ae545d91Smrg done 3844ae545d91Smrg : ${lt_cv_path_NM=no} 3845ae545d91Smrgfi]) 3846ae545d91Smrgif test no != "$lt_cv_path_NM"; then 3847ae545d91Smrg NM=$lt_cv_path_NM 3848ae545d91Smrgelse 3849ae545d91Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3850ae545d91Smrg if test -n "$DUMPBIN"; then : 3851ae545d91Smrg # Let the user override the test. 3852ae545d91Smrg else 3853ae545d91Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3854ae545d91Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 3855ae545d91Smrg *COFF*) 3856ae545d91Smrg DUMPBIN="$DUMPBIN -symbols -headers" 3857ae545d91Smrg ;; 3858ae545d91Smrg *) 3859ae545d91Smrg DUMPBIN=: 3860ae545d91Smrg ;; 3861ae545d91Smrg esac 3862ae545d91Smrg fi 3863ae545d91Smrg AC_SUBST([DUMPBIN]) 3864ae545d91Smrg if test : != "$DUMPBIN"; then 3865ae545d91Smrg NM=$DUMPBIN 3866ae545d91Smrg fi 3867ae545d91Smrgfi 3868ae545d91Smrgtest -z "$NM" && NM=nm 3869ae545d91SmrgAC_SUBST([NM]) 3870ae545d91Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3871ae545d91Smrg 3872ae545d91SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3873ae545d91Smrg [lt_cv_nm_interface="BSD nm" 3874ae545d91Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3875ae545d91Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3876ae545d91Smrg (eval "$ac_compile" 2>conftest.err) 3877ae545d91Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3878ae545d91Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3879ae545d91Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3880ae545d91Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3881ae545d91Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3882ae545d91Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3883ae545d91Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3884ae545d91Smrg lt_cv_nm_interface="MS dumpbin" 3885ae545d91Smrg fi 3886ae545d91Smrg rm -f conftest*]) 3887ae545d91Smrg])# LT_PATH_NM 3888ae545d91Smrg 3889ae545d91Smrg# Old names: 3890ae545d91SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3891ae545d91SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3892ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 3893ae545d91Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3894ae545d91Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3895ae545d91Smrg 3896ae545d91Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3897ae545d91Smrg# -------------------------------- 3898ae545d91Smrg# how to determine the name of the shared library 3899ae545d91Smrg# associated with a specific link library. 3900ae545d91Smrg# -- PORTME fill in with the dynamic library characteristics 3901ae545d91Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3902ae545d91Smrg[m4_require([_LT_DECL_EGREP]) 3903ae545d91Smrgm4_require([_LT_DECL_OBJDUMP]) 3904ae545d91Smrgm4_require([_LT_DECL_DLLTOOL]) 3905ae545d91SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3906ae545d91Smrglt_cv_sharedlib_from_linklib_cmd, 3907ae545d91Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3908ae545d91Smrg 3909ae545d91Smrgcase $host_os in 3910ae545d91Smrgcygwin* | mingw* | windows* | pw32* | cegcc*) 3911ae545d91Smrg # two different shell functions defined in ltmain.sh; 3912ae545d91Smrg # decide which one to use based on capabilities of $DLLTOOL 3913ae545d91Smrg case `$DLLTOOL --help 2>&1` in 3914ae545d91Smrg *--identify-strict*) 3915ae545d91Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3916ae545d91Smrg ;; 3917ae545d91Smrg *) 3918ae545d91Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3919ae545d91Smrg ;; 3920ae545d91Smrg esac 3921ae545d91Smrg ;; 3922ae545d91Smrg*) 3923ae545d91Smrg # fallback: assume linklib IS sharedlib 3924ae545d91Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 3925ae545d91Smrg ;; 3926ae545d91Smrgesac 3927ae545d91Smrg]) 3928ae545d91Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3929ae545d91Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3930ae545d91Smrg 3931ae545d91Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3932ae545d91Smrg [Command to associate shared and link libraries]) 3933ae545d91Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3934ae545d91Smrg 3935ae545d91Smrg 3936ae545d91Smrg# _LT_PATH_MANIFEST_TOOL 3937ae545d91Smrg# ---------------------- 3938ae545d91Smrg# locate the manifest tool 3939ae545d91Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3940ae545d91Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3941ae545d91Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3942ae545d91SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_manifest_tool], 3943ae545d91Smrg [lt_cv_path_manifest_tool=no 3944ae545d91Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3945ae545d91Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3946ae545d91Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3947ae545d91Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3948ae545d91Smrg lt_cv_path_manifest_tool=yes 3949ae545d91Smrg fi 3950ae545d91Smrg rm -f conftest*]) 3951ae545d91Smrgif test yes != "$lt_cv_path_manifest_tool"; then 3952ae545d91Smrg MANIFEST_TOOL=: 3953ae545d91Smrgfi 3954ae545d91Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3955ae545d91Smrg])# _LT_PATH_MANIFEST_TOOL 3956ae545d91Smrg 3957ae545d91Smrg 3958ae545d91Smrg# _LT_DLL_DEF_P([FILE]) 3959ae545d91Smrg# --------------------- 3960ae545d91Smrg# True iff FILE is a Windows DLL '.def' file. 3961ae545d91Smrg# Keep in sync with func_dll_def_p in the libtool script 3962ae545d91SmrgAC_DEFUN([_LT_DLL_DEF_P], 3963ae545d91Smrg[dnl 3964ae545d91Smrg test DEF = "`$SED -n dnl 3965ae545d91Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3966ae545d91Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3967ae545d91Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3968ae545d91Smrg -e q dnl Only consider the first "real" line 3969ae545d91Smrg $1`" dnl 3970ae545d91Smrg])# _LT_DLL_DEF_P 3971ae545d91Smrg 3972ae545d91Smrg 3973ae545d91Smrg# LT_LIB_M 3974ae545d91Smrg# -------- 3975ae545d91Smrg# check for math library 3976ae545d91SmrgAC_DEFUN([LT_LIB_M], 3977ae545d91Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3978ae545d91SmrgLIBM= 3979ae545d91Smrgcase $host in 3980ae545d91Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-mingw* | *-*-pw32* | *-*-darwin*) 3981ae545d91Smrg # These system don't have libm, or don't need it 3982ae545d91Smrg ;; 3983ae545d91Smrg*-ncr-sysv4.3*) 3984ae545d91Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3985ae545d91Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3986ae545d91Smrg ;; 3987ae545d91Smrg*) 3988ae545d91Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 3989ae545d91Smrg ;; 3990ae545d91Smrgesac 3991ae545d91SmrgAC_SUBST([LIBM]) 3992ae545d91Smrg])# LT_LIB_M 3993ae545d91Smrg 3994ae545d91Smrg# Old name: 3995ae545d91SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3996ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 3997ae545d91Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3998ae545d91Smrg 3999ae545d91Smrg 4000ae545d91Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 4001ae545d91Smrg# ------------------------------- 4002ae545d91Smrgm4_defun([_LT_COMPILER_NO_RTTI], 4003ae545d91Smrg[m4_require([_LT_TAG_COMPILER])dnl 4004ae545d91Smrg 4005ae545d91Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 4006ae545d91Smrg 4007ae545d91Smrgif test yes = "$GCC"; then 4008ae545d91Smrg case $cc_basename in 4009ae545d91Smrg nvcc*) 4010ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 4011ae545d91Smrg *) 4012ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 4013ae545d91Smrg esac 4014ae545d91Smrg 4015ae545d91Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 4016ae545d91Smrg lt_cv_prog_compiler_rtti_exceptions, 4017ae545d91Smrg [-fno-rtti -fno-exceptions], [], 4018ae545d91Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 4019ae545d91Smrgfi 4020ae545d91Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 4021ae545d91Smrg [Compiler flag to turn off builtin functions]) 4022ae545d91Smrg])# _LT_COMPILER_NO_RTTI 4023ae545d91Smrg 4024ae545d91Smrg 4025ae545d91Smrg# _LT_CMD_GLOBAL_SYMBOLS 4026ae545d91Smrg# ---------------------- 4027ae545d91Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 4028ae545d91Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4029ae545d91SmrgAC_REQUIRE([AC_PROG_CC])dnl 4030ae545d91SmrgAC_REQUIRE([AC_PROG_AWK])dnl 4031ae545d91SmrgAC_REQUIRE([LT_PATH_NM])dnl 4032ae545d91SmrgAC_REQUIRE([LT_PATH_LD])dnl 4033ae545d91Smrgm4_require([_LT_DECL_SED])dnl 4034ae545d91Smrgm4_require([_LT_DECL_EGREP])dnl 4035ae545d91Smrgm4_require([_LT_TAG_COMPILER])dnl 4036ae545d91Smrg 4037ae545d91Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 4038ae545d91SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 4039ae545d91SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 4040ae545d91Smrg[ 4041ae545d91Smrg# These are sane defaults that work on at least a few old systems. 4042ae545d91Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 4043ae545d91Smrg 4044ae545d91Smrg# Character class describing NM global symbol codes. 4045ae545d91Smrgsymcode='[[BCDEGRST]]' 4046ae545d91Smrg 4047ae545d91Smrg# Regexp to match symbols that can be accessed directly from C. 4048ae545d91Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 4049ae545d91Smrg 4050ae545d91Smrg# Define system-specific variables. 4051ae545d91Smrgcase $host_os in 4052ae545d91Smrgaix*) 4053ae545d91Smrg symcode='[[BCDT]]' 4054ae545d91Smrg ;; 4055ae545d91Smrgcygwin* | mingw* | windows* | pw32* | cegcc*) 4056ae545d91Smrg symcode='[[ABCDGISTW]]' 4057ae545d91Smrg ;; 4058ae545d91Smrghpux*) 4059ae545d91Smrg if test ia64 = "$host_cpu"; then 4060ae545d91Smrg symcode='[[ABCDEGRST]]' 4061ae545d91Smrg fi 4062ae545d91Smrg ;; 4063ae545d91Smrgirix* | nonstopux*) 4064ae545d91Smrg symcode='[[BCDEGRST]]' 4065ae545d91Smrg ;; 4066ae545d91Smrgosf*) 4067ae545d91Smrg symcode='[[BCDEGQRST]]' 4068ae545d91Smrg ;; 4069ae545d91Smrgsolaris*) 4070ae545d91Smrg symcode='[[BCDRT]]' 4071ae545d91Smrg ;; 4072ae545d91Smrgsco3.2v5*) 4073ae545d91Smrg symcode='[[DT]]' 4074ae545d91Smrg ;; 4075ae545d91Smrgsysv4.2uw2*) 4076ae545d91Smrg symcode='[[DT]]' 4077ae545d91Smrg ;; 4078ae545d91Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 4079ae545d91Smrg symcode='[[ABDT]]' 4080ae545d91Smrg ;; 4081ae545d91Smrgsysv4) 4082ae545d91Smrg symcode='[[DFNSTU]]' 4083ae545d91Smrg ;; 4084ae545d91Smrgesac 4085ae545d91Smrg 4086ae545d91Smrg# If we're using GNU nm, then use its standard symbol codes. 4087ae545d91Smrgcase `$NM -V 2>&1` in 4088ae545d91Smrg*GNU* | *'with BFD'*) 4089ae545d91Smrg symcode='[[ABCDGIRSTW]]' ;; 4090ae545d91Smrgesac 4091ae545d91Smrg 4092ae545d91Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4093ae545d91Smrg # Gets list of data symbols to import. 4094ae545d91Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 4095ae545d91Smrg # Adjust the below global symbol transforms to fixup imported variables. 4096ae545d91Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 4097ae545d91Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 4098ae545d91Smrg lt_c_name_lib_hook="\ 4099ae545d91Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 4100ae545d91Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 4101ae545d91Smrgelse 4102ae545d91Smrg # Disable hooks by default. 4103ae545d91Smrg lt_cv_sys_global_symbol_to_import= 4104ae545d91Smrg lt_cdecl_hook= 4105ae545d91Smrg lt_c_name_hook= 4106ae545d91Smrg lt_c_name_lib_hook= 4107ae545d91Smrgfi 4108ae545d91Smrg 4109ae545d91Smrg# Transform an extracted symbol line into a proper C declaration. 4110ae545d91Smrg# Some systems (esp. on ia64) link data and code symbols differently, 4111ae545d91Smrg# so use this general approach. 4112ae545d91Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 4113ae545d91Smrg$lt_cdecl_hook\ 4114ae545d91Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4115ae545d91Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4116ae545d91Smrg 4117ae545d91Smrg# Transform an extracted symbol line into symbol name and symbol address 4118ae545d91Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 4119ae545d91Smrg$lt_c_name_hook\ 4120ae545d91Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4121ae545d91Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4122ae545d91Smrg 4123ae545d91Smrg# Transform an extracted symbol line into symbol name with lib prefix and 4124ae545d91Smrg# symbol address. 4125ae545d91Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 4126ae545d91Smrg$lt_c_name_lib_hook\ 4127ae545d91Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4128ae545d91Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4129ae545d91Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4130ae545d91Smrg 4131ae545d91Smrg# Handle CRLF in mingw tool chain 4132ae545d91Smrgopt_cr= 4133ae545d91Smrgcase $build_os in 4134ae545d91Smrgmingw* | windows*) 4135ae545d91Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4136ae545d91Smrg ;; 4137ae545d91Smrgesac 4138ae545d91Smrg 4139ae545d91Smrg# Try without a prefix underscore, then with it. 4140ae545d91Smrgfor ac_symprfx in "" "_"; do 4141ae545d91Smrg 4142ae545d91Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4143ae545d91Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4144ae545d91Smrg 4145ae545d91Smrg # Write the raw and C identifiers. 4146ae545d91Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4147ae545d91Smrg # Fake it for dumpbin and say T for any non-static function, 4148ae545d91Smrg # D for any global variable and I for any imported variable. 4149ae545d91Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 4150ae545d91Smrg # which start with @ or ?. 4151ae545d91Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4152ae545d91Smrg" {last_section=section; section=\$ 3};"\ 4153ae545d91Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4154ae545d91Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4155ae545d91Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4156ae545d91Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4157ae545d91Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4158ae545d91Smrg" \$ 0!~/External *\|/{next};"\ 4159ae545d91Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4160ae545d91Smrg" {if(hide[section]) next};"\ 4161ae545d91Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4162ae545d91Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4163ae545d91Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4164ae545d91Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4165ae545d91Smrg" ' prfx=^$ac_symprfx]" 4166ae545d91Smrg else 4167ae545d91Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4168ae545d91Smrg fi 4169ae545d91Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 4170ae545d91Smrg 4171ae545d91Smrg # Check to see that the pipe works correctly. 4172ae545d91Smrg pipe_works=no 4173ae545d91Smrg 4174ae545d91Smrg rm -f conftest* 4175ae545d91Smrg cat > conftest.$ac_ext <<_LT_EOF 4176ae545d91Smrg#ifdef __cplusplus 4177ae545d91Smrgextern "C" { 4178ae545d91Smrg#endif 4179ae545d91Smrgchar nm_test_var; 4180ae545d91Smrgvoid nm_test_func(void); 4181ae545d91Smrgvoid nm_test_func(void){} 4182ae545d91Smrg#ifdef __cplusplus 4183ae545d91Smrg} 4184ae545d91Smrg#endif 4185ae545d91Smrgint main(void){nm_test_var='a';nm_test_func();return(0);} 4186ae545d91Smrg_LT_EOF 4187ae545d91Smrg 4188ae545d91Smrg if AC_TRY_EVAL(ac_compile); then 4189ae545d91Smrg # Now try to grab the symbols. 4190ae545d91Smrg nlist=conftest.nm 4191ae545d91Smrg $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD 4192ae545d91Smrg if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then 4193ae545d91Smrg # Try sorting and uniquifying the output. 4194ae545d91Smrg if sort "$nlist" | uniq > "$nlist"T; then 4195ae545d91Smrg mv -f "$nlist"T "$nlist" 4196ae545d91Smrg else 4197ae545d91Smrg rm -f "$nlist"T 4198ae545d91Smrg fi 4199ae545d91Smrg 4200ae545d91Smrg # Make sure that we snagged all the symbols we need. 4201ae545d91Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4202ae545d91Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4203ae545d91Smrg cat <<_LT_EOF > conftest.$ac_ext 4204ae545d91Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4205ae545d91Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4206ae545d91Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 4207ae545d91Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4208ae545d91Smrg# define LT@&t@_DLSYM_CONST 4209ae545d91Smrg#elif defined __osf__ 4210ae545d91Smrg/* This system does not cope well with relocations in const data. */ 4211ae545d91Smrg# define LT@&t@_DLSYM_CONST 4212ae545d91Smrg#else 4213ae545d91Smrg# define LT@&t@_DLSYM_CONST const 4214ae545d91Smrg#endif 4215ae545d91Smrg 4216ae545d91Smrg#ifdef __cplusplus 4217ae545d91Smrgextern "C" { 4218ae545d91Smrg#endif 4219ae545d91Smrg 4220ae545d91Smrg_LT_EOF 4221ae545d91Smrg # Now generate the symbol file. 4222ae545d91Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4223ae545d91Smrg 4224ae545d91Smrg cat <<_LT_EOF >> conftest.$ac_ext 4225ae545d91Smrg 4226ae545d91Smrg/* The mapping between symbol names and symbols. */ 4227ae545d91SmrgLT@&t@_DLSYM_CONST struct { 4228ae545d91Smrg const char *name; 4229ae545d91Smrg void *address; 4230ae545d91Smrg} 4231ae545d91Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4232ae545d91Smrg{ 4233ae545d91Smrg { "@PROGRAM@", (void *) 0 }, 4234ae545d91Smrg_LT_EOF 4235ae545d91Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4236ae545d91Smrg cat <<\_LT_EOF >> conftest.$ac_ext 4237ae545d91Smrg {0, (void *) 0} 4238ae545d91Smrg}; 4239ae545d91Smrg 4240ae545d91Smrg/* This works around a problem in FreeBSD linker */ 4241ae545d91Smrg#ifdef FREEBSD_WORKAROUND 4242ae545d91Smrgstatic const void *lt_preloaded_setup() { 4243ae545d91Smrg return lt__PROGRAM__LTX_preloaded_symbols; 4244ae545d91Smrg} 4245ae545d91Smrg#endif 4246ae545d91Smrg 4247ae545d91Smrg#ifdef __cplusplus 4248ae545d91Smrg} 4249ae545d91Smrg#endif 4250ae545d91Smrg_LT_EOF 4251ae545d91Smrg # Now try linking the two files. 4252ae545d91Smrg mv conftest.$ac_objext conftstm.$ac_objext 4253ae545d91Smrg lt_globsym_save_LIBS=$LIBS 4254ae545d91Smrg lt_globsym_save_CFLAGS=$CFLAGS 4255ae545d91Smrg LIBS=conftstm.$ac_objext 4256ae545d91Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4257ae545d91Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4258ae545d91Smrg pipe_works=yes 4259ae545d91Smrg fi 4260ae545d91Smrg LIBS=$lt_globsym_save_LIBS 4261ae545d91Smrg CFLAGS=$lt_globsym_save_CFLAGS 4262ae545d91Smrg else 4263ae545d91Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4264ae545d91Smrg fi 4265ae545d91Smrg else 4266ae545d91Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4267ae545d91Smrg fi 4268ae545d91Smrg else 4269ae545d91Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4270ae545d91Smrg fi 4271ae545d91Smrg else 4272ae545d91Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4273ae545d91Smrg cat conftest.$ac_ext >&5 4274ae545d91Smrg fi 4275ae545d91Smrg rm -rf conftest* conftst* 4276ae545d91Smrg 4277ae545d91Smrg # Do not use the global_symbol_pipe unless it works. 4278ae545d91Smrg if test yes = "$pipe_works"; then 4279ae545d91Smrg break 4280ae545d91Smrg else 4281ae545d91Smrg lt_cv_sys_global_symbol_pipe= 4282ae545d91Smrg fi 4283ae545d91Smrgdone 4284ae545d91Smrg]) 4285ae545d91Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4286ae545d91Smrg lt_cv_sys_global_symbol_to_cdecl= 4287ae545d91Smrgfi 4288ae545d91Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4289ae545d91Smrg AC_MSG_RESULT(failed) 4290ae545d91Smrgelse 4291ae545d91Smrg AC_MSG_RESULT(ok) 4292ae545d91Smrgfi 4293ae545d91Smrg 4294ae545d91Smrg# Response file support. 4295ae545d91Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4296ae545d91Smrg nm_file_list_spec='@' 4297ae545d91Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4298ae545d91Smrg nm_file_list_spec='@' 4299ae545d91Smrgfi 4300ae545d91Smrg 4301ae545d91Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4302ae545d91Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 4303ae545d91Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4304ae545d91Smrg [Transform the output of nm in a proper C declaration]) 4305ae545d91Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4306ae545d91Smrg [Transform the output of nm into a list of symbols to manually relocate]) 4307ae545d91Smrg_LT_DECL([global_symbol_to_c_name_address], 4308ae545d91Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4309ae545d91Smrg [Transform the output of nm in a C name address pair]) 4310ae545d91Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4311ae545d91Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4312ae545d91Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4313ae545d91Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4314ae545d91Smrg [The name lister interface]) 4315ae545d91Smrg_LT_DECL([], [nm_file_list_spec], [1], 4316ae545d91Smrg [Specify filename containing input files for $NM]) 4317ae545d91Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4318ae545d91Smrg 4319ae545d91Smrg 4320ae545d91Smrg# _LT_COMPILER_PIC([TAGNAME]) 4321ae545d91Smrg# --------------------------- 4322ae545d91Smrgm4_defun([_LT_COMPILER_PIC], 4323ae545d91Smrg[m4_require([_LT_TAG_COMPILER])dnl 4324ae545d91Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4325ae545d91Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4326ae545d91Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4327ae545d91Smrg 4328ae545d91Smrgm4_if([$1], [CXX], [ 4329ae545d91Smrg # C++ specific cases for pic, static, wl, etc. 4330ae545d91Smrg if test yes = "$GXX"; then 4331ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4332ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4333ae545d91Smrg 4334ae545d91Smrg case $host_os in 4335ae545d91Smrg aix*) 4336ae545d91Smrg # All AIX code is PIC. 4337ae545d91Smrg if test ia64 = "$host_cpu"; then 4338ae545d91Smrg # AIX 5 now supports IA64 processor 4339ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4340ae545d91Smrg fi 4341ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4342ae545d91Smrg ;; 4343ae545d91Smrg 4344ae545d91Smrg amigaos*) 4345ae545d91Smrg case $host_cpu in 4346ae545d91Smrg powerpc) 4347ae545d91Smrg # see comment about AmigaOS4 .so support 4348ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4349ae545d91Smrg ;; 4350ae545d91Smrg m68k) 4351ae545d91Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4352ae545d91Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4353ae545d91Smrg # like '-m68040'. 4354ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4355ae545d91Smrg ;; 4356ae545d91Smrg esac 4357ae545d91Smrg ;; 4358ae545d91Smrg 4359ae545d91Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4360ae545d91Smrg # PIC is the default for these OSes. 4361ae545d91Smrg ;; 4362ae545d91Smrg mingw* | windows* | cygwin* | os2* | pw32* | cegcc*) 4363ae545d91Smrg # This hack is so that the source file can tell whether it is being 4364ae545d91Smrg # built for inclusion in a dll (and should export symbols for example). 4365ae545d91Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4366ae545d91Smrg # (--disable-auto-import) libraries 4367ae545d91Smrg m4_if([$1], [GCJ], [], 4368ae545d91Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4369ae545d91Smrg case $host_os in 4370ae545d91Smrg os2*) 4371ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4372ae545d91Smrg ;; 4373ae545d91Smrg esac 4374ae545d91Smrg ;; 4375ae545d91Smrg darwin* | rhapsody*) 4376ae545d91Smrg # PIC is the default on this platform 4377ae545d91Smrg # Common symbols not allowed in MH_DYLIB files 4378ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4379ae545d91Smrg ;; 4380ae545d91Smrg *djgpp*) 4381ae545d91Smrg # DJGPP does not support shared libraries at all 4382ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4383ae545d91Smrg ;; 4384ae545d91Smrg haiku*) 4385ae545d91Smrg # PIC is the default for Haiku. 4386ae545d91Smrg # The "-static" flag exists, but is broken. 4387ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4388ae545d91Smrg ;; 4389ae545d91Smrg interix[[3-9]]*) 4390ae545d91Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4391ae545d91Smrg # Instead, we relocate shared libraries at runtime. 4392ae545d91Smrg ;; 4393ae545d91Smrg sysv4*MP*) 4394ae545d91Smrg if test -d /usr/nec; then 4395ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4396ae545d91Smrg fi 4397ae545d91Smrg ;; 4398ae545d91Smrg hpux*) 4399ae545d91Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4400ae545d91Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4401ae545d91Smrg # sets the default TLS model and affects inlining. 4402ae545d91Smrg case $host_cpu in 4403ae545d91Smrg hppa*64*) 4404ae545d91Smrg ;; 4405ae545d91Smrg *) 4406ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4407ae545d91Smrg ;; 4408ae545d91Smrg esac 4409ae545d91Smrg ;; 4410ae545d91Smrg *qnx* | *nto*) 4411ae545d91Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4412ae545d91Smrg # it will coredump. 4413ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4414ae545d91Smrg ;; 4415ae545d91Smrg *) 4416ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4417ae545d91Smrg ;; 4418ae545d91Smrg esac 4419ae545d91Smrg else 4420ae545d91Smrg case $host_os in 4421ae545d91Smrg aix[[4-9]]*) 4422ae545d91Smrg # All AIX code is PIC. 4423ae545d91Smrg if test ia64 = "$host_cpu"; then 4424ae545d91Smrg # AIX 5 now supports IA64 processor 4425ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4426ae545d91Smrg else 4427ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4428ae545d91Smrg fi 4429ae545d91Smrg ;; 4430ae545d91Smrg chorus*) 4431ae545d91Smrg case $cc_basename in 4432ae545d91Smrg cxch68*) 4433ae545d91Smrg # Green Hills C++ Compiler 4434ae545d91Smrg # _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" 4435ae545d91Smrg ;; 4436ae545d91Smrg esac 4437ae545d91Smrg ;; 4438ae545d91Smrg mingw* | windows* | cygwin* | os2* | pw32* | cegcc*) 4439ae545d91Smrg # This hack is so that the source file can tell whether it is being 4440ae545d91Smrg # built for inclusion in a dll (and should export symbols for example). 4441ae545d91Smrg m4_if([$1], [GCJ], [], 4442ae545d91Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4443ae545d91Smrg ;; 4444ae545d91Smrg dgux*) 4445ae545d91Smrg case $cc_basename in 4446ae545d91Smrg ec++*) 4447ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4448ae545d91Smrg ;; 4449ae545d91Smrg ghcx*) 4450ae545d91Smrg # Green Hills C++ Compiler 4451ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4452ae545d91Smrg ;; 4453ae545d91Smrg *) 4454ae545d91Smrg ;; 4455ae545d91Smrg esac 4456ae545d91Smrg ;; 4457ae545d91Smrg freebsd* | dragonfly* | midnightbsd*) 4458ae545d91Smrg # FreeBSD uses GNU C++ 4459ae545d91Smrg ;; 4460ae545d91Smrg hpux9* | hpux10* | hpux11*) 4461ae545d91Smrg case $cc_basename in 4462ae545d91Smrg CC*) 4463ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4464ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4465ae545d91Smrg if test ia64 != "$host_cpu"; then 4466ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4467ae545d91Smrg fi 4468ae545d91Smrg ;; 4469ae545d91Smrg aCC*) 4470ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4471ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4472ae545d91Smrg case $host_cpu in 4473ae545d91Smrg hppa*64*|ia64*) 4474ae545d91Smrg # +Z the default 4475ae545d91Smrg ;; 4476ae545d91Smrg *) 4477ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4478ae545d91Smrg ;; 4479ae545d91Smrg esac 4480ae545d91Smrg ;; 4481ae545d91Smrg *) 4482ae545d91Smrg ;; 4483ae545d91Smrg esac 4484ae545d91Smrg ;; 4485ae545d91Smrg interix*) 4486ae545d91Smrg # This is c89, which is MS Visual C++ (no shared libs) 4487ae545d91Smrg # Anyone wants to do a port? 4488ae545d91Smrg ;; 4489ae545d91Smrg irix5* | irix6* | nonstopux*) 4490ae545d91Smrg case $cc_basename in 4491ae545d91Smrg CC*) 4492ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4493ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4494ae545d91Smrg # CC pic flag -KPIC is the default. 4495ae545d91Smrg ;; 4496ae545d91Smrg *) 4497ae545d91Smrg ;; 4498ae545d91Smrg esac 4499ae545d91Smrg ;; 4500ae545d91Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4501ae545d91Smrg case $cc_basename in 4502ae545d91Smrg KCC*) 4503ae545d91Smrg # KAI C++ Compiler 4504ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4505ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4506ae545d91Smrg ;; 4507ae545d91Smrg ecpc* ) 4508ae545d91Smrg # old Intel C++ for x86_64, which still supported -KPIC. 4509ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4510ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4511ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4512ae545d91Smrg ;; 4513ae545d91Smrg icpc* ) 4514ae545d91Smrg # Intel C++, used to be incompatible with GCC. 4515ae545d91Smrg # ICC 10 doesn't accept -KPIC any more. 4516ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4517ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4518ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4519ae545d91Smrg ;; 4520ae545d91Smrg pgCC* | pgcpp*) 4521ae545d91Smrg # Portland Group C++ compiler 4522ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4523ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4524ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4525ae545d91Smrg ;; 4526ae545d91Smrg cxx*) 4527ae545d91Smrg # Compaq C++ 4528ae545d91Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4529ae545d91Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4530ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4531ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4532ae545d91Smrg ;; 4533ae545d91Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4534ae545d91Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4535ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4536ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4537ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4538ae545d91Smrg ;; 4539ae545d91Smrg *) 4540ae545d91Smrg case `$CC -V 2>&1 | $SED 5q` in 4541ae545d91Smrg *Sun\ C*) 4542ae545d91Smrg # Sun C++ 5.9 4543ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4544ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4545ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4546ae545d91Smrg ;; 4547ae545d91Smrg esac 4548ae545d91Smrg ;; 4549ae545d91Smrg esac 4550ae545d91Smrg ;; 4551ae545d91Smrg lynxos*) 4552ae545d91Smrg ;; 4553ae545d91Smrg m88k*) 4554ae545d91Smrg ;; 4555ae545d91Smrg mvs*) 4556ae545d91Smrg case $cc_basename in 4557ae545d91Smrg cxx*) 4558ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4559ae545d91Smrg ;; 4560ae545d91Smrg *) 4561ae545d91Smrg ;; 4562ae545d91Smrg esac 4563ae545d91Smrg ;; 4564ae545d91Smrg netbsd* | netbsdelf*-gnu) 4565ae545d91Smrg ;; 4566ae545d91Smrg *-mlibc) 4567ae545d91Smrg ;; 4568ae545d91Smrg *qnx* | *nto*) 4569ae545d91Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4570ae545d91Smrg # it will coredump. 4571ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4572ae545d91Smrg ;; 4573ae545d91Smrg osf3* | osf4* | osf5*) 4574ae545d91Smrg case $cc_basename in 4575ae545d91Smrg KCC*) 4576ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4577ae545d91Smrg ;; 4578ae545d91Smrg RCC*) 4579ae545d91Smrg # Rational C++ 2.4.1 4580ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4581ae545d91Smrg ;; 4582ae545d91Smrg cxx*) 4583ae545d91Smrg # Digital/Compaq C++ 4584ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4585ae545d91Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4586ae545d91Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4587ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4588ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4589ae545d91Smrg ;; 4590ae545d91Smrg *) 4591ae545d91Smrg ;; 4592ae545d91Smrg esac 4593ae545d91Smrg ;; 4594ae545d91Smrg psos*) 4595ae545d91Smrg ;; 4596ae545d91Smrg serenity*) 4597ae545d91Smrg ;; 4598ae545d91Smrg solaris*) 4599ae545d91Smrg case $cc_basename in 4600ae545d91Smrg CC* | sunCC*) 4601ae545d91Smrg # Sun C++ 4.2, 5.x and Centerline C++ 4602ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4603ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4604ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4605ae545d91Smrg ;; 4606ae545d91Smrg gcx*) 4607ae545d91Smrg # Green Hills C++ Compiler 4608ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4609ae545d91Smrg ;; 4610ae545d91Smrg *) 4611ae545d91Smrg ;; 4612ae545d91Smrg esac 4613ae545d91Smrg ;; 4614ae545d91Smrg sunos4*) 4615ae545d91Smrg case $cc_basename in 4616ae545d91Smrg CC*) 4617ae545d91Smrg # Sun C++ 4.x 4618ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4619ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4620ae545d91Smrg ;; 4621ae545d91Smrg lcc*) 4622ae545d91Smrg # Lucid 4623ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4624ae545d91Smrg ;; 4625ae545d91Smrg *) 4626ae545d91Smrg ;; 4627ae545d91Smrg esac 4628ae545d91Smrg ;; 4629ae545d91Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4630ae545d91Smrg case $cc_basename in 4631ae545d91Smrg CC*) 4632ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4633ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4634ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4635ae545d91Smrg ;; 4636ae545d91Smrg esac 4637ae545d91Smrg ;; 4638ae545d91Smrg tandem*) 4639ae545d91Smrg case $cc_basename in 4640ae545d91Smrg NCC*) 4641ae545d91Smrg # NonStop-UX NCC 3.20 4642ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4643ae545d91Smrg ;; 4644ae545d91Smrg *) 4645ae545d91Smrg ;; 4646ae545d91Smrg esac 4647ae545d91Smrg ;; 4648ae545d91Smrg vxworks*) 4649ae545d91Smrg ;; 4650ae545d91Smrg *) 4651ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4652ae545d91Smrg ;; 4653ae545d91Smrg esac 4654ae545d91Smrg fi 4655ae545d91Smrg], 4656ae545d91Smrg[ 4657ae545d91Smrg if test yes = "$GCC"; then 4658ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4659ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4660ae545d91Smrg 4661ae545d91Smrg case $host_os in 4662ae545d91Smrg aix*) 4663ae545d91Smrg # All AIX code is PIC. 4664ae545d91Smrg if test ia64 = "$host_cpu"; then 4665ae545d91Smrg # AIX 5 now supports IA64 processor 4666ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4667ae545d91Smrg fi 4668ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4669ae545d91Smrg ;; 4670ae545d91Smrg 4671ae545d91Smrg amigaos*) 4672ae545d91Smrg case $host_cpu in 4673ae545d91Smrg powerpc) 4674ae545d91Smrg # see comment about AmigaOS4 .so support 4675ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4676ae545d91Smrg ;; 4677ae545d91Smrg m68k) 4678ae545d91Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4679ae545d91Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4680ae545d91Smrg # like '-m68040'. 4681ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4682ae545d91Smrg ;; 4683ae545d91Smrg esac 4684ae545d91Smrg ;; 4685ae545d91Smrg 4686ae545d91Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4687ae545d91Smrg # PIC is the default for these OSes. 4688ae545d91Smrg ;; 4689ae545d91Smrg 4690ae545d91Smrg mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) 4691ae545d91Smrg # This hack is so that the source file can tell whether it is being 4692ae545d91Smrg # built for inclusion in a dll (and should export symbols for example). 4693ae545d91Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4694ae545d91Smrg # (--disable-auto-import) libraries 4695ae545d91Smrg m4_if([$1], [GCJ], [], 4696ae545d91Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4697ae545d91Smrg case $host_os in 4698ae545d91Smrg os2*) 4699ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4700ae545d91Smrg ;; 4701ae545d91Smrg esac 4702ae545d91Smrg ;; 4703ae545d91Smrg 4704ae545d91Smrg darwin* | rhapsody*) 4705ae545d91Smrg # PIC is the default on this platform 4706ae545d91Smrg # Common symbols not allowed in MH_DYLIB files 4707ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4708ae545d91Smrg ;; 4709ae545d91Smrg 4710ae545d91Smrg haiku*) 4711ae545d91Smrg # PIC is the default for Haiku. 4712ae545d91Smrg # The "-static" flag exists, but is broken. 4713ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4714ae545d91Smrg ;; 4715ae545d91Smrg 4716ae545d91Smrg hpux*) 4717ae545d91Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4718ae545d91Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4719ae545d91Smrg # sets the default TLS model and affects inlining. 4720ae545d91Smrg case $host_cpu in 4721ae545d91Smrg hppa*64*) 4722ae545d91Smrg # +Z the default 4723ae545d91Smrg ;; 4724ae545d91Smrg *) 4725ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4726ae545d91Smrg ;; 4727ae545d91Smrg esac 4728ae545d91Smrg ;; 4729ae545d91Smrg 4730ae545d91Smrg interix[[3-9]]*) 4731ae545d91Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4732ae545d91Smrg # Instead, we relocate shared libraries at runtime. 4733ae545d91Smrg ;; 4734ae545d91Smrg 4735ae545d91Smrg msdosdjgpp*) 4736ae545d91Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4737ae545d91Smrg # on systems that don't support them. 4738ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4739ae545d91Smrg enable_shared=no 4740ae545d91Smrg ;; 4741ae545d91Smrg 4742ae545d91Smrg *nto* | *qnx*) 4743ae545d91Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4744ae545d91Smrg # it will coredump. 4745ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4746ae545d91Smrg ;; 4747ae545d91Smrg 4748ae545d91Smrg sysv4*MP*) 4749ae545d91Smrg if test -d /usr/nec; then 4750ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4751ae545d91Smrg fi 4752ae545d91Smrg ;; 4753ae545d91Smrg 4754ae545d91Smrg *) 4755ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4756ae545d91Smrg ;; 4757ae545d91Smrg esac 4758ae545d91Smrg 4759ae545d91Smrg case $cc_basename in 4760ae545d91Smrg nvcc*) # Cuda Compiler Driver 2.2 4761ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4762ae545d91Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4763ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4764ae545d91Smrg fi 4765ae545d91Smrg ;; 4766ae545d91Smrg esac 4767ae545d91Smrg else 4768ae545d91Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4769ae545d91Smrg case $host_os in 4770ae545d91Smrg aix*) 4771ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4772ae545d91Smrg if test ia64 = "$host_cpu"; then 4773ae545d91Smrg # AIX 5 now supports IA64 processor 4774ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4775ae545d91Smrg else 4776ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4777ae545d91Smrg fi 4778ae545d91Smrg ;; 4779ae545d91Smrg 4780ae545d91Smrg darwin* | rhapsody*) 4781ae545d91Smrg # PIC is the default on this platform 4782ae545d91Smrg # Common symbols not allowed in MH_DYLIB files 4783ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4784ae545d91Smrg case $cc_basename in 4785ae545d91Smrg nagfor*) 4786ae545d91Smrg # NAG Fortran compiler 4787ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4788ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4789ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4790ae545d91Smrg ;; 4791ae545d91Smrg esac 4792ae545d91Smrg ;; 4793ae545d91Smrg 4794ae545d91Smrg mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) 4795ae545d91Smrg # This hack is so that the source file can tell whether it is being 4796ae545d91Smrg # built for inclusion in a dll (and should export symbols for example). 4797ae545d91Smrg m4_if([$1], [GCJ], [], 4798ae545d91Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4799ae545d91Smrg case $host_os in 4800ae545d91Smrg os2*) 4801ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4802ae545d91Smrg ;; 4803ae545d91Smrg esac 4804ae545d91Smrg ;; 4805ae545d91Smrg 4806ae545d91Smrg hpux9* | hpux10* | hpux11*) 4807ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4808ae545d91Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4809ae545d91Smrg # not for PA HP-UX. 4810ae545d91Smrg case $host_cpu in 4811ae545d91Smrg hppa*64*|ia64*) 4812ae545d91Smrg # +Z the default 4813ae545d91Smrg ;; 4814ae545d91Smrg *) 4815ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4816ae545d91Smrg ;; 4817ae545d91Smrg esac 4818ae545d91Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4819ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4820ae545d91Smrg ;; 4821ae545d91Smrg 4822ae545d91Smrg irix5* | irix6* | nonstopux*) 4823ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4824ae545d91Smrg # PIC (with -KPIC) is the default. 4825ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4826ae545d91Smrg ;; 4827ae545d91Smrg 4828ae545d91Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4829ae545d91Smrg case $cc_basename in 4830ae545d91Smrg # old Intel for x86_64, which still supported -KPIC. 4831ae545d91Smrg ecc*) 4832ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4833ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4834ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4835ae545d91Smrg ;; 4836ae545d91Smrg *flang* | ftn | f18* | f95*) 4837ae545d91Smrg # Flang compiler. 4838ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4839ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4840ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4841ae545d91Smrg ;; 4842ae545d91Smrg # icc used to be incompatible with GCC. 4843ae545d91Smrg # ICC 10 doesn't accept -KPIC any more. 4844ae545d91Smrg icc* | ifort*) 4845ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4846ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4847ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4848ae545d91Smrg ;; 4849ae545d91Smrg # Lahey Fortran 8.1. 4850ae545d91Smrg lf95*) 4851ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4852ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4853ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4854ae545d91Smrg ;; 4855ae545d91Smrg nagfor*) 4856ae545d91Smrg # NAG Fortran compiler 4857ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4858ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4859ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4860ae545d91Smrg ;; 4861ae545d91Smrg tcc*) 4862ae545d91Smrg # Fabrice Bellard et al's Tiny C Compiler 4863ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4864ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4865ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4866ae545d91Smrg ;; 4867ae545d91Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4868ae545d91Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4869ae545d91Smrg # which looks to be a dead project) 4870ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4871ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4872ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4873ae545d91Smrg ;; 4874ae545d91Smrg ccc*) 4875ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4876ae545d91Smrg # All Alpha code is PIC. 4877ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4878ae545d91Smrg ;; 4879ae545d91Smrg xl* | bgxl* | bgf* | mpixl*) 4880ae545d91Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4881ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4882ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4883ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4884ae545d91Smrg ;; 4885ae545d91Smrg *) 4886ae545d91Smrg case `$CC -V 2>&1 | $SED 5q` in 4887ae545d91Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4888ae545d91Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4889ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4890ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4891ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4892ae545d91Smrg ;; 4893ae545d91Smrg *Sun\ F* | *Sun*Fortran*) 4894ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4895ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4896ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4897ae545d91Smrg ;; 4898ae545d91Smrg *Sun\ C*) 4899ae545d91Smrg # Sun C 5.9 4900ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4901ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4902ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4903ae545d91Smrg ;; 4904ae545d91Smrg *Intel*\ [[CF]]*Compiler*) 4905ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4906ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4907ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4908ae545d91Smrg ;; 4909ae545d91Smrg *Portland\ Group*) 4910ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4911ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4912ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4913ae545d91Smrg ;; 4914ae545d91Smrg esac 4915ae545d91Smrg ;; 4916ae545d91Smrg esac 4917ae545d91Smrg ;; 4918ae545d91Smrg 4919ae545d91Smrg newsos6) 4920ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4921ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4922ae545d91Smrg ;; 4923ae545d91Smrg 4924ae545d91Smrg *-mlibc) 4925ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4926ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4927ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4928ae545d91Smrg ;; 4929ae545d91Smrg 4930ae545d91Smrg *nto* | *qnx*) 4931ae545d91Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4932ae545d91Smrg # it will coredump. 4933ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4934ae545d91Smrg ;; 4935ae545d91Smrg 4936ae545d91Smrg osf3* | osf4* | osf5*) 4937ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4938ae545d91Smrg # All OSF/1 code is PIC. 4939ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4940ae545d91Smrg ;; 4941ae545d91Smrg 4942ae545d91Smrg rdos*) 4943ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4944ae545d91Smrg ;; 4945ae545d91Smrg 4946ae545d91Smrg serenity*) 4947ae545d91Smrg ;; 4948ae545d91Smrg 4949ae545d91Smrg solaris*) 4950ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4951ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4952ae545d91Smrg case $cc_basename in 4953ae545d91Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4954ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4955ae545d91Smrg *) 4956ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4957ae545d91Smrg esac 4958ae545d91Smrg ;; 4959ae545d91Smrg 4960ae545d91Smrg sunos4*) 4961ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4962ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4963ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4964ae545d91Smrg ;; 4965ae545d91Smrg 4966ae545d91Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4967ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4968ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4969ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4970ae545d91Smrg ;; 4971ae545d91Smrg 4972ae545d91Smrg sysv4*MP*) 4973ae545d91Smrg if test -d /usr/nec; then 4974ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4975ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4976ae545d91Smrg fi 4977ae545d91Smrg ;; 4978ae545d91Smrg 4979ae545d91Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4980ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4981ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4982ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4983ae545d91Smrg ;; 4984ae545d91Smrg 4985ae545d91Smrg unicos*) 4986ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4987ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4988ae545d91Smrg ;; 4989ae545d91Smrg 4990ae545d91Smrg uts4*) 4991ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4992ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4993ae545d91Smrg ;; 4994ae545d91Smrg 4995ae545d91Smrg *) 4996ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4997ae545d91Smrg ;; 4998ae545d91Smrg esac 4999ae545d91Smrg fi 5000ae545d91Smrg]) 5001ae545d91Smrgcase $host_os in 5002ae545d91Smrg # For platforms that do not support PIC, -DPIC is meaningless: 5003ae545d91Smrg *djgpp*) 5004ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 5005ae545d91Smrg ;; 5006ae545d91Smrg *) 5007ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 5008ae545d91Smrg ;; 5009ae545d91Smrgesac 5010ae545d91Smrg 5011ae545d91SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 5012ae545d91Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 5013ae545d91Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 5014ae545d91Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 5015ae545d91Smrg 5016ae545d91Smrg# 5017ae545d91Smrg# Check to make sure the PIC flag actually works. 5018ae545d91Smrg# 5019ae545d91Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 5020ae545d91Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 5021ae545d91Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 5022ae545d91Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 5023ae545d91Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 5024ae545d91Smrg "" | " "*) ;; 5025ae545d91Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 5026ae545d91Smrg esac], 5027ae545d91Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 5028ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 5029ae545d91Smrgfi 5030ae545d91Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 5031ae545d91Smrg [Additional compiler flags for building library objects]) 5032ae545d91Smrg 5033ae545d91Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 5034ae545d91Smrg [How to pass a linker flag through the compiler]) 5035ae545d91Smrg# 5036ae545d91Smrg# Check to make sure the static flag actually works. 5037ae545d91Smrg# 5038ae545d91Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 5039ae545d91Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 5040ae545d91Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 5041ae545d91Smrg $lt_tmp_static_flag, 5042ae545d91Smrg [], 5043ae545d91Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 5044ae545d91Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 5045ae545d91Smrg [Compiler flag to prevent dynamic linking]) 5046ae545d91Smrg])# _LT_COMPILER_PIC 5047ae545d91Smrg 5048ae545d91Smrg 5049ae545d91Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 5050ae545d91Smrg# ---------------------------- 5051ae545d91Smrg# See if the linker supports building shared libraries. 5052ae545d91Smrgm4_defun([_LT_LINKER_SHLIBS], 5053ae545d91Smrg[AC_REQUIRE([LT_PATH_LD])dnl 5054ae545d91SmrgAC_REQUIRE([LT_PATH_NM])dnl 5055ae545d91Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5056ae545d91Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5057ae545d91Smrgm4_require([_LT_DECL_EGREP])dnl 5058ae545d91Smrgm4_require([_LT_DECL_SED])dnl 5059ae545d91Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 5060ae545d91Smrgm4_require([_LT_TAG_COMPILER])dnl 5061ae545d91SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5062ae545d91Smrgm4_if([$1], [CXX], [ 5063ae545d91Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5064ae545d91Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5065ae545d91Smrg case $host_os in 5066ae545d91Smrg aix[[4-9]]*) 5067ae545d91Smrg # If we're using GNU nm, then we don't want the "-C" option. 5068ae545d91Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5069ae545d91Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5070ae545d91Smrg # weak defined symbols like other global defined symbols, whereas 5071ae545d91Smrg # GNU nm marks them as "W". 5072ae545d91Smrg # While the 'weak' keyword is ignored in the Export File, we need 5073ae545d91Smrg # it in the Import File for the 'aix-soname' feature, so we have 5074ae545d91Smrg # to replace the "-B" option with "-P" for AIX nm. 5075ae545d91Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5076ae545d91Smrg _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' 5077ae545d91Smrg else 5078ae545d91Smrg _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' 5079ae545d91Smrg fi 5080ae545d91Smrg ;; 5081ae545d91Smrg pw32*) 5082ae545d91Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 5083ae545d91Smrg ;; 5084ae545d91Smrg cygwin* | mingw* | windows* | cegcc*) 5085ae545d91Smrg case $cc_basename in 5086ae545d91Smrg cl* | icl*) 5087ae545d91Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5088ae545d91Smrg ;; 5089ae545d91Smrg *) 5090ae545d91Smrg _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' 5091ae545d91Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5092ae545d91Smrg ;; 5093ae545d91Smrg esac 5094ae545d91Smrg ;; 5095ae545d91Smrg *) 5096ae545d91Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5097ae545d91Smrg ;; 5098ae545d91Smrg esac 5099ae545d91Smrg], [ 5100ae545d91Smrg runpath_var= 5101ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5102ae545d91Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5103ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)= 5104ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 5105ae545d91Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 5106ae545d91Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5107ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5108ae545d91Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5109ae545d91Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 5110ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5111ae545d91Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5112ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5113ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5114ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 5115ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5116ae545d91Smrg _LT_TAGVAR(inherit_rpath, $1)=no 5117ae545d91Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 5118ae545d91Smrg _LT_TAGVAR(module_cmds, $1)= 5119ae545d91Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 5120ae545d91Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5121ae545d91Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5122ae545d91Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 5123ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5124ae545d91Smrg # include_expsyms should be a list of space-separated symbols to be *always* 5125ae545d91Smrg # included in the symbol list 5126ae545d91Smrg _LT_TAGVAR(include_expsyms, $1)= 5127ae545d91Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 5128ae545d91Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 5129ae545d91Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5130ae545d91Smrg # as well as any symbol that contains 'd'. 5131ae545d91Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5132ae545d91Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5133ae545d91Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 5134ae545d91Smrg # the symbol is explicitly referenced. Since portable code cannot 5135ae545d91Smrg # rely on this symbol name, it's probably fine to never include it in 5136ae545d91Smrg # preloaded symbol tables. 5137ae545d91Smrg # Exclude shared library initialization/finalization symbols. 5138ae545d91Smrgdnl Note also adjust exclude_expsyms for C++ above. 5139ae545d91Smrg extract_expsyms_cmds= 5140ae545d91Smrg 5141ae545d91Smrg case $host_os in 5142ae545d91Smrg cygwin* | mingw* | windows* | pw32* | cegcc*) 5143ae545d91Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 5144ae545d91Smrg # When not using gcc, we currently assume that we are using 5145ae545d91Smrg # Microsoft Visual C++ or Intel C++ Compiler. 5146ae545d91Smrg if test yes != "$GCC"; then 5147ae545d91Smrg with_gnu_ld=no 5148ae545d91Smrg fi 5149ae545d91Smrg ;; 5150ae545d91Smrg interix*) 5151ae545d91Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 5152ae545d91Smrg with_gnu_ld=yes 5153ae545d91Smrg ;; 5154ae545d91Smrg esac 5155ae545d91Smrg 5156ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5157ae545d91Smrg 5158ae545d91Smrg # On some targets, GNU ld is compatible enough with the native linker 5159ae545d91Smrg # that we're better off using the native interface for both. 5160ae545d91Smrg lt_use_gnu_ld_interface=no 5161ae545d91Smrg if test yes = "$with_gnu_ld"; then 5162ae545d91Smrg case $host_os in 5163ae545d91Smrg aix*) 5164ae545d91Smrg # The AIX port of GNU ld has always aspired to compatibility 5165ae545d91Smrg # with the native linker. However, as the warning in the GNU ld 5166ae545d91Smrg # block says, versions before 2.19.5* couldn't really create working 5167ae545d91Smrg # shared libraries, regardless of the interface used. 5168ae545d91Smrg case `$LD -v 2>&1` in 5169ae545d91Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5170ae545d91Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5171ae545d91Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5172ae545d91Smrg *) 5173ae545d91Smrg lt_use_gnu_ld_interface=yes 5174ae545d91Smrg ;; 5175ae545d91Smrg esac 5176ae545d91Smrg ;; 5177ae545d91Smrg *) 5178ae545d91Smrg lt_use_gnu_ld_interface=yes 5179ae545d91Smrg ;; 5180ae545d91Smrg esac 5181ae545d91Smrg fi 5182ae545d91Smrg 5183ae545d91Smrg if test yes = "$lt_use_gnu_ld_interface"; then 5184ae545d91Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5185ae545d91Smrg wlarc='$wl' 5186ae545d91Smrg 5187ae545d91Smrg # Set some defaults for GNU ld with shared library support. These 5188ae545d91Smrg # are reset later if shared libraries are not supported. Putting them 5189ae545d91Smrg # here allows them to be overridden if necessary. 5190ae545d91Smrg runpath_var=LD_RUN_PATH 5191ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5192ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5193ae545d91Smrg # ancient GNU ld didn't support --whole-archive et. al. 5194ae545d91Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5195ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5196ae545d91Smrg else 5197ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5198ae545d91Smrg fi 5199ae545d91Smrg supports_anon_versioning=no 5200ae545d91Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 5201ae545d91Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 5202ae545d91Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5203ae545d91Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5204ae545d91Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5205ae545d91Smrg *\ 2.11.*) ;; # other 2.11 versions 5206ae545d91Smrg *) supports_anon_versioning=yes ;; 5207ae545d91Smrg esac 5208ae545d91Smrg 5209ae545d91Smrg # See if GNU ld supports shared libraries. 5210ae545d91Smrg case $host_os in 5211ae545d91Smrg aix[[3-9]]*) 5212ae545d91Smrg # On AIX/PPC, the GNU linker is very broken 5213ae545d91Smrg if test ia64 != "$host_cpu"; then 5214ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5215ae545d91Smrg cat <<_LT_EOF 1>&2 5216ae545d91Smrg 5217ae545d91Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5218ae545d91Smrg*** to be unable to reliably create shared libraries on AIX. 5219ae545d91Smrg*** Therefore, libtool is disabling shared libraries support. If you 5220ae545d91Smrg*** really care for shared libraries, you may want to install binutils 5221ae545d91Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5222ae545d91Smrg*** You will then need to restart the configuration process. 5223ae545d91Smrg 5224ae545d91Smrg_LT_EOF 5225ae545d91Smrg fi 5226ae545d91Smrg ;; 5227ae545d91Smrg 5228ae545d91Smrg amigaos*) 5229ae545d91Smrg case $host_cpu in 5230ae545d91Smrg powerpc) 5231ae545d91Smrg # see comment about AmigaOS4 .so support 5232ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5233ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5234ae545d91Smrg ;; 5235ae545d91Smrg m68k) 5236ae545d91Smrg _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)' 5237ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5238ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5239ae545d91Smrg ;; 5240ae545d91Smrg esac 5241ae545d91Smrg ;; 5242ae545d91Smrg 5243ae545d91Smrg beos*) 5244ae545d91Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5245ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5246ae545d91Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5247ae545d91Smrg # support --undefined. This deserves some investigation. FIXME 5248ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5249ae545d91Smrg else 5250ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5251ae545d91Smrg fi 5252ae545d91Smrg ;; 5253ae545d91Smrg 5254ae545d91Smrg cygwin* | mingw* | windows* | pw32* | cegcc*) 5255ae545d91Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5256ae545d91Smrg # as there is no search path for DLLs. 5257ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5258ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5259ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5260ae545d91Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5261ae545d91Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5262ae545d91Smrg _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' 5263ae545d91Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5264ae545d91Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5265ae545d91Smrg 5266ae545d91Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5267ae545d91Smrg _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' 5268ae545d91Smrg # If the export-symbols file already is a .def file, use it as 5269ae545d91Smrg # is; otherwise, prepend EXPORTS... 5270ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5271ae545d91Smrg cp $export_symbols $output_objdir/$soname.def; 5272ae545d91Smrg else 5273ae545d91Smrg echo EXPORTS > $output_objdir/$soname.def; 5274ae545d91Smrg cat $export_symbols >> $output_objdir/$soname.def; 5275ae545d91Smrg fi~ 5276ae545d91Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5277ae545d91Smrg else 5278ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5279ae545d91Smrg fi 5280ae545d91Smrg ;; 5281ae545d91Smrg 5282ae545d91Smrg haiku*) 5283ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5284ae545d91Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 5285ae545d91Smrg ;; 5286ae545d91Smrg 5287ae545d91Smrg os2*) 5288ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5289ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5290ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5291ae545d91Smrg shrext_cmds=.dll 5292ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5293ae545d91Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5294ae545d91Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5295ae545d91Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5296ae545d91Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5297ae545d91Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5298ae545d91Smrg emximp -o $lib $output_objdir/$libname.def' 5299ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5300ae545d91Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5301ae545d91Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5302ae545d91Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5303ae545d91Smrg prefix_cmds="$SED"~ 5304ae545d91Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5305ae545d91Smrg prefix_cmds="$prefix_cmds -e 1d"; 5306ae545d91Smrg fi~ 5307ae545d91Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5308ae545d91Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5309ae545d91Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5310ae545d91Smrg emximp -o $lib $output_objdir/$libname.def' 5311ae545d91Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5312ae545d91Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5313ae545d91Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5314ae545d91Smrg ;; 5315ae545d91Smrg 5316ae545d91Smrg interix[[3-9]]*) 5317ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5318ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5319ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5320ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5321ae545d91Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5322ae545d91Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5323ae545d91Smrg # default) and relocated if they conflict, which is a slow very memory 5324ae545d91Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5325ae545d91Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5326ae545d91Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5327ae545d91Smrg _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' 5328ae545d91Smrg _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' 5329ae545d91Smrg ;; 5330ae545d91Smrg 5331ae545d91Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5332ae545d91Smrg tmp_diet=no 5333ae545d91Smrg if test linux-dietlibc = "$host_os"; then 5334ae545d91Smrg case $cc_basename in 5335ae545d91Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5336ae545d91Smrg esac 5337ae545d91Smrg fi 5338ae545d91Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5339ae545d91Smrg && test no = "$tmp_diet" 5340ae545d91Smrg then 5341ae545d91Smrg tmp_addflag=' $pic_flag' 5342ae545d91Smrg tmp_sharedflag='-shared' 5343ae545d91Smrg case $cc_basename,$host_cpu in 5344ae545d91Smrg pgcc*) # Portland Group C compiler 5345ae545d91Smrg _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' 5346ae545d91Smrg tmp_addflag=' $pic_flag' 5347ae545d91Smrg ;; 5348ae545d91Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 5349ae545d91Smrg # Portland Group f77 and f90 compilers 5350ae545d91Smrg _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' 5351ae545d91Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 5352ae545d91Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5353ae545d91Smrg tmp_addflag=' -i_dynamic' ;; 5354ae545d91Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5355ae545d91Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5356ae545d91Smrg ifc* | ifort*) # Intel Fortran compiler 5357ae545d91Smrg tmp_addflag=' -nofor_main' ;; 5358ae545d91Smrg lf95*) # Lahey Fortran 8.1 5359ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5360ae545d91Smrg tmp_sharedflag='--shared' ;; 5361ae545d91Smrg nagfor*) # NAGFOR 5.3 5362ae545d91Smrg tmp_sharedflag='-Wl,-shared' ;; 5363ae545d91Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5364ae545d91Smrg tmp_sharedflag='-qmkshrobj' 5365ae545d91Smrg tmp_addflag= ;; 5366ae545d91Smrg nvcc*) # Cuda Compiler Driver 2.2 5367ae545d91Smrg _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' 5368ae545d91Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5369ae545d91Smrg ;; 5370ae545d91Smrg esac 5371ae545d91Smrg case `$CC -V 2>&1 | $SED 5q` in 5372ae545d91Smrg *Sun\ C*) # Sun C 5.9 5373ae545d91Smrg _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' 5374ae545d91Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5375ae545d91Smrg tmp_sharedflag='-G' ;; 5376ae545d91Smrg *Sun\ F*) # Sun Fortran 8.3 5377ae545d91Smrg tmp_sharedflag='-G' ;; 5378ae545d91Smrg esac 5379ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5380ae545d91Smrg 5381ae545d91Smrg if test yes = "$supports_anon_versioning"; then 5382ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5383ae545d91Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5384ae545d91Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5385ae545d91Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5386ae545d91Smrg fi 5387ae545d91Smrg 5388ae545d91Smrg case $cc_basename in 5389ae545d91Smrg tcc*) 5390ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5391ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5392ae545d91Smrg ;; 5393ae545d91Smrg xlf* | bgf* | bgxlf* | mpixlf*) 5394ae545d91Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5395ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5396ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5397ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5398ae545d91Smrg if test yes = "$supports_anon_versioning"; then 5399ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5400ae545d91Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5401ae545d91Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5402ae545d91Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5403ae545d91Smrg fi 5404ae545d91Smrg ;; 5405ae545d91Smrg esac 5406ae545d91Smrg else 5407ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5408ae545d91Smrg fi 5409ae545d91Smrg ;; 5410ae545d91Smrg 5411ae545d91Smrg *-mlibc) 5412ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5413ae545d91Smrg _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' 5414ae545d91Smrg ;; 5415ae545d91Smrg 5416ae545d91Smrg netbsd* | netbsdelf*-gnu) 5417ae545d91Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5418ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5419ae545d91Smrg wlarc= 5420ae545d91Smrg else 5421ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5422ae545d91Smrg _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' 5423ae545d91Smrg fi 5424ae545d91Smrg ;; 5425ae545d91Smrg 5426ae545d91Smrg solaris*) 5427ae545d91Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5428ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5429ae545d91Smrg cat <<_LT_EOF 1>&2 5430ae545d91Smrg 5431ae545d91Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5432ae545d91Smrg*** create shared libraries on Solaris systems. Therefore, libtool 5433ae545d91Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5434ae545d91Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 5435ae545d91Smrg*** your PATH or compiler configuration so that the native linker is 5436ae545d91Smrg*** used, and then restart. 5437ae545d91Smrg 5438ae545d91Smrg_LT_EOF 5439ae545d91Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5440ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5441ae545d91Smrg _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' 5442ae545d91Smrg else 5443ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5444ae545d91Smrg fi 5445ae545d91Smrg ;; 5446ae545d91Smrg 5447ae545d91Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5448ae545d91Smrg case `$LD -v 2>&1` in 5449ae545d91Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5450ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5451ae545d91Smrg cat <<_LT_EOF 1>&2 5452ae545d91Smrg 5453ae545d91Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5454ae545d91Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5455ae545d91Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5456ae545d91Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5457ae545d91Smrg*** your PATH or compiler configuration so that the native linker is 5458ae545d91Smrg*** used, and then restart. 5459ae545d91Smrg 5460ae545d91Smrg_LT_EOF 5461ae545d91Smrg ;; 5462ae545d91Smrg *) 5463ae545d91Smrg # For security reasons, it is highly recommended that you always 5464ae545d91Smrg # use absolute paths for naming shared libraries, and exclude the 5465ae545d91Smrg # DT_RUNPATH tag from executables and libraries. But doing so 5466ae545d91Smrg # requires that you compile everything twice, which is a pain. 5467ae545d91Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5468ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5469ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5470ae545d91Smrg _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' 5471ae545d91Smrg else 5472ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5473ae545d91Smrg fi 5474ae545d91Smrg ;; 5475ae545d91Smrg esac 5476ae545d91Smrg ;; 5477ae545d91Smrg 5478ae545d91Smrg sunos4*) 5479ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5480ae545d91Smrg wlarc= 5481ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5482ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5483ae545d91Smrg ;; 5484ae545d91Smrg 5485ae545d91Smrg *) 5486ae545d91Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5487ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5488ae545d91Smrg _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' 5489ae545d91Smrg else 5490ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5491ae545d91Smrg fi 5492ae545d91Smrg ;; 5493ae545d91Smrg esac 5494ae545d91Smrg 5495ae545d91Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5496ae545d91Smrg runpath_var= 5497ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5498ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5499ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5500ae545d91Smrg fi 5501ae545d91Smrg else 5502ae545d91Smrg # PORTME fill in a description of your system's linker (not GNU ld) 5503ae545d91Smrg case $host_os in 5504ae545d91Smrg aix3*) 5505ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5506ae545d91Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5507ae545d91Smrg _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' 5508ae545d91Smrg # Note: this linker hardcodes the directories in LIBPATH if there 5509ae545d91Smrg # are no directories specified by -L. 5510ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5511ae545d91Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5512ae545d91Smrg # Neither direct hardcoding nor static linking is supported with a 5513ae545d91Smrg # broken collect2. 5514ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5515ae545d91Smrg fi 5516ae545d91Smrg ;; 5517ae545d91Smrg 5518ae545d91Smrg aix[[4-9]]*) 5519ae545d91Smrg if test ia64 = "$host_cpu"; then 5520ae545d91Smrg # On IA64, the linker does run time linking by default, so we don't 5521ae545d91Smrg # have to do anything special. 5522ae545d91Smrg aix_use_runtimelinking=no 5523ae545d91Smrg exp_sym_flag='-Bexport' 5524ae545d91Smrg no_entry_flag= 5525ae545d91Smrg else 5526ae545d91Smrg # If we're using GNU nm, then we don't want the "-C" option. 5527ae545d91Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5528ae545d91Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5529ae545d91Smrg # weak defined symbols like other global defined symbols, whereas 5530ae545d91Smrg # GNU nm marks them as "W". 5531ae545d91Smrg # While the 'weak' keyword is ignored in the Export File, we need 5532ae545d91Smrg # it in the Import File for the 'aix-soname' feature, so we have 5533ae545d91Smrg # to replace the "-B" option with "-P" for AIX nm. 5534ae545d91Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5535ae545d91Smrg _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' 5536ae545d91Smrg else 5537ae545d91Smrg _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' 5538ae545d91Smrg fi 5539ae545d91Smrg aix_use_runtimelinking=no 5540ae545d91Smrg 5541ae545d91Smrg # Test if we are trying to use run time linking or normal 5542ae545d91Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5543ae545d91Smrg # have runtime linking enabled, and use it for executables. 5544ae545d91Smrg # For shared libraries, we enable/disable runtime linking 5545ae545d91Smrg # depending on the kind of the shared library created - 5546ae545d91Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 5547ae545d91Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5548ae545d91Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 5549ae545d91Smrg # lib.a static archive 5550ae545d91Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5551ae545d91Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 5552ae545d91Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5553ae545d91Smrg # lib.a(lib.so.V) shared, rtl:no 5554ae545d91Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5555ae545d91Smrg # lib.a static archive 5556ae545d91Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5557ae545d91Smrg for ld_flag in $LDFLAGS; do 5558ae545d91Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5559ae545d91Smrg aix_use_runtimelinking=yes 5560ae545d91Smrg break 5561ae545d91Smrg fi 5562ae545d91Smrg done 5563ae545d91Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5564ae545d91Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5565ae545d91Smrg # so we don't have lib.a shared libs to link our executables. 5566ae545d91Smrg # We have to force runtime linking in this case. 5567ae545d91Smrg aix_use_runtimelinking=yes 5568ae545d91Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5569ae545d91Smrg fi 5570ae545d91Smrg ;; 5571ae545d91Smrg esac 5572ae545d91Smrg 5573ae545d91Smrg exp_sym_flag='-bexport' 5574ae545d91Smrg no_entry_flag='-bnoentry' 5575ae545d91Smrg fi 5576ae545d91Smrg 5577ae545d91Smrg # When large executables or shared objects are built, AIX ld can 5578ae545d91Smrg # have problems creating the table of contents. If linking a library 5579ae545d91Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5580ae545d91Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5581ae545d91Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5582ae545d91Smrg 5583ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='' 5584ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5585ae545d91Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5586ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5587ae545d91Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5588ae545d91Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5589ae545d91Smrg case $with_aix_soname,$aix_use_runtimelinking in 5590ae545d91Smrg aix,*) ;; # traditional, no import file 5591ae545d91Smrg svr4,* | *,yes) # use import file 5592ae545d91Smrg # The Import File defines what to hardcode. 5593ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5594ae545d91Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5595ae545d91Smrg ;; 5596ae545d91Smrg esac 5597ae545d91Smrg 5598ae545d91Smrg if test yes = "$GCC"; then 5599ae545d91Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5600ae545d91Smrg # We only want to do this on AIX 4.2 and lower, the check 5601ae545d91Smrg # below for broken collect2 doesn't work under 4.3+ 5602ae545d91Smrg collect2name=`$CC -print-prog-name=collect2` 5603ae545d91Smrg if test -f "$collect2name" && 5604ae545d91Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5605ae545d91Smrg then 5606ae545d91Smrg # We have reworked collect2 5607ae545d91Smrg : 5608ae545d91Smrg else 5609ae545d91Smrg # We have old collect2 5610ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5611ae545d91Smrg # It fails to find uninstalled libraries when the uninstalled 5612ae545d91Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5613ae545d91Smrg # to unsupported forces relinking 5614ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5615ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5616ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5617ae545d91Smrg fi 5618ae545d91Smrg ;; 5619ae545d91Smrg esac 5620ae545d91Smrg shared_flag='-shared' 5621ae545d91Smrg if test yes = "$aix_use_runtimelinking"; then 5622ae545d91Smrg shared_flag="$shared_flag "'$wl-G' 5623ae545d91Smrg fi 5624ae545d91Smrg # Need to ensure runtime linking is disabled for the traditional 5625ae545d91Smrg # shared library, or the linker may eventually find shared libraries 5626ae545d91Smrg # /with/ Import File - we do not want to mix them. 5627ae545d91Smrg shared_flag_aix='-shared' 5628ae545d91Smrg shared_flag_svr4='-shared $wl-G' 5629ae545d91Smrg else 5630ae545d91Smrg # not using gcc 5631ae545d91Smrg if test ia64 = "$host_cpu"; then 5632ae545d91Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5633ae545d91Smrg # chokes on -Wl,-G. The following line is correct: 5634ae545d91Smrg shared_flag='-G' 5635ae545d91Smrg else 5636ae545d91Smrg if test yes = "$aix_use_runtimelinking"; then 5637ae545d91Smrg shared_flag='$wl-G' 5638ae545d91Smrg else 5639ae545d91Smrg shared_flag='$wl-bM:SRE' 5640ae545d91Smrg fi 5641ae545d91Smrg shared_flag_aix='$wl-bM:SRE' 5642ae545d91Smrg shared_flag_svr4='$wl-G' 5643ae545d91Smrg fi 5644ae545d91Smrg fi 5645ae545d91Smrg 5646ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5647ae545d91Smrg # It seems that -bexpall does not export symbols beginning with 5648ae545d91Smrg # underscore (_), so it is better to generate a list of symbols to export. 5649ae545d91Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5650ae545d91Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5651ae545d91Smrg # Warning - without using the other runtime loading flags (-brtl), 5652ae545d91Smrg # -berok will link without error, but may produce a broken library. 5653ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5654ae545d91Smrg # Determine the default libpath from the value encoded in an 5655ae545d91Smrg # empty executable. 5656ae545d91Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5657ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5658ae545d91Smrg _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 5659ae545d91Smrg else 5660ae545d91Smrg if test ia64 = "$host_cpu"; then 5661ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5662ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5663ae545d91Smrg _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" 5664ae545d91Smrg else 5665ae545d91Smrg # Determine the default libpath from the value encoded in an 5666ae545d91Smrg # empty executable. 5667ae545d91Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5668ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5669ae545d91Smrg # Warning - without using the other run time loading flags, 5670ae545d91Smrg # -berok will link without error, but may produce a broken library. 5671ae545d91Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5672ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5673ae545d91Smrg if test yes = "$with_gnu_ld"; then 5674ae545d91Smrg # We only use this code for GNU lds that support --whole-archive. 5675ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5676ae545d91Smrg else 5677ae545d91Smrg # Exported symbols can be pulled into shared objects from archives 5678ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5679ae545d91Smrg fi 5680ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5681ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5682ae545d91Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5683ae545d91Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5684ae545d91Smrg if test svr4 != "$with_aix_soname"; then 5685ae545d91Smrg # This is similar to how AIX traditionally builds its shared libraries. 5686ae545d91Smrg _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' 5687ae545d91Smrg fi 5688ae545d91Smrg if test aix != "$with_aix_soname"; then 5689ae545d91Smrg _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' 5690ae545d91Smrg else 5691ae545d91Smrg # used by -dlpreopen to get the symbols 5692ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5693ae545d91Smrg fi 5694ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5695ae545d91Smrg fi 5696ae545d91Smrg fi 5697ae545d91Smrg ;; 5698ae545d91Smrg 5699ae545d91Smrg amigaos*) 5700ae545d91Smrg case $host_cpu in 5701ae545d91Smrg powerpc) 5702ae545d91Smrg # see comment about AmigaOS4 .so support 5703ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5704ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5705ae545d91Smrg ;; 5706ae545d91Smrg m68k) 5707ae545d91Smrg _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)' 5708ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5709ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5710ae545d91Smrg ;; 5711ae545d91Smrg esac 5712ae545d91Smrg ;; 5713ae545d91Smrg 5714ae545d91Smrg bsdi[[45]]*) 5715ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5716ae545d91Smrg ;; 5717ae545d91Smrg 5718ae545d91Smrg cygwin* | mingw* | windows* | pw32* | cegcc*) 5719ae545d91Smrg # When not using gcc, we currently assume that we are using 5720ae545d91Smrg # Microsoft Visual C++ or Intel C++ Compiler. 5721ae545d91Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5722ae545d91Smrg # no search path for DLLs. 5723ae545d91Smrg case $cc_basename in 5724ae545d91Smrg cl* | icl*) 5725ae545d91Smrg # Native MSVC or ICC 5726ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5727ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5728ae545d91Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5729ae545d91Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5730ae545d91Smrg # Tell ltmain to make .lib files, not .a files. 5731ae545d91Smrg libext=lib 5732ae545d91Smrg # Tell ltmain to make .dll files, not .so files. 5733ae545d91Smrg shrext_cmds=.dll 5734ae545d91Smrg # FIXME: Setting linknames here is a bad hack. 5735ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5736ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5737ae545d91Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 5738ae545d91Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5739ae545d91Smrg else 5740ae545d91Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5741ae545d91Smrg fi~ 5742ae545d91Smrg $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5743ae545d91Smrg linknames=' 5744ae545d91Smrg # The linker will not automatically build a static lib if we build a DLL. 5745ae545d91Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5746ae545d91Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5747ae545d91Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5748ae545d91Smrg _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' 5749ae545d91Smrg # Don't use ranlib 5750ae545d91Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5751ae545d91Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5752ae545d91Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5753ae545d91Smrg case $lt_outputfile in 5754ae545d91Smrg *.exe|*.EXE) ;; 5755ae545d91Smrg *) 5756ae545d91Smrg lt_outputfile=$lt_outputfile.exe 5757ae545d91Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 5758ae545d91Smrg ;; 5759ae545d91Smrg esac~ 5760ae545d91Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5761ae545d91Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5762ae545d91Smrg $RM "$lt_outputfile.manifest"; 5763ae545d91Smrg fi' 5764ae545d91Smrg ;; 5765ae545d91Smrg *) 5766ae545d91Smrg # Assume MSVC and ICC wrapper 5767ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5768ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5769ae545d91Smrg # Tell ltmain to make .lib files, not .a files. 5770ae545d91Smrg libext=lib 5771ae545d91Smrg # Tell ltmain to make .dll files, not .so files. 5772ae545d91Smrg shrext_cmds=.dll 5773ae545d91Smrg # FIXME: Setting linknames here is a bad hack. 5774ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5775ae545d91Smrg # The linker will automatically build a .lib file if we build a DLL. 5776ae545d91Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5777ae545d91Smrg # FIXME: Should let the user specify the lib program. 5778ae545d91Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5779ae545d91Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5780ae545d91Smrg ;; 5781ae545d91Smrg esac 5782ae545d91Smrg ;; 5783ae545d91Smrg 5784ae545d91Smrg darwin* | rhapsody*) 5785ae545d91Smrg _LT_DARWIN_LINKER_FEATURES($1) 5786ae545d91Smrg ;; 5787ae545d91Smrg 5788ae545d91Smrg dgux*) 5789ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5790ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5791ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5792ae545d91Smrg ;; 5793ae545d91Smrg 5794ae545d91Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5795ae545d91Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5796ae545d91Smrg # does not break anything, and helps significantly (at the cost of a little 5797ae545d91Smrg # extra space). 5798ae545d91Smrg freebsd2.2*) 5799ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5800ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5801ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5802ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5803ae545d91Smrg ;; 5804ae545d91Smrg 5805ae545d91Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5806ae545d91Smrg freebsd2.*) 5807ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5808ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5809ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5810ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5811ae545d91Smrg ;; 5812ae545d91Smrg 5813ae545d91Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5814ae545d91Smrg freebsd* | dragonfly* | midnightbsd*) 5815ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5816ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5817ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5818ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5819ae545d91Smrg ;; 5820ae545d91Smrg 5821ae545d91Smrg hpux9*) 5822ae545d91Smrg if test yes = "$GCC"; then 5823ae545d91Smrg _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' 5824ae545d91Smrg else 5825ae545d91Smrg _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' 5826ae545d91Smrg fi 5827ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5828ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5829ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5830ae545d91Smrg 5831ae545d91Smrg # hardcode_minus_L: Not really in the search PATH, 5832ae545d91Smrg # but as the default location of the library. 5833ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5834ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5835ae545d91Smrg ;; 5836ae545d91Smrg 5837ae545d91Smrg hpux10*) 5838ae545d91Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5839ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5840ae545d91Smrg else 5841ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5842ae545d91Smrg fi 5843ae545d91Smrg if test no = "$with_gnu_ld"; then 5844ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5845ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5846ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5847ae545d91Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5848ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5849ae545d91Smrg # hardcode_minus_L: Not really in the search PATH, 5850ae545d91Smrg # but as the default location of the library. 5851ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5852ae545d91Smrg fi 5853ae545d91Smrg ;; 5854ae545d91Smrg 5855ae545d91Smrg hpux11*) 5856ae545d91Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5857ae545d91Smrg case $host_cpu in 5858ae545d91Smrg hppa*64*) 5859ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5860ae545d91Smrg ;; 5861ae545d91Smrg ia64*) 5862ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5863ae545d91Smrg ;; 5864ae545d91Smrg *) 5865ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5866ae545d91Smrg ;; 5867ae545d91Smrg esac 5868ae545d91Smrg else 5869ae545d91Smrg case $host_cpu in 5870ae545d91Smrg hppa*64*) 5871ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5872ae545d91Smrg ;; 5873ae545d91Smrg ia64*) 5874ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5875ae545d91Smrg ;; 5876ae545d91Smrg *) 5877ae545d91Smrg m4_if($1, [], [ 5878ae545d91Smrg # Older versions of the 11.00 compiler do not understand -b yet 5879ae545d91Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5880ae545d91Smrg _LT_LINKER_OPTION([if $CC understands -b], 5881ae545d91Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5882ae545d91Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5883ae545d91Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5884ae545d91Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5885ae545d91Smrg ;; 5886ae545d91Smrg esac 5887ae545d91Smrg fi 5888ae545d91Smrg if test no = "$with_gnu_ld"; then 5889ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5890ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5891ae545d91Smrg 5892ae545d91Smrg case $host_cpu in 5893ae545d91Smrg hppa*64*|ia64*) 5894ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5895ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5896ae545d91Smrg ;; 5897ae545d91Smrg *) 5898ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5899ae545d91Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5900ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5901ae545d91Smrg 5902ae545d91Smrg # hardcode_minus_L: Not really in the search PATH, 5903ae545d91Smrg # but as the default location of the library. 5904ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5905ae545d91Smrg ;; 5906ae545d91Smrg esac 5907ae545d91Smrg fi 5908ae545d91Smrg ;; 5909ae545d91Smrg 5910ae545d91Smrg irix5* | irix6* | nonstopux*) 5911ae545d91Smrg if test yes = "$GCC"; then 5912ae545d91Smrg _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' 5913ae545d91Smrg # Try to use the -exported_symbol ld option, if it does not 5914ae545d91Smrg # work, assume that -exports_file does not work either and 5915ae545d91Smrg # implicitly export all symbols. 5916ae545d91Smrg # This should be the same for all languages, so no per-tag cache variable. 5917ae545d91Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5918ae545d91Smrg [lt_cv_irix_exported_symbol], 5919ae545d91Smrg [save_LDFLAGS=$LDFLAGS 5920ae545d91Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5921ae545d91Smrg AC_LINK_IFELSE( 5922ae545d91Smrg [AC_LANG_SOURCE( 5923ae545d91Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5924ae545d91Smrg [C++], [[int foo (void) { return 0; }]], 5925ae545d91Smrg [Fortran 77], [[ 5926ae545d91Smrg subroutine foo 5927ae545d91Smrg end]], 5928ae545d91Smrg [Fortran], [[ 5929ae545d91Smrg subroutine foo 5930ae545d91Smrg end]])])], 5931ae545d91Smrg [lt_cv_irix_exported_symbol=yes], 5932ae545d91Smrg [lt_cv_irix_exported_symbol=no]) 5933ae545d91Smrg LDFLAGS=$save_LDFLAGS]) 5934ae545d91Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 5935ae545d91Smrg _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' 5936ae545d91Smrg fi 5937ae545d91Smrg else 5938ae545d91Smrg _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' 5939ae545d91Smrg _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' 5940ae545d91Smrg fi 5941ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5942ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5943ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5944ae545d91Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5945ae545d91Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5946ae545d91Smrg ;; 5947ae545d91Smrg 5948ae545d91Smrg linux*) 5949ae545d91Smrg case $cc_basename in 5950ae545d91Smrg tcc*) 5951ae545d91Smrg # Fabrice Bellard et al's Tiny C Compiler 5952ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5953ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5954ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5955ae545d91Smrg ;; 5956ae545d91Smrg esac 5957ae545d91Smrg ;; 5958ae545d91Smrg 5959ae545d91Smrg *-mlibc) 5960ae545d91Smrg ;; 5961ae545d91Smrg 5962ae545d91Smrg netbsd* | netbsdelf*-gnu) 5963ae545d91Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5964ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5965ae545d91Smrg else 5966ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5967ae545d91Smrg fi 5968ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5969ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5970ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5971ae545d91Smrg ;; 5972ae545d91Smrg 5973ae545d91Smrg newsos6) 5974ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5975ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5976ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5977ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5978ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5979ae545d91Smrg ;; 5980ae545d91Smrg 5981ae545d91Smrg *nto* | *qnx*) 5982ae545d91Smrg ;; 5983ae545d91Smrg 5984ae545d91Smrg openbsd*) 5985ae545d91Smrg if test -f /usr/libexec/ld.so; then 5986ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5987ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5988ae545d91Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5989ae545d91Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5990ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5991ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5992ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5993ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5994ae545d91Smrg else 5995ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5996ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5997ae545d91Smrg fi 5998ae545d91Smrg else 5999ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6000ae545d91Smrg fi 6001ae545d91Smrg ;; 6002ae545d91Smrg 6003ae545d91Smrg os2*) 6004ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6005ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6006ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6007ae545d91Smrg shrext_cmds=.dll 6008ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6009ae545d91Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6010ae545d91Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6011ae545d91Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6012ae545d91Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6013ae545d91Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6014ae545d91Smrg emximp -o $lib $output_objdir/$libname.def' 6015ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6016ae545d91Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6017ae545d91Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6018ae545d91Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6019ae545d91Smrg prefix_cmds="$SED"~ 6020ae545d91Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6021ae545d91Smrg prefix_cmds="$prefix_cmds -e 1d"; 6022ae545d91Smrg fi~ 6023ae545d91Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6024ae545d91Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6025ae545d91Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6026ae545d91Smrg emximp -o $lib $output_objdir/$libname.def' 6027ae545d91Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6028ae545d91Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6029ae545d91Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6030ae545d91Smrg ;; 6031ae545d91Smrg 6032ae545d91Smrg osf3*) 6033ae545d91Smrg if test yes = "$GCC"; then 6034ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 6035ae545d91Smrg _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' 6036ae545d91Smrg else 6037ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6038ae545d91Smrg _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' 6039ae545d91Smrg fi 6040ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6041ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6042ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6043ae545d91Smrg ;; 6044ae545d91Smrg 6045ae545d91Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 6046ae545d91Smrg if test yes = "$GCC"; then 6047ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 6048ae545d91Smrg _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' 6049ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6050ae545d91Smrg else 6051ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6052ae545d91Smrg _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' 6053ae545d91Smrg _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~ 6054ae545d91Smrg $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' 6055ae545d91Smrg 6056ae545d91Smrg # Both c and cxx compiler support -rpath directly 6057ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6058ae545d91Smrg fi 6059ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 6060ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6061ae545d91Smrg ;; 6062ae545d91Smrg 6063ae545d91Smrg serenity*) 6064ae545d91Smrg ;; 6065ae545d91Smrg 6066ae545d91Smrg solaris*) 6067ae545d91Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 6068ae545d91Smrg if test yes = "$GCC"; then 6069ae545d91Smrg wlarc='$wl' 6070ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 6071ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6072ae545d91Smrg $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' 6073ae545d91Smrg else 6074ae545d91Smrg case `$CC -V 2>&1` in 6075ae545d91Smrg *"Compilers 5.0"*) 6076ae545d91Smrg wlarc='' 6077ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 6078ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6079ae545d91Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 6080ae545d91Smrg ;; 6081ae545d91Smrg *) 6082ae545d91Smrg wlarc='$wl' 6083ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 6084ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6085ae545d91Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 6086ae545d91Smrg ;; 6087ae545d91Smrg esac 6088ae545d91Smrg fi 6089ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6090ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6091ae545d91Smrg case $host_os in 6092ae545d91Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6093ae545d91Smrg *) 6094ae545d91Smrg # The compiler driver will combine and reorder linker options, 6095ae545d91Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 6096ae545d91Smrg # but is careful enough not to reorder. 6097ae545d91Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6098ae545d91Smrg if test yes = "$GCC"; then 6099ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 6100ae545d91Smrg else 6101ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6102ae545d91Smrg fi 6103ae545d91Smrg ;; 6104ae545d91Smrg esac 6105ae545d91Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6106ae545d91Smrg ;; 6107ae545d91Smrg 6108ae545d91Smrg sunos4*) 6109ae545d91Smrg if test sequent = "$host_vendor"; then 6110ae545d91Smrg # Use $CC to link under sequent, because it throws in some extra .o 6111ae545d91Smrg # files that make .init and .fini sections work. 6112ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6113ae545d91Smrg else 6114ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6115ae545d91Smrg fi 6116ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6117ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6118ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6119ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6120ae545d91Smrg ;; 6121ae545d91Smrg 6122ae545d91Smrg sysv4) 6123ae545d91Smrg case $host_vendor in 6124ae545d91Smrg sni) 6125ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6126ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6127ae545d91Smrg ;; 6128ae545d91Smrg siemens) 6129ae545d91Smrg ## LD is ld it makes a PLAMLIB 6130ae545d91Smrg ## CC just makes a GrossModule. 6131ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6132ae545d91Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6133ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6134ae545d91Smrg ;; 6135ae545d91Smrg motorola) 6136ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6137ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6138ae545d91Smrg ;; 6139ae545d91Smrg esac 6140ae545d91Smrg runpath_var='LD_RUN_PATH' 6141ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6142ae545d91Smrg ;; 6143ae545d91Smrg 6144ae545d91Smrg sysv4.3*) 6145ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6146ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6147ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6148ae545d91Smrg ;; 6149ae545d91Smrg 6150ae545d91Smrg sysv4*MP*) 6151ae545d91Smrg if test -d /usr/nec; then 6152ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6153ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6154ae545d91Smrg runpath_var=LD_RUN_PATH 6155ae545d91Smrg hardcode_runpath_var=yes 6156ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6157ae545d91Smrg fi 6158ae545d91Smrg ;; 6159ae545d91Smrg 6160ae545d91Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6161ae545d91Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6162ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6163ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6164ae545d91Smrg runpath_var='LD_RUN_PATH' 6165ae545d91Smrg 6166ae545d91Smrg if test yes = "$GCC"; then 6167ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6168ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6169ae545d91Smrg else 6170ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6171ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6172ae545d91Smrg fi 6173ae545d91Smrg ;; 6174ae545d91Smrg 6175ae545d91Smrg sysv5* | sco3.2v5* | sco5v6*) 6176ae545d91Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 6177ae545d91Smrg # link with -lc, and that would cause any symbols used from libc to 6178ae545d91Smrg # always be unresolved, which means just about no library would 6179ae545d91Smrg # ever link correctly. If we're not using GNU ld we use -z text 6180ae545d91Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6181ae545d91Smrg # as -z defs. 6182ae545d91Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6183ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6184ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6185ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6186ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6187ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6188ae545d91Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6189ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6190ae545d91Smrg runpath_var='LD_RUN_PATH' 6191ae545d91Smrg 6192ae545d91Smrg if test yes = "$GCC"; then 6193ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6194ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6195ae545d91Smrg else 6196ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6197ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6198ae545d91Smrg fi 6199ae545d91Smrg ;; 6200ae545d91Smrg 6201ae545d91Smrg uts4*) 6202ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6203ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6204ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6205ae545d91Smrg ;; 6206ae545d91Smrg 6207ae545d91Smrg *) 6208ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6209ae545d91Smrg ;; 6210ae545d91Smrg esac 6211ae545d91Smrg 6212ae545d91Smrg if test sni = "$host_vendor"; then 6213ae545d91Smrg case $host in 6214ae545d91Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6215ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6216ae545d91Smrg ;; 6217ae545d91Smrg esac 6218ae545d91Smrg fi 6219ae545d91Smrg fi 6220ae545d91Smrg]) 6221ae545d91SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6222ae545d91Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6223ae545d91Smrg 6224ae545d91Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6225ae545d91Smrg 6226ae545d91Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6227ae545d91Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6228ae545d91Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 6229ae545d91Smrg [The commands to extract the exported symbol list from a shared archive]) 6230ae545d91Smrg 6231ae545d91Smrg# 6232ae545d91Smrg# Do we need to explicitly link libc? 6233ae545d91Smrg# 6234ae545d91Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6235ae545d91Smrgx|xyes) 6236ae545d91Smrg # Assume -lc should be added 6237ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6238ae545d91Smrg 6239ae545d91Smrg if test yes,yes = "$GCC,$enable_shared"; then 6240ae545d91Smrg case $_LT_TAGVAR(archive_cmds, $1) in 6241ae545d91Smrg *'~'*) 6242ae545d91Smrg # FIXME: we may have to deal with multi-command sequences. 6243ae545d91Smrg ;; 6244ae545d91Smrg '$CC '*) 6245ae545d91Smrg # Test whether the compiler implicitly links with -lc since on some 6246ae545d91Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6247ae545d91Smrg # to ld, don't add -lc before -lgcc. 6248ae545d91Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6249ae545d91Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6250ae545d91Smrg [$RM conftest* 6251ae545d91Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6252ae545d91Smrg 6253ae545d91Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6254ae545d91Smrg soname=conftest 6255ae545d91Smrg lib=conftest 6256ae545d91Smrg libobjs=conftest.$ac_objext 6257ae545d91Smrg deplibs= 6258ae545d91Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6259ae545d91Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6260ae545d91Smrg compiler_flags=-v 6261ae545d91Smrg linker_flags=-v 6262ae545d91Smrg verstring= 6263ae545d91Smrg output_objdir=. 6264ae545d91Smrg libname=conftest 6265ae545d91Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6266ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 6267ae545d91Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6268ae545d91Smrg then 6269ae545d91Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6270ae545d91Smrg else 6271ae545d91Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6272ae545d91Smrg fi 6273ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6274ae545d91Smrg else 6275ae545d91Smrg cat conftest.err 1>&5 6276ae545d91Smrg fi 6277ae545d91Smrg $RM conftest* 6278ae545d91Smrg ]) 6279ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6280ae545d91Smrg ;; 6281ae545d91Smrg esac 6282ae545d91Smrg fi 6283ae545d91Smrg ;; 6284ae545d91Smrgesac 6285ae545d91Smrg 6286ae545d91Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6287ae545d91Smrg [Whether or not to add -lc for building shared libraries]) 6288ae545d91Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6289ae545d91Smrg [enable_shared_with_static_runtimes], [0], 6290ae545d91Smrg [Whether or not to disallow shared libs when runtime libs are static]) 6291ae545d91Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6292ae545d91Smrg [Compiler flag to allow reflexive dlopens]) 6293ae545d91Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6294ae545d91Smrg [Compiler flag to generate shared objects directly from archives]) 6295ae545d91Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 6296ae545d91Smrg [Whether the compiler copes with passing no objects directly]) 6297ae545d91Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6298ae545d91Smrg [Create an old-style archive from a shared archive]) 6299ae545d91Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6300ae545d91Smrg [Create a temporary old-style archive to link instead of a shared archive]) 6301ae545d91Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6302ae545d91Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6303ae545d91Smrg_LT_TAGDECL([], [module_cmds], [2], 6304ae545d91Smrg [Commands used to build a loadable module if different from building 6305ae545d91Smrg a shared archive.]) 6306ae545d91Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6307ae545d91Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 6308ae545d91Smrg [Whether we are building with GNU ld or not]) 6309ae545d91Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6310ae545d91Smrg [Flag that allows shared libraries with undefined symbols to be built]) 6311ae545d91Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 6312ae545d91Smrg [Flag that enforces no undefined symbols]) 6313ae545d91Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6314ae545d91Smrg [Flag to hardcode $libdir into a binary during linking. 6315ae545d91Smrg This must work even if $libdir does not exist]) 6316ae545d91Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6317ae545d91Smrg [Whether we need a single "-rpath" flag with a separated argument]) 6318ae545d91Smrg_LT_TAGDECL([], [hardcode_direct], [0], 6319ae545d91Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6320ae545d91Smrg DIR into the resulting binary]) 6321ae545d91Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6322ae545d91Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6323ae545d91Smrg DIR into the resulting binary and the resulting library dependency is 6324ae545d91Smrg "absolute", i.e. impossible to change by setting $shlibpath_var if the 6325ae545d91Smrg library is relocated]) 6326ae545d91Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6327ae545d91Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6328ae545d91Smrg into the resulting binary]) 6329ae545d91Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6330ae545d91Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6331ae545d91Smrg into the resulting binary]) 6332ae545d91Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 6333ae545d91Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 6334ae545d91Smrg into the library and all subsequent libraries and executables linked 6335ae545d91Smrg against it]) 6336ae545d91Smrg_LT_TAGDECL([], [inherit_rpath], [0], 6337ae545d91Smrg [Set to yes if linker adds runtime paths of dependent libraries 6338ae545d91Smrg to runtime path list]) 6339ae545d91Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 6340ae545d91Smrg [Whether libtool must link a program against all its dependency libraries]) 6341ae545d91Smrg_LT_TAGDECL([], [always_export_symbols], [0], 6342ae545d91Smrg [Set to "yes" if exported symbols are required]) 6343ae545d91Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6344ae545d91Smrg [The commands to list exported symbols]) 6345ae545d91Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 6346ae545d91Smrg [Symbols that should not be listed in the preloaded symbols]) 6347ae545d91Smrg_LT_TAGDECL([], [include_expsyms], [1], 6348ae545d91Smrg [Symbols that must always be exported]) 6349ae545d91Smrg_LT_TAGDECL([], [prelink_cmds], [2], 6350ae545d91Smrg [Commands necessary for linking programs (against libraries) with templates]) 6351ae545d91Smrg_LT_TAGDECL([], [postlink_cmds], [2], 6352ae545d91Smrg [Commands necessary for finishing linking programs]) 6353ae545d91Smrg_LT_TAGDECL([], [file_list_spec], [1], 6354ae545d91Smrg [Specify filename containing input files]) 6355ae545d91Smrgdnl FIXME: Not yet implemented 6356ae545d91Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6357ae545d91Smrgdnl [Compiler flag to generate thread safe objects]) 6358ae545d91Smrg])# _LT_LINKER_SHLIBS 6359ae545d91Smrg 6360ae545d91Smrg 6361ae545d91Smrg# _LT_LANG_C_CONFIG([TAG]) 6362ae545d91Smrg# ------------------------ 6363ae545d91Smrg# Ensure that the configuration variables for a C compiler are suitably 6364ae545d91Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6365ae545d91Smrg# the compiler configuration to 'libtool'. 6366ae545d91Smrgm4_defun([_LT_LANG_C_CONFIG], 6367ae545d91Smrg[m4_require([_LT_DECL_EGREP])dnl 6368ae545d91Smrglt_save_CC=$CC 6369ae545d91SmrgAC_LANG_PUSH(C) 6370ae545d91Smrg 6371ae545d91Smrg# Source file extension for C test sources. 6372ae545d91Smrgac_ext=c 6373ae545d91Smrg 6374ae545d91Smrg# Object file extension for compiled C test sources. 6375ae545d91Smrgobjext=o 6376ae545d91Smrg_LT_TAGVAR(objext, $1)=$objext 6377ae545d91Smrg 6378ae545d91Smrg# Code to be used in simple compile tests 6379ae545d91Smrglt_simple_compile_test_code="int some_variable = 0;" 6380ae545d91Smrg 6381ae545d91Smrg# Code to be used in simple link tests 6382ae545d91Smrglt_simple_link_test_code='int main(void){return(0);}' 6383ae545d91Smrg 6384ae545d91Smrg_LT_TAG_COMPILER 6385ae545d91Smrg# Save the default compiler, since it gets overwritten when the other 6386ae545d91Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6387ae545d91Smrgcompiler_DEFAULT=$CC 6388ae545d91Smrg 6389ae545d91Smrg# save warnings/boilerplate of simple test code 6390ae545d91Smrg_LT_COMPILER_BOILERPLATE 6391ae545d91Smrg_LT_LINKER_BOILERPLATE 6392ae545d91Smrg 6393ae545d91Smrg## CAVEAT EMPTOR: 6394ae545d91Smrg## There is no encapsulation within the following macros, do not change 6395ae545d91Smrg## the running order or otherwise move them around unless you know exactly 6396ae545d91Smrg## what you are doing... 6397ae545d91Smrgif test -n "$compiler"; then 6398ae545d91Smrg _LT_COMPILER_NO_RTTI($1) 6399ae545d91Smrg _LT_COMPILER_PIC($1) 6400ae545d91Smrg _LT_COMPILER_C_O($1) 6401ae545d91Smrg _LT_COMPILER_FILE_LOCKS($1) 6402ae545d91Smrg _LT_LINKER_SHLIBS($1) 6403ae545d91Smrg _LT_SYS_DYNAMIC_LINKER($1) 6404ae545d91Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6405ae545d91Smrg LT_SYS_DLOPEN_SELF 6406ae545d91Smrg _LT_CMD_STRIPLIB 6407ae545d91Smrg 6408ae545d91Smrg # Report what library types will actually be built 6409ae545d91Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6410ae545d91Smrg AC_MSG_RESULT([$can_build_shared]) 6411ae545d91Smrg 6412ae545d91Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6413ae545d91Smrg test no = "$can_build_shared" && enable_shared=no 6414ae545d91Smrg 6415ae545d91Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6416ae545d91Smrg # are all built from PIC. 6417ae545d91Smrg case $host_os in 6418ae545d91Smrg aix3*) 6419ae545d91Smrg test yes = "$enable_shared" && enable_static=no 6420ae545d91Smrg if test -n "$RANLIB"; then 6421ae545d91Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6422ae545d91Smrg postinstall_cmds='$RANLIB $lib' 6423ae545d91Smrg fi 6424ae545d91Smrg ;; 6425ae545d91Smrg 6426ae545d91Smrg aix[[4-9]]*) 6427ae545d91Smrg if test ia64 != "$host_cpu"; then 6428ae545d91Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6429ae545d91Smrg yes,aix,yes) ;; # shared object as lib.so file only 6430ae545d91Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 6431ae545d91Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6432ae545d91Smrg esac 6433ae545d91Smrg fi 6434ae545d91Smrg ;; 6435ae545d91Smrg esac 6436ae545d91Smrg AC_MSG_RESULT([$enable_shared]) 6437ae545d91Smrg 6438ae545d91Smrg AC_MSG_CHECKING([whether to build static libraries]) 6439ae545d91Smrg # Make sure either enable_shared or enable_static is yes. 6440ae545d91Smrg test yes = "$enable_shared" || enable_static=yes 6441ae545d91Smrg AC_MSG_RESULT([$enable_static]) 6442ae545d91Smrg 6443ae545d91Smrg _LT_CONFIG($1) 6444ae545d91Smrgfi 6445ae545d91SmrgAC_LANG_POP 6446ae545d91SmrgCC=$lt_save_CC 6447ae545d91Smrg])# _LT_LANG_C_CONFIG 6448ae545d91Smrg 6449ae545d91Smrg 6450ae545d91Smrg# _LT_LANG_CXX_CONFIG([TAG]) 6451ae545d91Smrg# -------------------------- 6452ae545d91Smrg# Ensure that the configuration variables for a C++ compiler are suitably 6453ae545d91Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6454ae545d91Smrg# the compiler configuration to 'libtool'. 6455ae545d91Smrgm4_defun([_LT_LANG_CXX_CONFIG], 6456ae545d91Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6457ae545d91Smrgm4_require([_LT_DECL_EGREP])dnl 6458ae545d91Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6459ae545d91Smrgif test -n "$CXX" && ( test no != "$CXX" && 6460ae545d91Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6461ae545d91Smrg (test g++ != "$CXX"))); then 6462ae545d91Smrg AC_PROG_CXXCPP 6463ae545d91Smrgelse 6464ae545d91Smrg _lt_caught_CXX_error=yes 6465ae545d91Smrgfi 6466ae545d91Smrg 6467ae545d91SmrgAC_LANG_PUSH(C++) 6468ae545d91Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6469ae545d91Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6470ae545d91Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6471ae545d91Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6472ae545d91Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6473ae545d91Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6474ae545d91Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6475ae545d91Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6476ae545d91Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6477ae545d91Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6478ae545d91Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6479ae545d91Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6480ae545d91Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6481ae545d91Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6482ae545d91Smrg_LT_TAGVAR(module_cmds, $1)= 6483ae545d91Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6484ae545d91Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6485ae545d91Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6486ae545d91Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6487ae545d91Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6488ae545d91Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6489ae545d91Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6490ae545d91Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6491ae545d91Smrg 6492ae545d91Smrg# Source file extension for C++ test sources. 6493ae545d91Smrgac_ext=cpp 6494ae545d91Smrg 6495ae545d91Smrg# Object file extension for compiled C++ test sources. 6496ae545d91Smrgobjext=o 6497ae545d91Smrg_LT_TAGVAR(objext, $1)=$objext 6498ae545d91Smrg 6499ae545d91Smrg# No sense in running all these tests if we already determined that 6500ae545d91Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 6501ae545d91Smrg# are currently assumed to apply to all compilers on this platform, 6502ae545d91Smrg# and will be corrupted by setting them based on a non-working compiler. 6503ae545d91Smrgif test yes != "$_lt_caught_CXX_error"; then 6504ae545d91Smrg # Code to be used in simple compile tests 6505ae545d91Smrg lt_simple_compile_test_code="int some_variable = 0;" 6506ae545d91Smrg 6507ae545d91Smrg # Code to be used in simple link tests 6508ae545d91Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6509ae545d91Smrg 6510ae545d91Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6511ae545d91Smrg _LT_TAG_COMPILER 6512ae545d91Smrg 6513ae545d91Smrg # save warnings/boilerplate of simple test code 6514ae545d91Smrg _LT_COMPILER_BOILERPLATE 6515ae545d91Smrg _LT_LINKER_BOILERPLATE 6516ae545d91Smrg 6517ae545d91Smrg # Allow CC to be a program name with arguments. 6518ae545d91Smrg lt_save_CC=$CC 6519ae545d91Smrg lt_save_CFLAGS=$CFLAGS 6520ae545d91Smrg lt_save_LD=$LD 6521ae545d91Smrg lt_save_GCC=$GCC 6522ae545d91Smrg GCC=$GXX 6523ae545d91Smrg lt_save_with_gnu_ld=$with_gnu_ld 6524ae545d91Smrg lt_save_path_LD=$lt_cv_path_LD 6525ae545d91Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6526ae545d91Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6527ae545d91Smrg else 6528ae545d91Smrg $as_unset lt_cv_prog_gnu_ld 6529ae545d91Smrg fi 6530ae545d91Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 6531ae545d91Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 6532ae545d91Smrg else 6533ae545d91Smrg $as_unset lt_cv_path_LD 6534ae545d91Smrg fi 6535ae545d91Smrg test -z "${LDCXX+set}" || LD=$LDCXX 6536ae545d91Smrg CC=${CXX-"c++"} 6537ae545d91Smrg CFLAGS=$CXXFLAGS 6538ae545d91Smrg compiler=$CC 6539ae545d91Smrg _LT_TAGVAR(compiler, $1)=$CC 6540ae545d91Smrg _LT_CC_BASENAME([$compiler]) 6541ae545d91Smrg 6542ae545d91Smrg if test -n "$compiler"; then 6543ae545d91Smrg # We don't want -fno-exception when compiling C++ code, so set the 6544ae545d91Smrg # no_builtin_flag separately 6545ae545d91Smrg if test yes = "$GXX"; then 6546ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6547ae545d91Smrg else 6548ae545d91Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6549ae545d91Smrg fi 6550ae545d91Smrg 6551ae545d91Smrg if test yes = "$GXX"; then 6552ae545d91Smrg # Set up default GNU C++ configuration 6553ae545d91Smrg 6554ae545d91Smrg LT_PATH_LD 6555ae545d91Smrg 6556ae545d91Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 6557ae545d91Smrg # archiving commands below assume that GNU ld is being used. 6558ae545d91Smrg if test yes = "$with_gnu_ld"; then 6559ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6560ae545d91Smrg _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' 6561ae545d91Smrg 6562ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6563ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6564ae545d91Smrg 6565ae545d91Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 6566ae545d91Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6567ae545d91Smrg # investigate it a little bit more. (MM) 6568ae545d91Smrg wlarc='$wl' 6569ae545d91Smrg 6570ae545d91Smrg # ancient GNU ld didn't support --whole-archive et. al. 6571ae545d91Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 6572ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6573ae545d91Smrg else 6574ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6575ae545d91Smrg fi 6576ae545d91Smrg else 6577ae545d91Smrg with_gnu_ld=no 6578ae545d91Smrg wlarc= 6579ae545d91Smrg 6580ae545d91Smrg # A generic and very simple default shared library creation 6581ae545d91Smrg # command for GNU C++ for the case where it uses the native 6582ae545d91Smrg # linker, instead of GNU ld. If possible, this setting should 6583ae545d91Smrg # overridden to take advantage of the native linker features on 6584ae545d91Smrg # the platform it is being used on. 6585ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6586ae545d91Smrg fi 6587ae545d91Smrg 6588ae545d91Smrg # Commands to make compiler produce verbose output that lists 6589ae545d91Smrg # what "hidden" libraries, object files and flags are used when 6590ae545d91Smrg # linking a shared library. 6591ae545d91Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' 6592ae545d91Smrg 6593ae545d91Smrg else 6594ae545d91Smrg GXX=no 6595ae545d91Smrg with_gnu_ld=no 6596ae545d91Smrg wlarc= 6597ae545d91Smrg fi 6598ae545d91Smrg 6599ae545d91Smrg # PORTME: fill in a description of your system's C++ link characteristics 6600ae545d91Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6601ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6602ae545d91Smrg case $host_os in 6603ae545d91Smrg aix3*) 6604ae545d91Smrg # FIXME: insert proper C++ library support 6605ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6606ae545d91Smrg ;; 6607ae545d91Smrg aix[[4-9]]*) 6608ae545d91Smrg if test ia64 = "$host_cpu"; then 6609ae545d91Smrg # On IA64, the linker does run time linking by default, so we don't 6610ae545d91Smrg # have to do anything special. 6611ae545d91Smrg aix_use_runtimelinking=no 6612ae545d91Smrg exp_sym_flag='-Bexport' 6613ae545d91Smrg no_entry_flag= 6614ae545d91Smrg else 6615ae545d91Smrg aix_use_runtimelinking=no 6616ae545d91Smrg 6617ae545d91Smrg # Test if we are trying to use run time linking or normal 6618ae545d91Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6619ae545d91Smrg # have runtime linking enabled, and use it for executables. 6620ae545d91Smrg # For shared libraries, we enable/disable runtime linking 6621ae545d91Smrg # depending on the kind of the shared library created - 6622ae545d91Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 6623ae545d91Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6624ae545d91Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 6625ae545d91Smrg # lib.a static archive 6626ae545d91Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6627ae545d91Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 6628ae545d91Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6629ae545d91Smrg # lib.a(lib.so.V) shared, rtl:no 6630ae545d91Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6631ae545d91Smrg # lib.a static archive 6632ae545d91Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6633ae545d91Smrg for ld_flag in $LDFLAGS; do 6634ae545d91Smrg case $ld_flag in 6635ae545d91Smrg *-brtl*) 6636ae545d91Smrg aix_use_runtimelinking=yes 6637ae545d91Smrg break 6638ae545d91Smrg ;; 6639ae545d91Smrg esac 6640ae545d91Smrg done 6641ae545d91Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6642ae545d91Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6643ae545d91Smrg # so we don't have lib.a shared libs to link our executables. 6644ae545d91Smrg # We have to force runtime linking in this case. 6645ae545d91Smrg aix_use_runtimelinking=yes 6646ae545d91Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6647ae545d91Smrg fi 6648ae545d91Smrg ;; 6649ae545d91Smrg esac 6650ae545d91Smrg 6651ae545d91Smrg exp_sym_flag='-bexport' 6652ae545d91Smrg no_entry_flag='-bnoentry' 6653ae545d91Smrg fi 6654ae545d91Smrg 6655ae545d91Smrg # When large executables or shared objects are built, AIX ld can 6656ae545d91Smrg # have problems creating the table of contents. If linking a library 6657ae545d91Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6658ae545d91Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6659ae545d91Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6660ae545d91Smrg 6661ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='' 6662ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6663ae545d91Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6664ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6665ae545d91Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6666ae545d91Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6667ae545d91Smrg case $with_aix_soname,$aix_use_runtimelinking in 6668ae545d91Smrg aix,*) ;; # no import file 6669ae545d91Smrg svr4,* | *,yes) # use import file 6670ae545d91Smrg # The Import File defines what to hardcode. 6671ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6672ae545d91Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6673ae545d91Smrg ;; 6674ae545d91Smrg esac 6675ae545d91Smrg 6676ae545d91Smrg if test yes = "$GXX"; then 6677ae545d91Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6678ae545d91Smrg # We only want to do this on AIX 4.2 and lower, the check 6679ae545d91Smrg # below for broken collect2 doesn't work under 4.3+ 6680ae545d91Smrg collect2name=`$CC -print-prog-name=collect2` 6681ae545d91Smrg if test -f "$collect2name" && 6682ae545d91Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6683ae545d91Smrg then 6684ae545d91Smrg # We have reworked collect2 6685ae545d91Smrg : 6686ae545d91Smrg else 6687ae545d91Smrg # We have old collect2 6688ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6689ae545d91Smrg # It fails to find uninstalled libraries when the uninstalled 6690ae545d91Smrg # path is not listed in the libpath. Setting hardcode_minus_L 6691ae545d91Smrg # to unsupported forces relinking 6692ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6693ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6694ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6695ae545d91Smrg fi 6696ae545d91Smrg esac 6697ae545d91Smrg shared_flag='-shared' 6698ae545d91Smrg if test yes = "$aix_use_runtimelinking"; then 6699ae545d91Smrg shared_flag=$shared_flag' $wl-G' 6700ae545d91Smrg fi 6701ae545d91Smrg # Need to ensure runtime linking is disabled for the traditional 6702ae545d91Smrg # shared library, or the linker may eventually find shared libraries 6703ae545d91Smrg # /with/ Import File - we do not want to mix them. 6704ae545d91Smrg shared_flag_aix='-shared' 6705ae545d91Smrg shared_flag_svr4='-shared $wl-G' 6706ae545d91Smrg else 6707ae545d91Smrg # not using gcc 6708ae545d91Smrg if test ia64 = "$host_cpu"; then 6709ae545d91Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6710ae545d91Smrg # chokes on -Wl,-G. The following line is correct: 6711ae545d91Smrg shared_flag='-G' 6712ae545d91Smrg else 6713ae545d91Smrg if test yes = "$aix_use_runtimelinking"; then 6714ae545d91Smrg shared_flag='$wl-G' 6715ae545d91Smrg else 6716ae545d91Smrg shared_flag='$wl-bM:SRE' 6717ae545d91Smrg fi 6718ae545d91Smrg shared_flag_aix='$wl-bM:SRE' 6719ae545d91Smrg shared_flag_svr4='$wl-G' 6720ae545d91Smrg fi 6721ae545d91Smrg fi 6722ae545d91Smrg 6723ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6724ae545d91Smrg # It seems that -bexpall does not export symbols beginning with 6725ae545d91Smrg # underscore (_), so it is better to generate a list of symbols to 6726ae545d91Smrg # export. 6727ae545d91Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6728ae545d91Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6729ae545d91Smrg # Warning - without using the other runtime loading flags (-brtl), 6730ae545d91Smrg # -berok will link without error, but may produce a broken library. 6731ae545d91Smrg # The "-G" linker flag allows undefined symbols. 6732ae545d91Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6733ae545d91Smrg # Determine the default libpath from the value encoded in an empty 6734ae545d91Smrg # executable. 6735ae545d91Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6736ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6737ae545d91Smrg 6738ae545d91Smrg _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 6739ae545d91Smrg else 6740ae545d91Smrg if test ia64 = "$host_cpu"; then 6741ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6742ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6743ae545d91Smrg _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" 6744ae545d91Smrg else 6745ae545d91Smrg # Determine the default libpath from the value encoded in an 6746ae545d91Smrg # empty executable. 6747ae545d91Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6748ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6749ae545d91Smrg # Warning - without using the other run time loading flags, 6750ae545d91Smrg # -berok will link without error, but may produce a broken library. 6751ae545d91Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6752ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6753ae545d91Smrg if test yes = "$with_gnu_ld"; then 6754ae545d91Smrg # We only use this code for GNU lds that support --whole-archive. 6755ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6756ae545d91Smrg else 6757ae545d91Smrg # Exported symbols can be pulled into shared objects from archives 6758ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6759ae545d91Smrg fi 6760ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6761ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6762ae545d91Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6763ae545d91Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6764ae545d91Smrg if test svr4 != "$with_aix_soname"; then 6765ae545d91Smrg # This is similar to how AIX traditionally builds its shared 6766ae545d91Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6767ae545d91Smrg _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' 6768ae545d91Smrg fi 6769ae545d91Smrg if test aix != "$with_aix_soname"; then 6770ae545d91Smrg _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' 6771ae545d91Smrg else 6772ae545d91Smrg # used by -dlpreopen to get the symbols 6773ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6774ae545d91Smrg fi 6775ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6776ae545d91Smrg fi 6777ae545d91Smrg fi 6778ae545d91Smrg ;; 6779ae545d91Smrg 6780ae545d91Smrg beos*) 6781ae545d91Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6782ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6783ae545d91Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6784ae545d91Smrg # support --undefined. This deserves some investigation. FIXME 6785ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6786ae545d91Smrg else 6787ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6788ae545d91Smrg fi 6789ae545d91Smrg ;; 6790ae545d91Smrg 6791ae545d91Smrg chorus*) 6792ae545d91Smrg case $cc_basename in 6793ae545d91Smrg *) 6794ae545d91Smrg # FIXME: insert proper C++ library support 6795ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6796ae545d91Smrg ;; 6797ae545d91Smrg esac 6798ae545d91Smrg ;; 6799ae545d91Smrg 6800ae545d91Smrg cygwin* | mingw* | windows* | pw32* | cegcc*) 6801ae545d91Smrg case $GXX,$cc_basename in 6802ae545d91Smrg ,cl* | no,cl* | ,icl* | no,icl*) 6803ae545d91Smrg # Native MSVC or ICC 6804ae545d91Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6805ae545d91Smrg # no search path for DLLs. 6806ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6807ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6808ae545d91Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6809ae545d91Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6810ae545d91Smrg # Tell ltmain to make .lib files, not .a files. 6811ae545d91Smrg libext=lib 6812ae545d91Smrg # Tell ltmain to make .dll files, not .so files. 6813ae545d91Smrg shrext_cmds=.dll 6814ae545d91Smrg # FIXME: Setting linknames here is a bad hack. 6815ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6816ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6817ae545d91Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 6818ae545d91Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6819ae545d91Smrg else 6820ae545d91Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6821ae545d91Smrg fi~ 6822ae545d91Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6823ae545d91Smrg linknames=' 6824ae545d91Smrg # The linker will not automatically build a static lib if we build a DLL. 6825ae545d91Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6826ae545d91Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6827ae545d91Smrg # Don't use ranlib 6828ae545d91Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6829ae545d91Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6830ae545d91Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6831ae545d91Smrg case $lt_outputfile in 6832ae545d91Smrg *.exe|*.EXE) ;; 6833ae545d91Smrg *) 6834ae545d91Smrg lt_outputfile=$lt_outputfile.exe 6835ae545d91Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 6836ae545d91Smrg ;; 6837ae545d91Smrg esac~ 6838ae545d91Smrg func_to_tool_file "$lt_outputfile"~ 6839ae545d91Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6840ae545d91Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6841ae545d91Smrg $RM "$lt_outputfile.manifest"; 6842ae545d91Smrg fi' 6843ae545d91Smrg ;; 6844ae545d91Smrg *) 6845ae545d91Smrg # g++ 6846ae545d91Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6847ae545d91Smrg # as there is no search path for DLLs. 6848ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6849ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6850ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6851ae545d91Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6852ae545d91Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6853ae545d91Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6854ae545d91Smrg 6855ae545d91Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6856ae545d91Smrg _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' 6857ae545d91Smrg # If the export-symbols file already is a .def file, use it as 6858ae545d91Smrg # is; otherwise, prepend EXPORTS... 6859ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6860ae545d91Smrg cp $export_symbols $output_objdir/$soname.def; 6861ae545d91Smrg else 6862ae545d91Smrg echo EXPORTS > $output_objdir/$soname.def; 6863ae545d91Smrg cat $export_symbols >> $output_objdir/$soname.def; 6864ae545d91Smrg fi~ 6865ae545d91Smrg $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' 6866ae545d91Smrg else 6867ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6868ae545d91Smrg fi 6869ae545d91Smrg ;; 6870ae545d91Smrg esac 6871ae545d91Smrg ;; 6872ae545d91Smrg darwin* | rhapsody*) 6873ae545d91Smrg _LT_DARWIN_LINKER_FEATURES($1) 6874ae545d91Smrg ;; 6875ae545d91Smrg 6876ae545d91Smrg os2*) 6877ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6878ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6879ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6880ae545d91Smrg shrext_cmds=.dll 6881ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6882ae545d91Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6883ae545d91Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6884ae545d91Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6885ae545d91Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6886ae545d91Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6887ae545d91Smrg emximp -o $lib $output_objdir/$libname.def' 6888ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6889ae545d91Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6890ae545d91Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6891ae545d91Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6892ae545d91Smrg prefix_cmds="$SED"~ 6893ae545d91Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6894ae545d91Smrg prefix_cmds="$prefix_cmds -e 1d"; 6895ae545d91Smrg fi~ 6896ae545d91Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6897ae545d91Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6898ae545d91Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6899ae545d91Smrg emximp -o $lib $output_objdir/$libname.def' 6900ae545d91Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6901ae545d91Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6902ae545d91Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6903ae545d91Smrg ;; 6904ae545d91Smrg 6905ae545d91Smrg dgux*) 6906ae545d91Smrg case $cc_basename in 6907ae545d91Smrg ec++*) 6908ae545d91Smrg # FIXME: insert proper C++ library support 6909ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6910ae545d91Smrg ;; 6911ae545d91Smrg ghcx*) 6912ae545d91Smrg # Green Hills C++ Compiler 6913ae545d91Smrg # FIXME: insert proper C++ library support 6914ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6915ae545d91Smrg ;; 6916ae545d91Smrg *) 6917ae545d91Smrg # FIXME: insert proper C++ library support 6918ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6919ae545d91Smrg ;; 6920ae545d91Smrg esac 6921ae545d91Smrg ;; 6922ae545d91Smrg 6923ae545d91Smrg freebsd2.*) 6924ae545d91Smrg # C++ shared libraries reported to be fairly broken before 6925ae545d91Smrg # switch to ELF 6926ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6927ae545d91Smrg ;; 6928ae545d91Smrg 6929ae545d91Smrg freebsd-elf*) 6930ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6931ae545d91Smrg ;; 6932ae545d91Smrg 6933ae545d91Smrg freebsd* | dragonfly* | midnightbsd*) 6934ae545d91Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6935ae545d91Smrg # conventions 6936ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6937ae545d91Smrg ;; 6938ae545d91Smrg 6939ae545d91Smrg haiku*) 6940ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6941ae545d91Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 6942ae545d91Smrg ;; 6943ae545d91Smrg 6944ae545d91Smrg hpux9*) 6945ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6946ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6947ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6948ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6949ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6950ae545d91Smrg # but as the default 6951ae545d91Smrg # location of the library. 6952ae545d91Smrg 6953ae545d91Smrg case $cc_basename in 6954ae545d91Smrg CC*) 6955ae545d91Smrg # FIXME: insert proper C++ library support 6956ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6957ae545d91Smrg ;; 6958ae545d91Smrg aCC*) 6959ae545d91Smrg _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' 6960ae545d91Smrg # Commands to make compiler produce verbose output that lists 6961ae545d91Smrg # what "hidden" libraries, object files and flags are used when 6962ae545d91Smrg # linking a shared library. 6963ae545d91Smrg # 6964ae545d91Smrg # There doesn't appear to be a way to prevent this compiler from 6965ae545d91Smrg # explicitly linking system object files so we need to strip them 6966ae545d91Smrg # from the output so that they don't get included in the library 6967ae545d91Smrg # dependencies. 6968ae545d91Smrg 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"' 6969ae545d91Smrg ;; 6970ae545d91Smrg *) 6971ae545d91Smrg if test yes = "$GXX"; then 6972ae545d91Smrg _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' 6973ae545d91Smrg else 6974ae545d91Smrg # FIXME: insert proper C++ library support 6975ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6976ae545d91Smrg fi 6977ae545d91Smrg ;; 6978ae545d91Smrg esac 6979ae545d91Smrg ;; 6980ae545d91Smrg 6981ae545d91Smrg hpux10*|hpux11*) 6982ae545d91Smrg if test no = "$with_gnu_ld"; then 6983ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6984ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6985ae545d91Smrg 6986ae545d91Smrg case $host_cpu in 6987ae545d91Smrg hppa*64*|ia64*) 6988ae545d91Smrg ;; 6989ae545d91Smrg *) 6990ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6991ae545d91Smrg ;; 6992ae545d91Smrg esac 6993ae545d91Smrg fi 6994ae545d91Smrg case $host_cpu in 6995ae545d91Smrg hppa*64*|ia64*) 6996ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6997ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6998ae545d91Smrg ;; 6999ae545d91Smrg *) 7000ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7001ae545d91Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7002ae545d91Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 7003ae545d91Smrg # but as the default 7004ae545d91Smrg # location of the library. 7005ae545d91Smrg ;; 7006ae545d91Smrg esac 7007ae545d91Smrg 7008ae545d91Smrg case $cc_basename in 7009ae545d91Smrg CC*) 7010ae545d91Smrg # FIXME: insert proper C++ library support 7011ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7012ae545d91Smrg ;; 7013ae545d91Smrg aCC*) 7014ae545d91Smrg case $host_cpu in 7015ae545d91Smrg hppa*64*) 7016ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7017ae545d91Smrg ;; 7018ae545d91Smrg ia64*) 7019ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7020ae545d91Smrg ;; 7021ae545d91Smrg *) 7022ae545d91Smrg _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' 7023ae545d91Smrg ;; 7024ae545d91Smrg esac 7025ae545d91Smrg # Commands to make compiler produce verbose output that lists 7026ae545d91Smrg # what "hidden" libraries, object files and flags are used when 7027ae545d91Smrg # linking a shared library. 7028ae545d91Smrg # 7029ae545d91Smrg # There doesn't appear to be a way to prevent this compiler from 7030ae545d91Smrg # explicitly linking system object files so we need to strip them 7031ae545d91Smrg # from the output so that they don't get included in the library 7032ae545d91Smrg # dependencies. 7033ae545d91Smrg 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"' 7034ae545d91Smrg ;; 7035ae545d91Smrg *) 7036ae545d91Smrg if test yes = "$GXX"; then 7037ae545d91Smrg if test no = "$with_gnu_ld"; then 7038ae545d91Smrg case $host_cpu in 7039ae545d91Smrg hppa*64*) 7040ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7041ae545d91Smrg ;; 7042ae545d91Smrg ia64*) 7043ae545d91Smrg _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' 7044ae545d91Smrg ;; 7045ae545d91Smrg *) 7046ae545d91Smrg _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' 7047ae545d91Smrg ;; 7048ae545d91Smrg esac 7049ae545d91Smrg fi 7050ae545d91Smrg else 7051ae545d91Smrg # FIXME: insert proper C++ library support 7052ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7053ae545d91Smrg fi 7054ae545d91Smrg ;; 7055ae545d91Smrg esac 7056ae545d91Smrg ;; 7057ae545d91Smrg 7058ae545d91Smrg interix[[3-9]]*) 7059ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=no 7060ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7061ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7062ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7063ae545d91Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 7064ae545d91Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 7065ae545d91Smrg # default) and relocated if they conflict, which is a slow very memory 7066ae545d91Smrg # consuming and fragmenting process. To avoid this, we pick a random, 7067ae545d91Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 7068ae545d91Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 7069ae545d91Smrg _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' 7070ae545d91Smrg _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' 7071ae545d91Smrg ;; 7072ae545d91Smrg irix5* | irix6*) 7073ae545d91Smrg case $cc_basename in 7074ae545d91Smrg CC*) 7075ae545d91Smrg # SGI C++ 7076ae545d91Smrg _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' 7077ae545d91Smrg 7078ae545d91Smrg # Archives containing C++ object files must be created using 7079ae545d91Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 7080ae545d91Smrg # necessary to make sure instantiated templates are included 7081ae545d91Smrg # in the archive. 7082ae545d91Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 7083ae545d91Smrg ;; 7084ae545d91Smrg *) 7085ae545d91Smrg if test yes = "$GXX"; then 7086ae545d91Smrg if test no = "$with_gnu_ld"; then 7087ae545d91Smrg _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' 7088ae545d91Smrg else 7089ae545d91Smrg _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' 7090ae545d91Smrg fi 7091ae545d91Smrg fi 7092ae545d91Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7093ae545d91Smrg ;; 7094ae545d91Smrg esac 7095ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7096ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7097ae545d91Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 7098ae545d91Smrg ;; 7099ae545d91Smrg 7100ae545d91Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7101ae545d91Smrg case $cc_basename in 7102ae545d91Smrg KCC*) 7103ae545d91Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7104ae545d91Smrg 7105ae545d91Smrg # KCC will only create a shared library if the output file 7106ae545d91Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7107ae545d91Smrg # to its proper name (with version) after linking. 7108ae545d91Smrg _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' 7109ae545d91Smrg _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' 7110ae545d91Smrg # Commands to make compiler produce verbose output that lists 7111ae545d91Smrg # what "hidden" libraries, object files and flags are used when 7112ae545d91Smrg # linking a shared library. 7113ae545d91Smrg # 7114ae545d91Smrg # There doesn't appear to be a way to prevent this compiler from 7115ae545d91Smrg # explicitly linking system object files so we need to strip them 7116ae545d91Smrg # from the output so that they don't get included in the library 7117ae545d91Smrg # dependencies. 7118ae545d91Smrg 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"' 7119ae545d91Smrg 7120ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7121ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7122ae545d91Smrg 7123ae545d91Smrg # Archives containing C++ object files must be created using 7124ae545d91Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7125ae545d91Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7126ae545d91Smrg ;; 7127ae545d91Smrg icpc* | ecpc* ) 7128ae545d91Smrg # Intel C++ 7129ae545d91Smrg with_gnu_ld=yes 7130ae545d91Smrg # version 8.0 and above of icpc choke on multiply defined symbols 7131ae545d91Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 7132ae545d91Smrg # earlier do not add the objects themselves. 7133ae545d91Smrg case `$CC -V 2>&1` in 7134ae545d91Smrg *"Version 7."*) 7135ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7136ae545d91Smrg _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' 7137ae545d91Smrg ;; 7138ae545d91Smrg *) # Version 8.0 or newer 7139ae545d91Smrg tmp_idyn= 7140ae545d91Smrg case $host_cpu in 7141ae545d91Smrg ia64*) tmp_idyn=' -i_dynamic';; 7142ae545d91Smrg esac 7143ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7144ae545d91Smrg _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' 7145ae545d91Smrg ;; 7146ae545d91Smrg esac 7147ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7148ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7149ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7150ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7151ae545d91Smrg ;; 7152ae545d91Smrg pgCC* | pgcpp*) 7153ae545d91Smrg # Portland Group C++ compiler 7154ae545d91Smrg case `$CC -V` in 7155ae545d91Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7156ae545d91Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7157ae545d91Smrg rm -rf $tpldir~ 7158ae545d91Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7159ae545d91Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7160ae545d91Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7161ae545d91Smrg rm -rf $tpldir~ 7162ae545d91Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7163ae545d91Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7164ae545d91Smrg $RANLIB $oldlib' 7165ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7166ae545d91Smrg rm -rf $tpldir~ 7167ae545d91Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7168ae545d91Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7169ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7170ae545d91Smrg rm -rf $tpldir~ 7171ae545d91Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7172ae545d91Smrg $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' 7173ae545d91Smrg ;; 7174ae545d91Smrg *) # Version 6 and above use weak symbols 7175ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7176ae545d91Smrg _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' 7177ae545d91Smrg ;; 7178ae545d91Smrg esac 7179ae545d91Smrg 7180ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7181ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7182ae545d91Smrg _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' 7183ae545d91Smrg ;; 7184ae545d91Smrg cxx*) 7185ae545d91Smrg # Compaq C++ 7186ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7187ae545d91Smrg _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' 7188ae545d91Smrg 7189ae545d91Smrg runpath_var=LD_RUN_PATH 7190ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7191ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7192ae545d91Smrg 7193ae545d91Smrg # Commands to make compiler produce verbose output that lists 7194ae545d91Smrg # what "hidden" libraries, object files and flags are used when 7195ae545d91Smrg # linking a shared library. 7196ae545d91Smrg # 7197ae545d91Smrg # There doesn't appear to be a way to prevent this compiler from 7198ae545d91Smrg # explicitly linking system object files so we need to strip them 7199ae545d91Smrg # from the output so that they don't get included in the library 7200ae545d91Smrg # dependencies. 7201ae545d91Smrg 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' 7202ae545d91Smrg ;; 7203ae545d91Smrg xl* | mpixl* | bgxl*) 7204ae545d91Smrg # IBM XL 8.0 on PPC, with GNU ld 7205ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7206ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7207ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7208ae545d91Smrg if test yes = "$supports_anon_versioning"; then 7209ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7210ae545d91Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7211ae545d91Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7212ae545d91Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7213ae545d91Smrg fi 7214ae545d91Smrg ;; 7215ae545d91Smrg *) 7216ae545d91Smrg case `$CC -V 2>&1 | $SED 5q` in 7217ae545d91Smrg *Sun\ C*) 7218ae545d91Smrg # Sun C++ 5.9 7219ae545d91Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7220ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7221ae545d91Smrg _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' 7222ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7223ae545d91Smrg _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' 7224ae545d91Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7225ae545d91Smrg 7226ae545d91Smrg # Not sure whether something based on 7227ae545d91Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7228ae545d91Smrg # would be better. 7229ae545d91Smrg output_verbose_link_cmd='func_echo_all' 7230ae545d91Smrg 7231ae545d91Smrg # Archives containing C++ object files must be created using 7232ae545d91Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7233ae545d91Smrg # necessary to make sure instantiated templates are included 7234ae545d91Smrg # in the archive. 7235ae545d91Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7236ae545d91Smrg ;; 7237ae545d91Smrg esac 7238ae545d91Smrg ;; 7239ae545d91Smrg esac 7240ae545d91Smrg ;; 7241ae545d91Smrg 7242ae545d91Smrg lynxos*) 7243ae545d91Smrg # FIXME: insert proper C++ library support 7244ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7245ae545d91Smrg ;; 7246ae545d91Smrg 7247ae545d91Smrg m88k*) 7248ae545d91Smrg # FIXME: insert proper C++ library support 7249ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7250ae545d91Smrg ;; 7251ae545d91Smrg 7252ae545d91Smrg mvs*) 7253ae545d91Smrg case $cc_basename in 7254ae545d91Smrg cxx*) 7255ae545d91Smrg # FIXME: insert proper C++ library support 7256ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7257ae545d91Smrg ;; 7258ae545d91Smrg *) 7259ae545d91Smrg # FIXME: insert proper C++ library support 7260ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7261ae545d91Smrg ;; 7262ae545d91Smrg esac 7263ae545d91Smrg ;; 7264ae545d91Smrg 7265ae545d91Smrg *-mlibc) 7266ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7267ae545d91Smrg ;; 7268ae545d91Smrg 7269ae545d91Smrg netbsd*) 7270ae545d91Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7271ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7272ae545d91Smrg wlarc= 7273ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7274ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7275ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7276ae545d91Smrg fi 7277ae545d91Smrg # Workaround some broken pre-1.5 toolchains 7278ae545d91Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7279ae545d91Smrg ;; 7280ae545d91Smrg 7281ae545d91Smrg *nto* | *qnx*) 7282ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7283ae545d91Smrg ;; 7284ae545d91Smrg 7285ae545d91Smrg openbsd*) 7286ae545d91Smrg if test -f /usr/libexec/ld.so; then 7287ae545d91Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7288ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7289ae545d91Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7290ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7291ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7292ae545d91Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7293ae545d91Smrg _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' 7294ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7295ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7296ae545d91Smrg fi 7297ae545d91Smrg output_verbose_link_cmd=func_echo_all 7298ae545d91Smrg else 7299ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7300ae545d91Smrg fi 7301ae545d91Smrg ;; 7302ae545d91Smrg 7303ae545d91Smrg osf3* | osf4* | osf5*) 7304ae545d91Smrg case $cc_basename in 7305ae545d91Smrg KCC*) 7306ae545d91Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7307ae545d91Smrg 7308ae545d91Smrg # KCC will only create a shared library if the output file 7309ae545d91Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7310ae545d91Smrg # to its proper name (with version) after linking. 7311ae545d91Smrg _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' 7312ae545d91Smrg 7313ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7314ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7315ae545d91Smrg 7316ae545d91Smrg # Archives containing C++ object files must be created using 7317ae545d91Smrg # the KAI C++ compiler. 7318ae545d91Smrg case $host in 7319ae545d91Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7320ae545d91Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7321ae545d91Smrg esac 7322ae545d91Smrg ;; 7323ae545d91Smrg RCC*) 7324ae545d91Smrg # Rational C++ 2.4.1 7325ae545d91Smrg # FIXME: insert proper C++ library support 7326ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7327ae545d91Smrg ;; 7328ae545d91Smrg cxx*) 7329ae545d91Smrg case $host in 7330ae545d91Smrg osf3*) 7331ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7332ae545d91Smrg _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' 7333ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7334ae545d91Smrg ;; 7335ae545d91Smrg *) 7336ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7337ae545d91Smrg _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' 7338ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7339ae545d91Smrg echo "-hidden">> $lib.exp~ 7340ae545d91Smrg $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~ 7341ae545d91Smrg $RM $lib.exp' 7342ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7343ae545d91Smrg ;; 7344ae545d91Smrg esac 7345ae545d91Smrg 7346ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7347ae545d91Smrg 7348ae545d91Smrg # Commands to make compiler produce verbose output that lists 7349ae545d91Smrg # what "hidden" libraries, object files and flags are used when 7350ae545d91Smrg # linking a shared library. 7351ae545d91Smrg # 7352ae545d91Smrg # There doesn't appear to be a way to prevent this compiler from 7353ae545d91Smrg # explicitly linking system object files so we need to strip them 7354ae545d91Smrg # from the output so that they don't get included in the library 7355ae545d91Smrg # dependencies. 7356ae545d91Smrg 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"' 7357ae545d91Smrg ;; 7358ae545d91Smrg *) 7359ae545d91Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7360ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7361ae545d91Smrg case $host in 7362ae545d91Smrg osf3*) 7363ae545d91Smrg _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' 7364ae545d91Smrg ;; 7365ae545d91Smrg *) 7366ae545d91Smrg _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' 7367ae545d91Smrg ;; 7368ae545d91Smrg esac 7369ae545d91Smrg 7370ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7371ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7372ae545d91Smrg 7373ae545d91Smrg # Commands to make compiler produce verbose output that lists 7374ae545d91Smrg # what "hidden" libraries, object files and flags are used when 7375ae545d91Smrg # linking a shared library. 7376ae545d91Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' 7377ae545d91Smrg 7378ae545d91Smrg else 7379ae545d91Smrg # FIXME: insert proper C++ library support 7380ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7381ae545d91Smrg fi 7382ae545d91Smrg ;; 7383ae545d91Smrg esac 7384ae545d91Smrg ;; 7385ae545d91Smrg 7386ae545d91Smrg psos*) 7387ae545d91Smrg # FIXME: insert proper C++ library support 7388ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7389ae545d91Smrg ;; 7390ae545d91Smrg 7391ae545d91Smrg serenity*) 7392ae545d91Smrg ;; 7393ae545d91Smrg 7394ae545d91Smrg sunos4*) 7395ae545d91Smrg case $cc_basename in 7396ae545d91Smrg CC*) 7397ae545d91Smrg # Sun C++ 4.x 7398ae545d91Smrg # FIXME: insert proper C++ library support 7399ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7400ae545d91Smrg ;; 7401ae545d91Smrg lcc*) 7402ae545d91Smrg # Lucid 7403ae545d91Smrg # FIXME: insert proper C++ library support 7404ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7405ae545d91Smrg ;; 7406ae545d91Smrg *) 7407ae545d91Smrg # FIXME: insert proper C++ library support 7408ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7409ae545d91Smrg ;; 7410ae545d91Smrg esac 7411ae545d91Smrg ;; 7412ae545d91Smrg 7413ae545d91Smrg solaris*) 7414ae545d91Smrg case $cc_basename in 7415ae545d91Smrg CC* | sunCC*) 7416ae545d91Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7417ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7418ae545d91Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7419ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7420ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7421ae545d91Smrg $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' 7422ae545d91Smrg 7423ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7424ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7425ae545d91Smrg case $host_os in 7426ae545d91Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7427ae545d91Smrg *) 7428ae545d91Smrg # The compiler driver will combine and reorder linker options, 7429ae545d91Smrg # but understands '-z linker_flag'. 7430ae545d91Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7431ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7432ae545d91Smrg ;; 7433ae545d91Smrg esac 7434ae545d91Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7435ae545d91Smrg 7436ae545d91Smrg output_verbose_link_cmd='func_echo_all' 7437ae545d91Smrg 7438ae545d91Smrg # Archives containing C++ object files must be created using 7439ae545d91Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7440ae545d91Smrg # necessary to make sure instantiated templates are included 7441ae545d91Smrg # in the archive. 7442ae545d91Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7443ae545d91Smrg ;; 7444ae545d91Smrg gcx*) 7445ae545d91Smrg # Green Hills C++ Compiler 7446ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7447ae545d91Smrg 7448ae545d91Smrg # The C++ compiler must be used to create the archive. 7449ae545d91Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7450ae545d91Smrg ;; 7451ae545d91Smrg *) 7452ae545d91Smrg # GNU C++ compiler with Solaris linker 7453ae545d91Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7454ae545d91Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7455ae545d91Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7456ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7457ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7458ae545d91Smrg $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' 7459ae545d91Smrg 7460ae545d91Smrg # Commands to make compiler produce verbose output that lists 7461ae545d91Smrg # what "hidden" libraries, object files and flags are used when 7462ae545d91Smrg # linking a shared library. 7463ae545d91Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' 7464ae545d91Smrg else 7465ae545d91Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 7466ae545d91Smrg # platform. 7467ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7468ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7469ae545d91Smrg $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' 7470ae545d91Smrg 7471ae545d91Smrg # Commands to make compiler produce verbose output that lists 7472ae545d91Smrg # what "hidden" libraries, object files and flags are used when 7473ae545d91Smrg # linking a shared library. 7474ae545d91Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' 7475ae545d91Smrg fi 7476ae545d91Smrg 7477ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7478ae545d91Smrg case $host_os in 7479ae545d91Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7480ae545d91Smrg *) 7481ae545d91Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7482ae545d91Smrg ;; 7483ae545d91Smrg esac 7484ae545d91Smrg fi 7485ae545d91Smrg ;; 7486ae545d91Smrg esac 7487ae545d91Smrg ;; 7488ae545d91Smrg 7489ae545d91Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7490ae545d91Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7491ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7492ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7493ae545d91Smrg runpath_var='LD_RUN_PATH' 7494ae545d91Smrg 7495ae545d91Smrg case $cc_basename in 7496ae545d91Smrg CC*) 7497ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7498ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7499ae545d91Smrg ;; 7500ae545d91Smrg *) 7501ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7502ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7503ae545d91Smrg ;; 7504ae545d91Smrg esac 7505ae545d91Smrg ;; 7506ae545d91Smrg 7507ae545d91Smrg sysv5* | sco3.2v5* | sco5v6*) 7508ae545d91Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 7509ae545d91Smrg # link with -lc, and that would cause any symbols used from libc to 7510ae545d91Smrg # always be unresolved, which means just about no library would 7511ae545d91Smrg # ever link correctly. If we're not using GNU ld we use -z text 7512ae545d91Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7513ae545d91Smrg # as -z defs. 7514ae545d91Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7515ae545d91Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7516ae545d91Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7517ae545d91Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7518ae545d91Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7519ae545d91Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7520ae545d91Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7521ae545d91Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7522ae545d91Smrg runpath_var='LD_RUN_PATH' 7523ae545d91Smrg 7524ae545d91Smrg case $cc_basename in 7525ae545d91Smrg CC*) 7526ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7527ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7528ae545d91Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7529ae545d91Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 7530ae545d91Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7531ae545d91Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 7532ae545d91Smrg ;; 7533ae545d91Smrg *) 7534ae545d91Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7535ae545d91Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7536ae545d91Smrg ;; 7537ae545d91Smrg esac 7538ae545d91Smrg ;; 7539ae545d91Smrg 7540ae545d91Smrg tandem*) 7541ae545d91Smrg case $cc_basename in 7542ae545d91Smrg NCC*) 7543ae545d91Smrg # NonStop-UX NCC 3.20 7544ae545d91Smrg # FIXME: insert proper C++ library support 7545ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7546ae545d91Smrg ;; 7547ae545d91Smrg *) 7548ae545d91Smrg # FIXME: insert proper C++ library support 7549ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7550ae545d91Smrg ;; 7551ae545d91Smrg esac 7552ae545d91Smrg ;; 7553ae545d91Smrg 7554ae545d91Smrg vxworks*) 7555ae545d91Smrg # FIXME: insert proper C++ library support 7556ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7557ae545d91Smrg ;; 7558ae545d91Smrg 7559ae545d91Smrg *) 7560ae545d91Smrg # FIXME: insert proper C++ library support 7561ae545d91Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7562ae545d91Smrg ;; 7563ae545d91Smrg esac 7564ae545d91Smrg 7565ae545d91Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7566ae545d91Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7567ae545d91Smrg 7568ae545d91Smrg _LT_TAGVAR(GCC, $1)=$GXX 7569ae545d91Smrg _LT_TAGVAR(LD, $1)=$LD 7570ae545d91Smrg 7571ae545d91Smrg ## CAVEAT EMPTOR: 7572ae545d91Smrg ## There is no encapsulation within the following macros, do not change 7573ae545d91Smrg ## the running order or otherwise move them around unless you know exactly 7574ae545d91Smrg ## what you are doing... 7575ae545d91Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7576ae545d91Smrg _LT_COMPILER_PIC($1) 7577ae545d91Smrg _LT_COMPILER_C_O($1) 7578ae545d91Smrg _LT_COMPILER_FILE_LOCKS($1) 7579ae545d91Smrg _LT_LINKER_SHLIBS($1) 7580ae545d91Smrg _LT_SYS_DYNAMIC_LINKER($1) 7581ae545d91Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7582ae545d91Smrg 7583ae545d91Smrg _LT_CONFIG($1) 7584ae545d91Smrg fi # test -n "$compiler" 7585ae545d91Smrg 7586ae545d91Smrg CC=$lt_save_CC 7587ae545d91Smrg CFLAGS=$lt_save_CFLAGS 7588ae545d91Smrg LDCXX=$LD 7589ae545d91Smrg LD=$lt_save_LD 7590ae545d91Smrg GCC=$lt_save_GCC 7591ae545d91Smrg with_gnu_ld=$lt_save_with_gnu_ld 7592ae545d91Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 7593ae545d91Smrg lt_cv_path_LD=$lt_save_path_LD 7594ae545d91Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7595ae545d91Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7596ae545d91Smrgfi # test yes != "$_lt_caught_CXX_error" 7597ae545d91Smrg 7598ae545d91SmrgAC_LANG_POP 7599ae545d91Smrg])# _LT_LANG_CXX_CONFIG 7600ae545d91Smrg 7601ae545d91Smrg 7602ae545d91Smrg# _LT_FUNC_STRIPNAME_CNF 7603ae545d91Smrg# ---------------------- 7604ae545d91Smrg# func_stripname_cnf prefix suffix name 7605ae545d91Smrg# strip PREFIX and SUFFIX off of NAME. 7606ae545d91Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7607ae545d91Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7608ae545d91Smrg# dot (in which case that matches only a dot). 7609ae545d91Smrg# 7610ae545d91Smrg# This function is identical to the (non-XSI) version of func_stripname, 7611ae545d91Smrg# except this one can be used by m4 code that may be executed by configure, 7612ae545d91Smrg# rather than the libtool script. 7613ae545d91Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7614ae545d91SmrgAC_REQUIRE([_LT_DECL_SED]) 7615ae545d91SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7616ae545d91Smrgfunc_stripname_cnf () 7617ae545d91Smrg{ 7618ae545d91Smrg case @S|@2 in 7619ae545d91Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7620ae545d91Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7621ae545d91Smrg esac 7622ae545d91Smrg} # func_stripname_cnf 7623ae545d91Smrg])# _LT_FUNC_STRIPNAME_CNF 7624ae545d91Smrg 7625ae545d91Smrg 7626ae545d91Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7627ae545d91Smrg# --------------------------------- 7628ae545d91Smrg# Figure out "hidden" library dependencies from verbose 7629ae545d91Smrg# compiler output when linking a shared library. 7630ae545d91Smrg# Parse the compiler output and extract the necessary 7631ae545d91Smrg# objects, libraries and library flags. 7632ae545d91Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7633ae545d91Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7634ae545d91SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7635ae545d91Smrg# Dependencies to place before and after the object being linked: 7636ae545d91Smrg_LT_TAGVAR(predep_objects, $1)= 7637ae545d91Smrg_LT_TAGVAR(postdep_objects, $1)= 7638ae545d91Smrg_LT_TAGVAR(predeps, $1)= 7639ae545d91Smrg_LT_TAGVAR(postdeps, $1)= 7640ae545d91Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7641ae545d91Smrg 7642ae545d91Smrgdnl we can't use the lt_simple_compile_test_code here, 7643ae545d91Smrgdnl because it contains code intended for an executable, 7644ae545d91Smrgdnl not a library. It's possible we should let each 7645ae545d91Smrgdnl tag define a new lt_????_link_test_code variable, 7646ae545d91Smrgdnl but it's only used here... 7647ae545d91Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7648ae545d91Smrgint a; 7649ae545d91Smrgvoid foo (void) { a = 0; } 7650ae545d91Smrg_LT_EOF 7651ae545d91Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7652ae545d91Smrgclass Foo 7653ae545d91Smrg{ 7654ae545d91Smrgpublic: 7655ae545d91Smrg Foo (void) { a = 0; } 7656ae545d91Smrgprivate: 7657ae545d91Smrg int a; 7658ae545d91Smrg}; 7659ae545d91Smrg_LT_EOF 7660ae545d91Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7661ae545d91Smrg subroutine foo 7662ae545d91Smrg implicit none 7663ae545d91Smrg integer*4 a 7664ae545d91Smrg a=0 7665ae545d91Smrg return 7666ae545d91Smrg end 7667ae545d91Smrg_LT_EOF 7668ae545d91Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7669ae545d91Smrg subroutine foo 7670ae545d91Smrg implicit none 7671ae545d91Smrg integer a 7672ae545d91Smrg a=0 7673ae545d91Smrg return 7674ae545d91Smrg end 7675ae545d91Smrg_LT_EOF 7676ae545d91Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7677ae545d91Smrgpublic class foo { 7678ae545d91Smrg private int a; 7679ae545d91Smrg public void bar (void) { 7680ae545d91Smrg a = 0; 7681ae545d91Smrg } 7682ae545d91Smrg}; 7683ae545d91Smrg_LT_EOF 7684ae545d91Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7685ae545d91Smrgpackage foo 7686ae545d91Smrgfunc foo() { 7687ae545d91Smrg} 7688ae545d91Smrg_LT_EOF 7689ae545d91Smrg]) 7690ae545d91Smrg 7691ae545d91Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 7692ae545d91Smrgcase "$CC $CFLAGS " in #( 7693ae545d91Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7694ae545d91Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7695ae545d91Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7696ae545d91Smrgesac 7697ae545d91Smrg 7698ae545d91Smrgdnl Parse the compiler output and extract the necessary 7699ae545d91Smrgdnl objects, libraries and library flags. 7700ae545d91Smrgif AC_TRY_EVAL(ac_compile); then 7701ae545d91Smrg # Parse the compiler output and extract the necessary 7702ae545d91Smrg # objects, libraries and library flags. 7703ae545d91Smrg 7704ae545d91Smrg # Sentinel used to keep track of whether or not we are before 7705ae545d91Smrg # the conftest object file. 7706ae545d91Smrg pre_test_object_deps_done=no 7707ae545d91Smrg 7708ae545d91Smrg for p in `eval "$output_verbose_link_cmd"`; do 7709ae545d91Smrg case $prev$p in 7710ae545d91Smrg 7711ae545d91Smrg -L* | -R* | -l*) 7712ae545d91Smrg # Some compilers place space between "-{L,R,l}" and the path. 7713ae545d91Smrg # Remove the space. 7714ae545d91Smrg if test x-L = x"$p" || 7715ae545d91Smrg test x-R = x"$p" || 7716ae545d91Smrg test x-l = x"$p"; then 7717ae545d91Smrg prev=$p 7718ae545d91Smrg continue 7719ae545d91Smrg fi 7720ae545d91Smrg 7721ae545d91Smrg # Expand the sysroot to ease extracting the directories later. 7722ae545d91Smrg if test -z "$prev"; then 7723ae545d91Smrg case $p in 7724ae545d91Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7725ae545d91Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7726ae545d91Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7727ae545d91Smrg esac 7728ae545d91Smrg fi 7729ae545d91Smrg case $p in 7730ae545d91Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7731ae545d91Smrg esac 7732ae545d91Smrg if test no = "$pre_test_object_deps_done"; then 7733ae545d91Smrg case $prev in 7734ae545d91Smrg -L | -R) 7735ae545d91Smrg # Internal compiler library paths should come after those 7736ae545d91Smrg # provided the user. The postdeps already come after the 7737ae545d91Smrg # user supplied libs so there is no need to process them. 7738ae545d91Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7739ae545d91Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7740ae545d91Smrg else 7741ae545d91Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7742ae545d91Smrg fi 7743ae545d91Smrg ;; 7744ae545d91Smrg # The "-l" case would never come before the object being 7745ae545d91Smrg # linked, so don't bother handling this case. 7746ae545d91Smrg esac 7747ae545d91Smrg else 7748ae545d91Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7749ae545d91Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 7750ae545d91Smrg else 7751ae545d91Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7752ae545d91Smrg fi 7753ae545d91Smrg fi 7754ae545d91Smrg prev= 7755ae545d91Smrg ;; 7756ae545d91Smrg 7757ae545d91Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 7758ae545d91Smrg *.$objext) 7759ae545d91Smrg # This assumes that the test object file only shows up 7760ae545d91Smrg # once in the compiler output. 7761ae545d91Smrg if test "$p" = "conftest.$objext"; then 7762ae545d91Smrg pre_test_object_deps_done=yes 7763ae545d91Smrg continue 7764ae545d91Smrg fi 7765ae545d91Smrg 7766ae545d91Smrg if test no = "$pre_test_object_deps_done"; then 7767ae545d91Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7768ae545d91Smrg _LT_TAGVAR(predep_objects, $1)=$p 7769ae545d91Smrg else 7770ae545d91Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7771ae545d91Smrg fi 7772ae545d91Smrg else 7773ae545d91Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7774ae545d91Smrg _LT_TAGVAR(postdep_objects, $1)=$p 7775ae545d91Smrg else 7776ae545d91Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7777ae545d91Smrg fi 7778ae545d91Smrg fi 7779ae545d91Smrg ;; 7780ae545d91Smrg 7781ae545d91Smrg *) ;; # Ignore the rest. 7782ae545d91Smrg 7783ae545d91Smrg esac 7784ae545d91Smrg done 7785ae545d91Smrg 7786ae545d91Smrg # Clean up. 7787ae545d91Smrg rm -f a.out a.exe 7788ae545d91Smrgelse 7789ae545d91Smrg echo "libtool.m4: error: problem compiling $1 test program" 7790ae545d91Smrgfi 7791ae545d91Smrg 7792ae545d91Smrg$RM -f confest.$objext 7793ae545d91SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7794ae545d91Smrg 7795ae545d91Smrg# PORTME: override above test on systems where it is broken 7796ae545d91Smrgm4_if([$1], [CXX], 7797ae545d91Smrg[case $host_os in 7798ae545d91Smrginterix[[3-9]]*) 7799ae545d91Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7800ae545d91Smrg # hack all around it, let's just trust "g++" to DTRT. 7801ae545d91Smrg _LT_TAGVAR(predep_objects,$1)= 7802ae545d91Smrg _LT_TAGVAR(postdep_objects,$1)= 7803ae545d91Smrg _LT_TAGVAR(postdeps,$1)= 7804ae545d91Smrg ;; 7805ae545d91Smrgesac 7806ae545d91Smrg]) 7807ae545d91Smrg 7808ae545d91Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 7809ae545d91Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7810ae545d91Smrgesac 7811ae545d91Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7812ae545d91Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7813ae545d91Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7814ae545d91Smrgfi 7815ae545d91Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7816ae545d91Smrg [The directories searched by this compiler when creating a shared library]) 7817ae545d91Smrg_LT_TAGDECL([], [predep_objects], [1], 7818ae545d91Smrg [Dependencies to place before and after the objects being linked to 7819ae545d91Smrg create a shared library]) 7820ae545d91Smrg_LT_TAGDECL([], [postdep_objects], [1]) 7821ae545d91Smrg_LT_TAGDECL([], [predeps], [1]) 7822ae545d91Smrg_LT_TAGDECL([], [postdeps], [1]) 7823ae545d91Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7824ae545d91Smrg [The library search path used internally by the compiler when linking 7825ae545d91Smrg a shared library]) 7826ae545d91Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7827ae545d91Smrg 7828ae545d91Smrg 7829ae545d91Smrg# _LT_LANG_F77_CONFIG([TAG]) 7830ae545d91Smrg# -------------------------- 7831ae545d91Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 7832ae545d91Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7833ae545d91Smrg# to write the compiler configuration to 'libtool'. 7834ae545d91Smrgm4_defun([_LT_LANG_F77_CONFIG], 7835ae545d91Smrg[AC_LANG_PUSH(Fortran 77) 7836ae545d91Smrgif test -z "$F77" || test no = "$F77"; then 7837ae545d91Smrg _lt_disable_F77=yes 7838ae545d91Smrgfi 7839ae545d91Smrg 7840ae545d91Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7841ae545d91Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7842ae545d91Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7843ae545d91Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7844ae545d91Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7845ae545d91Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7846ae545d91Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7847ae545d91Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7848ae545d91Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7849ae545d91Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7850ae545d91Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7851ae545d91Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7852ae545d91Smrg_LT_TAGVAR(module_cmds, $1)= 7853ae545d91Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7854ae545d91Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7855ae545d91Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7856ae545d91Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7857ae545d91Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7858ae545d91Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7859ae545d91Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7860ae545d91Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7861ae545d91Smrg 7862ae545d91Smrg# Source file extension for f77 test sources. 7863ae545d91Smrgac_ext=f 7864ae545d91Smrg 7865ae545d91Smrg# Object file extension for compiled f77 test sources. 7866ae545d91Smrgobjext=o 7867ae545d91Smrg_LT_TAGVAR(objext, $1)=$objext 7868ae545d91Smrg 7869ae545d91Smrg# No sense in running all these tests if we already determined that 7870ae545d91Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 7871ae545d91Smrg# are currently assumed to apply to all compilers on this platform, 7872ae545d91Smrg# and will be corrupted by setting them based on a non-working compiler. 7873ae545d91Smrgif test yes != "$_lt_disable_F77"; then 7874ae545d91Smrg # Code to be used in simple compile tests 7875ae545d91Smrg lt_simple_compile_test_code="\ 7876ae545d91Smrg subroutine t 7877ae545d91Smrg return 7878ae545d91Smrg end 7879ae545d91Smrg" 7880ae545d91Smrg 7881ae545d91Smrg # Code to be used in simple link tests 7882ae545d91Smrg lt_simple_link_test_code="\ 7883ae545d91Smrg program t 7884ae545d91Smrg end 7885ae545d91Smrg" 7886ae545d91Smrg 7887ae545d91Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7888ae545d91Smrg _LT_TAG_COMPILER 7889ae545d91Smrg 7890ae545d91Smrg # save warnings/boilerplate of simple test code 7891ae545d91Smrg _LT_COMPILER_BOILERPLATE 7892ae545d91Smrg _LT_LINKER_BOILERPLATE 7893ae545d91Smrg 7894ae545d91Smrg # Allow CC to be a program name with arguments. 7895ae545d91Smrg lt_save_CC=$CC 7896ae545d91Smrg lt_save_GCC=$GCC 7897ae545d91Smrg lt_save_CFLAGS=$CFLAGS 7898ae545d91Smrg CC=${F77-"f77"} 7899ae545d91Smrg CFLAGS=$FFLAGS 7900ae545d91Smrg compiler=$CC 7901ae545d91Smrg _LT_TAGVAR(compiler, $1)=$CC 7902ae545d91Smrg _LT_CC_BASENAME([$compiler]) 7903ae545d91Smrg GCC=$G77 7904ae545d91Smrg if test -n "$compiler"; then 7905ae545d91Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7906ae545d91Smrg AC_MSG_RESULT([$can_build_shared]) 7907ae545d91Smrg 7908ae545d91Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7909ae545d91Smrg test no = "$can_build_shared" && enable_shared=no 7910ae545d91Smrg 7911ae545d91Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7912ae545d91Smrg # are all built from PIC. 7913ae545d91Smrg case $host_os in 7914ae545d91Smrg aix3*) 7915ae545d91Smrg test yes = "$enable_shared" && enable_static=no 7916ae545d91Smrg if test -n "$RANLIB"; then 7917ae545d91Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7918ae545d91Smrg postinstall_cmds='$RANLIB $lib' 7919ae545d91Smrg fi 7920ae545d91Smrg ;; 7921ae545d91Smrg aix[[4-9]]*) 7922ae545d91Smrg if test ia64 != "$host_cpu"; then 7923ae545d91Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7924ae545d91Smrg yes,aix,yes) ;; # shared object as lib.so file only 7925ae545d91Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7926ae545d91Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7927ae545d91Smrg esac 7928ae545d91Smrg fi 7929ae545d91Smrg ;; 7930ae545d91Smrg esac 7931ae545d91Smrg AC_MSG_RESULT([$enable_shared]) 7932ae545d91Smrg 7933ae545d91Smrg AC_MSG_CHECKING([whether to build static libraries]) 7934ae545d91Smrg # Make sure either enable_shared or enable_static is yes. 7935ae545d91Smrg test yes = "$enable_shared" || enable_static=yes 7936ae545d91Smrg AC_MSG_RESULT([$enable_static]) 7937ae545d91Smrg 7938ae545d91Smrg _LT_TAGVAR(GCC, $1)=$G77 7939ae545d91Smrg _LT_TAGVAR(LD, $1)=$LD 7940ae545d91Smrg 7941ae545d91Smrg ## CAVEAT EMPTOR: 7942ae545d91Smrg ## There is no encapsulation within the following macros, do not change 7943ae545d91Smrg ## the running order or otherwise move them around unless you know exactly 7944ae545d91Smrg ## what you are doing... 7945ae545d91Smrg _LT_COMPILER_PIC($1) 7946ae545d91Smrg _LT_COMPILER_C_O($1) 7947ae545d91Smrg _LT_COMPILER_FILE_LOCKS($1) 7948ae545d91Smrg _LT_LINKER_SHLIBS($1) 7949ae545d91Smrg _LT_SYS_DYNAMIC_LINKER($1) 7950ae545d91Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7951ae545d91Smrg 7952ae545d91Smrg _LT_CONFIG($1) 7953ae545d91Smrg fi # test -n "$compiler" 7954ae545d91Smrg 7955ae545d91Smrg GCC=$lt_save_GCC 7956ae545d91Smrg CC=$lt_save_CC 7957ae545d91Smrg CFLAGS=$lt_save_CFLAGS 7958ae545d91Smrgfi # test yes != "$_lt_disable_F77" 7959ae545d91Smrg 7960ae545d91SmrgAC_LANG_POP 7961ae545d91Smrg])# _LT_LANG_F77_CONFIG 7962ae545d91Smrg 7963ae545d91Smrg 7964ae545d91Smrg# _LT_LANG_FC_CONFIG([TAG]) 7965ae545d91Smrg# ------------------------- 7966ae545d91Smrg# Ensure that the configuration variables for a Fortran compiler are 7967ae545d91Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7968ae545d91Smrg# to write the compiler configuration to 'libtool'. 7969ae545d91Smrgm4_defun([_LT_LANG_FC_CONFIG], 7970ae545d91Smrg[AC_LANG_PUSH(Fortran) 7971ae545d91Smrg 7972ae545d91Smrgif test -z "$FC" || test no = "$FC"; then 7973ae545d91Smrg _lt_disable_FC=yes 7974ae545d91Smrgfi 7975ae545d91Smrg 7976ae545d91Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7977ae545d91Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7978ae545d91Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7979ae545d91Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7980ae545d91Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7981ae545d91Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7982ae545d91Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7983ae545d91Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7984ae545d91Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7985ae545d91Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7986ae545d91Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7987ae545d91Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7988ae545d91Smrg_LT_TAGVAR(module_cmds, $1)= 7989ae545d91Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7990ae545d91Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7991ae545d91Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7992ae545d91Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7993ae545d91Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7994ae545d91Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7995ae545d91Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7996ae545d91Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7997ae545d91Smrg 7998ae545d91Smrg# Source file extension for fc test sources. 7999ae545d91Smrgac_ext=${ac_fc_srcext-f} 8000ae545d91Smrg 8001ae545d91Smrg# Object file extension for compiled fc test sources. 8002ae545d91Smrgobjext=o 8003ae545d91Smrg_LT_TAGVAR(objext, $1)=$objext 8004ae545d91Smrg 8005ae545d91Smrg# No sense in running all these tests if we already determined that 8006ae545d91Smrg# the FC compiler isn't working. Some variables (like enable_shared) 8007ae545d91Smrg# are currently assumed to apply to all compilers on this platform, 8008ae545d91Smrg# and will be corrupted by setting them based on a non-working compiler. 8009ae545d91Smrgif test yes != "$_lt_disable_FC"; then 8010ae545d91Smrg # Code to be used in simple compile tests 8011ae545d91Smrg lt_simple_compile_test_code="\ 8012ae545d91Smrg subroutine t 8013ae545d91Smrg return 8014ae545d91Smrg end 8015ae545d91Smrg" 8016ae545d91Smrg 8017ae545d91Smrg # Code to be used in simple link tests 8018ae545d91Smrg lt_simple_link_test_code="\ 8019ae545d91Smrg program t 8020ae545d91Smrg end 8021ae545d91Smrg" 8022ae545d91Smrg 8023ae545d91Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 8024ae545d91Smrg _LT_TAG_COMPILER 8025ae545d91Smrg 8026ae545d91Smrg # save warnings/boilerplate of simple test code 8027ae545d91Smrg _LT_COMPILER_BOILERPLATE 8028ae545d91Smrg _LT_LINKER_BOILERPLATE 8029ae545d91Smrg 8030ae545d91Smrg # Allow CC to be a program name with arguments. 8031ae545d91Smrg lt_save_CC=$CC 8032ae545d91Smrg lt_save_GCC=$GCC 8033ae545d91Smrg lt_save_CFLAGS=$CFLAGS 8034ae545d91Smrg CC=${FC-"f95"} 8035ae545d91Smrg CFLAGS=$FCFLAGS 8036ae545d91Smrg compiler=$CC 8037ae545d91Smrg GCC=$ac_cv_fc_compiler_gnu 8038ae545d91Smrg 8039ae545d91Smrg _LT_TAGVAR(compiler, $1)=$CC 8040ae545d91Smrg _LT_CC_BASENAME([$compiler]) 8041ae545d91Smrg 8042ae545d91Smrg if test -n "$compiler"; then 8043ae545d91Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 8044ae545d91Smrg AC_MSG_RESULT([$can_build_shared]) 8045ae545d91Smrg 8046ae545d91Smrg AC_MSG_CHECKING([whether to build shared libraries]) 8047ae545d91Smrg test no = "$can_build_shared" && enable_shared=no 8048ae545d91Smrg 8049ae545d91Smrg # On AIX, shared libraries and static libraries use the same namespace, and 8050ae545d91Smrg # are all built from PIC. 8051ae545d91Smrg case $host_os in 8052ae545d91Smrg aix3*) 8053ae545d91Smrg test yes = "$enable_shared" && enable_static=no 8054ae545d91Smrg if test -n "$RANLIB"; then 8055ae545d91Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 8056ae545d91Smrg postinstall_cmds='$RANLIB $lib' 8057ae545d91Smrg fi 8058ae545d91Smrg ;; 8059ae545d91Smrg aix[[4-9]]*) 8060ae545d91Smrg if test ia64 != "$host_cpu"; then 8061ae545d91Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 8062ae545d91Smrg yes,aix,yes) ;; # shared object as lib.so file only 8063ae545d91Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 8064ae545d91Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 8065ae545d91Smrg esac 8066ae545d91Smrg fi 8067ae545d91Smrg ;; 8068ae545d91Smrg esac 8069ae545d91Smrg AC_MSG_RESULT([$enable_shared]) 8070ae545d91Smrg 8071ae545d91Smrg AC_MSG_CHECKING([whether to build static libraries]) 8072ae545d91Smrg # Make sure either enable_shared or enable_static is yes. 8073ae545d91Smrg test yes = "$enable_shared" || enable_static=yes 8074ae545d91Smrg AC_MSG_RESULT([$enable_static]) 8075ae545d91Smrg 8076ae545d91Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 8077ae545d91Smrg _LT_TAGVAR(LD, $1)=$LD 8078ae545d91Smrg 8079ae545d91Smrg ## CAVEAT EMPTOR: 8080ae545d91Smrg ## There is no encapsulation within the following macros, do not change 8081ae545d91Smrg ## the running order or otherwise move them around unless you know exactly 8082ae545d91Smrg ## what you are doing... 8083ae545d91Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 8084ae545d91Smrg _LT_COMPILER_PIC($1) 8085ae545d91Smrg _LT_COMPILER_C_O($1) 8086ae545d91Smrg _LT_COMPILER_FILE_LOCKS($1) 8087ae545d91Smrg _LT_LINKER_SHLIBS($1) 8088ae545d91Smrg _LT_SYS_DYNAMIC_LINKER($1) 8089ae545d91Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8090ae545d91Smrg 8091ae545d91Smrg _LT_CONFIG($1) 8092ae545d91Smrg fi # test -n "$compiler" 8093ae545d91Smrg 8094ae545d91Smrg GCC=$lt_save_GCC 8095ae545d91Smrg CC=$lt_save_CC 8096ae545d91Smrg CFLAGS=$lt_save_CFLAGS 8097ae545d91Smrgfi # test yes != "$_lt_disable_FC" 8098ae545d91Smrg 8099ae545d91SmrgAC_LANG_POP 8100ae545d91Smrg])# _LT_LANG_FC_CONFIG 8101ae545d91Smrg 8102ae545d91Smrg 8103ae545d91Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 8104ae545d91Smrg# -------------------------- 8105ae545d91Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 8106ae545d91Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8107ae545d91Smrg# to write the compiler configuration to 'libtool'. 8108ae545d91Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 8109ae545d91Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 8110ae545d91SmrgAC_LANG_SAVE 8111ae545d91Smrg 8112ae545d91Smrg# Source file extension for Java test sources. 8113ae545d91Smrgac_ext=java 8114ae545d91Smrg 8115ae545d91Smrg# Object file extension for compiled Java test sources. 8116ae545d91Smrgobjext=o 8117ae545d91Smrg_LT_TAGVAR(objext, $1)=$objext 8118ae545d91Smrg 8119ae545d91Smrg# Code to be used in simple compile tests 8120ae545d91Smrglt_simple_compile_test_code="class foo {}" 8121ae545d91Smrg 8122ae545d91Smrg# Code to be used in simple link tests 8123ae545d91Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8124ae545d91Smrg 8125ae545d91Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8126ae545d91Smrg_LT_TAG_COMPILER 8127ae545d91Smrg 8128ae545d91Smrg# save warnings/boilerplate of simple test code 8129ae545d91Smrg_LT_COMPILER_BOILERPLATE 8130ae545d91Smrg_LT_LINKER_BOILERPLATE 8131ae545d91Smrg 8132ae545d91Smrg# Allow CC to be a program name with arguments. 8133ae545d91Smrglt_save_CC=$CC 8134ae545d91Smrglt_save_CFLAGS=$CFLAGS 8135ae545d91Smrglt_save_GCC=$GCC 8136ae545d91SmrgGCC=yes 8137ae545d91SmrgCC=${GCJ-"gcj"} 8138ae545d91SmrgCFLAGS=$GCJFLAGS 8139ae545d91Smrgcompiler=$CC 8140ae545d91Smrg_LT_TAGVAR(compiler, $1)=$CC 8141ae545d91Smrg_LT_TAGVAR(LD, $1)=$LD 8142ae545d91Smrg_LT_CC_BASENAME([$compiler]) 8143ae545d91Smrg 8144ae545d91Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 8145ae545d91Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8146ae545d91Smrg 8147ae545d91Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8148ae545d91Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8149ae545d91Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8150ae545d91Smrg 8151ae545d91Smrg## CAVEAT EMPTOR: 8152ae545d91Smrg## There is no encapsulation within the following macros, do not change 8153ae545d91Smrg## the running order or otherwise move them around unless you know exactly 8154ae545d91Smrg## what you are doing... 8155ae545d91Smrgif test -n "$compiler"; then 8156ae545d91Smrg _LT_COMPILER_NO_RTTI($1) 8157ae545d91Smrg _LT_COMPILER_PIC($1) 8158ae545d91Smrg _LT_COMPILER_C_O($1) 8159ae545d91Smrg _LT_COMPILER_FILE_LOCKS($1) 8160ae545d91Smrg _LT_LINKER_SHLIBS($1) 8161ae545d91Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8162ae545d91Smrg 8163ae545d91Smrg _LT_CONFIG($1) 8164ae545d91Smrgfi 8165ae545d91Smrg 8166ae545d91SmrgAC_LANG_RESTORE 8167ae545d91Smrg 8168ae545d91SmrgGCC=$lt_save_GCC 8169ae545d91SmrgCC=$lt_save_CC 8170ae545d91SmrgCFLAGS=$lt_save_CFLAGS 8171ae545d91Smrg])# _LT_LANG_GCJ_CONFIG 8172ae545d91Smrg 8173ae545d91Smrg 8174ae545d91Smrg# _LT_LANG_GO_CONFIG([TAG]) 8175ae545d91Smrg# -------------------------- 8176ae545d91Smrg# Ensure that the configuration variables for the GNU Go compiler 8177ae545d91Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8178ae545d91Smrg# to write the compiler configuration to 'libtool'. 8179ae545d91Smrgm4_defun([_LT_LANG_GO_CONFIG], 8180ae545d91Smrg[AC_REQUIRE([LT_PROG_GO])dnl 8181ae545d91SmrgAC_LANG_SAVE 8182ae545d91Smrg 8183ae545d91Smrg# Source file extension for Go test sources. 8184ae545d91Smrgac_ext=go 8185ae545d91Smrg 8186ae545d91Smrg# Object file extension for compiled Go test sources. 8187ae545d91Smrgobjext=o 8188ae545d91Smrg_LT_TAGVAR(objext, $1)=$objext 8189ae545d91Smrg 8190ae545d91Smrg# Code to be used in simple compile tests 8191ae545d91Smrglt_simple_compile_test_code="package main; func main() { }" 8192ae545d91Smrg 8193ae545d91Smrg# Code to be used in simple link tests 8194ae545d91Smrglt_simple_link_test_code='package main; func main() { }' 8195ae545d91Smrg 8196ae545d91Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8197ae545d91Smrg_LT_TAG_COMPILER 8198ae545d91Smrg 8199ae545d91Smrg# save warnings/boilerplate of simple test code 8200ae545d91Smrg_LT_COMPILER_BOILERPLATE 8201ae545d91Smrg_LT_LINKER_BOILERPLATE 8202ae545d91Smrg 8203ae545d91Smrg# Allow CC to be a program name with arguments. 8204ae545d91Smrglt_save_CC=$CC 8205ae545d91Smrglt_save_CFLAGS=$CFLAGS 8206ae545d91Smrglt_save_GCC=$GCC 8207ae545d91SmrgGCC=yes 8208ae545d91SmrgCC=${GOC-"gccgo"} 8209ae545d91SmrgCFLAGS=$GOFLAGS 8210ae545d91Smrgcompiler=$CC 8211ae545d91Smrg_LT_TAGVAR(compiler, $1)=$CC 8212ae545d91Smrg_LT_TAGVAR(LD, $1)=$LD 8213ae545d91Smrg_LT_CC_BASENAME([$compiler]) 8214ae545d91Smrg 8215ae545d91Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 8216ae545d91Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8217ae545d91Smrg 8218ae545d91Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8219ae545d91Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8220ae545d91Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8221ae545d91Smrg 8222ae545d91Smrg## CAVEAT EMPTOR: 8223ae545d91Smrg## There is no encapsulation within the following macros, do not change 8224ae545d91Smrg## the running order or otherwise move them around unless you know exactly 8225ae545d91Smrg## what you are doing... 8226ae545d91Smrgif test -n "$compiler"; then 8227ae545d91Smrg _LT_COMPILER_NO_RTTI($1) 8228ae545d91Smrg _LT_COMPILER_PIC($1) 8229ae545d91Smrg _LT_COMPILER_C_O($1) 8230ae545d91Smrg _LT_COMPILER_FILE_LOCKS($1) 8231ae545d91Smrg _LT_LINKER_SHLIBS($1) 8232ae545d91Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8233ae545d91Smrg 8234ae545d91Smrg _LT_CONFIG($1) 8235ae545d91Smrgfi 8236ae545d91Smrg 8237ae545d91SmrgAC_LANG_RESTORE 8238ae545d91Smrg 8239ae545d91SmrgGCC=$lt_save_GCC 8240ae545d91SmrgCC=$lt_save_CC 8241ae545d91SmrgCFLAGS=$lt_save_CFLAGS 8242ae545d91Smrg])# _LT_LANG_GO_CONFIG 8243ae545d91Smrg 8244ae545d91Smrg 8245ae545d91Smrg# _LT_LANG_RC_CONFIG([TAG]) 8246ae545d91Smrg# ------------------------- 8247ae545d91Smrg# Ensure that the configuration variables for the Windows resource compiler 8248ae545d91Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8249ae545d91Smrg# to write the compiler configuration to 'libtool'. 8250ae545d91Smrgm4_defun([_LT_LANG_RC_CONFIG], 8251ae545d91Smrg[AC_REQUIRE([LT_PROG_RC])dnl 8252ae545d91SmrgAC_LANG_SAVE 8253ae545d91Smrg 8254ae545d91Smrg# Source file extension for RC test sources. 8255ae545d91Smrgac_ext=rc 8256ae545d91Smrg 8257ae545d91Smrg# Object file extension for compiled RC test sources. 8258ae545d91Smrgobjext=o 8259ae545d91Smrg_LT_TAGVAR(objext, $1)=$objext 8260ae545d91Smrg 8261ae545d91Smrg# Code to be used in simple compile tests 8262ae545d91Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8263ae545d91Smrg 8264ae545d91Smrg# Code to be used in simple link tests 8265ae545d91Smrglt_simple_link_test_code=$lt_simple_compile_test_code 8266ae545d91Smrg 8267ae545d91Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8268ae545d91Smrg_LT_TAG_COMPILER 8269ae545d91Smrg 8270ae545d91Smrg# save warnings/boilerplate of simple test code 8271ae545d91Smrg_LT_COMPILER_BOILERPLATE 8272ae545d91Smrg_LT_LINKER_BOILERPLATE 8273ae545d91Smrg 8274ae545d91Smrg# Allow CC to be a program name with arguments. 8275ae545d91Smrglt_save_CC=$CC 8276ae545d91Smrglt_save_CFLAGS=$CFLAGS 8277ae545d91Smrglt_save_GCC=$GCC 8278ae545d91SmrgGCC= 8279ae545d91SmrgCC=${RC-"windres"} 8280ae545d91SmrgCFLAGS= 8281ae545d91Smrgcompiler=$CC 8282ae545d91Smrg_LT_TAGVAR(compiler, $1)=$CC 8283ae545d91Smrg_LT_CC_BASENAME([$compiler]) 8284ae545d91Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8285ae545d91Smrg 8286ae545d91Smrgif test -n "$compiler"; then 8287ae545d91Smrg : 8288ae545d91Smrg _LT_CONFIG($1) 8289ae545d91Smrgfi 8290ae545d91Smrg 8291ae545d91SmrgGCC=$lt_save_GCC 8292ae545d91SmrgAC_LANG_RESTORE 8293ae545d91SmrgCC=$lt_save_CC 8294ae545d91SmrgCFLAGS=$lt_save_CFLAGS 8295ae545d91Smrg])# _LT_LANG_RC_CONFIG 8296ae545d91Smrg 8297ae545d91Smrg 8298ae545d91Smrg# LT_PROG_GCJ 8299ae545d91Smrg# ----------- 8300ae545d91SmrgAC_DEFUN([LT_PROG_GCJ], 8301ae545d91Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8302ae545d91Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8303ae545d91Smrg [AC_CHECK_TOOL(GCJ, gcj,) 8304ae545d91Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8305ae545d91Smrg AC_SUBST(GCJFLAGS)])])[]dnl 8306ae545d91Smrg]) 8307ae545d91Smrg 8308ae545d91Smrg# Old name: 8309ae545d91SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8310ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 8311ae545d91Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8312ae545d91Smrg 8313ae545d91Smrg 8314ae545d91Smrg# LT_PROG_GO 8315ae545d91Smrg# ---------- 8316ae545d91SmrgAC_DEFUN([LT_PROG_GO], 8317ae545d91Smrg[AC_CHECK_TOOL(GOC, gccgo,) 8318ae545d91Smrg]) 8319ae545d91Smrg 8320ae545d91Smrg 8321ae545d91Smrg# LT_PROG_RC 8322ae545d91Smrg# ---------- 8323ae545d91SmrgAC_DEFUN([LT_PROG_RC], 8324ae545d91Smrg[AC_CHECK_TOOL(RC, windres,) 8325ae545d91Smrg]) 8326ae545d91Smrg 8327ae545d91Smrg# Old name: 8328ae545d91SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8329ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 8330ae545d91Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8331ae545d91Smrg 8332ae545d91Smrg 8333ae545d91Smrg# _LT_DECL_EGREP 8334ae545d91Smrg# -------------- 8335ae545d91Smrg# If we don't have a new enough Autoconf to choose the best grep 8336ae545d91Smrg# available, choose the one first in the user's PATH. 8337ae545d91Smrgm4_defun([_LT_DECL_EGREP], 8338ae545d91Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8339ae545d91SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8340ae545d91Smrgtest -z "$GREP" && GREP=grep 8341ae545d91Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8342ae545d91Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8343ae545d91Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8344ae545d91Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8345ae545d91SmrgAC_SUBST([GREP]) 8346ae545d91Smrg]) 8347ae545d91Smrg 8348ae545d91Smrg 8349ae545d91Smrg# _LT_DECL_OBJDUMP 8350ae545d91Smrg# -------------- 8351ae545d91Smrg# If we don't have a new enough Autoconf to choose the best objdump 8352ae545d91Smrg# available, choose the one first in the user's PATH. 8353ae545d91Smrgm4_defun([_LT_DECL_OBJDUMP], 8354ae545d91Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8355ae545d91Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8356ae545d91Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8357ae545d91SmrgAC_SUBST([OBJDUMP]) 8358ae545d91Smrg]) 8359ae545d91Smrg 8360ae545d91Smrg# _LT_DECL_DLLTOOL 8361ae545d91Smrg# ---------------- 8362ae545d91Smrg# Ensure DLLTOOL variable is set. 8363ae545d91Smrgm4_defun([_LT_DECL_DLLTOOL], 8364ae545d91Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8365ae545d91Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8366ae545d91Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8367ae545d91SmrgAC_SUBST([DLLTOOL]) 8368ae545d91Smrg]) 8369ae545d91Smrg 8370ae545d91Smrg# _LT_DECL_FILECMD 8371ae545d91Smrg# ---------------- 8372ae545d91Smrg# Check for a file(cmd) program that can be used to detect file type and magic 8373ae545d91Smrgm4_defun([_LT_DECL_FILECMD], 8374ae545d91Smrg[AC_CHECK_PROG([FILECMD], [file], [file], [:]) 8375ae545d91Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 8376ae545d91Smrg])# _LD_DECL_FILECMD 8377ae545d91Smrg 8378ae545d91Smrg# _LT_DECL_SED 8379ae545d91Smrg# ------------ 8380ae545d91Smrg# Check for a fully-functional sed program, that truncates 8381ae545d91Smrg# as few characters as possible. Prefer GNU sed if found. 8382ae545d91Smrgm4_defun([_LT_DECL_SED], 8383ae545d91Smrg[AC_PROG_SED 8384ae545d91Smrgtest -z "$SED" && SED=sed 8385ae545d91SmrgXsed="$SED -e 1s/^X//" 8386ae545d91Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8387ae545d91Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8388ae545d91Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8389ae545d91Smrg])# _LT_DECL_SED 8390ae545d91Smrgdnl aclocal-1.4 backwards compatibility: 8391ae545d91Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8392ae545d91Smrg 8393ae545d91Smrg 8394ae545d91Smrg# _LT_CHECK_SHELL_FEATURES 8395ae545d91Smrg# ------------------------ 8396ae545d91Smrg# Find out whether the shell is Bourne or XSI compatible, 8397ae545d91Smrg# or has some other useful features. 8398ae545d91Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8399ae545d91Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8400ae545d91Smrg lt_unset=unset 8401ae545d91Smrgelse 8402ae545d91Smrg lt_unset=false 8403ae545d91Smrgfi 8404ae545d91Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8405ae545d91Smrg 8406ae545d91Smrg# test EBCDIC or ASCII 8407ae545d91Smrgcase `echo X|tr X '\101'` in 8408ae545d91Smrg A) # ASCII based system 8409ae545d91Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8410ae545d91Smrg lt_SP2NL='tr \040 \012' 8411ae545d91Smrg lt_NL2SP='tr \015\012 \040\040' 8412ae545d91Smrg ;; 8413ae545d91Smrg *) # EBCDIC based system 8414ae545d91Smrg lt_SP2NL='tr \100 \n' 8415ae545d91Smrg lt_NL2SP='tr \r\n \100\100' 8416ae545d91Smrg ;; 8417ae545d91Smrgesac 8418ae545d91Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8419ae545d91Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8420ae545d91Smrg])# _LT_CHECK_SHELL_FEATURES 8421ae545d91Smrg 8422ae545d91Smrg 8423ae545d91Smrg# _LT_PATH_CONVERSION_FUNCTIONS 8424ae545d91Smrg# ----------------------------- 8425ae545d91Smrg# Determine what file name conversion functions should be used by 8426ae545d91Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8427ae545d91Smrg# for certain cross-compile configurations and native mingw. 8428ae545d91Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8429ae545d91Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8430ae545d91SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8431ae545d91SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 8432ae545d91SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8433ae545d91Smrg[case $host in 8434ae545d91Smrg *-*-mingw* ) 8435ae545d91Smrg case $build in 8436ae545d91Smrg *-*-mingw* | *-*-windows* ) # actually msys 8437ae545d91Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8438ae545d91Smrg ;; 8439ae545d91Smrg *-*-cygwin* ) 8440ae545d91Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8441ae545d91Smrg ;; 8442ae545d91Smrg * ) # otherwise, assume *nix 8443ae545d91Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8444ae545d91Smrg ;; 8445ae545d91Smrg esac 8446ae545d91Smrg ;; 8447ae545d91Smrg *-*-cygwin* ) 8448ae545d91Smrg case $build in 8449ae545d91Smrg *-*-mingw* | *-*-windows* ) # actually msys 8450ae545d91Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8451ae545d91Smrg ;; 8452ae545d91Smrg *-*-cygwin* ) 8453ae545d91Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8454ae545d91Smrg ;; 8455ae545d91Smrg * ) # otherwise, assume *nix 8456ae545d91Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8457ae545d91Smrg ;; 8458ae545d91Smrg esac 8459ae545d91Smrg ;; 8460ae545d91Smrg * ) # unhandled hosts (and "normal" native builds) 8461ae545d91Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8462ae545d91Smrg ;; 8463ae545d91Smrgesac 8464ae545d91Smrg]) 8465ae545d91Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 8466ae545d91SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8467ae545d91Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8468ae545d91Smrg [0], [convert $build file names to $host format])dnl 8469ae545d91Smrg 8470ae545d91SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8471ae545d91SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8472ae545d91Smrg[#assume ordinary cross tools, or native build. 8473ae545d91Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 8474ae545d91Smrgcase $host in 8475ae545d91Smrg *-*-mingw* | *-*-windows* ) 8476ae545d91Smrg case $build in 8477ae545d91Smrg *-*-mingw* | *-*-windows* ) # actually msys 8478ae545d91Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8479ae545d91Smrg ;; 8480ae545d91Smrg esac 8481ae545d91Smrg ;; 8482ae545d91Smrgesac 8483ae545d91Smrg]) 8484ae545d91Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8485ae545d91SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8486ae545d91Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8487ae545d91Smrg [0], [convert $build files to toolchain format])dnl 8488ae545d91Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8489