1255365Sdes# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2255365Sdes# 3255365Sdes# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 4255365Sdes# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 5255365Sdes# Foundation, Inc. 6255365Sdes# Written by Gordon Matzigkeit, 1996 7255365Sdes# 8255365Sdes# This file is free software; the Free Software Foundation gives 9255365Sdes# unlimited permission to copy and/or distribute it, with or without 10255365Sdes# modifications, as long as this notice is preserved. 11255365Sdes 12255365Sdesm4_define([_LT_COPYING], [dnl 13255365Sdes# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 14255365Sdes# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 15255365Sdes# Foundation, Inc. 16255365Sdes# Written by Gordon Matzigkeit, 1996 17255365Sdes# 18255365Sdes# This file is part of GNU Libtool. 19255365Sdes# 20255365Sdes# GNU Libtool is free software; you can redistribute it and/or 21255365Sdes# modify it under the terms of the GNU General Public License as 22255365Sdes# published by the Free Software Foundation; either version 2 of 23255365Sdes# the License, or (at your option) any later version. 24255365Sdes# 25255365Sdes# As a special exception to the GNU General Public License, 26255365Sdes# if you distribute this file as part of a program or library that 27255365Sdes# is built using GNU Libtool, you may include this file under the 28255365Sdes# same distribution terms that you use for the rest of that program. 29255365Sdes# 30255365Sdes# GNU Libtool is distributed in the hope that it will be useful, 31255365Sdes# but WITHOUT ANY WARRANTY; without even the implied warranty of 32255365Sdes# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 33255365Sdes# GNU General Public License for more details. 34255365Sdes# 35255365Sdes# You should have received a copy of the GNU General Public License 36255365Sdes# along with GNU Libtool; see the file COPYING. If not, a copy 37255365Sdes# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 38255365Sdes# obtained by writing to the Free Software Foundation, Inc., 39255365Sdes# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 40255365Sdes]) 41255365Sdes 42255365Sdes# serial 57 LT_INIT 43255365Sdes 44255365Sdes 45255365Sdes# LT_PREREQ(VERSION) 46255365Sdes# ------------------ 47255365Sdes# Complain and exit if this libtool version is less that VERSION. 48255365Sdesm4_defun([LT_PREREQ], 49255365Sdes[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 50255365Sdes [m4_default([$3], 51255365Sdes [m4_fatal([Libtool version $1 or higher is required], 52255365Sdes 63)])], 53255365Sdes [$2])]) 54255365Sdes 55255365Sdes 56255365Sdes# _LT_CHECK_BUILDDIR 57255365Sdes# ------------------ 58255365Sdes# Complain if the absolute build directory name contains unusual characters 59255365Sdesm4_defun([_LT_CHECK_BUILDDIR], 60255365Sdes[case `pwd` in 61255365Sdes *\ * | *\ *) 62255365Sdes AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 63255365Sdesesac 64255365Sdes]) 65255365Sdes 66255365Sdes 67255365Sdes# LT_INIT([OPTIONS]) 68255365Sdes# ------------------ 69255365SdesAC_DEFUN([LT_INIT], 70255365Sdes[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 71255365SdesAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 72255365SdesAC_BEFORE([$0], [LT_LANG])dnl 73255365SdesAC_BEFORE([$0], [LT_OUTPUT])dnl 74255365SdesAC_BEFORE([$0], [LTDL_INIT])dnl 75255365Sdesm4_require([_LT_CHECK_BUILDDIR])dnl 76255365Sdes 77255365Sdesdnl Autoconf doesn't catch unexpanded LT_ macros by default: 78255365Sdesm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 79255365Sdesm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 80255365Sdesdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 81255365Sdesdnl unless we require an AC_DEFUNed macro: 82255365SdesAC_REQUIRE([LTOPTIONS_VERSION])dnl 83255365SdesAC_REQUIRE([LTSUGAR_VERSION])dnl 84255365SdesAC_REQUIRE([LTVERSION_VERSION])dnl 85255365SdesAC_REQUIRE([LTOBSOLETE_VERSION])dnl 86255365Sdesm4_require([_LT_PROG_LTMAIN])dnl 87255365Sdes 88255365Sdes_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 89255365Sdes 90255365Sdesdnl Parse OPTIONS 91255365Sdes_LT_SET_OPTIONS([$0], [$1]) 92255365Sdes 93255365Sdes# This can be used to rebuild libtool when needed 94255365SdesLIBTOOL_DEPS="$ltmain" 95255365Sdes 96255365Sdes# Always use our own libtool. 97255365SdesLIBTOOL='$(SHELL) $(top_builddir)/libtool' 98255365SdesAC_SUBST(LIBTOOL)dnl 99255365Sdes 100255365Sdes_LT_SETUP 101255365Sdes 102255365Sdes# Only expand once: 103255365Sdesm4_define([LT_INIT]) 104255365Sdes])# LT_INIT 105255365Sdes 106255365Sdes# Old names: 107255365SdesAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 108255365SdesAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 109255365Sdesdnl aclocal-1.4 backwards compatibility: 110255365Sdesdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 111255365Sdesdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 112255365Sdes 113255365Sdes 114255365Sdes# _LT_CC_BASENAME(CC) 115255365Sdes# ------------------- 116255365Sdes# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 117255365Sdesm4_defun([_LT_CC_BASENAME], 118255365Sdes[for cc_temp in $1""; do 119255365Sdes case $cc_temp in 120255365Sdes compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 121255365Sdes distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 122255365Sdes \-*) ;; 123255365Sdes *) break;; 124255365Sdes esac 125255365Sdesdone 126255365Sdescc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 127255365Sdes]) 128255365Sdes 129255365Sdes 130255365Sdes# _LT_FILEUTILS_DEFAULTS 131255365Sdes# ---------------------- 132255365Sdes# It is okay to use these file commands and assume they have been set 133255365Sdes# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 134255365Sdesm4_defun([_LT_FILEUTILS_DEFAULTS], 135255365Sdes[: ${CP="cp -f"} 136255365Sdes: ${MV="mv -f"} 137255365Sdes: ${RM="rm -f"} 138255365Sdes])# _LT_FILEUTILS_DEFAULTS 139255365Sdes 140255365Sdes 141255365Sdes# _LT_SETUP 142255365Sdes# --------- 143255365Sdesm4_defun([_LT_SETUP], 144255365Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 145255365SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl 146255365SdesAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 147255365SdesAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 148255365Sdes 149255365Sdes_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 150255365Sdesdnl 151255365Sdes_LT_DECL([], [host_alias], [0], [The host system])dnl 152255365Sdes_LT_DECL([], [host], [0])dnl 153255365Sdes_LT_DECL([], [host_os], [0])dnl 154255365Sdesdnl 155255365Sdes_LT_DECL([], [build_alias], [0], [The build system])dnl 156255365Sdes_LT_DECL([], [build], [0])dnl 157255365Sdes_LT_DECL([], [build_os], [0])dnl 158255365Sdesdnl 159255365SdesAC_REQUIRE([AC_PROG_CC])dnl 160255365SdesAC_REQUIRE([LT_PATH_LD])dnl 161255365SdesAC_REQUIRE([LT_PATH_NM])dnl 162255365Sdesdnl 163255365SdesAC_REQUIRE([AC_PROG_LN_S])dnl 164255365Sdestest -z "$LN_S" && LN_S="ln -s" 165255365Sdes_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 166255365Sdesdnl 167255365SdesAC_REQUIRE([LT_CMD_MAX_LEN])dnl 168255365Sdes_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 169255365Sdes_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 170255365Sdesdnl 171255365Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 172255365Sdesm4_require([_LT_CHECK_SHELL_FEATURES])dnl 173255365Sdesm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 174255365Sdesm4_require([_LT_CMD_RELOAD])dnl 175255365Sdesm4_require([_LT_CHECK_MAGIC_METHOD])dnl 176255365Sdesm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 177255365Sdesm4_require([_LT_CMD_OLD_ARCHIVE])dnl 178255365Sdesm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 179255365Sdesm4_require([_LT_WITH_SYSROOT])dnl 180255365Sdes 181255365Sdes_LT_CONFIG_LIBTOOL_INIT([ 182255365Sdes# See if we are running on zsh, and set the options which allow our 183255365Sdes# commands through without removal of \ escapes INIT. 184255365Sdesif test -n "\${ZSH_VERSION+set}" ; then 185255365Sdes setopt NO_GLOB_SUBST 186255365Sdesfi 187255365Sdes]) 188255365Sdesif test -n "${ZSH_VERSION+set}" ; then 189255365Sdes setopt NO_GLOB_SUBST 190255365Sdesfi 191255365Sdes 192255365Sdes_LT_CHECK_OBJDIR 193255365Sdes 194255365Sdesm4_require([_LT_TAG_COMPILER])dnl 195255365Sdes 196255365Sdescase $host_os in 197255365Sdesaix3*) 198255365Sdes # AIX sometimes has problems with the GCC collect2 program. For some 199255365Sdes # reason, if we set the COLLECT_NAMES environment variable, the problems 200255365Sdes # vanish in a puff of smoke. 201255365Sdes if test "X${COLLECT_NAMES+set}" != Xset; then 202255365Sdes COLLECT_NAMES= 203255365Sdes export COLLECT_NAMES 204255365Sdes fi 205255365Sdes ;; 206255365Sdesesac 207255365Sdes 208255365Sdes# Global variables: 209255365Sdesofile=libtool 210255365Sdescan_build_shared=yes 211255365Sdes 212255365Sdes# All known linkers require a `.a' archive for static linking (except MSVC, 213255365Sdes# which needs '.lib'). 214255365Sdeslibext=a 215255365Sdes 216255365Sdeswith_gnu_ld="$lt_cv_prog_gnu_ld" 217255365Sdes 218255365Sdesold_CC="$CC" 219255365Sdesold_CFLAGS="$CFLAGS" 220255365Sdes 221255365Sdes# Set sane defaults for various variables 222255365Sdestest -z "$CC" && CC=cc 223255365Sdestest -z "$LTCC" && LTCC=$CC 224255365Sdestest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 225255365Sdestest -z "$LD" && LD=ld 226255365Sdestest -z "$ac_objext" && ac_objext=o 227255365Sdes 228255365Sdes_LT_CC_BASENAME([$compiler]) 229255365Sdes 230255365Sdes# Only perform the check for file, if the check method requires it 231255365Sdestest -z "$MAGIC_CMD" && MAGIC_CMD=file 232255365Sdescase $deplibs_check_method in 233255365Sdesfile_magic*) 234255365Sdes if test "$file_magic_cmd" = '$MAGIC_CMD'; then 235255365Sdes _LT_PATH_MAGIC 236255365Sdes fi 237255365Sdes ;; 238255365Sdesesac 239255365Sdes 240255365Sdes# Use C for the default configuration in the libtool script 241255365SdesLT_SUPPORTED_TAG([CC]) 242255365Sdes_LT_LANG_C_CONFIG 243255365Sdes_LT_LANG_DEFAULT_CONFIG 244255365Sdes_LT_CONFIG_COMMANDS 245255365Sdes])# _LT_SETUP 246255365Sdes 247255365Sdes 248255365Sdes# _LT_PREPARE_SED_QUOTE_VARS 249255365Sdes# -------------------------- 250255365Sdes# Define a few sed substitution that help us do robust quoting. 251255365Sdesm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 252255365Sdes[# Backslashify metacharacters that are still active within 253255365Sdes# double-quoted strings. 254255365Sdessed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 255255365Sdes 256255365Sdes# Same as above, but do not quote variable references. 257255365Sdesdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 258255365Sdes 259255365Sdes# Sed substitution to delay expansion of an escaped shell variable in a 260255365Sdes# double_quote_subst'ed string. 261255365Sdesdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 262255365Sdes 263255365Sdes# Sed substitution to delay expansion of an escaped single quote. 264255365Sdesdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 265255365Sdes 266255365Sdes# Sed substitution to avoid accidental globbing in evaled expressions 267255365Sdesno_glob_subst='s/\*/\\\*/g' 268255365Sdes]) 269255365Sdes 270255365Sdes# _LT_PROG_LTMAIN 271255365Sdes# --------------- 272255365Sdes# Note that this code is called both from `configure', and `config.status' 273255365Sdes# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 274255365Sdes# `config.status' has no value for ac_aux_dir unless we are using Automake, 275255365Sdes# so we pass a copy along to make sure it has a sensible value anyway. 276255365Sdesm4_defun([_LT_PROG_LTMAIN], 277255365Sdes[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 278255365Sdes_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 279255365Sdesltmain="$ac_aux_dir/ltmain.sh" 280255365Sdes])# _LT_PROG_LTMAIN 281255365Sdes 282255365Sdes 283255365Sdes## ------------------------------------- ## 284255365Sdes## Accumulate code for creating libtool. ## 285255365Sdes## ------------------------------------- ## 286255365Sdes 287255365Sdes# So that we can recreate a full libtool script including additional 288255365Sdes# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 289255365Sdes# in macros and then make a single call at the end using the `libtool' 290255365Sdes# label. 291255365Sdes 292255365Sdes 293255365Sdes# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 294255365Sdes# ---------------------------------------- 295255365Sdes# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 296255365Sdesm4_define([_LT_CONFIG_LIBTOOL_INIT], 297255365Sdes[m4_ifval([$1], 298255365Sdes [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 299255365Sdes [$1 300255365Sdes])])]) 301255365Sdes 302255365Sdes# Initialize. 303255365Sdesm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 304255365Sdes 305255365Sdes 306255365Sdes# _LT_CONFIG_LIBTOOL([COMMANDS]) 307255365Sdes# ------------------------------ 308255365Sdes# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 309255365Sdesm4_define([_LT_CONFIG_LIBTOOL], 310255365Sdes[m4_ifval([$1], 311255365Sdes [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 312255365Sdes [$1 313255365Sdes])])]) 314255365Sdes 315255365Sdes# Initialize. 316255365Sdesm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 317255365Sdes 318255365Sdes 319255365Sdes# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 320255365Sdes# ----------------------------------------------------- 321255365Sdesm4_defun([_LT_CONFIG_SAVE_COMMANDS], 322255365Sdes[_LT_CONFIG_LIBTOOL([$1]) 323255365Sdes_LT_CONFIG_LIBTOOL_INIT([$2]) 324255365Sdes]) 325255365Sdes 326255365Sdes 327255365Sdes# _LT_FORMAT_COMMENT([COMMENT]) 328255365Sdes# ----------------------------- 329255365Sdes# Add leading comment marks to the start of each line, and a trailing 330255365Sdes# full-stop to the whole comment if one is not present already. 331255365Sdesm4_define([_LT_FORMAT_COMMENT], 332255365Sdes[m4_ifval([$1], [ 333255365Sdesm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 334255365Sdes [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 335255365Sdes)]) 336255365Sdes 337255365Sdes 338255365Sdes 339255365Sdes## ------------------------ ## 340255365Sdes## FIXME: Eliminate VARNAME ## 341255365Sdes## ------------------------ ## 342255365Sdes 343255365Sdes 344255365Sdes# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 345255365Sdes# ------------------------------------------------------------------- 346255365Sdes# CONFIGNAME is the name given to the value in the libtool script. 347255365Sdes# VARNAME is the (base) name used in the configure script. 348255365Sdes# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 349255365Sdes# VARNAME. Any other value will be used directly. 350255365Sdesm4_define([_LT_DECL], 351255365Sdes[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 352255365Sdes [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 353255365Sdes [m4_ifval([$1], [$1], [$2])]) 354255365Sdes lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 355255365Sdes m4_ifval([$4], 356255365Sdes [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 357255365Sdes lt_dict_add_subkey([lt_decl_dict], [$2], 358255365Sdes [tagged?], [m4_ifval([$5], [yes], [no])])]) 359255365Sdes]) 360255365Sdes 361255365Sdes 362255365Sdes# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 363255365Sdes# -------------------------------------------------------- 364255365Sdesm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 365255365Sdes 366255365Sdes 367255365Sdes# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 368255365Sdes# ------------------------------------------------ 369255365Sdesm4_define([lt_decl_tag_varnames], 370255365Sdes[_lt_decl_filter([tagged?], [yes], $@)]) 371255365Sdes 372255365Sdes 373255365Sdes# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 374255365Sdes# --------------------------------------------------------- 375255365Sdesm4_define([_lt_decl_filter], 376255365Sdes[m4_case([$#], 377255365Sdes [0], [m4_fatal([$0: too few arguments: $#])], 378255365Sdes [1], [m4_fatal([$0: too few arguments: $#: $1])], 379255365Sdes [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 380255365Sdes [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 381255365Sdes [lt_dict_filter([lt_decl_dict], $@)])[]dnl 382255365Sdes]) 383255365Sdes 384255365Sdes 385255365Sdes# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 386255365Sdes# -------------------------------------------------- 387255365Sdesm4_define([lt_decl_quote_varnames], 388255365Sdes[_lt_decl_filter([value], [1], $@)]) 389255365Sdes 390255365Sdes 391255365Sdes# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 392255365Sdes# --------------------------------------------------- 393255365Sdesm4_define([lt_decl_dquote_varnames], 394255365Sdes[_lt_decl_filter([value], [2], $@)]) 395255365Sdes 396255365Sdes 397255365Sdes# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 398255365Sdes# --------------------------------------------------- 399255365Sdesm4_define([lt_decl_varnames_tagged], 400255365Sdes[m4_assert([$# <= 2])dnl 401255365Sdes_$0(m4_quote(m4_default([$1], [[, ]])), 402255365Sdes m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 403255365Sdes m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 404255365Sdesm4_define([_lt_decl_varnames_tagged], 405255365Sdes[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 406255365Sdes 407255365Sdes 408255365Sdes# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 409255365Sdes# ------------------------------------------------ 410255365Sdesm4_define([lt_decl_all_varnames], 411255365Sdes[_$0(m4_quote(m4_default([$1], [[, ]])), 412255365Sdes m4_if([$2], [], 413255365Sdes m4_quote(lt_decl_varnames), 414255365Sdes m4_quote(m4_shift($@))))[]dnl 415255365Sdes]) 416255365Sdesm4_define([_lt_decl_all_varnames], 417255365Sdes[lt_join($@, lt_decl_varnames_tagged([$1], 418255365Sdes lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 419255365Sdes]) 420255365Sdes 421255365Sdes 422255365Sdes# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 423255365Sdes# ------------------------------------ 424255365Sdes# Quote a variable value, and forward it to `config.status' so that its 425255365Sdes# declaration there will have the same value as in `configure'. VARNAME 426255365Sdes# must have a single quote delimited value for this to work. 427255365Sdesm4_define([_LT_CONFIG_STATUS_DECLARE], 428255365Sdes[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 429255365Sdes 430255365Sdes 431255365Sdes# _LT_CONFIG_STATUS_DECLARATIONS 432255365Sdes# ------------------------------ 433255365Sdes# We delimit libtool config variables with single quotes, so when 434255365Sdes# we write them to config.status, we have to be sure to quote all 435255365Sdes# embedded single quotes properly. In configure, this macro expands 436255365Sdes# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 437255365Sdes# 438255365Sdes# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 439255365Sdesm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 440255365Sdes[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 441255365Sdes [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 442255365Sdes 443255365Sdes 444255365Sdes# _LT_LIBTOOL_TAGS 445255365Sdes# ---------------- 446255365Sdes# Output comment and list of tags supported by the script 447255365Sdesm4_defun([_LT_LIBTOOL_TAGS], 448255365Sdes[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 449255365Sdesavailable_tags="_LT_TAGS"dnl 450255365Sdes]) 451255365Sdes 452255365Sdes 453255365Sdes# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 454255365Sdes# ----------------------------------- 455255365Sdes# Extract the dictionary values for VARNAME (optionally with TAG) and 456255365Sdes# expand to a commented shell variable setting: 457255365Sdes# 458255365Sdes# # Some comment about what VAR is for. 459255365Sdes# visible_name=$lt_internal_name 460255365Sdesm4_define([_LT_LIBTOOL_DECLARE], 461255365Sdes[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 462255365Sdes [description])))[]dnl 463255365Sdesm4_pushdef([_libtool_name], 464255365Sdes m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 465255365Sdesm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 466255365Sdes [0], [_libtool_name=[$]$1], 467255365Sdes [1], [_libtool_name=$lt_[]$1], 468255365Sdes [2], [_libtool_name=$lt_[]$1], 469255365Sdes [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 470255365Sdesm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 471255365Sdes]) 472255365Sdes 473255365Sdes 474255365Sdes# _LT_LIBTOOL_CONFIG_VARS 475255365Sdes# ----------------------- 476255365Sdes# Produce commented declarations of non-tagged libtool config variables 477255365Sdes# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 478255365Sdes# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 479255365Sdes# section) are produced by _LT_LIBTOOL_TAG_VARS. 480255365Sdesm4_defun([_LT_LIBTOOL_CONFIG_VARS], 481255365Sdes[m4_foreach([_lt_var], 482255365Sdes m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 483255365Sdes [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 484255365Sdes 485255365Sdes 486255365Sdes# _LT_LIBTOOL_TAG_VARS(TAG) 487255365Sdes# ------------------------- 488255365Sdesm4_define([_LT_LIBTOOL_TAG_VARS], 489255365Sdes[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 490255365Sdes [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 491255365Sdes 492255365Sdes 493255365Sdes# _LT_TAGVAR(VARNAME, [TAGNAME]) 494255365Sdes# ------------------------------ 495255365Sdesm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 496255365Sdes 497255365Sdes 498255365Sdes# _LT_CONFIG_COMMANDS 499255365Sdes# ------------------- 500255365Sdes# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 501255365Sdes# variables for single and double quote escaping we saved from calls 502255365Sdes# to _LT_DECL, we can put quote escaped variables declarations 503255365Sdes# into `config.status', and then the shell code to quote escape them in 504255365Sdes# for loops in `config.status'. Finally, any additional code accumulated 505255365Sdes# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 506255365Sdesm4_defun([_LT_CONFIG_COMMANDS], 507255365Sdes[AC_PROVIDE_IFELSE([LT_OUTPUT], 508255365Sdes dnl If the libtool generation code has been placed in $CONFIG_LT, 509255365Sdes dnl instead of duplicating it all over again into config.status, 510255365Sdes dnl then we will have config.status run $CONFIG_LT later, so it 511255365Sdes dnl needs to know what name is stored there: 512255365Sdes [AC_CONFIG_COMMANDS([libtool], 513255365Sdes [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 514255365Sdes dnl If the libtool generation code is destined for config.status, 515255365Sdes dnl expand the accumulated commands and init code now: 516255365Sdes [AC_CONFIG_COMMANDS([libtool], 517255365Sdes [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 518255365Sdes])#_LT_CONFIG_COMMANDS 519255365Sdes 520255365Sdes 521255365Sdes# Initialize. 522255365Sdesm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 523255365Sdes[ 524255365Sdes 525255365Sdes# The HP-UX ksh and POSIX shell print the target directory to stdout 526255365Sdes# if CDPATH is set. 527255365Sdes(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 528255365Sdes 529255365Sdessed_quote_subst='$sed_quote_subst' 530255365Sdesdouble_quote_subst='$double_quote_subst' 531255365Sdesdelay_variable_subst='$delay_variable_subst' 532255365Sdes_LT_CONFIG_STATUS_DECLARATIONS 533255365SdesLTCC='$LTCC' 534255365SdesLTCFLAGS='$LTCFLAGS' 535255365Sdescompiler='$compiler_DEFAULT' 536255365Sdes 537255365Sdes# A function that is used when there is no print builtin or printf. 538255365Sdesfunc_fallback_echo () 539255365Sdes{ 540255365Sdes eval 'cat <<_LTECHO_EOF 541255365Sdes\$[]1 542255365Sdes_LTECHO_EOF' 543255365Sdes} 544255365Sdes 545255365Sdes# Quote evaled strings. 546255365Sdesfor var in lt_decl_all_varnames([[ \ 547255365Sdes]], lt_decl_quote_varnames); do 548255365Sdes case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 549255365Sdes *[[\\\\\\\`\\"\\\$]]*) 550255365Sdes eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 551255365Sdes ;; 552255365Sdes *) 553255365Sdes eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 554255365Sdes ;; 555255365Sdes esac 556255365Sdesdone 557255365Sdes 558255365Sdes# Double-quote double-evaled strings. 559255365Sdesfor var in lt_decl_all_varnames([[ \ 560255365Sdes]], lt_decl_dquote_varnames); do 561255365Sdes case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 562255365Sdes *[[\\\\\\\`\\"\\\$]]*) 563255365Sdes eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 564255365Sdes ;; 565255365Sdes *) 566255365Sdes eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 567255365Sdes ;; 568255365Sdes esac 569255365Sdesdone 570255365Sdes 571255365Sdes_LT_OUTPUT_LIBTOOL_INIT 572255365Sdes]) 573255365Sdes 574255365Sdes# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 575255365Sdes# ------------------------------------ 576255365Sdes# Generate a child script FILE with all initialization necessary to 577255365Sdes# reuse the environment learned by the parent script, and make the 578255365Sdes# file executable. If COMMENT is supplied, it is inserted after the 579255365Sdes# `#!' sequence but before initialization text begins. After this 580255365Sdes# macro, additional text can be appended to FILE to form the body of 581255365Sdes# the child script. The macro ends with non-zero status if the 582255365Sdes# file could not be fully written (such as if the disk is full). 583255365Sdesm4_ifdef([AS_INIT_GENERATED], 584255365Sdes[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 585255365Sdes[m4_defun([_LT_GENERATED_FILE_INIT], 586255365Sdes[m4_require([AS_PREPARE])]dnl 587255365Sdes[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 588255365Sdes[lt_write_fail=0 589255365Sdescat >$1 <<_ASEOF || lt_write_fail=1 590255365Sdes#! $SHELL 591255365Sdes# Generated by $as_me. 592255365Sdes$2 593255365SdesSHELL=\${CONFIG_SHELL-$SHELL} 594255365Sdesexport SHELL 595255365Sdes_ASEOF 596255365Sdescat >>$1 <<\_ASEOF || lt_write_fail=1 597255365SdesAS_SHELL_SANITIZE 598255365Sdes_AS_PREPARE 599255365Sdesexec AS_MESSAGE_FD>&1 600255365Sdes_ASEOF 601255365Sdestest $lt_write_fail = 0 && chmod +x $1[]dnl 602255365Sdesm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 603255365Sdes 604255365Sdes# LT_OUTPUT 605255365Sdes# --------- 606255365Sdes# This macro allows early generation of the libtool script (before 607255365Sdes# AC_OUTPUT is called), incase it is used in configure for compilation 608255365Sdes# tests. 609255365SdesAC_DEFUN([LT_OUTPUT], 610255365Sdes[: ${CONFIG_LT=./config.lt} 611255365SdesAC_MSG_NOTICE([creating $CONFIG_LT]) 612255365Sdes_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 613255365Sdes[# Run this file to recreate a libtool stub with the current configuration.]) 614255365Sdes 615255365Sdescat >>"$CONFIG_LT" <<\_LTEOF 616255365Sdeslt_cl_silent=false 617255365Sdesexec AS_MESSAGE_LOG_FD>>config.log 618255365Sdes{ 619255365Sdes echo 620255365Sdes AS_BOX([Running $as_me.]) 621255365Sdes} >&AS_MESSAGE_LOG_FD 622255365Sdes 623255365Sdeslt_cl_help="\ 624255365Sdes\`$as_me' creates a local libtool stub from the current configuration, 625255365Sdesfor use in further configure time tests before the real libtool is 626255365Sdesgenerated. 627255365Sdes 628255365SdesUsage: $[0] [[OPTIONS]] 629255365Sdes 630255365Sdes -h, --help print this help, then exit 631255365Sdes -V, --version print version number, then exit 632255365Sdes -q, --quiet do not print progress messages 633255365Sdes -d, --debug don't remove temporary files 634255365Sdes 635255365SdesReport bugs to <bug-libtool@gnu.org>." 636255365Sdes 637255365Sdeslt_cl_version="\ 638255365Sdesm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 639255365Sdesm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 640255365Sdesconfigured by $[0], generated by m4_PACKAGE_STRING. 641255365Sdes 642255365SdesCopyright (C) 2011 Free Software Foundation, Inc. 643255365SdesThis config.lt script is free software; the Free Software Foundation 644255365Sdesgives unlimited permision to copy, distribute and modify it." 645255365Sdes 646255365Sdeswhile test $[#] != 0 647255365Sdesdo 648255365Sdes case $[1] in 649255365Sdes --version | --v* | -V ) 650255365Sdes echo "$lt_cl_version"; exit 0 ;; 651255365Sdes --help | --h* | -h ) 652255365Sdes echo "$lt_cl_help"; exit 0 ;; 653255365Sdes --debug | --d* | -d ) 654255365Sdes debug=: ;; 655255365Sdes --quiet | --q* | --silent | --s* | -q ) 656255365Sdes lt_cl_silent=: ;; 657255365Sdes 658255365Sdes -*) AC_MSG_ERROR([unrecognized option: $[1] 659255365SdesTry \`$[0] --help' for more information.]) ;; 660255365Sdes 661255365Sdes *) AC_MSG_ERROR([unrecognized argument: $[1] 662255365SdesTry \`$[0] --help' for more information.]) ;; 663255365Sdes esac 664255365Sdes shift 665255365Sdesdone 666255365Sdes 667255365Sdesif $lt_cl_silent; then 668255365Sdes exec AS_MESSAGE_FD>/dev/null 669255365Sdesfi 670255365Sdes_LTEOF 671255365Sdes 672255365Sdescat >>"$CONFIG_LT" <<_LTEOF 673255365Sdes_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 674255365Sdes_LTEOF 675255365Sdes 676255365Sdescat >>"$CONFIG_LT" <<\_LTEOF 677255365SdesAC_MSG_NOTICE([creating $ofile]) 678255365Sdes_LT_OUTPUT_LIBTOOL_COMMANDS 679255365SdesAS_EXIT(0) 680255365Sdes_LTEOF 681255365Sdeschmod +x "$CONFIG_LT" 682255365Sdes 683255365Sdes# configure is writing to config.log, but config.lt does its own redirection, 684255365Sdes# appending to config.log, which fails on DOS, as config.log is still kept 685255365Sdes# open by configure. Here we exec the FD to /dev/null, effectively closing 686255365Sdes# config.log, so it can be properly (re)opened and appended to by config.lt. 687255365Sdeslt_cl_success=: 688255365Sdestest "$silent" = yes && 689255365Sdes lt_config_lt_args="$lt_config_lt_args --quiet" 690255365Sdesexec AS_MESSAGE_LOG_FD>/dev/null 691255365Sdes$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 692255365Sdesexec AS_MESSAGE_LOG_FD>>config.log 693255365Sdes$lt_cl_success || AS_EXIT(1) 694255365Sdes])# LT_OUTPUT 695255365Sdes 696255365Sdes 697255365Sdes# _LT_CONFIG(TAG) 698255365Sdes# --------------- 699255365Sdes# If TAG is the built-in tag, create an initial libtool script with a 700255365Sdes# default configuration from the untagged config vars. Otherwise add code 701255365Sdes# to config.status for appending the configuration named by TAG from the 702255365Sdes# matching tagged config vars. 703255365Sdesm4_defun([_LT_CONFIG], 704255365Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 705255365Sdes_LT_CONFIG_SAVE_COMMANDS([ 706255365Sdes m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 707255365Sdes m4_if(_LT_TAG, [C], [ 708255365Sdes # See if we are running on zsh, and set the options which allow our 709255365Sdes # commands through without removal of \ escapes. 710255365Sdes if test -n "${ZSH_VERSION+set}" ; then 711255365Sdes setopt NO_GLOB_SUBST 712255365Sdes fi 713255365Sdes 714255365Sdes cfgfile="${ofile}T" 715255365Sdes trap "$RM \"$cfgfile\"; exit 1" 1 2 15 716255365Sdes $RM "$cfgfile" 717255365Sdes 718255365Sdes cat <<_LT_EOF >> "$cfgfile" 719255365Sdes#! $SHELL 720255365Sdes 721255365Sdes# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 722255365Sdes# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 723255365Sdes# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 724255365Sdes# NOTE: Changes made to this file will be lost: look at ltmain.sh. 725255365Sdes# 726255365Sdes_LT_COPYING 727255365Sdes_LT_LIBTOOL_TAGS 728255365Sdes 729255365Sdes# ### BEGIN LIBTOOL CONFIG 730255365Sdes_LT_LIBTOOL_CONFIG_VARS 731255365Sdes_LT_LIBTOOL_TAG_VARS 732255365Sdes# ### END LIBTOOL CONFIG 733255365Sdes 734255365Sdes_LT_EOF 735255365Sdes 736255365Sdes case $host_os in 737255365Sdes aix3*) 738255365Sdes cat <<\_LT_EOF >> "$cfgfile" 739255365Sdes# AIX sometimes has problems with the GCC collect2 program. For some 740255365Sdes# reason, if we set the COLLECT_NAMES environment variable, the problems 741255365Sdes# vanish in a puff of smoke. 742255365Sdesif test "X${COLLECT_NAMES+set}" != Xset; then 743255365Sdes COLLECT_NAMES= 744255365Sdes export COLLECT_NAMES 745255365Sdesfi 746255365Sdes_LT_EOF 747255365Sdes ;; 748255365Sdes esac 749255365Sdes 750255365Sdes _LT_PROG_LTMAIN 751255365Sdes 752255365Sdes # We use sed instead of cat because bash on DJGPP gets confused if 753255365Sdes # if finds mixed CR/LF and LF-only lines. Since sed operates in 754255365Sdes # text mode, it properly converts lines to CR/LF. This bash problem 755255365Sdes # is reportedly fixed, but why not run on old versions too? 756255365Sdes sed '$q' "$ltmain" >> "$cfgfile" \ 757255365Sdes || (rm -f "$cfgfile"; exit 1) 758255365Sdes 759255365Sdes _LT_PROG_REPLACE_SHELLFNS 760255365Sdes 761255365Sdes mv -f "$cfgfile" "$ofile" || 762255365Sdes (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 763255365Sdes chmod +x "$ofile" 764255365Sdes], 765255365Sdes[cat <<_LT_EOF >> "$ofile" 766255365Sdes 767255365Sdesdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 768255365Sdesdnl in a comment (ie after a #). 769255365Sdes# ### BEGIN LIBTOOL TAG CONFIG: $1 770255365Sdes_LT_LIBTOOL_TAG_VARS(_LT_TAG) 771255365Sdes# ### END LIBTOOL TAG CONFIG: $1 772255365Sdes_LT_EOF 773255365Sdes])dnl /m4_if 774255365Sdes], 775255365Sdes[m4_if([$1], [], [ 776255365Sdes PACKAGE='$PACKAGE' 777255365Sdes VERSION='$VERSION' 778255365Sdes TIMESTAMP='$TIMESTAMP' 779255365Sdes RM='$RM' 780255365Sdes ofile='$ofile'], []) 781255365Sdes])dnl /_LT_CONFIG_SAVE_COMMANDS 782255365Sdes])# _LT_CONFIG 783255365Sdes 784255365Sdes 785255365Sdes# LT_SUPPORTED_TAG(TAG) 786255365Sdes# --------------------- 787255365Sdes# Trace this macro to discover what tags are supported by the libtool 788255365Sdes# --tag option, using: 789255365Sdes# autoconf --trace 'LT_SUPPORTED_TAG:$1' 790255365SdesAC_DEFUN([LT_SUPPORTED_TAG], []) 791255365Sdes 792255365Sdes 793255365Sdes# C support is built-in for now 794255365Sdesm4_define([_LT_LANG_C_enabled], []) 795255365Sdesm4_define([_LT_TAGS], []) 796255365Sdes 797255365Sdes 798255365Sdes# LT_LANG(LANG) 799255365Sdes# ------------- 800255365Sdes# Enable libtool support for the given language if not already enabled. 801255365SdesAC_DEFUN([LT_LANG], 802255365Sdes[AC_BEFORE([$0], [LT_OUTPUT])dnl 803255365Sdesm4_case([$1], 804255365Sdes [C], [_LT_LANG(C)], 805255365Sdes [C++], [_LT_LANG(CXX)], 806255365Sdes [Go], [_LT_LANG(GO)], 807255365Sdes [Java], [_LT_LANG(GCJ)], 808255365Sdes [Fortran 77], [_LT_LANG(F77)], 809255365Sdes [Fortran], [_LT_LANG(FC)], 810255365Sdes [Windows Resource], [_LT_LANG(RC)], 811255365Sdes [m4_ifdef([_LT_LANG_]$1[_CONFIG], 812255365Sdes [_LT_LANG($1)], 813255365Sdes [m4_fatal([$0: unsupported language: "$1"])])])dnl 814255365Sdes])# LT_LANG 815255365Sdes 816255365Sdes 817255365Sdes# _LT_LANG(LANGNAME) 818255365Sdes# ------------------ 819255365Sdesm4_defun([_LT_LANG], 820255365Sdes[m4_ifdef([_LT_LANG_]$1[_enabled], [], 821255365Sdes [LT_SUPPORTED_TAG([$1])dnl 822255365Sdes m4_append([_LT_TAGS], [$1 ])dnl 823255365Sdes m4_define([_LT_LANG_]$1[_enabled], [])dnl 824255365Sdes _LT_LANG_$1_CONFIG($1)])dnl 825255365Sdes])# _LT_LANG 826255365Sdes 827255365Sdes 828255365Sdesm4_ifndef([AC_PROG_GO], [ 829255365Sdes############################################################ 830255365Sdes# NOTE: This macro has been submitted for inclusion into # 831255365Sdes# GNU Autoconf as AC_PROG_GO. When it is available in # 832255365Sdes# a released version of Autoconf we should remove this # 833255365Sdes# macro and use it instead. # 834255365Sdes############################################################ 835255365Sdesm4_defun([AC_PROG_GO], 836255365Sdes[AC_LANG_PUSH(Go)dnl 837255365SdesAC_ARG_VAR([GOC], [Go compiler command])dnl 838255365SdesAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 839255365Sdes_AC_ARG_VAR_LDFLAGS()dnl 840255365SdesAC_CHECK_TOOL(GOC, gccgo) 841255365Sdesif test -z "$GOC"; then 842255365Sdes if test -n "$ac_tool_prefix"; then 843255365Sdes AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 844255365Sdes fi 845255365Sdesfi 846255365Sdesif test -z "$GOC"; then 847255365Sdes AC_CHECK_PROG(GOC, gccgo, gccgo, false) 848255365Sdesfi 849255365Sdes])#m4_defun 850255365Sdes])#m4_ifndef 851255365Sdes 852255365Sdes 853255365Sdes# _LT_LANG_DEFAULT_CONFIG 854255365Sdes# ----------------------- 855255365Sdesm4_defun([_LT_LANG_DEFAULT_CONFIG], 856255365Sdes[AC_PROVIDE_IFELSE([AC_PROG_CXX], 857255365Sdes [LT_LANG(CXX)], 858255365Sdes [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 859255365Sdes 860255365SdesAC_PROVIDE_IFELSE([AC_PROG_F77], 861255365Sdes [LT_LANG(F77)], 862255365Sdes [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 863255365Sdes 864255365SdesAC_PROVIDE_IFELSE([AC_PROG_FC], 865255365Sdes [LT_LANG(FC)], 866255365Sdes [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 867255365Sdes 868255365Sdesdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 869255365Sdesdnl pulling things in needlessly. 870255365SdesAC_PROVIDE_IFELSE([AC_PROG_GCJ], 871255365Sdes [LT_LANG(GCJ)], 872255365Sdes [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 873255365Sdes [LT_LANG(GCJ)], 874255365Sdes [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 875255365Sdes [LT_LANG(GCJ)], 876255365Sdes [m4_ifdef([AC_PROG_GCJ], 877255365Sdes [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 878255365Sdes m4_ifdef([A][M_PROG_GCJ], 879255365Sdes [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 880255365Sdes m4_ifdef([LT_PROG_GCJ], 881255365Sdes [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 882255365Sdes 883255365SdesAC_PROVIDE_IFELSE([AC_PROG_GO], 884255365Sdes [LT_LANG(GO)], 885255365Sdes [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 886255365Sdes 887255365SdesAC_PROVIDE_IFELSE([LT_PROG_RC], 888255365Sdes [LT_LANG(RC)], 889255365Sdes [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 890255365Sdes])# _LT_LANG_DEFAULT_CONFIG 891255365Sdes 892255365Sdes# Obsolete macros: 893255365SdesAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 894255365SdesAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 895255365SdesAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 896255365SdesAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 897255365SdesAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 898255365Sdesdnl aclocal-1.4 backwards compatibility: 899255365Sdesdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 900255365Sdesdnl AC_DEFUN([AC_LIBTOOL_F77], []) 901255365Sdesdnl AC_DEFUN([AC_LIBTOOL_FC], []) 902255365Sdesdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 903255365Sdesdnl AC_DEFUN([AC_LIBTOOL_RC], []) 904255365Sdes 905255365Sdes 906255365Sdes# _LT_TAG_COMPILER 907255365Sdes# ---------------- 908255365Sdesm4_defun([_LT_TAG_COMPILER], 909255365Sdes[AC_REQUIRE([AC_PROG_CC])dnl 910255365Sdes 911255365Sdes_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 912255365Sdes_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 913255365Sdes_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 914255365Sdes_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 915255365Sdes 916255365Sdes# If no C compiler was specified, use CC. 917255365SdesLTCC=${LTCC-"$CC"} 918255365Sdes 919255365Sdes# If no C compiler flags were specified, use CFLAGS. 920255365SdesLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 921255365Sdes 922255365Sdes# Allow CC to be a program name with arguments. 923255365Sdescompiler=$CC 924255365Sdes])# _LT_TAG_COMPILER 925255365Sdes 926255365Sdes 927255365Sdes# _LT_COMPILER_BOILERPLATE 928255365Sdes# ------------------------ 929255365Sdes# Check for compiler boilerplate output or warnings with 930255365Sdes# the simple compiler test code. 931255365Sdesm4_defun([_LT_COMPILER_BOILERPLATE], 932255365Sdes[m4_require([_LT_DECL_SED])dnl 933255365Sdesac_outfile=conftest.$ac_objext 934255365Sdesecho "$lt_simple_compile_test_code" >conftest.$ac_ext 935255365Sdeseval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 936255365Sdes_lt_compiler_boilerplate=`cat conftest.err` 937255365Sdes$RM conftest* 938255365Sdes])# _LT_COMPILER_BOILERPLATE 939255365Sdes 940255365Sdes 941255365Sdes# _LT_LINKER_BOILERPLATE 942255365Sdes# ---------------------- 943255365Sdes# Check for linker boilerplate output or warnings with 944255365Sdes# the simple link test code. 945255365Sdesm4_defun([_LT_LINKER_BOILERPLATE], 946255365Sdes[m4_require([_LT_DECL_SED])dnl 947255365Sdesac_outfile=conftest.$ac_objext 948255365Sdesecho "$lt_simple_link_test_code" >conftest.$ac_ext 949255365Sdeseval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 950255365Sdes_lt_linker_boilerplate=`cat conftest.err` 951255365Sdes$RM -r conftest* 952255365Sdes])# _LT_LINKER_BOILERPLATE 953255365Sdes 954255365Sdes# _LT_REQUIRED_DARWIN_CHECKS 955255365Sdes# ------------------------- 956255365Sdesm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 957255365Sdes case $host_os in 958255365Sdes rhapsody* | darwin*) 959255365Sdes AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 960255365Sdes AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 961255365Sdes AC_CHECK_TOOL([LIPO], [lipo], [:]) 962255365Sdes AC_CHECK_TOOL([OTOOL], [otool], [:]) 963255365Sdes AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 964255365Sdes _LT_DECL([], [DSYMUTIL], [1], 965255365Sdes [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 966255365Sdes _LT_DECL([], [NMEDIT], [1], 967255365Sdes [Tool to change global to local symbols on Mac OS X]) 968255365Sdes _LT_DECL([], [LIPO], [1], 969255365Sdes [Tool to manipulate fat objects and archives on Mac OS X]) 970255365Sdes _LT_DECL([], [OTOOL], [1], 971255365Sdes [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 972255365Sdes _LT_DECL([], [OTOOL64], [1], 973255365Sdes [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 974255365Sdes 975255365Sdes AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 976255365Sdes [lt_cv_apple_cc_single_mod=no 977255365Sdes if test -z "${LT_MULTI_MODULE}"; then 978255365Sdes # By default we will add the -single_module flag. You can override 979255365Sdes # by either setting the environment variable LT_MULTI_MODULE 980255365Sdes # non-empty at configure time, or by adding -multi_module to the 981255365Sdes # link flags. 982255365Sdes rm -rf libconftest.dylib* 983255365Sdes echo "int foo(void){return 1;}" > conftest.c 984255365Sdes echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 985255365Sdes-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 986255365Sdes $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 987255365Sdes -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 988255365Sdes _lt_result=$? 989255365Sdes # If there is a non-empty error log, and "single_module" 990255365Sdes # appears in it, assume the flag caused a linker warning 991255365Sdes if test -s conftest.err && $GREP single_module conftest.err; then 992255365Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 993255365Sdes # Otherwise, if the output was created with a 0 exit code from 994255365Sdes # the compiler, it worked. 995255365Sdes elif test -f libconftest.dylib && test $_lt_result -eq 0; then 996255365Sdes lt_cv_apple_cc_single_mod=yes 997255365Sdes else 998255365Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 999255365Sdes fi 1000255365Sdes rm -rf libconftest.dylib* 1001255365Sdes rm -f conftest.* 1002255365Sdes fi]) 1003255365Sdes 1004255365Sdes AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1005255365Sdes [lt_cv_ld_exported_symbols_list], 1006255365Sdes [lt_cv_ld_exported_symbols_list=no 1007255365Sdes save_LDFLAGS=$LDFLAGS 1008255365Sdes echo "_main" > conftest.sym 1009255365Sdes LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1010255365Sdes AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1011255365Sdes [lt_cv_ld_exported_symbols_list=yes], 1012255365Sdes [lt_cv_ld_exported_symbols_list=no]) 1013255365Sdes LDFLAGS="$save_LDFLAGS" 1014255365Sdes ]) 1015255365Sdes 1016255365Sdes AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1017255365Sdes [lt_cv_ld_force_load=no 1018255365Sdes cat > conftest.c << _LT_EOF 1019255365Sdesint forced_loaded() { return 2;} 1020255365Sdes_LT_EOF 1021255365Sdes echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1022255365Sdes $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1023255365Sdes echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1024255365Sdes $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1025255365Sdes echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1026255365Sdes $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1027255365Sdes cat > conftest.c << _LT_EOF 1028255365Sdesint main() { return 0;} 1029255365Sdes_LT_EOF 1030255365Sdes echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1031255365Sdes $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1032255365Sdes _lt_result=$? 1033255365Sdes if test -s conftest.err && $GREP force_load conftest.err; then 1034255365Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1035255365Sdes elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1036255365Sdes lt_cv_ld_force_load=yes 1037255365Sdes else 1038255365Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1039255365Sdes fi 1040255365Sdes rm -f conftest.err libconftest.a conftest conftest.c 1041255365Sdes rm -rf conftest.dSYM 1042255365Sdes ]) 1043255365Sdes case $host_os in 1044255365Sdes rhapsody* | darwin1.[[012]]) 1045255365Sdes _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1046255365Sdes darwin1.*) 1047255365Sdes _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1048255365Sdes darwin*) # darwin 5.x on 1049255365Sdes # if running on 10.5 or later, the deployment target defaults 1050255365Sdes # to the OS version, if on x86, and 10.4, the deployment 1051255365Sdes # target defaults to 10.4. Don't you love it? 1052255365Sdes case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1053255365Sdes 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1054255365Sdes _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1055255365Sdes 10.[[012]]*) 1056255365Sdes _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1057255365Sdes 10.*) 1058255365Sdes _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1059255365Sdes esac 1060255365Sdes ;; 1061255365Sdes esac 1062255365Sdes if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1063255365Sdes _lt_dar_single_mod='$single_module' 1064255365Sdes fi 1065255365Sdes if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1066255365Sdes _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1067255365Sdes else 1068255365Sdes _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1069255365Sdes fi 1070255365Sdes if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1071255365Sdes _lt_dsymutil='~$DSYMUTIL $lib || :' 1072255365Sdes else 1073255365Sdes _lt_dsymutil= 1074255365Sdes fi 1075255365Sdes ;; 1076255365Sdes esac 1077255365Sdes]) 1078255365Sdes 1079255365Sdes 1080255365Sdes# _LT_DARWIN_LINKER_FEATURES([TAG]) 1081255365Sdes# --------------------------------- 1082255365Sdes# Checks for linker and compiler features on darwin 1083255365Sdesm4_defun([_LT_DARWIN_LINKER_FEATURES], 1084255365Sdes[ 1085255365Sdes m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1086255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1087255365Sdes _LT_TAGVAR(hardcode_direct, $1)=no 1088255365Sdes _LT_TAGVAR(hardcode_automatic, $1)=yes 1089255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1090255365Sdes if test "$lt_cv_ld_force_load" = "yes"; then 1091255365Sdes _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\"`' 1092255365Sdes m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1093255365Sdes [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1094255365Sdes else 1095255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1096255365Sdes fi 1097255365Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 1098255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1099255365Sdes case $cc_basename in 1100255365Sdes ifort*) _lt_dar_can_shared=yes ;; 1101255365Sdes *) _lt_dar_can_shared=$GCC ;; 1102255365Sdes esac 1103255365Sdes if test "$_lt_dar_can_shared" = "yes"; then 1104255365Sdes output_verbose_link_cmd=func_echo_all 1105255365Sdes _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}" 1106255365Sdes _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1107255365Sdes _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}" 1108255365Sdes _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}" 1109255365Sdes m4_if([$1], [CXX], 1110255365Sdes[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1111255365Sdes _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}" 1112255365Sdes _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}" 1113255365Sdes fi 1114255365Sdes],[]) 1115255365Sdes else 1116255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 1117255365Sdes fi 1118255365Sdes]) 1119255365Sdes 1120255365Sdes# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1121255365Sdes# ---------------------------------- 1122255365Sdes# Links a minimal program and checks the executable 1123255365Sdes# for the system default hardcoded library path. In most cases, 1124255365Sdes# this is /usr/lib:/lib, but when the MPI compilers are used 1125255365Sdes# the location of the communication and MPI libs are included too. 1126255365Sdes# If we don't find anything, use the default library path according 1127255365Sdes# to the aix ld manual. 1128255365Sdes# Store the results from the different compilers for each TAGNAME. 1129255365Sdes# Allow to override them for all tags through lt_cv_aix_libpath. 1130255365Sdesm4_defun([_LT_SYS_MODULE_PATH_AIX], 1131255365Sdes[m4_require([_LT_DECL_SED])dnl 1132255365Sdesif test "${lt_cv_aix_libpath+set}" = set; then 1133255365Sdes aix_libpath=$lt_cv_aix_libpath 1134255365Sdeselse 1135255365Sdes AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1136255365Sdes [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1137255365Sdes lt_aix_libpath_sed='[ 1138255365Sdes /Import File Strings/,/^$/ { 1139255365Sdes /^0/ { 1140255365Sdes s/^0 *\([^ ]*\) *$/\1/ 1141255365Sdes p 1142255365Sdes } 1143255365Sdes }]' 1144255365Sdes _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1145255365Sdes # Check for a 64-bit object if we didn't find anything. 1146255365Sdes if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1147255365Sdes _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1148255365Sdes fi],[]) 1149255365Sdes if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1150255365Sdes _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1151255365Sdes fi 1152255365Sdes ]) 1153255365Sdes aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1154255365Sdesfi 1155255365Sdes])# _LT_SYS_MODULE_PATH_AIX 1156255365Sdes 1157255365Sdes 1158255365Sdes# _LT_SHELL_INIT(ARG) 1159255365Sdes# ------------------- 1160255365Sdesm4_define([_LT_SHELL_INIT], 1161255365Sdes[m4_divert_text([M4SH-INIT], [$1 1162255365Sdes])])# _LT_SHELL_INIT 1163255365Sdes 1164255365Sdes 1165255365Sdes 1166255365Sdes# _LT_PROG_ECHO_BACKSLASH 1167255365Sdes# ----------------------- 1168255365Sdes# Find how we can fake an echo command that does not interpret backslash. 1169255365Sdes# In particular, with Autoconf 2.60 or later we add some code to the start 1170255365Sdes# of the generated configure script which will find a shell with a builtin 1171255365Sdes# printf (which we can use as an echo command). 1172255365Sdesm4_defun([_LT_PROG_ECHO_BACKSLASH], 1173255365Sdes[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1174255365SdesECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1175255365SdesECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1176255365Sdes 1177255365SdesAC_MSG_CHECKING([how to print strings]) 1178255365Sdes# Test print first, because it will be a builtin if present. 1179255365Sdesif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1180255365Sdes test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1181255365Sdes ECHO='print -r --' 1182255365Sdeselif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1183255365Sdes ECHO='printf %s\n' 1184255365Sdeselse 1185255365Sdes # Use this function as a fallback that always works. 1186255365Sdes func_fallback_echo () 1187255365Sdes { 1188255365Sdes eval 'cat <<_LTECHO_EOF 1189255365Sdes$[]1 1190255365Sdes_LTECHO_EOF' 1191255365Sdes } 1192255365Sdes ECHO='func_fallback_echo' 1193255365Sdesfi 1194255365Sdes 1195255365Sdes# func_echo_all arg... 1196255365Sdes# Invoke $ECHO with all args, space-separated. 1197255365Sdesfunc_echo_all () 1198255365Sdes{ 1199255365Sdes $ECHO "$*" 1200255365Sdes} 1201255365Sdes 1202255365Sdescase "$ECHO" in 1203255365Sdes printf*) AC_MSG_RESULT([printf]) ;; 1204255365Sdes print*) AC_MSG_RESULT([print -r]) ;; 1205255365Sdes *) AC_MSG_RESULT([cat]) ;; 1206255365Sdesesac 1207255365Sdes 1208255365Sdesm4_ifdef([_AS_DETECT_SUGGESTED], 1209255365Sdes[_AS_DETECT_SUGGESTED([ 1210255365Sdes test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1211255365Sdes ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1212255365Sdes ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1213255365Sdes ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1214255365Sdes PATH=/empty FPATH=/empty; export PATH FPATH 1215255365Sdes test "X`printf %s $ECHO`" = "X$ECHO" \ 1216255365Sdes || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1217255365Sdes 1218255365Sdes_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1219255365Sdes_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1220255365Sdes])# _LT_PROG_ECHO_BACKSLASH 1221255365Sdes 1222255365Sdes 1223255365Sdes# _LT_WITH_SYSROOT 1224255365Sdes# ---------------- 1225255365SdesAC_DEFUN([_LT_WITH_SYSROOT], 1226255365Sdes[AC_MSG_CHECKING([for sysroot]) 1227255365SdesAC_ARG_WITH([sysroot], 1228255365Sdes[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1229255365Sdes (or the compiler's sysroot if not specified).], 1230255365Sdes[], [with_sysroot=no]) 1231255365Sdes 1232255365Sdesdnl lt_sysroot will always be passed unquoted. We quote it here 1233255365Sdesdnl in case the user passed a directory name. 1234255365Sdeslt_sysroot= 1235255365Sdescase ${with_sysroot} in #( 1236255365Sdes yes) 1237255365Sdes if test "$GCC" = yes; then 1238255365Sdes lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1239255365Sdes fi 1240255365Sdes ;; #( 1241255365Sdes /*) 1242255365Sdes lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1243255365Sdes ;; #( 1244255365Sdes no|'') 1245255365Sdes ;; #( 1246255365Sdes *) 1247255365Sdes AC_MSG_RESULT([${with_sysroot}]) 1248255365Sdes AC_MSG_ERROR([The sysroot must be an absolute path.]) 1249255365Sdes ;; 1250255365Sdesesac 1251255365Sdes 1252255365Sdes AC_MSG_RESULT([${lt_sysroot:-no}]) 1253255365Sdes_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1254255365Sdes[dependent libraries, and in which our libraries should be installed.])]) 1255255365Sdes 1256255365Sdes# _LT_ENABLE_LOCK 1257255365Sdes# --------------- 1258255365Sdesm4_defun([_LT_ENABLE_LOCK], 1259255365Sdes[AC_ARG_ENABLE([libtool-lock], 1260255365Sdes [AS_HELP_STRING([--disable-libtool-lock], 1261255365Sdes [avoid locking (might break parallel builds)])]) 1262255365Sdestest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1263255365Sdes 1264255365Sdes# Some flags need to be propagated to the compiler or linker for good 1265255365Sdes# libtool support. 1266255365Sdescase $host in 1267255365Sdesia64-*-hpux*) 1268255365Sdes # Find out which ABI we are using. 1269255365Sdes echo 'int i;' > conftest.$ac_ext 1270255365Sdes if AC_TRY_EVAL(ac_compile); then 1271255365Sdes case `/usr/bin/file conftest.$ac_objext` in 1272255365Sdes *ELF-32*) 1273255365Sdes HPUX_IA64_MODE="32" 1274255365Sdes ;; 1275255365Sdes *ELF-64*) 1276255365Sdes HPUX_IA64_MODE="64" 1277255365Sdes ;; 1278255365Sdes esac 1279255365Sdes fi 1280255365Sdes rm -rf conftest* 1281255365Sdes ;; 1282255365Sdes*-*-irix6*) 1283255365Sdes # Find out which ABI we are using. 1284255365Sdes echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1285255365Sdes if AC_TRY_EVAL(ac_compile); then 1286255365Sdes if test "$lt_cv_prog_gnu_ld" = yes; then 1287255365Sdes case `/usr/bin/file conftest.$ac_objext` in 1288255365Sdes *32-bit*) 1289255365Sdes LD="${LD-ld} -melf32bsmip" 1290255365Sdes ;; 1291255365Sdes *N32*) 1292255365Sdes LD="${LD-ld} -melf32bmipn32" 1293255365Sdes ;; 1294255365Sdes *64-bit*) 1295255365Sdes LD="${LD-ld} -melf64bmip" 1296255365Sdes ;; 1297255365Sdes esac 1298255365Sdes else 1299255365Sdes case `/usr/bin/file conftest.$ac_objext` in 1300255365Sdes *32-bit*) 1301255365Sdes LD="${LD-ld} -32" 1302255365Sdes ;; 1303255365Sdes *N32*) 1304255365Sdes LD="${LD-ld} -n32" 1305255365Sdes ;; 1306255365Sdes *64-bit*) 1307255365Sdes LD="${LD-ld} -64" 1308255365Sdes ;; 1309255365Sdes esac 1310255365Sdes fi 1311255365Sdes fi 1312255365Sdes rm -rf conftest* 1313255365Sdes ;; 1314255365Sdes 1315255365Sdesx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1316255365Sdess390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1317255365Sdes # Find out which ABI we are using. 1318255365Sdes echo 'int i;' > conftest.$ac_ext 1319255365Sdes if AC_TRY_EVAL(ac_compile); then 1320255365Sdes case `/usr/bin/file conftest.o` in 1321255365Sdes *32-bit*) 1322255365Sdes case $host in 1323255365Sdes x86_64-*kfreebsd*-gnu) 1324255365Sdes LD="${LD-ld} -m elf_i386_fbsd" 1325255365Sdes ;; 1326255365Sdes x86_64-*linux*) 1327255365Sdes LD="${LD-ld} -m elf_i386" 1328255365Sdes ;; 1329255365Sdes ppc64-*linux*|powerpc64-*linux*) 1330255365Sdes LD="${LD-ld} -m elf32ppclinux" 1331255365Sdes ;; 1332255365Sdes s390x-*linux*) 1333255365Sdes LD="${LD-ld} -m elf_s390" 1334255365Sdes ;; 1335255365Sdes sparc64-*linux*) 1336255365Sdes LD="${LD-ld} -m elf32_sparc" 1337255365Sdes ;; 1338255365Sdes esac 1339255365Sdes ;; 1340255365Sdes *64-bit*) 1341255365Sdes case $host in 1342255365Sdes x86_64-*kfreebsd*-gnu) 1343255365Sdes LD="${LD-ld} -m elf_x86_64_fbsd" 1344255365Sdes ;; 1345255365Sdes x86_64-*linux*) 1346255365Sdes LD="${LD-ld} -m elf_x86_64" 1347255365Sdes ;; 1348255365Sdes ppc*-*linux*|powerpc*-*linux*) 1349255365Sdes LD="${LD-ld} -m elf64ppc" 1350255365Sdes ;; 1351255365Sdes s390*-*linux*|s390*-*tpf*) 1352255365Sdes LD="${LD-ld} -m elf64_s390" 1353255365Sdes ;; 1354255365Sdes sparc*-*linux*) 1355255365Sdes LD="${LD-ld} -m elf64_sparc" 1356255365Sdes ;; 1357255365Sdes esac 1358255365Sdes ;; 1359255365Sdes esac 1360255365Sdes fi 1361255365Sdes rm -rf conftest* 1362255365Sdes ;; 1363255365Sdes 1364255365Sdes*-*-sco3.2v5*) 1365255365Sdes # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1366255365Sdes SAVE_CFLAGS="$CFLAGS" 1367255365Sdes CFLAGS="$CFLAGS -belf" 1368255365Sdes AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1369255365Sdes [AC_LANG_PUSH(C) 1370255365Sdes AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1371255365Sdes AC_LANG_POP]) 1372255365Sdes if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1373255365Sdes # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1374255365Sdes CFLAGS="$SAVE_CFLAGS" 1375255365Sdes fi 1376255365Sdes ;; 1377255365Sdes*-*solaris*) 1378255365Sdes # Find out which ABI we are using. 1379255365Sdes echo 'int i;' > conftest.$ac_ext 1380255365Sdes if AC_TRY_EVAL(ac_compile); then 1381255365Sdes case `/usr/bin/file conftest.o` in 1382255365Sdes *64-bit*) 1383255365Sdes case $lt_cv_prog_gnu_ld in 1384255365Sdes yes*) 1385255365Sdes case $host in 1386255365Sdes i?86-*-solaris*) 1387255365Sdes LD="${LD-ld} -m elf_x86_64" 1388255365Sdes ;; 1389255365Sdes sparc*-*-solaris*) 1390255365Sdes LD="${LD-ld} -m elf64_sparc" 1391255365Sdes ;; 1392255365Sdes esac 1393255365Sdes # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1394255365Sdes if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1395255365Sdes LD="${LD-ld}_sol2" 1396255365Sdes fi 1397255365Sdes ;; 1398255365Sdes *) 1399255365Sdes if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1400255365Sdes LD="${LD-ld} -64" 1401255365Sdes fi 1402255365Sdes ;; 1403255365Sdes esac 1404255365Sdes ;; 1405255365Sdes esac 1406255365Sdes fi 1407255365Sdes rm -rf conftest* 1408255365Sdes ;; 1409255365Sdesesac 1410255365Sdes 1411255365Sdesneed_locks="$enable_libtool_lock" 1412255365Sdes])# _LT_ENABLE_LOCK 1413255365Sdes 1414255365Sdes 1415255365Sdes# _LT_PROG_AR 1416255365Sdes# ----------- 1417255365Sdesm4_defun([_LT_PROG_AR], 1418255365Sdes[AC_CHECK_TOOLS(AR, [ar], false) 1419255365Sdes: ${AR=ar} 1420255365Sdes: ${AR_FLAGS=cru} 1421255365Sdes_LT_DECL([], [AR], [1], [The archiver]) 1422255365Sdes_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1423255365Sdes 1424255365SdesAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1425255365Sdes [lt_cv_ar_at_file=no 1426255365Sdes AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1427255365Sdes [echo conftest.$ac_objext > conftest.lst 1428255365Sdes lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1429255365Sdes AC_TRY_EVAL([lt_ar_try]) 1430255365Sdes if test "$ac_status" -eq 0; then 1431255365Sdes # Ensure the archiver fails upon bogus file names. 1432255365Sdes rm -f conftest.$ac_objext libconftest.a 1433255365Sdes AC_TRY_EVAL([lt_ar_try]) 1434255365Sdes if test "$ac_status" -ne 0; then 1435255365Sdes lt_cv_ar_at_file=@ 1436255365Sdes fi 1437255365Sdes fi 1438255365Sdes rm -f conftest.* libconftest.a 1439255365Sdes ]) 1440255365Sdes ]) 1441255365Sdes 1442255365Sdesif test "x$lt_cv_ar_at_file" = xno; then 1443255365Sdes archiver_list_spec= 1444255365Sdeselse 1445255365Sdes archiver_list_spec=$lt_cv_ar_at_file 1446255365Sdesfi 1447255365Sdes_LT_DECL([], [archiver_list_spec], [1], 1448255365Sdes [How to feed a file listing to the archiver]) 1449255365Sdes])# _LT_PROG_AR 1450255365Sdes 1451255365Sdes 1452255365Sdes# _LT_CMD_OLD_ARCHIVE 1453255365Sdes# ------------------- 1454255365Sdesm4_defun([_LT_CMD_OLD_ARCHIVE], 1455255365Sdes[_LT_PROG_AR 1456255365Sdes 1457255365SdesAC_CHECK_TOOL(STRIP, strip, :) 1458255365Sdestest -z "$STRIP" && STRIP=: 1459255365Sdes_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1460255365Sdes 1461255365SdesAC_CHECK_TOOL(RANLIB, ranlib, :) 1462255365Sdestest -z "$RANLIB" && RANLIB=: 1463255365Sdes_LT_DECL([], [RANLIB], [1], 1464255365Sdes [Commands used to install an old-style archive]) 1465255365Sdes 1466255365Sdes# Determine commands to create old-style static archives. 1467255365Sdesold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1468255365Sdesold_postinstall_cmds='chmod 644 $oldlib' 1469255365Sdesold_postuninstall_cmds= 1470255365Sdes 1471255365Sdesif test -n "$RANLIB"; then 1472255365Sdes case $host_os in 1473255365Sdes openbsd*) 1474255365Sdes old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1475255365Sdes ;; 1476255365Sdes *) 1477255365Sdes old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1478255365Sdes ;; 1479255365Sdes esac 1480255365Sdes old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1481255365Sdesfi 1482255365Sdes 1483255365Sdescase $host_os in 1484255365Sdes darwin*) 1485255365Sdes lock_old_archive_extraction=yes ;; 1486255365Sdes *) 1487255365Sdes lock_old_archive_extraction=no ;; 1488255365Sdesesac 1489255365Sdes_LT_DECL([], [old_postinstall_cmds], [2]) 1490255365Sdes_LT_DECL([], [old_postuninstall_cmds], [2]) 1491255365Sdes_LT_TAGDECL([], [old_archive_cmds], [2], 1492255365Sdes [Commands used to build an old-style archive]) 1493255365Sdes_LT_DECL([], [lock_old_archive_extraction], [0], 1494255365Sdes [Whether to use a lock for old archive extraction]) 1495255365Sdes])# _LT_CMD_OLD_ARCHIVE 1496255365Sdes 1497255365Sdes 1498255365Sdes# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1499255365Sdes# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1500255365Sdes# ---------------------------------------------------------------- 1501255365Sdes# Check whether the given compiler option works 1502255365SdesAC_DEFUN([_LT_COMPILER_OPTION], 1503255365Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1504255365Sdesm4_require([_LT_DECL_SED])dnl 1505255365SdesAC_CACHE_CHECK([$1], [$2], 1506255365Sdes [$2=no 1507255365Sdes m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1508255365Sdes echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1509255365Sdes lt_compiler_flag="$3" 1510255365Sdes # Insert the option either (1) after the last *FLAGS variable, or 1511255365Sdes # (2) before a word containing "conftest.", or (3) at the end. 1512255365Sdes # Note that $ac_compile itself does not contain backslashes and begins 1513255365Sdes # with a dollar sign (not a hyphen), so the echo should work correctly. 1514255365Sdes # The option is referenced via a variable to avoid confusing sed. 1515255365Sdes lt_compile=`echo "$ac_compile" | $SED \ 1516255365Sdes -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1517255365Sdes -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1518255365Sdes -e 's:$: $lt_compiler_flag:'` 1519255365Sdes (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1520255365Sdes (eval "$lt_compile" 2>conftest.err) 1521255365Sdes ac_status=$? 1522255365Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1523255365Sdes echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1524255365Sdes if (exit $ac_status) && test -s "$ac_outfile"; then 1525255365Sdes # The compiler can only warn and ignore the option if not recognized 1526255365Sdes # So say no if there are warnings other than the usual output. 1527255365Sdes $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1528255365Sdes $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1529255365Sdes if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1530255365Sdes $2=yes 1531255365Sdes fi 1532255365Sdes fi 1533255365Sdes $RM conftest* 1534255365Sdes]) 1535255365Sdes 1536255365Sdesif test x"[$]$2" = xyes; then 1537255365Sdes m4_if([$5], , :, [$5]) 1538255365Sdeselse 1539255365Sdes m4_if([$6], , :, [$6]) 1540255365Sdesfi 1541255365Sdes])# _LT_COMPILER_OPTION 1542255365Sdes 1543255365Sdes# Old name: 1544255365SdesAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1545255365Sdesdnl aclocal-1.4 backwards compatibility: 1546255365Sdesdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1547255365Sdes 1548255365Sdes 1549255365Sdes# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1550255365Sdes# [ACTION-SUCCESS], [ACTION-FAILURE]) 1551255365Sdes# ---------------------------------------------------- 1552255365Sdes# Check whether the given linker option works 1553255365SdesAC_DEFUN([_LT_LINKER_OPTION], 1554255365Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1555255365Sdesm4_require([_LT_DECL_SED])dnl 1556255365SdesAC_CACHE_CHECK([$1], [$2], 1557255365Sdes [$2=no 1558255365Sdes save_LDFLAGS="$LDFLAGS" 1559255365Sdes LDFLAGS="$LDFLAGS $3" 1560255365Sdes echo "$lt_simple_link_test_code" > conftest.$ac_ext 1561255365Sdes if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1562255365Sdes # The linker can only warn and ignore the option if not recognized 1563255365Sdes # So say no if there are warnings 1564255365Sdes if test -s conftest.err; then 1565255365Sdes # Append any errors to the config.log. 1566255365Sdes cat conftest.err 1>&AS_MESSAGE_LOG_FD 1567255365Sdes $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1568255365Sdes $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1569255365Sdes if diff conftest.exp conftest.er2 >/dev/null; then 1570255365Sdes $2=yes 1571255365Sdes fi 1572255365Sdes else 1573255365Sdes $2=yes 1574255365Sdes fi 1575255365Sdes fi 1576255365Sdes $RM -r conftest* 1577255365Sdes LDFLAGS="$save_LDFLAGS" 1578255365Sdes]) 1579255365Sdes 1580255365Sdesif test x"[$]$2" = xyes; then 1581255365Sdes m4_if([$4], , :, [$4]) 1582255365Sdeselse 1583255365Sdes m4_if([$5], , :, [$5]) 1584255365Sdesfi 1585255365Sdes])# _LT_LINKER_OPTION 1586255365Sdes 1587255365Sdes# Old name: 1588255365SdesAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1589255365Sdesdnl aclocal-1.4 backwards compatibility: 1590255365Sdesdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1591255365Sdes 1592255365Sdes 1593255365Sdes# LT_CMD_MAX_LEN 1594255365Sdes#--------------- 1595255365SdesAC_DEFUN([LT_CMD_MAX_LEN], 1596255365Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1597255365Sdes# find the maximum length of command line arguments 1598255365SdesAC_MSG_CHECKING([the maximum length of command line arguments]) 1599255365SdesAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1600255365Sdes i=0 1601255365Sdes teststring="ABCD" 1602255365Sdes 1603255365Sdes case $build_os in 1604255365Sdes msdosdjgpp*) 1605255365Sdes # On DJGPP, this test can blow up pretty badly due to problems in libc 1606255365Sdes # (any single argument exceeding 2000 bytes causes a buffer overrun 1607255365Sdes # during glob expansion). Even if it were fixed, the result of this 1608255365Sdes # check would be larger than it should be. 1609255365Sdes lt_cv_sys_max_cmd_len=12288; # 12K is about right 1610255365Sdes ;; 1611255365Sdes 1612255365Sdes gnu*) 1613255365Sdes # Under GNU Hurd, this test is not required because there is 1614255365Sdes # no limit to the length of command line arguments. 1615255365Sdes # Libtool will interpret -1 as no limit whatsoever 1616255365Sdes lt_cv_sys_max_cmd_len=-1; 1617255365Sdes ;; 1618255365Sdes 1619255365Sdes cygwin* | mingw* | cegcc*) 1620255365Sdes # On Win9x/ME, this test blows up -- it succeeds, but takes 1621255365Sdes # about 5 minutes as the teststring grows exponentially. 1622255365Sdes # Worse, since 9x/ME are not pre-emptively multitasking, 1623255365Sdes # you end up with a "frozen" computer, even though with patience 1624255365Sdes # the test eventually succeeds (with a max line length of 256k). 1625255365Sdes # Instead, let's just punt: use the minimum linelength reported by 1626255365Sdes # all of the supported platforms: 8192 (on NT/2K/XP). 1627255365Sdes lt_cv_sys_max_cmd_len=8192; 1628255365Sdes ;; 1629255365Sdes 1630255365Sdes mint*) 1631255365Sdes # On MiNT this can take a long time and run out of memory. 1632255365Sdes lt_cv_sys_max_cmd_len=8192; 1633255365Sdes ;; 1634255365Sdes 1635255365Sdes amigaos*) 1636255365Sdes # On AmigaOS with pdksh, this test takes hours, literally. 1637255365Sdes # So we just punt and use a minimum line length of 8192. 1638255365Sdes lt_cv_sys_max_cmd_len=8192; 1639255365Sdes ;; 1640255365Sdes 1641255365Sdes netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1642255365Sdes # This has been around since 386BSD, at least. Likely further. 1643255365Sdes if test -x /sbin/sysctl; then 1644255365Sdes lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1645255365Sdes elif test -x /usr/sbin/sysctl; then 1646255365Sdes lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1647255365Sdes else 1648255365Sdes lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1649255365Sdes fi 1650255365Sdes # And add a safety zone 1651255365Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1652255365Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1653255365Sdes ;; 1654255365Sdes 1655255365Sdes interix*) 1656255365Sdes # We know the value 262144 and hardcode it with a safety zone (like BSD) 1657255365Sdes lt_cv_sys_max_cmd_len=196608 1658255365Sdes ;; 1659255365Sdes 1660255365Sdes os2*) 1661255365Sdes # The test takes a long time on OS/2. 1662255365Sdes lt_cv_sys_max_cmd_len=8192 1663255365Sdes ;; 1664255365Sdes 1665255365Sdes osf*) 1666255365Sdes # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1667255365Sdes # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1668255365Sdes # nice to cause kernel panics so lets avoid the loop below. 1669255365Sdes # First set a reasonable default. 1670255365Sdes lt_cv_sys_max_cmd_len=16384 1671255365Sdes # 1672255365Sdes if test -x /sbin/sysconfig; then 1673255365Sdes case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1674255365Sdes *1*) lt_cv_sys_max_cmd_len=-1 ;; 1675255365Sdes esac 1676255365Sdes fi 1677255365Sdes ;; 1678255365Sdes sco3.2v5*) 1679255365Sdes lt_cv_sys_max_cmd_len=102400 1680255365Sdes ;; 1681255365Sdes sysv5* | sco5v6* | sysv4.2uw2*) 1682255365Sdes kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1683255365Sdes if test -n "$kargmax"; then 1684255365Sdes lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1685255365Sdes else 1686255365Sdes lt_cv_sys_max_cmd_len=32768 1687255365Sdes fi 1688255365Sdes ;; 1689255365Sdes *) 1690255365Sdes lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1691255365Sdes if test -n "$lt_cv_sys_max_cmd_len"; then 1692255365Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1693255365Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1694255365Sdes else 1695255365Sdes # Make teststring a little bigger before we do anything with it. 1696255365Sdes # a 1K string should be a reasonable start. 1697255365Sdes for i in 1 2 3 4 5 6 7 8 ; do 1698255365Sdes teststring=$teststring$teststring 1699255365Sdes done 1700255365Sdes SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1701255365Sdes # If test is not a shell built-in, we'll probably end up computing a 1702255365Sdes # maximum length that is only half of the actual maximum length, but 1703255365Sdes # we can't tell. 1704255365Sdes while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1705255365Sdes = "X$teststring$teststring"; } >/dev/null 2>&1 && 1706255365Sdes test $i != 17 # 1/2 MB should be enough 1707255365Sdes do 1708255365Sdes i=`expr $i + 1` 1709255365Sdes teststring=$teststring$teststring 1710255365Sdes done 1711255365Sdes # Only check the string length outside the loop. 1712255365Sdes lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1713255365Sdes teststring= 1714255365Sdes # Add a significant safety factor because C++ compilers can tack on 1715255365Sdes # massive amounts of additional arguments before passing them to the 1716255365Sdes # linker. It appears as though 1/2 is a usable value. 1717255365Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1718255365Sdes fi 1719255365Sdes ;; 1720255365Sdes esac 1721255365Sdes]) 1722255365Sdesif test -n $lt_cv_sys_max_cmd_len ; then 1723255365Sdes AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1724255365Sdeselse 1725255365Sdes AC_MSG_RESULT(none) 1726255365Sdesfi 1727255365Sdesmax_cmd_len=$lt_cv_sys_max_cmd_len 1728255365Sdes_LT_DECL([], [max_cmd_len], [0], 1729255365Sdes [What is the maximum length of a command?]) 1730255365Sdes])# LT_CMD_MAX_LEN 1731255365Sdes 1732255365Sdes# Old name: 1733255365SdesAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1734255365Sdesdnl aclocal-1.4 backwards compatibility: 1735255365Sdesdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1736255365Sdes 1737255365Sdes 1738255365Sdes# _LT_HEADER_DLFCN 1739255365Sdes# ---------------- 1740255365Sdesm4_defun([_LT_HEADER_DLFCN], 1741255365Sdes[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1742255365Sdes])# _LT_HEADER_DLFCN 1743255365Sdes 1744255365Sdes 1745255365Sdes# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1746255365Sdes# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1747255365Sdes# ---------------------------------------------------------------- 1748255365Sdesm4_defun([_LT_TRY_DLOPEN_SELF], 1749255365Sdes[m4_require([_LT_HEADER_DLFCN])dnl 1750255365Sdesif test "$cross_compiling" = yes; then : 1751255365Sdes [$4] 1752255365Sdeselse 1753255365Sdes lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1754255365Sdes lt_status=$lt_dlunknown 1755255365Sdes cat > conftest.$ac_ext <<_LT_EOF 1756255365Sdes[#line $LINENO "configure" 1757255365Sdes#include "confdefs.h" 1758255365Sdes 1759255365Sdes#if HAVE_DLFCN_H 1760255365Sdes#include <dlfcn.h> 1761255365Sdes#endif 1762255365Sdes 1763255365Sdes#include <stdio.h> 1764255365Sdes 1765255365Sdes#ifdef RTLD_GLOBAL 1766255365Sdes# define LT_DLGLOBAL RTLD_GLOBAL 1767255365Sdes#else 1768255365Sdes# ifdef DL_GLOBAL 1769255365Sdes# define LT_DLGLOBAL DL_GLOBAL 1770255365Sdes# else 1771255365Sdes# define LT_DLGLOBAL 0 1772255365Sdes# endif 1773255365Sdes#endif 1774255365Sdes 1775255365Sdes/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1776255365Sdes find out it does not work in some platform. */ 1777255365Sdes#ifndef LT_DLLAZY_OR_NOW 1778255365Sdes# ifdef RTLD_LAZY 1779255365Sdes# define LT_DLLAZY_OR_NOW RTLD_LAZY 1780255365Sdes# else 1781255365Sdes# ifdef DL_LAZY 1782255365Sdes# define LT_DLLAZY_OR_NOW DL_LAZY 1783255365Sdes# else 1784255365Sdes# ifdef RTLD_NOW 1785255365Sdes# define LT_DLLAZY_OR_NOW RTLD_NOW 1786255365Sdes# else 1787255365Sdes# ifdef DL_NOW 1788255365Sdes# define LT_DLLAZY_OR_NOW DL_NOW 1789255365Sdes# else 1790255365Sdes# define LT_DLLAZY_OR_NOW 0 1791255365Sdes# endif 1792255365Sdes# endif 1793255365Sdes# endif 1794255365Sdes# endif 1795255365Sdes#endif 1796255365Sdes 1797255365Sdes/* When -fvisbility=hidden is used, assume the code has been annotated 1798255365Sdes correspondingly for the symbols needed. */ 1799255365Sdes#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1800255365Sdesint fnord () __attribute__((visibility("default"))); 1801255365Sdes#endif 1802255365Sdes 1803255365Sdesint fnord () { return 42; } 1804255365Sdesint main () 1805255365Sdes{ 1806255365Sdes void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1807255365Sdes int status = $lt_dlunknown; 1808255365Sdes 1809255365Sdes if (self) 1810255365Sdes { 1811255365Sdes if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1812255365Sdes else 1813255365Sdes { 1814255365Sdes if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1815255365Sdes else puts (dlerror ()); 1816255365Sdes } 1817255365Sdes /* dlclose (self); */ 1818255365Sdes } 1819255365Sdes else 1820255365Sdes puts (dlerror ()); 1821255365Sdes 1822255365Sdes return status; 1823255365Sdes}] 1824255365Sdes_LT_EOF 1825255365Sdes if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1826255365Sdes (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1827255365Sdes lt_status=$? 1828255365Sdes case x$lt_status in 1829255365Sdes x$lt_dlno_uscore) $1 ;; 1830255365Sdes x$lt_dlneed_uscore) $2 ;; 1831255365Sdes x$lt_dlunknown|x*) $3 ;; 1832255365Sdes esac 1833255365Sdes else : 1834255365Sdes # compilation failed 1835255365Sdes $3 1836255365Sdes fi 1837255365Sdesfi 1838255365Sdesrm -fr conftest* 1839255365Sdes])# _LT_TRY_DLOPEN_SELF 1840255365Sdes 1841255365Sdes 1842255365Sdes# LT_SYS_DLOPEN_SELF 1843255365Sdes# ------------------ 1844255365SdesAC_DEFUN([LT_SYS_DLOPEN_SELF], 1845255365Sdes[m4_require([_LT_HEADER_DLFCN])dnl 1846255365Sdesif test "x$enable_dlopen" != xyes; then 1847255365Sdes enable_dlopen=unknown 1848255365Sdes enable_dlopen_self=unknown 1849255365Sdes enable_dlopen_self_static=unknown 1850255365Sdeselse 1851255365Sdes lt_cv_dlopen=no 1852255365Sdes lt_cv_dlopen_libs= 1853255365Sdes 1854255365Sdes case $host_os in 1855255365Sdes beos*) 1856255365Sdes lt_cv_dlopen="load_add_on" 1857255365Sdes lt_cv_dlopen_libs= 1858255365Sdes lt_cv_dlopen_self=yes 1859255365Sdes ;; 1860255365Sdes 1861255365Sdes mingw* | pw32* | cegcc*) 1862255365Sdes lt_cv_dlopen="LoadLibrary" 1863255365Sdes lt_cv_dlopen_libs= 1864255365Sdes ;; 1865255365Sdes 1866255365Sdes cygwin*) 1867255365Sdes lt_cv_dlopen="dlopen" 1868255365Sdes lt_cv_dlopen_libs= 1869255365Sdes ;; 1870255365Sdes 1871255365Sdes darwin*) 1872255365Sdes # if libdl is installed we need to link against it 1873255365Sdes AC_CHECK_LIB([dl], [dlopen], 1874255365Sdes [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1875255365Sdes lt_cv_dlopen="dyld" 1876255365Sdes lt_cv_dlopen_libs= 1877255365Sdes lt_cv_dlopen_self=yes 1878255365Sdes ]) 1879255365Sdes ;; 1880255365Sdes 1881255365Sdes *) 1882255365Sdes AC_CHECK_FUNC([shl_load], 1883255365Sdes [lt_cv_dlopen="shl_load"], 1884255365Sdes [AC_CHECK_LIB([dld], [shl_load], 1885255365Sdes [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1886255365Sdes [AC_CHECK_FUNC([dlopen], 1887255365Sdes [lt_cv_dlopen="dlopen"], 1888255365Sdes [AC_CHECK_LIB([dl], [dlopen], 1889255365Sdes [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1890255365Sdes [AC_CHECK_LIB([svld], [dlopen], 1891255365Sdes [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1892255365Sdes [AC_CHECK_LIB([dld], [dld_link], 1893255365Sdes [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1894255365Sdes ]) 1895255365Sdes ]) 1896255365Sdes ]) 1897255365Sdes ]) 1898255365Sdes ]) 1899255365Sdes ;; 1900255365Sdes esac 1901255365Sdes 1902255365Sdes if test "x$lt_cv_dlopen" != xno; then 1903255365Sdes enable_dlopen=yes 1904255365Sdes else 1905255365Sdes enable_dlopen=no 1906255365Sdes fi 1907255365Sdes 1908255365Sdes case $lt_cv_dlopen in 1909255365Sdes dlopen) 1910255365Sdes save_CPPFLAGS="$CPPFLAGS" 1911255365Sdes test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1912255365Sdes 1913255365Sdes save_LDFLAGS="$LDFLAGS" 1914255365Sdes wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1915255365Sdes 1916255365Sdes save_LIBS="$LIBS" 1917255365Sdes LIBS="$lt_cv_dlopen_libs $LIBS" 1918255365Sdes 1919255365Sdes AC_CACHE_CHECK([whether a program can dlopen itself], 1920255365Sdes lt_cv_dlopen_self, [dnl 1921255365Sdes _LT_TRY_DLOPEN_SELF( 1922255365Sdes lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1923255365Sdes lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1924255365Sdes ]) 1925255365Sdes 1926255365Sdes if test "x$lt_cv_dlopen_self" = xyes; then 1927255365Sdes wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1928255365Sdes AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1929255365Sdes lt_cv_dlopen_self_static, [dnl 1930255365Sdes _LT_TRY_DLOPEN_SELF( 1931255365Sdes lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1932255365Sdes lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1933255365Sdes ]) 1934255365Sdes fi 1935255365Sdes 1936255365Sdes CPPFLAGS="$save_CPPFLAGS" 1937255365Sdes LDFLAGS="$save_LDFLAGS" 1938255365Sdes LIBS="$save_LIBS" 1939255365Sdes ;; 1940255365Sdes esac 1941255365Sdes 1942255365Sdes case $lt_cv_dlopen_self in 1943255365Sdes yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1944255365Sdes *) enable_dlopen_self=unknown ;; 1945255365Sdes esac 1946255365Sdes 1947255365Sdes case $lt_cv_dlopen_self_static in 1948255365Sdes yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1949255365Sdes *) enable_dlopen_self_static=unknown ;; 1950255365Sdes esac 1951255365Sdesfi 1952255365Sdes_LT_DECL([dlopen_support], [enable_dlopen], [0], 1953255365Sdes [Whether dlopen is supported]) 1954255365Sdes_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1955255365Sdes [Whether dlopen of programs is supported]) 1956255365Sdes_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1957255365Sdes [Whether dlopen of statically linked programs is supported]) 1958255365Sdes])# LT_SYS_DLOPEN_SELF 1959255365Sdes 1960255365Sdes# Old name: 1961255365SdesAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1962255365Sdesdnl aclocal-1.4 backwards compatibility: 1963255365Sdesdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1964255365Sdes 1965255365Sdes 1966255365Sdes# _LT_COMPILER_C_O([TAGNAME]) 1967255365Sdes# --------------------------- 1968255365Sdes# Check to see if options -c and -o are simultaneously supported by compiler. 1969255365Sdes# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1970255365Sdesm4_defun([_LT_COMPILER_C_O], 1971255365Sdes[m4_require([_LT_DECL_SED])dnl 1972255365Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1973255365Sdesm4_require([_LT_TAG_COMPILER])dnl 1974255365SdesAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1975255365Sdes [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1976255365Sdes [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1977255365Sdes $RM -r conftest 2>/dev/null 1978255365Sdes mkdir conftest 1979255365Sdes cd conftest 1980255365Sdes mkdir out 1981255365Sdes echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1982255365Sdes 1983255365Sdes lt_compiler_flag="-o out/conftest2.$ac_objext" 1984255365Sdes # Insert the option either (1) after the last *FLAGS variable, or 1985255365Sdes # (2) before a word containing "conftest.", or (3) at the end. 1986255365Sdes # Note that $ac_compile itself does not contain backslashes and begins 1987255365Sdes # with a dollar sign (not a hyphen), so the echo should work correctly. 1988255365Sdes lt_compile=`echo "$ac_compile" | $SED \ 1989255365Sdes -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1990255365Sdes -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1991255365Sdes -e 's:$: $lt_compiler_flag:'` 1992255365Sdes (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1993255365Sdes (eval "$lt_compile" 2>out/conftest.err) 1994255365Sdes ac_status=$? 1995255365Sdes cat out/conftest.err >&AS_MESSAGE_LOG_FD 1996255365Sdes echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1997255365Sdes if (exit $ac_status) && test -s out/conftest2.$ac_objext 1998255365Sdes then 1999255365Sdes # The compiler can only warn and ignore the option if not recognized 2000255365Sdes # So say no if there are warnings 2001255365Sdes $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2002255365Sdes $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2003255365Sdes if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2004255365Sdes _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2005255365Sdes fi 2006255365Sdes fi 2007255365Sdes chmod u+w . 2>&AS_MESSAGE_LOG_FD 2008255365Sdes $RM conftest* 2009255365Sdes # SGI C++ compiler will create directory out/ii_files/ for 2010255365Sdes # template instantiation 2011255365Sdes test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2012255365Sdes $RM out/* && rmdir out 2013255365Sdes cd .. 2014255365Sdes $RM -r conftest 2015255365Sdes $RM conftest* 2016255365Sdes]) 2017255365Sdes_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2018255365Sdes [Does compiler simultaneously support -c and -o options?]) 2019255365Sdes])# _LT_COMPILER_C_O 2020255365Sdes 2021255365Sdes 2022255365Sdes# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2023255365Sdes# ---------------------------------- 2024255365Sdes# Check to see if we can do hard links to lock some files if needed 2025255365Sdesm4_defun([_LT_COMPILER_FILE_LOCKS], 2026255365Sdes[m4_require([_LT_ENABLE_LOCK])dnl 2027255365Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2028255365Sdes_LT_COMPILER_C_O([$1]) 2029255365Sdes 2030255365Sdeshard_links="nottested" 2031255365Sdesif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2032255365Sdes # do not overwrite the value of need_locks provided by the user 2033255365Sdes AC_MSG_CHECKING([if we can lock with hard links]) 2034255365Sdes hard_links=yes 2035255365Sdes $RM conftest* 2036255365Sdes ln conftest.a conftest.b 2>/dev/null && hard_links=no 2037255365Sdes touch conftest.a 2038255365Sdes ln conftest.a conftest.b 2>&5 || hard_links=no 2039255365Sdes ln conftest.a conftest.b 2>/dev/null && hard_links=no 2040255365Sdes AC_MSG_RESULT([$hard_links]) 2041255365Sdes if test "$hard_links" = no; then 2042255365Sdes AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2043255365Sdes need_locks=warn 2044255365Sdes fi 2045255365Sdeselse 2046255365Sdes need_locks=no 2047255365Sdesfi 2048255365Sdes_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2049255365Sdes])# _LT_COMPILER_FILE_LOCKS 2050255365Sdes 2051255365Sdes 2052255365Sdes# _LT_CHECK_OBJDIR 2053255365Sdes# ---------------- 2054255365Sdesm4_defun([_LT_CHECK_OBJDIR], 2055255365Sdes[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2056255365Sdes[rm -f .libs 2>/dev/null 2057255365Sdesmkdir .libs 2>/dev/null 2058255365Sdesif test -d .libs; then 2059255365Sdes lt_cv_objdir=.libs 2060255365Sdeselse 2061255365Sdes # MS-DOS does not allow filenames that begin with a dot. 2062255365Sdes lt_cv_objdir=_libs 2063255365Sdesfi 2064255365Sdesrmdir .libs 2>/dev/null]) 2065255365Sdesobjdir=$lt_cv_objdir 2066255365Sdes_LT_DECL([], [objdir], [0], 2067255365Sdes [The name of the directory that contains temporary libtool files])dnl 2068255365Sdesm4_pattern_allow([LT_OBJDIR])dnl 2069255365SdesAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2070255365Sdes [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2071255365Sdes])# _LT_CHECK_OBJDIR 2072255365Sdes 2073255365Sdes 2074255365Sdes# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2075255365Sdes# -------------------------------------- 2076255365Sdes# Check hardcoding attributes. 2077255365Sdesm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2078255365Sdes[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2079255365Sdes_LT_TAGVAR(hardcode_action, $1)= 2080255365Sdesif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2081255365Sdes test -n "$_LT_TAGVAR(runpath_var, $1)" || 2082255365Sdes test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2083255365Sdes 2084255365Sdes # We can hardcode non-existent directories. 2085255365Sdes if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2086255365Sdes # If the only mechanism to avoid hardcoding is shlibpath_var, we 2087255365Sdes # have to relink, otherwise we might link with an installed library 2088255365Sdes # when we should be linking with a yet-to-be-installed one 2089255365Sdes ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2090255365Sdes test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2091255365Sdes # Linking always hardcodes the temporary library directory. 2092255365Sdes _LT_TAGVAR(hardcode_action, $1)=relink 2093255365Sdes else 2094255365Sdes # We can link without hardcoding, and we can hardcode nonexisting dirs. 2095255365Sdes _LT_TAGVAR(hardcode_action, $1)=immediate 2096255365Sdes fi 2097255365Sdeselse 2098255365Sdes # We cannot hardcode anything, or else we can only hardcode existing 2099255365Sdes # directories. 2100255365Sdes _LT_TAGVAR(hardcode_action, $1)=unsupported 2101255365Sdesfi 2102255365SdesAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2103255365Sdes 2104255365Sdesif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2105255365Sdes test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2106255365Sdes # Fast installation is not supported 2107255365Sdes enable_fast_install=no 2108255365Sdeselif test "$shlibpath_overrides_runpath" = yes || 2109255365Sdes test "$enable_shared" = no; then 2110255365Sdes # Fast installation is not necessary 2111255365Sdes enable_fast_install=needless 2112255365Sdesfi 2113255365Sdes_LT_TAGDECL([], [hardcode_action], [0], 2114255365Sdes [How to hardcode a shared library path into an executable]) 2115255365Sdes])# _LT_LINKER_HARDCODE_LIBPATH 2116255365Sdes 2117255365Sdes 2118255365Sdes# _LT_CMD_STRIPLIB 2119255365Sdes# ---------------- 2120255365Sdesm4_defun([_LT_CMD_STRIPLIB], 2121255365Sdes[m4_require([_LT_DECL_EGREP]) 2122255365Sdesstriplib= 2123255365Sdesold_striplib= 2124255365SdesAC_MSG_CHECKING([whether stripping libraries is possible]) 2125255365Sdesif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2126255365Sdes test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2127255365Sdes test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2128255365Sdes AC_MSG_RESULT([yes]) 2129255365Sdeselse 2130255365Sdes# FIXME - insert some real tests, host_os isn't really good enough 2131255365Sdes case $host_os in 2132255365Sdes darwin*) 2133255365Sdes if test -n "$STRIP" ; then 2134255365Sdes striplib="$STRIP -x" 2135255365Sdes old_striplib="$STRIP -S" 2136255365Sdes AC_MSG_RESULT([yes]) 2137255365Sdes else 2138255365Sdes AC_MSG_RESULT([no]) 2139255365Sdes fi 2140255365Sdes ;; 2141255365Sdes *) 2142255365Sdes AC_MSG_RESULT([no]) 2143255365Sdes ;; 2144255365Sdes esac 2145255365Sdesfi 2146255365Sdes_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2147255365Sdes_LT_DECL([], [striplib], [1]) 2148255365Sdes])# _LT_CMD_STRIPLIB 2149255365Sdes 2150255365Sdes 2151255365Sdes# _LT_SYS_DYNAMIC_LINKER([TAG]) 2152255365Sdes# ----------------------------- 2153255365Sdes# PORTME Fill in your ld.so characteristics 2154255365Sdesm4_defun([_LT_SYS_DYNAMIC_LINKER], 2155255365Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2156255365Sdesm4_require([_LT_DECL_EGREP])dnl 2157255365Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2158255365Sdesm4_require([_LT_DECL_OBJDUMP])dnl 2159255365Sdesm4_require([_LT_DECL_SED])dnl 2160255365Sdesm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2161255365SdesAC_MSG_CHECKING([dynamic linker characteristics]) 2162255365Sdesm4_if([$1], 2163255365Sdes [], [ 2164255365Sdesif test "$GCC" = yes; then 2165255365Sdes case $host_os in 2166255365Sdes darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2167255365Sdes *) lt_awk_arg="/^libraries:/" ;; 2168255365Sdes esac 2169255365Sdes case $host_os in 2170255365Sdes mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2171255365Sdes *) lt_sed_strip_eq="s,=/,/,g" ;; 2172255365Sdes esac 2173255365Sdes lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2174255365Sdes case $lt_search_path_spec in 2175255365Sdes *\;*) 2176255365Sdes # if the path contains ";" then we assume it to be the separator 2177255365Sdes # otherwise default to the standard path separator (i.e. ":") - it is 2178255365Sdes # assumed that no part of a normal pathname contains ";" but that should 2179255365Sdes # okay in the real world where ";" in dirpaths is itself problematic. 2180255365Sdes lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2181255365Sdes ;; 2182255365Sdes *) 2183255365Sdes lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2184255365Sdes ;; 2185255365Sdes esac 2186255365Sdes # Ok, now we have the path, separated by spaces, we can step through it 2187255365Sdes # and add multilib dir if necessary. 2188255365Sdes lt_tmp_lt_search_path_spec= 2189255365Sdes lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2190255365Sdes for lt_sys_path in $lt_search_path_spec; do 2191255365Sdes if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2192255365Sdes lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2193255365Sdes else 2194255365Sdes test -d "$lt_sys_path" && \ 2195255365Sdes lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2196255365Sdes fi 2197255365Sdes done 2198255365Sdes lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2199255365SdesBEGIN {RS=" "; FS="/|\n";} { 2200255365Sdes lt_foo=""; 2201255365Sdes lt_count=0; 2202255365Sdes for (lt_i = NF; lt_i > 0; lt_i--) { 2203255365Sdes if ($lt_i != "" && $lt_i != ".") { 2204255365Sdes if ($lt_i == "..") { 2205255365Sdes lt_count++; 2206255365Sdes } else { 2207255365Sdes if (lt_count == 0) { 2208255365Sdes lt_foo="/" $lt_i lt_foo; 2209255365Sdes } else { 2210255365Sdes lt_count--; 2211255365Sdes } 2212255365Sdes } 2213255365Sdes } 2214255365Sdes } 2215255365Sdes if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2216255365Sdes if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2217255365Sdes}'` 2218255365Sdes # AWK program above erroneously prepends '/' to C:/dos/paths 2219255365Sdes # for these hosts. 2220255365Sdes case $host_os in 2221255365Sdes mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2222255365Sdes $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2223255365Sdes esac 2224255365Sdes sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2225255365Sdeselse 2226255365Sdes sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2227255365Sdesfi]) 2228255365Sdeslibrary_names_spec= 2229255365Sdeslibname_spec='lib$name' 2230255365Sdessoname_spec= 2231255365Sdesshrext_cmds=".so" 2232255365Sdespostinstall_cmds= 2233255365Sdespostuninstall_cmds= 2234255365Sdesfinish_cmds= 2235255365Sdesfinish_eval= 2236255365Sdesshlibpath_var= 2237255365Sdesshlibpath_overrides_runpath=unknown 2238255365Sdesversion_type=none 2239255365Sdesdynamic_linker="$host_os ld.so" 2240255365Sdessys_lib_dlsearch_path_spec="/lib /usr/lib" 2241255365Sdesneed_lib_prefix=unknown 2242255365Sdeshardcode_into_libs=no 2243255365Sdes 2244255365Sdes# when you set need_version to no, make sure it does not cause -set_version 2245255365Sdes# flags to be left without arguments 2246255365Sdesneed_version=unknown 2247255365Sdes 2248255365Sdescase $host_os in 2249255365Sdesaix3*) 2250255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2251255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2252255365Sdes shlibpath_var=LIBPATH 2253255365Sdes 2254255365Sdes # AIX 3 has no versioning support, so we append a major version to the name. 2255255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2256255365Sdes ;; 2257255365Sdes 2258255365Sdesaix[[4-9]]*) 2259255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2260255365Sdes need_lib_prefix=no 2261255365Sdes need_version=no 2262255365Sdes hardcode_into_libs=yes 2263255365Sdes if test "$host_cpu" = ia64; then 2264255365Sdes # AIX 5 supports IA64 2265255365Sdes library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2266255365Sdes shlibpath_var=LD_LIBRARY_PATH 2267255365Sdes else 2268255365Sdes # With GCC up to 2.95.x, collect2 would create an import file 2269255365Sdes # for dependence libraries. The import file would start with 2270255365Sdes # the line `#! .'. This would cause the generated library to 2271255365Sdes # depend on `.', always an invalid library. This was fixed in 2272255365Sdes # development snapshots of GCC prior to 3.0. 2273255365Sdes case $host_os in 2274255365Sdes aix4 | aix4.[[01]] | aix4.[[01]].*) 2275255365Sdes if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2276255365Sdes echo ' yes ' 2277255365Sdes echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2278255365Sdes : 2279255365Sdes else 2280255365Sdes can_build_shared=no 2281255365Sdes fi 2282255365Sdes ;; 2283255365Sdes esac 2284255365Sdes # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2285255365Sdes # soname into executable. Probably we can add versioning support to 2286255365Sdes # collect2, so additional links can be useful in future. 2287255365Sdes if test "$aix_use_runtimelinking" = yes; then 2288255365Sdes # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2289255365Sdes # instead of lib<name>.a to let people know that these are not 2290255365Sdes # typical AIX shared libraries. 2291255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2292255365Sdes else 2293255365Sdes # We preserve .a as extension for shared libraries through AIX4.2 2294255365Sdes # and later when we are not doing run time linking. 2295255365Sdes library_names_spec='${libname}${release}.a $libname.a' 2296255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2297255365Sdes fi 2298255365Sdes shlibpath_var=LIBPATH 2299255365Sdes fi 2300255365Sdes ;; 2301255365Sdes 2302255365Sdesamigaos*) 2303255365Sdes case $host_cpu in 2304255365Sdes powerpc) 2305255365Sdes # Since July 2007 AmigaOS4 officially supports .so libraries. 2306255365Sdes # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2307255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2308255365Sdes ;; 2309255365Sdes m68k) 2310255365Sdes library_names_spec='$libname.ixlibrary $libname.a' 2311255365Sdes # Create ${libname}_ixlibrary.a entries in /sys/libs. 2312255365Sdes finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 2313255365Sdes ;; 2314255365Sdes esac 2315255365Sdes ;; 2316255365Sdes 2317255365Sdesbeos*) 2318255365Sdes library_names_spec='${libname}${shared_ext}' 2319255365Sdes dynamic_linker="$host_os ld.so" 2320255365Sdes shlibpath_var=LIBRARY_PATH 2321255365Sdes ;; 2322255365Sdes 2323255365Sdesbsdi[[45]]*) 2324255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2325255365Sdes need_version=no 2326255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2327255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2328255365Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2329255365Sdes shlibpath_var=LD_LIBRARY_PATH 2330255365Sdes sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2331255365Sdes sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2332255365Sdes # the default ld.so.conf also contains /usr/contrib/lib and 2333255365Sdes # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2334255365Sdes # libtool to hard-code these into programs 2335255365Sdes ;; 2336255365Sdes 2337255365Sdescygwin* | mingw* | pw32* | cegcc*) 2338255365Sdes version_type=windows 2339255365Sdes shrext_cmds=".dll" 2340255365Sdes need_version=no 2341255365Sdes need_lib_prefix=no 2342255365Sdes 2343255365Sdes case $GCC,$cc_basename in 2344255365Sdes yes,*) 2345255365Sdes # gcc 2346255365Sdes library_names_spec='$libname.dll.a' 2347255365Sdes # DLL is installed to $(libdir)/../bin by postinstall_cmds 2348255365Sdes postinstall_cmds='base_file=`basename \${file}`~ 2349255365Sdes dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2350255365Sdes dldir=$destdir/`dirname \$dlpath`~ 2351255365Sdes test -d \$dldir || mkdir -p \$dldir~ 2352255365Sdes $install_prog $dir/$dlname \$dldir/$dlname~ 2353255365Sdes chmod a+x \$dldir/$dlname~ 2354255365Sdes if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2355255365Sdes eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2356255365Sdes fi' 2357255365Sdes postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2358255365Sdes dlpath=$dir/\$dldll~ 2359255365Sdes $RM \$dlpath' 2360255365Sdes shlibpath_overrides_runpath=yes 2361255365Sdes 2362255365Sdes case $host_os in 2363255365Sdes cygwin*) 2364255365Sdes # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2365255365Sdes soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2366255365Sdesm4_if([$1], [],[ 2367255365Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2368255365Sdes ;; 2369255365Sdes mingw* | cegcc*) 2370255365Sdes # MinGW DLLs use traditional 'lib' prefix 2371255365Sdes soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2372255365Sdes ;; 2373255365Sdes pw32*) 2374255365Sdes # pw32 DLLs use 'pw' prefix rather than 'lib' 2375255365Sdes library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2376255365Sdes ;; 2377255365Sdes esac 2378255365Sdes dynamic_linker='Win32 ld.exe' 2379255365Sdes ;; 2380255365Sdes 2381255365Sdes *,cl*) 2382255365Sdes # Native MSVC 2383255365Sdes libname_spec='$name' 2384255365Sdes soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2385255365Sdes library_names_spec='${libname}.dll.lib' 2386255365Sdes 2387255365Sdes case $build_os in 2388255365Sdes mingw*) 2389255365Sdes sys_lib_search_path_spec= 2390255365Sdes lt_save_ifs=$IFS 2391255365Sdes IFS=';' 2392255365Sdes for lt_path in $LIB 2393255365Sdes do 2394255365Sdes IFS=$lt_save_ifs 2395255365Sdes # Let DOS variable expansion print the short 8.3 style file name. 2396255365Sdes lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2397255365Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2398255365Sdes done 2399255365Sdes IFS=$lt_save_ifs 2400255365Sdes # Convert to MSYS style. 2401255365Sdes sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2402255365Sdes ;; 2403255365Sdes cygwin*) 2404255365Sdes # Convert to unix form, then to dos form, then back to unix form 2405255365Sdes # but this time dos style (no spaces!) so that the unix form looks 2406255365Sdes # like /cygdrive/c/PROGRA~1:/cygdr... 2407255365Sdes sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2408255365Sdes sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2409255365Sdes sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2410255365Sdes ;; 2411255365Sdes *) 2412255365Sdes sys_lib_search_path_spec="$LIB" 2413255365Sdes if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2414255365Sdes # It is most probably a Windows format PATH. 2415255365Sdes sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2416255365Sdes else 2417255365Sdes sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2418255365Sdes fi 2419255365Sdes # FIXME: find the short name or the path components, as spaces are 2420255365Sdes # common. (e.g. "Program Files" -> "PROGRA~1") 2421255365Sdes ;; 2422255365Sdes esac 2423255365Sdes 2424255365Sdes # DLL is installed to $(libdir)/../bin by postinstall_cmds 2425255365Sdes postinstall_cmds='base_file=`basename \${file}`~ 2426255365Sdes dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2427255365Sdes dldir=$destdir/`dirname \$dlpath`~ 2428255365Sdes test -d \$dldir || mkdir -p \$dldir~ 2429255365Sdes $install_prog $dir/$dlname \$dldir/$dlname' 2430255365Sdes postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2431255365Sdes dlpath=$dir/\$dldll~ 2432255365Sdes $RM \$dlpath' 2433255365Sdes shlibpath_overrides_runpath=yes 2434255365Sdes dynamic_linker='Win32 link.exe' 2435255365Sdes ;; 2436255365Sdes 2437255365Sdes *) 2438255365Sdes # Assume MSVC wrapper 2439255365Sdes library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2440255365Sdes dynamic_linker='Win32 ld.exe' 2441255365Sdes ;; 2442255365Sdes esac 2443255365Sdes # FIXME: first we should search . and the directory the executable is in 2444255365Sdes shlibpath_var=PATH 2445255365Sdes ;; 2446255365Sdes 2447255365Sdesdarwin* | rhapsody*) 2448255365Sdes dynamic_linker="$host_os dyld" 2449255365Sdes version_type=darwin 2450255365Sdes need_lib_prefix=no 2451255365Sdes need_version=no 2452255365Sdes library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2453255365Sdes soname_spec='${libname}${release}${major}$shared_ext' 2454255365Sdes shlibpath_overrides_runpath=yes 2455255365Sdes shlibpath_var=DYLD_LIBRARY_PATH 2456255365Sdes shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2457255365Sdesm4_if([$1], [],[ 2458255365Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2459255365Sdes sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2460255365Sdes ;; 2461255365Sdes 2462255365Sdesdgux*) 2463255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2464255365Sdes need_lib_prefix=no 2465255365Sdes need_version=no 2466255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2467255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2468255365Sdes shlibpath_var=LD_LIBRARY_PATH 2469255365Sdes ;; 2470255365Sdes 2471255365Sdesfreebsd* | dragonfly*) 2472255365Sdes # DragonFly does not have aout. When/if they implement a new 2473255365Sdes # versioning mechanism, adjust this. 2474255365Sdes if test -x /usr/bin/objformat; then 2475255365Sdes objformat=`/usr/bin/objformat` 2476255365Sdes else 2477255365Sdes case $host_os in 2478255365Sdes freebsd[[23]].*) objformat=aout ;; 2479255365Sdes *) objformat=elf ;; 2480255365Sdes esac 2481255365Sdes fi 2482255365Sdes version_type=freebsd-$objformat 2483255365Sdes case $version_type in 2484255365Sdes freebsd-elf*) 2485255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2486255365Sdes need_version=no 2487255365Sdes need_lib_prefix=no 2488255365Sdes ;; 2489255365Sdes freebsd-*) 2490255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2491255365Sdes need_version=yes 2492255365Sdes ;; 2493255365Sdes esac 2494255365Sdes shlibpath_var=LD_LIBRARY_PATH 2495255365Sdes case $host_os in 2496255365Sdes freebsd2.*) 2497255365Sdes shlibpath_overrides_runpath=yes 2498255365Sdes ;; 2499255365Sdes freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2500255365Sdes shlibpath_overrides_runpath=yes 2501255365Sdes hardcode_into_libs=yes 2502255365Sdes ;; 2503255365Sdes freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2504255365Sdes freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2505255365Sdes shlibpath_overrides_runpath=no 2506255365Sdes hardcode_into_libs=yes 2507255365Sdes ;; 2508255365Sdes *) # from 4.6 on, and DragonFly 2509255365Sdes shlibpath_overrides_runpath=yes 2510255365Sdes hardcode_into_libs=yes 2511255365Sdes ;; 2512255365Sdes esac 2513255365Sdes ;; 2514255365Sdes 2515255365Sdesgnu*) 2516255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2517255365Sdes need_lib_prefix=no 2518255365Sdes need_version=no 2519255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2520255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2521255365Sdes shlibpath_var=LD_LIBRARY_PATH 2522255365Sdes shlibpath_overrides_runpath=no 2523255365Sdes hardcode_into_libs=yes 2524255365Sdes ;; 2525255365Sdes 2526255365Sdeshaiku*) 2527255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2528255365Sdes need_lib_prefix=no 2529255365Sdes need_version=no 2530255365Sdes dynamic_linker="$host_os runtime_loader" 2531255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2532255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2533255365Sdes shlibpath_var=LIBRARY_PATH 2534255365Sdes shlibpath_overrides_runpath=yes 2535255365Sdes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2536255365Sdes hardcode_into_libs=yes 2537255365Sdes ;; 2538255365Sdes 2539255365Sdeshpux9* | hpux10* | hpux11*) 2540255365Sdes # Give a soname corresponding to the major version so that dld.sl refuses to 2541255365Sdes # link against other versions. 2542255365Sdes version_type=sunos 2543255365Sdes need_lib_prefix=no 2544255365Sdes need_version=no 2545255365Sdes case $host_cpu in 2546255365Sdes ia64*) 2547255365Sdes shrext_cmds='.so' 2548255365Sdes hardcode_into_libs=yes 2549255365Sdes dynamic_linker="$host_os dld.so" 2550255365Sdes shlibpath_var=LD_LIBRARY_PATH 2551255365Sdes shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2552255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2553255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2554255365Sdes if test "X$HPUX_IA64_MODE" = X32; then 2555255365Sdes sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2556255365Sdes else 2557255365Sdes sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2558255365Sdes fi 2559255365Sdes sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2560255365Sdes ;; 2561255365Sdes hppa*64*) 2562255365Sdes shrext_cmds='.sl' 2563255365Sdes hardcode_into_libs=yes 2564255365Sdes dynamic_linker="$host_os dld.sl" 2565255365Sdes shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2566255365Sdes shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2567255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2568255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2569255365Sdes sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2570255365Sdes sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2571255365Sdes ;; 2572255365Sdes *) 2573255365Sdes shrext_cmds='.sl' 2574255365Sdes dynamic_linker="$host_os dld.sl" 2575255365Sdes shlibpath_var=SHLIB_PATH 2576255365Sdes shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2577255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2578255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2579255365Sdes ;; 2580255365Sdes esac 2581255365Sdes # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2582255365Sdes postinstall_cmds='chmod 555 $lib' 2583255365Sdes # or fails outright, so override atomically: 2584255365Sdes install_override_mode=555 2585255365Sdes ;; 2586255365Sdes 2587255365Sdesinterix[[3-9]]*) 2588255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2589255365Sdes need_lib_prefix=no 2590255365Sdes need_version=no 2591255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2592255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2593255365Sdes dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2594255365Sdes shlibpath_var=LD_LIBRARY_PATH 2595255365Sdes shlibpath_overrides_runpath=no 2596255365Sdes hardcode_into_libs=yes 2597255365Sdes ;; 2598255365Sdes 2599255365Sdesirix5* | irix6* | nonstopux*) 2600255365Sdes case $host_os in 2601255365Sdes nonstopux*) version_type=nonstopux ;; 2602255365Sdes *) 2603255365Sdes if test "$lt_cv_prog_gnu_ld" = yes; then 2604255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2605255365Sdes else 2606255365Sdes version_type=irix 2607255365Sdes fi ;; 2608255365Sdes esac 2609255365Sdes need_lib_prefix=no 2610255365Sdes need_version=no 2611255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2612255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2613255365Sdes case $host_os in 2614255365Sdes irix5* | nonstopux*) 2615255365Sdes libsuff= shlibsuff= 2616255365Sdes ;; 2617255365Sdes *) 2618255365Sdes case $LD in # libtool.m4 will add one of these switches to LD 2619255365Sdes *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2620255365Sdes libsuff= shlibsuff= libmagic=32-bit;; 2621255365Sdes *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2622255365Sdes libsuff=32 shlibsuff=N32 libmagic=N32;; 2623255365Sdes *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2624255365Sdes libsuff=64 shlibsuff=64 libmagic=64-bit;; 2625255365Sdes *) libsuff= shlibsuff= libmagic=never-match;; 2626255365Sdes esac 2627255365Sdes ;; 2628255365Sdes esac 2629255365Sdes shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2630255365Sdes shlibpath_overrides_runpath=no 2631255365Sdes sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2632255365Sdes sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2633255365Sdes hardcode_into_libs=yes 2634255365Sdes ;; 2635255365Sdes 2636255365Sdes# No shared lib support for Linux oldld, aout, or coff. 2637255365Sdeslinux*oldld* | linux*aout* | linux*coff*) 2638255365Sdes dynamic_linker=no 2639255365Sdes ;; 2640255365Sdes 2641255365Sdes# This must be glibc/ELF. 2642255365Sdeslinux* | k*bsd*-gnu | kopensolaris*-gnu) 2643255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2644255365Sdes need_lib_prefix=no 2645255365Sdes need_version=no 2646255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2647255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2648255365Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2649255365Sdes shlibpath_var=LD_LIBRARY_PATH 2650255365Sdes shlibpath_overrides_runpath=no 2651255365Sdes 2652255365Sdes # Some binutils ld are patched to set DT_RUNPATH 2653255365Sdes AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2654255365Sdes [lt_cv_shlibpath_overrides_runpath=no 2655255365Sdes save_LDFLAGS=$LDFLAGS 2656255365Sdes save_libdir=$libdir 2657255365Sdes eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2658255365Sdes LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2659255365Sdes AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2660255365Sdes [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2661255365Sdes [lt_cv_shlibpath_overrides_runpath=yes])]) 2662255365Sdes LDFLAGS=$save_LDFLAGS 2663255365Sdes libdir=$save_libdir 2664255365Sdes ]) 2665255365Sdes shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2666255365Sdes 2667255365Sdes # This implies no fast_install, which is unacceptable. 2668255365Sdes # Some rework will be needed to allow for fast_install 2669255365Sdes # before this can be enabled. 2670255365Sdes hardcode_into_libs=yes 2671255365Sdes 2672255365Sdes # Append ld.so.conf contents to the search path 2673255365Sdes if test -f /etc/ld.so.conf; then 2674255365Sdes 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' ' '` 2675255365Sdes sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2676255365Sdes fi 2677255365Sdes 2678255365Sdes # We used to test for /lib/ld.so.1 and disable shared libraries on 2679255365Sdes # powerpc, because MkLinux only supported shared libraries with the 2680255365Sdes # GNU dynamic linker. Since this was broken with cross compilers, 2681255365Sdes # most powerpc-linux boxes support dynamic linking these days and 2682255365Sdes # people can always --disable-shared, the test was removed, and we 2683255365Sdes # assume the GNU/Linux dynamic linker is in use. 2684255365Sdes dynamic_linker='GNU/Linux ld.so' 2685255365Sdes ;; 2686255365Sdes 2687255365Sdesnetbsd*) 2688255365Sdes version_type=sunos 2689255365Sdes need_lib_prefix=no 2690255365Sdes need_version=no 2691255365Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2692255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2693255365Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2694255365Sdes dynamic_linker='NetBSD (a.out) ld.so' 2695255365Sdes else 2696255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2697255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2698255365Sdes dynamic_linker='NetBSD ld.elf_so' 2699255365Sdes fi 2700255365Sdes shlibpath_var=LD_LIBRARY_PATH 2701255365Sdes shlibpath_overrides_runpath=yes 2702255365Sdes hardcode_into_libs=yes 2703255365Sdes ;; 2704255365Sdes 2705255365Sdesnewsos6) 2706255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2707255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2708255365Sdes shlibpath_var=LD_LIBRARY_PATH 2709255365Sdes shlibpath_overrides_runpath=yes 2710255365Sdes ;; 2711255365Sdes 2712255365Sdes*nto* | *qnx*) 2713255365Sdes version_type=qnx 2714255365Sdes need_lib_prefix=no 2715255365Sdes need_version=no 2716255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2717255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2718255365Sdes shlibpath_var=LD_LIBRARY_PATH 2719255365Sdes shlibpath_overrides_runpath=no 2720255365Sdes hardcode_into_libs=yes 2721255365Sdes dynamic_linker='ldqnx.so' 2722255365Sdes ;; 2723255365Sdes 2724255365Sdesopenbsd*) 2725255365Sdes version_type=sunos 2726255365Sdes sys_lib_dlsearch_path_spec="/usr/lib" 2727255365Sdes need_lib_prefix=no 2728255365Sdes # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2729255365Sdes case $host_os in 2730255365Sdes openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2731255365Sdes *) need_version=no ;; 2732255365Sdes esac 2733255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2734255365Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2735255365Sdes shlibpath_var=LD_LIBRARY_PATH 2736255365Sdes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2737255365Sdes case $host_os in 2738255365Sdes openbsd2.[[89]] | openbsd2.[[89]].*) 2739255365Sdes shlibpath_overrides_runpath=no 2740255365Sdes ;; 2741255365Sdes *) 2742255365Sdes shlibpath_overrides_runpath=yes 2743255365Sdes ;; 2744255365Sdes esac 2745255365Sdes else 2746255365Sdes shlibpath_overrides_runpath=yes 2747255365Sdes fi 2748255365Sdes ;; 2749255365Sdes 2750255365Sdesos2*) 2751255365Sdes libname_spec='$name' 2752255365Sdes shrext_cmds=".dll" 2753255365Sdes need_lib_prefix=no 2754255365Sdes library_names_spec='$libname${shared_ext} $libname.a' 2755255365Sdes dynamic_linker='OS/2 ld.exe' 2756255365Sdes shlibpath_var=LIBPATH 2757255365Sdes ;; 2758255365Sdes 2759255365Sdesosf3* | osf4* | osf5*) 2760255365Sdes version_type=osf 2761255365Sdes need_lib_prefix=no 2762255365Sdes need_version=no 2763255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2764255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2765255365Sdes shlibpath_var=LD_LIBRARY_PATH 2766255365Sdes sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2767255365Sdes sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2768255365Sdes ;; 2769255365Sdes 2770255365Sdesrdos*) 2771255365Sdes dynamic_linker=no 2772255365Sdes ;; 2773255365Sdes 2774255365Sdessolaris*) 2775255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2776255365Sdes need_lib_prefix=no 2777255365Sdes need_version=no 2778255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2779255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2780255365Sdes shlibpath_var=LD_LIBRARY_PATH 2781255365Sdes shlibpath_overrides_runpath=yes 2782255365Sdes hardcode_into_libs=yes 2783255365Sdes # ldd complains unless libraries are executable 2784255365Sdes postinstall_cmds='chmod +x $lib' 2785255365Sdes ;; 2786255365Sdes 2787255365Sdessunos4*) 2788255365Sdes version_type=sunos 2789255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2790255365Sdes finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2791255365Sdes shlibpath_var=LD_LIBRARY_PATH 2792255365Sdes shlibpath_overrides_runpath=yes 2793255365Sdes if test "$with_gnu_ld" = yes; then 2794255365Sdes need_lib_prefix=no 2795255365Sdes fi 2796255365Sdes need_version=yes 2797255365Sdes ;; 2798255365Sdes 2799255365Sdessysv4 | sysv4.3*) 2800255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2801255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2802255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2803255365Sdes shlibpath_var=LD_LIBRARY_PATH 2804255365Sdes case $host_vendor in 2805255365Sdes sni) 2806255365Sdes shlibpath_overrides_runpath=no 2807255365Sdes need_lib_prefix=no 2808255365Sdes runpath_var=LD_RUN_PATH 2809255365Sdes ;; 2810255365Sdes siemens) 2811255365Sdes need_lib_prefix=no 2812255365Sdes ;; 2813255365Sdes motorola) 2814255365Sdes need_lib_prefix=no 2815255365Sdes need_version=no 2816255365Sdes shlibpath_overrides_runpath=no 2817255365Sdes sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2818255365Sdes ;; 2819255365Sdes esac 2820255365Sdes ;; 2821255365Sdes 2822255365Sdessysv4*MP*) 2823255365Sdes if test -d /usr/nec ;then 2824255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2825255365Sdes library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2826255365Sdes soname_spec='$libname${shared_ext}.$major' 2827255365Sdes shlibpath_var=LD_LIBRARY_PATH 2828255365Sdes fi 2829255365Sdes ;; 2830255365Sdes 2831255365Sdessysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2832255365Sdes version_type=freebsd-elf 2833255365Sdes need_lib_prefix=no 2834255365Sdes need_version=no 2835255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2836255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2837255365Sdes shlibpath_var=LD_LIBRARY_PATH 2838255365Sdes shlibpath_overrides_runpath=yes 2839255365Sdes hardcode_into_libs=yes 2840255365Sdes if test "$with_gnu_ld" = yes; then 2841255365Sdes sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2842255365Sdes else 2843255365Sdes sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2844255365Sdes case $host_os in 2845255365Sdes sco3.2v5*) 2846255365Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2847255365Sdes ;; 2848255365Sdes esac 2849255365Sdes fi 2850255365Sdes sys_lib_dlsearch_path_spec='/usr/lib' 2851255365Sdes ;; 2852255365Sdes 2853255365Sdestpf*) 2854255365Sdes # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2855255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2856255365Sdes need_lib_prefix=no 2857255365Sdes need_version=no 2858255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2859255365Sdes shlibpath_var=LD_LIBRARY_PATH 2860255365Sdes shlibpath_overrides_runpath=no 2861255365Sdes hardcode_into_libs=yes 2862255365Sdes ;; 2863255365Sdes 2864255365Sdesuts4*) 2865255365Sdes version_type=linux # correct to gnu/linux during the next big refactor 2866255365Sdes library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2867255365Sdes soname_spec='${libname}${release}${shared_ext}$major' 2868255365Sdes shlibpath_var=LD_LIBRARY_PATH 2869255365Sdes ;; 2870255365Sdes 2871255365Sdes*) 2872255365Sdes dynamic_linker=no 2873255365Sdes ;; 2874255365Sdesesac 2875255365SdesAC_MSG_RESULT([$dynamic_linker]) 2876255365Sdestest "$dynamic_linker" = no && can_build_shared=no 2877255365Sdes 2878255365Sdesvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2879255365Sdesif test "$GCC" = yes; then 2880255365Sdes variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2881255365Sdesfi 2882255365Sdes 2883255365Sdesif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2884255365Sdes sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2885255365Sdesfi 2886255365Sdesif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2887255365Sdes sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2888255365Sdesfi 2889255365Sdes 2890255365Sdes_LT_DECL([], [variables_saved_for_relink], [1], 2891255365Sdes [Variables whose values should be saved in libtool wrapper scripts and 2892255365Sdes restored at link time]) 2893255365Sdes_LT_DECL([], [need_lib_prefix], [0], 2894255365Sdes [Do we need the "lib" prefix for modules?]) 2895255365Sdes_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2896255365Sdes_LT_DECL([], [version_type], [0], [Library versioning type]) 2897255365Sdes_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2898255365Sdes_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2899255365Sdes_LT_DECL([], [shlibpath_overrides_runpath], [0], 2900255365Sdes [Is shlibpath searched before the hard-coded library search path?]) 2901255365Sdes_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2902255365Sdes_LT_DECL([], [library_names_spec], [1], 2903255365Sdes [[List of archive names. First name is the real one, the rest are links. 2904255365Sdes The last name is the one that the linker finds with -lNAME]]) 2905255365Sdes_LT_DECL([], [soname_spec], [1], 2906255365Sdes [[The coded name of the library, if different from the real name]]) 2907255365Sdes_LT_DECL([], [install_override_mode], [1], 2908255365Sdes [Permission mode override for installation of shared libraries]) 2909255365Sdes_LT_DECL([], [postinstall_cmds], [2], 2910255365Sdes [Command to use after installation of a shared archive]) 2911255365Sdes_LT_DECL([], [postuninstall_cmds], [2], 2912255365Sdes [Command to use after uninstallation of a shared archive]) 2913255365Sdes_LT_DECL([], [finish_cmds], [2], 2914255365Sdes [Commands used to finish a libtool library installation in a directory]) 2915255365Sdes_LT_DECL([], [finish_eval], [1], 2916255365Sdes [[As "finish_cmds", except a single script fragment to be evaled but 2917255365Sdes not shown]]) 2918255365Sdes_LT_DECL([], [hardcode_into_libs], [0], 2919255365Sdes [Whether we should hardcode library paths into libraries]) 2920255365Sdes_LT_DECL([], [sys_lib_search_path_spec], [2], 2921255365Sdes [Compile-time system search path for libraries]) 2922255365Sdes_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2923255365Sdes [Run-time system search path for libraries]) 2924255365Sdes])# _LT_SYS_DYNAMIC_LINKER 2925255365Sdes 2926255365Sdes 2927255365Sdes# _LT_PATH_TOOL_PREFIX(TOOL) 2928255365Sdes# -------------------------- 2929255365Sdes# find a file program which can recognize shared library 2930255365SdesAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2931255365Sdes[m4_require([_LT_DECL_EGREP])dnl 2932255365SdesAC_MSG_CHECKING([for $1]) 2933255365SdesAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2934255365Sdes[case $MAGIC_CMD in 2935255365Sdes[[\\/*] | ?:[\\/]*]) 2936255365Sdes lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2937255365Sdes ;; 2938255365Sdes*) 2939255365Sdes lt_save_MAGIC_CMD="$MAGIC_CMD" 2940255365Sdes lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2941255365Sdesdnl $ac_dummy forces splitting on constant user-supplied paths. 2942255365Sdesdnl POSIX.2 word splitting is done only on the output of word expansions, 2943255365Sdesdnl not every word. This closes a longstanding sh security hole. 2944255365Sdes ac_dummy="m4_if([$2], , $PATH, [$2])" 2945255365Sdes for ac_dir in $ac_dummy; do 2946255365Sdes IFS="$lt_save_ifs" 2947255365Sdes test -z "$ac_dir" && ac_dir=. 2948255365Sdes if test -f $ac_dir/$1; then 2949255365Sdes lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2950255365Sdes if test -n "$file_magic_test_file"; then 2951255365Sdes case $deplibs_check_method in 2952255365Sdes "file_magic "*) 2953255365Sdes file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2954255365Sdes MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2955255365Sdes if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2956255365Sdes $EGREP "$file_magic_regex" > /dev/null; then 2957255365Sdes : 2958255365Sdes else 2959255365Sdes cat <<_LT_EOF 1>&2 2960255365Sdes 2961255365Sdes*** Warning: the command libtool uses to detect shared libraries, 2962255365Sdes*** $file_magic_cmd, produces output that libtool cannot recognize. 2963255365Sdes*** The result is that libtool may fail to recognize shared libraries 2964255365Sdes*** as such. This will affect the creation of libtool libraries that 2965255365Sdes*** depend on shared libraries, but programs linked with such libtool 2966255365Sdes*** libraries will work regardless of this problem. Nevertheless, you 2967255365Sdes*** may want to report the problem to your system manager and/or to 2968255365Sdes*** bug-libtool@gnu.org 2969255365Sdes 2970255365Sdes_LT_EOF 2971255365Sdes fi ;; 2972255365Sdes esac 2973255365Sdes fi 2974255365Sdes break 2975255365Sdes fi 2976255365Sdes done 2977255365Sdes IFS="$lt_save_ifs" 2978255365Sdes MAGIC_CMD="$lt_save_MAGIC_CMD" 2979255365Sdes ;; 2980255365Sdesesac]) 2981255365SdesMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2982255365Sdesif test -n "$MAGIC_CMD"; then 2983255365Sdes AC_MSG_RESULT($MAGIC_CMD) 2984255365Sdeselse 2985255365Sdes AC_MSG_RESULT(no) 2986255365Sdesfi 2987255365Sdes_LT_DECL([], [MAGIC_CMD], [0], 2988255365Sdes [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2989255365Sdes])# _LT_PATH_TOOL_PREFIX 2990255365Sdes 2991255365Sdes# Old name: 2992255365SdesAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2993255365Sdesdnl aclocal-1.4 backwards compatibility: 2994255365Sdesdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2995255365Sdes 2996255365Sdes 2997255365Sdes# _LT_PATH_MAGIC 2998255365Sdes# -------------- 2999255365Sdes# find a file program which can recognize a shared library 3000255365Sdesm4_defun([_LT_PATH_MAGIC], 3001255365Sdes[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3002255365Sdesif test -z "$lt_cv_path_MAGIC_CMD"; then 3003255365Sdes if test -n "$ac_tool_prefix"; then 3004255365Sdes _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3005255365Sdes else 3006255365Sdes MAGIC_CMD=: 3007255365Sdes fi 3008255365Sdesfi 3009255365Sdes])# _LT_PATH_MAGIC 3010255365Sdes 3011255365Sdes 3012255365Sdes# LT_PATH_LD 3013255365Sdes# ---------- 3014255365Sdes# find the pathname to the GNU or non-GNU linker 3015255365SdesAC_DEFUN([LT_PATH_LD], 3016255365Sdes[AC_REQUIRE([AC_PROG_CC])dnl 3017255365SdesAC_REQUIRE([AC_CANONICAL_HOST])dnl 3018255365SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3019255365Sdesm4_require([_LT_DECL_SED])dnl 3020255365Sdesm4_require([_LT_DECL_EGREP])dnl 3021255365Sdesm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3022255365Sdes 3023255365SdesAC_ARG_WITH([gnu-ld], 3024255365Sdes [AS_HELP_STRING([--with-gnu-ld], 3025255365Sdes [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3026255365Sdes [test "$withval" = no || with_gnu_ld=yes], 3027255365Sdes [with_gnu_ld=no])dnl 3028255365Sdes 3029255365Sdesac_prog=ld 3030255365Sdesif test "$GCC" = yes; then 3031255365Sdes # Check if gcc -print-prog-name=ld gives a path. 3032255365Sdes AC_MSG_CHECKING([for ld used by $CC]) 3033255365Sdes case $host in 3034255365Sdes *-*-mingw*) 3035255365Sdes # gcc leaves a trailing carriage return which upsets mingw 3036255365Sdes ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3037255365Sdes *) 3038255365Sdes ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3039255365Sdes esac 3040255365Sdes case $ac_prog in 3041255365Sdes # Accept absolute paths. 3042255365Sdes [[\\/]]* | ?:[[\\/]]*) 3043255365Sdes re_direlt='/[[^/]][[^/]]*/\.\./' 3044255365Sdes # Canonicalize the pathname of ld 3045255365Sdes ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3046255365Sdes while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3047255365Sdes ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3048255365Sdes done 3049255365Sdes test -z "$LD" && LD="$ac_prog" 3050255365Sdes ;; 3051255365Sdes "") 3052255365Sdes # If it fails, then pretend we aren't using GCC. 3053255365Sdes ac_prog=ld 3054255365Sdes ;; 3055255365Sdes *) 3056255365Sdes # If it is relative, then search for the first ld in PATH. 3057255365Sdes with_gnu_ld=unknown 3058255365Sdes ;; 3059255365Sdes esac 3060255365Sdeselif test "$with_gnu_ld" = yes; then 3061255365Sdes AC_MSG_CHECKING([for GNU ld]) 3062255365Sdeselse 3063255365Sdes AC_MSG_CHECKING([for non-GNU ld]) 3064255365Sdesfi 3065255365SdesAC_CACHE_VAL(lt_cv_path_LD, 3066255365Sdes[if test -z "$LD"; then 3067255365Sdes lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3068255365Sdes for ac_dir in $PATH; do 3069255365Sdes IFS="$lt_save_ifs" 3070255365Sdes test -z "$ac_dir" && ac_dir=. 3071255365Sdes if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3072255365Sdes lt_cv_path_LD="$ac_dir/$ac_prog" 3073255365Sdes # Check to see if the program is GNU ld. I'd rather use --version, 3074255365Sdes # but apparently some variants of GNU ld only accept -v. 3075255365Sdes # Break only if it was the GNU/non-GNU ld that we prefer. 3076255365Sdes case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3077255365Sdes *GNU* | *'with BFD'*) 3078255365Sdes test "$with_gnu_ld" != no && break 3079255365Sdes ;; 3080255365Sdes *) 3081255365Sdes test "$with_gnu_ld" != yes && break 3082255365Sdes ;; 3083255365Sdes esac 3084255365Sdes fi 3085255365Sdes done 3086255365Sdes IFS="$lt_save_ifs" 3087255365Sdeselse 3088255365Sdes lt_cv_path_LD="$LD" # Let the user override the test with a path. 3089255365Sdesfi]) 3090255365SdesLD="$lt_cv_path_LD" 3091255365Sdesif test -n "$LD"; then 3092255365Sdes AC_MSG_RESULT($LD) 3093255365Sdeselse 3094255365Sdes AC_MSG_RESULT(no) 3095255365Sdesfi 3096255365Sdestest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3097255365Sdes_LT_PATH_LD_GNU 3098255365SdesAC_SUBST([LD]) 3099255365Sdes 3100255365Sdes_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3101255365Sdes])# LT_PATH_LD 3102255365Sdes 3103255365Sdes# Old names: 3104255365SdesAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3105255365SdesAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3106255365Sdesdnl aclocal-1.4 backwards compatibility: 3107255365Sdesdnl AC_DEFUN([AM_PROG_LD], []) 3108255365Sdesdnl AC_DEFUN([AC_PROG_LD], []) 3109255365Sdes 3110255365Sdes 3111255365Sdes# _LT_PATH_LD_GNU 3112255365Sdes#- -------------- 3113255365Sdesm4_defun([_LT_PATH_LD_GNU], 3114255365Sdes[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3115255365Sdes[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3116255365Sdescase `$LD -v 2>&1 </dev/null` in 3117255365Sdes*GNU* | *'with BFD'*) 3118255365Sdes lt_cv_prog_gnu_ld=yes 3119255365Sdes ;; 3120255365Sdes*) 3121255365Sdes lt_cv_prog_gnu_ld=no 3122255365Sdes ;; 3123255365Sdesesac]) 3124255365Sdeswith_gnu_ld=$lt_cv_prog_gnu_ld 3125255365Sdes])# _LT_PATH_LD_GNU 3126255365Sdes 3127255365Sdes 3128255365Sdes# _LT_CMD_RELOAD 3129255365Sdes# -------------- 3130255365Sdes# find reload flag for linker 3131255365Sdes# -- PORTME Some linkers may need a different reload flag. 3132255365Sdesm4_defun([_LT_CMD_RELOAD], 3133255365Sdes[AC_CACHE_CHECK([for $LD option to reload object files], 3134255365Sdes lt_cv_ld_reload_flag, 3135255365Sdes [lt_cv_ld_reload_flag='-r']) 3136255365Sdesreload_flag=$lt_cv_ld_reload_flag 3137255365Sdescase $reload_flag in 3138255365Sdes"" | " "*) ;; 3139255365Sdes*) reload_flag=" $reload_flag" ;; 3140255365Sdesesac 3141255365Sdesreload_cmds='$LD$reload_flag -o $output$reload_objs' 3142255365Sdescase $host_os in 3143255365Sdes cygwin* | mingw* | pw32* | cegcc*) 3144255365Sdes if test "$GCC" != yes; then 3145255365Sdes reload_cmds=false 3146255365Sdes fi 3147255365Sdes ;; 3148255365Sdes darwin*) 3149255365Sdes if test "$GCC" = yes; then 3150255365Sdes reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3151255365Sdes else 3152255365Sdes reload_cmds='$LD$reload_flag -o $output$reload_objs' 3153255365Sdes fi 3154255365Sdes ;; 3155255365Sdesesac 3156255365Sdes_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3157255365Sdes_LT_TAGDECL([], [reload_cmds], [2])dnl 3158255365Sdes])# _LT_CMD_RELOAD 3159255365Sdes 3160255365Sdes 3161255365Sdes# _LT_CHECK_MAGIC_METHOD 3162255365Sdes# ---------------------- 3163255365Sdes# how to check for library dependencies 3164255365Sdes# -- PORTME fill in with the dynamic library characteristics 3165255365Sdesm4_defun([_LT_CHECK_MAGIC_METHOD], 3166255365Sdes[m4_require([_LT_DECL_EGREP]) 3167255365Sdesm4_require([_LT_DECL_OBJDUMP]) 3168255365SdesAC_CACHE_CHECK([how to recognize dependent libraries], 3169255365Sdeslt_cv_deplibs_check_method, 3170255365Sdes[lt_cv_file_magic_cmd='$MAGIC_CMD' 3171255365Sdeslt_cv_file_magic_test_file= 3172255365Sdeslt_cv_deplibs_check_method='unknown' 3173255365Sdes# Need to set the preceding variable on all platforms that support 3174255365Sdes# interlibrary dependencies. 3175255365Sdes# 'none' -- dependencies not supported. 3176255365Sdes# `unknown' -- same as none, but documents that we really don't know. 3177255365Sdes# 'pass_all' -- all dependencies passed with no checks. 3178255365Sdes# 'test_compile' -- check by making test program. 3179255365Sdes# 'file_magic [[regex]]' -- check by looking for files in library path 3180255365Sdes# which responds to the $file_magic_cmd with a given extended regex. 3181255365Sdes# If you have `file' or equivalent on your system and you're not sure 3182255365Sdes# whether `pass_all' will *always* work, you probably want this one. 3183255365Sdes 3184255365Sdescase $host_os in 3185255365Sdesaix[[4-9]]*) 3186255365Sdes lt_cv_deplibs_check_method=pass_all 3187255365Sdes ;; 3188255365Sdes 3189255365Sdesbeos*) 3190255365Sdes lt_cv_deplibs_check_method=pass_all 3191255365Sdes ;; 3192255365Sdes 3193255365Sdesbsdi[[45]]*) 3194255365Sdes lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3195255365Sdes lt_cv_file_magic_cmd='/usr/bin/file -L' 3196255365Sdes lt_cv_file_magic_test_file=/shlib/libc.so 3197255365Sdes ;; 3198255365Sdes 3199255365Sdescygwin*) 3200255365Sdes # func_win32_libid is a shell function defined in ltmain.sh 3201255365Sdes lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3202255365Sdes lt_cv_file_magic_cmd='func_win32_libid' 3203255365Sdes ;; 3204255365Sdes 3205255365Sdesmingw* | pw32*) 3206255365Sdes # Base MSYS/MinGW do not provide the 'file' command needed by 3207255365Sdes # func_win32_libid shell function, so use a weaker test based on 'objdump', 3208255365Sdes # unless we find 'file', for example because we are cross-compiling. 3209255365Sdes # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3210255365Sdes if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3211255365Sdes lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3212255365Sdes lt_cv_file_magic_cmd='func_win32_libid' 3213255365Sdes else 3214255365Sdes # Keep this pattern in sync with the one in func_win32_libid. 3215255365Sdes lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3216255365Sdes lt_cv_file_magic_cmd='$OBJDUMP -f' 3217255365Sdes fi 3218255365Sdes ;; 3219255365Sdes 3220255365Sdescegcc*) 3221255365Sdes # use the weaker test based on 'objdump'. See mingw*. 3222255365Sdes lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3223255365Sdes lt_cv_file_magic_cmd='$OBJDUMP -f' 3224255365Sdes ;; 3225255365Sdes 3226255365Sdesdarwin* | rhapsody*) 3227255365Sdes lt_cv_deplibs_check_method=pass_all 3228255365Sdes ;; 3229255365Sdes 3230255365Sdesfreebsd* | dragonfly*) 3231255365Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3232255365Sdes case $host_cpu in 3233255365Sdes i*86 ) 3234255365Sdes # Not sure whether the presence of OpenBSD here was a mistake. 3235255365Sdes # Let's accept both of them until this is cleared up. 3236255365Sdes lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3237255365Sdes lt_cv_file_magic_cmd=/usr/bin/file 3238255365Sdes lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3239255365Sdes ;; 3240255365Sdes esac 3241255365Sdes else 3242255365Sdes lt_cv_deplibs_check_method=pass_all 3243255365Sdes fi 3244255365Sdes ;; 3245255365Sdes 3246255365Sdesgnu*) 3247255365Sdes lt_cv_deplibs_check_method=pass_all 3248255365Sdes ;; 3249255365Sdes 3250255365Sdeshaiku*) 3251255365Sdes lt_cv_deplibs_check_method=pass_all 3252255365Sdes ;; 3253255365Sdes 3254255365Sdeshpux10.20* | hpux11*) 3255255365Sdes lt_cv_file_magic_cmd=/usr/bin/file 3256255365Sdes case $host_cpu in 3257255365Sdes ia64*) 3258255365Sdes lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3259255365Sdes lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3260255365Sdes ;; 3261255365Sdes hppa*64*) 3262255365Sdes [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]'] 3263255365Sdes lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3264255365Sdes ;; 3265255365Sdes *) 3266255365Sdes lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3267255365Sdes lt_cv_file_magic_test_file=/usr/lib/libc.sl 3268255365Sdes ;; 3269255365Sdes esac 3270255365Sdes ;; 3271255365Sdes 3272255365Sdesinterix[[3-9]]*) 3273255365Sdes # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3274255365Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3275255365Sdes ;; 3276255365Sdes 3277255365Sdesirix5* | irix6* | nonstopux*) 3278255365Sdes case $LD in 3279255365Sdes *-32|*"-32 ") libmagic=32-bit;; 3280255365Sdes *-n32|*"-n32 ") libmagic=N32;; 3281255365Sdes *-64|*"-64 ") libmagic=64-bit;; 3282255365Sdes *) libmagic=never-match;; 3283255365Sdes esac 3284255365Sdes lt_cv_deplibs_check_method=pass_all 3285255365Sdes ;; 3286255365Sdes 3287255365Sdes# This must be glibc/ELF. 3288255365Sdeslinux* | k*bsd*-gnu | kopensolaris*-gnu) 3289255365Sdes lt_cv_deplibs_check_method=pass_all 3290255365Sdes ;; 3291255365Sdes 3292255365Sdesnetbsd*) 3293255365Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3294255365Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3295255365Sdes else 3296255365Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3297255365Sdes fi 3298255365Sdes ;; 3299255365Sdes 3300255365Sdesnewos6*) 3301255365Sdes lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3302255365Sdes lt_cv_file_magic_cmd=/usr/bin/file 3303255365Sdes lt_cv_file_magic_test_file=/usr/lib/libnls.so 3304255365Sdes ;; 3305255365Sdes 3306255365Sdes*nto* | *qnx*) 3307255365Sdes lt_cv_deplibs_check_method=pass_all 3308255365Sdes ;; 3309255365Sdes 3310255365Sdesopenbsd*) 3311255365Sdes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3312255365Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3313255365Sdes else 3314255365Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3315255365Sdes fi 3316255365Sdes ;; 3317255365Sdes 3318255365Sdesosf3* | osf4* | osf5*) 3319255365Sdes lt_cv_deplibs_check_method=pass_all 3320255365Sdes ;; 3321255365Sdes 3322255365Sdesrdos*) 3323255365Sdes lt_cv_deplibs_check_method=pass_all 3324255365Sdes ;; 3325255365Sdes 3326255365Sdessolaris*) 3327255365Sdes lt_cv_deplibs_check_method=pass_all 3328255365Sdes ;; 3329255365Sdes 3330255365Sdessysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3331255365Sdes lt_cv_deplibs_check_method=pass_all 3332255365Sdes ;; 3333255365Sdes 3334255365Sdessysv4 | sysv4.3*) 3335255365Sdes case $host_vendor in 3336255365Sdes motorola) 3337255365Sdes 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]]' 3338255365Sdes lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3339255365Sdes ;; 3340255365Sdes ncr) 3341255365Sdes lt_cv_deplibs_check_method=pass_all 3342255365Sdes ;; 3343255365Sdes sequent) 3344255365Sdes lt_cv_file_magic_cmd='/bin/file' 3345255365Sdes lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3346255365Sdes ;; 3347255365Sdes sni) 3348255365Sdes lt_cv_file_magic_cmd='/bin/file' 3349255365Sdes lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3350255365Sdes lt_cv_file_magic_test_file=/lib/libc.so 3351255365Sdes ;; 3352255365Sdes siemens) 3353255365Sdes lt_cv_deplibs_check_method=pass_all 3354255365Sdes ;; 3355255365Sdes pc) 3356255365Sdes lt_cv_deplibs_check_method=pass_all 3357255365Sdes ;; 3358255365Sdes esac 3359255365Sdes ;; 3360255365Sdes 3361255365Sdestpf*) 3362255365Sdes lt_cv_deplibs_check_method=pass_all 3363255365Sdes ;; 3364255365Sdesesac 3365255365Sdes]) 3366255365Sdes 3367255365Sdesfile_magic_glob= 3368255365Sdeswant_nocaseglob=no 3369255365Sdesif test "$build" = "$host"; then 3370255365Sdes case $host_os in 3371255365Sdes mingw* | pw32*) 3372255365Sdes if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3373255365Sdes want_nocaseglob=yes 3374255365Sdes else 3375255365Sdes file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3376255365Sdes fi 3377255365Sdes ;; 3378255365Sdes esac 3379255365Sdesfi 3380255365Sdes 3381255365Sdesfile_magic_cmd=$lt_cv_file_magic_cmd 3382255365Sdesdeplibs_check_method=$lt_cv_deplibs_check_method 3383255365Sdestest -z "$deplibs_check_method" && deplibs_check_method=unknown 3384255365Sdes 3385255365Sdes_LT_DECL([], [deplibs_check_method], [1], 3386255365Sdes [Method to check whether dependent libraries are shared objects]) 3387255365Sdes_LT_DECL([], [file_magic_cmd], [1], 3388255365Sdes [Command to use when deplibs_check_method = "file_magic"]) 3389255365Sdes_LT_DECL([], [file_magic_glob], [1], 3390255365Sdes [How to find potential files when deplibs_check_method = "file_magic"]) 3391255365Sdes_LT_DECL([], [want_nocaseglob], [1], 3392255365Sdes [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3393255365Sdes])# _LT_CHECK_MAGIC_METHOD 3394255365Sdes 3395255365Sdes 3396255365Sdes# LT_PATH_NM 3397255365Sdes# ---------- 3398255365Sdes# find the pathname to a BSD- or MS-compatible name lister 3399255365SdesAC_DEFUN([LT_PATH_NM], 3400255365Sdes[AC_REQUIRE([AC_PROG_CC])dnl 3401255365SdesAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3402255365Sdes[if test -n "$NM"; then 3403255365Sdes # Let the user override the test. 3404255365Sdes lt_cv_path_NM="$NM" 3405255365Sdeselse 3406255365Sdes lt_nm_to_check="${ac_tool_prefix}nm" 3407255365Sdes if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3408255365Sdes lt_nm_to_check="$lt_nm_to_check nm" 3409255365Sdes fi 3410255365Sdes for lt_tmp_nm in $lt_nm_to_check; do 3411255365Sdes lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3412255365Sdes for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3413255365Sdes IFS="$lt_save_ifs" 3414255365Sdes test -z "$ac_dir" && ac_dir=. 3415255365Sdes tmp_nm="$ac_dir/$lt_tmp_nm" 3416255365Sdes if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3417255365Sdes # Check to see if the nm accepts a BSD-compat flag. 3418255365Sdes # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3419255365Sdes # nm: unknown option "B" ignored 3420255365Sdes # Tru64's nm complains that /dev/null is an invalid object file 3421255365Sdes case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3422255365Sdes */dev/null* | *'Invalid file or object type'*) 3423255365Sdes lt_cv_path_NM="$tmp_nm -B" 3424255365Sdes break 3425255365Sdes ;; 3426255365Sdes *) 3427255365Sdes case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3428255365Sdes */dev/null*) 3429255365Sdes lt_cv_path_NM="$tmp_nm -p" 3430255365Sdes break 3431255365Sdes ;; 3432255365Sdes *) 3433255365Sdes lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3434255365Sdes continue # so that we can try to find one that supports BSD flags 3435255365Sdes ;; 3436255365Sdes esac 3437255365Sdes ;; 3438255365Sdes esac 3439255365Sdes fi 3440255365Sdes done 3441255365Sdes IFS="$lt_save_ifs" 3442255365Sdes done 3443255365Sdes : ${lt_cv_path_NM=no} 3444255365Sdesfi]) 3445255365Sdesif test "$lt_cv_path_NM" != "no"; then 3446255365Sdes NM="$lt_cv_path_NM" 3447255365Sdeselse 3448255365Sdes # Didn't find any BSD compatible name lister, look for dumpbin. 3449255365Sdes if test -n "$DUMPBIN"; then : 3450255365Sdes # Let the user override the test. 3451255365Sdes else 3452255365Sdes AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3453255365Sdes case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3454255365Sdes *COFF*) 3455255365Sdes DUMPBIN="$DUMPBIN -symbols" 3456255365Sdes ;; 3457255365Sdes *) 3458255365Sdes DUMPBIN=: 3459255365Sdes ;; 3460255365Sdes esac 3461255365Sdes fi 3462255365Sdes AC_SUBST([DUMPBIN]) 3463255365Sdes if test "$DUMPBIN" != ":"; then 3464255365Sdes NM="$DUMPBIN" 3465255365Sdes fi 3466255365Sdesfi 3467255365Sdestest -z "$NM" && NM=nm 3468255365SdesAC_SUBST([NM]) 3469255365Sdes_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3470255365Sdes 3471255365SdesAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3472255365Sdes [lt_cv_nm_interface="BSD nm" 3473255365Sdes echo "int some_variable = 0;" > conftest.$ac_ext 3474255365Sdes (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3475255365Sdes (eval "$ac_compile" 2>conftest.err) 3476255365Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 3477255365Sdes (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3478255365Sdes (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3479255365Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 3480255365Sdes (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3481255365Sdes cat conftest.out >&AS_MESSAGE_LOG_FD 3482255365Sdes if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3483255365Sdes lt_cv_nm_interface="MS dumpbin" 3484255365Sdes fi 3485255365Sdes rm -f conftest*]) 3486255365Sdes])# LT_PATH_NM 3487255365Sdes 3488255365Sdes# Old names: 3489255365SdesAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3490255365SdesAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3491255365Sdesdnl aclocal-1.4 backwards compatibility: 3492255365Sdesdnl AC_DEFUN([AM_PROG_NM], []) 3493255365Sdesdnl AC_DEFUN([AC_PROG_NM], []) 3494255365Sdes 3495255365Sdes# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3496255365Sdes# -------------------------------- 3497255365Sdes# how to determine the name of the shared library 3498255365Sdes# associated with a specific link library. 3499255365Sdes# -- PORTME fill in with the dynamic library characteristics 3500255365Sdesm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3501255365Sdes[m4_require([_LT_DECL_EGREP]) 3502255365Sdesm4_require([_LT_DECL_OBJDUMP]) 3503255365Sdesm4_require([_LT_DECL_DLLTOOL]) 3504255365SdesAC_CACHE_CHECK([how to associate runtime and link libraries], 3505255365Sdeslt_cv_sharedlib_from_linklib_cmd, 3506255365Sdes[lt_cv_sharedlib_from_linklib_cmd='unknown' 3507255365Sdes 3508255365Sdescase $host_os in 3509255365Sdescygwin* | mingw* | pw32* | cegcc*) 3510255365Sdes # two different shell functions defined in ltmain.sh 3511255365Sdes # decide which to use based on capabilities of $DLLTOOL 3512255365Sdes case `$DLLTOOL --help 2>&1` in 3513255365Sdes *--identify-strict*) 3514255365Sdes lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3515255365Sdes ;; 3516255365Sdes *) 3517255365Sdes lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3518255365Sdes ;; 3519255365Sdes esac 3520255365Sdes ;; 3521255365Sdes*) 3522255365Sdes # fallback: assume linklib IS sharedlib 3523255365Sdes lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3524255365Sdes ;; 3525255365Sdesesac 3526255365Sdes]) 3527255365Sdessharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3528255365Sdestest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3529255365Sdes 3530255365Sdes_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3531255365Sdes [Command to associate shared and link libraries]) 3532255365Sdes])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3533255365Sdes 3534255365Sdes 3535255365Sdes# _LT_PATH_MANIFEST_TOOL 3536255365Sdes# ---------------------- 3537255365Sdes# locate the manifest tool 3538255365Sdesm4_defun([_LT_PATH_MANIFEST_TOOL], 3539255365Sdes[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3540255365Sdestest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3541255365SdesAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3542255365Sdes [lt_cv_path_mainfest_tool=no 3543255365Sdes echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3544255365Sdes $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3545255365Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 3546255365Sdes if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3547255365Sdes lt_cv_path_mainfest_tool=yes 3548255365Sdes fi 3549255365Sdes rm -f conftest*]) 3550255365Sdesif test "x$lt_cv_path_mainfest_tool" != xyes; then 3551255365Sdes MANIFEST_TOOL=: 3552255365Sdesfi 3553255365Sdes_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3554255365Sdes])# _LT_PATH_MANIFEST_TOOL 3555255365Sdes 3556255365Sdes 3557255365Sdes# LT_LIB_M 3558255365Sdes# -------- 3559255365Sdes# check for math library 3560255365SdesAC_DEFUN([LT_LIB_M], 3561255365Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3562255365SdesLIBM= 3563255365Sdescase $host in 3564255365Sdes*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3565255365Sdes # These system don't have libm, or don't need it 3566255365Sdes ;; 3567255365Sdes*-ncr-sysv4.3*) 3568255365Sdes AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3569255365Sdes AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3570255365Sdes ;; 3571255365Sdes*) 3572255365Sdes AC_CHECK_LIB(m, cos, LIBM="-lm") 3573255365Sdes ;; 3574255365Sdesesac 3575255365SdesAC_SUBST([LIBM]) 3576255365Sdes])# LT_LIB_M 3577255365Sdes 3578255365Sdes# Old name: 3579255365SdesAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3580255365Sdesdnl aclocal-1.4 backwards compatibility: 3581255365Sdesdnl AC_DEFUN([AC_CHECK_LIBM], []) 3582255365Sdes 3583255365Sdes 3584255365Sdes# _LT_COMPILER_NO_RTTI([TAGNAME]) 3585255365Sdes# ------------------------------- 3586255365Sdesm4_defun([_LT_COMPILER_NO_RTTI], 3587255365Sdes[m4_require([_LT_TAG_COMPILER])dnl 3588255365Sdes 3589255365Sdes_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3590255365Sdes 3591255365Sdesif test "$GCC" = yes; then 3592255365Sdes case $cc_basename in 3593255365Sdes nvcc*) 3594255365Sdes _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3595255365Sdes *) 3596255365Sdes _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3597255365Sdes esac 3598255365Sdes 3599255365Sdes _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3600255365Sdes lt_cv_prog_compiler_rtti_exceptions, 3601255365Sdes [-fno-rtti -fno-exceptions], [], 3602255365Sdes [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3603255365Sdesfi 3604255365Sdes_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3605255365Sdes [Compiler flag to turn off builtin functions]) 3606255365Sdes])# _LT_COMPILER_NO_RTTI 3607255365Sdes 3608255365Sdes 3609255365Sdes# _LT_CMD_GLOBAL_SYMBOLS 3610255365Sdes# ---------------------- 3611255365Sdesm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3612255365Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3613255365SdesAC_REQUIRE([AC_PROG_CC])dnl 3614255365SdesAC_REQUIRE([AC_PROG_AWK])dnl 3615255365SdesAC_REQUIRE([LT_PATH_NM])dnl 3616255365SdesAC_REQUIRE([LT_PATH_LD])dnl 3617255365Sdesm4_require([_LT_DECL_SED])dnl 3618255365Sdesm4_require([_LT_DECL_EGREP])dnl 3619255365Sdesm4_require([_LT_TAG_COMPILER])dnl 3620255365Sdes 3621255365Sdes# Check for command to grab the raw symbol name followed by C symbol from nm. 3622255365SdesAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3623255365SdesAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3624255365Sdes[ 3625255365Sdes# These are sane defaults that work on at least a few old systems. 3626255365Sdes# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3627255365Sdes 3628255365Sdes# Character class describing NM global symbol codes. 3629255365Sdessymcode='[[BCDEGRST]]' 3630255365Sdes 3631255365Sdes# Regexp to match symbols that can be accessed directly from C. 3632255365Sdessympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3633255365Sdes 3634255365Sdes# Define system-specific variables. 3635255365Sdescase $host_os in 3636255365Sdesaix*) 3637255365Sdes symcode='[[BCDT]]' 3638255365Sdes ;; 3639255365Sdescygwin* | mingw* | pw32* | cegcc*) 3640255365Sdes symcode='[[ABCDGISTW]]' 3641255365Sdes ;; 3642255365Sdeshpux*) 3643255365Sdes if test "$host_cpu" = ia64; then 3644255365Sdes symcode='[[ABCDEGRST]]' 3645255365Sdes fi 3646255365Sdes ;; 3647255365Sdesirix* | nonstopux*) 3648255365Sdes symcode='[[BCDEGRST]]' 3649255365Sdes ;; 3650255365Sdesosf*) 3651255365Sdes symcode='[[BCDEGQRST]]' 3652255365Sdes ;; 3653255365Sdessolaris*) 3654255365Sdes symcode='[[BDRT]]' 3655255365Sdes ;; 3656255365Sdessco3.2v5*) 3657255365Sdes symcode='[[DT]]' 3658255365Sdes ;; 3659255365Sdessysv4.2uw2*) 3660255365Sdes symcode='[[DT]]' 3661255365Sdes ;; 3662255365Sdessysv5* | sco5v6* | unixware* | OpenUNIX*) 3663255365Sdes symcode='[[ABDT]]' 3664255365Sdes ;; 3665255365Sdessysv4) 3666255365Sdes symcode='[[DFNSTU]]' 3667255365Sdes ;; 3668255365Sdesesac 3669255365Sdes 3670255365Sdes# If we're using GNU nm, then use its standard symbol codes. 3671255365Sdescase `$NM -V 2>&1` in 3672255365Sdes*GNU* | *'with BFD'*) 3673255365Sdes symcode='[[ABCDGIRSTW]]' ;; 3674255365Sdesesac 3675255365Sdes 3676255365Sdes# Transform an extracted symbol line into a proper C declaration. 3677255365Sdes# Some systems (esp. on ia64) link data and code symbols differently, 3678255365Sdes# so use this general approach. 3679255365Sdeslt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3680255365Sdes 3681255365Sdes# Transform an extracted symbol line into symbol name and symbol address 3682255365Sdeslt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3683255365Sdeslt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 3684255365Sdes 3685255365Sdes# Handle CRLF in mingw tool chain 3686255365Sdesopt_cr= 3687255365Sdescase $build_os in 3688255365Sdesmingw*) 3689255365Sdes opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3690255365Sdes ;; 3691255365Sdesesac 3692255365Sdes 3693255365Sdes# Try without a prefix underscore, then with it. 3694255365Sdesfor ac_symprfx in "" "_"; do 3695255365Sdes 3696255365Sdes # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3697255365Sdes symxfrm="\\1 $ac_symprfx\\2 \\2" 3698255365Sdes 3699255365Sdes # Write the raw and C identifiers. 3700255365Sdes if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3701255365Sdes # Fake it for dumpbin and say T for any non-static function 3702255365Sdes # and D for any global variable. 3703255365Sdes # Also find C++ and __fastcall symbols from MSVC++, 3704255365Sdes # which start with @ or ?. 3705255365Sdes lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3706255365Sdes" {last_section=section; section=\$ 3};"\ 3707255365Sdes" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3708255365Sdes" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3709255365Sdes" \$ 0!~/External *\|/{next};"\ 3710255365Sdes" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3711255365Sdes" {if(hide[section]) next};"\ 3712255365Sdes" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3713255365Sdes" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3714255365Sdes" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3715255365Sdes" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3716255365Sdes" ' prfx=^$ac_symprfx]" 3717255365Sdes else 3718255365Sdes lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3719255365Sdes fi 3720255365Sdes lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3721255365Sdes 3722255365Sdes # Check to see that the pipe works correctly. 3723255365Sdes pipe_works=no 3724255365Sdes 3725255365Sdes rm -f conftest* 3726255365Sdes cat > conftest.$ac_ext <<_LT_EOF 3727255365Sdes#ifdef __cplusplus 3728255365Sdesextern "C" { 3729255365Sdes#endif 3730255365Sdeschar nm_test_var; 3731255365Sdesvoid nm_test_func(void); 3732255365Sdesvoid nm_test_func(void){} 3733255365Sdes#ifdef __cplusplus 3734255365Sdes} 3735255365Sdes#endif 3736255365Sdesint main(){nm_test_var='a';nm_test_func();return(0);} 3737255365Sdes_LT_EOF 3738255365Sdes 3739255365Sdes if AC_TRY_EVAL(ac_compile); then 3740255365Sdes # Now try to grab the symbols. 3741255365Sdes nlist=conftest.nm 3742255365Sdes if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3743255365Sdes # Try sorting and uniquifying the output. 3744255365Sdes if sort "$nlist" | uniq > "$nlist"T; then 3745255365Sdes mv -f "$nlist"T "$nlist" 3746255365Sdes else 3747255365Sdes rm -f "$nlist"T 3748255365Sdes fi 3749255365Sdes 3750255365Sdes # Make sure that we snagged all the symbols we need. 3751255365Sdes if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3752255365Sdes if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3753255365Sdes cat <<_LT_EOF > conftest.$ac_ext 3754255365Sdes/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3755255365Sdes#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3756255365Sdes/* DATA imports from DLLs on WIN32 con't be const, because runtime 3757255365Sdes relocations are performed -- see ld's documentation on pseudo-relocs. */ 3758255365Sdes# define LT@&t@_DLSYM_CONST 3759255365Sdes#elif defined(__osf__) 3760255365Sdes/* This system does not cope well with relocations in const data. */ 3761255365Sdes# define LT@&t@_DLSYM_CONST 3762255365Sdes#else 3763255365Sdes# define LT@&t@_DLSYM_CONST const 3764255365Sdes#endif 3765255365Sdes 3766255365Sdes#ifdef __cplusplus 3767255365Sdesextern "C" { 3768255365Sdes#endif 3769255365Sdes 3770255365Sdes_LT_EOF 3771255365Sdes # Now generate the symbol file. 3772255365Sdes eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3773255365Sdes 3774255365Sdes cat <<_LT_EOF >> conftest.$ac_ext 3775255365Sdes 3776255365Sdes/* The mapping between symbol names and symbols. */ 3777255365SdesLT@&t@_DLSYM_CONST struct { 3778255365Sdes const char *name; 3779255365Sdes void *address; 3780255365Sdes} 3781255365Sdeslt__PROGRAM__LTX_preloaded_symbols[[]] = 3782255365Sdes{ 3783255365Sdes { "@PROGRAM@", (void *) 0 }, 3784255365Sdes_LT_EOF 3785255365Sdes $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3786255365Sdes cat <<\_LT_EOF >> conftest.$ac_ext 3787255365Sdes {0, (void *) 0} 3788255365Sdes}; 3789255365Sdes 3790255365Sdes/* This works around a problem in FreeBSD linker */ 3791255365Sdes#ifdef FREEBSD_WORKAROUND 3792255365Sdesstatic const void *lt_preloaded_setup() { 3793255365Sdes return lt__PROGRAM__LTX_preloaded_symbols; 3794255365Sdes} 3795255365Sdes#endif 3796255365Sdes 3797255365Sdes#ifdef __cplusplus 3798255365Sdes} 3799255365Sdes#endif 3800255365Sdes_LT_EOF 3801255365Sdes # Now try linking the two files. 3802255365Sdes mv conftest.$ac_objext conftstm.$ac_objext 3803255365Sdes lt_globsym_save_LIBS=$LIBS 3804255365Sdes lt_globsym_save_CFLAGS=$CFLAGS 3805255365Sdes LIBS="conftstm.$ac_objext" 3806255365Sdes CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3807255365Sdes if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3808255365Sdes pipe_works=yes 3809255365Sdes fi 3810255365Sdes LIBS=$lt_globsym_save_LIBS 3811255365Sdes CFLAGS=$lt_globsym_save_CFLAGS 3812255365Sdes else 3813255365Sdes echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3814255365Sdes fi 3815255365Sdes else 3816255365Sdes echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3817255365Sdes fi 3818255365Sdes else 3819255365Sdes echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3820255365Sdes fi 3821255365Sdes else 3822255365Sdes echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3823255365Sdes cat conftest.$ac_ext >&5 3824255365Sdes fi 3825255365Sdes rm -rf conftest* conftst* 3826255365Sdes 3827255365Sdes # Do not use the global_symbol_pipe unless it works. 3828255365Sdes if test "$pipe_works" = yes; then 3829255365Sdes break 3830255365Sdes else 3831255365Sdes lt_cv_sys_global_symbol_pipe= 3832255365Sdes fi 3833255365Sdesdone 3834255365Sdes]) 3835255365Sdesif test -z "$lt_cv_sys_global_symbol_pipe"; then 3836255365Sdes lt_cv_sys_global_symbol_to_cdecl= 3837255365Sdesfi 3838255365Sdesif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3839255365Sdes AC_MSG_RESULT(failed) 3840255365Sdeselse 3841255365Sdes AC_MSG_RESULT(ok) 3842255365Sdesfi 3843255365Sdes 3844255365Sdes# Response file support. 3845255365Sdesif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3846255365Sdes nm_file_list_spec='@' 3847255365Sdeselif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3848255365Sdes nm_file_list_spec='@' 3849255365Sdesfi 3850255365Sdes 3851255365Sdes_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3852255365Sdes [Take the output of nm and produce a listing of raw symbols and C names]) 3853255365Sdes_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3854255365Sdes [Transform the output of nm in a proper C declaration]) 3855255365Sdes_LT_DECL([global_symbol_to_c_name_address], 3856255365Sdes [lt_cv_sys_global_symbol_to_c_name_address], [1], 3857255365Sdes [Transform the output of nm in a C name address pair]) 3858255365Sdes_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3859255365Sdes [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3860255365Sdes [Transform the output of nm in a C name address pair when lib prefix is needed]) 3861255365Sdes_LT_DECL([], [nm_file_list_spec], [1], 3862255365Sdes [Specify filename containing input files for $NM]) 3863255365Sdes]) # _LT_CMD_GLOBAL_SYMBOLS 3864255365Sdes 3865255365Sdes 3866255365Sdes# _LT_COMPILER_PIC([TAGNAME]) 3867255365Sdes# --------------------------- 3868255365Sdesm4_defun([_LT_COMPILER_PIC], 3869255365Sdes[m4_require([_LT_TAG_COMPILER])dnl 3870255365Sdes_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3871255365Sdes_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3872255365Sdes_LT_TAGVAR(lt_prog_compiler_static, $1)= 3873255365Sdes 3874255365Sdesm4_if([$1], [CXX], [ 3875255365Sdes # C++ specific cases for pic, static, wl, etc. 3876255365Sdes if test "$GXX" = yes; then 3877255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3878255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3879255365Sdes 3880255365Sdes case $host_os in 3881255365Sdes aix*) 3882255365Sdes # All AIX code is PIC. 3883255365Sdes if test "$host_cpu" = ia64; then 3884255365Sdes # AIX 5 now supports IA64 processor 3885255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3886255365Sdes fi 3887255365Sdes ;; 3888255365Sdes 3889255365Sdes amigaos*) 3890255365Sdes case $host_cpu in 3891255365Sdes powerpc) 3892255365Sdes # see comment about AmigaOS4 .so support 3893255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3894255365Sdes ;; 3895255365Sdes m68k) 3896255365Sdes # FIXME: we need at least 68020 code to build shared libraries, but 3897255365Sdes # adding the `-m68020' flag to GCC prevents building anything better, 3898255365Sdes # like `-m68040'. 3899255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3900255365Sdes ;; 3901255365Sdes esac 3902255365Sdes ;; 3903255365Sdes 3904255365Sdes beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3905255365Sdes # PIC is the default for these OSes. 3906255365Sdes ;; 3907255365Sdes mingw* | cygwin* | os2* | pw32* | cegcc*) 3908255365Sdes # This hack is so that the source file can tell whether it is being 3909255365Sdes # built for inclusion in a dll (and should export symbols for example). 3910255365Sdes # Although the cygwin gcc ignores -fPIC, still need this for old-style 3911255365Sdes # (--disable-auto-import) libraries 3912255365Sdes m4_if([$1], [GCJ], [], 3913255365Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3914255365Sdes ;; 3915255365Sdes darwin* | rhapsody*) 3916255365Sdes # PIC is the default on this platform 3917255365Sdes # Common symbols not allowed in MH_DYLIB files 3918255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3919255365Sdes ;; 3920255365Sdes *djgpp*) 3921255365Sdes # DJGPP does not support shared libraries at all 3922255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3923255365Sdes ;; 3924255365Sdes haiku*) 3925255365Sdes # PIC is the default for Haiku. 3926255365Sdes # The "-static" flag exists, but is broken. 3927255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)= 3928255365Sdes ;; 3929255365Sdes interix[[3-9]]*) 3930255365Sdes # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3931255365Sdes # Instead, we relocate shared libraries at runtime. 3932255365Sdes ;; 3933255365Sdes sysv4*MP*) 3934255365Sdes if test -d /usr/nec; then 3935255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3936255365Sdes fi 3937255365Sdes ;; 3938255365Sdes hpux*) 3939255365Sdes # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3940255365Sdes # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3941255365Sdes # sets the default TLS model and affects inlining. 3942255365Sdes case $host_cpu in 3943255365Sdes hppa*64*) 3944255365Sdes ;; 3945255365Sdes *) 3946255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3947255365Sdes ;; 3948255365Sdes esac 3949255365Sdes ;; 3950255365Sdes *qnx* | *nto*) 3951255365Sdes # QNX uses GNU C++, but need to define -shared option too, otherwise 3952255365Sdes # it will coredump. 3953255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3954255365Sdes ;; 3955255365Sdes *) 3956255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3957255365Sdes ;; 3958255365Sdes esac 3959255365Sdes else 3960255365Sdes case $host_os in 3961255365Sdes aix[[4-9]]*) 3962255365Sdes # All AIX code is PIC. 3963255365Sdes if test "$host_cpu" = ia64; then 3964255365Sdes # AIX 5 now supports IA64 processor 3965255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3966255365Sdes else 3967255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3968255365Sdes fi 3969255365Sdes ;; 3970255365Sdes chorus*) 3971255365Sdes case $cc_basename in 3972255365Sdes cxch68*) 3973255365Sdes # Green Hills C++ Compiler 3974255365Sdes # _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" 3975255365Sdes ;; 3976255365Sdes esac 3977255365Sdes ;; 3978255365Sdes mingw* | cygwin* | os2* | pw32* | cegcc*) 3979255365Sdes # This hack is so that the source file can tell whether it is being 3980255365Sdes # built for inclusion in a dll (and should export symbols for example). 3981255365Sdes m4_if([$1], [GCJ], [], 3982255365Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3983255365Sdes ;; 3984255365Sdes dgux*) 3985255365Sdes case $cc_basename in 3986255365Sdes ec++*) 3987255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3988255365Sdes ;; 3989255365Sdes ghcx*) 3990255365Sdes # Green Hills C++ Compiler 3991255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3992255365Sdes ;; 3993255365Sdes *) 3994255365Sdes ;; 3995255365Sdes esac 3996255365Sdes ;; 3997255365Sdes freebsd* | dragonfly*) 3998255365Sdes # FreeBSD uses GNU C++ 3999255365Sdes ;; 4000255365Sdes hpux9* | hpux10* | hpux11*) 4001255365Sdes case $cc_basename in 4002255365Sdes CC*) 4003255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4004255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4005255365Sdes if test "$host_cpu" != ia64; then 4006255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4007255365Sdes fi 4008255365Sdes ;; 4009255365Sdes aCC*) 4010255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4011255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4012255365Sdes case $host_cpu in 4013255365Sdes hppa*64*|ia64*) 4014255365Sdes # +Z the default 4015255365Sdes ;; 4016255365Sdes *) 4017255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4018255365Sdes ;; 4019255365Sdes esac 4020255365Sdes ;; 4021255365Sdes *) 4022255365Sdes ;; 4023255365Sdes esac 4024255365Sdes ;; 4025255365Sdes interix*) 4026255365Sdes # This is c89, which is MS Visual C++ (no shared libs) 4027255365Sdes # Anyone wants to do a port? 4028255365Sdes ;; 4029255365Sdes irix5* | irix6* | nonstopux*) 4030255365Sdes case $cc_basename in 4031255365Sdes CC*) 4032255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4033255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4034255365Sdes # CC pic flag -KPIC is the default. 4035255365Sdes ;; 4036255365Sdes *) 4037255365Sdes ;; 4038255365Sdes esac 4039255365Sdes ;; 4040255365Sdes linux* | k*bsd*-gnu | kopensolaris*-gnu) 4041255365Sdes case $cc_basename in 4042255365Sdes KCC*) 4043255365Sdes # KAI C++ Compiler 4044255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4045255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4046255365Sdes ;; 4047255365Sdes ecpc* ) 4048255365Sdes # old Intel C++ for x86_64 which still supported -KPIC. 4049255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4050255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4051255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4052255365Sdes ;; 4053255365Sdes icpc* ) 4054255365Sdes # Intel C++, used to be incompatible with GCC. 4055255365Sdes # ICC 10 doesn't accept -KPIC any more. 4056255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4057255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4058255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4059255365Sdes ;; 4060255365Sdes pgCC* | pgcpp*) 4061255365Sdes # Portland Group C++ compiler 4062255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4063255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4064255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4065255365Sdes ;; 4066255365Sdes cxx*) 4067255365Sdes # Compaq C++ 4068255365Sdes # Make sure the PIC flag is empty. It appears that all Alpha 4069255365Sdes # Linux and Compaq Tru64 Unix objects are PIC. 4070255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4071255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4072255365Sdes ;; 4073255365Sdes xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4074255365Sdes # IBM XL 8.0, 9.0 on PPC and BlueGene 4075255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4076255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4077255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4078255365Sdes ;; 4079255365Sdes *) 4080255365Sdes case `$CC -V 2>&1 | sed 5q` in 4081255365Sdes *Sun\ C*) 4082255365Sdes # Sun C++ 5.9 4083255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4084255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4085255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4086255365Sdes ;; 4087255365Sdes esac 4088255365Sdes ;; 4089255365Sdes esac 4090255365Sdes ;; 4091255365Sdes lynxos*) 4092255365Sdes ;; 4093255365Sdes m88k*) 4094255365Sdes ;; 4095255365Sdes mvs*) 4096255365Sdes case $cc_basename in 4097255365Sdes cxx*) 4098255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4099255365Sdes ;; 4100255365Sdes *) 4101255365Sdes ;; 4102255365Sdes esac 4103255365Sdes ;; 4104255365Sdes netbsd*) 4105255365Sdes ;; 4106255365Sdes *qnx* | *nto*) 4107255365Sdes # QNX uses GNU C++, but need to define -shared option too, otherwise 4108255365Sdes # it will coredump. 4109255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4110255365Sdes ;; 4111255365Sdes osf3* | osf4* | osf5*) 4112255365Sdes case $cc_basename in 4113255365Sdes KCC*) 4114255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4115255365Sdes ;; 4116255365Sdes RCC*) 4117255365Sdes # Rational C++ 2.4.1 4118255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4119255365Sdes ;; 4120255365Sdes cxx*) 4121255365Sdes # Digital/Compaq C++ 4122255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4123255365Sdes # Make sure the PIC flag is empty. It appears that all Alpha 4124255365Sdes # Linux and Compaq Tru64 Unix objects are PIC. 4125255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4126255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4127255365Sdes ;; 4128255365Sdes *) 4129255365Sdes ;; 4130255365Sdes esac 4131255365Sdes ;; 4132255365Sdes psos*) 4133255365Sdes ;; 4134255365Sdes solaris*) 4135255365Sdes case $cc_basename in 4136255365Sdes CC* | sunCC*) 4137255365Sdes # Sun C++ 4.2, 5.x and Centerline C++ 4138255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4139255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4140255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4141255365Sdes ;; 4142255365Sdes gcx*) 4143255365Sdes # Green Hills C++ Compiler 4144255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4145255365Sdes ;; 4146255365Sdes *) 4147255365Sdes ;; 4148255365Sdes esac 4149255365Sdes ;; 4150255365Sdes sunos4*) 4151255365Sdes case $cc_basename in 4152255365Sdes CC*) 4153255365Sdes # Sun C++ 4.x 4154255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4155255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4156255365Sdes ;; 4157255365Sdes lcc*) 4158255365Sdes # Lucid 4159255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4160255365Sdes ;; 4161255365Sdes *) 4162255365Sdes ;; 4163255365Sdes esac 4164255365Sdes ;; 4165255365Sdes sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4166255365Sdes case $cc_basename in 4167255365Sdes CC*) 4168255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4169255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4170255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4171255365Sdes ;; 4172255365Sdes esac 4173255365Sdes ;; 4174255365Sdes tandem*) 4175255365Sdes case $cc_basename in 4176255365Sdes NCC*) 4177255365Sdes # NonStop-UX NCC 3.20 4178255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4179255365Sdes ;; 4180255365Sdes *) 4181255365Sdes ;; 4182255365Sdes esac 4183255365Sdes ;; 4184255365Sdes vxworks*) 4185255365Sdes ;; 4186255365Sdes *) 4187255365Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4188255365Sdes ;; 4189255365Sdes esac 4190255365Sdes fi 4191255365Sdes], 4192255365Sdes[ 4193255365Sdes if test "$GCC" = yes; then 4194255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4195255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4196255365Sdes 4197255365Sdes case $host_os in 4198255365Sdes aix*) 4199255365Sdes # All AIX code is PIC. 4200255365Sdes if test "$host_cpu" = ia64; then 4201255365Sdes # AIX 5 now supports IA64 processor 4202255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4203255365Sdes fi 4204255365Sdes ;; 4205255365Sdes 4206255365Sdes amigaos*) 4207255365Sdes case $host_cpu in 4208255365Sdes powerpc) 4209255365Sdes # see comment about AmigaOS4 .so support 4210255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4211255365Sdes ;; 4212255365Sdes m68k) 4213255365Sdes # FIXME: we need at least 68020 code to build shared libraries, but 4214255365Sdes # adding the `-m68020' flag to GCC prevents building anything better, 4215255365Sdes # like `-m68040'. 4216255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4217255365Sdes ;; 4218255365Sdes esac 4219255365Sdes ;; 4220255365Sdes 4221255365Sdes beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4222255365Sdes # PIC is the default for these OSes. 4223255365Sdes ;; 4224255365Sdes 4225255365Sdes mingw* | cygwin* | pw32* | os2* | cegcc*) 4226255365Sdes # This hack is so that the source file can tell whether it is being 4227255365Sdes # built for inclusion in a dll (and should export symbols for example). 4228255365Sdes # Although the cygwin gcc ignores -fPIC, still need this for old-style 4229255365Sdes # (--disable-auto-import) libraries 4230255365Sdes m4_if([$1], [GCJ], [], 4231255365Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4232255365Sdes ;; 4233255365Sdes 4234255365Sdes darwin* | rhapsody*) 4235255365Sdes # PIC is the default on this platform 4236255365Sdes # Common symbols not allowed in MH_DYLIB files 4237255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4238255365Sdes ;; 4239255365Sdes 4240255365Sdes haiku*) 4241255365Sdes # PIC is the default for Haiku. 4242255365Sdes # The "-static" flag exists, but is broken. 4243255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)= 4244255365Sdes ;; 4245255365Sdes 4246255365Sdes hpux*) 4247255365Sdes # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4248255365Sdes # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4249255365Sdes # sets the default TLS model and affects inlining. 4250255365Sdes case $host_cpu in 4251255365Sdes hppa*64*) 4252255365Sdes # +Z the default 4253255365Sdes ;; 4254255365Sdes *) 4255255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4256255365Sdes ;; 4257255365Sdes esac 4258255365Sdes ;; 4259255365Sdes 4260255365Sdes interix[[3-9]]*) 4261255365Sdes # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4262255365Sdes # Instead, we relocate shared libraries at runtime. 4263255365Sdes ;; 4264255365Sdes 4265255365Sdes msdosdjgpp*) 4266255365Sdes # Just because we use GCC doesn't mean we suddenly get shared libraries 4267255365Sdes # on systems that don't support them. 4268255365Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4269255365Sdes enable_shared=no 4270255365Sdes ;; 4271255365Sdes 4272255365Sdes *nto* | *qnx*) 4273255365Sdes # QNX uses GNU C++, but need to define -shared option too, otherwise 4274255365Sdes # it will coredump. 4275255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4276255365Sdes ;; 4277255365Sdes 4278255365Sdes sysv4*MP*) 4279255365Sdes if test -d /usr/nec; then 4280255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4281255365Sdes fi 4282255365Sdes ;; 4283255365Sdes 4284255365Sdes *) 4285255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4286255365Sdes ;; 4287255365Sdes esac 4288255365Sdes 4289255365Sdes case $cc_basename in 4290255365Sdes nvcc*) # Cuda Compiler Driver 2.2 4291255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4292255365Sdes if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4293255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4294255365Sdes fi 4295255365Sdes ;; 4296255365Sdes esac 4297255365Sdes else 4298255365Sdes # PORTME Check for flag to pass linker flags through the system compiler. 4299255365Sdes case $host_os in 4300255365Sdes aix*) 4301255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4302255365Sdes if test "$host_cpu" = ia64; then 4303255365Sdes # AIX 5 now supports IA64 processor 4304255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4305255365Sdes else 4306255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4307255365Sdes fi 4308255365Sdes ;; 4309255365Sdes 4310255365Sdes mingw* | cygwin* | pw32* | os2* | cegcc*) 4311255365Sdes # This hack is so that the source file can tell whether it is being 4312255365Sdes # built for inclusion in a dll (and should export symbols for example). 4313255365Sdes m4_if([$1], [GCJ], [], 4314255365Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4315255365Sdes ;; 4316255365Sdes 4317255365Sdes hpux9* | hpux10* | hpux11*) 4318255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4319255365Sdes # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4320255365Sdes # not for PA HP-UX. 4321255365Sdes case $host_cpu in 4322255365Sdes hppa*64*|ia64*) 4323255365Sdes # +Z the default 4324255365Sdes ;; 4325255365Sdes *) 4326255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4327255365Sdes ;; 4328255365Sdes esac 4329255365Sdes # Is there a better lt_prog_compiler_static that works with the bundled CC? 4330255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4331255365Sdes ;; 4332255365Sdes 4333255365Sdes irix5* | irix6* | nonstopux*) 4334255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4335255365Sdes # PIC (with -KPIC) is the default. 4336255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4337255365Sdes ;; 4338255365Sdes 4339255365Sdes linux* | k*bsd*-gnu | kopensolaris*-gnu) 4340255365Sdes case $cc_basename in 4341255365Sdes # old Intel for x86_64 which still supported -KPIC. 4342255365Sdes ecc*) 4343255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4344255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4345255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4346255365Sdes ;; 4347255365Sdes # icc used to be incompatible with GCC. 4348255365Sdes # ICC 10 doesn't accept -KPIC any more. 4349255365Sdes icc* | ifort*) 4350255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4351255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4352255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4353255365Sdes ;; 4354255365Sdes # Lahey Fortran 8.1. 4355255365Sdes lf95*) 4356255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4357255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4358255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4359255365Sdes ;; 4360255365Sdes nagfor*) 4361255365Sdes # NAG Fortran compiler 4362255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4363255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4364255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4365255365Sdes ;; 4366255365Sdes pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4367255365Sdes # Portland Group compilers (*not* the Pentium gcc compiler, 4368255365Sdes # which looks to be a dead project) 4369255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4370255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4371255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4372255365Sdes ;; 4373255365Sdes ccc*) 4374255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4375255365Sdes # All Alpha code is PIC. 4376255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4377255365Sdes ;; 4378255365Sdes xl* | bgxl* | bgf* | mpixl*) 4379255365Sdes # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4380255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4381255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4382255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4383255365Sdes ;; 4384255365Sdes *) 4385255365Sdes case `$CC -V 2>&1 | sed 5q` in 4386255365Sdes *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4387255365Sdes # Sun Fortran 8.3 passes all unrecognized flags to the linker 4388255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4389255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4390255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4391255365Sdes ;; 4392255365Sdes *Sun\ F* | *Sun*Fortran*) 4393255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4394255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4395255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4396255365Sdes ;; 4397255365Sdes *Sun\ C*) 4398255365Sdes # Sun C 5.9 4399255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4400255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4401255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4402255365Sdes ;; 4403255365Sdes *Intel*\ [[CF]]*Compiler*) 4404255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4405255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4406255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4407255365Sdes ;; 4408255365Sdes *Portland\ Group*) 4409255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4410255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4411255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4412255365Sdes ;; 4413255365Sdes esac 4414255365Sdes ;; 4415255365Sdes esac 4416255365Sdes ;; 4417255365Sdes 4418255365Sdes newsos6) 4419255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4420255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4421255365Sdes ;; 4422255365Sdes 4423255365Sdes *nto* | *qnx*) 4424255365Sdes # QNX uses GNU C++, but need to define -shared option too, otherwise 4425255365Sdes # it will coredump. 4426255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4427255365Sdes ;; 4428255365Sdes 4429255365Sdes osf3* | osf4* | osf5*) 4430255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4431255365Sdes # All OSF/1 code is PIC. 4432255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4433255365Sdes ;; 4434255365Sdes 4435255365Sdes rdos*) 4436255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4437255365Sdes ;; 4438255365Sdes 4439255365Sdes solaris*) 4440255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4441255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4442255365Sdes case $cc_basename in 4443255365Sdes f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4444255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4445255365Sdes *) 4446255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4447255365Sdes esac 4448255365Sdes ;; 4449255365Sdes 4450255365Sdes sunos4*) 4451255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4452255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4453255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4454255365Sdes ;; 4455255365Sdes 4456255365Sdes sysv4 | sysv4.2uw2* | sysv4.3*) 4457255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4458255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4459255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4460255365Sdes ;; 4461255365Sdes 4462255365Sdes sysv4*MP*) 4463255365Sdes if test -d /usr/nec ;then 4464255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4465255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4466255365Sdes fi 4467255365Sdes ;; 4468255365Sdes 4469255365Sdes sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4470255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4471255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4472255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4473255365Sdes ;; 4474255365Sdes 4475255365Sdes unicos*) 4476255365Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4477255365Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4478255365Sdes ;; 4479255365Sdes 4480255365Sdes uts4*) 4481255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4482255365Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4483255365Sdes ;; 4484255365Sdes 4485255365Sdes *) 4486255365Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4487255365Sdes ;; 4488255365Sdes esac 4489255365Sdes fi 4490255365Sdes]) 4491255365Sdescase $host_os in 4492255365Sdes # For platforms which do not support PIC, -DPIC is meaningless: 4493255365Sdes *djgpp*) 4494255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4495255365Sdes ;; 4496255365Sdes *) 4497255365Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4498255365Sdes ;; 4499255365Sdesesac 4500255365Sdes 4501255365SdesAC_CACHE_CHECK([for $compiler option to produce PIC], 4502255365Sdes [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4503255365Sdes [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4504255365Sdes_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4505255365Sdes 4506255365Sdes# 4507255365Sdes# Check to make sure the PIC flag actually works. 4508255365Sdes# 4509255365Sdesif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4510255365Sdes _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4511255365Sdes [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4512255365Sdes [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4513255365Sdes [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4514255365Sdes "" | " "*) ;; 4515255365Sdes *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4516255365Sdes esac], 4517255365Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4518255365Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4519255365Sdesfi 4520255365Sdes_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4521255365Sdes [Additional compiler flags for building library objects]) 4522255365Sdes 4523255365Sdes_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4524255365Sdes [How to pass a linker flag through the compiler]) 4525255365Sdes# 4526255365Sdes# Check to make sure the static flag actually works. 4527255365Sdes# 4528255365Sdeswl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4529255365Sdes_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4530255365Sdes _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4531255365Sdes $lt_tmp_static_flag, 4532255365Sdes [], 4533255365Sdes [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4534255365Sdes_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4535255365Sdes [Compiler flag to prevent dynamic linking]) 4536255365Sdes])# _LT_COMPILER_PIC 4537255365Sdes 4538255365Sdes 4539255365Sdes# _LT_LINKER_SHLIBS([TAGNAME]) 4540255365Sdes# ---------------------------- 4541255365Sdes# See if the linker supports building shared libraries. 4542255365Sdesm4_defun([_LT_LINKER_SHLIBS], 4543255365Sdes[AC_REQUIRE([LT_PATH_LD])dnl 4544255365SdesAC_REQUIRE([LT_PATH_NM])dnl 4545255365Sdesm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4546255365Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4547255365Sdesm4_require([_LT_DECL_EGREP])dnl 4548255365Sdesm4_require([_LT_DECL_SED])dnl 4549255365Sdesm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4550255365Sdesm4_require([_LT_TAG_COMPILER])dnl 4551255365SdesAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4552255365Sdesm4_if([$1], [CXX], [ 4553255365Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4554255365Sdes _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4555255365Sdes case $host_os in 4556255365Sdes aix[[4-9]]*) 4557255365Sdes # If we're using GNU nm, then we don't want the "-C" option. 4558255365Sdes # -C means demangle to AIX nm, but means don't demangle with GNU nm 4559255365Sdes # Also, AIX nm treats weak defined symbols like other global defined 4560255365Sdes # symbols, whereas GNU nm marks them as "W". 4561255365Sdes if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4562255365Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4563255365Sdes else 4564255365Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4565255365Sdes fi 4566255365Sdes ;; 4567255365Sdes pw32*) 4568255365Sdes _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4569255365Sdes ;; 4570255365Sdes cygwin* | mingw* | cegcc*) 4571255365Sdes case $cc_basename in 4572255365Sdes cl*) 4573255365Sdes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4574255365Sdes ;; 4575255365Sdes *) 4576255365Sdes _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' 4577255365Sdes _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4578255365Sdes ;; 4579255365Sdes esac 4580255365Sdes ;; 4581255365Sdes *) 4582255365Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4583255365Sdes ;; 4584255365Sdes esac 4585255365Sdes], [ 4586255365Sdes runpath_var= 4587255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)= 4588255365Sdes _LT_TAGVAR(always_export_symbols, $1)=no 4589255365Sdes _LT_TAGVAR(archive_cmds, $1)= 4590255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)= 4591255365Sdes _LT_TAGVAR(compiler_needs_object, $1)=no 4592255365Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4593255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4594255365Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4595255365Sdes _LT_TAGVAR(hardcode_automatic, $1)=no 4596255365Sdes _LT_TAGVAR(hardcode_direct, $1)=no 4597255365Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4598255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4599255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)= 4600255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=no 4601255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4602255365Sdes _LT_TAGVAR(inherit_rpath, $1)=no 4603255365Sdes _LT_TAGVAR(link_all_deplibs, $1)=unknown 4604255365Sdes _LT_TAGVAR(module_cmds, $1)= 4605255365Sdes _LT_TAGVAR(module_expsym_cmds, $1)= 4606255365Sdes _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4607255365Sdes _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4608255365Sdes _LT_TAGVAR(thread_safe_flag_spec, $1)= 4609255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 4610255365Sdes # include_expsyms should be a list of space-separated symbols to be *always* 4611255365Sdes # included in the symbol list 4612255365Sdes _LT_TAGVAR(include_expsyms, $1)= 4613255365Sdes # exclude_expsyms can be an extended regexp of symbols to exclude 4614255365Sdes # it will be wrapped by ` (' and `)$', so one must not match beginning or 4615255365Sdes # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4616255365Sdes # as well as any symbol that contains `d'. 4617255365Sdes _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4618255365Sdes # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4619255365Sdes # platforms (ab)use it in PIC code, but their linkers get confused if 4620255365Sdes # the symbol is explicitly referenced. Since portable code cannot 4621255365Sdes # rely on this symbol name, it's probably fine to never include it in 4622255365Sdes # preloaded symbol tables. 4623255365Sdes # Exclude shared library initialization/finalization symbols. 4624255365Sdesdnl Note also adjust exclude_expsyms for C++ above. 4625255365Sdes extract_expsyms_cmds= 4626255365Sdes 4627255365Sdes case $host_os in 4628255365Sdes cygwin* | mingw* | pw32* | cegcc*) 4629255365Sdes # FIXME: the MSVC++ port hasn't been tested in a loooong time 4630255365Sdes # When not using gcc, we currently assume that we are using 4631255365Sdes # Microsoft Visual C++. 4632255365Sdes if test "$GCC" != yes; then 4633255365Sdes with_gnu_ld=no 4634255365Sdes fi 4635255365Sdes ;; 4636255365Sdes interix*) 4637255365Sdes # we just hope/assume this is gcc and not c89 (= MSVC++) 4638255365Sdes with_gnu_ld=yes 4639255365Sdes ;; 4640255365Sdes openbsd*) 4641255365Sdes with_gnu_ld=no 4642255365Sdes ;; 4643255365Sdes esac 4644255365Sdes 4645255365Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 4646255365Sdes 4647255365Sdes # On some targets, GNU ld is compatible enough with the native linker 4648255365Sdes # that we're better off using the native interface for both. 4649255365Sdes lt_use_gnu_ld_interface=no 4650255365Sdes if test "$with_gnu_ld" = yes; then 4651255365Sdes case $host_os in 4652255365Sdes aix*) 4653255365Sdes # The AIX port of GNU ld has always aspired to compatibility 4654255365Sdes # with the native linker. However, as the warning in the GNU ld 4655255365Sdes # block says, versions before 2.19.5* couldn't really create working 4656255365Sdes # shared libraries, regardless of the interface used. 4657255365Sdes case `$LD -v 2>&1` in 4658255365Sdes *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4659255365Sdes *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4660255365Sdes *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4661255365Sdes *) 4662255365Sdes lt_use_gnu_ld_interface=yes 4663255365Sdes ;; 4664255365Sdes esac 4665255365Sdes ;; 4666255365Sdes *) 4667255365Sdes lt_use_gnu_ld_interface=yes 4668255365Sdes ;; 4669255365Sdes esac 4670255365Sdes fi 4671255365Sdes 4672255365Sdes if test "$lt_use_gnu_ld_interface" = yes; then 4673255365Sdes # If archive_cmds runs LD, not CC, wlarc should be empty 4674255365Sdes wlarc='${wl}' 4675255365Sdes 4676255365Sdes # Set some defaults for GNU ld with shared library support. These 4677255365Sdes # are reset later if shared libraries are not supported. Putting them 4678255365Sdes # here allows them to be overridden if necessary. 4679255365Sdes runpath_var=LD_RUN_PATH 4680255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4681255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4682255365Sdes # ancient GNU ld didn't support --whole-archive et. al. 4683255365Sdes if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4684255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4685255365Sdes else 4686255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 4687255365Sdes fi 4688255365Sdes supports_anon_versioning=no 4689255365Sdes case `$LD -v 2>&1` in 4690255365Sdes *GNU\ gold*) supports_anon_versioning=yes ;; 4691255365Sdes *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4692255365Sdes *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4693255365Sdes *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4694255365Sdes *\ 2.11.*) ;; # other 2.11 versions 4695255365Sdes *) supports_anon_versioning=yes ;; 4696255365Sdes esac 4697255365Sdes 4698255365Sdes # See if GNU ld supports shared libraries. 4699255365Sdes case $host_os in 4700255365Sdes aix[[3-9]]*) 4701255365Sdes # On AIX/PPC, the GNU linker is very broken 4702255365Sdes if test "$host_cpu" != ia64; then 4703255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4704255365Sdes cat <<_LT_EOF 1>&2 4705255365Sdes 4706255365Sdes*** Warning: the GNU linker, at least up to release 2.19, is reported 4707255365Sdes*** to be unable to reliably create shared libraries on AIX. 4708255365Sdes*** Therefore, libtool is disabling shared libraries support. If you 4709255365Sdes*** really care for shared libraries, you may want to install binutils 4710255365Sdes*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4711255365Sdes*** You will then need to restart the configuration process. 4712255365Sdes 4713255365Sdes_LT_EOF 4714255365Sdes fi 4715255365Sdes ;; 4716255365Sdes 4717255365Sdes amigaos*) 4718255365Sdes case $host_cpu in 4719255365Sdes powerpc) 4720255365Sdes # see comment about AmigaOS4 .so support 4721255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4722255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='' 4723255365Sdes ;; 4724255365Sdes m68k) 4725255365Sdes _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)' 4726255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4727255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 4728255365Sdes ;; 4729255365Sdes esac 4730255365Sdes ;; 4731255365Sdes 4732255365Sdes beos*) 4733255365Sdes if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4734255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4735255365Sdes # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4736255365Sdes # support --undefined. This deserves some investigation. FIXME 4737255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4738255365Sdes else 4739255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4740255365Sdes fi 4741255365Sdes ;; 4742255365Sdes 4743255365Sdes cygwin* | mingw* | pw32* | cegcc*) 4744255365Sdes # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4745255365Sdes # as there is no search path for DLLs. 4746255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4747255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4748255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4749255365Sdes _LT_TAGVAR(always_export_symbols, $1)=no 4750255365Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4751255365Sdes _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' 4752255365Sdes _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4753255365Sdes 4754255365Sdes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4755255365Sdes _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' 4756255365Sdes # If the export-symbols file already is a .def file (1st line 4757255365Sdes # is EXPORTS), use it as is; otherwise, prepend... 4758255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4759255365Sdes cp $export_symbols $output_objdir/$soname.def; 4760255365Sdes else 4761255365Sdes echo EXPORTS > $output_objdir/$soname.def; 4762255365Sdes cat $export_symbols >> $output_objdir/$soname.def; 4763255365Sdes fi~ 4764255365Sdes $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4765255365Sdes else 4766255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4767255365Sdes fi 4768255365Sdes ;; 4769255365Sdes 4770255365Sdes haiku*) 4771255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4772255365Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 4773255365Sdes ;; 4774255365Sdes 4775255365Sdes interix[[3-9]]*) 4776255365Sdes _LT_TAGVAR(hardcode_direct, $1)=no 4777255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4778255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4779255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4780255365Sdes # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4781255365Sdes # Instead, shared libraries are loaded at an image base (0x10000000 by 4782255365Sdes # default) and relocated if they conflict, which is a slow very memory 4783255365Sdes # consuming and fragmenting process. To avoid this, we pick a random, 4784255365Sdes # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4785255365Sdes # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4786255365Sdes _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' 4787255365Sdes _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' 4788255365Sdes ;; 4789255365Sdes 4790255365Sdes gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4791255365Sdes tmp_diet=no 4792255365Sdes if test "$host_os" = linux-dietlibc; then 4793255365Sdes case $cc_basename in 4794255365Sdes diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4795255365Sdes esac 4796255365Sdes fi 4797255365Sdes if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4798255365Sdes && test "$tmp_diet" = no 4799255365Sdes then 4800255365Sdes tmp_addflag=' $pic_flag' 4801255365Sdes tmp_sharedflag='-shared' 4802255365Sdes case $cc_basename,$host_cpu in 4803255365Sdes pgcc*) # Portland Group C compiler 4804255365Sdes _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' 4805255365Sdes tmp_addflag=' $pic_flag' 4806255365Sdes ;; 4807255365Sdes pgf77* | pgf90* | pgf95* | pgfortran*) 4808255365Sdes # Portland Group f77 and f90 compilers 4809255365Sdes _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' 4810255365Sdes tmp_addflag=' $pic_flag -Mnomain' ;; 4811255365Sdes ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4812255365Sdes tmp_addflag=' -i_dynamic' ;; 4813255365Sdes efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4814255365Sdes tmp_addflag=' -i_dynamic -nofor_main' ;; 4815255365Sdes ifc* | ifort*) # Intel Fortran compiler 4816255365Sdes tmp_addflag=' -nofor_main' ;; 4817255365Sdes lf95*) # Lahey Fortran 8.1 4818255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 4819255365Sdes tmp_sharedflag='--shared' ;; 4820255365Sdes xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4821255365Sdes tmp_sharedflag='-qmkshrobj' 4822255365Sdes tmp_addflag= ;; 4823255365Sdes nvcc*) # Cuda Compiler Driver 2.2 4824255365Sdes _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' 4825255365Sdes _LT_TAGVAR(compiler_needs_object, $1)=yes 4826255365Sdes ;; 4827255365Sdes esac 4828255365Sdes case `$CC -V 2>&1 | sed 5q` in 4829255365Sdes *Sun\ C*) # Sun C 5.9 4830255365Sdes _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' 4831255365Sdes _LT_TAGVAR(compiler_needs_object, $1)=yes 4832255365Sdes tmp_sharedflag='-G' ;; 4833255365Sdes *Sun\ F*) # Sun Fortran 8.3 4834255365Sdes tmp_sharedflag='-G' ;; 4835255365Sdes esac 4836255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4837255365Sdes 4838255365Sdes if test "x$supports_anon_versioning" = xyes; then 4839255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4840255365Sdes cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4841255365Sdes echo "local: *; };" >> $output_objdir/$libname.ver~ 4842255365Sdes $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4843255365Sdes fi 4844255365Sdes 4845255365Sdes case $cc_basename in 4846255365Sdes xlf* | bgf* | bgxlf* | mpixlf*) 4847255365Sdes # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4848255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4849255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4850255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4851255365Sdes if test "x$supports_anon_versioning" = xyes; then 4852255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4853255365Sdes cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4854255365Sdes echo "local: *; };" >> $output_objdir/$libname.ver~ 4855255365Sdes $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4856255365Sdes fi 4857255365Sdes ;; 4858255365Sdes esac 4859255365Sdes else 4860255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4861255365Sdes fi 4862255365Sdes ;; 4863255365Sdes 4864255365Sdes netbsd*) 4865255365Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4866255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4867255365Sdes wlarc= 4868255365Sdes else 4869255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4870255365Sdes _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' 4871255365Sdes fi 4872255365Sdes ;; 4873255365Sdes 4874255365Sdes solaris*) 4875255365Sdes if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4876255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4877255365Sdes cat <<_LT_EOF 1>&2 4878255365Sdes 4879255365Sdes*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4880255365Sdes*** create shared libraries on Solaris systems. Therefore, libtool 4881255365Sdes*** is disabling shared libraries support. We urge you to upgrade GNU 4882255365Sdes*** binutils to release 2.9.1 or newer. Another option is to modify 4883255365Sdes*** your PATH or compiler configuration so that the native linker is 4884255365Sdes*** used, and then restart. 4885255365Sdes 4886255365Sdes_LT_EOF 4887255365Sdes elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4888255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4889255365Sdes _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' 4890255365Sdes else 4891255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4892255365Sdes fi 4893255365Sdes ;; 4894255365Sdes 4895255365Sdes sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4896255365Sdes case `$LD -v 2>&1` in 4897255365Sdes *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4898255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4899255365Sdes cat <<_LT_EOF 1>&2 4900255365Sdes 4901255365Sdes*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4902255365Sdes*** reliably create shared libraries on SCO systems. Therefore, libtool 4903255365Sdes*** is disabling shared libraries support. We urge you to upgrade GNU 4904255365Sdes*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4905255365Sdes*** your PATH or compiler configuration so that the native linker is 4906255365Sdes*** used, and then restart. 4907255365Sdes 4908255365Sdes_LT_EOF 4909255365Sdes ;; 4910255365Sdes *) 4911255365Sdes # For security reasons, it is highly recommended that you always 4912255365Sdes # use absolute paths for naming shared libraries, and exclude the 4913255365Sdes # DT_RUNPATH tag from executables and libraries. But doing so 4914255365Sdes # requires that you compile everything twice, which is a pain. 4915255365Sdes if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4916255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4917255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4918255365Sdes _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' 4919255365Sdes else 4920255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4921255365Sdes fi 4922255365Sdes ;; 4923255365Sdes esac 4924255365Sdes ;; 4925255365Sdes 4926255365Sdes sunos4*) 4927255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4928255365Sdes wlarc= 4929255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 4930255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4931255365Sdes ;; 4932255365Sdes 4933255365Sdes *) 4934255365Sdes if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4935255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4936255365Sdes _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' 4937255365Sdes else 4938255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 4939255365Sdes fi 4940255365Sdes ;; 4941255365Sdes esac 4942255365Sdes 4943255365Sdes if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4944255365Sdes runpath_var= 4945255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4946255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4947255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 4948255365Sdes fi 4949255365Sdes else 4950255365Sdes # PORTME fill in a description of your system's linker (not GNU ld) 4951255365Sdes case $host_os in 4952255365Sdes aix3*) 4953255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4954255365Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 4955255365Sdes _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' 4956255365Sdes # Note: this linker hardcodes the directories in LIBPATH if there 4957255365Sdes # are no directories specified by -L. 4958255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 4959255365Sdes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4960255365Sdes # Neither direct hardcoding nor static linking is supported with a 4961255365Sdes # broken collect2. 4962255365Sdes _LT_TAGVAR(hardcode_direct, $1)=unsupported 4963255365Sdes fi 4964255365Sdes ;; 4965255365Sdes 4966255365Sdes aix[[4-9]]*) 4967255365Sdes if test "$host_cpu" = ia64; then 4968255365Sdes # On IA64, the linker does run time linking by default, so we don't 4969255365Sdes # have to do anything special. 4970255365Sdes aix_use_runtimelinking=no 4971255365Sdes exp_sym_flag='-Bexport' 4972255365Sdes no_entry_flag="" 4973255365Sdes else 4974255365Sdes # If we're using GNU nm, then we don't want the "-C" option. 4975255365Sdes # -C means demangle to AIX nm, but means don't demangle with GNU nm 4976255365Sdes # Also, AIX nm treats weak defined symbols like other global 4977255365Sdes # defined symbols, whereas GNU nm marks them as "W". 4978255365Sdes if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4979255365Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4980255365Sdes else 4981255365Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4982255365Sdes fi 4983255365Sdes aix_use_runtimelinking=no 4984255365Sdes 4985255365Sdes # Test if we are trying to use run time linking or normal 4986255365Sdes # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4987255365Sdes # need to do runtime linking. 4988255365Sdes case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4989255365Sdes for ld_flag in $LDFLAGS; do 4990255365Sdes if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4991255365Sdes aix_use_runtimelinking=yes 4992255365Sdes break 4993255365Sdes fi 4994255365Sdes done 4995255365Sdes ;; 4996255365Sdes esac 4997255365Sdes 4998255365Sdes exp_sym_flag='-bexport' 4999255365Sdes no_entry_flag='-bnoentry' 5000255365Sdes fi 5001255365Sdes 5002255365Sdes # When large executables or shared objects are built, AIX ld can 5003255365Sdes # have problems creating the table of contents. If linking a library 5004255365Sdes # or program results in "error TOC overflow" add -mminimal-toc to 5005255365Sdes # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5006255365Sdes # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5007255365Sdes 5008255365Sdes _LT_TAGVAR(archive_cmds, $1)='' 5009255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5010255365Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5011255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5012255365Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 5013255365Sdes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5014255365Sdes 5015255365Sdes if test "$GCC" = yes; then 5016255365Sdes case $host_os in aix4.[[012]]|aix4.[[012]].*) 5017255365Sdes # We only want to do this on AIX 4.2 and lower, the check 5018255365Sdes # below for broken collect2 doesn't work under 4.3+ 5019255365Sdes collect2name=`${CC} -print-prog-name=collect2` 5020255365Sdes if test -f "$collect2name" && 5021255365Sdes strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5022255365Sdes then 5023255365Sdes # We have reworked collect2 5024255365Sdes : 5025255365Sdes else 5026255365Sdes # We have old collect2 5027255365Sdes _LT_TAGVAR(hardcode_direct, $1)=unsupported 5028255365Sdes # It fails to find uninstalled libraries when the uninstalled 5029255365Sdes # path is not listed in the libpath. Setting hardcode_minus_L 5030255365Sdes # to unsupported forces relinking 5031255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5032255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5033255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)= 5034255365Sdes fi 5035255365Sdes ;; 5036255365Sdes esac 5037255365Sdes shared_flag='-shared' 5038255365Sdes if test "$aix_use_runtimelinking" = yes; then 5039255365Sdes shared_flag="$shared_flag "'${wl}-G' 5040255365Sdes fi 5041255365Sdes else 5042255365Sdes # not using gcc 5043255365Sdes if test "$host_cpu" = ia64; then 5044255365Sdes # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5045255365Sdes # chokes on -Wl,-G. The following line is correct: 5046255365Sdes shared_flag='-G' 5047255365Sdes else 5048255365Sdes if test "$aix_use_runtimelinking" = yes; then 5049255365Sdes shared_flag='${wl}-G' 5050255365Sdes else 5051255365Sdes shared_flag='${wl}-bM:SRE' 5052255365Sdes fi 5053255365Sdes fi 5054255365Sdes fi 5055255365Sdes 5056255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5057255365Sdes # It seems that -bexpall does not export symbols beginning with 5058255365Sdes # underscore (_), so it is better to generate a list of symbols to export. 5059255365Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 5060255365Sdes if test "$aix_use_runtimelinking" = yes; then 5061255365Sdes # Warning - without using the other runtime loading flags (-brtl), 5062255365Sdes # -berok will link without error, but may produce a broken library. 5063255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5064255365Sdes # Determine the default libpath from the value encoded in an 5065255365Sdes # empty executable. 5066255365Sdes _LT_SYS_MODULE_PATH_AIX([$1]) 5067255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5068255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5069255365Sdes else 5070255365Sdes if test "$host_cpu" = ia64; then 5071255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5072255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5073255365Sdes _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" 5074255365Sdes else 5075255365Sdes # Determine the default libpath from the value encoded in an 5076255365Sdes # empty executable. 5077255365Sdes _LT_SYS_MODULE_PATH_AIX([$1]) 5078255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5079255365Sdes # Warning - without using the other run time loading flags, 5080255365Sdes # -berok will link without error, but may produce a broken library. 5081255365Sdes _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5082255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5083255365Sdes if test "$with_gnu_ld" = yes; then 5084255365Sdes # We only use this code for GNU lds that support --whole-archive. 5085255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5086255365Sdes else 5087255365Sdes # Exported symbols can be pulled into shared objects from archives 5088255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5089255365Sdes fi 5090255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5091255365Sdes # This is similar to how AIX traditionally builds its shared libraries. 5092255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 5093255365Sdes fi 5094255365Sdes fi 5095255365Sdes ;; 5096255365Sdes 5097255365Sdes amigaos*) 5098255365Sdes case $host_cpu in 5099255365Sdes powerpc) 5100255365Sdes # see comment about AmigaOS4 .so support 5101255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5102255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='' 5103255365Sdes ;; 5104255365Sdes m68k) 5105255365Sdes _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)' 5106255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5107255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5108255365Sdes ;; 5109255365Sdes esac 5110255365Sdes ;; 5111255365Sdes 5112255365Sdes bsdi[[45]]*) 5113255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5114255365Sdes ;; 5115255365Sdes 5116255365Sdes cygwin* | mingw* | pw32* | cegcc*) 5117255365Sdes # When not using gcc, we currently assume that we are using 5118255365Sdes # Microsoft Visual C++. 5119255365Sdes # hardcode_libdir_flag_spec is actually meaningless, as there is 5120255365Sdes # no search path for DLLs. 5121255365Sdes case $cc_basename in 5122255365Sdes cl*) 5123255365Sdes # Native MSVC 5124255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5125255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5126255365Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 5127255365Sdes _LT_TAGVAR(file_list_spec, $1)='@' 5128255365Sdes # Tell ltmain to make .lib files, not .a files. 5129255365Sdes libext=lib 5130255365Sdes # Tell ltmain to make .dll files, not .so files. 5131255365Sdes shrext_cmds=".dll" 5132255365Sdes # FIXME: Setting linknames here is a bad hack. 5133255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5134255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5135255365Sdes sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5136255365Sdes else 5137255365Sdes sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5138255365Sdes fi~ 5139255365Sdes $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5140255365Sdes linknames=' 5141255365Sdes # The linker will not automatically build a static lib if we build a DLL. 5142255365Sdes # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5143255365Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5144255365Sdes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5145255365Sdes _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' 5146255365Sdes # Don't use ranlib 5147255365Sdes _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5148255365Sdes _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5149255365Sdes lt_tool_outputfile="@TOOL_OUTPUT@"~ 5150255365Sdes case $lt_outputfile in 5151255365Sdes *.exe|*.EXE) ;; 5152255365Sdes *) 5153255365Sdes lt_outputfile="$lt_outputfile.exe" 5154255365Sdes lt_tool_outputfile="$lt_tool_outputfile.exe" 5155255365Sdes ;; 5156255365Sdes esac~ 5157255365Sdes if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5158255365Sdes $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5159255365Sdes $RM "$lt_outputfile.manifest"; 5160255365Sdes fi' 5161255365Sdes ;; 5162255365Sdes *) 5163255365Sdes # Assume MSVC wrapper 5164255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5165255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5166255365Sdes # Tell ltmain to make .lib files, not .a files. 5167255365Sdes libext=lib 5168255365Sdes # Tell ltmain to make .dll files, not .so files. 5169255365Sdes shrext_cmds=".dll" 5170255365Sdes # FIXME: Setting linknames here is a bad hack. 5171255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5172255365Sdes # The linker will automatically build a .lib file if we build a DLL. 5173255365Sdes _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5174255365Sdes # FIXME: Should let the user specify the lib program. 5175255365Sdes _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5176255365Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5177255365Sdes ;; 5178255365Sdes esac 5179255365Sdes ;; 5180255365Sdes 5181255365Sdes darwin* | rhapsody*) 5182255365Sdes _LT_DARWIN_LINKER_FEATURES($1) 5183255365Sdes ;; 5184255365Sdes 5185255365Sdes dgux*) 5186255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5187255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5188255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5189255365Sdes ;; 5190255365Sdes 5191255365Sdes # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5192255365Sdes # support. Future versions do this automatically, but an explicit c++rt0.o 5193255365Sdes # does not break anything, and helps significantly (at the cost of a little 5194255365Sdes # extra space). 5195255365Sdes freebsd2.2*) 5196255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5197255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5198255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5199255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5200255365Sdes ;; 5201255365Sdes 5202255365Sdes # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5203255365Sdes freebsd2.*) 5204255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5205255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5206255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5207255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5208255365Sdes ;; 5209255365Sdes 5210255365Sdes # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5211255365Sdes freebsd* | dragonfly*) 5212255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5213255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5214255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5215255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5216255365Sdes ;; 5217255365Sdes 5218255365Sdes hpux9*) 5219255365Sdes if test "$GCC" = yes; then 5220255365Sdes _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5221255365Sdes else 5222255365Sdes _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5223255365Sdes fi 5224255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5225255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5226255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5227255365Sdes 5228255365Sdes # hardcode_minus_L: Not really in the search PATH, 5229255365Sdes # but as the default location of the library. 5230255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5231255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5232255365Sdes ;; 5233255365Sdes 5234255365Sdes hpux10*) 5235255365Sdes if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5236255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5237255365Sdes else 5238255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5239255365Sdes fi 5240255365Sdes if test "$with_gnu_ld" = no; then 5241255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5242255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5243255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5244255365Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5245255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5246255365Sdes # hardcode_minus_L: Not really in the search PATH, 5247255365Sdes # but as the default location of the library. 5248255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5249255365Sdes fi 5250255365Sdes ;; 5251255365Sdes 5252255365Sdes hpux11*) 5253255365Sdes if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5254255365Sdes case $host_cpu in 5255255365Sdes hppa*64*) 5256255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5257255365Sdes ;; 5258255365Sdes ia64*) 5259255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5260255365Sdes ;; 5261255365Sdes *) 5262255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5263255365Sdes ;; 5264255365Sdes esac 5265255365Sdes else 5266255365Sdes case $host_cpu in 5267255365Sdes hppa*64*) 5268255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5269255365Sdes ;; 5270255365Sdes ia64*) 5271255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5272255365Sdes ;; 5273255365Sdes *) 5274255365Sdes m4_if($1, [], [ 5275255365Sdes # Older versions of the 11.00 compiler do not understand -b yet 5276255365Sdes # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5277255365Sdes _LT_LINKER_OPTION([if $CC understands -b], 5278255365Sdes _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5279255365Sdes [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5280255365Sdes [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5281255365Sdes [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5282255365Sdes ;; 5283255365Sdes esac 5284255365Sdes fi 5285255365Sdes if test "$with_gnu_ld" = no; then 5286255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5287255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5288255365Sdes 5289255365Sdes case $host_cpu in 5290255365Sdes hppa*64*|ia64*) 5291255365Sdes _LT_TAGVAR(hardcode_direct, $1)=no 5292255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5293255365Sdes ;; 5294255365Sdes *) 5295255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5296255365Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5297255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5298255365Sdes 5299255365Sdes # hardcode_minus_L: Not really in the search PATH, 5300255365Sdes # but as the default location of the library. 5301255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5302255365Sdes ;; 5303255365Sdes esac 5304255365Sdes fi 5305255365Sdes ;; 5306255365Sdes 5307255365Sdes irix5* | irix6* | nonstopux*) 5308255365Sdes if test "$GCC" = yes; then 5309255365Sdes _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' 5310255365Sdes # Try to use the -exported_symbol ld option, if it does not 5311255365Sdes # work, assume that -exports_file does not work either and 5312255365Sdes # implicitly export all symbols. 5313255365Sdes # This should be the same for all languages, so no per-tag cache variable. 5314255365Sdes AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5315255365Sdes [lt_cv_irix_exported_symbol], 5316255365Sdes [save_LDFLAGS="$LDFLAGS" 5317255365Sdes LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5318255365Sdes AC_LINK_IFELSE( 5319255365Sdes [AC_LANG_SOURCE( 5320255365Sdes [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5321255365Sdes [C++], [[int foo (void) { return 0; }]], 5322255365Sdes [Fortran 77], [[ 5323255365Sdes subroutine foo 5324255365Sdes end]], 5325255365Sdes [Fortran], [[ 5326255365Sdes subroutine foo 5327255365Sdes end]])])], 5328255365Sdes [lt_cv_irix_exported_symbol=yes], 5329255365Sdes [lt_cv_irix_exported_symbol=no]) 5330255365Sdes LDFLAGS="$save_LDFLAGS"]) 5331255365Sdes if test "$lt_cv_irix_exported_symbol" = yes; then 5332255365Sdes _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' 5333255365Sdes fi 5334255365Sdes else 5335255365Sdes _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' 5336255365Sdes _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' 5337255365Sdes fi 5338255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5339255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5340255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5341255365Sdes _LT_TAGVAR(inherit_rpath, $1)=yes 5342255365Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 5343255365Sdes ;; 5344255365Sdes 5345255365Sdes netbsd*) 5346255365Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5347255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5348255365Sdes else 5349255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5350255365Sdes fi 5351255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5352255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5353255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5354255365Sdes ;; 5355255365Sdes 5356255365Sdes newsos6) 5357255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5358255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5359255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5360255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5361255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5362255365Sdes ;; 5363255365Sdes 5364255365Sdes *nto* | *qnx*) 5365255365Sdes ;; 5366255365Sdes 5367255365Sdes openbsd*) 5368255365Sdes if test -f /usr/libexec/ld.so; then 5369255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5370255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5371255365Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5372255365Sdes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5373255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5374255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5375255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5376255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5377255365Sdes else 5378255365Sdes case $host_os in 5379255365Sdes openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5380255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5381255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5382255365Sdes ;; 5383255365Sdes *) 5384255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5385255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5386255365Sdes ;; 5387255365Sdes esac 5388255365Sdes fi 5389255365Sdes else 5390255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5391255365Sdes fi 5392255365Sdes ;; 5393255365Sdes 5394255365Sdes os2*) 5395255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5396255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5397255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5398255365Sdes _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 5399255365Sdes _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5400255365Sdes ;; 5401255365Sdes 5402255365Sdes osf3*) 5403255365Sdes if test "$GCC" = yes; then 5404255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5405255365Sdes _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' 5406255365Sdes else 5407255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5408255365Sdes _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' 5409255365Sdes fi 5410255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5411255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5412255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5413255365Sdes ;; 5414255365Sdes 5415255365Sdes osf4* | osf5*) # as osf3* with the addition of -msym flag 5416255365Sdes if test "$GCC" = yes; then 5417255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5418255365Sdes _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' 5419255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5420255365Sdes else 5421255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5422255365Sdes _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' 5423255365Sdes _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~ 5424255365Sdes $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' 5425255365Sdes 5426255365Sdes # Both c and cxx compiler support -rpath directly 5427255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5428255365Sdes fi 5429255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5430255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5431255365Sdes ;; 5432255365Sdes 5433255365Sdes solaris*) 5434255365Sdes _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5435255365Sdes if test "$GCC" = yes; then 5436255365Sdes wlarc='${wl}' 5437255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5438255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5439255365Sdes $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' 5440255365Sdes else 5441255365Sdes case `$CC -V 2>&1` in 5442255365Sdes *"Compilers 5.0"*) 5443255365Sdes wlarc='' 5444255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5445255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5446255365Sdes $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5447255365Sdes ;; 5448255365Sdes *) 5449255365Sdes wlarc='${wl}' 5450255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5451255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5452255365Sdes $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5453255365Sdes ;; 5454255365Sdes esac 5455255365Sdes fi 5456255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5457255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5458255365Sdes case $host_os in 5459255365Sdes solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5460255365Sdes *) 5461255365Sdes # The compiler driver will combine and reorder linker options, 5462255365Sdes # but understands `-z linker_flag'. GCC discards it without `$wl', 5463255365Sdes # but is careful enough not to reorder. 5464255365Sdes # Supported since Solaris 2.6 (maybe 2.5.1?) 5465255365Sdes if test "$GCC" = yes; then 5466255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5467255365Sdes else 5468255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5469255365Sdes fi 5470255365Sdes ;; 5471255365Sdes esac 5472255365Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 5473255365Sdes ;; 5474255365Sdes 5475255365Sdes sunos4*) 5476255365Sdes if test "x$host_vendor" = xsequent; then 5477255365Sdes # Use $CC to link under sequent, because it throws in some extra .o 5478255365Sdes # files that make .init and .fini sections work. 5479255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5480255365Sdes else 5481255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5482255365Sdes fi 5483255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5484255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5485255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5486255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5487255365Sdes ;; 5488255365Sdes 5489255365Sdes sysv4) 5490255365Sdes case $host_vendor in 5491255365Sdes sni) 5492255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5493255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5494255365Sdes ;; 5495255365Sdes siemens) 5496255365Sdes ## LD is ld it makes a PLAMLIB 5497255365Sdes ## CC just makes a GrossModule. 5498255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5499255365Sdes _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5500255365Sdes _LT_TAGVAR(hardcode_direct, $1)=no 5501255365Sdes ;; 5502255365Sdes motorola) 5503255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5504255365Sdes _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5505255365Sdes ;; 5506255365Sdes esac 5507255365Sdes runpath_var='LD_RUN_PATH' 5508255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5509255365Sdes ;; 5510255365Sdes 5511255365Sdes sysv4.3*) 5512255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5513255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5514255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5515255365Sdes ;; 5516255365Sdes 5517255365Sdes sysv4*MP*) 5518255365Sdes if test -d /usr/nec; then 5519255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5520255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5521255365Sdes runpath_var=LD_RUN_PATH 5522255365Sdes hardcode_runpath_var=yes 5523255365Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 5524255365Sdes fi 5525255365Sdes ;; 5526255365Sdes 5527255365Sdes sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5528255365Sdes _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5529255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5530255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5531255365Sdes runpath_var='LD_RUN_PATH' 5532255365Sdes 5533255365Sdes if test "$GCC" = yes; then 5534255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5535255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5536255365Sdes else 5537255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5538255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5539255365Sdes fi 5540255365Sdes ;; 5541255365Sdes 5542255365Sdes sysv5* | sco3.2v5* | sco5v6*) 5543255365Sdes # Note: We can NOT use -z defs as we might desire, because we do not 5544255365Sdes # link with -lc, and that would cause any symbols used from libc to 5545255365Sdes # always be unresolved, which means just about no library would 5546255365Sdes # ever link correctly. If we're not using GNU ld we use -z text 5547255365Sdes # though, which does catch some bad symbols but isn't as heavy-handed 5548255365Sdes # as -z defs. 5549255365Sdes _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5550255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5551255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5552255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5553255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5554255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5555255365Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 5556255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5557255365Sdes runpath_var='LD_RUN_PATH' 5558255365Sdes 5559255365Sdes if test "$GCC" = yes; then 5560255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5561255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5562255365Sdes else 5563255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5564255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5565255365Sdes fi 5566255365Sdes ;; 5567255365Sdes 5568255365Sdes uts4*) 5569255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5570255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5571255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5572255365Sdes ;; 5573255365Sdes 5574255365Sdes *) 5575255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5576255365Sdes ;; 5577255365Sdes esac 5578255365Sdes 5579255365Sdes if test x$host_vendor = xsni; then 5580255365Sdes case $host in 5581255365Sdes sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5582255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5583255365Sdes ;; 5584255365Sdes esac 5585255365Sdes fi 5586255365Sdes fi 5587255365Sdes]) 5588255365SdesAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5589255365Sdestest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5590255365Sdes 5591255365Sdes_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5592255365Sdes 5593255365Sdes_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5594255365Sdes_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5595255365Sdes_LT_DECL([], [extract_expsyms_cmds], [2], 5596255365Sdes [The commands to extract the exported symbol list from a shared archive]) 5597255365Sdes 5598255365Sdes# 5599255365Sdes# Do we need to explicitly link libc? 5600255365Sdes# 5601255365Sdescase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5602255365Sdesx|xyes) 5603255365Sdes # Assume -lc should be added 5604255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5605255365Sdes 5606255365Sdes if test "$enable_shared" = yes && test "$GCC" = yes; then 5607255365Sdes case $_LT_TAGVAR(archive_cmds, $1) in 5608255365Sdes *'~'*) 5609255365Sdes # FIXME: we may have to deal with multi-command sequences. 5610255365Sdes ;; 5611255365Sdes '$CC '*) 5612255365Sdes # Test whether the compiler implicitly links with -lc since on some 5613255365Sdes # systems, -lgcc has to come before -lc. If gcc already passes -lc 5614255365Sdes # to ld, don't add -lc before -lgcc. 5615255365Sdes AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5616255365Sdes [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5617255365Sdes [$RM conftest* 5618255365Sdes echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5619255365Sdes 5620255365Sdes if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5621255365Sdes soname=conftest 5622255365Sdes lib=conftest 5623255365Sdes libobjs=conftest.$ac_objext 5624255365Sdes deplibs= 5625255365Sdes wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5626255365Sdes pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5627255365Sdes compiler_flags=-v 5628255365Sdes linker_flags=-v 5629255365Sdes verstring= 5630255365Sdes output_objdir=. 5631255365Sdes libname=conftest 5632255365Sdes lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5633255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)= 5634255365Sdes if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5635255365Sdes then 5636255365Sdes lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5637255365Sdes else 5638255365Sdes lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5639255365Sdes fi 5640255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5641255365Sdes else 5642255365Sdes cat conftest.err 1>&5 5643255365Sdes fi 5644255365Sdes $RM conftest* 5645255365Sdes ]) 5646255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5647255365Sdes ;; 5648255365Sdes esac 5649255365Sdes fi 5650255365Sdes ;; 5651255365Sdesesac 5652255365Sdes 5653255365Sdes_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5654255365Sdes [Whether or not to add -lc for building shared libraries]) 5655255365Sdes_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5656255365Sdes [enable_shared_with_static_runtimes], [0], 5657255365Sdes [Whether or not to disallow shared libs when runtime libs are static]) 5658255365Sdes_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5659255365Sdes [Compiler flag to allow reflexive dlopens]) 5660255365Sdes_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5661255365Sdes [Compiler flag to generate shared objects directly from archives]) 5662255365Sdes_LT_TAGDECL([], [compiler_needs_object], [1], 5663255365Sdes [Whether the compiler copes with passing no objects directly]) 5664255365Sdes_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5665255365Sdes [Create an old-style archive from a shared archive]) 5666255365Sdes_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5667255365Sdes [Create a temporary old-style archive to link instead of a shared archive]) 5668255365Sdes_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5669255365Sdes_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5670255365Sdes_LT_TAGDECL([], [module_cmds], [2], 5671255365Sdes [Commands used to build a loadable module if different from building 5672255365Sdes a shared archive.]) 5673255365Sdes_LT_TAGDECL([], [module_expsym_cmds], [2]) 5674255365Sdes_LT_TAGDECL([], [with_gnu_ld], [1], 5675255365Sdes [Whether we are building with GNU ld or not]) 5676255365Sdes_LT_TAGDECL([], [allow_undefined_flag], [1], 5677255365Sdes [Flag that allows shared libraries with undefined symbols to be built]) 5678255365Sdes_LT_TAGDECL([], [no_undefined_flag], [1], 5679255365Sdes [Flag that enforces no undefined symbols]) 5680255365Sdes_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5681255365Sdes [Flag to hardcode $libdir into a binary during linking. 5682255365Sdes This must work even if $libdir does not exist]) 5683255365Sdes_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5684255365Sdes [Whether we need a single "-rpath" flag with a separated argument]) 5685255365Sdes_LT_TAGDECL([], [hardcode_direct], [0], 5686255365Sdes [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5687255365Sdes DIR into the resulting binary]) 5688255365Sdes_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5689255365Sdes [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5690255365Sdes DIR into the resulting binary and the resulting library dependency is 5691255365Sdes "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5692255365Sdes library is relocated]) 5693255365Sdes_LT_TAGDECL([], [hardcode_minus_L], [0], 5694255365Sdes [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5695255365Sdes into the resulting binary]) 5696255365Sdes_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5697255365Sdes [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5698255365Sdes into the resulting binary]) 5699255365Sdes_LT_TAGDECL([], [hardcode_automatic], [0], 5700255365Sdes [Set to "yes" if building a shared library automatically hardcodes DIR 5701255365Sdes into the library and all subsequent libraries and executables linked 5702255365Sdes against it]) 5703255365Sdes_LT_TAGDECL([], [inherit_rpath], [0], 5704255365Sdes [Set to yes if linker adds runtime paths of dependent libraries 5705255365Sdes to runtime path list]) 5706255365Sdes_LT_TAGDECL([], [link_all_deplibs], [0], 5707255365Sdes [Whether libtool must link a program against all its dependency libraries]) 5708255365Sdes_LT_TAGDECL([], [always_export_symbols], [0], 5709255365Sdes [Set to "yes" if exported symbols are required]) 5710255365Sdes_LT_TAGDECL([], [export_symbols_cmds], [2], 5711255365Sdes [The commands to list exported symbols]) 5712255365Sdes_LT_TAGDECL([], [exclude_expsyms], [1], 5713255365Sdes [Symbols that should not be listed in the preloaded symbols]) 5714255365Sdes_LT_TAGDECL([], [include_expsyms], [1], 5715255365Sdes [Symbols that must always be exported]) 5716255365Sdes_LT_TAGDECL([], [prelink_cmds], [2], 5717255365Sdes [Commands necessary for linking programs (against libraries) with templates]) 5718255365Sdes_LT_TAGDECL([], [postlink_cmds], [2], 5719255365Sdes [Commands necessary for finishing linking programs]) 5720255365Sdes_LT_TAGDECL([], [file_list_spec], [1], 5721255365Sdes [Specify filename containing input files]) 5722255365Sdesdnl FIXME: Not yet implemented 5723255365Sdesdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5724255365Sdesdnl [Compiler flag to generate thread safe objects]) 5725255365Sdes])# _LT_LINKER_SHLIBS 5726255365Sdes 5727255365Sdes 5728255365Sdes# _LT_LANG_C_CONFIG([TAG]) 5729255365Sdes# ------------------------ 5730255365Sdes# Ensure that the configuration variables for a C compiler are suitably 5731255365Sdes# defined. These variables are subsequently used by _LT_CONFIG to write 5732255365Sdes# the compiler configuration to `libtool'. 5733255365Sdesm4_defun([_LT_LANG_C_CONFIG], 5734255365Sdes[m4_require([_LT_DECL_EGREP])dnl 5735255365Sdeslt_save_CC="$CC" 5736255365SdesAC_LANG_PUSH(C) 5737255365Sdes 5738255365Sdes# Source file extension for C test sources. 5739255365Sdesac_ext=c 5740255365Sdes 5741255365Sdes# Object file extension for compiled C test sources. 5742255365Sdesobjext=o 5743255365Sdes_LT_TAGVAR(objext, $1)=$objext 5744255365Sdes 5745255365Sdes# Code to be used in simple compile tests 5746255365Sdeslt_simple_compile_test_code="int some_variable = 0;" 5747255365Sdes 5748255365Sdes# Code to be used in simple link tests 5749255365Sdeslt_simple_link_test_code='int main(){return(0);}' 5750255365Sdes 5751255365Sdes_LT_TAG_COMPILER 5752255365Sdes# Save the default compiler, since it gets overwritten when the other 5753255365Sdes# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5754255365Sdescompiler_DEFAULT=$CC 5755255365Sdes 5756255365Sdes# save warnings/boilerplate of simple test code 5757255365Sdes_LT_COMPILER_BOILERPLATE 5758255365Sdes_LT_LINKER_BOILERPLATE 5759255365Sdes 5760255365Sdes## CAVEAT EMPTOR: 5761255365Sdes## There is no encapsulation within the following macros, do not change 5762255365Sdes## the running order or otherwise move them around unless you know exactly 5763255365Sdes## what you are doing... 5764255365Sdesif test -n "$compiler"; then 5765255365Sdes _LT_COMPILER_NO_RTTI($1) 5766255365Sdes _LT_COMPILER_PIC($1) 5767255365Sdes _LT_COMPILER_C_O($1) 5768255365Sdes _LT_COMPILER_FILE_LOCKS($1) 5769255365Sdes _LT_LINKER_SHLIBS($1) 5770255365Sdes _LT_SYS_DYNAMIC_LINKER($1) 5771255365Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 5772255365Sdes LT_SYS_DLOPEN_SELF 5773255365Sdes _LT_CMD_STRIPLIB 5774255365Sdes 5775255365Sdes # Report which library types will actually be built 5776255365Sdes AC_MSG_CHECKING([if libtool supports shared libraries]) 5777255365Sdes AC_MSG_RESULT([$can_build_shared]) 5778255365Sdes 5779255365Sdes AC_MSG_CHECKING([whether to build shared libraries]) 5780255365Sdes test "$can_build_shared" = "no" && enable_shared=no 5781255365Sdes 5782255365Sdes # On AIX, shared libraries and static libraries use the same namespace, and 5783255365Sdes # are all built from PIC. 5784255365Sdes case $host_os in 5785255365Sdes aix3*) 5786255365Sdes test "$enable_shared" = yes && enable_static=no 5787255365Sdes if test -n "$RANLIB"; then 5788255365Sdes archive_cmds="$archive_cmds~\$RANLIB \$lib" 5789255365Sdes postinstall_cmds='$RANLIB $lib' 5790255365Sdes fi 5791255365Sdes ;; 5792255365Sdes 5793255365Sdes aix[[4-9]]*) 5794255365Sdes if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5795255365Sdes test "$enable_shared" = yes && enable_static=no 5796255365Sdes fi 5797255365Sdes ;; 5798255365Sdes esac 5799255365Sdes AC_MSG_RESULT([$enable_shared]) 5800255365Sdes 5801255365Sdes AC_MSG_CHECKING([whether to build static libraries]) 5802255365Sdes # Make sure either enable_shared or enable_static is yes. 5803255365Sdes test "$enable_shared" = yes || enable_static=yes 5804255365Sdes AC_MSG_RESULT([$enable_static]) 5805255365Sdes 5806255365Sdes _LT_CONFIG($1) 5807255365Sdesfi 5808255365SdesAC_LANG_POP 5809255365SdesCC="$lt_save_CC" 5810255365Sdes])# _LT_LANG_C_CONFIG 5811255365Sdes 5812255365Sdes 5813255365Sdes# _LT_LANG_CXX_CONFIG([TAG]) 5814255365Sdes# -------------------------- 5815255365Sdes# Ensure that the configuration variables for a C++ compiler are suitably 5816255365Sdes# defined. These variables are subsequently used by _LT_CONFIG to write 5817255365Sdes# the compiler configuration to `libtool'. 5818255365Sdesm4_defun([_LT_LANG_CXX_CONFIG], 5819255365Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5820255365Sdesm4_require([_LT_DECL_EGREP])dnl 5821255365Sdesm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5822255365Sdesif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5823255365Sdes ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5824255365Sdes (test "X$CXX" != "Xg++"))) ; then 5825255365Sdes AC_PROG_CXXCPP 5826255365Sdeselse 5827255365Sdes _lt_caught_CXX_error=yes 5828255365Sdesfi 5829255365Sdes 5830255365SdesAC_LANG_PUSH(C++) 5831255365Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5832255365Sdes_LT_TAGVAR(allow_undefined_flag, $1)= 5833255365Sdes_LT_TAGVAR(always_export_symbols, $1)=no 5834255365Sdes_LT_TAGVAR(archive_expsym_cmds, $1)= 5835255365Sdes_LT_TAGVAR(compiler_needs_object, $1)=no 5836255365Sdes_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5837255365Sdes_LT_TAGVAR(hardcode_direct, $1)=no 5838255365Sdes_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5839255365Sdes_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5840255365Sdes_LT_TAGVAR(hardcode_libdir_separator, $1)= 5841255365Sdes_LT_TAGVAR(hardcode_minus_L, $1)=no 5842255365Sdes_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5843255365Sdes_LT_TAGVAR(hardcode_automatic, $1)=no 5844255365Sdes_LT_TAGVAR(inherit_rpath, $1)=no 5845255365Sdes_LT_TAGVAR(module_cmds, $1)= 5846255365Sdes_LT_TAGVAR(module_expsym_cmds, $1)= 5847255365Sdes_LT_TAGVAR(link_all_deplibs, $1)=unknown 5848255365Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5849255365Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 5850255365Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5851255365Sdes_LT_TAGVAR(no_undefined_flag, $1)= 5852255365Sdes_LT_TAGVAR(whole_archive_flag_spec, $1)= 5853255365Sdes_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5854255365Sdes 5855255365Sdes# Source file extension for C++ test sources. 5856255365Sdesac_ext=cpp 5857255365Sdes 5858255365Sdes# Object file extension for compiled C++ test sources. 5859255365Sdesobjext=o 5860255365Sdes_LT_TAGVAR(objext, $1)=$objext 5861255365Sdes 5862255365Sdes# No sense in running all these tests if we already determined that 5863255365Sdes# the CXX compiler isn't working. Some variables (like enable_shared) 5864255365Sdes# are currently assumed to apply to all compilers on this platform, 5865255365Sdes# and will be corrupted by setting them based on a non-working compiler. 5866255365Sdesif test "$_lt_caught_CXX_error" != yes; then 5867255365Sdes # Code to be used in simple compile tests 5868255365Sdes lt_simple_compile_test_code="int some_variable = 0;" 5869255365Sdes 5870255365Sdes # Code to be used in simple link tests 5871255365Sdes lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5872255365Sdes 5873255365Sdes # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5874255365Sdes _LT_TAG_COMPILER 5875255365Sdes 5876255365Sdes # save warnings/boilerplate of simple test code 5877255365Sdes _LT_COMPILER_BOILERPLATE 5878255365Sdes _LT_LINKER_BOILERPLATE 5879255365Sdes 5880255365Sdes # Allow CC to be a program name with arguments. 5881255365Sdes lt_save_CC=$CC 5882255365Sdes lt_save_CFLAGS=$CFLAGS 5883255365Sdes lt_save_LD=$LD 5884255365Sdes lt_save_GCC=$GCC 5885255365Sdes GCC=$GXX 5886255365Sdes lt_save_with_gnu_ld=$with_gnu_ld 5887255365Sdes lt_save_path_LD=$lt_cv_path_LD 5888255365Sdes if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5889255365Sdes lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5890255365Sdes else 5891255365Sdes $as_unset lt_cv_prog_gnu_ld 5892255365Sdes fi 5893255365Sdes if test -n "${lt_cv_path_LDCXX+set}"; then 5894255365Sdes lt_cv_path_LD=$lt_cv_path_LDCXX 5895255365Sdes else 5896255365Sdes $as_unset lt_cv_path_LD 5897255365Sdes fi 5898255365Sdes test -z "${LDCXX+set}" || LD=$LDCXX 5899255365Sdes CC=${CXX-"c++"} 5900255365Sdes CFLAGS=$CXXFLAGS 5901255365Sdes compiler=$CC 5902255365Sdes _LT_TAGVAR(compiler, $1)=$CC 5903255365Sdes _LT_CC_BASENAME([$compiler]) 5904255365Sdes 5905255365Sdes if test -n "$compiler"; then 5906255365Sdes # We don't want -fno-exception when compiling C++ code, so set the 5907255365Sdes # no_builtin_flag separately 5908255365Sdes if test "$GXX" = yes; then 5909255365Sdes _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5910255365Sdes else 5911255365Sdes _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5912255365Sdes fi 5913255365Sdes 5914255365Sdes if test "$GXX" = yes; then 5915255365Sdes # Set up default GNU C++ configuration 5916255365Sdes 5917255365Sdes LT_PATH_LD 5918255365Sdes 5919255365Sdes # Check if GNU C++ uses GNU ld as the underlying linker, since the 5920255365Sdes # archiving commands below assume that GNU ld is being used. 5921255365Sdes if test "$with_gnu_ld" = yes; then 5922255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5923255365Sdes _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' 5924255365Sdes 5925255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5926255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5927255365Sdes 5928255365Sdes # If archive_cmds runs LD, not CC, wlarc should be empty 5929255365Sdes # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5930255365Sdes # investigate it a little bit more. (MM) 5931255365Sdes wlarc='${wl}' 5932255365Sdes 5933255365Sdes # ancient GNU ld didn't support --whole-archive et. al. 5934255365Sdes if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5935255365Sdes $GREP 'no-whole-archive' > /dev/null; then 5936255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5937255365Sdes else 5938255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 5939255365Sdes fi 5940255365Sdes else 5941255365Sdes with_gnu_ld=no 5942255365Sdes wlarc= 5943255365Sdes 5944255365Sdes # A generic and very simple default shared library creation 5945255365Sdes # command for GNU C++ for the case where it uses the native 5946255365Sdes # linker, instead of GNU ld. If possible, this setting should 5947255365Sdes # overridden to take advantage of the native linker features on 5948255365Sdes # the platform it is being used on. 5949255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5950255365Sdes fi 5951255365Sdes 5952255365Sdes # Commands to make compiler produce verbose output that lists 5953255365Sdes # what "hidden" libraries, object files and flags are used when 5954255365Sdes # linking a shared library. 5955255365Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5956255365Sdes 5957255365Sdes else 5958255365Sdes GXX=no 5959255365Sdes with_gnu_ld=no 5960255365Sdes wlarc= 5961255365Sdes fi 5962255365Sdes 5963255365Sdes # PORTME: fill in a description of your system's C++ link characteristics 5964255365Sdes AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5965255365Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 5966255365Sdes case $host_os in 5967255365Sdes aix3*) 5968255365Sdes # FIXME: insert proper C++ library support 5969255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5970255365Sdes ;; 5971255365Sdes aix[[4-9]]*) 5972255365Sdes if test "$host_cpu" = ia64; then 5973255365Sdes # On IA64, the linker does run time linking by default, so we don't 5974255365Sdes # have to do anything special. 5975255365Sdes aix_use_runtimelinking=no 5976255365Sdes exp_sym_flag='-Bexport' 5977255365Sdes no_entry_flag="" 5978255365Sdes else 5979255365Sdes aix_use_runtimelinking=no 5980255365Sdes 5981255365Sdes # Test if we are trying to use run time linking or normal 5982255365Sdes # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5983255365Sdes # need to do runtime linking. 5984255365Sdes case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5985255365Sdes for ld_flag in $LDFLAGS; do 5986255365Sdes case $ld_flag in 5987255365Sdes *-brtl*) 5988255365Sdes aix_use_runtimelinking=yes 5989255365Sdes break 5990255365Sdes ;; 5991255365Sdes esac 5992255365Sdes done 5993255365Sdes ;; 5994255365Sdes esac 5995255365Sdes 5996255365Sdes exp_sym_flag='-bexport' 5997255365Sdes no_entry_flag='-bnoentry' 5998255365Sdes fi 5999255365Sdes 6000255365Sdes # When large executables or shared objects are built, AIX ld can 6001255365Sdes # have problems creating the table of contents. If linking a library 6002255365Sdes # or program results in "error TOC overflow" add -mminimal-toc to 6003255365Sdes # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6004255365Sdes # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6005255365Sdes 6006255365Sdes _LT_TAGVAR(archive_cmds, $1)='' 6007255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6008255365Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6009255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6010255365Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6011255365Sdes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6012255365Sdes 6013255365Sdes if test "$GXX" = yes; then 6014255365Sdes case $host_os in aix4.[[012]]|aix4.[[012]].*) 6015255365Sdes # We only want to do this on AIX 4.2 and lower, the check 6016255365Sdes # below for broken collect2 doesn't work under 4.3+ 6017255365Sdes collect2name=`${CC} -print-prog-name=collect2` 6018255365Sdes if test -f "$collect2name" && 6019255365Sdes strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6020255365Sdes then 6021255365Sdes # We have reworked collect2 6022255365Sdes : 6023255365Sdes else 6024255365Sdes # We have old collect2 6025255365Sdes _LT_TAGVAR(hardcode_direct, $1)=unsupported 6026255365Sdes # It fails to find uninstalled libraries when the uninstalled 6027255365Sdes # path is not listed in the libpath. Setting hardcode_minus_L 6028255365Sdes # to unsupported forces relinking 6029255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 6030255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6031255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)= 6032255365Sdes fi 6033255365Sdes esac 6034255365Sdes shared_flag='-shared' 6035255365Sdes if test "$aix_use_runtimelinking" = yes; then 6036255365Sdes shared_flag="$shared_flag "'${wl}-G' 6037255365Sdes fi 6038255365Sdes else 6039255365Sdes # not using gcc 6040255365Sdes if test "$host_cpu" = ia64; then 6041255365Sdes # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6042255365Sdes # chokes on -Wl,-G. The following line is correct: 6043255365Sdes shared_flag='-G' 6044255365Sdes else 6045255365Sdes if test "$aix_use_runtimelinking" = yes; then 6046255365Sdes shared_flag='${wl}-G' 6047255365Sdes else 6048255365Sdes shared_flag='${wl}-bM:SRE' 6049255365Sdes fi 6050255365Sdes fi 6051255365Sdes fi 6052255365Sdes 6053255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6054255365Sdes # It seems that -bexpall does not export symbols beginning with 6055255365Sdes # underscore (_), so it is better to generate a list of symbols to 6056255365Sdes # export. 6057255365Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 6058255365Sdes if test "$aix_use_runtimelinking" = yes; then 6059255365Sdes # Warning - without using the other runtime loading flags (-brtl), 6060255365Sdes # -berok will link without error, but may produce a broken library. 6061255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6062255365Sdes # Determine the default libpath from the value encoded in an empty 6063255365Sdes # executable. 6064255365Sdes _LT_SYS_MODULE_PATH_AIX([$1]) 6065255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6066255365Sdes 6067255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 6068255365Sdes else 6069255365Sdes if test "$host_cpu" = ia64; then 6070255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6071255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6072255365Sdes _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" 6073255365Sdes else 6074255365Sdes # Determine the default libpath from the value encoded in an 6075255365Sdes # empty executable. 6076255365Sdes _LT_SYS_MODULE_PATH_AIX([$1]) 6077255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6078255365Sdes # Warning - without using the other run time loading flags, 6079255365Sdes # -berok will link without error, but may produce a broken library. 6080255365Sdes _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6081255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6082255365Sdes if test "$with_gnu_ld" = yes; then 6083255365Sdes # We only use this code for GNU lds that support --whole-archive. 6084255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6085255365Sdes else 6086255365Sdes # Exported symbols can be pulled into shared objects from archives 6087255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6088255365Sdes fi 6089255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6090255365Sdes # This is similar to how AIX traditionally builds its shared 6091255365Sdes # libraries. 6092255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 6093255365Sdes fi 6094255365Sdes fi 6095255365Sdes ;; 6096255365Sdes 6097255365Sdes beos*) 6098255365Sdes if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6099255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6100255365Sdes # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6101255365Sdes # support --undefined. This deserves some investigation. FIXME 6102255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6103255365Sdes else 6104255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6105255365Sdes fi 6106255365Sdes ;; 6107255365Sdes 6108255365Sdes chorus*) 6109255365Sdes case $cc_basename in 6110255365Sdes *) 6111255365Sdes # FIXME: insert proper C++ library support 6112255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6113255365Sdes ;; 6114255365Sdes esac 6115255365Sdes ;; 6116255365Sdes 6117255365Sdes cygwin* | mingw* | pw32* | cegcc*) 6118255365Sdes case $GXX,$cc_basename in 6119255365Sdes ,cl* | no,cl*) 6120255365Sdes # Native MSVC 6121255365Sdes # hardcode_libdir_flag_spec is actually meaningless, as there is 6122255365Sdes # no search path for DLLs. 6123255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6124255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6125255365Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 6126255365Sdes _LT_TAGVAR(file_list_spec, $1)='@' 6127255365Sdes # Tell ltmain to make .lib files, not .a files. 6128255365Sdes libext=lib 6129255365Sdes # Tell ltmain to make .dll files, not .so files. 6130255365Sdes shrext_cmds=".dll" 6131255365Sdes # FIXME: Setting linknames here is a bad hack. 6132255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6133255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6134255365Sdes $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6135255365Sdes else 6136255365Sdes $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6137255365Sdes fi~ 6138255365Sdes $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6139255365Sdes linknames=' 6140255365Sdes # The linker will not automatically build a static lib if we build a DLL. 6141255365Sdes # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6142255365Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6143255365Sdes # Don't use ranlib 6144255365Sdes _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6145255365Sdes _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6146255365Sdes lt_tool_outputfile="@TOOL_OUTPUT@"~ 6147255365Sdes case $lt_outputfile in 6148255365Sdes *.exe|*.EXE) ;; 6149255365Sdes *) 6150255365Sdes lt_outputfile="$lt_outputfile.exe" 6151255365Sdes lt_tool_outputfile="$lt_tool_outputfile.exe" 6152255365Sdes ;; 6153255365Sdes esac~ 6154255365Sdes func_to_tool_file "$lt_outputfile"~ 6155255365Sdes if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6156255365Sdes $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6157255365Sdes $RM "$lt_outputfile.manifest"; 6158255365Sdes fi' 6159255365Sdes ;; 6160255365Sdes *) 6161255365Sdes # g++ 6162255365Sdes # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6163255365Sdes # as there is no search path for DLLs. 6164255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6165255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6166255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6167255365Sdes _LT_TAGVAR(always_export_symbols, $1)=no 6168255365Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6169255365Sdes 6170255365Sdes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6171255365Sdes _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' 6172255365Sdes # If the export-symbols file already is a .def file (1st line 6173255365Sdes # is EXPORTS), use it as is; otherwise, prepend... 6174255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6175255365Sdes cp $export_symbols $output_objdir/$soname.def; 6176255365Sdes else 6177255365Sdes echo EXPORTS > $output_objdir/$soname.def; 6178255365Sdes cat $export_symbols >> $output_objdir/$soname.def; 6179255365Sdes fi~ 6180255365Sdes $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' 6181255365Sdes else 6182255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6183255365Sdes fi 6184255365Sdes ;; 6185255365Sdes esac 6186255365Sdes ;; 6187255365Sdes darwin* | rhapsody*) 6188255365Sdes _LT_DARWIN_LINKER_FEATURES($1) 6189255365Sdes ;; 6190255365Sdes 6191255365Sdes dgux*) 6192255365Sdes case $cc_basename in 6193255365Sdes ec++*) 6194255365Sdes # FIXME: insert proper C++ library support 6195255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6196255365Sdes ;; 6197255365Sdes ghcx*) 6198255365Sdes # Green Hills C++ Compiler 6199255365Sdes # FIXME: insert proper C++ library support 6200255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6201255365Sdes ;; 6202255365Sdes *) 6203255365Sdes # FIXME: insert proper C++ library support 6204255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6205255365Sdes ;; 6206255365Sdes esac 6207255365Sdes ;; 6208255365Sdes 6209255365Sdes freebsd2.*) 6210255365Sdes # C++ shared libraries reported to be fairly broken before 6211255365Sdes # switch to ELF 6212255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6213255365Sdes ;; 6214255365Sdes 6215255365Sdes freebsd-elf*) 6216255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6217255365Sdes ;; 6218255365Sdes 6219255365Sdes freebsd* | dragonfly*) 6220255365Sdes # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6221255365Sdes # conventions 6222255365Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 6223255365Sdes ;; 6224255365Sdes 6225255365Sdes gnu*) 6226255365Sdes ;; 6227255365Sdes 6228255365Sdes haiku*) 6229255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6230255365Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6231255365Sdes ;; 6232255365Sdes 6233255365Sdes hpux9*) 6234255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6235255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6236255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6237255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6238255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6239255365Sdes # but as the default 6240255365Sdes # location of the library. 6241255365Sdes 6242255365Sdes case $cc_basename in 6243255365Sdes CC*) 6244255365Sdes # FIXME: insert proper C++ library support 6245255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6246255365Sdes ;; 6247255365Sdes aCC*) 6248255365Sdes _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6249255365Sdes # Commands to make compiler produce verbose output that lists 6250255365Sdes # what "hidden" libraries, object files and flags are used when 6251255365Sdes # linking a shared library. 6252255365Sdes # 6253255365Sdes # There doesn't appear to be a way to prevent this compiler from 6254255365Sdes # explicitly linking system object files so we need to strip them 6255255365Sdes # from the output so that they don't get included in the library 6256255365Sdes # dependencies. 6257255365Sdes 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"' 6258255365Sdes ;; 6259255365Sdes *) 6260255365Sdes if test "$GXX" = yes; then 6261255365Sdes _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6262255365Sdes else 6263255365Sdes # FIXME: insert proper C++ library support 6264255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6265255365Sdes fi 6266255365Sdes ;; 6267255365Sdes esac 6268255365Sdes ;; 6269255365Sdes 6270255365Sdes hpux10*|hpux11*) 6271255365Sdes if test $with_gnu_ld = no; then 6272255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6273255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6274255365Sdes 6275255365Sdes case $host_cpu in 6276255365Sdes hppa*64*|ia64*) 6277255365Sdes ;; 6278255365Sdes *) 6279255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6280255365Sdes ;; 6281255365Sdes esac 6282255365Sdes fi 6283255365Sdes case $host_cpu in 6284255365Sdes hppa*64*|ia64*) 6285255365Sdes _LT_TAGVAR(hardcode_direct, $1)=no 6286255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6287255365Sdes ;; 6288255365Sdes *) 6289255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6290255365Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6291255365Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6292255365Sdes # but as the default 6293255365Sdes # location of the library. 6294255365Sdes ;; 6295255365Sdes esac 6296255365Sdes 6297255365Sdes case $cc_basename in 6298255365Sdes CC*) 6299255365Sdes # FIXME: insert proper C++ library support 6300255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6301255365Sdes ;; 6302255365Sdes aCC*) 6303255365Sdes case $host_cpu in 6304255365Sdes hppa*64*) 6305255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6306255365Sdes ;; 6307255365Sdes ia64*) 6308255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6309255365Sdes ;; 6310255365Sdes *) 6311255365Sdes _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' 6312255365Sdes ;; 6313255365Sdes esac 6314255365Sdes # Commands to make compiler produce verbose output that lists 6315255365Sdes # what "hidden" libraries, object files and flags are used when 6316255365Sdes # linking a shared library. 6317255365Sdes # 6318255365Sdes # There doesn't appear to be a way to prevent this compiler from 6319255365Sdes # explicitly linking system object files so we need to strip them 6320255365Sdes # from the output so that they don't get included in the library 6321255365Sdes # dependencies. 6322255365Sdes 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"' 6323255365Sdes ;; 6324255365Sdes *) 6325255365Sdes if test "$GXX" = yes; then 6326255365Sdes if test $with_gnu_ld = no; then 6327255365Sdes case $host_cpu in 6328255365Sdes hppa*64*) 6329255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6330255365Sdes ;; 6331255365Sdes ia64*) 6332255365Sdes _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' 6333255365Sdes ;; 6334255365Sdes *) 6335255365Sdes _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' 6336255365Sdes ;; 6337255365Sdes esac 6338255365Sdes fi 6339255365Sdes else 6340255365Sdes # FIXME: insert proper C++ library support 6341255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6342255365Sdes fi 6343255365Sdes ;; 6344255365Sdes esac 6345255365Sdes ;; 6346255365Sdes 6347255365Sdes interix[[3-9]]*) 6348255365Sdes _LT_TAGVAR(hardcode_direct, $1)=no 6349255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6350255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6351255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6352255365Sdes # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6353255365Sdes # Instead, shared libraries are loaded at an image base (0x10000000 by 6354255365Sdes # default) and relocated if they conflict, which is a slow very memory 6355255365Sdes # consuming and fragmenting process. To avoid this, we pick a random, 6356255365Sdes # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6357255365Sdes # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6358255365Sdes _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' 6359255365Sdes _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' 6360255365Sdes ;; 6361255365Sdes irix5* | irix6*) 6362255365Sdes case $cc_basename in 6363255365Sdes CC*) 6364255365Sdes # SGI C++ 6365255365Sdes _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' 6366255365Sdes 6367255365Sdes # Archives containing C++ object files must be created using 6368255365Sdes # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6369255365Sdes # necessary to make sure instantiated templates are included 6370255365Sdes # in the archive. 6371255365Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6372255365Sdes ;; 6373255365Sdes *) 6374255365Sdes if test "$GXX" = yes; then 6375255365Sdes if test "$with_gnu_ld" = no; then 6376255365Sdes _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' 6377255365Sdes else 6378255365Sdes _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' 6379255365Sdes fi 6380255365Sdes fi 6381255365Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6382255365Sdes ;; 6383255365Sdes esac 6384255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6385255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6386255365Sdes _LT_TAGVAR(inherit_rpath, $1)=yes 6387255365Sdes ;; 6388255365Sdes 6389255365Sdes linux* | k*bsd*-gnu | kopensolaris*-gnu) 6390255365Sdes case $cc_basename in 6391255365Sdes KCC*) 6392255365Sdes # Kuck and Associates, Inc. (KAI) C++ Compiler 6393255365Sdes 6394255365Sdes # KCC will only create a shared library if the output file 6395255365Sdes # ends with ".so" (or ".sl" for HP-UX), so rename the library 6396255365Sdes # to its proper name (with version) after linking. 6397255365Sdes _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' 6398255365Sdes _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' 6399255365Sdes # Commands to make compiler produce verbose output that lists 6400255365Sdes # what "hidden" libraries, object files and flags are used when 6401255365Sdes # linking a shared library. 6402255365Sdes # 6403255365Sdes # There doesn't appear to be a way to prevent this compiler from 6404255365Sdes # explicitly linking system object files so we need to strip them 6405255365Sdes # from the output so that they don't get included in the library 6406255365Sdes # dependencies. 6407255365Sdes 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"' 6408255365Sdes 6409255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6410255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6411255365Sdes 6412255365Sdes # Archives containing C++ object files must be created using 6413255365Sdes # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6414255365Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6415255365Sdes ;; 6416255365Sdes icpc* | ecpc* ) 6417255365Sdes # Intel C++ 6418255365Sdes with_gnu_ld=yes 6419255365Sdes # version 8.0 and above of icpc choke on multiply defined symbols 6420255365Sdes # if we add $predep_objects and $postdep_objects, however 7.1 and 6421255365Sdes # earlier do not add the objects themselves. 6422255365Sdes case `$CC -V 2>&1` in 6423255365Sdes *"Version 7."*) 6424255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6425255365Sdes _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' 6426255365Sdes ;; 6427255365Sdes *) # Version 8.0 or newer 6428255365Sdes tmp_idyn= 6429255365Sdes case $host_cpu in 6430255365Sdes ia64*) tmp_idyn=' -i_dynamic';; 6431255365Sdes esac 6432255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6433255365Sdes _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' 6434255365Sdes ;; 6435255365Sdes esac 6436255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6437255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6438255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6439255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6440255365Sdes ;; 6441255365Sdes pgCC* | pgcpp*) 6442255365Sdes # Portland Group C++ compiler 6443255365Sdes case `$CC -V` in 6444255365Sdes *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6445255365Sdes _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6446255365Sdes rm -rf $tpldir~ 6447255365Sdes $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6448255365Sdes compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6449255365Sdes _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6450255365Sdes rm -rf $tpldir~ 6451255365Sdes $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6452255365Sdes $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6453255365Sdes $RANLIB $oldlib' 6454255365Sdes _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6455255365Sdes rm -rf $tpldir~ 6456255365Sdes $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6457255365Sdes $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6458255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6459255365Sdes rm -rf $tpldir~ 6460255365Sdes $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6461255365Sdes $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' 6462255365Sdes ;; 6463255365Sdes *) # Version 6 and above use weak symbols 6464255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6465255365Sdes _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' 6466255365Sdes ;; 6467255365Sdes esac 6468255365Sdes 6469255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6470255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6471255365Sdes _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' 6472255365Sdes ;; 6473255365Sdes cxx*) 6474255365Sdes # Compaq C++ 6475255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6476255365Sdes _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' 6477255365Sdes 6478255365Sdes runpath_var=LD_RUN_PATH 6479255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6480255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6481255365Sdes 6482255365Sdes # Commands to make compiler produce verbose output that lists 6483255365Sdes # what "hidden" libraries, object files and flags are used when 6484255365Sdes # linking a shared library. 6485255365Sdes # 6486255365Sdes # There doesn't appear to be a way to prevent this compiler from 6487255365Sdes # explicitly linking system object files so we need to strip them 6488255365Sdes # from the output so that they don't get included in the library 6489255365Sdes # dependencies. 6490255365Sdes 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' 6491255365Sdes ;; 6492255365Sdes xl* | mpixl* | bgxl*) 6493255365Sdes # IBM XL 8.0 on PPC, with GNU ld 6494255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6495255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6496255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6497255365Sdes if test "x$supports_anon_versioning" = xyes; then 6498255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6499255365Sdes cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6500255365Sdes echo "local: *; };" >> $output_objdir/$libname.ver~ 6501255365Sdes $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6502255365Sdes fi 6503255365Sdes ;; 6504255365Sdes *) 6505255365Sdes case `$CC -V 2>&1 | sed 5q` in 6506255365Sdes *Sun\ C*) 6507255365Sdes # Sun C++ 5.9 6508255365Sdes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6509255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6510255365Sdes _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' 6511255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6512255365Sdes _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' 6513255365Sdes _LT_TAGVAR(compiler_needs_object, $1)=yes 6514255365Sdes 6515255365Sdes # Not sure whether something based on 6516255365Sdes # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6517255365Sdes # would be better. 6518255365Sdes output_verbose_link_cmd='func_echo_all' 6519255365Sdes 6520255365Sdes # Archives containing C++ object files must be created using 6521255365Sdes # "CC -xar", where "CC" is the Sun C++ compiler. This is 6522255365Sdes # necessary to make sure instantiated templates are included 6523255365Sdes # in the archive. 6524255365Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6525255365Sdes ;; 6526255365Sdes esac 6527255365Sdes ;; 6528255365Sdes esac 6529255365Sdes ;; 6530255365Sdes 6531255365Sdes lynxos*) 6532255365Sdes # FIXME: insert proper C++ library support 6533255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6534255365Sdes ;; 6535255365Sdes 6536255365Sdes m88k*) 6537255365Sdes # FIXME: insert proper C++ library support 6538255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6539255365Sdes ;; 6540255365Sdes 6541255365Sdes mvs*) 6542255365Sdes case $cc_basename in 6543255365Sdes cxx*) 6544255365Sdes # FIXME: insert proper C++ library support 6545255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6546255365Sdes ;; 6547255365Sdes *) 6548255365Sdes # FIXME: insert proper C++ library support 6549255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6550255365Sdes ;; 6551255365Sdes esac 6552255365Sdes ;; 6553255365Sdes 6554255365Sdes netbsd*) 6555255365Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6556255365Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6557255365Sdes wlarc= 6558255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6559255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6560255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6561255365Sdes fi 6562255365Sdes # Workaround some broken pre-1.5 toolchains 6563255365Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6564255365Sdes ;; 6565255365Sdes 6566255365Sdes *nto* | *qnx*) 6567255365Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 6568255365Sdes ;; 6569255365Sdes 6570255365Sdes openbsd2*) 6571255365Sdes # C++ shared libraries are fairly broken 6572255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6573255365Sdes ;; 6574255365Sdes 6575255365Sdes openbsd*) 6576255365Sdes if test -f /usr/libexec/ld.so; then 6577255365Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6578255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6579255365Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6580255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6581255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6582255365Sdes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6583255365Sdes _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' 6584255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6585255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6586255365Sdes fi 6587255365Sdes output_verbose_link_cmd=func_echo_all 6588255365Sdes else 6589255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6590255365Sdes fi 6591255365Sdes ;; 6592255365Sdes 6593255365Sdes osf3* | osf4* | osf5*) 6594255365Sdes case $cc_basename in 6595255365Sdes KCC*) 6596255365Sdes # Kuck and Associates, Inc. (KAI) C++ Compiler 6597255365Sdes 6598255365Sdes # KCC will only create a shared library if the output file 6599255365Sdes # ends with ".so" (or ".sl" for HP-UX), so rename the library 6600255365Sdes # to its proper name (with version) after linking. 6601255365Sdes _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' 6602255365Sdes 6603255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6604255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6605255365Sdes 6606255365Sdes # Archives containing C++ object files must be created using 6607255365Sdes # the KAI C++ compiler. 6608255365Sdes case $host in 6609255365Sdes osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6610255365Sdes *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6611255365Sdes esac 6612255365Sdes ;; 6613255365Sdes RCC*) 6614255365Sdes # Rational C++ 2.4.1 6615255365Sdes # FIXME: insert proper C++ library support 6616255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6617255365Sdes ;; 6618255365Sdes cxx*) 6619255365Sdes case $host in 6620255365Sdes osf3*) 6621255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6622255365Sdes _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' 6623255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6624255365Sdes ;; 6625255365Sdes *) 6626255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6627255365Sdes _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' 6628255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6629255365Sdes echo "-hidden">> $lib.exp~ 6630255365Sdes $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~ 6631255365Sdes $RM $lib.exp' 6632255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6633255365Sdes ;; 6634255365Sdes esac 6635255365Sdes 6636255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6637255365Sdes 6638255365Sdes # Commands to make compiler produce verbose output that lists 6639255365Sdes # what "hidden" libraries, object files and flags are used when 6640255365Sdes # linking a shared library. 6641255365Sdes # 6642255365Sdes # There doesn't appear to be a way to prevent this compiler from 6643255365Sdes # explicitly linking system object files so we need to strip them 6644255365Sdes # from the output so that they don't get included in the library 6645255365Sdes # dependencies. 6646255365Sdes 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"' 6647255365Sdes ;; 6648255365Sdes *) 6649255365Sdes if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6650255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6651255365Sdes case $host in 6652255365Sdes osf3*) 6653255365Sdes _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' 6654255365Sdes ;; 6655255365Sdes *) 6656255365Sdes _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' 6657255365Sdes ;; 6658255365Sdes esac 6659255365Sdes 6660255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6661255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6662255365Sdes 6663255365Sdes # Commands to make compiler produce verbose output that lists 6664255365Sdes # what "hidden" libraries, object files and flags are used when 6665255365Sdes # linking a shared library. 6666255365Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6667255365Sdes 6668255365Sdes else 6669255365Sdes # FIXME: insert proper C++ library support 6670255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6671255365Sdes fi 6672255365Sdes ;; 6673255365Sdes esac 6674255365Sdes ;; 6675255365Sdes 6676255365Sdes psos*) 6677255365Sdes # FIXME: insert proper C++ library support 6678255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6679255365Sdes ;; 6680255365Sdes 6681255365Sdes sunos4*) 6682255365Sdes case $cc_basename in 6683255365Sdes CC*) 6684255365Sdes # Sun C++ 4.x 6685255365Sdes # FIXME: insert proper C++ library support 6686255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6687255365Sdes ;; 6688255365Sdes lcc*) 6689255365Sdes # Lucid 6690255365Sdes # FIXME: insert proper C++ library support 6691255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6692255365Sdes ;; 6693255365Sdes *) 6694255365Sdes # FIXME: insert proper C++ library support 6695255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6696255365Sdes ;; 6697255365Sdes esac 6698255365Sdes ;; 6699255365Sdes 6700255365Sdes solaris*) 6701255365Sdes case $cc_basename in 6702255365Sdes CC* | sunCC*) 6703255365Sdes # Sun C++ 4.2, 5.x and Centerline C++ 6704255365Sdes _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6705255365Sdes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6706255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6707255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6708255365Sdes $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' 6709255365Sdes 6710255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6711255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6712255365Sdes case $host_os in 6713255365Sdes solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6714255365Sdes *) 6715255365Sdes # The compiler driver will combine and reorder linker options, 6716255365Sdes # but understands `-z linker_flag'. 6717255365Sdes # Supported since Solaris 2.6 (maybe 2.5.1?) 6718255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6719255365Sdes ;; 6720255365Sdes esac 6721255365Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6722255365Sdes 6723255365Sdes output_verbose_link_cmd='func_echo_all' 6724255365Sdes 6725255365Sdes # Archives containing C++ object files must be created using 6726255365Sdes # "CC -xar", where "CC" is the Sun C++ compiler. This is 6727255365Sdes # necessary to make sure instantiated templates are included 6728255365Sdes # in the archive. 6729255365Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6730255365Sdes ;; 6731255365Sdes gcx*) 6732255365Sdes # Green Hills C++ Compiler 6733255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6734255365Sdes 6735255365Sdes # The C++ compiler must be used to create the archive. 6736255365Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6737255365Sdes ;; 6738255365Sdes *) 6739255365Sdes # GNU C++ compiler with Solaris linker 6740255365Sdes if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6741255365Sdes _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6742255365Sdes if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6743255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6744255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6745255365Sdes $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6746255365Sdes 6747255365Sdes # Commands to make compiler produce verbose output that lists 6748255365Sdes # what "hidden" libraries, object files and flags are used when 6749255365Sdes # linking a shared library. 6750255365Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6751255365Sdes else 6752255365Sdes # g++ 2.7 appears to require `-G' NOT `-shared' on this 6753255365Sdes # platform. 6754255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6755255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6756255365Sdes $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6757255365Sdes 6758255365Sdes # Commands to make compiler produce verbose output that lists 6759255365Sdes # what "hidden" libraries, object files and flags are used when 6760255365Sdes # linking a shared library. 6761255365Sdes output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6762255365Sdes fi 6763255365Sdes 6764255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6765255365Sdes case $host_os in 6766255365Sdes solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6767255365Sdes *) 6768255365Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6769255365Sdes ;; 6770255365Sdes esac 6771255365Sdes fi 6772255365Sdes ;; 6773255365Sdes esac 6774255365Sdes ;; 6775255365Sdes 6776255365Sdes sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6777255365Sdes _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6778255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6779255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6780255365Sdes runpath_var='LD_RUN_PATH' 6781255365Sdes 6782255365Sdes case $cc_basename in 6783255365Sdes CC*) 6784255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6785255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6786255365Sdes ;; 6787255365Sdes *) 6788255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6789255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6790255365Sdes ;; 6791255365Sdes esac 6792255365Sdes ;; 6793255365Sdes 6794255365Sdes sysv5* | sco3.2v5* | sco5v6*) 6795255365Sdes # Note: We can NOT use -z defs as we might desire, because we do not 6796255365Sdes # link with -lc, and that would cause any symbols used from libc to 6797255365Sdes # always be unresolved, which means just about no library would 6798255365Sdes # ever link correctly. If we're not using GNU ld we use -z text 6799255365Sdes # though, which does catch some bad symbols but isn't as heavy-handed 6800255365Sdes # as -z defs. 6801255365Sdes _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6802255365Sdes _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6803255365Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6804255365Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6805255365Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6806255365Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6807255365Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6808255365Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6809255365Sdes runpath_var='LD_RUN_PATH' 6810255365Sdes 6811255365Sdes case $cc_basename in 6812255365Sdes CC*) 6813255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6814255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6815255365Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6816255365Sdes '"$_LT_TAGVAR(old_archive_cmds, $1)" 6817255365Sdes _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6818255365Sdes '"$_LT_TAGVAR(reload_cmds, $1)" 6819255365Sdes ;; 6820255365Sdes *) 6821255365Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6822255365Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6823255365Sdes ;; 6824255365Sdes esac 6825255365Sdes ;; 6826255365Sdes 6827255365Sdes tandem*) 6828255365Sdes case $cc_basename in 6829255365Sdes NCC*) 6830255365Sdes # NonStop-UX NCC 3.20 6831255365Sdes # FIXME: insert proper C++ library support 6832255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6833255365Sdes ;; 6834255365Sdes *) 6835255365Sdes # FIXME: insert proper C++ library support 6836255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6837255365Sdes ;; 6838255365Sdes esac 6839255365Sdes ;; 6840255365Sdes 6841255365Sdes vxworks*) 6842255365Sdes # FIXME: insert proper C++ library support 6843255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6844255365Sdes ;; 6845255365Sdes 6846255365Sdes *) 6847255365Sdes # FIXME: insert proper C++ library support 6848255365Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6849255365Sdes ;; 6850255365Sdes esac 6851255365Sdes 6852255365Sdes AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6853255365Sdes test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6854255365Sdes 6855255365Sdes _LT_TAGVAR(GCC, $1)="$GXX" 6856255365Sdes _LT_TAGVAR(LD, $1)="$LD" 6857255365Sdes 6858255365Sdes ## CAVEAT EMPTOR: 6859255365Sdes ## There is no encapsulation within the following macros, do not change 6860255365Sdes ## the running order or otherwise move them around unless you know exactly 6861255365Sdes ## what you are doing... 6862255365Sdes _LT_SYS_HIDDEN_LIBDEPS($1) 6863255365Sdes _LT_COMPILER_PIC($1) 6864255365Sdes _LT_COMPILER_C_O($1) 6865255365Sdes _LT_COMPILER_FILE_LOCKS($1) 6866255365Sdes _LT_LINKER_SHLIBS($1) 6867255365Sdes _LT_SYS_DYNAMIC_LINKER($1) 6868255365Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 6869255365Sdes 6870255365Sdes _LT_CONFIG($1) 6871255365Sdes fi # test -n "$compiler" 6872255365Sdes 6873255365Sdes CC=$lt_save_CC 6874255365Sdes CFLAGS=$lt_save_CFLAGS 6875255365Sdes LDCXX=$LD 6876255365Sdes LD=$lt_save_LD 6877255365Sdes GCC=$lt_save_GCC 6878255365Sdes with_gnu_ld=$lt_save_with_gnu_ld 6879255365Sdes lt_cv_path_LDCXX=$lt_cv_path_LD 6880255365Sdes lt_cv_path_LD=$lt_save_path_LD 6881255365Sdes lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6882255365Sdes lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6883255365Sdesfi # test "$_lt_caught_CXX_error" != yes 6884255365Sdes 6885255365SdesAC_LANG_POP 6886255365Sdes])# _LT_LANG_CXX_CONFIG 6887255365Sdes 6888255365Sdes 6889255365Sdes# _LT_FUNC_STRIPNAME_CNF 6890255365Sdes# ---------------------- 6891255365Sdes# func_stripname_cnf prefix suffix name 6892255365Sdes# strip PREFIX and SUFFIX off of NAME. 6893255365Sdes# PREFIX and SUFFIX must not contain globbing or regex special 6894255365Sdes# characters, hashes, percent signs, but SUFFIX may contain a leading 6895255365Sdes# dot (in which case that matches only a dot). 6896255365Sdes# 6897255365Sdes# This function is identical to the (non-XSI) version of func_stripname, 6898255365Sdes# except this one can be used by m4 code that may be executed by configure, 6899255365Sdes# rather than the libtool script. 6900255365Sdesm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6901255365SdesAC_REQUIRE([_LT_DECL_SED]) 6902255365SdesAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6903255365Sdesfunc_stripname_cnf () 6904255365Sdes{ 6905255365Sdes case ${2} in 6906255365Sdes .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6907255365Sdes *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6908255365Sdes esac 6909255365Sdes} # func_stripname_cnf 6910255365Sdes])# _LT_FUNC_STRIPNAME_CNF 6911255365Sdes 6912255365Sdes# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6913255365Sdes# --------------------------------- 6914255365Sdes# Figure out "hidden" library dependencies from verbose 6915255365Sdes# compiler output when linking a shared library. 6916255365Sdes# Parse the compiler output and extract the necessary 6917255365Sdes# objects, libraries and library flags. 6918255365Sdesm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6919255365Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6920255365SdesAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6921255365Sdes# Dependencies to place before and after the object being linked: 6922255365Sdes_LT_TAGVAR(predep_objects, $1)= 6923255365Sdes_LT_TAGVAR(postdep_objects, $1)= 6924255365Sdes_LT_TAGVAR(predeps, $1)= 6925255365Sdes_LT_TAGVAR(postdeps, $1)= 6926255365Sdes_LT_TAGVAR(compiler_lib_search_path, $1)= 6927255365Sdes 6928255365Sdesdnl we can't use the lt_simple_compile_test_code here, 6929255365Sdesdnl because it contains code intended for an executable, 6930255365Sdesdnl not a library. It's possible we should let each 6931255365Sdesdnl tag define a new lt_????_link_test_code variable, 6932255365Sdesdnl but it's only used here... 6933255365Sdesm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6934255365Sdesint a; 6935255365Sdesvoid foo (void) { a = 0; } 6936255365Sdes_LT_EOF 6937255365Sdes], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6938255365Sdesclass Foo 6939255365Sdes{ 6940255365Sdespublic: 6941255365Sdes Foo (void) { a = 0; } 6942255365Sdesprivate: 6943255365Sdes int a; 6944255365Sdes}; 6945255365Sdes_LT_EOF 6946255365Sdes], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6947255365Sdes subroutine foo 6948255365Sdes implicit none 6949255365Sdes integer*4 a 6950255365Sdes a=0 6951255365Sdes return 6952255365Sdes end 6953255365Sdes_LT_EOF 6954255365Sdes], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6955255365Sdes subroutine foo 6956255365Sdes implicit none 6957255365Sdes integer a 6958255365Sdes a=0 6959255365Sdes return 6960255365Sdes end 6961255365Sdes_LT_EOF 6962255365Sdes], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6963255365Sdespublic class foo { 6964255365Sdes private int a; 6965255365Sdes public void bar (void) { 6966255365Sdes a = 0; 6967255365Sdes } 6968255365Sdes}; 6969255365Sdes_LT_EOF 6970255365Sdes], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6971255365Sdespackage foo 6972255365Sdesfunc foo() { 6973255365Sdes} 6974255365Sdes_LT_EOF 6975255365Sdes]) 6976255365Sdes 6977255365Sdes_lt_libdeps_save_CFLAGS=$CFLAGS 6978255365Sdescase "$CC $CFLAGS " in #( 6979255365Sdes*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6980255365Sdes*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6981255365Sdes*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 6982255365Sdesesac 6983255365Sdes 6984255365Sdesdnl Parse the compiler output and extract the necessary 6985255365Sdesdnl objects, libraries and library flags. 6986255365Sdesif AC_TRY_EVAL(ac_compile); then 6987255365Sdes # Parse the compiler output and extract the necessary 6988255365Sdes # objects, libraries and library flags. 6989255365Sdes 6990255365Sdes # Sentinel used to keep track of whether or not we are before 6991255365Sdes # the conftest object file. 6992255365Sdes pre_test_object_deps_done=no 6993255365Sdes 6994255365Sdes for p in `eval "$output_verbose_link_cmd"`; do 6995255365Sdes case ${prev}${p} in 6996255365Sdes 6997255365Sdes -L* | -R* | -l*) 6998255365Sdes # Some compilers place space between "-{L,R}" and the path. 6999255365Sdes # Remove the space. 7000255365Sdes if test $p = "-L" || 7001255365Sdes test $p = "-R"; then 7002255365Sdes prev=$p 7003255365Sdes continue 7004255365Sdes fi 7005255365Sdes 7006255365Sdes # Expand the sysroot to ease extracting the directories later. 7007255365Sdes if test -z "$prev"; then 7008255365Sdes case $p in 7009255365Sdes -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7010255365Sdes -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7011255365Sdes -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7012255365Sdes esac 7013255365Sdes fi 7014255365Sdes case $p in 7015255365Sdes =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7016255365Sdes esac 7017255365Sdes if test "$pre_test_object_deps_done" = no; then 7018255365Sdes case ${prev} in 7019255365Sdes -L | -R) 7020255365Sdes # Internal compiler library paths should come after those 7021255365Sdes # provided the user. The postdeps already come after the 7022255365Sdes # user supplied libs so there is no need to process them. 7023255365Sdes if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7024255365Sdes _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 7025255365Sdes else 7026255365Sdes _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 7027255365Sdes fi 7028255365Sdes ;; 7029255365Sdes # The "-l" case would never come before the object being 7030255365Sdes # linked, so don't bother handling this case. 7031255365Sdes esac 7032255365Sdes else 7033255365Sdes if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7034255365Sdes _LT_TAGVAR(postdeps, $1)="${prev}${p}" 7035255365Sdes else 7036255365Sdes _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 7037255365Sdes fi 7038255365Sdes fi 7039255365Sdes prev= 7040255365Sdes ;; 7041255365Sdes 7042255365Sdes *.lto.$objext) ;; # Ignore GCC LTO objects 7043255365Sdes *.$objext) 7044255365Sdes # This assumes that the test object file only shows up 7045255365Sdes # once in the compiler output. 7046255365Sdes if test "$p" = "conftest.$objext"; then 7047255365Sdes pre_test_object_deps_done=yes 7048255365Sdes continue 7049255365Sdes fi 7050255365Sdes 7051255365Sdes if test "$pre_test_object_deps_done" = no; then 7052255365Sdes if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7053255365Sdes _LT_TAGVAR(predep_objects, $1)="$p" 7054255365Sdes else 7055255365Sdes _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7056255365Sdes fi 7057255365Sdes else 7058255365Sdes if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7059255365Sdes _LT_TAGVAR(postdep_objects, $1)="$p" 7060255365Sdes else 7061255365Sdes _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7062255365Sdes fi 7063255365Sdes fi 7064255365Sdes ;; 7065255365Sdes 7066255365Sdes *) ;; # Ignore the rest. 7067255365Sdes 7068255365Sdes esac 7069255365Sdes done 7070255365Sdes 7071255365Sdes # Clean up. 7072255365Sdes rm -f a.out a.exe 7073255365Sdeselse 7074255365Sdes echo "libtool.m4: error: problem compiling $1 test program" 7075255365Sdesfi 7076255365Sdes 7077255365Sdes$RM -f confest.$objext 7078255365SdesCFLAGS=$_lt_libdeps_save_CFLAGS 7079255365Sdes 7080255365Sdes# PORTME: override above test on systems where it is broken 7081255365Sdesm4_if([$1], [CXX], 7082255365Sdes[case $host_os in 7083255365Sdesinterix[[3-9]]*) 7084255365Sdes # Interix 3.5 installs completely hosed .la files for C++, so rather than 7085255365Sdes # hack all around it, let's just trust "g++" to DTRT. 7086255365Sdes _LT_TAGVAR(predep_objects,$1)= 7087255365Sdes _LT_TAGVAR(postdep_objects,$1)= 7088255365Sdes _LT_TAGVAR(postdeps,$1)= 7089255365Sdes ;; 7090255365Sdes 7091255365Sdeslinux*) 7092255365Sdes case `$CC -V 2>&1 | sed 5q` in 7093255365Sdes *Sun\ C*) 7094255365Sdes # Sun C++ 5.9 7095255365Sdes 7096255365Sdes # The more standards-conforming stlport4 library is 7097255365Sdes # incompatible with the Cstd library. Avoid specifying 7098255365Sdes # it if it's in CXXFLAGS. Ignore libCrun as 7099255365Sdes # -library=stlport4 depends on it. 7100255365Sdes case " $CXX $CXXFLAGS " in 7101255365Sdes *" -library=stlport4 "*) 7102255365Sdes solaris_use_stlport4=yes 7103255365Sdes ;; 7104255365Sdes esac 7105255365Sdes 7106255365Sdes if test "$solaris_use_stlport4" != yes; then 7107255365Sdes _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7108255365Sdes fi 7109255365Sdes ;; 7110255365Sdes esac 7111255365Sdes ;; 7112255365Sdes 7113255365Sdessolaris*) 7114255365Sdes case $cc_basename in 7115255365Sdes CC* | sunCC*) 7116255365Sdes # The more standards-conforming stlport4 library is 7117255365Sdes # incompatible with the Cstd library. Avoid specifying 7118255365Sdes # it if it's in CXXFLAGS. Ignore libCrun as 7119255365Sdes # -library=stlport4 depends on it. 7120255365Sdes case " $CXX $CXXFLAGS " in 7121255365Sdes *" -library=stlport4 "*) 7122255365Sdes solaris_use_stlport4=yes 7123255365Sdes ;; 7124255365Sdes esac 7125255365Sdes 7126255365Sdes # Adding this requires a known-good setup of shared libraries for 7127255365Sdes # Sun compiler versions before 5.6, else PIC objects from an old 7128255365Sdes # archive will be linked into the output, leading to subtle bugs. 7129255365Sdes if test "$solaris_use_stlport4" != yes; then 7130255365Sdes _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7131255365Sdes fi 7132255365Sdes ;; 7133255365Sdes esac 7134255365Sdes ;; 7135255365Sdesesac 7136255365Sdes]) 7137255365Sdes 7138255365Sdescase " $_LT_TAGVAR(postdeps, $1) " in 7139255365Sdes*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7140255365Sdesesac 7141255365Sdes _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7142255365Sdesif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7143255365Sdes _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7144255365Sdesfi 7145255365Sdes_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7146255365Sdes [The directories searched by this compiler when creating a shared library]) 7147255365Sdes_LT_TAGDECL([], [predep_objects], [1], 7148255365Sdes [Dependencies to place before and after the objects being linked to 7149255365Sdes create a shared library]) 7150255365Sdes_LT_TAGDECL([], [postdep_objects], [1]) 7151255365Sdes_LT_TAGDECL([], [predeps], [1]) 7152255365Sdes_LT_TAGDECL([], [postdeps], [1]) 7153255365Sdes_LT_TAGDECL([], [compiler_lib_search_path], [1], 7154255365Sdes [The library search path used internally by the compiler when linking 7155255365Sdes a shared library]) 7156255365Sdes])# _LT_SYS_HIDDEN_LIBDEPS 7157255365Sdes 7158255365Sdes 7159255365Sdes# _LT_LANG_F77_CONFIG([TAG]) 7160255365Sdes# -------------------------- 7161255365Sdes# Ensure that the configuration variables for a Fortran 77 compiler are 7162255365Sdes# suitably defined. These variables are subsequently used by _LT_CONFIG 7163255365Sdes# to write the compiler configuration to `libtool'. 7164255365Sdesm4_defun([_LT_LANG_F77_CONFIG], 7165255365Sdes[AC_LANG_PUSH(Fortran 77) 7166255365Sdesif test -z "$F77" || test "X$F77" = "Xno"; then 7167255365Sdes _lt_disable_F77=yes 7168255365Sdesfi 7169255365Sdes 7170255365Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7171255365Sdes_LT_TAGVAR(allow_undefined_flag, $1)= 7172255365Sdes_LT_TAGVAR(always_export_symbols, $1)=no 7173255365Sdes_LT_TAGVAR(archive_expsym_cmds, $1)= 7174255365Sdes_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7175255365Sdes_LT_TAGVAR(hardcode_direct, $1)=no 7176255365Sdes_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7177255365Sdes_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7178255365Sdes_LT_TAGVAR(hardcode_libdir_separator, $1)= 7179255365Sdes_LT_TAGVAR(hardcode_minus_L, $1)=no 7180255365Sdes_LT_TAGVAR(hardcode_automatic, $1)=no 7181255365Sdes_LT_TAGVAR(inherit_rpath, $1)=no 7182255365Sdes_LT_TAGVAR(module_cmds, $1)= 7183255365Sdes_LT_TAGVAR(module_expsym_cmds, $1)= 7184255365Sdes_LT_TAGVAR(link_all_deplibs, $1)=unknown 7185255365Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7186255365Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 7187255365Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7188255365Sdes_LT_TAGVAR(no_undefined_flag, $1)= 7189255365Sdes_LT_TAGVAR(whole_archive_flag_spec, $1)= 7190255365Sdes_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7191255365Sdes 7192255365Sdes# Source file extension for f77 test sources. 7193255365Sdesac_ext=f 7194255365Sdes 7195255365Sdes# Object file extension for compiled f77 test sources. 7196255365Sdesobjext=o 7197255365Sdes_LT_TAGVAR(objext, $1)=$objext 7198255365Sdes 7199255365Sdes# No sense in running all these tests if we already determined that 7200255365Sdes# the F77 compiler isn't working. Some variables (like enable_shared) 7201255365Sdes# are currently assumed to apply to all compilers on this platform, 7202255365Sdes# and will be corrupted by setting them based on a non-working compiler. 7203255365Sdesif test "$_lt_disable_F77" != yes; then 7204255365Sdes # Code to be used in simple compile tests 7205255365Sdes lt_simple_compile_test_code="\ 7206255365Sdes subroutine t 7207255365Sdes return 7208255365Sdes end 7209255365Sdes" 7210255365Sdes 7211255365Sdes # Code to be used in simple link tests 7212255365Sdes lt_simple_link_test_code="\ 7213255365Sdes program t 7214255365Sdes end 7215255365Sdes" 7216255365Sdes 7217255365Sdes # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7218255365Sdes _LT_TAG_COMPILER 7219255365Sdes 7220255365Sdes # save warnings/boilerplate of simple test code 7221255365Sdes _LT_COMPILER_BOILERPLATE 7222255365Sdes _LT_LINKER_BOILERPLATE 7223255365Sdes 7224255365Sdes # Allow CC to be a program name with arguments. 7225255365Sdes lt_save_CC="$CC" 7226255365Sdes lt_save_GCC=$GCC 7227255365Sdes lt_save_CFLAGS=$CFLAGS 7228255365Sdes CC=${F77-"f77"} 7229255365Sdes CFLAGS=$FFLAGS 7230255365Sdes compiler=$CC 7231255365Sdes _LT_TAGVAR(compiler, $1)=$CC 7232255365Sdes _LT_CC_BASENAME([$compiler]) 7233255365Sdes GCC=$G77 7234255365Sdes if test -n "$compiler"; then 7235255365Sdes AC_MSG_CHECKING([if libtool supports shared libraries]) 7236255365Sdes AC_MSG_RESULT([$can_build_shared]) 7237255365Sdes 7238255365Sdes AC_MSG_CHECKING([whether to build shared libraries]) 7239255365Sdes test "$can_build_shared" = "no" && enable_shared=no 7240255365Sdes 7241255365Sdes # On AIX, shared libraries and static libraries use the same namespace, and 7242255365Sdes # are all built from PIC. 7243255365Sdes case $host_os in 7244255365Sdes aix3*) 7245255365Sdes test "$enable_shared" = yes && enable_static=no 7246255365Sdes if test -n "$RANLIB"; then 7247255365Sdes archive_cmds="$archive_cmds~\$RANLIB \$lib" 7248255365Sdes postinstall_cmds='$RANLIB $lib' 7249255365Sdes fi 7250255365Sdes ;; 7251255365Sdes aix[[4-9]]*) 7252255365Sdes if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7253255365Sdes test "$enable_shared" = yes && enable_static=no 7254255365Sdes fi 7255255365Sdes ;; 7256255365Sdes esac 7257255365Sdes AC_MSG_RESULT([$enable_shared]) 7258255365Sdes 7259255365Sdes AC_MSG_CHECKING([whether to build static libraries]) 7260255365Sdes # Make sure either enable_shared or enable_static is yes. 7261255365Sdes test "$enable_shared" = yes || enable_static=yes 7262255365Sdes AC_MSG_RESULT([$enable_static]) 7263255365Sdes 7264255365Sdes _LT_TAGVAR(GCC, $1)="$G77" 7265255365Sdes _LT_TAGVAR(LD, $1)="$LD" 7266255365Sdes 7267255365Sdes ## CAVEAT EMPTOR: 7268255365Sdes ## There is no encapsulation within the following macros, do not change 7269255365Sdes ## the running order or otherwise move them around unless you know exactly 7270255365Sdes ## what you are doing... 7271255365Sdes _LT_COMPILER_PIC($1) 7272255365Sdes _LT_COMPILER_C_O($1) 7273255365Sdes _LT_COMPILER_FILE_LOCKS($1) 7274255365Sdes _LT_LINKER_SHLIBS($1) 7275255365Sdes _LT_SYS_DYNAMIC_LINKER($1) 7276255365Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 7277255365Sdes 7278255365Sdes _LT_CONFIG($1) 7279255365Sdes fi # test -n "$compiler" 7280255365Sdes 7281255365Sdes GCC=$lt_save_GCC 7282255365Sdes CC="$lt_save_CC" 7283255365Sdes CFLAGS="$lt_save_CFLAGS" 7284255365Sdesfi # test "$_lt_disable_F77" != yes 7285255365Sdes 7286255365SdesAC_LANG_POP 7287255365Sdes])# _LT_LANG_F77_CONFIG 7288255365Sdes 7289255365Sdes 7290255365Sdes# _LT_LANG_FC_CONFIG([TAG]) 7291255365Sdes# ------------------------- 7292255365Sdes# Ensure that the configuration variables for a Fortran compiler are 7293255365Sdes# suitably defined. These variables are subsequently used by _LT_CONFIG 7294255365Sdes# to write the compiler configuration to `libtool'. 7295255365Sdesm4_defun([_LT_LANG_FC_CONFIG], 7296255365Sdes[AC_LANG_PUSH(Fortran) 7297255365Sdes 7298255365Sdesif test -z "$FC" || test "X$FC" = "Xno"; then 7299255365Sdes _lt_disable_FC=yes 7300255365Sdesfi 7301255365Sdes 7302255365Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7303255365Sdes_LT_TAGVAR(allow_undefined_flag, $1)= 7304255365Sdes_LT_TAGVAR(always_export_symbols, $1)=no 7305255365Sdes_LT_TAGVAR(archive_expsym_cmds, $1)= 7306255365Sdes_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7307255365Sdes_LT_TAGVAR(hardcode_direct, $1)=no 7308255365Sdes_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7309255365Sdes_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7310255365Sdes_LT_TAGVAR(hardcode_libdir_separator, $1)= 7311255365Sdes_LT_TAGVAR(hardcode_minus_L, $1)=no 7312255365Sdes_LT_TAGVAR(hardcode_automatic, $1)=no 7313255365Sdes_LT_TAGVAR(inherit_rpath, $1)=no 7314255365Sdes_LT_TAGVAR(module_cmds, $1)= 7315255365Sdes_LT_TAGVAR(module_expsym_cmds, $1)= 7316255365Sdes_LT_TAGVAR(link_all_deplibs, $1)=unknown 7317255365Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7318255365Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 7319255365Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7320255365Sdes_LT_TAGVAR(no_undefined_flag, $1)= 7321255365Sdes_LT_TAGVAR(whole_archive_flag_spec, $1)= 7322255365Sdes_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7323255365Sdes 7324255365Sdes# Source file extension for fc test sources. 7325255365Sdesac_ext=${ac_fc_srcext-f} 7326255365Sdes 7327255365Sdes# Object file extension for compiled fc test sources. 7328255365Sdesobjext=o 7329255365Sdes_LT_TAGVAR(objext, $1)=$objext 7330255365Sdes 7331255365Sdes# No sense in running all these tests if we already determined that 7332255365Sdes# the FC compiler isn't working. Some variables (like enable_shared) 7333255365Sdes# are currently assumed to apply to all compilers on this platform, 7334255365Sdes# and will be corrupted by setting them based on a non-working compiler. 7335255365Sdesif test "$_lt_disable_FC" != yes; then 7336255365Sdes # Code to be used in simple compile tests 7337255365Sdes lt_simple_compile_test_code="\ 7338255365Sdes subroutine t 7339255365Sdes return 7340255365Sdes end 7341255365Sdes" 7342255365Sdes 7343255365Sdes # Code to be used in simple link tests 7344255365Sdes lt_simple_link_test_code="\ 7345255365Sdes program t 7346255365Sdes end 7347255365Sdes" 7348255365Sdes 7349255365Sdes # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7350255365Sdes _LT_TAG_COMPILER 7351255365Sdes 7352255365Sdes # save warnings/boilerplate of simple test code 7353255365Sdes _LT_COMPILER_BOILERPLATE 7354255365Sdes _LT_LINKER_BOILERPLATE 7355255365Sdes 7356255365Sdes # Allow CC to be a program name with arguments. 7357255365Sdes lt_save_CC="$CC" 7358255365Sdes lt_save_GCC=$GCC 7359255365Sdes lt_save_CFLAGS=$CFLAGS 7360255365Sdes CC=${FC-"f95"} 7361255365Sdes CFLAGS=$FCFLAGS 7362255365Sdes compiler=$CC 7363255365Sdes GCC=$ac_cv_fc_compiler_gnu 7364255365Sdes 7365255365Sdes _LT_TAGVAR(compiler, $1)=$CC 7366255365Sdes _LT_CC_BASENAME([$compiler]) 7367255365Sdes 7368255365Sdes if test -n "$compiler"; then 7369255365Sdes AC_MSG_CHECKING([if libtool supports shared libraries]) 7370255365Sdes AC_MSG_RESULT([$can_build_shared]) 7371255365Sdes 7372255365Sdes AC_MSG_CHECKING([whether to build shared libraries]) 7373255365Sdes test "$can_build_shared" = "no" && enable_shared=no 7374255365Sdes 7375255365Sdes # On AIX, shared libraries and static libraries use the same namespace, and 7376255365Sdes # are all built from PIC. 7377255365Sdes case $host_os in 7378255365Sdes aix3*) 7379255365Sdes test "$enable_shared" = yes && enable_static=no 7380255365Sdes if test -n "$RANLIB"; then 7381255365Sdes archive_cmds="$archive_cmds~\$RANLIB \$lib" 7382255365Sdes postinstall_cmds='$RANLIB $lib' 7383255365Sdes fi 7384255365Sdes ;; 7385255365Sdes aix[[4-9]]*) 7386255365Sdes if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7387255365Sdes test "$enable_shared" = yes && enable_static=no 7388255365Sdes fi 7389255365Sdes ;; 7390255365Sdes esac 7391255365Sdes AC_MSG_RESULT([$enable_shared]) 7392255365Sdes 7393255365Sdes AC_MSG_CHECKING([whether to build static libraries]) 7394255365Sdes # Make sure either enable_shared or enable_static is yes. 7395255365Sdes test "$enable_shared" = yes || enable_static=yes 7396255365Sdes AC_MSG_RESULT([$enable_static]) 7397255365Sdes 7398255365Sdes _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7399255365Sdes _LT_TAGVAR(LD, $1)="$LD" 7400255365Sdes 7401255365Sdes ## CAVEAT EMPTOR: 7402255365Sdes ## There is no encapsulation within the following macros, do not change 7403255365Sdes ## the running order or otherwise move them around unless you know exactly 7404255365Sdes ## what you are doing... 7405255365Sdes _LT_SYS_HIDDEN_LIBDEPS($1) 7406255365Sdes _LT_COMPILER_PIC($1) 7407255365Sdes _LT_COMPILER_C_O($1) 7408255365Sdes _LT_COMPILER_FILE_LOCKS($1) 7409255365Sdes _LT_LINKER_SHLIBS($1) 7410255365Sdes _LT_SYS_DYNAMIC_LINKER($1) 7411255365Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 7412255365Sdes 7413255365Sdes _LT_CONFIG($1) 7414255365Sdes fi # test -n "$compiler" 7415255365Sdes 7416255365Sdes GCC=$lt_save_GCC 7417255365Sdes CC=$lt_save_CC 7418255365Sdes CFLAGS=$lt_save_CFLAGS 7419255365Sdesfi # test "$_lt_disable_FC" != yes 7420255365Sdes 7421255365SdesAC_LANG_POP 7422255365Sdes])# _LT_LANG_FC_CONFIG 7423255365Sdes 7424255365Sdes 7425255365Sdes# _LT_LANG_GCJ_CONFIG([TAG]) 7426255365Sdes# -------------------------- 7427255365Sdes# Ensure that the configuration variables for the GNU Java Compiler compiler 7428255365Sdes# are suitably defined. These variables are subsequently used by _LT_CONFIG 7429255365Sdes# to write the compiler configuration to `libtool'. 7430255365Sdesm4_defun([_LT_LANG_GCJ_CONFIG], 7431255365Sdes[AC_REQUIRE([LT_PROG_GCJ])dnl 7432255365SdesAC_LANG_SAVE 7433255365Sdes 7434255365Sdes# Source file extension for Java test sources. 7435255365Sdesac_ext=java 7436255365Sdes 7437255365Sdes# Object file extension for compiled Java test sources. 7438255365Sdesobjext=o 7439255365Sdes_LT_TAGVAR(objext, $1)=$objext 7440255365Sdes 7441255365Sdes# Code to be used in simple compile tests 7442255365Sdeslt_simple_compile_test_code="class foo {}" 7443255365Sdes 7444255365Sdes# Code to be used in simple link tests 7445255365Sdeslt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7446255365Sdes 7447255365Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7448255365Sdes_LT_TAG_COMPILER 7449255365Sdes 7450255365Sdes# save warnings/boilerplate of simple test code 7451255365Sdes_LT_COMPILER_BOILERPLATE 7452255365Sdes_LT_LINKER_BOILERPLATE 7453255365Sdes 7454255365Sdes# Allow CC to be a program name with arguments. 7455255365Sdeslt_save_CC=$CC 7456255365Sdeslt_save_CFLAGS=$CFLAGS 7457255365Sdeslt_save_GCC=$GCC 7458255365SdesGCC=yes 7459255365SdesCC=${GCJ-"gcj"} 7460255365SdesCFLAGS=$GCJFLAGS 7461255365Sdescompiler=$CC 7462255365Sdes_LT_TAGVAR(compiler, $1)=$CC 7463255365Sdes_LT_TAGVAR(LD, $1)="$LD" 7464255365Sdes_LT_CC_BASENAME([$compiler]) 7465255365Sdes 7466255365Sdes# GCJ did not exist at the time GCC didn't implicitly link libc in. 7467255365Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7468255365Sdes 7469255365Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7470255365Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 7471255365Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7472255365Sdes 7473255365Sdes## CAVEAT EMPTOR: 7474255365Sdes## There is no encapsulation within the following macros, do not change 7475255365Sdes## the running order or otherwise move them around unless you know exactly 7476255365Sdes## what you are doing... 7477255365Sdesif test -n "$compiler"; then 7478255365Sdes _LT_COMPILER_NO_RTTI($1) 7479255365Sdes _LT_COMPILER_PIC($1) 7480255365Sdes _LT_COMPILER_C_O($1) 7481255365Sdes _LT_COMPILER_FILE_LOCKS($1) 7482255365Sdes _LT_LINKER_SHLIBS($1) 7483255365Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 7484255365Sdes 7485255365Sdes _LT_CONFIG($1) 7486255365Sdesfi 7487255365Sdes 7488255365SdesAC_LANG_RESTORE 7489255365Sdes 7490255365SdesGCC=$lt_save_GCC 7491255365SdesCC=$lt_save_CC 7492255365SdesCFLAGS=$lt_save_CFLAGS 7493255365Sdes])# _LT_LANG_GCJ_CONFIG 7494255365Sdes 7495255365Sdes 7496255365Sdes# _LT_LANG_GO_CONFIG([TAG]) 7497255365Sdes# -------------------------- 7498255365Sdes# Ensure that the configuration variables for the GNU Go compiler 7499255365Sdes# are suitably defined. These variables are subsequently used by _LT_CONFIG 7500255365Sdes# to write the compiler configuration to `libtool'. 7501255365Sdesm4_defun([_LT_LANG_GO_CONFIG], 7502255365Sdes[AC_REQUIRE([LT_PROG_GO])dnl 7503255365SdesAC_LANG_SAVE 7504255365Sdes 7505255365Sdes# Source file extension for Go test sources. 7506255365Sdesac_ext=go 7507255365Sdes 7508255365Sdes# Object file extension for compiled Go test sources. 7509255365Sdesobjext=o 7510255365Sdes_LT_TAGVAR(objext, $1)=$objext 7511255365Sdes 7512255365Sdes# Code to be used in simple compile tests 7513255365Sdeslt_simple_compile_test_code="package main; func main() { }" 7514255365Sdes 7515255365Sdes# Code to be used in simple link tests 7516255365Sdeslt_simple_link_test_code='package main; func main() { }' 7517255365Sdes 7518255365Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7519255365Sdes_LT_TAG_COMPILER 7520255365Sdes 7521255365Sdes# save warnings/boilerplate of simple test code 7522255365Sdes_LT_COMPILER_BOILERPLATE 7523255365Sdes_LT_LINKER_BOILERPLATE 7524255365Sdes 7525255365Sdes# Allow CC to be a program name with arguments. 7526255365Sdeslt_save_CC=$CC 7527255365Sdeslt_save_CFLAGS=$CFLAGS 7528255365Sdeslt_save_GCC=$GCC 7529255365SdesGCC=yes 7530255365SdesCC=${GOC-"gccgo"} 7531255365SdesCFLAGS=$GOFLAGS 7532255365Sdescompiler=$CC 7533255365Sdes_LT_TAGVAR(compiler, $1)=$CC 7534255365Sdes_LT_TAGVAR(LD, $1)="$LD" 7535255365Sdes_LT_CC_BASENAME([$compiler]) 7536255365Sdes 7537255365Sdes# Go did not exist at the time GCC didn't implicitly link libc in. 7538255365Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7539255365Sdes 7540255365Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7541255365Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 7542255365Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7543255365Sdes 7544255365Sdes## CAVEAT EMPTOR: 7545255365Sdes## There is no encapsulation within the following macros, do not change 7546255365Sdes## the running order or otherwise move them around unless you know exactly 7547255365Sdes## what you are doing... 7548255365Sdesif test -n "$compiler"; then 7549255365Sdes _LT_COMPILER_NO_RTTI($1) 7550255365Sdes _LT_COMPILER_PIC($1) 7551255365Sdes _LT_COMPILER_C_O($1) 7552255365Sdes _LT_COMPILER_FILE_LOCKS($1) 7553255365Sdes _LT_LINKER_SHLIBS($1) 7554255365Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 7555255365Sdes 7556255365Sdes _LT_CONFIG($1) 7557255365Sdesfi 7558255365Sdes 7559255365SdesAC_LANG_RESTORE 7560255365Sdes 7561255365SdesGCC=$lt_save_GCC 7562255365SdesCC=$lt_save_CC 7563255365SdesCFLAGS=$lt_save_CFLAGS 7564255365Sdes])# _LT_LANG_GO_CONFIG 7565255365Sdes 7566255365Sdes 7567255365Sdes# _LT_LANG_RC_CONFIG([TAG]) 7568255365Sdes# ------------------------- 7569255365Sdes# Ensure that the configuration variables for the Windows resource compiler 7570255365Sdes# are suitably defined. These variables are subsequently used by _LT_CONFIG 7571255365Sdes# to write the compiler configuration to `libtool'. 7572255365Sdesm4_defun([_LT_LANG_RC_CONFIG], 7573255365Sdes[AC_REQUIRE([LT_PROG_RC])dnl 7574255365SdesAC_LANG_SAVE 7575255365Sdes 7576255365Sdes# Source file extension for RC test sources. 7577255365Sdesac_ext=rc 7578255365Sdes 7579255365Sdes# Object file extension for compiled RC test sources. 7580255365Sdesobjext=o 7581255365Sdes_LT_TAGVAR(objext, $1)=$objext 7582255365Sdes 7583255365Sdes# Code to be used in simple compile tests 7584255365Sdeslt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7585255365Sdes 7586255365Sdes# Code to be used in simple link tests 7587255365Sdeslt_simple_link_test_code="$lt_simple_compile_test_code" 7588255365Sdes 7589255365Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7590255365Sdes_LT_TAG_COMPILER 7591255365Sdes 7592255365Sdes# save warnings/boilerplate of simple test code 7593255365Sdes_LT_COMPILER_BOILERPLATE 7594255365Sdes_LT_LINKER_BOILERPLATE 7595255365Sdes 7596255365Sdes# Allow CC to be a program name with arguments. 7597255365Sdeslt_save_CC="$CC" 7598255365Sdeslt_save_CFLAGS=$CFLAGS 7599255365Sdeslt_save_GCC=$GCC 7600255365SdesGCC= 7601255365SdesCC=${RC-"windres"} 7602255365SdesCFLAGS= 7603255365Sdescompiler=$CC 7604255365Sdes_LT_TAGVAR(compiler, $1)=$CC 7605255365Sdes_LT_CC_BASENAME([$compiler]) 7606255365Sdes_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7607255365Sdes 7608255365Sdesif test -n "$compiler"; then 7609255365Sdes : 7610255365Sdes _LT_CONFIG($1) 7611255365Sdesfi 7612255365Sdes 7613255365SdesGCC=$lt_save_GCC 7614255365SdesAC_LANG_RESTORE 7615255365SdesCC=$lt_save_CC 7616255365SdesCFLAGS=$lt_save_CFLAGS 7617255365Sdes])# _LT_LANG_RC_CONFIG 7618255365Sdes 7619255365Sdes 7620255365Sdes# LT_PROG_GCJ 7621255365Sdes# ----------- 7622255365SdesAC_DEFUN([LT_PROG_GCJ], 7623255365Sdes[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7624255365Sdes [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7625255365Sdes [AC_CHECK_TOOL(GCJ, gcj,) 7626255365Sdes test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7627255365Sdes AC_SUBST(GCJFLAGS)])])[]dnl 7628255365Sdes]) 7629255365Sdes 7630255365Sdes# Old name: 7631255365SdesAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7632255365Sdesdnl aclocal-1.4 backwards compatibility: 7633255365Sdesdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7634255365Sdes 7635255365Sdes 7636255365Sdes# LT_PROG_GO 7637255365Sdes# ---------- 7638255365SdesAC_DEFUN([LT_PROG_GO], 7639255365Sdes[AC_CHECK_TOOL(GOC, gccgo,) 7640255365Sdes]) 7641255365Sdes 7642255365Sdes 7643255365Sdes# LT_PROG_RC 7644255365Sdes# ---------- 7645255365SdesAC_DEFUN([LT_PROG_RC], 7646255365Sdes[AC_CHECK_TOOL(RC, windres,) 7647255365Sdes]) 7648255365Sdes 7649255365Sdes# Old name: 7650255365SdesAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7651255365Sdesdnl aclocal-1.4 backwards compatibility: 7652255365Sdesdnl AC_DEFUN([LT_AC_PROG_RC], []) 7653255365Sdes 7654255365Sdes 7655255365Sdes# _LT_DECL_EGREP 7656255365Sdes# -------------- 7657255365Sdes# If we don't have a new enough Autoconf to choose the best grep 7658255365Sdes# available, choose the one first in the user's PATH. 7659255365Sdesm4_defun([_LT_DECL_EGREP], 7660255365Sdes[AC_REQUIRE([AC_PROG_EGREP])dnl 7661255365SdesAC_REQUIRE([AC_PROG_FGREP])dnl 7662255365Sdestest -z "$GREP" && GREP=grep 7663255365Sdes_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7664255365Sdes_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7665255365Sdes_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7666255365Sdesdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7667255365SdesAC_SUBST([GREP]) 7668255365Sdes]) 7669255365Sdes 7670255365Sdes 7671255365Sdes# _LT_DECL_OBJDUMP 7672255365Sdes# -------------- 7673255365Sdes# If we don't have a new enough Autoconf to choose the best objdump 7674255365Sdes# available, choose the one first in the user's PATH. 7675255365Sdesm4_defun([_LT_DECL_OBJDUMP], 7676255365Sdes[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7677255365Sdestest -z "$OBJDUMP" && OBJDUMP=objdump 7678255365Sdes_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7679255365SdesAC_SUBST([OBJDUMP]) 7680255365Sdes]) 7681255365Sdes 7682255365Sdes# _LT_DECL_DLLTOOL 7683255365Sdes# ---------------- 7684255365Sdes# Ensure DLLTOOL variable is set. 7685255365Sdesm4_defun([_LT_DECL_DLLTOOL], 7686255365Sdes[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7687255365Sdestest -z "$DLLTOOL" && DLLTOOL=dlltool 7688255365Sdes_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7689255365SdesAC_SUBST([DLLTOOL]) 7690255365Sdes]) 7691255365Sdes 7692255365Sdes# _LT_DECL_SED 7693255365Sdes# ------------ 7694255365Sdes# Check for a fully-functional sed program, that truncates 7695255365Sdes# as few characters as possible. Prefer GNU sed if found. 7696255365Sdesm4_defun([_LT_DECL_SED], 7697255365Sdes[AC_PROG_SED 7698255365Sdestest -z "$SED" && SED=sed 7699255365SdesXsed="$SED -e 1s/^X//" 7700255365Sdes_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7701255365Sdes_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7702255365Sdes [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7703255365Sdes])# _LT_DECL_SED 7704255365Sdes 7705255365Sdesm4_ifndef([AC_PROG_SED], [ 7706255365Sdes############################################################ 7707255365Sdes# NOTE: This macro has been submitted for inclusion into # 7708255365Sdes# GNU Autoconf as AC_PROG_SED. When it is available in # 7709255365Sdes# a released version of Autoconf we should remove this # 7710255365Sdes# macro and use it instead. # 7711255365Sdes############################################################ 7712255365Sdes 7713255365Sdesm4_defun([AC_PROG_SED], 7714255365Sdes[AC_MSG_CHECKING([for a sed that does not truncate output]) 7715255365SdesAC_CACHE_VAL(lt_cv_path_SED, 7716255365Sdes[# Loop through the user's path and test for sed and gsed. 7717255365Sdes# Then use that list of sed's as ones to test for truncation. 7718255365Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7719255365Sdesfor as_dir in $PATH 7720255365Sdesdo 7721255365Sdes IFS=$as_save_IFS 7722255365Sdes test -z "$as_dir" && as_dir=. 7723255365Sdes for lt_ac_prog in sed gsed; do 7724255365Sdes for ac_exec_ext in '' $ac_executable_extensions; do 7725255365Sdes if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7726255365Sdes lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7727255365Sdes fi 7728255365Sdes done 7729255365Sdes done 7730255365Sdesdone 7731255365SdesIFS=$as_save_IFS 7732255365Sdeslt_ac_max=0 7733255365Sdeslt_ac_count=0 7734255365Sdes# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7735255365Sdes# along with /bin/sed that truncates output. 7736255365Sdesfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7737255365Sdes test ! -f $lt_ac_sed && continue 7738255365Sdes cat /dev/null > conftest.in 7739255365Sdes lt_ac_count=0 7740255365Sdes echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7741255365Sdes # Check for GNU sed and select it if it is found. 7742255365Sdes if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7743255365Sdes lt_cv_path_SED=$lt_ac_sed 7744255365Sdes break 7745255365Sdes fi 7746255365Sdes while true; do 7747255365Sdes cat conftest.in conftest.in >conftest.tmp 7748255365Sdes mv conftest.tmp conftest.in 7749255365Sdes cp conftest.in conftest.nl 7750255365Sdes echo >>conftest.nl 7751255365Sdes $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7752255365Sdes cmp -s conftest.out conftest.nl || break 7753255365Sdes # 10000 chars as input seems more than enough 7754255365Sdes test $lt_ac_count -gt 10 && break 7755255365Sdes lt_ac_count=`expr $lt_ac_count + 1` 7756255365Sdes if test $lt_ac_count -gt $lt_ac_max; then 7757255365Sdes lt_ac_max=$lt_ac_count 7758255365Sdes lt_cv_path_SED=$lt_ac_sed 7759255365Sdes fi 7760255365Sdes done 7761255365Sdesdone 7762255365Sdes]) 7763255365SdesSED=$lt_cv_path_SED 7764255365SdesAC_SUBST([SED]) 7765255365SdesAC_MSG_RESULT([$SED]) 7766255365Sdes])#AC_PROG_SED 7767255365Sdes])#m4_ifndef 7768255365Sdes 7769255365Sdes# Old name: 7770255365SdesAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7771255365Sdesdnl aclocal-1.4 backwards compatibility: 7772255365Sdesdnl AC_DEFUN([LT_AC_PROG_SED], []) 7773255365Sdes 7774255365Sdes 7775255365Sdes# _LT_CHECK_SHELL_FEATURES 7776255365Sdes# ------------------------ 7777255365Sdes# Find out whether the shell is Bourne or XSI compatible, 7778255365Sdes# or has some other useful features. 7779255365Sdesm4_defun([_LT_CHECK_SHELL_FEATURES], 7780255365Sdes[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7781255365Sdes# Try some XSI features 7782255365Sdesxsi_shell=no 7783255365Sdes( _lt_dummy="a/b/c" 7784255365Sdes test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7785255365Sdes = c,a/b,b/c, \ 7786255365Sdes && eval 'test $(( 1 + 1 )) -eq 2 \ 7787255365Sdes && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7788255365Sdes && xsi_shell=yes 7789255365SdesAC_MSG_RESULT([$xsi_shell]) 7790255365Sdes_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7791255365Sdes 7792255365SdesAC_MSG_CHECKING([whether the shell understands "+="]) 7793255365Sdeslt_shell_append=no 7794255365Sdes( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7795255365Sdes >/dev/null 2>&1 \ 7796255365Sdes && lt_shell_append=yes 7797255365SdesAC_MSG_RESULT([$lt_shell_append]) 7798255365Sdes_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7799255365Sdes 7800255365Sdesif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7801255365Sdes lt_unset=unset 7802255365Sdeselse 7803255365Sdes lt_unset=false 7804255365Sdesfi 7805255365Sdes_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7806255365Sdes 7807255365Sdes# test EBCDIC or ASCII 7808255365Sdescase `echo X|tr X '\101'` in 7809255365Sdes A) # ASCII based system 7810255365Sdes # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7811255365Sdes lt_SP2NL='tr \040 \012' 7812255365Sdes lt_NL2SP='tr \015\012 \040\040' 7813255365Sdes ;; 7814255365Sdes *) # EBCDIC based system 7815255365Sdes lt_SP2NL='tr \100 \n' 7816255365Sdes lt_NL2SP='tr \r\n \100\100' 7817255365Sdes ;; 7818255365Sdesesac 7819255365Sdes_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7820255365Sdes_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7821255365Sdes])# _LT_CHECK_SHELL_FEATURES 7822255365Sdes 7823255365Sdes 7824255365Sdes# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7825255365Sdes# ------------------------------------------------------ 7826255365Sdes# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7827255365Sdes# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7828255365Sdesm4_defun([_LT_PROG_FUNCTION_REPLACE], 7829255365Sdes[dnl { 7830255365Sdessed -e '/^$1 ()$/,/^} # $1 /c\ 7831255365Sdes$1 ()\ 7832255365Sdes{\ 7833255365Sdesm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7834255365Sdes} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7835255365Sdes && mv -f "$cfgfile.tmp" "$cfgfile" \ 7836255365Sdes || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7837255365Sdestest 0 -eq $? || _lt_function_replace_fail=: 7838255365Sdes]) 7839255365Sdes 7840255365Sdes 7841255365Sdes# _LT_PROG_REPLACE_SHELLFNS 7842255365Sdes# ------------------------- 7843255365Sdes# Replace existing portable implementations of several shell functions with 7844255365Sdes# equivalent extended shell implementations where those features are available.. 7845255365Sdesm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7846255365Sdes[if test x"$xsi_shell" = xyes; then 7847255365Sdes _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7848255365Sdes case ${1} in 7849255365Sdes */*) func_dirname_result="${1%/*}${2}" ;; 7850255365Sdes * ) func_dirname_result="${3}" ;; 7851255365Sdes esac]) 7852255365Sdes 7853255365Sdes _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7854255365Sdes func_basename_result="${1##*/}"]) 7855255365Sdes 7856255365Sdes _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7857255365Sdes case ${1} in 7858255365Sdes */*) func_dirname_result="${1%/*}${2}" ;; 7859255365Sdes * ) func_dirname_result="${3}" ;; 7860255365Sdes esac 7861255365Sdes func_basename_result="${1##*/}"]) 7862255365Sdes 7863255365Sdes _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7864255365Sdes # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7865255365Sdes # positional parameters, so assign one to ordinary parameter first. 7866255365Sdes func_stripname_result=${3} 7867255365Sdes func_stripname_result=${func_stripname_result#"${1}"} 7868255365Sdes func_stripname_result=${func_stripname_result%"${2}"}]) 7869255365Sdes 7870255365Sdes _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7871255365Sdes func_split_long_opt_name=${1%%=*} 7872255365Sdes func_split_long_opt_arg=${1#*=}]) 7873255365Sdes 7874255365Sdes _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7875255365Sdes func_split_short_opt_arg=${1#??} 7876255365Sdes func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7877255365Sdes 7878255365Sdes _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7879255365Sdes case ${1} in 7880255365Sdes *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7881255365Sdes *) func_lo2o_result=${1} ;; 7882255365Sdes esac]) 7883255365Sdes 7884255365Sdes _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7885255365Sdes 7886255365Sdes _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7887255365Sdes 7888255365Sdes _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7889255365Sdesfi 7890255365Sdes 7891255365Sdesif test x"$lt_shell_append" = xyes; then 7892255365Sdes _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7893255365Sdes 7894255365Sdes _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7895255365Sdes func_quote_for_eval "${2}" 7896255365Sdesdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7897255365Sdes eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7898255365Sdes 7899255365Sdes # Save a `func_append' function call where possible by direct use of '+=' 7900255365Sdes sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7901255365Sdes && mv -f "$cfgfile.tmp" "$cfgfile" \ 7902255365Sdes || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7903255365Sdes test 0 -eq $? || _lt_function_replace_fail=: 7904255365Sdeselse 7905255365Sdes # Save a `func_append' function call even when '+=' is not available 7906255365Sdes sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7907255365Sdes && mv -f "$cfgfile.tmp" "$cfgfile" \ 7908255365Sdes || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7909255365Sdes test 0 -eq $? || _lt_function_replace_fail=: 7910255365Sdesfi 7911255365Sdes 7912255365Sdesif test x"$_lt_function_replace_fail" = x":"; then 7913255365Sdes AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7914255365Sdesfi 7915255365Sdes]) 7916255365Sdes 7917255365Sdes# _LT_PATH_CONVERSION_FUNCTIONS 7918255365Sdes# ----------------------------- 7919255365Sdes# Determine which file name conversion functions should be used by 7920255365Sdes# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7921255365Sdes# for certain cross-compile configurations and native mingw. 7922255365Sdesm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7923255365Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7924255365SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7925255365SdesAC_MSG_CHECKING([how to convert $build file names to $host format]) 7926255365SdesAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7927255365Sdes[case $host in 7928255365Sdes *-*-mingw* ) 7929255365Sdes case $build in 7930255365Sdes *-*-mingw* ) # actually msys 7931255365Sdes lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7932255365Sdes ;; 7933255365Sdes *-*-cygwin* ) 7934255365Sdes lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7935255365Sdes ;; 7936255365Sdes * ) # otherwise, assume *nix 7937255365Sdes lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7938255365Sdes ;; 7939255365Sdes esac 7940255365Sdes ;; 7941255365Sdes *-*-cygwin* ) 7942255365Sdes case $build in 7943255365Sdes *-*-mingw* ) # actually msys 7944255365Sdes lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7945255365Sdes ;; 7946255365Sdes *-*-cygwin* ) 7947255365Sdes lt_cv_to_host_file_cmd=func_convert_file_noop 7948255365Sdes ;; 7949255365Sdes * ) # otherwise, assume *nix 7950255365Sdes lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7951255365Sdes ;; 7952255365Sdes esac 7953255365Sdes ;; 7954255365Sdes * ) # unhandled hosts (and "normal" native builds) 7955255365Sdes lt_cv_to_host_file_cmd=func_convert_file_noop 7956255365Sdes ;; 7957255365Sdesesac 7958255365Sdes]) 7959255365Sdesto_host_file_cmd=$lt_cv_to_host_file_cmd 7960255365SdesAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7961255365Sdes_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7962255365Sdes [0], [convert $build file names to $host format])dnl 7963255365Sdes 7964255365SdesAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7965255365SdesAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7966255365Sdes[#assume ordinary cross tools, or native build. 7967255365Sdeslt_cv_to_tool_file_cmd=func_convert_file_noop 7968255365Sdescase $host in 7969255365Sdes *-*-mingw* ) 7970255365Sdes case $build in 7971255365Sdes *-*-mingw* ) # actually msys 7972255365Sdes lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7973255365Sdes ;; 7974255365Sdes esac 7975255365Sdes ;; 7976255365Sdesesac 7977255365Sdes]) 7978255365Sdesto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7979255365SdesAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7980255365Sdes_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7981255365Sdes [0], [convert $build files to toolchain format])dnl 7982255365Sdes])# _LT_PATH_CONVERSION_FUNCTIONS 7983