1266072Sdes# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2266072Sdes# 3285206Sdes# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 4266072Sdes# Written by Gordon Matzigkeit, 1996 5266072Sdes# 6266072Sdes# This file is free software; the Free Software Foundation gives 7266072Sdes# unlimited permission to copy and/or distribute it, with or without 8266072Sdes# modifications, as long as this notice is preserved. 9266072Sdes 10266072Sdesm4_define([_LT_COPYING], [dnl 11285206Sdes# Copyright (C) 2014 Free Software Foundation, Inc. 12285206Sdes# This is free software; see the source for copying conditions. There is NO 13285206Sdes# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14285206Sdes 15285206Sdes# GNU Libtool is free software; you can redistribute it and/or modify 16285206Sdes# it under the terms of the GNU General Public License as published by 17285206Sdes# the Free Software Foundation; either version 2 of of the License, or 18285206Sdes# (at your option) any later version. 19266072Sdes# 20285206Sdes# As a special exception to the GNU General Public License, if you 21285206Sdes# distribute this file as part of a program or library that is built 22285206Sdes# using GNU Libtool, you may include this file under the same 23285206Sdes# distribution terms that you use for the rest of that program. 24266072Sdes# 25285206Sdes# GNU Libtool is distributed in the hope that it will be useful, but 26285206Sdes# WITHOUT ANY WARRANTY; without even the implied warranty of 27266072Sdes# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28266072Sdes# GNU General Public License for more details. 29266072Sdes# 30266072Sdes# You should have received a copy of the GNU General Public License 31285206Sdes# along with this program. If not, see <http://www.gnu.org/licenses/>. 32266072Sdes]) 33266072Sdes 34285206Sdes# serial 58 LT_INIT 35266072Sdes 36266072Sdes 37266072Sdes# LT_PREREQ(VERSION) 38266072Sdes# ------------------ 39266072Sdes# Complain and exit if this libtool version is less that VERSION. 40266072Sdesm4_defun([LT_PREREQ], 41266072Sdes[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 42266072Sdes [m4_default([$3], 43266072Sdes [m4_fatal([Libtool version $1 or higher is required], 44266072Sdes 63)])], 45266072Sdes [$2])]) 46266072Sdes 47266072Sdes 48266072Sdes# _LT_CHECK_BUILDDIR 49266072Sdes# ------------------ 50266072Sdes# Complain if the absolute build directory name contains unusual characters 51266072Sdesm4_defun([_LT_CHECK_BUILDDIR], 52266072Sdes[case `pwd` in 53266072Sdes *\ * | *\ *) 54266072Sdes AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 55266072Sdesesac 56266072Sdes]) 57266072Sdes 58266072Sdes 59266072Sdes# LT_INIT([OPTIONS]) 60266072Sdes# ------------------ 61266072SdesAC_DEFUN([LT_INIT], 62285206Sdes[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 63266072SdesAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 64266072SdesAC_BEFORE([$0], [LT_LANG])dnl 65266072SdesAC_BEFORE([$0], [LT_OUTPUT])dnl 66266072SdesAC_BEFORE([$0], [LTDL_INIT])dnl 67266072Sdesm4_require([_LT_CHECK_BUILDDIR])dnl 68266072Sdes 69266072Sdesdnl Autoconf doesn't catch unexpanded LT_ macros by default: 70266072Sdesm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 71266072Sdesm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 72266072Sdesdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 73266072Sdesdnl unless we require an AC_DEFUNed macro: 74266072SdesAC_REQUIRE([LTOPTIONS_VERSION])dnl 75266072SdesAC_REQUIRE([LTSUGAR_VERSION])dnl 76266072SdesAC_REQUIRE([LTVERSION_VERSION])dnl 77266072SdesAC_REQUIRE([LTOBSOLETE_VERSION])dnl 78266072Sdesm4_require([_LT_PROG_LTMAIN])dnl 79266072Sdes 80266072Sdes_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 81266072Sdes 82266072Sdesdnl Parse OPTIONS 83266072Sdes_LT_SET_OPTIONS([$0], [$1]) 84266072Sdes 85266072Sdes# This can be used to rebuild libtool when needed 86285206SdesLIBTOOL_DEPS=$ltmain 87266072Sdes 88266072Sdes# Always use our own libtool. 89266072SdesLIBTOOL='$(SHELL) $(top_builddir)/libtool' 90266072SdesAC_SUBST(LIBTOOL)dnl 91266072Sdes 92266072Sdes_LT_SETUP 93266072Sdes 94266072Sdes# Only expand once: 95266072Sdesm4_define([LT_INIT]) 96266072Sdes])# LT_INIT 97266072Sdes 98266072Sdes# Old names: 99266072SdesAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 100266072SdesAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 101266072Sdesdnl aclocal-1.4 backwards compatibility: 102266072Sdesdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 103266072Sdesdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 104266072Sdes 105266072Sdes 106285206Sdes# _LT_PREPARE_CC_BASENAME 107285206Sdes# ----------------------- 108285206Sdesm4_defun([_LT_PREPARE_CC_BASENAME], [ 109285206Sdes# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 110285206Sdesfunc_cc_basename () 111285206Sdes{ 112285206Sdes for cc_temp in @S|@*""; do 113285206Sdes case $cc_temp in 114285206Sdes compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 115285206Sdes distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 116285206Sdes \-*) ;; 117285206Sdes *) break;; 118285206Sdes esac 119285206Sdes done 120285206Sdes func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 121285206Sdes} 122285206Sdes])# _LT_PREPARE_CC_BASENAME 123285206Sdes 124285206Sdes 125266072Sdes# _LT_CC_BASENAME(CC) 126266072Sdes# ------------------- 127285206Sdes# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 128285206Sdes# but that macro is also expanded into generated libtool script, which 129285206Sdes# arranges for $SED and $ECHO to be set by different means. 130266072Sdesm4_defun([_LT_CC_BASENAME], 131285206Sdes[m4_require([_LT_PREPARE_CC_BASENAME])dnl 132285206SdesAC_REQUIRE([_LT_DECL_SED])dnl 133285206SdesAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 134285206Sdesfunc_cc_basename $1 135285206Sdescc_basename=$func_cc_basename_result 136266072Sdes]) 137266072Sdes 138266072Sdes 139266072Sdes# _LT_FILEUTILS_DEFAULTS 140266072Sdes# ---------------------- 141266072Sdes# It is okay to use these file commands and assume they have been set 142285206Sdes# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 143266072Sdesm4_defun([_LT_FILEUTILS_DEFAULTS], 144266072Sdes[: ${CP="cp -f"} 145266072Sdes: ${MV="mv -f"} 146266072Sdes: ${RM="rm -f"} 147266072Sdes])# _LT_FILEUTILS_DEFAULTS 148266072Sdes 149266072Sdes 150266072Sdes# _LT_SETUP 151266072Sdes# --------- 152266072Sdesm4_defun([_LT_SETUP], 153266072Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 154266072SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl 155266072SdesAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 156266072SdesAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 157266072Sdes 158266072Sdes_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 159266072Sdesdnl 160266072Sdes_LT_DECL([], [host_alias], [0], [The host system])dnl 161266072Sdes_LT_DECL([], [host], [0])dnl 162266072Sdes_LT_DECL([], [host_os], [0])dnl 163266072Sdesdnl 164266072Sdes_LT_DECL([], [build_alias], [0], [The build system])dnl 165266072Sdes_LT_DECL([], [build], [0])dnl 166266072Sdes_LT_DECL([], [build_os], [0])dnl 167266072Sdesdnl 168266072SdesAC_REQUIRE([AC_PROG_CC])dnl 169266072SdesAC_REQUIRE([LT_PATH_LD])dnl 170266072SdesAC_REQUIRE([LT_PATH_NM])dnl 171266072Sdesdnl 172266072SdesAC_REQUIRE([AC_PROG_LN_S])dnl 173266072Sdestest -z "$LN_S" && LN_S="ln -s" 174266072Sdes_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 175266072Sdesdnl 176266072SdesAC_REQUIRE([LT_CMD_MAX_LEN])dnl 177266072Sdes_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 178266072Sdes_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 179266072Sdesdnl 180266072Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 181266072Sdesm4_require([_LT_CHECK_SHELL_FEATURES])dnl 182266072Sdesm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 183266072Sdesm4_require([_LT_CMD_RELOAD])dnl 184266072Sdesm4_require([_LT_CHECK_MAGIC_METHOD])dnl 185266072Sdesm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 186266072Sdesm4_require([_LT_CMD_OLD_ARCHIVE])dnl 187266072Sdesm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 188266072Sdesm4_require([_LT_WITH_SYSROOT])dnl 189285206Sdesm4_require([_LT_CMD_TRUNCATE])dnl 190266072Sdes 191266072Sdes_LT_CONFIG_LIBTOOL_INIT([ 192285206Sdes# See if we are running on zsh, and set the options that allow our 193266072Sdes# commands through without removal of \ escapes INIT. 194285206Sdesif test -n "\${ZSH_VERSION+set}"; then 195266072Sdes setopt NO_GLOB_SUBST 196266072Sdesfi 197266072Sdes]) 198285206Sdesif test -n "${ZSH_VERSION+set}"; then 199266072Sdes setopt NO_GLOB_SUBST 200266072Sdesfi 201266072Sdes 202266072Sdes_LT_CHECK_OBJDIR 203266072Sdes 204266072Sdesm4_require([_LT_TAG_COMPILER])dnl 205266072Sdes 206266072Sdescase $host_os in 207266072Sdesaix3*) 208266072Sdes # AIX sometimes has problems with the GCC collect2 program. For some 209266072Sdes # reason, if we set the COLLECT_NAMES environment variable, the problems 210266072Sdes # vanish in a puff of smoke. 211285206Sdes if test set != "${COLLECT_NAMES+set}"; then 212266072Sdes COLLECT_NAMES= 213266072Sdes export COLLECT_NAMES 214266072Sdes fi 215266072Sdes ;; 216266072Sdesesac 217266072Sdes 218266072Sdes# Global variables: 219266072Sdesofile=libtool 220266072Sdescan_build_shared=yes 221266072Sdes 222285206Sdes# All known linkers require a '.a' archive for static linking (except MSVC, 223266072Sdes# which needs '.lib'). 224266072Sdeslibext=a 225266072Sdes 226285206Sdeswith_gnu_ld=$lt_cv_prog_gnu_ld 227266072Sdes 228285206Sdesold_CC=$CC 229285206Sdesold_CFLAGS=$CFLAGS 230266072Sdes 231266072Sdes# Set sane defaults for various variables 232266072Sdestest -z "$CC" && CC=cc 233266072Sdestest -z "$LTCC" && LTCC=$CC 234266072Sdestest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 235266072Sdestest -z "$LD" && LD=ld 236266072Sdestest -z "$ac_objext" && ac_objext=o 237266072Sdes 238266072Sdes_LT_CC_BASENAME([$compiler]) 239266072Sdes 240266072Sdes# Only perform the check for file, if the check method requires it 241266072Sdestest -z "$MAGIC_CMD" && MAGIC_CMD=file 242266072Sdescase $deplibs_check_method in 243266072Sdesfile_magic*) 244266072Sdes if test "$file_magic_cmd" = '$MAGIC_CMD'; then 245266072Sdes _LT_PATH_MAGIC 246266072Sdes fi 247266072Sdes ;; 248266072Sdesesac 249266072Sdes 250266072Sdes# Use C for the default configuration in the libtool script 251266072SdesLT_SUPPORTED_TAG([CC]) 252266072Sdes_LT_LANG_C_CONFIG 253266072Sdes_LT_LANG_DEFAULT_CONFIG 254266072Sdes_LT_CONFIG_COMMANDS 255266072Sdes])# _LT_SETUP 256266072Sdes 257266072Sdes 258266072Sdes# _LT_PREPARE_SED_QUOTE_VARS 259266072Sdes# -------------------------- 260266072Sdes# Define a few sed substitution that help us do robust quoting. 261266072Sdesm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 262266072Sdes[# Backslashify metacharacters that are still active within 263266072Sdes# double-quoted strings. 264266072Sdessed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 265266072Sdes 266266072Sdes# Same as above, but do not quote variable references. 267266072Sdesdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 268266072Sdes 269266072Sdes# Sed substitution to delay expansion of an escaped shell variable in a 270266072Sdes# double_quote_subst'ed string. 271266072Sdesdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 272266072Sdes 273266072Sdes# Sed substitution to delay expansion of an escaped single quote. 274266072Sdesdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 275266072Sdes 276266072Sdes# Sed substitution to avoid accidental globbing in evaled expressions 277266072Sdesno_glob_subst='s/\*/\\\*/g' 278266072Sdes]) 279266072Sdes 280266072Sdes# _LT_PROG_LTMAIN 281266072Sdes# --------------- 282285206Sdes# Note that this code is called both from 'configure', and 'config.status' 283266072Sdes# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 284285206Sdes# 'config.status' has no value for ac_aux_dir unless we are using Automake, 285266072Sdes# so we pass a copy along to make sure it has a sensible value anyway. 286266072Sdesm4_defun([_LT_PROG_LTMAIN], 287266072Sdes[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 288266072Sdes_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 289285206Sdesltmain=$ac_aux_dir/ltmain.sh 290266072Sdes])# _LT_PROG_LTMAIN 291266072Sdes 292266072Sdes 293266072Sdes## ------------------------------------- ## 294266072Sdes## Accumulate code for creating libtool. ## 295266072Sdes## ------------------------------------- ## 296266072Sdes 297266072Sdes# So that we can recreate a full libtool script including additional 298266072Sdes# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 299285206Sdes# in macros and then make a single call at the end using the 'libtool' 300266072Sdes# label. 301266072Sdes 302266072Sdes 303266072Sdes# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 304266072Sdes# ---------------------------------------- 305266072Sdes# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 306266072Sdesm4_define([_LT_CONFIG_LIBTOOL_INIT], 307266072Sdes[m4_ifval([$1], 308266072Sdes [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 309266072Sdes [$1 310266072Sdes])])]) 311266072Sdes 312266072Sdes# Initialize. 313266072Sdesm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 314266072Sdes 315266072Sdes 316266072Sdes# _LT_CONFIG_LIBTOOL([COMMANDS]) 317266072Sdes# ------------------------------ 318266072Sdes# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 319266072Sdesm4_define([_LT_CONFIG_LIBTOOL], 320266072Sdes[m4_ifval([$1], 321266072Sdes [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 322266072Sdes [$1 323266072Sdes])])]) 324266072Sdes 325266072Sdes# Initialize. 326266072Sdesm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 327266072Sdes 328266072Sdes 329266072Sdes# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 330266072Sdes# ----------------------------------------------------- 331266072Sdesm4_defun([_LT_CONFIG_SAVE_COMMANDS], 332266072Sdes[_LT_CONFIG_LIBTOOL([$1]) 333266072Sdes_LT_CONFIG_LIBTOOL_INIT([$2]) 334266072Sdes]) 335266072Sdes 336266072Sdes 337266072Sdes# _LT_FORMAT_COMMENT([COMMENT]) 338266072Sdes# ----------------------------- 339266072Sdes# Add leading comment marks to the start of each line, and a trailing 340266072Sdes# full-stop to the whole comment if one is not present already. 341266072Sdesm4_define([_LT_FORMAT_COMMENT], 342266072Sdes[m4_ifval([$1], [ 343266072Sdesm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 344266072Sdes [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 345266072Sdes)]) 346266072Sdes 347266072Sdes 348266072Sdes 349266072Sdes## ------------------------ ## 350266072Sdes## FIXME: Eliminate VARNAME ## 351266072Sdes## ------------------------ ## 352266072Sdes 353266072Sdes 354266072Sdes# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 355266072Sdes# ------------------------------------------------------------------- 356266072Sdes# CONFIGNAME is the name given to the value in the libtool script. 357266072Sdes# VARNAME is the (base) name used in the configure script. 358266072Sdes# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 359266072Sdes# VARNAME. Any other value will be used directly. 360266072Sdesm4_define([_LT_DECL], 361266072Sdes[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 362266072Sdes [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 363266072Sdes [m4_ifval([$1], [$1], [$2])]) 364266072Sdes lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 365266072Sdes m4_ifval([$4], 366266072Sdes [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 367266072Sdes lt_dict_add_subkey([lt_decl_dict], [$2], 368266072Sdes [tagged?], [m4_ifval([$5], [yes], [no])])]) 369266072Sdes]) 370266072Sdes 371266072Sdes 372266072Sdes# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 373266072Sdes# -------------------------------------------------------- 374266072Sdesm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 375266072Sdes 376266072Sdes 377266072Sdes# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 378266072Sdes# ------------------------------------------------ 379266072Sdesm4_define([lt_decl_tag_varnames], 380266072Sdes[_lt_decl_filter([tagged?], [yes], $@)]) 381266072Sdes 382266072Sdes 383266072Sdes# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 384266072Sdes# --------------------------------------------------------- 385266072Sdesm4_define([_lt_decl_filter], 386266072Sdes[m4_case([$#], 387266072Sdes [0], [m4_fatal([$0: too few arguments: $#])], 388266072Sdes [1], [m4_fatal([$0: too few arguments: $#: $1])], 389266072Sdes [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 390266072Sdes [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 391266072Sdes [lt_dict_filter([lt_decl_dict], $@)])[]dnl 392266072Sdes]) 393266072Sdes 394266072Sdes 395266072Sdes# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 396266072Sdes# -------------------------------------------------- 397266072Sdesm4_define([lt_decl_quote_varnames], 398266072Sdes[_lt_decl_filter([value], [1], $@)]) 399266072Sdes 400266072Sdes 401266072Sdes# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 402266072Sdes# --------------------------------------------------- 403266072Sdesm4_define([lt_decl_dquote_varnames], 404266072Sdes[_lt_decl_filter([value], [2], $@)]) 405266072Sdes 406266072Sdes 407266072Sdes# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 408266072Sdes# --------------------------------------------------- 409266072Sdesm4_define([lt_decl_varnames_tagged], 410266072Sdes[m4_assert([$# <= 2])dnl 411266072Sdes_$0(m4_quote(m4_default([$1], [[, ]])), 412266072Sdes m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 413266072Sdes m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 414266072Sdesm4_define([_lt_decl_varnames_tagged], 415266072Sdes[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 416266072Sdes 417266072Sdes 418266072Sdes# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 419266072Sdes# ------------------------------------------------ 420266072Sdesm4_define([lt_decl_all_varnames], 421266072Sdes[_$0(m4_quote(m4_default([$1], [[, ]])), 422266072Sdes m4_if([$2], [], 423266072Sdes m4_quote(lt_decl_varnames), 424266072Sdes m4_quote(m4_shift($@))))[]dnl 425266072Sdes]) 426266072Sdesm4_define([_lt_decl_all_varnames], 427266072Sdes[lt_join($@, lt_decl_varnames_tagged([$1], 428266072Sdes lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 429266072Sdes]) 430266072Sdes 431266072Sdes 432266072Sdes# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 433266072Sdes# ------------------------------------ 434285206Sdes# Quote a variable value, and forward it to 'config.status' so that its 435285206Sdes# declaration there will have the same value as in 'configure'. VARNAME 436266072Sdes# must have a single quote delimited value for this to work. 437266072Sdesm4_define([_LT_CONFIG_STATUS_DECLARE], 438266072Sdes[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 439266072Sdes 440266072Sdes 441266072Sdes# _LT_CONFIG_STATUS_DECLARATIONS 442266072Sdes# ------------------------------ 443266072Sdes# We delimit libtool config variables with single quotes, so when 444266072Sdes# we write them to config.status, we have to be sure to quote all 445266072Sdes# embedded single quotes properly. In configure, this macro expands 446266072Sdes# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 447266072Sdes# 448266072Sdes# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 449266072Sdesm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 450266072Sdes[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 451266072Sdes [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 452266072Sdes 453266072Sdes 454266072Sdes# _LT_LIBTOOL_TAGS 455266072Sdes# ---------------- 456266072Sdes# Output comment and list of tags supported by the script 457266072Sdesm4_defun([_LT_LIBTOOL_TAGS], 458266072Sdes[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 459285206Sdesavailable_tags='_LT_TAGS'dnl 460266072Sdes]) 461266072Sdes 462266072Sdes 463266072Sdes# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 464266072Sdes# ----------------------------------- 465266072Sdes# Extract the dictionary values for VARNAME (optionally with TAG) and 466266072Sdes# expand to a commented shell variable setting: 467266072Sdes# 468266072Sdes# # Some comment about what VAR is for. 469266072Sdes# visible_name=$lt_internal_name 470266072Sdesm4_define([_LT_LIBTOOL_DECLARE], 471266072Sdes[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 472266072Sdes [description])))[]dnl 473266072Sdesm4_pushdef([_libtool_name], 474266072Sdes m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 475266072Sdesm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 476266072Sdes [0], [_libtool_name=[$]$1], 477266072Sdes [1], [_libtool_name=$lt_[]$1], 478266072Sdes [2], [_libtool_name=$lt_[]$1], 479266072Sdes [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 480266072Sdesm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 481266072Sdes]) 482266072Sdes 483266072Sdes 484266072Sdes# _LT_LIBTOOL_CONFIG_VARS 485266072Sdes# ----------------------- 486266072Sdes# Produce commented declarations of non-tagged libtool config variables 487285206Sdes# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 488266072Sdes# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 489266072Sdes# section) are produced by _LT_LIBTOOL_TAG_VARS. 490266072Sdesm4_defun([_LT_LIBTOOL_CONFIG_VARS], 491266072Sdes[m4_foreach([_lt_var], 492266072Sdes m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 493266072Sdes [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 494266072Sdes 495266072Sdes 496266072Sdes# _LT_LIBTOOL_TAG_VARS(TAG) 497266072Sdes# ------------------------- 498266072Sdesm4_define([_LT_LIBTOOL_TAG_VARS], 499266072Sdes[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 500266072Sdes [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 501266072Sdes 502266072Sdes 503266072Sdes# _LT_TAGVAR(VARNAME, [TAGNAME]) 504266072Sdes# ------------------------------ 505266072Sdesm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 506266072Sdes 507266072Sdes 508266072Sdes# _LT_CONFIG_COMMANDS 509266072Sdes# ------------------- 510266072Sdes# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 511266072Sdes# variables for single and double quote escaping we saved from calls 512266072Sdes# to _LT_DECL, we can put quote escaped variables declarations 513285206Sdes# into 'config.status', and then the shell code to quote escape them in 514285206Sdes# for loops in 'config.status'. Finally, any additional code accumulated 515266072Sdes# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 516266072Sdesm4_defun([_LT_CONFIG_COMMANDS], 517266072Sdes[AC_PROVIDE_IFELSE([LT_OUTPUT], 518266072Sdes dnl If the libtool generation code has been placed in $CONFIG_LT, 519266072Sdes dnl instead of duplicating it all over again into config.status, 520266072Sdes dnl then we will have config.status run $CONFIG_LT later, so it 521266072Sdes dnl needs to know what name is stored there: 522266072Sdes [AC_CONFIG_COMMANDS([libtool], 523266072Sdes [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 524266072Sdes dnl If the libtool generation code is destined for config.status, 525266072Sdes dnl expand the accumulated commands and init code now: 526266072Sdes [AC_CONFIG_COMMANDS([libtool], 527266072Sdes [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 528266072Sdes])#_LT_CONFIG_COMMANDS 529266072Sdes 530266072Sdes 531266072Sdes# Initialize. 532266072Sdesm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 533266072Sdes[ 534266072Sdes 535266072Sdes# The HP-UX ksh and POSIX shell print the target directory to stdout 536266072Sdes# if CDPATH is set. 537266072Sdes(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 538266072Sdes 539266072Sdessed_quote_subst='$sed_quote_subst' 540266072Sdesdouble_quote_subst='$double_quote_subst' 541266072Sdesdelay_variable_subst='$delay_variable_subst' 542266072Sdes_LT_CONFIG_STATUS_DECLARATIONS 543266072SdesLTCC='$LTCC' 544266072SdesLTCFLAGS='$LTCFLAGS' 545266072Sdescompiler='$compiler_DEFAULT' 546266072Sdes 547266072Sdes# A function that is used when there is no print builtin or printf. 548266072Sdesfunc_fallback_echo () 549266072Sdes{ 550266072Sdes eval 'cat <<_LTECHO_EOF 551266072Sdes\$[]1 552266072Sdes_LTECHO_EOF' 553266072Sdes} 554266072Sdes 555266072Sdes# Quote evaled strings. 556266072Sdesfor var in lt_decl_all_varnames([[ \ 557266072Sdes]], lt_decl_quote_varnames); do 558266072Sdes case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 559266072Sdes *[[\\\\\\\`\\"\\\$]]*) 560285206Sdes eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 561266072Sdes ;; 562266072Sdes *) 563266072Sdes eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 564266072Sdes ;; 565266072Sdes esac 566266072Sdesdone 567266072Sdes 568266072Sdes# Double-quote double-evaled strings. 569266072Sdesfor var in lt_decl_all_varnames([[ \ 570266072Sdes]], lt_decl_dquote_varnames); do 571266072Sdes case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 572266072Sdes *[[\\\\\\\`\\"\\\$]]*) 573285206Sdes eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 574266072Sdes ;; 575266072Sdes *) 576266072Sdes eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 577266072Sdes ;; 578266072Sdes esac 579266072Sdesdone 580266072Sdes 581266072Sdes_LT_OUTPUT_LIBTOOL_INIT 582266072Sdes]) 583266072Sdes 584266072Sdes# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 585266072Sdes# ------------------------------------ 586266072Sdes# Generate a child script FILE with all initialization necessary to 587266072Sdes# reuse the environment learned by the parent script, and make the 588266072Sdes# file executable. If COMMENT is supplied, it is inserted after the 589285206Sdes# '#!' sequence but before initialization text begins. After this 590266072Sdes# macro, additional text can be appended to FILE to form the body of 591266072Sdes# the child script. The macro ends with non-zero status if the 592266072Sdes# file could not be fully written (such as if the disk is full). 593266072Sdesm4_ifdef([AS_INIT_GENERATED], 594266072Sdes[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 595266072Sdes[m4_defun([_LT_GENERATED_FILE_INIT], 596266072Sdes[m4_require([AS_PREPARE])]dnl 597266072Sdes[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 598266072Sdes[lt_write_fail=0 599266072Sdescat >$1 <<_ASEOF || lt_write_fail=1 600266072Sdes#! $SHELL 601266072Sdes# Generated by $as_me. 602266072Sdes$2 603266072SdesSHELL=\${CONFIG_SHELL-$SHELL} 604266072Sdesexport SHELL 605266072Sdes_ASEOF 606266072Sdescat >>$1 <<\_ASEOF || lt_write_fail=1 607266072SdesAS_SHELL_SANITIZE 608266072Sdes_AS_PREPARE 609266072Sdesexec AS_MESSAGE_FD>&1 610266072Sdes_ASEOF 611285206Sdestest 0 = "$lt_write_fail" && chmod +x $1[]dnl 612266072Sdesm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 613266072Sdes 614266072Sdes# LT_OUTPUT 615266072Sdes# --------- 616266072Sdes# This macro allows early generation of the libtool script (before 617266072Sdes# AC_OUTPUT is called), incase it is used in configure for compilation 618266072Sdes# tests. 619266072SdesAC_DEFUN([LT_OUTPUT], 620266072Sdes[: ${CONFIG_LT=./config.lt} 621266072SdesAC_MSG_NOTICE([creating $CONFIG_LT]) 622266072Sdes_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 623266072Sdes[# Run this file to recreate a libtool stub with the current configuration.]) 624266072Sdes 625266072Sdescat >>"$CONFIG_LT" <<\_LTEOF 626266072Sdeslt_cl_silent=false 627266072Sdesexec AS_MESSAGE_LOG_FD>>config.log 628266072Sdes{ 629266072Sdes echo 630266072Sdes AS_BOX([Running $as_me.]) 631266072Sdes} >&AS_MESSAGE_LOG_FD 632266072Sdes 633266072Sdeslt_cl_help="\ 634285206Sdes'$as_me' creates a local libtool stub from the current configuration, 635266072Sdesfor use in further configure time tests before the real libtool is 636266072Sdesgenerated. 637266072Sdes 638266072SdesUsage: $[0] [[OPTIONS]] 639266072Sdes 640266072Sdes -h, --help print this help, then exit 641266072Sdes -V, --version print version number, then exit 642266072Sdes -q, --quiet do not print progress messages 643266072Sdes -d, --debug don't remove temporary files 644266072Sdes 645266072SdesReport bugs to <bug-libtool@gnu.org>." 646266072Sdes 647266072Sdeslt_cl_version="\ 648266072Sdesm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 649266072Sdesm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 650266072Sdesconfigured by $[0], generated by m4_PACKAGE_STRING. 651266072Sdes 652266072SdesCopyright (C) 2011 Free Software Foundation, Inc. 653266072SdesThis config.lt script is free software; the Free Software Foundation 654266072Sdesgives unlimited permision to copy, distribute and modify it." 655266072Sdes 656285206Sdeswhile test 0 != $[#] 657266072Sdesdo 658266072Sdes case $[1] in 659266072Sdes --version | --v* | -V ) 660266072Sdes echo "$lt_cl_version"; exit 0 ;; 661266072Sdes --help | --h* | -h ) 662266072Sdes echo "$lt_cl_help"; exit 0 ;; 663266072Sdes --debug | --d* | -d ) 664266072Sdes debug=: ;; 665266072Sdes --quiet | --q* | --silent | --s* | -q ) 666266072Sdes lt_cl_silent=: ;; 667266072Sdes 668266072Sdes -*) AC_MSG_ERROR([unrecognized option: $[1] 669285206SdesTry '$[0] --help' for more information.]) ;; 670266072Sdes 671266072Sdes *) AC_MSG_ERROR([unrecognized argument: $[1] 672285206SdesTry '$[0] --help' for more information.]) ;; 673266072Sdes esac 674266072Sdes shift 675266072Sdesdone 676266072Sdes 677266072Sdesif $lt_cl_silent; then 678266072Sdes exec AS_MESSAGE_FD>/dev/null 679266072Sdesfi 680266072Sdes_LTEOF 681266072Sdes 682266072Sdescat >>"$CONFIG_LT" <<_LTEOF 683266072Sdes_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 684266072Sdes_LTEOF 685266072Sdes 686266072Sdescat >>"$CONFIG_LT" <<\_LTEOF 687266072SdesAC_MSG_NOTICE([creating $ofile]) 688266072Sdes_LT_OUTPUT_LIBTOOL_COMMANDS 689266072SdesAS_EXIT(0) 690266072Sdes_LTEOF 691266072Sdeschmod +x "$CONFIG_LT" 692266072Sdes 693266072Sdes# configure is writing to config.log, but config.lt does its own redirection, 694266072Sdes# appending to config.log, which fails on DOS, as config.log is still kept 695266072Sdes# open by configure. Here we exec the FD to /dev/null, effectively closing 696266072Sdes# config.log, so it can be properly (re)opened and appended to by config.lt. 697266072Sdeslt_cl_success=: 698285206Sdestest yes = "$silent" && 699266072Sdes lt_config_lt_args="$lt_config_lt_args --quiet" 700266072Sdesexec AS_MESSAGE_LOG_FD>/dev/null 701266072Sdes$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 702266072Sdesexec AS_MESSAGE_LOG_FD>>config.log 703266072Sdes$lt_cl_success || AS_EXIT(1) 704266072Sdes])# LT_OUTPUT 705266072Sdes 706266072Sdes 707266072Sdes# _LT_CONFIG(TAG) 708266072Sdes# --------------- 709266072Sdes# If TAG is the built-in tag, create an initial libtool script with a 710266072Sdes# default configuration from the untagged config vars. Otherwise add code 711266072Sdes# to config.status for appending the configuration named by TAG from the 712266072Sdes# matching tagged config vars. 713266072Sdesm4_defun([_LT_CONFIG], 714266072Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 715266072Sdes_LT_CONFIG_SAVE_COMMANDS([ 716266072Sdes m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 717266072Sdes m4_if(_LT_TAG, [C], [ 718285206Sdes # See if we are running on zsh, and set the options that allow our 719266072Sdes # commands through without removal of \ escapes. 720285206Sdes if test -n "${ZSH_VERSION+set}"; then 721266072Sdes setopt NO_GLOB_SUBST 722266072Sdes fi 723266072Sdes 724285206Sdes cfgfile=${ofile}T 725266072Sdes trap "$RM \"$cfgfile\"; exit 1" 1 2 15 726266072Sdes $RM "$cfgfile" 727266072Sdes 728266072Sdes cat <<_LT_EOF >> "$cfgfile" 729266072Sdes#! $SHELL 730285206Sdes# Generated automatically by $as_me ($PACKAGE) $VERSION 731266072Sdes# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 732266072Sdes# NOTE: Changes made to this file will be lost: look at ltmain.sh. 733285206Sdes 734285206Sdes# Provide generalized library-building support services. 735285206Sdes# Written by Gordon Matzigkeit, 1996 736285206Sdes 737266072Sdes_LT_COPYING 738266072Sdes_LT_LIBTOOL_TAGS 739266072Sdes 740285206Sdes# Configured defaults for sys_lib_dlsearch_path munging. 741285206Sdes: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 742285206Sdes 743266072Sdes# ### BEGIN LIBTOOL CONFIG 744266072Sdes_LT_LIBTOOL_CONFIG_VARS 745266072Sdes_LT_LIBTOOL_TAG_VARS 746266072Sdes# ### END LIBTOOL CONFIG 747266072Sdes 748266072Sdes_LT_EOF 749266072Sdes 750285206Sdes cat <<'_LT_EOF' >> "$cfgfile" 751285206Sdes 752285206Sdes# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 753285206Sdes 754285206Sdes_LT_PREPARE_MUNGE_PATH_LIST 755285206Sdes_LT_PREPARE_CC_BASENAME 756285206Sdes 757285206Sdes# ### END FUNCTIONS SHARED WITH CONFIGURE 758285206Sdes 759285206Sdes_LT_EOF 760285206Sdes 761266072Sdes case $host_os in 762266072Sdes aix3*) 763266072Sdes cat <<\_LT_EOF >> "$cfgfile" 764266072Sdes# AIX sometimes has problems with the GCC collect2 program. For some 765266072Sdes# reason, if we set the COLLECT_NAMES environment variable, the problems 766266072Sdes# vanish in a puff of smoke. 767285206Sdesif test set != "${COLLECT_NAMES+set}"; then 768266072Sdes COLLECT_NAMES= 769266072Sdes export COLLECT_NAMES 770266072Sdesfi 771266072Sdes_LT_EOF 772266072Sdes ;; 773266072Sdes esac 774266072Sdes 775266072Sdes _LT_PROG_LTMAIN 776266072Sdes 777266072Sdes # We use sed instead of cat because bash on DJGPP gets confused if 778266072Sdes # if finds mixed CR/LF and LF-only lines. Since sed operates in 779266072Sdes # text mode, it properly converts lines to CR/LF. This bash problem 780266072Sdes # is reportedly fixed, but why not run on old versions too? 781266072Sdes sed '$q' "$ltmain" >> "$cfgfile" \ 782266072Sdes || (rm -f "$cfgfile"; exit 1) 783266072Sdes 784266072Sdes mv -f "$cfgfile" "$ofile" || 785266072Sdes (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 786266072Sdes chmod +x "$ofile" 787266072Sdes], 788266072Sdes[cat <<_LT_EOF >> "$ofile" 789266072Sdes 790266072Sdesdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 791266072Sdesdnl in a comment (ie after a #). 792266072Sdes# ### BEGIN LIBTOOL TAG CONFIG: $1 793266072Sdes_LT_LIBTOOL_TAG_VARS(_LT_TAG) 794266072Sdes# ### END LIBTOOL TAG CONFIG: $1 795266072Sdes_LT_EOF 796266072Sdes])dnl /m4_if 797266072Sdes], 798266072Sdes[m4_if([$1], [], [ 799266072Sdes PACKAGE='$PACKAGE' 800266072Sdes VERSION='$VERSION' 801266072Sdes RM='$RM' 802266072Sdes ofile='$ofile'], []) 803266072Sdes])dnl /_LT_CONFIG_SAVE_COMMANDS 804266072Sdes])# _LT_CONFIG 805266072Sdes 806266072Sdes 807266072Sdes# LT_SUPPORTED_TAG(TAG) 808266072Sdes# --------------------- 809266072Sdes# Trace this macro to discover what tags are supported by the libtool 810266072Sdes# --tag option, using: 811266072Sdes# autoconf --trace 'LT_SUPPORTED_TAG:$1' 812266072SdesAC_DEFUN([LT_SUPPORTED_TAG], []) 813266072Sdes 814266072Sdes 815266072Sdes# C support is built-in for now 816266072Sdesm4_define([_LT_LANG_C_enabled], []) 817266072Sdesm4_define([_LT_TAGS], []) 818266072Sdes 819266072Sdes 820266072Sdes# LT_LANG(LANG) 821266072Sdes# ------------- 822266072Sdes# Enable libtool support for the given language if not already enabled. 823266072SdesAC_DEFUN([LT_LANG], 824266072Sdes[AC_BEFORE([$0], [LT_OUTPUT])dnl 825266072Sdesm4_case([$1], 826266072Sdes [C], [_LT_LANG(C)], 827266072Sdes [C++], [_LT_LANG(CXX)], 828266072Sdes [Go], [_LT_LANG(GO)], 829266072Sdes [Java], [_LT_LANG(GCJ)], 830266072Sdes [Fortran 77], [_LT_LANG(F77)], 831266072Sdes [Fortran], [_LT_LANG(FC)], 832266072Sdes [Windows Resource], [_LT_LANG(RC)], 833266072Sdes [m4_ifdef([_LT_LANG_]$1[_CONFIG], 834266072Sdes [_LT_LANG($1)], 835266072Sdes [m4_fatal([$0: unsupported language: "$1"])])])dnl 836266072Sdes])# LT_LANG 837266072Sdes 838266072Sdes 839266072Sdes# _LT_LANG(LANGNAME) 840266072Sdes# ------------------ 841266072Sdesm4_defun([_LT_LANG], 842266072Sdes[m4_ifdef([_LT_LANG_]$1[_enabled], [], 843266072Sdes [LT_SUPPORTED_TAG([$1])dnl 844266072Sdes m4_append([_LT_TAGS], [$1 ])dnl 845266072Sdes m4_define([_LT_LANG_]$1[_enabled], [])dnl 846266072Sdes _LT_LANG_$1_CONFIG($1)])dnl 847266072Sdes])# _LT_LANG 848266072Sdes 849266072Sdes 850266072Sdesm4_ifndef([AC_PROG_GO], [ 851266072Sdes############################################################ 852266072Sdes# NOTE: This macro has been submitted for inclusion into # 853266072Sdes# GNU Autoconf as AC_PROG_GO. When it is available in # 854266072Sdes# a released version of Autoconf we should remove this # 855266072Sdes# macro and use it instead. # 856266072Sdes############################################################ 857266072Sdesm4_defun([AC_PROG_GO], 858266072Sdes[AC_LANG_PUSH(Go)dnl 859266072SdesAC_ARG_VAR([GOC], [Go compiler command])dnl 860266072SdesAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 861266072Sdes_AC_ARG_VAR_LDFLAGS()dnl 862266072SdesAC_CHECK_TOOL(GOC, gccgo) 863266072Sdesif test -z "$GOC"; then 864266072Sdes if test -n "$ac_tool_prefix"; then 865266072Sdes AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 866266072Sdes fi 867266072Sdesfi 868266072Sdesif test -z "$GOC"; then 869266072Sdes AC_CHECK_PROG(GOC, gccgo, gccgo, false) 870266072Sdesfi 871266072Sdes])#m4_defun 872266072Sdes])#m4_ifndef 873266072Sdes 874266072Sdes 875266072Sdes# _LT_LANG_DEFAULT_CONFIG 876266072Sdes# ----------------------- 877266072Sdesm4_defun([_LT_LANG_DEFAULT_CONFIG], 878266072Sdes[AC_PROVIDE_IFELSE([AC_PROG_CXX], 879266072Sdes [LT_LANG(CXX)], 880266072Sdes [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 881266072Sdes 882266072SdesAC_PROVIDE_IFELSE([AC_PROG_F77], 883266072Sdes [LT_LANG(F77)], 884266072Sdes [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 885266072Sdes 886266072SdesAC_PROVIDE_IFELSE([AC_PROG_FC], 887266072Sdes [LT_LANG(FC)], 888266072Sdes [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 889266072Sdes 890266072Sdesdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 891266072Sdesdnl pulling things in needlessly. 892266072SdesAC_PROVIDE_IFELSE([AC_PROG_GCJ], 893266072Sdes [LT_LANG(GCJ)], 894266072Sdes [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 895266072Sdes [LT_LANG(GCJ)], 896266072Sdes [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 897266072Sdes [LT_LANG(GCJ)], 898266072Sdes [m4_ifdef([AC_PROG_GCJ], 899266072Sdes [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 900266072Sdes m4_ifdef([A][M_PROG_GCJ], 901266072Sdes [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 902266072Sdes m4_ifdef([LT_PROG_GCJ], 903266072Sdes [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 904266072Sdes 905266072SdesAC_PROVIDE_IFELSE([AC_PROG_GO], 906266072Sdes [LT_LANG(GO)], 907266072Sdes [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 908266072Sdes 909266072SdesAC_PROVIDE_IFELSE([LT_PROG_RC], 910266072Sdes [LT_LANG(RC)], 911266072Sdes [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 912266072Sdes])# _LT_LANG_DEFAULT_CONFIG 913266072Sdes 914266072Sdes# Obsolete macros: 915266072SdesAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 916266072SdesAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 917266072SdesAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 918266072SdesAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 919266072SdesAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 920266072Sdesdnl aclocal-1.4 backwards compatibility: 921266072Sdesdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 922266072Sdesdnl AC_DEFUN([AC_LIBTOOL_F77], []) 923266072Sdesdnl AC_DEFUN([AC_LIBTOOL_FC], []) 924266072Sdesdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 925266072Sdesdnl AC_DEFUN([AC_LIBTOOL_RC], []) 926266072Sdes 927266072Sdes 928266072Sdes# _LT_TAG_COMPILER 929266072Sdes# ---------------- 930266072Sdesm4_defun([_LT_TAG_COMPILER], 931266072Sdes[AC_REQUIRE([AC_PROG_CC])dnl 932266072Sdes 933266072Sdes_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 934266072Sdes_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 935266072Sdes_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 936266072Sdes_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 937266072Sdes 938266072Sdes# If no C compiler was specified, use CC. 939266072SdesLTCC=${LTCC-"$CC"} 940266072Sdes 941266072Sdes# If no C compiler flags were specified, use CFLAGS. 942266072SdesLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 943266072Sdes 944266072Sdes# Allow CC to be a program name with arguments. 945266072Sdescompiler=$CC 946266072Sdes])# _LT_TAG_COMPILER 947266072Sdes 948266072Sdes 949266072Sdes# _LT_COMPILER_BOILERPLATE 950266072Sdes# ------------------------ 951266072Sdes# Check for compiler boilerplate output or warnings with 952266072Sdes# the simple compiler test code. 953266072Sdesm4_defun([_LT_COMPILER_BOILERPLATE], 954266072Sdes[m4_require([_LT_DECL_SED])dnl 955266072Sdesac_outfile=conftest.$ac_objext 956266072Sdesecho "$lt_simple_compile_test_code" >conftest.$ac_ext 957266072Sdeseval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 958266072Sdes_lt_compiler_boilerplate=`cat conftest.err` 959266072Sdes$RM conftest* 960266072Sdes])# _LT_COMPILER_BOILERPLATE 961266072Sdes 962266072Sdes 963266072Sdes# _LT_LINKER_BOILERPLATE 964266072Sdes# ---------------------- 965266072Sdes# Check for linker boilerplate output or warnings with 966266072Sdes# the simple link test code. 967266072Sdesm4_defun([_LT_LINKER_BOILERPLATE], 968266072Sdes[m4_require([_LT_DECL_SED])dnl 969266072Sdesac_outfile=conftest.$ac_objext 970266072Sdesecho "$lt_simple_link_test_code" >conftest.$ac_ext 971266072Sdeseval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 972266072Sdes_lt_linker_boilerplate=`cat conftest.err` 973266072Sdes$RM -r conftest* 974266072Sdes])# _LT_LINKER_BOILERPLATE 975266072Sdes 976266072Sdes# _LT_REQUIRED_DARWIN_CHECKS 977266072Sdes# ------------------------- 978266072Sdesm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 979266072Sdes case $host_os in 980266072Sdes rhapsody* | darwin*) 981266072Sdes AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 982266072Sdes AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 983266072Sdes AC_CHECK_TOOL([LIPO], [lipo], [:]) 984266072Sdes AC_CHECK_TOOL([OTOOL], [otool], [:]) 985266072Sdes AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 986266072Sdes _LT_DECL([], [DSYMUTIL], [1], 987266072Sdes [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 988266072Sdes _LT_DECL([], [NMEDIT], [1], 989266072Sdes [Tool to change global to local symbols on Mac OS X]) 990266072Sdes _LT_DECL([], [LIPO], [1], 991266072Sdes [Tool to manipulate fat objects and archives on Mac OS X]) 992266072Sdes _LT_DECL([], [OTOOL], [1], 993266072Sdes [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 994266072Sdes _LT_DECL([], [OTOOL64], [1], 995266072Sdes [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 996266072Sdes 997266072Sdes AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 998266072Sdes [lt_cv_apple_cc_single_mod=no 999285206Sdes if test -z "$LT_MULTI_MODULE"; then 1000266072Sdes # By default we will add the -single_module flag. You can override 1001266072Sdes # by either setting the environment variable LT_MULTI_MODULE 1002266072Sdes # non-empty at configure time, or by adding -multi_module to the 1003266072Sdes # link flags. 1004266072Sdes rm -rf libconftest.dylib* 1005266072Sdes echo "int foo(void){return 1;}" > conftest.c 1006266072Sdes echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1007266072Sdes-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1008266072Sdes $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1009266072Sdes -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1010266072Sdes _lt_result=$? 1011266072Sdes # If there is a non-empty error log, and "single_module" 1012266072Sdes # appears in it, assume the flag caused a linker warning 1013266072Sdes if test -s conftest.err && $GREP single_module conftest.err; then 1014266072Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1015266072Sdes # Otherwise, if the output was created with a 0 exit code from 1016266072Sdes # the compiler, it worked. 1017285206Sdes elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1018266072Sdes lt_cv_apple_cc_single_mod=yes 1019266072Sdes else 1020266072Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1021266072Sdes fi 1022266072Sdes rm -rf libconftest.dylib* 1023266072Sdes rm -f conftest.* 1024266072Sdes fi]) 1025266072Sdes 1026266072Sdes AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1027266072Sdes [lt_cv_ld_exported_symbols_list], 1028266072Sdes [lt_cv_ld_exported_symbols_list=no 1029266072Sdes save_LDFLAGS=$LDFLAGS 1030266072Sdes echo "_main" > conftest.sym 1031266072Sdes LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1032266072Sdes AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1033266072Sdes [lt_cv_ld_exported_symbols_list=yes], 1034266072Sdes [lt_cv_ld_exported_symbols_list=no]) 1035285206Sdes LDFLAGS=$save_LDFLAGS 1036266072Sdes ]) 1037266072Sdes 1038266072Sdes AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1039266072Sdes [lt_cv_ld_force_load=no 1040266072Sdes cat > conftest.c << _LT_EOF 1041266072Sdesint forced_loaded() { return 2;} 1042266072Sdes_LT_EOF 1043266072Sdes echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1044266072Sdes $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1045266072Sdes echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1046266072Sdes $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1047266072Sdes echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1048266072Sdes $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1049266072Sdes cat > conftest.c << _LT_EOF 1050266072Sdesint main() { return 0;} 1051266072Sdes_LT_EOF 1052266072Sdes echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1053266072Sdes $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1054266072Sdes _lt_result=$? 1055266072Sdes if test -s conftest.err && $GREP force_load conftest.err; then 1056266072Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1057285206Sdes elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1058266072Sdes lt_cv_ld_force_load=yes 1059266072Sdes else 1060266072Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1061266072Sdes fi 1062266072Sdes rm -f conftest.err libconftest.a conftest conftest.c 1063266072Sdes rm -rf conftest.dSYM 1064266072Sdes ]) 1065266072Sdes case $host_os in 1066266072Sdes rhapsody* | darwin1.[[012]]) 1067285206Sdes _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1068266072Sdes darwin1.*) 1069285206Sdes _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1070266072Sdes darwin*) # darwin 5.x on 1071266072Sdes # if running on 10.5 or later, the deployment target defaults 1072266072Sdes # to the OS version, if on x86, and 10.4, the deployment 1073266072Sdes # target defaults to 10.4. Don't you love it? 1074266072Sdes case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1075266072Sdes 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1076285206Sdes _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1077285206Sdes 10.[[012]][[,.]]*) 1078285206Sdes _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1079266072Sdes 10.*) 1080285206Sdes _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1081266072Sdes esac 1082266072Sdes ;; 1083266072Sdes esac 1084285206Sdes if test yes = "$lt_cv_apple_cc_single_mod"; then 1085266072Sdes _lt_dar_single_mod='$single_module' 1086266072Sdes fi 1087285206Sdes if test yes = "$lt_cv_ld_exported_symbols_list"; then 1088285206Sdes _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1089266072Sdes else 1090285206Sdes _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1091266072Sdes fi 1092285206Sdes if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1093266072Sdes _lt_dsymutil='~$DSYMUTIL $lib || :' 1094266072Sdes else 1095266072Sdes _lt_dsymutil= 1096266072Sdes fi 1097266072Sdes ;; 1098266072Sdes esac 1099266072Sdes]) 1100266072Sdes 1101266072Sdes 1102266072Sdes# _LT_DARWIN_LINKER_FEATURES([TAG]) 1103266072Sdes# --------------------------------- 1104266072Sdes# Checks for linker and compiler features on darwin 1105266072Sdesm4_defun([_LT_DARWIN_LINKER_FEATURES], 1106266072Sdes[ 1107266072Sdes m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1108266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1109266072Sdes _LT_TAGVAR(hardcode_direct, $1)=no 1110266072Sdes _LT_TAGVAR(hardcode_automatic, $1)=yes 1111266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1112285206Sdes if test yes = "$lt_cv_ld_force_load"; then 1113285206Sdes _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\"`' 1114266072Sdes m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1115266072Sdes [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1116266072Sdes else 1117266072Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1118266072Sdes fi 1119266072Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 1120285206Sdes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1121266072Sdes case $cc_basename in 1122285206Sdes ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1123266072Sdes *) _lt_dar_can_shared=$GCC ;; 1124266072Sdes esac 1125285206Sdes if test yes = "$_lt_dar_can_shared"; then 1126266072Sdes output_verbose_link_cmd=func_echo_all 1127285206Sdes _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" 1128285206Sdes _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1129285206Sdes _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" 1130285206Sdes _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" 1131266072Sdes m4_if([$1], [CXX], 1132285206Sdes[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1133285206Sdes _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" 1134285206Sdes _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" 1135266072Sdes fi 1136266072Sdes],[]) 1137266072Sdes else 1138266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 1139266072Sdes fi 1140266072Sdes]) 1141266072Sdes 1142266072Sdes# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1143266072Sdes# ---------------------------------- 1144266072Sdes# Links a minimal program and checks the executable 1145266072Sdes# for the system default hardcoded library path. In most cases, 1146266072Sdes# this is /usr/lib:/lib, but when the MPI compilers are used 1147266072Sdes# the location of the communication and MPI libs are included too. 1148266072Sdes# If we don't find anything, use the default library path according 1149266072Sdes# to the aix ld manual. 1150266072Sdes# Store the results from the different compilers for each TAGNAME. 1151266072Sdes# Allow to override them for all tags through lt_cv_aix_libpath. 1152266072Sdesm4_defun([_LT_SYS_MODULE_PATH_AIX], 1153266072Sdes[m4_require([_LT_DECL_SED])dnl 1154285206Sdesif test set = "${lt_cv_aix_libpath+set}"; then 1155266072Sdes aix_libpath=$lt_cv_aix_libpath 1156266072Sdeselse 1157266072Sdes AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1158266072Sdes [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1159266072Sdes lt_aix_libpath_sed='[ 1160266072Sdes /Import File Strings/,/^$/ { 1161266072Sdes /^0/ { 1162266072Sdes s/^0 *\([^ ]*\) *$/\1/ 1163266072Sdes p 1164266072Sdes } 1165266072Sdes }]' 1166266072Sdes _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1167266072Sdes # Check for a 64-bit object if we didn't find anything. 1168266072Sdes if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1169266072Sdes _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1170266072Sdes fi],[]) 1171266072Sdes if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1172285206Sdes _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1173266072Sdes fi 1174266072Sdes ]) 1175266072Sdes aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1176266072Sdesfi 1177266072Sdes])# _LT_SYS_MODULE_PATH_AIX 1178266072Sdes 1179266072Sdes 1180266072Sdes# _LT_SHELL_INIT(ARG) 1181266072Sdes# ------------------- 1182266072Sdesm4_define([_LT_SHELL_INIT], 1183266072Sdes[m4_divert_text([M4SH-INIT], [$1 1184266072Sdes])])# _LT_SHELL_INIT 1185266072Sdes 1186266072Sdes 1187266072Sdes 1188266072Sdes# _LT_PROG_ECHO_BACKSLASH 1189266072Sdes# ----------------------- 1190266072Sdes# Find how we can fake an echo command that does not interpret backslash. 1191266072Sdes# In particular, with Autoconf 2.60 or later we add some code to the start 1192285206Sdes# of the generated configure script that will find a shell with a builtin 1193285206Sdes# printf (that we can use as an echo command). 1194266072Sdesm4_defun([_LT_PROG_ECHO_BACKSLASH], 1195266072Sdes[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1196266072SdesECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1197266072SdesECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1198266072Sdes 1199266072SdesAC_MSG_CHECKING([how to print strings]) 1200266072Sdes# Test print first, because it will be a builtin if present. 1201266072Sdesif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1202266072Sdes test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1203266072Sdes ECHO='print -r --' 1204266072Sdeselif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1205266072Sdes ECHO='printf %s\n' 1206266072Sdeselse 1207266072Sdes # Use this function as a fallback that always works. 1208266072Sdes func_fallback_echo () 1209266072Sdes { 1210266072Sdes eval 'cat <<_LTECHO_EOF 1211266072Sdes$[]1 1212266072Sdes_LTECHO_EOF' 1213266072Sdes } 1214266072Sdes ECHO='func_fallback_echo' 1215266072Sdesfi 1216266072Sdes 1217266072Sdes# func_echo_all arg... 1218266072Sdes# Invoke $ECHO with all args, space-separated. 1219266072Sdesfunc_echo_all () 1220266072Sdes{ 1221285206Sdes $ECHO "$*" 1222266072Sdes} 1223266072Sdes 1224285206Sdescase $ECHO in 1225266072Sdes printf*) AC_MSG_RESULT([printf]) ;; 1226266072Sdes print*) AC_MSG_RESULT([print -r]) ;; 1227266072Sdes *) AC_MSG_RESULT([cat]) ;; 1228266072Sdesesac 1229266072Sdes 1230266072Sdesm4_ifdef([_AS_DETECT_SUGGESTED], 1231266072Sdes[_AS_DETECT_SUGGESTED([ 1232266072Sdes test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1233266072Sdes ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1234266072Sdes ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1235266072Sdes ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1236266072Sdes PATH=/empty FPATH=/empty; export PATH FPATH 1237266072Sdes test "X`printf %s $ECHO`" = "X$ECHO" \ 1238266072Sdes || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1239266072Sdes 1240266072Sdes_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1241266072Sdes_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1242266072Sdes])# _LT_PROG_ECHO_BACKSLASH 1243266072Sdes 1244266072Sdes 1245266072Sdes# _LT_WITH_SYSROOT 1246266072Sdes# ---------------- 1247266072SdesAC_DEFUN([_LT_WITH_SYSROOT], 1248266072Sdes[AC_MSG_CHECKING([for sysroot]) 1249266072SdesAC_ARG_WITH([sysroot], 1250285206Sdes[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1251285206Sdes [Search for dependent libraries within DIR (or the compiler's sysroot 1252285206Sdes if not specified).])], 1253266072Sdes[], [with_sysroot=no]) 1254266072Sdes 1255266072Sdesdnl lt_sysroot will always be passed unquoted. We quote it here 1256266072Sdesdnl in case the user passed a directory name. 1257266072Sdeslt_sysroot= 1258285206Sdescase $with_sysroot in #( 1259266072Sdes yes) 1260285206Sdes if test yes = "$GCC"; then 1261266072Sdes lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1262266072Sdes fi 1263266072Sdes ;; #( 1264266072Sdes /*) 1265266072Sdes lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1266266072Sdes ;; #( 1267266072Sdes no|'') 1268266072Sdes ;; #( 1269266072Sdes *) 1270285206Sdes AC_MSG_RESULT([$with_sysroot]) 1271266072Sdes AC_MSG_ERROR([The sysroot must be an absolute path.]) 1272266072Sdes ;; 1273266072Sdesesac 1274266072Sdes 1275266072Sdes AC_MSG_RESULT([${lt_sysroot:-no}]) 1276266072Sdes_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1277285206Sdes[dependent libraries, and where our libraries should be installed.])]) 1278266072Sdes 1279266072Sdes# _LT_ENABLE_LOCK 1280266072Sdes# --------------- 1281266072Sdesm4_defun([_LT_ENABLE_LOCK], 1282266072Sdes[AC_ARG_ENABLE([libtool-lock], 1283266072Sdes [AS_HELP_STRING([--disable-libtool-lock], 1284266072Sdes [avoid locking (might break parallel builds)])]) 1285285206Sdestest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1286266072Sdes 1287266072Sdes# Some flags need to be propagated to the compiler or linker for good 1288266072Sdes# libtool support. 1289266072Sdescase $host in 1290266072Sdesia64-*-hpux*) 1291285206Sdes # Find out what ABI is being produced by ac_compile, and set mode 1292285206Sdes # options accordingly. 1293266072Sdes echo 'int i;' > conftest.$ac_ext 1294266072Sdes if AC_TRY_EVAL(ac_compile); then 1295266072Sdes case `/usr/bin/file conftest.$ac_objext` in 1296266072Sdes *ELF-32*) 1297285206Sdes HPUX_IA64_MODE=32 1298266072Sdes ;; 1299266072Sdes *ELF-64*) 1300285206Sdes HPUX_IA64_MODE=64 1301266072Sdes ;; 1302266072Sdes esac 1303266072Sdes fi 1304266072Sdes rm -rf conftest* 1305266072Sdes ;; 1306266072Sdes*-*-irix6*) 1307285206Sdes # Find out what ABI is being produced by ac_compile, and set linker 1308285206Sdes # options accordingly. 1309266072Sdes echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1310266072Sdes if AC_TRY_EVAL(ac_compile); then 1311285206Sdes if test yes = "$lt_cv_prog_gnu_ld"; then 1312266072Sdes case `/usr/bin/file conftest.$ac_objext` in 1313266072Sdes *32-bit*) 1314266072Sdes LD="${LD-ld} -melf32bsmip" 1315266072Sdes ;; 1316266072Sdes *N32*) 1317266072Sdes LD="${LD-ld} -melf32bmipn32" 1318266072Sdes ;; 1319266072Sdes *64-bit*) 1320266072Sdes LD="${LD-ld} -melf64bmip" 1321266072Sdes ;; 1322266072Sdes esac 1323266072Sdes else 1324266072Sdes case `/usr/bin/file conftest.$ac_objext` in 1325266072Sdes *32-bit*) 1326266072Sdes LD="${LD-ld} -32" 1327266072Sdes ;; 1328266072Sdes *N32*) 1329266072Sdes LD="${LD-ld} -n32" 1330266072Sdes ;; 1331266072Sdes *64-bit*) 1332266072Sdes LD="${LD-ld} -64" 1333266072Sdes ;; 1334266072Sdes esac 1335266072Sdes fi 1336266072Sdes fi 1337266072Sdes rm -rf conftest* 1338266072Sdes ;; 1339266072Sdes 1340285206Sdesmips64*-*linux*) 1341285206Sdes # Find out what ABI is being produced by ac_compile, and set linker 1342285206Sdes # options accordingly. 1343285206Sdes echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1344285206Sdes if AC_TRY_EVAL(ac_compile); then 1345285206Sdes emul=elf 1346285206Sdes case `/usr/bin/file conftest.$ac_objext` in 1347285206Sdes *32-bit*) 1348285206Sdes emul="${emul}32" 1349285206Sdes ;; 1350285206Sdes *64-bit*) 1351285206Sdes emul="${emul}64" 1352285206Sdes ;; 1353285206Sdes esac 1354285206Sdes case `/usr/bin/file conftest.$ac_objext` in 1355285206Sdes *MSB*) 1356285206Sdes emul="${emul}btsmip" 1357285206Sdes ;; 1358285206Sdes *LSB*) 1359285206Sdes emul="${emul}ltsmip" 1360285206Sdes ;; 1361285206Sdes esac 1362285206Sdes case `/usr/bin/file conftest.$ac_objext` in 1363285206Sdes *N32*) 1364285206Sdes emul="${emul}n32" 1365285206Sdes ;; 1366285206Sdes esac 1367285206Sdes LD="${LD-ld} -m $emul" 1368285206Sdes fi 1369285206Sdes rm -rf conftest* 1370285206Sdes ;; 1371285206Sdes 1372285206Sdesx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1373266072Sdess390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1374285206Sdes # Find out what ABI is being produced by ac_compile, and set linker 1375285206Sdes # options accordingly. Note that the listed cases only cover the 1376285206Sdes # situations where additional linker options are needed (such as when 1377285206Sdes # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1378285206Sdes # vice versa); the common cases where no linker options are needed do 1379285206Sdes # not appear in the list. 1380266072Sdes echo 'int i;' > conftest.$ac_ext 1381266072Sdes if AC_TRY_EVAL(ac_compile); then 1382266072Sdes case `/usr/bin/file conftest.o` in 1383266072Sdes *32-bit*) 1384266072Sdes case $host in 1385266072Sdes x86_64-*kfreebsd*-gnu) 1386266072Sdes LD="${LD-ld} -m elf_i386_fbsd" 1387266072Sdes ;; 1388266072Sdes x86_64-*linux*) 1389285206Sdes case `/usr/bin/file conftest.o` in 1390285206Sdes *x86-64*) 1391285206Sdes LD="${LD-ld} -m elf32_x86_64" 1392285206Sdes ;; 1393285206Sdes *) 1394285206Sdes LD="${LD-ld} -m elf_i386" 1395285206Sdes ;; 1396285206Sdes esac 1397266072Sdes ;; 1398285206Sdes powerpc64le-*linux*) 1399285206Sdes LD="${LD-ld} -m elf32lppclinux" 1400285206Sdes ;; 1401285206Sdes powerpc64-*linux*) 1402266072Sdes LD="${LD-ld} -m elf32ppclinux" 1403266072Sdes ;; 1404266072Sdes s390x-*linux*) 1405266072Sdes LD="${LD-ld} -m elf_s390" 1406266072Sdes ;; 1407266072Sdes sparc64-*linux*) 1408266072Sdes LD="${LD-ld} -m elf32_sparc" 1409266072Sdes ;; 1410266072Sdes esac 1411266072Sdes ;; 1412266072Sdes *64-bit*) 1413266072Sdes case $host in 1414266072Sdes x86_64-*kfreebsd*-gnu) 1415266072Sdes LD="${LD-ld} -m elf_x86_64_fbsd" 1416266072Sdes ;; 1417266072Sdes x86_64-*linux*) 1418266072Sdes LD="${LD-ld} -m elf_x86_64" 1419266072Sdes ;; 1420285206Sdes powerpcle-*linux*) 1421285206Sdes LD="${LD-ld} -m elf64lppc" 1422285206Sdes ;; 1423285206Sdes powerpc-*linux*) 1424266072Sdes LD="${LD-ld} -m elf64ppc" 1425266072Sdes ;; 1426266072Sdes s390*-*linux*|s390*-*tpf*) 1427266072Sdes LD="${LD-ld} -m elf64_s390" 1428266072Sdes ;; 1429266072Sdes sparc*-*linux*) 1430266072Sdes LD="${LD-ld} -m elf64_sparc" 1431266072Sdes ;; 1432266072Sdes esac 1433266072Sdes ;; 1434266072Sdes esac 1435266072Sdes fi 1436266072Sdes rm -rf conftest* 1437266072Sdes ;; 1438266072Sdes 1439266072Sdes*-*-sco3.2v5*) 1440266072Sdes # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1441285206Sdes SAVE_CFLAGS=$CFLAGS 1442266072Sdes CFLAGS="$CFLAGS -belf" 1443266072Sdes AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1444266072Sdes [AC_LANG_PUSH(C) 1445266072Sdes AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1446266072Sdes AC_LANG_POP]) 1447285206Sdes if test yes != "$lt_cv_cc_needs_belf"; then 1448266072Sdes # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1449285206Sdes CFLAGS=$SAVE_CFLAGS 1450266072Sdes fi 1451266072Sdes ;; 1452266072Sdes*-*solaris*) 1453285206Sdes # Find out what ABI is being produced by ac_compile, and set linker 1454285206Sdes # options accordingly. 1455266072Sdes echo 'int i;' > conftest.$ac_ext 1456266072Sdes if AC_TRY_EVAL(ac_compile); then 1457266072Sdes case `/usr/bin/file conftest.o` in 1458266072Sdes *64-bit*) 1459266072Sdes case $lt_cv_prog_gnu_ld in 1460266072Sdes yes*) 1461266072Sdes case $host in 1462285206Sdes i?86-*-solaris*|x86_64-*-solaris*) 1463266072Sdes LD="${LD-ld} -m elf_x86_64" 1464266072Sdes ;; 1465266072Sdes sparc*-*-solaris*) 1466266072Sdes LD="${LD-ld} -m elf64_sparc" 1467266072Sdes ;; 1468266072Sdes esac 1469266072Sdes # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1470266072Sdes if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1471285206Sdes LD=${LD-ld}_sol2 1472266072Sdes fi 1473266072Sdes ;; 1474266072Sdes *) 1475266072Sdes if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1476266072Sdes LD="${LD-ld} -64" 1477266072Sdes fi 1478266072Sdes ;; 1479266072Sdes esac 1480266072Sdes ;; 1481266072Sdes esac 1482266072Sdes fi 1483266072Sdes rm -rf conftest* 1484266072Sdes ;; 1485266072Sdesesac 1486266072Sdes 1487285206Sdesneed_locks=$enable_libtool_lock 1488266072Sdes])# _LT_ENABLE_LOCK 1489266072Sdes 1490266072Sdes 1491266072Sdes# _LT_PROG_AR 1492266072Sdes# ----------- 1493266072Sdesm4_defun([_LT_PROG_AR], 1494266072Sdes[AC_CHECK_TOOLS(AR, [ar], false) 1495266072Sdes: ${AR=ar} 1496266072Sdes: ${AR_FLAGS=cru} 1497266072Sdes_LT_DECL([], [AR], [1], [The archiver]) 1498266072Sdes_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1499266072Sdes 1500266072SdesAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1501266072Sdes [lt_cv_ar_at_file=no 1502266072Sdes AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1503266072Sdes [echo conftest.$ac_objext > conftest.lst 1504266072Sdes lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1505266072Sdes AC_TRY_EVAL([lt_ar_try]) 1506285206Sdes if test 0 -eq "$ac_status"; then 1507266072Sdes # Ensure the archiver fails upon bogus file names. 1508266072Sdes rm -f conftest.$ac_objext libconftest.a 1509266072Sdes AC_TRY_EVAL([lt_ar_try]) 1510285206Sdes if test 0 -ne "$ac_status"; then 1511266072Sdes lt_cv_ar_at_file=@ 1512266072Sdes fi 1513266072Sdes fi 1514266072Sdes rm -f conftest.* libconftest.a 1515266072Sdes ]) 1516266072Sdes ]) 1517266072Sdes 1518285206Sdesif test no = "$lt_cv_ar_at_file"; then 1519266072Sdes archiver_list_spec= 1520266072Sdeselse 1521266072Sdes archiver_list_spec=$lt_cv_ar_at_file 1522266072Sdesfi 1523266072Sdes_LT_DECL([], [archiver_list_spec], [1], 1524266072Sdes [How to feed a file listing to the archiver]) 1525266072Sdes])# _LT_PROG_AR 1526266072Sdes 1527266072Sdes 1528266072Sdes# _LT_CMD_OLD_ARCHIVE 1529266072Sdes# ------------------- 1530266072Sdesm4_defun([_LT_CMD_OLD_ARCHIVE], 1531266072Sdes[_LT_PROG_AR 1532266072Sdes 1533266072SdesAC_CHECK_TOOL(STRIP, strip, :) 1534266072Sdestest -z "$STRIP" && STRIP=: 1535266072Sdes_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1536266072Sdes 1537266072SdesAC_CHECK_TOOL(RANLIB, ranlib, :) 1538266072Sdestest -z "$RANLIB" && RANLIB=: 1539266072Sdes_LT_DECL([], [RANLIB], [1], 1540266072Sdes [Commands used to install an old-style archive]) 1541266072Sdes 1542266072Sdes# Determine commands to create old-style static archives. 1543266072Sdesold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1544266072Sdesold_postinstall_cmds='chmod 644 $oldlib' 1545266072Sdesold_postuninstall_cmds= 1546266072Sdes 1547266072Sdesif test -n "$RANLIB"; then 1548266072Sdes case $host_os in 1549285206Sdes bitrig* | openbsd*) 1550266072Sdes old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1551266072Sdes ;; 1552266072Sdes *) 1553266072Sdes old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1554266072Sdes ;; 1555266072Sdes esac 1556266072Sdes old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1557266072Sdesfi 1558266072Sdes 1559266072Sdescase $host_os in 1560266072Sdes darwin*) 1561266072Sdes lock_old_archive_extraction=yes ;; 1562266072Sdes *) 1563266072Sdes lock_old_archive_extraction=no ;; 1564266072Sdesesac 1565266072Sdes_LT_DECL([], [old_postinstall_cmds], [2]) 1566266072Sdes_LT_DECL([], [old_postuninstall_cmds], [2]) 1567266072Sdes_LT_TAGDECL([], [old_archive_cmds], [2], 1568266072Sdes [Commands used to build an old-style archive]) 1569266072Sdes_LT_DECL([], [lock_old_archive_extraction], [0], 1570266072Sdes [Whether to use a lock for old archive extraction]) 1571266072Sdes])# _LT_CMD_OLD_ARCHIVE 1572266072Sdes 1573266072Sdes 1574266072Sdes# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1575266072Sdes# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1576266072Sdes# ---------------------------------------------------------------- 1577266072Sdes# Check whether the given compiler option works 1578266072SdesAC_DEFUN([_LT_COMPILER_OPTION], 1579266072Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1580266072Sdesm4_require([_LT_DECL_SED])dnl 1581266072SdesAC_CACHE_CHECK([$1], [$2], 1582266072Sdes [$2=no 1583266072Sdes m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1584266072Sdes echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1585285206Sdes lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1586266072Sdes # Insert the option either (1) after the last *FLAGS variable, or 1587266072Sdes # (2) before a word containing "conftest.", or (3) at the end. 1588266072Sdes # Note that $ac_compile itself does not contain backslashes and begins 1589266072Sdes # with a dollar sign (not a hyphen), so the echo should work correctly. 1590266072Sdes # The option is referenced via a variable to avoid confusing sed. 1591266072Sdes lt_compile=`echo "$ac_compile" | $SED \ 1592266072Sdes -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1593266072Sdes -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1594266072Sdes -e 's:$: $lt_compiler_flag:'` 1595266072Sdes (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1596266072Sdes (eval "$lt_compile" 2>conftest.err) 1597266072Sdes ac_status=$? 1598266072Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 1599266072Sdes echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1600266072Sdes if (exit $ac_status) && test -s "$ac_outfile"; then 1601266072Sdes # The compiler can only warn and ignore the option if not recognized 1602266072Sdes # So say no if there are warnings other than the usual output. 1603266072Sdes $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1604266072Sdes $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1605266072Sdes if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1606266072Sdes $2=yes 1607266072Sdes fi 1608266072Sdes fi 1609266072Sdes $RM conftest* 1610266072Sdes]) 1611266072Sdes 1612285206Sdesif test yes = "[$]$2"; then 1613266072Sdes m4_if([$5], , :, [$5]) 1614266072Sdeselse 1615266072Sdes m4_if([$6], , :, [$6]) 1616266072Sdesfi 1617266072Sdes])# _LT_COMPILER_OPTION 1618266072Sdes 1619266072Sdes# Old name: 1620266072SdesAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1621266072Sdesdnl aclocal-1.4 backwards compatibility: 1622266072Sdesdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1623266072Sdes 1624266072Sdes 1625266072Sdes# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1626266072Sdes# [ACTION-SUCCESS], [ACTION-FAILURE]) 1627266072Sdes# ---------------------------------------------------- 1628266072Sdes# Check whether the given linker option works 1629266072SdesAC_DEFUN([_LT_LINKER_OPTION], 1630266072Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1631266072Sdesm4_require([_LT_DECL_SED])dnl 1632266072SdesAC_CACHE_CHECK([$1], [$2], 1633266072Sdes [$2=no 1634285206Sdes save_LDFLAGS=$LDFLAGS 1635266072Sdes LDFLAGS="$LDFLAGS $3" 1636266072Sdes echo "$lt_simple_link_test_code" > conftest.$ac_ext 1637266072Sdes if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1638266072Sdes # The linker can only warn and ignore the option if not recognized 1639266072Sdes # So say no if there are warnings 1640266072Sdes if test -s conftest.err; then 1641266072Sdes # Append any errors to the config.log. 1642266072Sdes cat conftest.err 1>&AS_MESSAGE_LOG_FD 1643266072Sdes $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1644266072Sdes $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1645266072Sdes if diff conftest.exp conftest.er2 >/dev/null; then 1646266072Sdes $2=yes 1647266072Sdes fi 1648266072Sdes else 1649266072Sdes $2=yes 1650266072Sdes fi 1651266072Sdes fi 1652266072Sdes $RM -r conftest* 1653285206Sdes LDFLAGS=$save_LDFLAGS 1654266072Sdes]) 1655266072Sdes 1656285206Sdesif test yes = "[$]$2"; then 1657266072Sdes m4_if([$4], , :, [$4]) 1658266072Sdeselse 1659266072Sdes m4_if([$5], , :, [$5]) 1660266072Sdesfi 1661266072Sdes])# _LT_LINKER_OPTION 1662266072Sdes 1663266072Sdes# Old name: 1664266072SdesAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1665266072Sdesdnl aclocal-1.4 backwards compatibility: 1666266072Sdesdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1667266072Sdes 1668266072Sdes 1669266072Sdes# LT_CMD_MAX_LEN 1670266072Sdes#--------------- 1671266072SdesAC_DEFUN([LT_CMD_MAX_LEN], 1672266072Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1673266072Sdes# find the maximum length of command line arguments 1674266072SdesAC_MSG_CHECKING([the maximum length of command line arguments]) 1675266072SdesAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1676266072Sdes i=0 1677285206Sdes teststring=ABCD 1678266072Sdes 1679266072Sdes case $build_os in 1680266072Sdes msdosdjgpp*) 1681266072Sdes # On DJGPP, this test can blow up pretty badly due to problems in libc 1682266072Sdes # (any single argument exceeding 2000 bytes causes a buffer overrun 1683266072Sdes # during glob expansion). Even if it were fixed, the result of this 1684266072Sdes # check would be larger than it should be. 1685266072Sdes lt_cv_sys_max_cmd_len=12288; # 12K is about right 1686266072Sdes ;; 1687266072Sdes 1688266072Sdes gnu*) 1689266072Sdes # Under GNU Hurd, this test is not required because there is 1690266072Sdes # no limit to the length of command line arguments. 1691266072Sdes # Libtool will interpret -1 as no limit whatsoever 1692266072Sdes lt_cv_sys_max_cmd_len=-1; 1693266072Sdes ;; 1694266072Sdes 1695266072Sdes cygwin* | mingw* | cegcc*) 1696266072Sdes # On Win9x/ME, this test blows up -- it succeeds, but takes 1697266072Sdes # about 5 minutes as the teststring grows exponentially. 1698266072Sdes # Worse, since 9x/ME are not pre-emptively multitasking, 1699266072Sdes # you end up with a "frozen" computer, even though with patience 1700266072Sdes # the test eventually succeeds (with a max line length of 256k). 1701266072Sdes # Instead, let's just punt: use the minimum linelength reported by 1702266072Sdes # all of the supported platforms: 8192 (on NT/2K/XP). 1703266072Sdes lt_cv_sys_max_cmd_len=8192; 1704266072Sdes ;; 1705266072Sdes 1706266072Sdes mint*) 1707266072Sdes # On MiNT this can take a long time and run out of memory. 1708266072Sdes lt_cv_sys_max_cmd_len=8192; 1709266072Sdes ;; 1710266072Sdes 1711266072Sdes amigaos*) 1712266072Sdes # On AmigaOS with pdksh, this test takes hours, literally. 1713266072Sdes # So we just punt and use a minimum line length of 8192. 1714266072Sdes lt_cv_sys_max_cmd_len=8192; 1715266072Sdes ;; 1716266072Sdes 1717285206Sdes bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1718266072Sdes # This has been around since 386BSD, at least. Likely further. 1719266072Sdes if test -x /sbin/sysctl; then 1720266072Sdes lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1721266072Sdes elif test -x /usr/sbin/sysctl; then 1722266072Sdes lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1723266072Sdes else 1724266072Sdes lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1725266072Sdes fi 1726266072Sdes # And add a safety zone 1727266072Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1728266072Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1729266072Sdes ;; 1730266072Sdes 1731266072Sdes interix*) 1732266072Sdes # We know the value 262144 and hardcode it with a safety zone (like BSD) 1733266072Sdes lt_cv_sys_max_cmd_len=196608 1734266072Sdes ;; 1735266072Sdes 1736266072Sdes os2*) 1737266072Sdes # The test takes a long time on OS/2. 1738266072Sdes lt_cv_sys_max_cmd_len=8192 1739266072Sdes ;; 1740266072Sdes 1741266072Sdes osf*) 1742266072Sdes # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1743266072Sdes # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1744266072Sdes # nice to cause kernel panics so lets avoid the loop below. 1745266072Sdes # First set a reasonable default. 1746266072Sdes lt_cv_sys_max_cmd_len=16384 1747266072Sdes # 1748266072Sdes if test -x /sbin/sysconfig; then 1749266072Sdes case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1750266072Sdes *1*) lt_cv_sys_max_cmd_len=-1 ;; 1751266072Sdes esac 1752266072Sdes fi 1753266072Sdes ;; 1754266072Sdes sco3.2v5*) 1755266072Sdes lt_cv_sys_max_cmd_len=102400 1756266072Sdes ;; 1757266072Sdes sysv5* | sco5v6* | sysv4.2uw2*) 1758266072Sdes kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1759266072Sdes if test -n "$kargmax"; then 1760266072Sdes lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1761266072Sdes else 1762266072Sdes lt_cv_sys_max_cmd_len=32768 1763266072Sdes fi 1764266072Sdes ;; 1765266072Sdes *) 1766266072Sdes lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1767285206Sdes if test -n "$lt_cv_sys_max_cmd_len" && \ 1768285206Sdes test undefined != "$lt_cv_sys_max_cmd_len"; then 1769266072Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1770266072Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1771266072Sdes else 1772266072Sdes # Make teststring a little bigger before we do anything with it. 1773266072Sdes # a 1K string should be a reasonable start. 1774285206Sdes for i in 1 2 3 4 5 6 7 8; do 1775266072Sdes teststring=$teststring$teststring 1776266072Sdes done 1777266072Sdes SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1778266072Sdes # If test is not a shell built-in, we'll probably end up computing a 1779266072Sdes # maximum length that is only half of the actual maximum length, but 1780266072Sdes # we can't tell. 1781285206Sdes while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1782266072Sdes = "X$teststring$teststring"; } >/dev/null 2>&1 && 1783285206Sdes test 17 != "$i" # 1/2 MB should be enough 1784266072Sdes do 1785266072Sdes i=`expr $i + 1` 1786266072Sdes teststring=$teststring$teststring 1787266072Sdes done 1788266072Sdes # Only check the string length outside the loop. 1789266072Sdes lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1790266072Sdes teststring= 1791266072Sdes # Add a significant safety factor because C++ compilers can tack on 1792266072Sdes # massive amounts of additional arguments before passing them to the 1793266072Sdes # linker. It appears as though 1/2 is a usable value. 1794266072Sdes lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1795266072Sdes fi 1796266072Sdes ;; 1797266072Sdes esac 1798266072Sdes]) 1799285206Sdesif test -n "$lt_cv_sys_max_cmd_len"; then 1800266072Sdes AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1801266072Sdeselse 1802266072Sdes AC_MSG_RESULT(none) 1803266072Sdesfi 1804266072Sdesmax_cmd_len=$lt_cv_sys_max_cmd_len 1805266072Sdes_LT_DECL([], [max_cmd_len], [0], 1806266072Sdes [What is the maximum length of a command?]) 1807266072Sdes])# LT_CMD_MAX_LEN 1808266072Sdes 1809266072Sdes# Old name: 1810266072SdesAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1811266072Sdesdnl aclocal-1.4 backwards compatibility: 1812266072Sdesdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1813266072Sdes 1814266072Sdes 1815266072Sdes# _LT_HEADER_DLFCN 1816266072Sdes# ---------------- 1817266072Sdesm4_defun([_LT_HEADER_DLFCN], 1818266072Sdes[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1819266072Sdes])# _LT_HEADER_DLFCN 1820266072Sdes 1821266072Sdes 1822266072Sdes# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1823266072Sdes# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1824266072Sdes# ---------------------------------------------------------------- 1825266072Sdesm4_defun([_LT_TRY_DLOPEN_SELF], 1826266072Sdes[m4_require([_LT_HEADER_DLFCN])dnl 1827285206Sdesif test yes = "$cross_compiling"; then : 1828266072Sdes [$4] 1829266072Sdeselse 1830266072Sdes lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1831266072Sdes lt_status=$lt_dlunknown 1832266072Sdes cat > conftest.$ac_ext <<_LT_EOF 1833266072Sdes[#line $LINENO "configure" 1834266072Sdes#include "confdefs.h" 1835266072Sdes 1836266072Sdes#if HAVE_DLFCN_H 1837266072Sdes#include <dlfcn.h> 1838266072Sdes#endif 1839266072Sdes 1840266072Sdes#include <stdio.h> 1841266072Sdes 1842266072Sdes#ifdef RTLD_GLOBAL 1843266072Sdes# define LT_DLGLOBAL RTLD_GLOBAL 1844266072Sdes#else 1845266072Sdes# ifdef DL_GLOBAL 1846266072Sdes# define LT_DLGLOBAL DL_GLOBAL 1847266072Sdes# else 1848266072Sdes# define LT_DLGLOBAL 0 1849266072Sdes# endif 1850266072Sdes#endif 1851266072Sdes 1852266072Sdes/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1853266072Sdes find out it does not work in some platform. */ 1854266072Sdes#ifndef LT_DLLAZY_OR_NOW 1855266072Sdes# ifdef RTLD_LAZY 1856266072Sdes# define LT_DLLAZY_OR_NOW RTLD_LAZY 1857266072Sdes# else 1858266072Sdes# ifdef DL_LAZY 1859266072Sdes# define LT_DLLAZY_OR_NOW DL_LAZY 1860266072Sdes# else 1861266072Sdes# ifdef RTLD_NOW 1862266072Sdes# define LT_DLLAZY_OR_NOW RTLD_NOW 1863266072Sdes# else 1864266072Sdes# ifdef DL_NOW 1865266072Sdes# define LT_DLLAZY_OR_NOW DL_NOW 1866266072Sdes# else 1867266072Sdes# define LT_DLLAZY_OR_NOW 0 1868266072Sdes# endif 1869266072Sdes# endif 1870266072Sdes# endif 1871266072Sdes# endif 1872266072Sdes#endif 1873266072Sdes 1874285206Sdes/* When -fvisibility=hidden is used, assume the code has been annotated 1875266072Sdes correspondingly for the symbols needed. */ 1876285206Sdes#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1877266072Sdesint fnord () __attribute__((visibility("default"))); 1878266072Sdes#endif 1879266072Sdes 1880266072Sdesint fnord () { return 42; } 1881266072Sdesint main () 1882266072Sdes{ 1883266072Sdes void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1884266072Sdes int status = $lt_dlunknown; 1885266072Sdes 1886266072Sdes if (self) 1887266072Sdes { 1888266072Sdes if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1889266072Sdes else 1890266072Sdes { 1891266072Sdes if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1892266072Sdes else puts (dlerror ()); 1893266072Sdes } 1894266072Sdes /* dlclose (self); */ 1895266072Sdes } 1896266072Sdes else 1897266072Sdes puts (dlerror ()); 1898266072Sdes 1899266072Sdes return status; 1900266072Sdes}] 1901266072Sdes_LT_EOF 1902285206Sdes if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1903266072Sdes (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1904266072Sdes lt_status=$? 1905266072Sdes case x$lt_status in 1906266072Sdes x$lt_dlno_uscore) $1 ;; 1907266072Sdes x$lt_dlneed_uscore) $2 ;; 1908266072Sdes x$lt_dlunknown|x*) $3 ;; 1909266072Sdes esac 1910266072Sdes else : 1911266072Sdes # compilation failed 1912266072Sdes $3 1913266072Sdes fi 1914266072Sdesfi 1915266072Sdesrm -fr conftest* 1916266072Sdes])# _LT_TRY_DLOPEN_SELF 1917266072Sdes 1918266072Sdes 1919266072Sdes# LT_SYS_DLOPEN_SELF 1920266072Sdes# ------------------ 1921266072SdesAC_DEFUN([LT_SYS_DLOPEN_SELF], 1922266072Sdes[m4_require([_LT_HEADER_DLFCN])dnl 1923285206Sdesif test yes != "$enable_dlopen"; then 1924266072Sdes enable_dlopen=unknown 1925266072Sdes enable_dlopen_self=unknown 1926266072Sdes enable_dlopen_self_static=unknown 1927266072Sdeselse 1928266072Sdes lt_cv_dlopen=no 1929266072Sdes lt_cv_dlopen_libs= 1930266072Sdes 1931266072Sdes case $host_os in 1932266072Sdes beos*) 1933285206Sdes lt_cv_dlopen=load_add_on 1934266072Sdes lt_cv_dlopen_libs= 1935266072Sdes lt_cv_dlopen_self=yes 1936266072Sdes ;; 1937266072Sdes 1938266072Sdes mingw* | pw32* | cegcc*) 1939285206Sdes lt_cv_dlopen=LoadLibrary 1940266072Sdes lt_cv_dlopen_libs= 1941266072Sdes ;; 1942266072Sdes 1943266072Sdes cygwin*) 1944285206Sdes lt_cv_dlopen=dlopen 1945266072Sdes lt_cv_dlopen_libs= 1946266072Sdes ;; 1947266072Sdes 1948266072Sdes darwin*) 1949285206Sdes # if libdl is installed we need to link against it 1950266072Sdes AC_CHECK_LIB([dl], [dlopen], 1951285206Sdes [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1952285206Sdes lt_cv_dlopen=dyld 1953266072Sdes lt_cv_dlopen_libs= 1954266072Sdes lt_cv_dlopen_self=yes 1955266072Sdes ]) 1956266072Sdes ;; 1957266072Sdes 1958285206Sdes tpf*) 1959285206Sdes # Don't try to run any link tests for TPF. We know it's impossible 1960285206Sdes # because TPF is a cross-compiler, and we know how we open DSOs. 1961285206Sdes lt_cv_dlopen=dlopen 1962285206Sdes lt_cv_dlopen_libs= 1963285206Sdes lt_cv_dlopen_self=no 1964285206Sdes ;; 1965285206Sdes 1966266072Sdes *) 1967266072Sdes AC_CHECK_FUNC([shl_load], 1968285206Sdes [lt_cv_dlopen=shl_load], 1969266072Sdes [AC_CHECK_LIB([dld], [shl_load], 1970285206Sdes [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1971266072Sdes [AC_CHECK_FUNC([dlopen], 1972285206Sdes [lt_cv_dlopen=dlopen], 1973266072Sdes [AC_CHECK_LIB([dl], [dlopen], 1974285206Sdes [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1975266072Sdes [AC_CHECK_LIB([svld], [dlopen], 1976285206Sdes [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1977266072Sdes [AC_CHECK_LIB([dld], [dld_link], 1978285206Sdes [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1979266072Sdes ]) 1980266072Sdes ]) 1981266072Sdes ]) 1982266072Sdes ]) 1983266072Sdes ]) 1984266072Sdes ;; 1985266072Sdes esac 1986266072Sdes 1987285206Sdes if test no = "$lt_cv_dlopen"; then 1988285206Sdes enable_dlopen=no 1989285206Sdes else 1990266072Sdes enable_dlopen=yes 1991266072Sdes fi 1992266072Sdes 1993266072Sdes case $lt_cv_dlopen in 1994266072Sdes dlopen) 1995285206Sdes save_CPPFLAGS=$CPPFLAGS 1996285206Sdes test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1997266072Sdes 1998285206Sdes save_LDFLAGS=$LDFLAGS 1999266072Sdes wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2000266072Sdes 2001285206Sdes save_LIBS=$LIBS 2002266072Sdes LIBS="$lt_cv_dlopen_libs $LIBS" 2003266072Sdes 2004266072Sdes AC_CACHE_CHECK([whether a program can dlopen itself], 2005266072Sdes lt_cv_dlopen_self, [dnl 2006266072Sdes _LT_TRY_DLOPEN_SELF( 2007266072Sdes lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2008266072Sdes lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2009266072Sdes ]) 2010266072Sdes 2011285206Sdes if test yes = "$lt_cv_dlopen_self"; then 2012266072Sdes wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2013266072Sdes AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2014266072Sdes lt_cv_dlopen_self_static, [dnl 2015266072Sdes _LT_TRY_DLOPEN_SELF( 2016266072Sdes lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2017266072Sdes lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2018266072Sdes ]) 2019266072Sdes fi 2020266072Sdes 2021285206Sdes CPPFLAGS=$save_CPPFLAGS 2022285206Sdes LDFLAGS=$save_LDFLAGS 2023285206Sdes LIBS=$save_LIBS 2024266072Sdes ;; 2025266072Sdes esac 2026266072Sdes 2027266072Sdes case $lt_cv_dlopen_self in 2028266072Sdes yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2029266072Sdes *) enable_dlopen_self=unknown ;; 2030266072Sdes esac 2031266072Sdes 2032266072Sdes case $lt_cv_dlopen_self_static in 2033266072Sdes yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2034266072Sdes *) enable_dlopen_self_static=unknown ;; 2035266072Sdes esac 2036266072Sdesfi 2037266072Sdes_LT_DECL([dlopen_support], [enable_dlopen], [0], 2038266072Sdes [Whether dlopen is supported]) 2039266072Sdes_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2040266072Sdes [Whether dlopen of programs is supported]) 2041266072Sdes_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2042266072Sdes [Whether dlopen of statically linked programs is supported]) 2043266072Sdes])# LT_SYS_DLOPEN_SELF 2044266072Sdes 2045266072Sdes# Old name: 2046266072SdesAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2047266072Sdesdnl aclocal-1.4 backwards compatibility: 2048266072Sdesdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2049266072Sdes 2050266072Sdes 2051266072Sdes# _LT_COMPILER_C_O([TAGNAME]) 2052266072Sdes# --------------------------- 2053266072Sdes# Check to see if options -c and -o are simultaneously supported by compiler. 2054266072Sdes# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2055266072Sdesm4_defun([_LT_COMPILER_C_O], 2056266072Sdes[m4_require([_LT_DECL_SED])dnl 2057266072Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2058266072Sdesm4_require([_LT_TAG_COMPILER])dnl 2059266072SdesAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2060266072Sdes [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2061266072Sdes [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2062266072Sdes $RM -r conftest 2>/dev/null 2063266072Sdes mkdir conftest 2064266072Sdes cd conftest 2065266072Sdes mkdir out 2066266072Sdes echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2067266072Sdes 2068266072Sdes lt_compiler_flag="-o out/conftest2.$ac_objext" 2069266072Sdes # Insert the option either (1) after the last *FLAGS variable, or 2070266072Sdes # (2) before a word containing "conftest.", or (3) at the end. 2071266072Sdes # Note that $ac_compile itself does not contain backslashes and begins 2072266072Sdes # with a dollar sign (not a hyphen), so the echo should work correctly. 2073266072Sdes lt_compile=`echo "$ac_compile" | $SED \ 2074266072Sdes -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2075266072Sdes -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2076266072Sdes -e 's:$: $lt_compiler_flag:'` 2077266072Sdes (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2078266072Sdes (eval "$lt_compile" 2>out/conftest.err) 2079266072Sdes ac_status=$? 2080266072Sdes cat out/conftest.err >&AS_MESSAGE_LOG_FD 2081266072Sdes echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2082266072Sdes if (exit $ac_status) && test -s out/conftest2.$ac_objext 2083266072Sdes then 2084266072Sdes # The compiler can only warn and ignore the option if not recognized 2085266072Sdes # So say no if there are warnings 2086266072Sdes $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2087266072Sdes $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2088266072Sdes if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2089266072Sdes _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2090266072Sdes fi 2091266072Sdes fi 2092266072Sdes chmod u+w . 2>&AS_MESSAGE_LOG_FD 2093266072Sdes $RM conftest* 2094266072Sdes # SGI C++ compiler will create directory out/ii_files/ for 2095266072Sdes # template instantiation 2096266072Sdes test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2097266072Sdes $RM out/* && rmdir out 2098266072Sdes cd .. 2099266072Sdes $RM -r conftest 2100266072Sdes $RM conftest* 2101266072Sdes]) 2102266072Sdes_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2103266072Sdes [Does compiler simultaneously support -c and -o options?]) 2104266072Sdes])# _LT_COMPILER_C_O 2105266072Sdes 2106266072Sdes 2107266072Sdes# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2108266072Sdes# ---------------------------------- 2109266072Sdes# Check to see if we can do hard links to lock some files if needed 2110266072Sdesm4_defun([_LT_COMPILER_FILE_LOCKS], 2111266072Sdes[m4_require([_LT_ENABLE_LOCK])dnl 2112266072Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2113266072Sdes_LT_COMPILER_C_O([$1]) 2114266072Sdes 2115285206Sdeshard_links=nottested 2116285206Sdesif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2117266072Sdes # do not overwrite the value of need_locks provided by the user 2118266072Sdes AC_MSG_CHECKING([if we can lock with hard links]) 2119266072Sdes hard_links=yes 2120266072Sdes $RM conftest* 2121266072Sdes ln conftest.a conftest.b 2>/dev/null && hard_links=no 2122266072Sdes touch conftest.a 2123266072Sdes ln conftest.a conftest.b 2>&5 || hard_links=no 2124266072Sdes ln conftest.a conftest.b 2>/dev/null && hard_links=no 2125266072Sdes AC_MSG_RESULT([$hard_links]) 2126285206Sdes if test no = "$hard_links"; then 2127285206Sdes AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2128266072Sdes need_locks=warn 2129266072Sdes fi 2130266072Sdeselse 2131266072Sdes need_locks=no 2132266072Sdesfi 2133266072Sdes_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2134266072Sdes])# _LT_COMPILER_FILE_LOCKS 2135266072Sdes 2136266072Sdes 2137266072Sdes# _LT_CHECK_OBJDIR 2138266072Sdes# ---------------- 2139266072Sdesm4_defun([_LT_CHECK_OBJDIR], 2140266072Sdes[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2141266072Sdes[rm -f .libs 2>/dev/null 2142266072Sdesmkdir .libs 2>/dev/null 2143266072Sdesif test -d .libs; then 2144266072Sdes lt_cv_objdir=.libs 2145266072Sdeselse 2146266072Sdes # MS-DOS does not allow filenames that begin with a dot. 2147266072Sdes lt_cv_objdir=_libs 2148266072Sdesfi 2149266072Sdesrmdir .libs 2>/dev/null]) 2150266072Sdesobjdir=$lt_cv_objdir 2151266072Sdes_LT_DECL([], [objdir], [0], 2152266072Sdes [The name of the directory that contains temporary libtool files])dnl 2153266072Sdesm4_pattern_allow([LT_OBJDIR])dnl 2154285206SdesAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2155285206Sdes [Define to the sub-directory where libtool stores uninstalled libraries.]) 2156266072Sdes])# _LT_CHECK_OBJDIR 2157266072Sdes 2158266072Sdes 2159266072Sdes# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2160266072Sdes# -------------------------------------- 2161266072Sdes# Check hardcoding attributes. 2162266072Sdesm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2163266072Sdes[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2164266072Sdes_LT_TAGVAR(hardcode_action, $1)= 2165266072Sdesif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2166266072Sdes test -n "$_LT_TAGVAR(runpath_var, $1)" || 2167285206Sdes test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2168266072Sdes 2169266072Sdes # We can hardcode non-existent directories. 2170285206Sdes if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2171266072Sdes # If the only mechanism to avoid hardcoding is shlibpath_var, we 2172266072Sdes # have to relink, otherwise we might link with an installed library 2173266072Sdes # when we should be linking with a yet-to-be-installed one 2174285206Sdes ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2175285206Sdes test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2176266072Sdes # Linking always hardcodes the temporary library directory. 2177266072Sdes _LT_TAGVAR(hardcode_action, $1)=relink 2178266072Sdes else 2179266072Sdes # We can link without hardcoding, and we can hardcode nonexisting dirs. 2180266072Sdes _LT_TAGVAR(hardcode_action, $1)=immediate 2181266072Sdes fi 2182266072Sdeselse 2183266072Sdes # We cannot hardcode anything, or else we can only hardcode existing 2184266072Sdes # directories. 2185266072Sdes _LT_TAGVAR(hardcode_action, $1)=unsupported 2186266072Sdesfi 2187266072SdesAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2188266072Sdes 2189285206Sdesif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2190285206Sdes test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2191266072Sdes # Fast installation is not supported 2192266072Sdes enable_fast_install=no 2193285206Sdeselif test yes = "$shlibpath_overrides_runpath" || 2194285206Sdes test no = "$enable_shared"; then 2195266072Sdes # Fast installation is not necessary 2196266072Sdes enable_fast_install=needless 2197266072Sdesfi 2198266072Sdes_LT_TAGDECL([], [hardcode_action], [0], 2199266072Sdes [How to hardcode a shared library path into an executable]) 2200266072Sdes])# _LT_LINKER_HARDCODE_LIBPATH 2201266072Sdes 2202266072Sdes 2203266072Sdes# _LT_CMD_STRIPLIB 2204266072Sdes# ---------------- 2205266072Sdesm4_defun([_LT_CMD_STRIPLIB], 2206266072Sdes[m4_require([_LT_DECL_EGREP]) 2207266072Sdesstriplib= 2208266072Sdesold_striplib= 2209266072SdesAC_MSG_CHECKING([whether stripping libraries is possible]) 2210266072Sdesif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2211266072Sdes test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2212266072Sdes test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2213266072Sdes AC_MSG_RESULT([yes]) 2214266072Sdeselse 2215266072Sdes# FIXME - insert some real tests, host_os isn't really good enough 2216266072Sdes case $host_os in 2217266072Sdes darwin*) 2218285206Sdes if test -n "$STRIP"; then 2219266072Sdes striplib="$STRIP -x" 2220266072Sdes old_striplib="$STRIP -S" 2221266072Sdes AC_MSG_RESULT([yes]) 2222266072Sdes else 2223266072Sdes AC_MSG_RESULT([no]) 2224266072Sdes fi 2225266072Sdes ;; 2226266072Sdes *) 2227266072Sdes AC_MSG_RESULT([no]) 2228266072Sdes ;; 2229266072Sdes esac 2230266072Sdesfi 2231266072Sdes_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2232266072Sdes_LT_DECL([], [striplib], [1]) 2233266072Sdes])# _LT_CMD_STRIPLIB 2234266072Sdes 2235266072Sdes 2236285206Sdes# _LT_PREPARE_MUNGE_PATH_LIST 2237285206Sdes# --------------------------- 2238285206Sdes# Make sure func_munge_path_list() is defined correctly. 2239285206Sdesm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2240285206Sdes[[# func_munge_path_list VARIABLE PATH 2241285206Sdes# ----------------------------------- 2242285206Sdes# VARIABLE is name of variable containing _space_ separated list of 2243285206Sdes# directories to be munged by the contents of PATH, which is string 2244285206Sdes# having a format: 2245285206Sdes# "DIR[:DIR]:" 2246285206Sdes# string "DIR[ DIR]" will be prepended to VARIABLE 2247285206Sdes# ":DIR[:DIR]" 2248285206Sdes# string "DIR[ DIR]" will be appended to VARIABLE 2249285206Sdes# "DIRP[:DIRP]::[DIRA:]DIRA" 2250285206Sdes# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2251285206Sdes# "DIRA[ DIRA]" will be appended to VARIABLE 2252285206Sdes# "DIR[:DIR]" 2253285206Sdes# VARIABLE will be replaced by "DIR[ DIR]" 2254285206Sdesfunc_munge_path_list () 2255285206Sdes{ 2256285206Sdes case x@S|@2 in 2257285206Sdes x) 2258285206Sdes ;; 2259285206Sdes *:) 2260285206Sdes eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2261285206Sdes ;; 2262285206Sdes x:*) 2263285206Sdes eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2264285206Sdes ;; 2265285206Sdes *::*) 2266285206Sdes eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2267285206Sdes eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2268285206Sdes ;; 2269285206Sdes *) 2270285206Sdes eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2271285206Sdes ;; 2272285206Sdes esac 2273285206Sdes} 2274285206Sdes]])# _LT_PREPARE_PATH_LIST 2275285206Sdes 2276285206Sdes 2277266072Sdes# _LT_SYS_DYNAMIC_LINKER([TAG]) 2278266072Sdes# ----------------------------- 2279266072Sdes# PORTME Fill in your ld.so characteristics 2280266072Sdesm4_defun([_LT_SYS_DYNAMIC_LINKER], 2281266072Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2282266072Sdesm4_require([_LT_DECL_EGREP])dnl 2283266072Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2284266072Sdesm4_require([_LT_DECL_OBJDUMP])dnl 2285266072Sdesm4_require([_LT_DECL_SED])dnl 2286266072Sdesm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2287285206Sdesm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2288266072SdesAC_MSG_CHECKING([dynamic linker characteristics]) 2289266072Sdesm4_if([$1], 2290266072Sdes [], [ 2291285206Sdesif test yes = "$GCC"; then 2292266072Sdes case $host_os in 2293285206Sdes darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2294285206Sdes *) lt_awk_arg='/^libraries:/' ;; 2295266072Sdes esac 2296266072Sdes case $host_os in 2297285206Sdes mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2298285206Sdes *) lt_sed_strip_eq='s|=/|/|g' ;; 2299266072Sdes esac 2300266072Sdes lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2301266072Sdes case $lt_search_path_spec in 2302266072Sdes *\;*) 2303266072Sdes # if the path contains ";" then we assume it to be the separator 2304266072Sdes # otherwise default to the standard path separator (i.e. ":") - it is 2305266072Sdes # assumed that no part of a normal pathname contains ";" but that should 2306266072Sdes # okay in the real world where ";" in dirpaths is itself problematic. 2307266072Sdes lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2308266072Sdes ;; 2309266072Sdes *) 2310266072Sdes lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2311266072Sdes ;; 2312266072Sdes esac 2313266072Sdes # Ok, now we have the path, separated by spaces, we can step through it 2314285206Sdes # and add multilib dir if necessary... 2315266072Sdes lt_tmp_lt_search_path_spec= 2316285206Sdes lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2317285206Sdes # ...but if some path component already ends with the multilib dir we assume 2318285206Sdes # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2319285206Sdes case "$lt_multi_os_dir; $lt_search_path_spec " in 2320285206Sdes "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2321285206Sdes lt_multi_os_dir= 2322285206Sdes ;; 2323285206Sdes esac 2324266072Sdes for lt_sys_path in $lt_search_path_spec; do 2325285206Sdes if test -d "$lt_sys_path$lt_multi_os_dir"; then 2326285206Sdes lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2327285206Sdes elif test -n "$lt_multi_os_dir"; then 2328266072Sdes test -d "$lt_sys_path" && \ 2329266072Sdes lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2330266072Sdes fi 2331266072Sdes done 2332266072Sdes lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2333285206SdesBEGIN {RS = " "; FS = "/|\n";} { 2334285206Sdes lt_foo = ""; 2335285206Sdes lt_count = 0; 2336266072Sdes for (lt_i = NF; lt_i > 0; lt_i--) { 2337266072Sdes if ($lt_i != "" && $lt_i != ".") { 2338266072Sdes if ($lt_i == "..") { 2339266072Sdes lt_count++; 2340266072Sdes } else { 2341266072Sdes if (lt_count == 0) { 2342285206Sdes lt_foo = "/" $lt_i lt_foo; 2343266072Sdes } else { 2344266072Sdes lt_count--; 2345266072Sdes } 2346266072Sdes } 2347266072Sdes } 2348266072Sdes } 2349266072Sdes if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2350266072Sdes if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2351266072Sdes}'` 2352266072Sdes # AWK program above erroneously prepends '/' to C:/dos/paths 2353266072Sdes # for these hosts. 2354266072Sdes case $host_os in 2355266072Sdes mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2356285206Sdes $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2357266072Sdes esac 2358266072Sdes sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2359266072Sdeselse 2360266072Sdes sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2361266072Sdesfi]) 2362266072Sdeslibrary_names_spec= 2363266072Sdeslibname_spec='lib$name' 2364266072Sdessoname_spec= 2365285206Sdesshrext_cmds=.so 2366266072Sdespostinstall_cmds= 2367266072Sdespostuninstall_cmds= 2368266072Sdesfinish_cmds= 2369266072Sdesfinish_eval= 2370266072Sdesshlibpath_var= 2371266072Sdesshlibpath_overrides_runpath=unknown 2372266072Sdesversion_type=none 2373266072Sdesdynamic_linker="$host_os ld.so" 2374266072Sdessys_lib_dlsearch_path_spec="/lib /usr/lib" 2375266072Sdesneed_lib_prefix=unknown 2376266072Sdeshardcode_into_libs=no 2377266072Sdes 2378266072Sdes# when you set need_version to no, make sure it does not cause -set_version 2379266072Sdes# flags to be left without arguments 2380266072Sdesneed_version=unknown 2381266072Sdes 2382285206SdesAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2383285206Sdes[User-defined run-time library search path.]) 2384285206Sdes 2385266072Sdescase $host_os in 2386266072Sdesaix3*) 2387266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 2388285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2389266072Sdes shlibpath_var=LIBPATH 2390266072Sdes 2391266072Sdes # AIX 3 has no versioning support, so we append a major version to the name. 2392285206Sdes soname_spec='$libname$release$shared_ext$major' 2393266072Sdes ;; 2394266072Sdes 2395266072Sdesaix[[4-9]]*) 2396266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 2397266072Sdes need_lib_prefix=no 2398266072Sdes need_version=no 2399266072Sdes hardcode_into_libs=yes 2400285206Sdes if test ia64 = "$host_cpu"; then 2401266072Sdes # AIX 5 supports IA64 2402285206Sdes library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2403266072Sdes shlibpath_var=LD_LIBRARY_PATH 2404266072Sdes else 2405266072Sdes # With GCC up to 2.95.x, collect2 would create an import file 2406266072Sdes # for dependence libraries. The import file would start with 2407285206Sdes # the line '#! .'. This would cause the generated library to 2408285206Sdes # depend on '.', always an invalid library. This was fixed in 2409266072Sdes # development snapshots of GCC prior to 3.0. 2410266072Sdes case $host_os in 2411266072Sdes aix4 | aix4.[[01]] | aix4.[[01]].*) 2412266072Sdes if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2413266072Sdes echo ' yes ' 2414285206Sdes echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2415266072Sdes : 2416266072Sdes else 2417266072Sdes can_build_shared=no 2418266072Sdes fi 2419266072Sdes ;; 2420266072Sdes esac 2421285206Sdes # Using Import Files as archive members, it is possible to support 2422285206Sdes # filename-based versioning of shared library archives on AIX. While 2423285206Sdes # this would work for both with and without runtime linking, it will 2424285206Sdes # prevent static linking of such archives. So we do filename-based 2425285206Sdes # shared library versioning with .so extension only, which is used 2426285206Sdes # when both runtime linking and shared linking is enabled. 2427285206Sdes # Unfortunately, runtime linking may impact performance, so we do 2428285206Sdes # not want this to be the default eventually. Also, we use the 2429285206Sdes # versioned .so libs for executables only if there is the -brtl 2430285206Sdes # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2431285206Sdes # To allow for filename-based versioning support, we need to create 2432285206Sdes # libNAME.so.V as an archive file, containing: 2433285206Sdes # *) an Import File, referring to the versioned filename of the 2434285206Sdes # archive as well as the shared archive member, telling the 2435285206Sdes # bitwidth (32 or 64) of that shared object, and providing the 2436285206Sdes # list of exported symbols of that shared object, eventually 2437285206Sdes # decorated with the 'weak' keyword 2438285206Sdes # *) the shared object with the F_LOADONLY flag set, to really avoid 2439285206Sdes # it being seen by the linker. 2440285206Sdes # At run time we better use the real file rather than another symlink, 2441285206Sdes # but for link time we create the symlink libNAME.so -> libNAME.so.V 2442285206Sdes 2443285206Sdes case $with_aix_soname,$aix_use_runtimelinking in 2444285206Sdes # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2445266072Sdes # soname into executable. Probably we can add versioning support to 2446266072Sdes # collect2, so additional links can be useful in future. 2447285206Sdes aix,yes) # traditional libtool 2448285206Sdes dynamic_linker='AIX unversionable lib.so' 2449266072Sdes # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2450266072Sdes # instead of lib<name>.a to let people know that these are not 2451266072Sdes # typical AIX shared libraries. 2452285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2453285206Sdes ;; 2454285206Sdes aix,no) # traditional AIX only 2455285206Sdes dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2456266072Sdes # We preserve .a as extension for shared libraries through AIX4.2 2457266072Sdes # and later when we are not doing run time linking. 2458285206Sdes library_names_spec='$libname$release.a $libname.a' 2459285206Sdes soname_spec='$libname$release$shared_ext$major' 2460285206Sdes ;; 2461285206Sdes svr4,*) # full svr4 only 2462285206Sdes dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2463285206Sdes library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2464285206Sdes # We do not specify a path in Import Files, so LIBPATH fires. 2465285206Sdes shlibpath_overrides_runpath=yes 2466285206Sdes ;; 2467285206Sdes *,yes) # both, prefer svr4 2468285206Sdes dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2469285206Sdes library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2470285206Sdes # unpreferred sharedlib libNAME.a needs extra handling 2471285206Sdes postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 2472285206Sdes postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 2473285206Sdes # We do not specify a path in Import Files, so LIBPATH fires. 2474285206Sdes shlibpath_overrides_runpath=yes 2475285206Sdes ;; 2476285206Sdes *,no) # both, prefer aix 2477285206Sdes dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2478285206Sdes library_names_spec='$libname$release.a $libname.a' 2479285206Sdes soname_spec='$libname$release$shared_ext$major' 2480285206Sdes # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2481285206Sdes postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 2482285206Sdes postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 2483285206Sdes ;; 2484285206Sdes esac 2485266072Sdes shlibpath_var=LIBPATH 2486266072Sdes fi 2487266072Sdes ;; 2488266072Sdes 2489266072Sdesamigaos*) 2490266072Sdes case $host_cpu in 2491266072Sdes powerpc) 2492266072Sdes # Since July 2007 AmigaOS4 officially supports .so libraries. 2493266072Sdes # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2494285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2495266072Sdes ;; 2496266072Sdes m68k) 2497266072Sdes library_names_spec='$libname.ixlibrary $libname.a' 2498266072Sdes # Create ${libname}_ixlibrary.a entries in /sys/libs. 2499285206Sdes finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 2500266072Sdes ;; 2501266072Sdes esac 2502266072Sdes ;; 2503266072Sdes 2504266072Sdesbeos*) 2505285206Sdes library_names_spec='$libname$shared_ext' 2506266072Sdes dynamic_linker="$host_os ld.so" 2507266072Sdes shlibpath_var=LIBRARY_PATH 2508266072Sdes ;; 2509266072Sdes 2510266072Sdesbsdi[[45]]*) 2511266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 2512266072Sdes need_version=no 2513285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2514285206Sdes soname_spec='$libname$release$shared_ext$major' 2515266072Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2516266072Sdes shlibpath_var=LD_LIBRARY_PATH 2517266072Sdes sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2518266072Sdes sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2519266072Sdes # the default ld.so.conf also contains /usr/contrib/lib and 2520266072Sdes # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2521266072Sdes # libtool to hard-code these into programs 2522266072Sdes ;; 2523266072Sdes 2524266072Sdescygwin* | mingw* | pw32* | cegcc*) 2525266072Sdes version_type=windows 2526285206Sdes shrext_cmds=.dll 2527266072Sdes need_version=no 2528266072Sdes need_lib_prefix=no 2529266072Sdes 2530266072Sdes case $GCC,$cc_basename in 2531266072Sdes yes,*) 2532266072Sdes # gcc 2533266072Sdes library_names_spec='$libname.dll.a' 2534266072Sdes # DLL is installed to $(libdir)/../bin by postinstall_cmds 2535285206Sdes postinstall_cmds='base_file=`basename \$file`~ 2536285206Sdes dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2537266072Sdes dldir=$destdir/`dirname \$dlpath`~ 2538266072Sdes test -d \$dldir || mkdir -p \$dldir~ 2539266072Sdes $install_prog $dir/$dlname \$dldir/$dlname~ 2540266072Sdes chmod a+x \$dldir/$dlname~ 2541266072Sdes if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2542266072Sdes eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2543266072Sdes fi' 2544266072Sdes postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2545266072Sdes dlpath=$dir/\$dldll~ 2546266072Sdes $RM \$dlpath' 2547266072Sdes shlibpath_overrides_runpath=yes 2548266072Sdes 2549266072Sdes case $host_os in 2550266072Sdes cygwin*) 2551266072Sdes # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2552285206Sdes soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2553266072Sdesm4_if([$1], [],[ 2554266072Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2555266072Sdes ;; 2556266072Sdes mingw* | cegcc*) 2557266072Sdes # MinGW DLLs use traditional 'lib' prefix 2558285206Sdes soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2559266072Sdes ;; 2560266072Sdes pw32*) 2561266072Sdes # pw32 DLLs use 'pw' prefix rather than 'lib' 2562285206Sdes library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2563266072Sdes ;; 2564266072Sdes esac 2565266072Sdes dynamic_linker='Win32 ld.exe' 2566266072Sdes ;; 2567266072Sdes 2568266072Sdes *,cl*) 2569266072Sdes # Native MSVC 2570266072Sdes libname_spec='$name' 2571285206Sdes soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2572285206Sdes library_names_spec='$libname.dll.lib' 2573266072Sdes 2574266072Sdes case $build_os in 2575266072Sdes mingw*) 2576266072Sdes sys_lib_search_path_spec= 2577266072Sdes lt_save_ifs=$IFS 2578266072Sdes IFS=';' 2579266072Sdes for lt_path in $LIB 2580266072Sdes do 2581266072Sdes IFS=$lt_save_ifs 2582266072Sdes # Let DOS variable expansion print the short 8.3 style file name. 2583266072Sdes lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2584266072Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2585266072Sdes done 2586266072Sdes IFS=$lt_save_ifs 2587266072Sdes # Convert to MSYS style. 2588266072Sdes sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2589266072Sdes ;; 2590266072Sdes cygwin*) 2591266072Sdes # Convert to unix form, then to dos form, then back to unix form 2592266072Sdes # but this time dos style (no spaces!) so that the unix form looks 2593266072Sdes # like /cygdrive/c/PROGRA~1:/cygdr... 2594266072Sdes sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2595266072Sdes sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2596266072Sdes sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2597266072Sdes ;; 2598266072Sdes *) 2599285206Sdes sys_lib_search_path_spec=$LIB 2600266072Sdes if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2601266072Sdes # It is most probably a Windows format PATH. 2602266072Sdes sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2603266072Sdes else 2604266072Sdes sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2605266072Sdes fi 2606266072Sdes # FIXME: find the short name or the path components, as spaces are 2607266072Sdes # common. (e.g. "Program Files" -> "PROGRA~1") 2608266072Sdes ;; 2609266072Sdes esac 2610266072Sdes 2611266072Sdes # DLL is installed to $(libdir)/../bin by postinstall_cmds 2612285206Sdes postinstall_cmds='base_file=`basename \$file`~ 2613285206Sdes dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2614266072Sdes dldir=$destdir/`dirname \$dlpath`~ 2615266072Sdes test -d \$dldir || mkdir -p \$dldir~ 2616266072Sdes $install_prog $dir/$dlname \$dldir/$dlname' 2617266072Sdes postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2618266072Sdes dlpath=$dir/\$dldll~ 2619266072Sdes $RM \$dlpath' 2620266072Sdes shlibpath_overrides_runpath=yes 2621266072Sdes dynamic_linker='Win32 link.exe' 2622266072Sdes ;; 2623266072Sdes 2624266072Sdes *) 2625266072Sdes # Assume MSVC wrapper 2626285206Sdes library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2627266072Sdes dynamic_linker='Win32 ld.exe' 2628266072Sdes ;; 2629266072Sdes esac 2630266072Sdes # FIXME: first we should search . and the directory the executable is in 2631266072Sdes shlibpath_var=PATH 2632266072Sdes ;; 2633266072Sdes 2634266072Sdesdarwin* | rhapsody*) 2635266072Sdes dynamic_linker="$host_os dyld" 2636266072Sdes version_type=darwin 2637266072Sdes need_lib_prefix=no 2638266072Sdes need_version=no 2639285206Sdes library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2640285206Sdes soname_spec='$libname$release$major$shared_ext' 2641266072Sdes shlibpath_overrides_runpath=yes 2642266072Sdes shlibpath_var=DYLD_LIBRARY_PATH 2643266072Sdes shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2644266072Sdesm4_if([$1], [],[ 2645266072Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2646266072Sdes sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2647266072Sdes ;; 2648266072Sdes 2649266072Sdesdgux*) 2650266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 2651266072Sdes need_lib_prefix=no 2652266072Sdes need_version=no 2653285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2654285206Sdes soname_spec='$libname$release$shared_ext$major' 2655266072Sdes shlibpath_var=LD_LIBRARY_PATH 2656266072Sdes ;; 2657266072Sdes 2658266072Sdesfreebsd* | dragonfly*) 2659266072Sdes # DragonFly does not have aout. When/if they implement a new 2660266072Sdes # versioning mechanism, adjust this. 2661266072Sdes if test -x /usr/bin/objformat; then 2662266072Sdes objformat=`/usr/bin/objformat` 2663266072Sdes else 2664266072Sdes case $host_os in 2665266072Sdes freebsd[[23]].*) objformat=aout ;; 2666266072Sdes *) objformat=elf ;; 2667266072Sdes esac 2668266072Sdes fi 2669266072Sdes version_type=freebsd-$objformat 2670266072Sdes case $version_type in 2671266072Sdes freebsd-elf*) 2672285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2673285206Sdes soname_spec='$libname$release$shared_ext$major' 2674266072Sdes need_version=no 2675266072Sdes need_lib_prefix=no 2676266072Sdes ;; 2677266072Sdes freebsd-*) 2678285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2679266072Sdes need_version=yes 2680266072Sdes ;; 2681266072Sdes esac 2682266072Sdes shlibpath_var=LD_LIBRARY_PATH 2683266072Sdes case $host_os in 2684266072Sdes freebsd2.*) 2685266072Sdes shlibpath_overrides_runpath=yes 2686266072Sdes ;; 2687266072Sdes freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2688266072Sdes shlibpath_overrides_runpath=yes 2689266072Sdes hardcode_into_libs=yes 2690266072Sdes ;; 2691266072Sdes freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2692266072Sdes freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2693266072Sdes shlibpath_overrides_runpath=no 2694266072Sdes hardcode_into_libs=yes 2695266072Sdes ;; 2696266072Sdes *) # from 4.6 on, and DragonFly 2697266072Sdes shlibpath_overrides_runpath=yes 2698266072Sdes hardcode_into_libs=yes 2699266072Sdes ;; 2700266072Sdes esac 2701266072Sdes ;; 2702266072Sdes 2703266072Sdeshaiku*) 2704266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 2705266072Sdes need_lib_prefix=no 2706266072Sdes need_version=no 2707266072Sdes dynamic_linker="$host_os runtime_loader" 2708285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2709285206Sdes soname_spec='$libname$release$shared_ext$major' 2710266072Sdes shlibpath_var=LIBRARY_PATH 2711285206Sdes shlibpath_overrides_runpath=no 2712266072Sdes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2713266072Sdes hardcode_into_libs=yes 2714266072Sdes ;; 2715266072Sdes 2716266072Sdeshpux9* | hpux10* | hpux11*) 2717266072Sdes # Give a soname corresponding to the major version so that dld.sl refuses to 2718266072Sdes # link against other versions. 2719266072Sdes version_type=sunos 2720266072Sdes need_lib_prefix=no 2721266072Sdes need_version=no 2722266072Sdes case $host_cpu in 2723266072Sdes ia64*) 2724266072Sdes shrext_cmds='.so' 2725266072Sdes hardcode_into_libs=yes 2726266072Sdes dynamic_linker="$host_os dld.so" 2727266072Sdes shlibpath_var=LD_LIBRARY_PATH 2728266072Sdes shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2729285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2730285206Sdes soname_spec='$libname$release$shared_ext$major' 2731285206Sdes if test 32 = "$HPUX_IA64_MODE"; then 2732266072Sdes sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2733285206Sdes sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2734266072Sdes else 2735266072Sdes sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2736285206Sdes sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2737266072Sdes fi 2738266072Sdes ;; 2739266072Sdes hppa*64*) 2740266072Sdes shrext_cmds='.sl' 2741266072Sdes hardcode_into_libs=yes 2742266072Sdes dynamic_linker="$host_os dld.sl" 2743266072Sdes shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2744266072Sdes shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2745285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2746285206Sdes soname_spec='$libname$release$shared_ext$major' 2747266072Sdes sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2748266072Sdes sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2749266072Sdes ;; 2750266072Sdes *) 2751266072Sdes shrext_cmds='.sl' 2752266072Sdes dynamic_linker="$host_os dld.sl" 2753266072Sdes shlibpath_var=SHLIB_PATH 2754266072Sdes shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2755285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2756285206Sdes soname_spec='$libname$release$shared_ext$major' 2757266072Sdes ;; 2758266072Sdes esac 2759266072Sdes # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2760266072Sdes postinstall_cmds='chmod 555 $lib' 2761266072Sdes # or fails outright, so override atomically: 2762266072Sdes install_override_mode=555 2763266072Sdes ;; 2764266072Sdes 2765266072Sdesinterix[[3-9]]*) 2766266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 2767266072Sdes need_lib_prefix=no 2768266072Sdes need_version=no 2769285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2770285206Sdes soname_spec='$libname$release$shared_ext$major' 2771266072Sdes dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2772266072Sdes shlibpath_var=LD_LIBRARY_PATH 2773266072Sdes shlibpath_overrides_runpath=no 2774266072Sdes hardcode_into_libs=yes 2775266072Sdes ;; 2776266072Sdes 2777266072Sdesirix5* | irix6* | nonstopux*) 2778266072Sdes case $host_os in 2779266072Sdes nonstopux*) version_type=nonstopux ;; 2780266072Sdes *) 2781285206Sdes if test yes = "$lt_cv_prog_gnu_ld"; then 2782266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 2783266072Sdes else 2784266072Sdes version_type=irix 2785266072Sdes fi ;; 2786266072Sdes esac 2787266072Sdes need_lib_prefix=no 2788266072Sdes need_version=no 2789285206Sdes soname_spec='$libname$release$shared_ext$major' 2790285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2791266072Sdes case $host_os in 2792266072Sdes irix5* | nonstopux*) 2793266072Sdes libsuff= shlibsuff= 2794266072Sdes ;; 2795266072Sdes *) 2796266072Sdes case $LD in # libtool.m4 will add one of these switches to LD 2797266072Sdes *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2798266072Sdes libsuff= shlibsuff= libmagic=32-bit;; 2799266072Sdes *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2800266072Sdes libsuff=32 shlibsuff=N32 libmagic=N32;; 2801266072Sdes *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2802266072Sdes libsuff=64 shlibsuff=64 libmagic=64-bit;; 2803266072Sdes *) libsuff= shlibsuff= libmagic=never-match;; 2804266072Sdes esac 2805266072Sdes ;; 2806266072Sdes esac 2807266072Sdes shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2808266072Sdes shlibpath_overrides_runpath=no 2809285206Sdes sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2810285206Sdes sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2811266072Sdes hardcode_into_libs=yes 2812266072Sdes ;; 2813266072Sdes 2814266072Sdes# No shared lib support for Linux oldld, aout, or coff. 2815266072Sdeslinux*oldld* | linux*aout* | linux*coff*) 2816266072Sdes dynamic_linker=no 2817266072Sdes ;; 2818266072Sdes 2819285206Sdeslinux*android*) 2820285206Sdes version_type=none # Android doesn't support versioned libraries. 2821285206Sdes need_lib_prefix=no 2822285206Sdes need_version=no 2823285206Sdes library_names_spec='$libname$release$shared_ext' 2824285206Sdes soname_spec='$libname$release$shared_ext' 2825285206Sdes finish_cmds= 2826285206Sdes shlibpath_var=LD_LIBRARY_PATH 2827285206Sdes shlibpath_overrides_runpath=yes 2828285206Sdes 2829285206Sdes # This implies no fast_install, which is unacceptable. 2830285206Sdes # Some rework will be needed to allow for fast_install 2831285206Sdes # before this can be enabled. 2832285206Sdes hardcode_into_libs=yes 2833285206Sdes 2834285206Sdes dynamic_linker='Android linker' 2835285206Sdes # Don't embed -rpath directories since the linker doesn't support them. 2836285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2837285206Sdes ;; 2838285206Sdes 2839266072Sdes# This must be glibc/ELF. 2840285206Sdeslinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2841266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 2842266072Sdes need_lib_prefix=no 2843266072Sdes need_version=no 2844285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2845285206Sdes soname_spec='$libname$release$shared_ext$major' 2846266072Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2847266072Sdes shlibpath_var=LD_LIBRARY_PATH 2848266072Sdes shlibpath_overrides_runpath=no 2849266072Sdes 2850266072Sdes # Some binutils ld are patched to set DT_RUNPATH 2851266072Sdes AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2852266072Sdes [lt_cv_shlibpath_overrides_runpath=no 2853266072Sdes save_LDFLAGS=$LDFLAGS 2854266072Sdes save_libdir=$libdir 2855266072Sdes eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2856266072Sdes LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2857266072Sdes AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2858266072Sdes [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2859266072Sdes [lt_cv_shlibpath_overrides_runpath=yes])]) 2860266072Sdes LDFLAGS=$save_LDFLAGS 2861266072Sdes libdir=$save_libdir 2862266072Sdes ]) 2863266072Sdes shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2864266072Sdes 2865266072Sdes # This implies no fast_install, which is unacceptable. 2866266072Sdes # Some rework will be needed to allow for fast_install 2867266072Sdes # before this can be enabled. 2868266072Sdes hardcode_into_libs=yes 2869266072Sdes 2870285206Sdes # Ideally, we could use ldconfig to report *all* directores which are 2871285206Sdes # searched for libraries, however this is still not possible. Aside from not 2872285206Sdes # being certain /sbin/ldconfig is available, command 2873285206Sdes # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2874285206Sdes # even though it is searched at run-time. Try to do the best guess by 2875285206Sdes # appending ld.so.conf contents (and includes) to the search path. 2876266072Sdes if test -f /etc/ld.so.conf; then 2877266072Sdes 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' ' '` 2878266072Sdes sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2879266072Sdes fi 2880266072Sdes 2881266072Sdes # We used to test for /lib/ld.so.1 and disable shared libraries on 2882266072Sdes # powerpc, because MkLinux only supported shared libraries with the 2883266072Sdes # GNU dynamic linker. Since this was broken with cross compilers, 2884266072Sdes # most powerpc-linux boxes support dynamic linking these days and 2885266072Sdes # people can always --disable-shared, the test was removed, and we 2886266072Sdes # assume the GNU/Linux dynamic linker is in use. 2887266072Sdes dynamic_linker='GNU/Linux ld.so' 2888266072Sdes ;; 2889266072Sdes 2890266072Sdesnetbsd*) 2891266072Sdes version_type=sunos 2892266072Sdes need_lib_prefix=no 2893266072Sdes need_version=no 2894266072Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2895285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2896266072Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2897266072Sdes dynamic_linker='NetBSD (a.out) ld.so' 2898266072Sdes else 2899285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2900285206Sdes soname_spec='$libname$release$shared_ext$major' 2901266072Sdes dynamic_linker='NetBSD ld.elf_so' 2902266072Sdes fi 2903266072Sdes shlibpath_var=LD_LIBRARY_PATH 2904266072Sdes shlibpath_overrides_runpath=yes 2905266072Sdes hardcode_into_libs=yes 2906266072Sdes ;; 2907266072Sdes 2908266072Sdesnewsos6) 2909266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 2910285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2911266072Sdes shlibpath_var=LD_LIBRARY_PATH 2912266072Sdes shlibpath_overrides_runpath=yes 2913266072Sdes ;; 2914266072Sdes 2915266072Sdes*nto* | *qnx*) 2916266072Sdes version_type=qnx 2917266072Sdes need_lib_prefix=no 2918266072Sdes need_version=no 2919285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2920285206Sdes soname_spec='$libname$release$shared_ext$major' 2921266072Sdes shlibpath_var=LD_LIBRARY_PATH 2922266072Sdes shlibpath_overrides_runpath=no 2923266072Sdes hardcode_into_libs=yes 2924266072Sdes dynamic_linker='ldqnx.so' 2925266072Sdes ;; 2926266072Sdes 2927285206Sdesopenbsd* | bitrig*) 2928266072Sdes version_type=sunos 2929285206Sdes sys_lib_dlsearch_path_spec=/usr/lib 2930266072Sdes need_lib_prefix=no 2931285206Sdes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2932285206Sdes need_version=no 2933285206Sdes else 2934285206Sdes need_version=yes 2935285206Sdes fi 2936285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2937266072Sdes finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2938266072Sdes shlibpath_var=LD_LIBRARY_PATH 2939285206Sdes shlibpath_overrides_runpath=yes 2940266072Sdes ;; 2941266072Sdes 2942266072Sdesos2*) 2943266072Sdes libname_spec='$name' 2944285206Sdes version_type=windows 2945285206Sdes shrext_cmds=.dll 2946285206Sdes need_version=no 2947266072Sdes need_lib_prefix=no 2948285206Sdes # OS/2 can only load a DLL with a base name of 8 characters or less. 2949285206Sdes soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2950285206Sdes v=$($ECHO $release$versuffix | tr -d .-); 2951285206Sdes n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2952285206Sdes $ECHO $n$v`$shared_ext' 2953285206Sdes library_names_spec='${libname}_dll.$libext' 2954266072Sdes dynamic_linker='OS/2 ld.exe' 2955285206Sdes shlibpath_var=BEGINLIBPATH 2956285206Sdes sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2957285206Sdes sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2958285206Sdes postinstall_cmds='base_file=`basename \$file`~ 2959285206Sdes dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2960285206Sdes dldir=$destdir/`dirname \$dlpath`~ 2961285206Sdes test -d \$dldir || mkdir -p \$dldir~ 2962285206Sdes $install_prog $dir/$dlname \$dldir/$dlname~ 2963285206Sdes chmod a+x \$dldir/$dlname~ 2964285206Sdes if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2965285206Sdes eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2966285206Sdes fi' 2967285206Sdes postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2968285206Sdes dlpath=$dir/\$dldll~ 2969285206Sdes $RM \$dlpath' 2970266072Sdes ;; 2971266072Sdes 2972266072Sdesosf3* | osf4* | osf5*) 2973266072Sdes version_type=osf 2974266072Sdes need_lib_prefix=no 2975266072Sdes need_version=no 2976285206Sdes soname_spec='$libname$release$shared_ext$major' 2977285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2978266072Sdes shlibpath_var=LD_LIBRARY_PATH 2979266072Sdes sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2980285206Sdes sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2981266072Sdes ;; 2982266072Sdes 2983266072Sdesrdos*) 2984266072Sdes dynamic_linker=no 2985266072Sdes ;; 2986266072Sdes 2987266072Sdessolaris*) 2988266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 2989266072Sdes need_lib_prefix=no 2990266072Sdes need_version=no 2991285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2992285206Sdes soname_spec='$libname$release$shared_ext$major' 2993266072Sdes shlibpath_var=LD_LIBRARY_PATH 2994266072Sdes shlibpath_overrides_runpath=yes 2995266072Sdes hardcode_into_libs=yes 2996266072Sdes # ldd complains unless libraries are executable 2997266072Sdes postinstall_cmds='chmod +x $lib' 2998266072Sdes ;; 2999266072Sdes 3000266072Sdessunos4*) 3001266072Sdes version_type=sunos 3002285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3003266072Sdes finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3004266072Sdes shlibpath_var=LD_LIBRARY_PATH 3005266072Sdes shlibpath_overrides_runpath=yes 3006285206Sdes if test yes = "$with_gnu_ld"; then 3007266072Sdes need_lib_prefix=no 3008266072Sdes fi 3009266072Sdes need_version=yes 3010266072Sdes ;; 3011266072Sdes 3012266072Sdessysv4 | sysv4.3*) 3013266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 3014285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3015285206Sdes soname_spec='$libname$release$shared_ext$major' 3016266072Sdes shlibpath_var=LD_LIBRARY_PATH 3017266072Sdes case $host_vendor in 3018266072Sdes sni) 3019266072Sdes shlibpath_overrides_runpath=no 3020266072Sdes need_lib_prefix=no 3021266072Sdes runpath_var=LD_RUN_PATH 3022266072Sdes ;; 3023266072Sdes siemens) 3024266072Sdes need_lib_prefix=no 3025266072Sdes ;; 3026266072Sdes motorola) 3027266072Sdes need_lib_prefix=no 3028266072Sdes need_version=no 3029266072Sdes shlibpath_overrides_runpath=no 3030266072Sdes sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3031266072Sdes ;; 3032266072Sdes esac 3033266072Sdes ;; 3034266072Sdes 3035266072Sdessysv4*MP*) 3036285206Sdes if test -d /usr/nec; then 3037266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 3038285206Sdes library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3039285206Sdes soname_spec='$libname$shared_ext.$major' 3040266072Sdes shlibpath_var=LD_LIBRARY_PATH 3041266072Sdes fi 3042266072Sdes ;; 3043266072Sdes 3044266072Sdessysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3045285206Sdes version_type=sco 3046266072Sdes need_lib_prefix=no 3047266072Sdes need_version=no 3048285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3049285206Sdes soname_spec='$libname$release$shared_ext$major' 3050266072Sdes shlibpath_var=LD_LIBRARY_PATH 3051266072Sdes shlibpath_overrides_runpath=yes 3052266072Sdes hardcode_into_libs=yes 3053285206Sdes if test yes = "$with_gnu_ld"; then 3054266072Sdes sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3055266072Sdes else 3056266072Sdes sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3057266072Sdes case $host_os in 3058266072Sdes sco3.2v5*) 3059266072Sdes sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3060266072Sdes ;; 3061266072Sdes esac 3062266072Sdes fi 3063266072Sdes sys_lib_dlsearch_path_spec='/usr/lib' 3064266072Sdes ;; 3065266072Sdes 3066266072Sdestpf*) 3067266072Sdes # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3068266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 3069266072Sdes need_lib_prefix=no 3070266072Sdes need_version=no 3071285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3072266072Sdes shlibpath_var=LD_LIBRARY_PATH 3073266072Sdes shlibpath_overrides_runpath=no 3074266072Sdes hardcode_into_libs=yes 3075266072Sdes ;; 3076266072Sdes 3077266072Sdesuts4*) 3078266072Sdes version_type=linux # correct to gnu/linux during the next big refactor 3079285206Sdes library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3080285206Sdes soname_spec='$libname$release$shared_ext$major' 3081266072Sdes shlibpath_var=LD_LIBRARY_PATH 3082266072Sdes ;; 3083266072Sdes 3084266072Sdes*) 3085266072Sdes dynamic_linker=no 3086266072Sdes ;; 3087266072Sdesesac 3088266072SdesAC_MSG_RESULT([$dynamic_linker]) 3089285206Sdestest no = "$dynamic_linker" && can_build_shared=no 3090266072Sdes 3091266072Sdesvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3092285206Sdesif test yes = "$GCC"; then 3093266072Sdes variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3094266072Sdesfi 3095266072Sdes 3096285206Sdesif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3097285206Sdes sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3098266072Sdesfi 3099285206Sdes 3100285206Sdesif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3101285206Sdes sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3102266072Sdesfi 3103266072Sdes 3104285206Sdes# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3105285206Sdesconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3106285206Sdes 3107285206Sdes# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3108285206Sdesfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3109285206Sdes 3110285206Sdes# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3111285206Sdesconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3112285206Sdes 3113266072Sdes_LT_DECL([], [variables_saved_for_relink], [1], 3114266072Sdes [Variables whose values should be saved in libtool wrapper scripts and 3115266072Sdes restored at link time]) 3116266072Sdes_LT_DECL([], [need_lib_prefix], [0], 3117266072Sdes [Do we need the "lib" prefix for modules?]) 3118266072Sdes_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3119266072Sdes_LT_DECL([], [version_type], [0], [Library versioning type]) 3120266072Sdes_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3121266072Sdes_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3122266072Sdes_LT_DECL([], [shlibpath_overrides_runpath], [0], 3123266072Sdes [Is shlibpath searched before the hard-coded library search path?]) 3124266072Sdes_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3125266072Sdes_LT_DECL([], [library_names_spec], [1], 3126266072Sdes [[List of archive names. First name is the real one, the rest are links. 3127266072Sdes The last name is the one that the linker finds with -lNAME]]) 3128266072Sdes_LT_DECL([], [soname_spec], [1], 3129266072Sdes [[The coded name of the library, if different from the real name]]) 3130266072Sdes_LT_DECL([], [install_override_mode], [1], 3131266072Sdes [Permission mode override for installation of shared libraries]) 3132266072Sdes_LT_DECL([], [postinstall_cmds], [2], 3133266072Sdes [Command to use after installation of a shared archive]) 3134266072Sdes_LT_DECL([], [postuninstall_cmds], [2], 3135266072Sdes [Command to use after uninstallation of a shared archive]) 3136266072Sdes_LT_DECL([], [finish_cmds], [2], 3137266072Sdes [Commands used to finish a libtool library installation in a directory]) 3138266072Sdes_LT_DECL([], [finish_eval], [1], 3139266072Sdes [[As "finish_cmds", except a single script fragment to be evaled but 3140266072Sdes not shown]]) 3141266072Sdes_LT_DECL([], [hardcode_into_libs], [0], 3142266072Sdes [Whether we should hardcode library paths into libraries]) 3143266072Sdes_LT_DECL([], [sys_lib_search_path_spec], [2], 3144266072Sdes [Compile-time system search path for libraries]) 3145285206Sdes_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3146285206Sdes [Detected run-time system search path for libraries]) 3147285206Sdes_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3148285206Sdes [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3149266072Sdes])# _LT_SYS_DYNAMIC_LINKER 3150266072Sdes 3151266072Sdes 3152266072Sdes# _LT_PATH_TOOL_PREFIX(TOOL) 3153266072Sdes# -------------------------- 3154285206Sdes# find a file program that can recognize shared library 3155266072SdesAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3156266072Sdes[m4_require([_LT_DECL_EGREP])dnl 3157266072SdesAC_MSG_CHECKING([for $1]) 3158266072SdesAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3159266072Sdes[case $MAGIC_CMD in 3160266072Sdes[[\\/*] | ?:[\\/]*]) 3161285206Sdes lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3162266072Sdes ;; 3163266072Sdes*) 3164285206Sdes lt_save_MAGIC_CMD=$MAGIC_CMD 3165285206Sdes lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3166266072Sdesdnl $ac_dummy forces splitting on constant user-supplied paths. 3167266072Sdesdnl POSIX.2 word splitting is done only on the output of word expansions, 3168266072Sdesdnl not every word. This closes a longstanding sh security hole. 3169266072Sdes ac_dummy="m4_if([$2], , $PATH, [$2])" 3170266072Sdes for ac_dir in $ac_dummy; do 3171285206Sdes IFS=$lt_save_ifs 3172266072Sdes test -z "$ac_dir" && ac_dir=. 3173285206Sdes if test -f "$ac_dir/$1"; then 3174285206Sdes lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3175266072Sdes if test -n "$file_magic_test_file"; then 3176266072Sdes case $deplibs_check_method in 3177266072Sdes "file_magic "*) 3178266072Sdes file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3179285206Sdes MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3180266072Sdes if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3181266072Sdes $EGREP "$file_magic_regex" > /dev/null; then 3182266072Sdes : 3183266072Sdes else 3184266072Sdes cat <<_LT_EOF 1>&2 3185266072Sdes 3186266072Sdes*** Warning: the command libtool uses to detect shared libraries, 3187266072Sdes*** $file_magic_cmd, produces output that libtool cannot recognize. 3188266072Sdes*** The result is that libtool may fail to recognize shared libraries 3189266072Sdes*** as such. This will affect the creation of libtool libraries that 3190266072Sdes*** depend on shared libraries, but programs linked with such libtool 3191266072Sdes*** libraries will work regardless of this problem. Nevertheless, you 3192266072Sdes*** may want to report the problem to your system manager and/or to 3193266072Sdes*** bug-libtool@gnu.org 3194266072Sdes 3195266072Sdes_LT_EOF 3196266072Sdes fi ;; 3197266072Sdes esac 3198266072Sdes fi 3199266072Sdes break 3200266072Sdes fi 3201266072Sdes done 3202285206Sdes IFS=$lt_save_ifs 3203285206Sdes MAGIC_CMD=$lt_save_MAGIC_CMD 3204266072Sdes ;; 3205266072Sdesesac]) 3206285206SdesMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3207266072Sdesif test -n "$MAGIC_CMD"; then 3208266072Sdes AC_MSG_RESULT($MAGIC_CMD) 3209266072Sdeselse 3210266072Sdes AC_MSG_RESULT(no) 3211266072Sdesfi 3212266072Sdes_LT_DECL([], [MAGIC_CMD], [0], 3213266072Sdes [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3214266072Sdes])# _LT_PATH_TOOL_PREFIX 3215266072Sdes 3216266072Sdes# Old name: 3217266072SdesAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3218266072Sdesdnl aclocal-1.4 backwards compatibility: 3219266072Sdesdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3220266072Sdes 3221266072Sdes 3222266072Sdes# _LT_PATH_MAGIC 3223266072Sdes# -------------- 3224285206Sdes# find a file program that can recognize a shared library 3225266072Sdesm4_defun([_LT_PATH_MAGIC], 3226266072Sdes[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3227266072Sdesif test -z "$lt_cv_path_MAGIC_CMD"; then 3228266072Sdes if test -n "$ac_tool_prefix"; then 3229266072Sdes _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3230266072Sdes else 3231266072Sdes MAGIC_CMD=: 3232266072Sdes fi 3233266072Sdesfi 3234266072Sdes])# _LT_PATH_MAGIC 3235266072Sdes 3236266072Sdes 3237266072Sdes# LT_PATH_LD 3238266072Sdes# ---------- 3239266072Sdes# find the pathname to the GNU or non-GNU linker 3240266072SdesAC_DEFUN([LT_PATH_LD], 3241266072Sdes[AC_REQUIRE([AC_PROG_CC])dnl 3242266072SdesAC_REQUIRE([AC_CANONICAL_HOST])dnl 3243266072SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3244266072Sdesm4_require([_LT_DECL_SED])dnl 3245266072Sdesm4_require([_LT_DECL_EGREP])dnl 3246266072Sdesm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3247266072Sdes 3248266072SdesAC_ARG_WITH([gnu-ld], 3249266072Sdes [AS_HELP_STRING([--with-gnu-ld], 3250266072Sdes [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3251285206Sdes [test no = "$withval" || with_gnu_ld=yes], 3252266072Sdes [with_gnu_ld=no])dnl 3253266072Sdes 3254266072Sdesac_prog=ld 3255285206Sdesif test yes = "$GCC"; then 3256266072Sdes # Check if gcc -print-prog-name=ld gives a path. 3257266072Sdes AC_MSG_CHECKING([for ld used by $CC]) 3258266072Sdes case $host in 3259266072Sdes *-*-mingw*) 3260285206Sdes # gcc leaves a trailing carriage return, which upsets mingw 3261266072Sdes ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3262266072Sdes *) 3263266072Sdes ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3264266072Sdes esac 3265266072Sdes case $ac_prog in 3266266072Sdes # Accept absolute paths. 3267266072Sdes [[\\/]]* | ?:[[\\/]]*) 3268266072Sdes re_direlt='/[[^/]][[^/]]*/\.\./' 3269266072Sdes # Canonicalize the pathname of ld 3270266072Sdes ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3271266072Sdes while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3272266072Sdes ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3273266072Sdes done 3274285206Sdes test -z "$LD" && LD=$ac_prog 3275266072Sdes ;; 3276266072Sdes "") 3277266072Sdes # If it fails, then pretend we aren't using GCC. 3278266072Sdes ac_prog=ld 3279266072Sdes ;; 3280266072Sdes *) 3281266072Sdes # If it is relative, then search for the first ld in PATH. 3282266072Sdes with_gnu_ld=unknown 3283266072Sdes ;; 3284266072Sdes esac 3285285206Sdeselif test yes = "$with_gnu_ld"; then 3286266072Sdes AC_MSG_CHECKING([for GNU ld]) 3287266072Sdeselse 3288266072Sdes AC_MSG_CHECKING([for non-GNU ld]) 3289266072Sdesfi 3290266072SdesAC_CACHE_VAL(lt_cv_path_LD, 3291266072Sdes[if test -z "$LD"; then 3292285206Sdes lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3293266072Sdes for ac_dir in $PATH; do 3294285206Sdes IFS=$lt_save_ifs 3295266072Sdes test -z "$ac_dir" && ac_dir=. 3296266072Sdes if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3297285206Sdes lt_cv_path_LD=$ac_dir/$ac_prog 3298266072Sdes # Check to see if the program is GNU ld. I'd rather use --version, 3299266072Sdes # but apparently some variants of GNU ld only accept -v. 3300266072Sdes # Break only if it was the GNU/non-GNU ld that we prefer. 3301266072Sdes case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3302266072Sdes *GNU* | *'with BFD'*) 3303285206Sdes test no != "$with_gnu_ld" && break 3304266072Sdes ;; 3305266072Sdes *) 3306285206Sdes test yes != "$with_gnu_ld" && break 3307266072Sdes ;; 3308266072Sdes esac 3309266072Sdes fi 3310266072Sdes done 3311285206Sdes IFS=$lt_save_ifs 3312266072Sdeselse 3313285206Sdes lt_cv_path_LD=$LD # Let the user override the test with a path. 3314266072Sdesfi]) 3315285206SdesLD=$lt_cv_path_LD 3316266072Sdesif test -n "$LD"; then 3317266072Sdes AC_MSG_RESULT($LD) 3318266072Sdeselse 3319266072Sdes AC_MSG_RESULT(no) 3320266072Sdesfi 3321266072Sdestest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3322266072Sdes_LT_PATH_LD_GNU 3323266072SdesAC_SUBST([LD]) 3324266072Sdes 3325266072Sdes_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3326266072Sdes])# LT_PATH_LD 3327266072Sdes 3328266072Sdes# Old names: 3329266072SdesAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3330266072SdesAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3331266072Sdesdnl aclocal-1.4 backwards compatibility: 3332266072Sdesdnl AC_DEFUN([AM_PROG_LD], []) 3333266072Sdesdnl AC_DEFUN([AC_PROG_LD], []) 3334266072Sdes 3335266072Sdes 3336266072Sdes# _LT_PATH_LD_GNU 3337266072Sdes#- -------------- 3338266072Sdesm4_defun([_LT_PATH_LD_GNU], 3339266072Sdes[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3340266072Sdes[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3341266072Sdescase `$LD -v 2>&1 </dev/null` in 3342266072Sdes*GNU* | *'with BFD'*) 3343266072Sdes lt_cv_prog_gnu_ld=yes 3344266072Sdes ;; 3345266072Sdes*) 3346266072Sdes lt_cv_prog_gnu_ld=no 3347266072Sdes ;; 3348266072Sdesesac]) 3349266072Sdeswith_gnu_ld=$lt_cv_prog_gnu_ld 3350266072Sdes])# _LT_PATH_LD_GNU 3351266072Sdes 3352266072Sdes 3353266072Sdes# _LT_CMD_RELOAD 3354266072Sdes# -------------- 3355266072Sdes# find reload flag for linker 3356266072Sdes# -- PORTME Some linkers may need a different reload flag. 3357266072Sdesm4_defun([_LT_CMD_RELOAD], 3358266072Sdes[AC_CACHE_CHECK([for $LD option to reload object files], 3359266072Sdes lt_cv_ld_reload_flag, 3360266072Sdes [lt_cv_ld_reload_flag='-r']) 3361266072Sdesreload_flag=$lt_cv_ld_reload_flag 3362266072Sdescase $reload_flag in 3363266072Sdes"" | " "*) ;; 3364266072Sdes*) reload_flag=" $reload_flag" ;; 3365266072Sdesesac 3366266072Sdesreload_cmds='$LD$reload_flag -o $output$reload_objs' 3367266072Sdescase $host_os in 3368266072Sdes cygwin* | mingw* | pw32* | cegcc*) 3369285206Sdes if test yes != "$GCC"; then 3370266072Sdes reload_cmds=false 3371266072Sdes fi 3372266072Sdes ;; 3373266072Sdes darwin*) 3374285206Sdes if test yes = "$GCC"; then 3375285206Sdes reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3376266072Sdes else 3377266072Sdes reload_cmds='$LD$reload_flag -o $output$reload_objs' 3378266072Sdes fi 3379266072Sdes ;; 3380266072Sdesesac 3381266072Sdes_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3382266072Sdes_LT_TAGDECL([], [reload_cmds], [2])dnl 3383266072Sdes])# _LT_CMD_RELOAD 3384266072Sdes 3385266072Sdes 3386285206Sdes# _LT_PATH_DD 3387285206Sdes# ----------- 3388285206Sdes# find a working dd 3389285206Sdesm4_defun([_LT_PATH_DD], 3390285206Sdes[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3391285206Sdes[printf 0123456789abcdef0123456789abcdef >conftest.i 3392285206Sdescat conftest.i conftest.i >conftest2.i 3393285206Sdes: ${lt_DD:=$DD} 3394285206SdesAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3395285206Sdes[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3396285206Sdes cmp -s conftest.i conftest.out \ 3397285206Sdes && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3398285206Sdesfi]) 3399285206Sdesrm -f conftest.i conftest2.i conftest.out]) 3400285206Sdes])# _LT_PATH_DD 3401285206Sdes 3402285206Sdes 3403285206Sdes# _LT_CMD_TRUNCATE 3404285206Sdes# ---------------- 3405285206Sdes# find command to truncate a binary pipe 3406285206Sdesm4_defun([_LT_CMD_TRUNCATE], 3407285206Sdes[m4_require([_LT_PATH_DD]) 3408285206SdesAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3409285206Sdes[printf 0123456789abcdef0123456789abcdef >conftest.i 3410285206Sdescat conftest.i conftest.i >conftest2.i 3411285206Sdeslt_cv_truncate_bin= 3412285206Sdesif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3413285206Sdes cmp -s conftest.i conftest.out \ 3414285206Sdes && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3415285206Sdesfi 3416285206Sdesrm -f conftest.i conftest2.i conftest.out 3417285206Sdestest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3418285206Sdes_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3419285206Sdes [Command to truncate a binary pipe]) 3420285206Sdes])# _LT_CMD_TRUNCATE 3421285206Sdes 3422285206Sdes 3423266072Sdes# _LT_CHECK_MAGIC_METHOD 3424266072Sdes# ---------------------- 3425266072Sdes# how to check for library dependencies 3426266072Sdes# -- PORTME fill in with the dynamic library characteristics 3427266072Sdesm4_defun([_LT_CHECK_MAGIC_METHOD], 3428266072Sdes[m4_require([_LT_DECL_EGREP]) 3429266072Sdesm4_require([_LT_DECL_OBJDUMP]) 3430266072SdesAC_CACHE_CHECK([how to recognize dependent libraries], 3431266072Sdeslt_cv_deplibs_check_method, 3432266072Sdes[lt_cv_file_magic_cmd='$MAGIC_CMD' 3433266072Sdeslt_cv_file_magic_test_file= 3434266072Sdeslt_cv_deplibs_check_method='unknown' 3435266072Sdes# Need to set the preceding variable on all platforms that support 3436266072Sdes# interlibrary dependencies. 3437266072Sdes# 'none' -- dependencies not supported. 3438285206Sdes# 'unknown' -- same as none, but documents that we really don't know. 3439266072Sdes# 'pass_all' -- all dependencies passed with no checks. 3440266072Sdes# 'test_compile' -- check by making test program. 3441266072Sdes# 'file_magic [[regex]]' -- check by looking for files in library path 3442285206Sdes# that responds to the $file_magic_cmd with a given extended regex. 3443285206Sdes# If you have 'file' or equivalent on your system and you're not sure 3444285206Sdes# whether 'pass_all' will *always* work, you probably want this one. 3445266072Sdes 3446266072Sdescase $host_os in 3447266072Sdesaix[[4-9]]*) 3448266072Sdes lt_cv_deplibs_check_method=pass_all 3449266072Sdes ;; 3450266072Sdes 3451266072Sdesbeos*) 3452266072Sdes lt_cv_deplibs_check_method=pass_all 3453266072Sdes ;; 3454266072Sdes 3455266072Sdesbsdi[[45]]*) 3456266072Sdes lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3457266072Sdes lt_cv_file_magic_cmd='/usr/bin/file -L' 3458266072Sdes lt_cv_file_magic_test_file=/shlib/libc.so 3459266072Sdes ;; 3460266072Sdes 3461266072Sdescygwin*) 3462266072Sdes # func_win32_libid is a shell function defined in ltmain.sh 3463266072Sdes lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3464266072Sdes lt_cv_file_magic_cmd='func_win32_libid' 3465266072Sdes ;; 3466266072Sdes 3467266072Sdesmingw* | pw32*) 3468266072Sdes # Base MSYS/MinGW do not provide the 'file' command needed by 3469266072Sdes # func_win32_libid shell function, so use a weaker test based on 'objdump', 3470266072Sdes # unless we find 'file', for example because we are cross-compiling. 3471285206Sdes if ( file / ) >/dev/null 2>&1; then 3472266072Sdes lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3473266072Sdes lt_cv_file_magic_cmd='func_win32_libid' 3474266072Sdes else 3475266072Sdes # Keep this pattern in sync with the one in func_win32_libid. 3476266072Sdes lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3477266072Sdes lt_cv_file_magic_cmd='$OBJDUMP -f' 3478266072Sdes fi 3479266072Sdes ;; 3480266072Sdes 3481266072Sdescegcc*) 3482266072Sdes # use the weaker test based on 'objdump'. See mingw*. 3483266072Sdes lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3484266072Sdes lt_cv_file_magic_cmd='$OBJDUMP -f' 3485266072Sdes ;; 3486266072Sdes 3487266072Sdesdarwin* | rhapsody*) 3488266072Sdes lt_cv_deplibs_check_method=pass_all 3489266072Sdes ;; 3490266072Sdes 3491266072Sdesfreebsd* | dragonfly*) 3492266072Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3493266072Sdes case $host_cpu in 3494266072Sdes i*86 ) 3495266072Sdes # Not sure whether the presence of OpenBSD here was a mistake. 3496266072Sdes # Let's accept both of them until this is cleared up. 3497266072Sdes lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3498266072Sdes lt_cv_file_magic_cmd=/usr/bin/file 3499266072Sdes lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3500266072Sdes ;; 3501266072Sdes esac 3502266072Sdes else 3503266072Sdes lt_cv_deplibs_check_method=pass_all 3504266072Sdes fi 3505266072Sdes ;; 3506266072Sdes 3507266072Sdeshaiku*) 3508266072Sdes lt_cv_deplibs_check_method=pass_all 3509266072Sdes ;; 3510266072Sdes 3511266072Sdeshpux10.20* | hpux11*) 3512266072Sdes lt_cv_file_magic_cmd=/usr/bin/file 3513266072Sdes case $host_cpu in 3514266072Sdes ia64*) 3515266072Sdes lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3516266072Sdes lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3517266072Sdes ;; 3518266072Sdes hppa*64*) 3519266072Sdes [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]'] 3520266072Sdes lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3521266072Sdes ;; 3522266072Sdes *) 3523266072Sdes lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3524266072Sdes lt_cv_file_magic_test_file=/usr/lib/libc.sl 3525266072Sdes ;; 3526266072Sdes esac 3527266072Sdes ;; 3528266072Sdes 3529266072Sdesinterix[[3-9]]*) 3530266072Sdes # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3531266072Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3532266072Sdes ;; 3533266072Sdes 3534266072Sdesirix5* | irix6* | nonstopux*) 3535266072Sdes case $LD in 3536266072Sdes *-32|*"-32 ") libmagic=32-bit;; 3537266072Sdes *-n32|*"-n32 ") libmagic=N32;; 3538266072Sdes *-64|*"-64 ") libmagic=64-bit;; 3539266072Sdes *) libmagic=never-match;; 3540266072Sdes esac 3541266072Sdes lt_cv_deplibs_check_method=pass_all 3542266072Sdes ;; 3543266072Sdes 3544266072Sdes# This must be glibc/ELF. 3545285206Sdeslinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3546266072Sdes lt_cv_deplibs_check_method=pass_all 3547266072Sdes ;; 3548266072Sdes 3549285206Sdesnetbsd*) 3550266072Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3551266072Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3552266072Sdes else 3553266072Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3554266072Sdes fi 3555266072Sdes ;; 3556266072Sdes 3557266072Sdesnewos6*) 3558266072Sdes lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3559266072Sdes lt_cv_file_magic_cmd=/usr/bin/file 3560266072Sdes lt_cv_file_magic_test_file=/usr/lib/libnls.so 3561266072Sdes ;; 3562266072Sdes 3563266072Sdes*nto* | *qnx*) 3564266072Sdes lt_cv_deplibs_check_method=pass_all 3565266072Sdes ;; 3566266072Sdes 3567285206Sdesopenbsd* | bitrig*) 3568285206Sdes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3569266072Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3570266072Sdes else 3571266072Sdes lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3572266072Sdes fi 3573266072Sdes ;; 3574266072Sdes 3575266072Sdesosf3* | osf4* | osf5*) 3576266072Sdes lt_cv_deplibs_check_method=pass_all 3577266072Sdes ;; 3578266072Sdes 3579266072Sdesrdos*) 3580266072Sdes lt_cv_deplibs_check_method=pass_all 3581266072Sdes ;; 3582266072Sdes 3583266072Sdessolaris*) 3584266072Sdes lt_cv_deplibs_check_method=pass_all 3585266072Sdes ;; 3586266072Sdes 3587266072Sdessysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3588266072Sdes lt_cv_deplibs_check_method=pass_all 3589266072Sdes ;; 3590266072Sdes 3591266072Sdessysv4 | sysv4.3*) 3592266072Sdes case $host_vendor in 3593266072Sdes motorola) 3594266072Sdes 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]]' 3595266072Sdes lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3596266072Sdes ;; 3597266072Sdes ncr) 3598266072Sdes lt_cv_deplibs_check_method=pass_all 3599266072Sdes ;; 3600266072Sdes sequent) 3601266072Sdes lt_cv_file_magic_cmd='/bin/file' 3602266072Sdes lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3603266072Sdes ;; 3604266072Sdes sni) 3605266072Sdes lt_cv_file_magic_cmd='/bin/file' 3606266072Sdes lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3607266072Sdes lt_cv_file_magic_test_file=/lib/libc.so 3608266072Sdes ;; 3609266072Sdes siemens) 3610266072Sdes lt_cv_deplibs_check_method=pass_all 3611266072Sdes ;; 3612266072Sdes pc) 3613266072Sdes lt_cv_deplibs_check_method=pass_all 3614266072Sdes ;; 3615266072Sdes esac 3616266072Sdes ;; 3617266072Sdes 3618266072Sdestpf*) 3619266072Sdes lt_cv_deplibs_check_method=pass_all 3620266072Sdes ;; 3621285206Sdesos2*) 3622285206Sdes lt_cv_deplibs_check_method=pass_all 3623285206Sdes ;; 3624266072Sdesesac 3625266072Sdes]) 3626266072Sdes 3627266072Sdesfile_magic_glob= 3628266072Sdeswant_nocaseglob=no 3629266072Sdesif test "$build" = "$host"; then 3630266072Sdes case $host_os in 3631266072Sdes mingw* | pw32*) 3632266072Sdes if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3633266072Sdes want_nocaseglob=yes 3634266072Sdes else 3635266072Sdes file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3636266072Sdes fi 3637266072Sdes ;; 3638266072Sdes esac 3639266072Sdesfi 3640266072Sdes 3641266072Sdesfile_magic_cmd=$lt_cv_file_magic_cmd 3642266072Sdesdeplibs_check_method=$lt_cv_deplibs_check_method 3643266072Sdestest -z "$deplibs_check_method" && deplibs_check_method=unknown 3644266072Sdes 3645266072Sdes_LT_DECL([], [deplibs_check_method], [1], 3646266072Sdes [Method to check whether dependent libraries are shared objects]) 3647266072Sdes_LT_DECL([], [file_magic_cmd], [1], 3648266072Sdes [Command to use when deplibs_check_method = "file_magic"]) 3649266072Sdes_LT_DECL([], [file_magic_glob], [1], 3650266072Sdes [How to find potential files when deplibs_check_method = "file_magic"]) 3651266072Sdes_LT_DECL([], [want_nocaseglob], [1], 3652266072Sdes [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3653266072Sdes])# _LT_CHECK_MAGIC_METHOD 3654266072Sdes 3655266072Sdes 3656266072Sdes# LT_PATH_NM 3657266072Sdes# ---------- 3658266072Sdes# find the pathname to a BSD- or MS-compatible name lister 3659266072SdesAC_DEFUN([LT_PATH_NM], 3660266072Sdes[AC_REQUIRE([AC_PROG_CC])dnl 3661266072SdesAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3662266072Sdes[if test -n "$NM"; then 3663266072Sdes # Let the user override the test. 3664285206Sdes lt_cv_path_NM=$NM 3665266072Sdeselse 3666285206Sdes lt_nm_to_check=${ac_tool_prefix}nm 3667266072Sdes if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3668266072Sdes lt_nm_to_check="$lt_nm_to_check nm" 3669266072Sdes fi 3670266072Sdes for lt_tmp_nm in $lt_nm_to_check; do 3671285206Sdes lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3672266072Sdes for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3673285206Sdes IFS=$lt_save_ifs 3674266072Sdes test -z "$ac_dir" && ac_dir=. 3675285206Sdes tmp_nm=$ac_dir/$lt_tmp_nm 3676285206Sdes if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3677266072Sdes # Check to see if the nm accepts a BSD-compat flag. 3678285206Sdes # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3679266072Sdes # nm: unknown option "B" ignored 3680266072Sdes # Tru64's nm complains that /dev/null is an invalid object file 3681285206Sdes # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3682285206Sdes case $build_os in 3683285206Sdes mingw*) lt_bad_file=conftest.nm/nofile ;; 3684285206Sdes *) lt_bad_file=/dev/null ;; 3685285206Sdes esac 3686285206Sdes case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3687285206Sdes *$lt_bad_file* | *'Invalid file or object type'*) 3688266072Sdes lt_cv_path_NM="$tmp_nm -B" 3689285206Sdes break 2 3690266072Sdes ;; 3691266072Sdes *) 3692266072Sdes case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3693266072Sdes */dev/null*) 3694266072Sdes lt_cv_path_NM="$tmp_nm -p" 3695285206Sdes break 2 3696266072Sdes ;; 3697266072Sdes *) 3698266072Sdes lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3699266072Sdes continue # so that we can try to find one that supports BSD flags 3700266072Sdes ;; 3701266072Sdes esac 3702266072Sdes ;; 3703266072Sdes esac 3704266072Sdes fi 3705266072Sdes done 3706285206Sdes IFS=$lt_save_ifs 3707266072Sdes done 3708266072Sdes : ${lt_cv_path_NM=no} 3709266072Sdesfi]) 3710285206Sdesif test no != "$lt_cv_path_NM"; then 3711285206Sdes NM=$lt_cv_path_NM 3712266072Sdeselse 3713266072Sdes # Didn't find any BSD compatible name lister, look for dumpbin. 3714266072Sdes if test -n "$DUMPBIN"; then : 3715266072Sdes # Let the user override the test. 3716266072Sdes else 3717266072Sdes AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3718285206Sdes case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3719266072Sdes *COFF*) 3720285206Sdes DUMPBIN="$DUMPBIN -symbols -headers" 3721266072Sdes ;; 3722266072Sdes *) 3723266072Sdes DUMPBIN=: 3724266072Sdes ;; 3725266072Sdes esac 3726266072Sdes fi 3727266072Sdes AC_SUBST([DUMPBIN]) 3728285206Sdes if test : != "$DUMPBIN"; then 3729285206Sdes NM=$DUMPBIN 3730266072Sdes fi 3731266072Sdesfi 3732266072Sdestest -z "$NM" && NM=nm 3733266072SdesAC_SUBST([NM]) 3734266072Sdes_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3735266072Sdes 3736266072SdesAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3737266072Sdes [lt_cv_nm_interface="BSD nm" 3738266072Sdes echo "int some_variable = 0;" > conftest.$ac_ext 3739266072Sdes (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3740266072Sdes (eval "$ac_compile" 2>conftest.err) 3741266072Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 3742266072Sdes (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3743266072Sdes (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3744266072Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 3745266072Sdes (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3746266072Sdes cat conftest.out >&AS_MESSAGE_LOG_FD 3747266072Sdes if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3748266072Sdes lt_cv_nm_interface="MS dumpbin" 3749266072Sdes fi 3750266072Sdes rm -f conftest*]) 3751266072Sdes])# LT_PATH_NM 3752266072Sdes 3753266072Sdes# Old names: 3754266072SdesAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3755266072SdesAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3756266072Sdesdnl aclocal-1.4 backwards compatibility: 3757266072Sdesdnl AC_DEFUN([AM_PROG_NM], []) 3758266072Sdesdnl AC_DEFUN([AC_PROG_NM], []) 3759266072Sdes 3760266072Sdes# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3761266072Sdes# -------------------------------- 3762266072Sdes# how to determine the name of the shared library 3763266072Sdes# associated with a specific link library. 3764266072Sdes# -- PORTME fill in with the dynamic library characteristics 3765266072Sdesm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3766266072Sdes[m4_require([_LT_DECL_EGREP]) 3767266072Sdesm4_require([_LT_DECL_OBJDUMP]) 3768266072Sdesm4_require([_LT_DECL_DLLTOOL]) 3769266072SdesAC_CACHE_CHECK([how to associate runtime and link libraries], 3770266072Sdeslt_cv_sharedlib_from_linklib_cmd, 3771266072Sdes[lt_cv_sharedlib_from_linklib_cmd='unknown' 3772266072Sdes 3773266072Sdescase $host_os in 3774266072Sdescygwin* | mingw* | pw32* | cegcc*) 3775285206Sdes # two different shell functions defined in ltmain.sh; 3776285206Sdes # decide which one to use based on capabilities of $DLLTOOL 3777266072Sdes case `$DLLTOOL --help 2>&1` in 3778266072Sdes *--identify-strict*) 3779266072Sdes lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3780266072Sdes ;; 3781266072Sdes *) 3782266072Sdes lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3783266072Sdes ;; 3784266072Sdes esac 3785266072Sdes ;; 3786266072Sdes*) 3787266072Sdes # fallback: assume linklib IS sharedlib 3788285206Sdes lt_cv_sharedlib_from_linklib_cmd=$ECHO 3789266072Sdes ;; 3790266072Sdesesac 3791266072Sdes]) 3792266072Sdessharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3793266072Sdestest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3794266072Sdes 3795266072Sdes_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3796266072Sdes [Command to associate shared and link libraries]) 3797266072Sdes])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3798266072Sdes 3799266072Sdes 3800266072Sdes# _LT_PATH_MANIFEST_TOOL 3801266072Sdes# ---------------------- 3802266072Sdes# locate the manifest tool 3803266072Sdesm4_defun([_LT_PATH_MANIFEST_TOOL], 3804266072Sdes[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3805266072Sdestest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3806266072SdesAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3807266072Sdes [lt_cv_path_mainfest_tool=no 3808266072Sdes echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3809266072Sdes $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3810266072Sdes cat conftest.err >&AS_MESSAGE_LOG_FD 3811266072Sdes if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3812266072Sdes lt_cv_path_mainfest_tool=yes 3813266072Sdes fi 3814266072Sdes rm -f conftest*]) 3815285206Sdesif test yes != "$lt_cv_path_mainfest_tool"; then 3816266072Sdes MANIFEST_TOOL=: 3817266072Sdesfi 3818266072Sdes_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3819266072Sdes])# _LT_PATH_MANIFEST_TOOL 3820266072Sdes 3821266072Sdes 3822285206Sdes# _LT_DLL_DEF_P([FILE]) 3823285206Sdes# --------------------- 3824285206Sdes# True iff FILE is a Windows DLL '.def' file. 3825285206Sdes# Keep in sync with func_dll_def_p in the libtool script 3826285206SdesAC_DEFUN([_LT_DLL_DEF_P], 3827285206Sdes[dnl 3828285206Sdes test DEF = "`$SED -n dnl 3829285206Sdes -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3830285206Sdes -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3831285206Sdes -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3832285206Sdes -e q dnl Only consider the first "real" line 3833285206Sdes $1`" dnl 3834285206Sdes])# _LT_DLL_DEF_P 3835285206Sdes 3836285206Sdes 3837266072Sdes# LT_LIB_M 3838266072Sdes# -------- 3839266072Sdes# check for math library 3840266072SdesAC_DEFUN([LT_LIB_M], 3841266072Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3842266072SdesLIBM= 3843266072Sdescase $host in 3844266072Sdes*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3845266072Sdes # These system don't have libm, or don't need it 3846266072Sdes ;; 3847266072Sdes*-ncr-sysv4.3*) 3848285206Sdes AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3849266072Sdes AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3850266072Sdes ;; 3851266072Sdes*) 3852285206Sdes AC_CHECK_LIB(m, cos, LIBM=-lm) 3853266072Sdes ;; 3854266072Sdesesac 3855266072SdesAC_SUBST([LIBM]) 3856266072Sdes])# LT_LIB_M 3857266072Sdes 3858266072Sdes# Old name: 3859266072SdesAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3860266072Sdesdnl aclocal-1.4 backwards compatibility: 3861266072Sdesdnl AC_DEFUN([AC_CHECK_LIBM], []) 3862266072Sdes 3863266072Sdes 3864266072Sdes# _LT_COMPILER_NO_RTTI([TAGNAME]) 3865266072Sdes# ------------------------------- 3866266072Sdesm4_defun([_LT_COMPILER_NO_RTTI], 3867266072Sdes[m4_require([_LT_TAG_COMPILER])dnl 3868266072Sdes 3869266072Sdes_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3870266072Sdes 3871285206Sdesif test yes = "$GCC"; then 3872266072Sdes case $cc_basename in 3873266072Sdes nvcc*) 3874266072Sdes _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3875266072Sdes *) 3876266072Sdes _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3877266072Sdes esac 3878266072Sdes 3879266072Sdes _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3880266072Sdes lt_cv_prog_compiler_rtti_exceptions, 3881266072Sdes [-fno-rtti -fno-exceptions], [], 3882266072Sdes [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3883266072Sdesfi 3884266072Sdes_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3885266072Sdes [Compiler flag to turn off builtin functions]) 3886266072Sdes])# _LT_COMPILER_NO_RTTI 3887266072Sdes 3888266072Sdes 3889266072Sdes# _LT_CMD_GLOBAL_SYMBOLS 3890266072Sdes# ---------------------- 3891266072Sdesm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3892266072Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3893266072SdesAC_REQUIRE([AC_PROG_CC])dnl 3894266072SdesAC_REQUIRE([AC_PROG_AWK])dnl 3895266072SdesAC_REQUIRE([LT_PATH_NM])dnl 3896266072SdesAC_REQUIRE([LT_PATH_LD])dnl 3897266072Sdesm4_require([_LT_DECL_SED])dnl 3898266072Sdesm4_require([_LT_DECL_EGREP])dnl 3899266072Sdesm4_require([_LT_TAG_COMPILER])dnl 3900266072Sdes 3901266072Sdes# Check for command to grab the raw symbol name followed by C symbol from nm. 3902266072SdesAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3903266072SdesAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3904266072Sdes[ 3905266072Sdes# These are sane defaults that work on at least a few old systems. 3906266072Sdes# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3907266072Sdes 3908266072Sdes# Character class describing NM global symbol codes. 3909266072Sdessymcode='[[BCDEGRST]]' 3910266072Sdes 3911266072Sdes# Regexp to match symbols that can be accessed directly from C. 3912266072Sdessympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3913266072Sdes 3914266072Sdes# Define system-specific variables. 3915266072Sdescase $host_os in 3916266072Sdesaix*) 3917266072Sdes symcode='[[BCDT]]' 3918266072Sdes ;; 3919266072Sdescygwin* | mingw* | pw32* | cegcc*) 3920266072Sdes symcode='[[ABCDGISTW]]' 3921266072Sdes ;; 3922266072Sdeshpux*) 3923285206Sdes if test ia64 = "$host_cpu"; then 3924266072Sdes symcode='[[ABCDEGRST]]' 3925266072Sdes fi 3926266072Sdes ;; 3927266072Sdesirix* | nonstopux*) 3928266072Sdes symcode='[[BCDEGRST]]' 3929266072Sdes ;; 3930266072Sdesosf*) 3931266072Sdes symcode='[[BCDEGQRST]]' 3932266072Sdes ;; 3933266072Sdessolaris*) 3934266072Sdes symcode='[[BDRT]]' 3935266072Sdes ;; 3936266072Sdessco3.2v5*) 3937266072Sdes symcode='[[DT]]' 3938266072Sdes ;; 3939266072Sdessysv4.2uw2*) 3940266072Sdes symcode='[[DT]]' 3941266072Sdes ;; 3942266072Sdessysv5* | sco5v6* | unixware* | OpenUNIX*) 3943266072Sdes symcode='[[ABDT]]' 3944266072Sdes ;; 3945266072Sdessysv4) 3946266072Sdes symcode='[[DFNSTU]]' 3947266072Sdes ;; 3948266072Sdesesac 3949266072Sdes 3950266072Sdes# If we're using GNU nm, then use its standard symbol codes. 3951266072Sdescase `$NM -V 2>&1` in 3952266072Sdes*GNU* | *'with BFD'*) 3953266072Sdes symcode='[[ABCDGIRSTW]]' ;; 3954266072Sdesesac 3955266072Sdes 3956285206Sdesif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3957285206Sdes # Gets list of data symbols to import. 3958285206Sdes lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3959285206Sdes # Adjust the below global symbol transforms to fixup imported variables. 3960285206Sdes lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3961285206Sdes lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3962285206Sdes lt_c_name_lib_hook="\ 3963285206Sdes -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3964285206Sdes -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3965285206Sdeselse 3966285206Sdes # Disable hooks by default. 3967285206Sdes lt_cv_sys_global_symbol_to_import= 3968285206Sdes lt_cdecl_hook= 3969285206Sdes lt_c_name_hook= 3970285206Sdes lt_c_name_lib_hook= 3971285206Sdesfi 3972285206Sdes 3973266072Sdes# Transform an extracted symbol line into a proper C declaration. 3974266072Sdes# Some systems (esp. on ia64) link data and code symbols differently, 3975266072Sdes# so use this general approach. 3976285206Sdeslt_cv_sys_global_symbol_to_cdecl="sed -n"\ 3977285206Sdes$lt_cdecl_hook\ 3978285206Sdes" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 3979285206Sdes" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 3980266072Sdes 3981266072Sdes# Transform an extracted symbol line into symbol name and symbol address 3982285206Sdeslt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 3983285206Sdes$lt_c_name_hook\ 3984285206Sdes" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 3985285206Sdes" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 3986266072Sdes 3987285206Sdes# Transform an extracted symbol line into symbol name with lib prefix and 3988285206Sdes# symbol address. 3989285206Sdeslt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 3990285206Sdes$lt_c_name_lib_hook\ 3991285206Sdes" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 3992285206Sdes" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 3993285206Sdes" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 3994285206Sdes 3995266072Sdes# Handle CRLF in mingw tool chain 3996266072Sdesopt_cr= 3997266072Sdescase $build_os in 3998266072Sdesmingw*) 3999266072Sdes opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4000266072Sdes ;; 4001266072Sdesesac 4002266072Sdes 4003266072Sdes# Try without a prefix underscore, then with it. 4004266072Sdesfor ac_symprfx in "" "_"; do 4005266072Sdes 4006266072Sdes # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4007266072Sdes symxfrm="\\1 $ac_symprfx\\2 \\2" 4008266072Sdes 4009266072Sdes # Write the raw and C identifiers. 4010266072Sdes if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4011285206Sdes # Fake it for dumpbin and say T for any non-static function, 4012285206Sdes # D for any global variable and I for any imported variable. 4013266072Sdes # Also find C++ and __fastcall symbols from MSVC++, 4014266072Sdes # which start with @ or ?. 4015266072Sdes lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4016266072Sdes" {last_section=section; section=\$ 3};"\ 4017266072Sdes" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4018266072Sdes" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4019285206Sdes" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4020285206Sdes" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4021285206Sdes" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4022266072Sdes" \$ 0!~/External *\|/{next};"\ 4023266072Sdes" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4024266072Sdes" {if(hide[section]) next};"\ 4025285206Sdes" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4026285206Sdes" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4027285206Sdes" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4028285206Sdes" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4029266072Sdes" ' prfx=^$ac_symprfx]" 4030266072Sdes else 4031266072Sdes lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4032266072Sdes fi 4033266072Sdes lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4034266072Sdes 4035266072Sdes # Check to see that the pipe works correctly. 4036266072Sdes pipe_works=no 4037266072Sdes 4038266072Sdes rm -f conftest* 4039266072Sdes cat > conftest.$ac_ext <<_LT_EOF 4040266072Sdes#ifdef __cplusplus 4041266072Sdesextern "C" { 4042266072Sdes#endif 4043266072Sdeschar nm_test_var; 4044266072Sdesvoid nm_test_func(void); 4045266072Sdesvoid nm_test_func(void){} 4046266072Sdes#ifdef __cplusplus 4047266072Sdes} 4048266072Sdes#endif 4049266072Sdesint main(){nm_test_var='a';nm_test_func();return(0);} 4050266072Sdes_LT_EOF 4051266072Sdes 4052266072Sdes if AC_TRY_EVAL(ac_compile); then 4053266072Sdes # Now try to grab the symbols. 4054266072Sdes nlist=conftest.nm 4055266072Sdes if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4056266072Sdes # Try sorting and uniquifying the output. 4057266072Sdes if sort "$nlist" | uniq > "$nlist"T; then 4058266072Sdes mv -f "$nlist"T "$nlist" 4059266072Sdes else 4060266072Sdes rm -f "$nlist"T 4061266072Sdes fi 4062266072Sdes 4063266072Sdes # Make sure that we snagged all the symbols we need. 4064266072Sdes if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4065266072Sdes if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4066266072Sdes cat <<_LT_EOF > conftest.$ac_ext 4067266072Sdes/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4068285206Sdes#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4069285206Sdes/* DATA imports from DLLs on WIN32 can't be const, because runtime 4070266072Sdes relocations are performed -- see ld's documentation on pseudo-relocs. */ 4071266072Sdes# define LT@&t@_DLSYM_CONST 4072285206Sdes#elif defined __osf__ 4073266072Sdes/* This system does not cope well with relocations in const data. */ 4074266072Sdes# define LT@&t@_DLSYM_CONST 4075266072Sdes#else 4076266072Sdes# define LT@&t@_DLSYM_CONST const 4077266072Sdes#endif 4078266072Sdes 4079266072Sdes#ifdef __cplusplus 4080266072Sdesextern "C" { 4081266072Sdes#endif 4082266072Sdes 4083266072Sdes_LT_EOF 4084266072Sdes # Now generate the symbol file. 4085266072Sdes eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4086266072Sdes 4087266072Sdes cat <<_LT_EOF >> conftest.$ac_ext 4088266072Sdes 4089266072Sdes/* The mapping between symbol names and symbols. */ 4090266072SdesLT@&t@_DLSYM_CONST struct { 4091266072Sdes const char *name; 4092266072Sdes void *address; 4093266072Sdes} 4094266072Sdeslt__PROGRAM__LTX_preloaded_symbols[[]] = 4095266072Sdes{ 4096266072Sdes { "@PROGRAM@", (void *) 0 }, 4097266072Sdes_LT_EOF 4098285206Sdes $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4099266072Sdes cat <<\_LT_EOF >> conftest.$ac_ext 4100266072Sdes {0, (void *) 0} 4101266072Sdes}; 4102266072Sdes 4103266072Sdes/* This works around a problem in FreeBSD linker */ 4104266072Sdes#ifdef FREEBSD_WORKAROUND 4105266072Sdesstatic const void *lt_preloaded_setup() { 4106266072Sdes return lt__PROGRAM__LTX_preloaded_symbols; 4107266072Sdes} 4108266072Sdes#endif 4109266072Sdes 4110266072Sdes#ifdef __cplusplus 4111266072Sdes} 4112266072Sdes#endif 4113266072Sdes_LT_EOF 4114266072Sdes # Now try linking the two files. 4115266072Sdes mv conftest.$ac_objext conftstm.$ac_objext 4116266072Sdes lt_globsym_save_LIBS=$LIBS 4117266072Sdes lt_globsym_save_CFLAGS=$CFLAGS 4118285206Sdes LIBS=conftstm.$ac_objext 4119266072Sdes CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4120285206Sdes if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4121266072Sdes pipe_works=yes 4122266072Sdes fi 4123266072Sdes LIBS=$lt_globsym_save_LIBS 4124266072Sdes CFLAGS=$lt_globsym_save_CFLAGS 4125266072Sdes else 4126266072Sdes echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4127266072Sdes fi 4128266072Sdes else 4129266072Sdes echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4130266072Sdes fi 4131266072Sdes else 4132266072Sdes echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4133266072Sdes fi 4134266072Sdes else 4135266072Sdes echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4136266072Sdes cat conftest.$ac_ext >&5 4137266072Sdes fi 4138266072Sdes rm -rf conftest* conftst* 4139266072Sdes 4140266072Sdes # Do not use the global_symbol_pipe unless it works. 4141285206Sdes if test yes = "$pipe_works"; then 4142266072Sdes break 4143266072Sdes else 4144266072Sdes lt_cv_sys_global_symbol_pipe= 4145266072Sdes fi 4146266072Sdesdone 4147266072Sdes]) 4148266072Sdesif test -z "$lt_cv_sys_global_symbol_pipe"; then 4149266072Sdes lt_cv_sys_global_symbol_to_cdecl= 4150266072Sdesfi 4151266072Sdesif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4152266072Sdes AC_MSG_RESULT(failed) 4153266072Sdeselse 4154266072Sdes AC_MSG_RESULT(ok) 4155266072Sdesfi 4156266072Sdes 4157266072Sdes# Response file support. 4158266072Sdesif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4159266072Sdes nm_file_list_spec='@' 4160266072Sdeselif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4161266072Sdes nm_file_list_spec='@' 4162266072Sdesfi 4163266072Sdes 4164266072Sdes_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4165266072Sdes [Take the output of nm and produce a listing of raw symbols and C names]) 4166266072Sdes_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4167266072Sdes [Transform the output of nm in a proper C declaration]) 4168285206Sdes_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4169285206Sdes [Transform the output of nm into a list of symbols to manually relocate]) 4170266072Sdes_LT_DECL([global_symbol_to_c_name_address], 4171266072Sdes [lt_cv_sys_global_symbol_to_c_name_address], [1], 4172266072Sdes [Transform the output of nm in a C name address pair]) 4173266072Sdes_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4174266072Sdes [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4175266072Sdes [Transform the output of nm in a C name address pair when lib prefix is needed]) 4176285206Sdes_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4177285206Sdes [The name lister interface]) 4178266072Sdes_LT_DECL([], [nm_file_list_spec], [1], 4179266072Sdes [Specify filename containing input files for $NM]) 4180266072Sdes]) # _LT_CMD_GLOBAL_SYMBOLS 4181266072Sdes 4182266072Sdes 4183266072Sdes# _LT_COMPILER_PIC([TAGNAME]) 4184266072Sdes# --------------------------- 4185266072Sdesm4_defun([_LT_COMPILER_PIC], 4186266072Sdes[m4_require([_LT_TAG_COMPILER])dnl 4187266072Sdes_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4188266072Sdes_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4189266072Sdes_LT_TAGVAR(lt_prog_compiler_static, $1)= 4190266072Sdes 4191266072Sdesm4_if([$1], [CXX], [ 4192266072Sdes # C++ specific cases for pic, static, wl, etc. 4193285206Sdes if test yes = "$GXX"; then 4194266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4195266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4196266072Sdes 4197266072Sdes case $host_os in 4198266072Sdes aix*) 4199266072Sdes # All AIX code is PIC. 4200285206Sdes if test ia64 = "$host_cpu"; then 4201266072Sdes # AIX 5 now supports IA64 processor 4202266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4203266072Sdes fi 4204285206Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4205266072Sdes ;; 4206266072Sdes 4207266072Sdes amigaos*) 4208266072Sdes case $host_cpu in 4209266072Sdes powerpc) 4210266072Sdes # see comment about AmigaOS4 .so support 4211266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4212266072Sdes ;; 4213266072Sdes m68k) 4214266072Sdes # FIXME: we need at least 68020 code to build shared libraries, but 4215285206Sdes # adding the '-m68020' flag to GCC prevents building anything better, 4216285206Sdes # like '-m68040'. 4217266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4218266072Sdes ;; 4219266072Sdes esac 4220266072Sdes ;; 4221266072Sdes 4222266072Sdes beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4223266072Sdes # PIC is the default for these OSes. 4224266072Sdes ;; 4225266072Sdes mingw* | cygwin* | os2* | pw32* | cegcc*) 4226266072Sdes # This hack is so that the source file can tell whether it is being 4227266072Sdes # built for inclusion in a dll (and should export symbols for example). 4228266072Sdes # Although the cygwin gcc ignores -fPIC, still need this for old-style 4229266072Sdes # (--disable-auto-import) libraries 4230266072Sdes m4_if([$1], [GCJ], [], 4231266072Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4232285206Sdes case $host_os in 4233285206Sdes os2*) 4234285206Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4235285206Sdes ;; 4236285206Sdes esac 4237266072Sdes ;; 4238266072Sdes darwin* | rhapsody*) 4239266072Sdes # PIC is the default on this platform 4240266072Sdes # Common symbols not allowed in MH_DYLIB files 4241266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4242266072Sdes ;; 4243266072Sdes *djgpp*) 4244266072Sdes # DJGPP does not support shared libraries at all 4245266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4246266072Sdes ;; 4247266072Sdes haiku*) 4248266072Sdes # PIC is the default for Haiku. 4249266072Sdes # The "-static" flag exists, but is broken. 4250266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)= 4251266072Sdes ;; 4252266072Sdes interix[[3-9]]*) 4253266072Sdes # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4254266072Sdes # Instead, we relocate shared libraries at runtime. 4255266072Sdes ;; 4256266072Sdes sysv4*MP*) 4257266072Sdes if test -d /usr/nec; then 4258266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4259266072Sdes fi 4260266072Sdes ;; 4261266072Sdes hpux*) 4262266072Sdes # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4263266072Sdes # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4264266072Sdes # sets the default TLS model and affects inlining. 4265266072Sdes case $host_cpu in 4266266072Sdes hppa*64*) 4267266072Sdes ;; 4268266072Sdes *) 4269266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4270266072Sdes ;; 4271266072Sdes esac 4272266072Sdes ;; 4273266072Sdes *qnx* | *nto*) 4274266072Sdes # QNX uses GNU C++, but need to define -shared option too, otherwise 4275266072Sdes # it will coredump. 4276266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4277266072Sdes ;; 4278266072Sdes *) 4279266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4280266072Sdes ;; 4281266072Sdes esac 4282266072Sdes else 4283266072Sdes case $host_os in 4284266072Sdes aix[[4-9]]*) 4285266072Sdes # All AIX code is PIC. 4286285206Sdes if test ia64 = "$host_cpu"; then 4287266072Sdes # AIX 5 now supports IA64 processor 4288266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4289266072Sdes else 4290266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4291266072Sdes fi 4292266072Sdes ;; 4293266072Sdes chorus*) 4294266072Sdes case $cc_basename in 4295266072Sdes cxch68*) 4296266072Sdes # Green Hills C++ Compiler 4297266072Sdes # _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" 4298266072Sdes ;; 4299266072Sdes esac 4300266072Sdes ;; 4301266072Sdes mingw* | cygwin* | os2* | pw32* | cegcc*) 4302266072Sdes # This hack is so that the source file can tell whether it is being 4303266072Sdes # built for inclusion in a dll (and should export symbols for example). 4304266072Sdes m4_if([$1], [GCJ], [], 4305266072Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4306266072Sdes ;; 4307266072Sdes dgux*) 4308266072Sdes case $cc_basename in 4309266072Sdes ec++*) 4310266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4311266072Sdes ;; 4312266072Sdes ghcx*) 4313266072Sdes # Green Hills C++ Compiler 4314266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4315266072Sdes ;; 4316266072Sdes *) 4317266072Sdes ;; 4318266072Sdes esac 4319266072Sdes ;; 4320266072Sdes freebsd* | dragonfly*) 4321266072Sdes # FreeBSD uses GNU C++ 4322266072Sdes ;; 4323266072Sdes hpux9* | hpux10* | hpux11*) 4324266072Sdes case $cc_basename in 4325266072Sdes CC*) 4326266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4327285206Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4328285206Sdes if test ia64 != "$host_cpu"; then 4329266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4330266072Sdes fi 4331266072Sdes ;; 4332266072Sdes aCC*) 4333266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4334285206Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4335266072Sdes case $host_cpu in 4336266072Sdes hppa*64*|ia64*) 4337266072Sdes # +Z the default 4338266072Sdes ;; 4339266072Sdes *) 4340266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4341266072Sdes ;; 4342266072Sdes esac 4343266072Sdes ;; 4344266072Sdes *) 4345266072Sdes ;; 4346266072Sdes esac 4347266072Sdes ;; 4348266072Sdes interix*) 4349266072Sdes # This is c89, which is MS Visual C++ (no shared libs) 4350266072Sdes # Anyone wants to do a port? 4351266072Sdes ;; 4352266072Sdes irix5* | irix6* | nonstopux*) 4353266072Sdes case $cc_basename in 4354266072Sdes CC*) 4355266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4356266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4357266072Sdes # CC pic flag -KPIC is the default. 4358266072Sdes ;; 4359266072Sdes *) 4360266072Sdes ;; 4361266072Sdes esac 4362266072Sdes ;; 4363285206Sdes linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4364266072Sdes case $cc_basename in 4365266072Sdes KCC*) 4366266072Sdes # KAI C++ Compiler 4367266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4368266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4369266072Sdes ;; 4370266072Sdes ecpc* ) 4371285206Sdes # old Intel C++ for x86_64, which still supported -KPIC. 4372266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4373266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4374266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4375266072Sdes ;; 4376266072Sdes icpc* ) 4377266072Sdes # Intel C++, used to be incompatible with GCC. 4378266072Sdes # ICC 10 doesn't accept -KPIC any more. 4379266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4380266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4381266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4382266072Sdes ;; 4383266072Sdes pgCC* | pgcpp*) 4384266072Sdes # Portland Group C++ compiler 4385266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4386266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4387266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4388266072Sdes ;; 4389266072Sdes cxx*) 4390266072Sdes # Compaq C++ 4391266072Sdes # Make sure the PIC flag is empty. It appears that all Alpha 4392266072Sdes # Linux and Compaq Tru64 Unix objects are PIC. 4393266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4394266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4395266072Sdes ;; 4396266072Sdes xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4397266072Sdes # IBM XL 8.0, 9.0 on PPC and BlueGene 4398266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4399266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4400266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4401266072Sdes ;; 4402266072Sdes *) 4403266072Sdes case `$CC -V 2>&1 | sed 5q` in 4404266072Sdes *Sun\ C*) 4405266072Sdes # Sun C++ 5.9 4406266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4407266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4409266072Sdes ;; 4410266072Sdes esac 4411266072Sdes ;; 4412266072Sdes esac 4413266072Sdes ;; 4414266072Sdes lynxos*) 4415266072Sdes ;; 4416266072Sdes m88k*) 4417266072Sdes ;; 4418266072Sdes mvs*) 4419266072Sdes case $cc_basename in 4420266072Sdes cxx*) 4421266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4422266072Sdes ;; 4423266072Sdes *) 4424266072Sdes ;; 4425266072Sdes esac 4426266072Sdes ;; 4427285206Sdes netbsd*) 4428266072Sdes ;; 4429266072Sdes *qnx* | *nto*) 4430266072Sdes # QNX uses GNU C++, but need to define -shared option too, otherwise 4431266072Sdes # it will coredump. 4432266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4433266072Sdes ;; 4434266072Sdes osf3* | osf4* | osf5*) 4435266072Sdes case $cc_basename in 4436266072Sdes KCC*) 4437266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4438266072Sdes ;; 4439266072Sdes RCC*) 4440266072Sdes # Rational C++ 2.4.1 4441266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4442266072Sdes ;; 4443266072Sdes cxx*) 4444266072Sdes # Digital/Compaq C++ 4445266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4446266072Sdes # Make sure the PIC flag is empty. It appears that all Alpha 4447266072Sdes # Linux and Compaq Tru64 Unix objects are PIC. 4448266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4449266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4450266072Sdes ;; 4451266072Sdes *) 4452266072Sdes ;; 4453266072Sdes esac 4454266072Sdes ;; 4455266072Sdes psos*) 4456266072Sdes ;; 4457266072Sdes solaris*) 4458266072Sdes case $cc_basename in 4459266072Sdes CC* | sunCC*) 4460266072Sdes # Sun C++ 4.2, 5.x and Centerline C++ 4461266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4462266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4463266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4464266072Sdes ;; 4465266072Sdes gcx*) 4466266072Sdes # Green Hills C++ Compiler 4467266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4468266072Sdes ;; 4469266072Sdes *) 4470266072Sdes ;; 4471266072Sdes esac 4472266072Sdes ;; 4473266072Sdes sunos4*) 4474266072Sdes case $cc_basename in 4475266072Sdes CC*) 4476266072Sdes # Sun C++ 4.x 4477266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4478266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4479266072Sdes ;; 4480266072Sdes lcc*) 4481266072Sdes # Lucid 4482266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4483266072Sdes ;; 4484266072Sdes *) 4485266072Sdes ;; 4486266072Sdes esac 4487266072Sdes ;; 4488266072Sdes sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4489266072Sdes case $cc_basename in 4490266072Sdes CC*) 4491266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4492266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4493266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4494266072Sdes ;; 4495266072Sdes esac 4496266072Sdes ;; 4497266072Sdes tandem*) 4498266072Sdes case $cc_basename in 4499266072Sdes NCC*) 4500266072Sdes # NonStop-UX NCC 3.20 4501266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4502266072Sdes ;; 4503266072Sdes *) 4504266072Sdes ;; 4505266072Sdes esac 4506266072Sdes ;; 4507266072Sdes vxworks*) 4508266072Sdes ;; 4509266072Sdes *) 4510266072Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4511266072Sdes ;; 4512266072Sdes esac 4513266072Sdes fi 4514266072Sdes], 4515266072Sdes[ 4516285206Sdes if test yes = "$GCC"; then 4517266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4518266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4519266072Sdes 4520266072Sdes case $host_os in 4521266072Sdes aix*) 4522266072Sdes # All AIX code is PIC. 4523285206Sdes if test ia64 = "$host_cpu"; then 4524266072Sdes # AIX 5 now supports IA64 processor 4525266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4526266072Sdes fi 4527285206Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4528266072Sdes ;; 4529266072Sdes 4530266072Sdes amigaos*) 4531266072Sdes case $host_cpu in 4532266072Sdes powerpc) 4533266072Sdes # see comment about AmigaOS4 .so support 4534266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4535266072Sdes ;; 4536266072Sdes m68k) 4537266072Sdes # FIXME: we need at least 68020 code to build shared libraries, but 4538285206Sdes # adding the '-m68020' flag to GCC prevents building anything better, 4539285206Sdes # like '-m68040'. 4540266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4541266072Sdes ;; 4542266072Sdes esac 4543266072Sdes ;; 4544266072Sdes 4545266072Sdes beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4546266072Sdes # PIC is the default for these OSes. 4547266072Sdes ;; 4548266072Sdes 4549266072Sdes mingw* | cygwin* | pw32* | os2* | cegcc*) 4550266072Sdes # This hack is so that the source file can tell whether it is being 4551266072Sdes # built for inclusion in a dll (and should export symbols for example). 4552266072Sdes # Although the cygwin gcc ignores -fPIC, still need this for old-style 4553266072Sdes # (--disable-auto-import) libraries 4554266072Sdes m4_if([$1], [GCJ], [], 4555266072Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4556285206Sdes case $host_os in 4557285206Sdes os2*) 4558285206Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4559285206Sdes ;; 4560285206Sdes esac 4561266072Sdes ;; 4562266072Sdes 4563266072Sdes darwin* | rhapsody*) 4564266072Sdes # PIC is the default on this platform 4565266072Sdes # Common symbols not allowed in MH_DYLIB files 4566266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4567266072Sdes ;; 4568266072Sdes 4569266072Sdes haiku*) 4570266072Sdes # PIC is the default for Haiku. 4571266072Sdes # The "-static" flag exists, but is broken. 4572266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)= 4573266072Sdes ;; 4574266072Sdes 4575266072Sdes hpux*) 4576266072Sdes # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4577266072Sdes # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4578266072Sdes # sets the default TLS model and affects inlining. 4579266072Sdes case $host_cpu in 4580266072Sdes hppa*64*) 4581266072Sdes # +Z the default 4582266072Sdes ;; 4583266072Sdes *) 4584266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4585266072Sdes ;; 4586266072Sdes esac 4587266072Sdes ;; 4588266072Sdes 4589266072Sdes interix[[3-9]]*) 4590266072Sdes # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4591266072Sdes # Instead, we relocate shared libraries at runtime. 4592266072Sdes ;; 4593266072Sdes 4594266072Sdes msdosdjgpp*) 4595266072Sdes # Just because we use GCC doesn't mean we suddenly get shared libraries 4596266072Sdes # on systems that don't support them. 4597266072Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4598266072Sdes enable_shared=no 4599266072Sdes ;; 4600266072Sdes 4601266072Sdes *nto* | *qnx*) 4602266072Sdes # QNX uses GNU C++, but need to define -shared option too, otherwise 4603266072Sdes # it will coredump. 4604266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4605266072Sdes ;; 4606266072Sdes 4607266072Sdes sysv4*MP*) 4608266072Sdes if test -d /usr/nec; then 4609266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4610266072Sdes fi 4611266072Sdes ;; 4612266072Sdes 4613266072Sdes *) 4614266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4615266072Sdes ;; 4616266072Sdes esac 4617266072Sdes 4618266072Sdes case $cc_basename in 4619266072Sdes nvcc*) # Cuda Compiler Driver 2.2 4620266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4621266072Sdes if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4622266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4623266072Sdes fi 4624266072Sdes ;; 4625266072Sdes esac 4626266072Sdes else 4627266072Sdes # PORTME Check for flag to pass linker flags through the system compiler. 4628266072Sdes case $host_os in 4629266072Sdes aix*) 4630266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4631285206Sdes if test ia64 = "$host_cpu"; then 4632266072Sdes # AIX 5 now supports IA64 processor 4633266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4634266072Sdes else 4635266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4636266072Sdes fi 4637266072Sdes ;; 4638266072Sdes 4639285206Sdes darwin* | rhapsody*) 4640285206Sdes # PIC is the default on this platform 4641285206Sdes # Common symbols not allowed in MH_DYLIB files 4642285206Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4643285206Sdes case $cc_basename in 4644285206Sdes nagfor*) 4645285206Sdes # NAG Fortran compiler 4646285206Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4647285206Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4648285206Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4649285206Sdes ;; 4650285206Sdes esac 4651285206Sdes ;; 4652285206Sdes 4653266072Sdes mingw* | cygwin* | pw32* | os2* | cegcc*) 4654266072Sdes # This hack is so that the source file can tell whether it is being 4655266072Sdes # built for inclusion in a dll (and should export symbols for example). 4656266072Sdes m4_if([$1], [GCJ], [], 4657266072Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4658285206Sdes case $host_os in 4659285206Sdes os2*) 4660285206Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4661285206Sdes ;; 4662285206Sdes esac 4663266072Sdes ;; 4664266072Sdes 4665266072Sdes hpux9* | hpux10* | hpux11*) 4666266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4667266072Sdes # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4668266072Sdes # not for PA HP-UX. 4669266072Sdes case $host_cpu in 4670266072Sdes hppa*64*|ia64*) 4671266072Sdes # +Z the default 4672266072Sdes ;; 4673266072Sdes *) 4674266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4675266072Sdes ;; 4676266072Sdes esac 4677266072Sdes # Is there a better lt_prog_compiler_static that works with the bundled CC? 4678285206Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4679266072Sdes ;; 4680266072Sdes 4681266072Sdes irix5* | irix6* | nonstopux*) 4682266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4683266072Sdes # PIC (with -KPIC) is the default. 4684266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4685266072Sdes ;; 4686266072Sdes 4687285206Sdes linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4688266072Sdes case $cc_basename in 4689285206Sdes # old Intel for x86_64, which still supported -KPIC. 4690266072Sdes ecc*) 4691266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4692266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4693266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4694266072Sdes ;; 4695266072Sdes # icc used to be incompatible with GCC. 4696266072Sdes # ICC 10 doesn't accept -KPIC any more. 4697266072Sdes icc* | ifort*) 4698266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4699266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4700266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4701266072Sdes ;; 4702266072Sdes # Lahey Fortran 8.1. 4703266072Sdes lf95*) 4704266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4705266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4706266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4707266072Sdes ;; 4708266072Sdes nagfor*) 4709266072Sdes # NAG Fortran compiler 4710266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4711266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4712266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4713266072Sdes ;; 4714285206Sdes tcc*) 4715285206Sdes # Fabrice Bellard et al's Tiny C Compiler 4716285206Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4717285206Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4718285206Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4719285206Sdes ;; 4720266072Sdes pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4721266072Sdes # Portland Group compilers (*not* the Pentium gcc compiler, 4722266072Sdes # which looks to be a dead project) 4723266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4724266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4725266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4726266072Sdes ;; 4727266072Sdes ccc*) 4728266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4729266072Sdes # All Alpha code is PIC. 4730266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4731266072Sdes ;; 4732266072Sdes xl* | bgxl* | bgf* | mpixl*) 4733266072Sdes # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4734266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4735266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4736266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4737266072Sdes ;; 4738266072Sdes *) 4739266072Sdes case `$CC -V 2>&1 | sed 5q` in 4740266072Sdes *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4741266072Sdes # Sun Fortran 8.3 passes all unrecognized flags to the linker 4742266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4743266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4744266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4745266072Sdes ;; 4746266072Sdes *Sun\ F* | *Sun*Fortran*) 4747266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4748266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4749266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4750266072Sdes ;; 4751266072Sdes *Sun\ C*) 4752266072Sdes # Sun C 5.9 4753266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4754266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4755266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4756266072Sdes ;; 4757266072Sdes *Intel*\ [[CF]]*Compiler*) 4758266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4759266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4760266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4761266072Sdes ;; 4762266072Sdes *Portland\ Group*) 4763266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4764266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4765266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4766266072Sdes ;; 4767266072Sdes esac 4768266072Sdes ;; 4769266072Sdes esac 4770266072Sdes ;; 4771266072Sdes 4772266072Sdes newsos6) 4773266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4774266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4775266072Sdes ;; 4776266072Sdes 4777266072Sdes *nto* | *qnx*) 4778266072Sdes # QNX uses GNU C++, but need to define -shared option too, otherwise 4779266072Sdes # it will coredump. 4780266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4781266072Sdes ;; 4782266072Sdes 4783266072Sdes osf3* | osf4* | osf5*) 4784266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4785266072Sdes # All OSF/1 code is PIC. 4786266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4787266072Sdes ;; 4788266072Sdes 4789266072Sdes rdos*) 4790266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4791266072Sdes ;; 4792266072Sdes 4793266072Sdes solaris*) 4794266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4795266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4796266072Sdes case $cc_basename in 4797266072Sdes f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4798266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4799266072Sdes *) 4800266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4801266072Sdes esac 4802266072Sdes ;; 4803266072Sdes 4804266072Sdes sunos4*) 4805266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4806266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4807266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4808266072Sdes ;; 4809266072Sdes 4810266072Sdes sysv4 | sysv4.2uw2* | sysv4.3*) 4811266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4812266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4813266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4814266072Sdes ;; 4815266072Sdes 4816266072Sdes sysv4*MP*) 4817285206Sdes if test -d /usr/nec; then 4818266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4819266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4820266072Sdes fi 4821266072Sdes ;; 4822266072Sdes 4823266072Sdes sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4824266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4825266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4826266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4827266072Sdes ;; 4828266072Sdes 4829266072Sdes unicos*) 4830266072Sdes _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4831266072Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4832266072Sdes ;; 4833266072Sdes 4834266072Sdes uts4*) 4835266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4836266072Sdes _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4837266072Sdes ;; 4838266072Sdes 4839266072Sdes *) 4840266072Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4841266072Sdes ;; 4842266072Sdes esac 4843266072Sdes fi 4844266072Sdes]) 4845266072Sdescase $host_os in 4846285206Sdes # For platforms that do not support PIC, -DPIC is meaningless: 4847266072Sdes *djgpp*) 4848266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4849266072Sdes ;; 4850266072Sdes *) 4851266072Sdes _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4852266072Sdes ;; 4853266072Sdesesac 4854266072Sdes 4855266072SdesAC_CACHE_CHECK([for $compiler option to produce PIC], 4856266072Sdes [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4857266072Sdes [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4858266072Sdes_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4859266072Sdes 4860266072Sdes# 4861266072Sdes# Check to make sure the PIC flag actually works. 4862266072Sdes# 4863266072Sdesif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4864266072Sdes _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4865266072Sdes [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4866266072Sdes [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4867266072Sdes [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4868266072Sdes "" | " "*) ;; 4869266072Sdes *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4870266072Sdes esac], 4871266072Sdes [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4872266072Sdes _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4873266072Sdesfi 4874266072Sdes_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4875266072Sdes [Additional compiler flags for building library objects]) 4876266072Sdes 4877266072Sdes_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4878266072Sdes [How to pass a linker flag through the compiler]) 4879266072Sdes# 4880266072Sdes# Check to make sure the static flag actually works. 4881266072Sdes# 4882266072Sdeswl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4883266072Sdes_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4884266072Sdes _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4885266072Sdes $lt_tmp_static_flag, 4886266072Sdes [], 4887266072Sdes [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4888266072Sdes_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4889266072Sdes [Compiler flag to prevent dynamic linking]) 4890266072Sdes])# _LT_COMPILER_PIC 4891266072Sdes 4892266072Sdes 4893266072Sdes# _LT_LINKER_SHLIBS([TAGNAME]) 4894266072Sdes# ---------------------------- 4895266072Sdes# See if the linker supports building shared libraries. 4896266072Sdesm4_defun([_LT_LINKER_SHLIBS], 4897266072Sdes[AC_REQUIRE([LT_PATH_LD])dnl 4898266072SdesAC_REQUIRE([LT_PATH_NM])dnl 4899266072Sdesm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4900266072Sdesm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4901266072Sdesm4_require([_LT_DECL_EGREP])dnl 4902266072Sdesm4_require([_LT_DECL_SED])dnl 4903266072Sdesm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4904266072Sdesm4_require([_LT_TAG_COMPILER])dnl 4905266072SdesAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4906266072Sdesm4_if([$1], [CXX], [ 4907266072Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4908266072Sdes _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4909266072Sdes case $host_os in 4910266072Sdes aix[[4-9]]*) 4911266072Sdes # If we're using GNU nm, then we don't want the "-C" option. 4912285206Sdes # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4913285206Sdes # Without the "-l" option, or with the "-B" option, AIX nm treats 4914285206Sdes # weak defined symbols like other global defined symbols, whereas 4915285206Sdes # GNU nm marks them as "W". 4916285206Sdes # While the 'weak' keyword is ignored in the Export File, we need 4917285206Sdes # it in the Import File for the 'aix-soname' feature, so we have 4918285206Sdes # to replace the "-B" option with "-P" for AIX nm. 4919266072Sdes if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4920285206Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 4921266072Sdes else 4922285206Sdes _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 4923266072Sdes fi 4924266072Sdes ;; 4925266072Sdes pw32*) 4926285206Sdes _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4927266072Sdes ;; 4928266072Sdes cygwin* | mingw* | cegcc*) 4929266072Sdes case $cc_basename in 4930266072Sdes cl*) 4931266072Sdes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4932266072Sdes ;; 4933266072Sdes *) 4934266072Sdes _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' 4935266072Sdes _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4936266072Sdes ;; 4937266072Sdes esac 4938266072Sdes ;; 4939266072Sdes *) 4940266072Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4941266072Sdes ;; 4942266072Sdes esac 4943266072Sdes], [ 4944266072Sdes runpath_var= 4945266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)= 4946266072Sdes _LT_TAGVAR(always_export_symbols, $1)=no 4947266072Sdes _LT_TAGVAR(archive_cmds, $1)= 4948266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)= 4949266072Sdes _LT_TAGVAR(compiler_needs_object, $1)=no 4950266072Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4951266072Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4952266072Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4953266072Sdes _LT_TAGVAR(hardcode_automatic, $1)=no 4954266072Sdes _LT_TAGVAR(hardcode_direct, $1)=no 4955266072Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4956266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4957266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)= 4958266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=no 4959266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4960266072Sdes _LT_TAGVAR(inherit_rpath, $1)=no 4961266072Sdes _LT_TAGVAR(link_all_deplibs, $1)=unknown 4962266072Sdes _LT_TAGVAR(module_cmds, $1)= 4963266072Sdes _LT_TAGVAR(module_expsym_cmds, $1)= 4964266072Sdes _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4965266072Sdes _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4966266072Sdes _LT_TAGVAR(thread_safe_flag_spec, $1)= 4967266072Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 4968266072Sdes # include_expsyms should be a list of space-separated symbols to be *always* 4969266072Sdes # included in the symbol list 4970266072Sdes _LT_TAGVAR(include_expsyms, $1)= 4971266072Sdes # exclude_expsyms can be an extended regexp of symbols to exclude 4972285206Sdes # it will be wrapped by ' (' and ')$', so one must not match beginning or 4973285206Sdes # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4974285206Sdes # as well as any symbol that contains 'd'. 4975266072Sdes _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4976266072Sdes # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4977266072Sdes # platforms (ab)use it in PIC code, but their linkers get confused if 4978266072Sdes # the symbol is explicitly referenced. Since portable code cannot 4979266072Sdes # rely on this symbol name, it's probably fine to never include it in 4980266072Sdes # preloaded symbol tables. 4981266072Sdes # Exclude shared library initialization/finalization symbols. 4982266072Sdesdnl Note also adjust exclude_expsyms for C++ above. 4983266072Sdes extract_expsyms_cmds= 4984266072Sdes 4985266072Sdes case $host_os in 4986266072Sdes cygwin* | mingw* | pw32* | cegcc*) 4987266072Sdes # FIXME: the MSVC++ port hasn't been tested in a loooong time 4988266072Sdes # When not using gcc, we currently assume that we are using 4989266072Sdes # Microsoft Visual C++. 4990285206Sdes if test yes != "$GCC"; then 4991266072Sdes with_gnu_ld=no 4992266072Sdes fi 4993266072Sdes ;; 4994266072Sdes interix*) 4995266072Sdes # we just hope/assume this is gcc and not c89 (= MSVC++) 4996266072Sdes with_gnu_ld=yes 4997266072Sdes ;; 4998285206Sdes openbsd* | bitrig*) 4999266072Sdes with_gnu_ld=no 5000266072Sdes ;; 5001266072Sdes esac 5002266072Sdes 5003266072Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 5004266072Sdes 5005266072Sdes # On some targets, GNU ld is compatible enough with the native linker 5006266072Sdes # that we're better off using the native interface for both. 5007266072Sdes lt_use_gnu_ld_interface=no 5008285206Sdes if test yes = "$with_gnu_ld"; then 5009266072Sdes case $host_os in 5010266072Sdes aix*) 5011266072Sdes # The AIX port of GNU ld has always aspired to compatibility 5012266072Sdes # with the native linker. However, as the warning in the GNU ld 5013266072Sdes # block says, versions before 2.19.5* couldn't really create working 5014266072Sdes # shared libraries, regardless of the interface used. 5015266072Sdes case `$LD -v 2>&1` in 5016266072Sdes *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5017266072Sdes *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5018266072Sdes *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5019266072Sdes *) 5020266072Sdes lt_use_gnu_ld_interface=yes 5021266072Sdes ;; 5022266072Sdes esac 5023266072Sdes ;; 5024266072Sdes *) 5025266072Sdes lt_use_gnu_ld_interface=yes 5026266072Sdes ;; 5027266072Sdes esac 5028266072Sdes fi 5029266072Sdes 5030285206Sdes if test yes = "$lt_use_gnu_ld_interface"; then 5031266072Sdes # If archive_cmds runs LD, not CC, wlarc should be empty 5032285206Sdes wlarc='$wl' 5033266072Sdes 5034266072Sdes # Set some defaults for GNU ld with shared library support. These 5035266072Sdes # are reset later if shared libraries are not supported. Putting them 5036266072Sdes # here allows them to be overridden if necessary. 5037266072Sdes runpath_var=LD_RUN_PATH 5038285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5039285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5040266072Sdes # ancient GNU ld didn't support --whole-archive et. al. 5041266072Sdes if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5042285206Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5043266072Sdes else 5044266072Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 5045266072Sdes fi 5046266072Sdes supports_anon_versioning=no 5047285206Sdes case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5048266072Sdes *GNU\ gold*) supports_anon_versioning=yes ;; 5049266072Sdes *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5050266072Sdes *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5051266072Sdes *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5052266072Sdes *\ 2.11.*) ;; # other 2.11 versions 5053266072Sdes *) supports_anon_versioning=yes ;; 5054266072Sdes esac 5055266072Sdes 5056266072Sdes # See if GNU ld supports shared libraries. 5057266072Sdes case $host_os in 5058266072Sdes aix[[3-9]]*) 5059266072Sdes # On AIX/PPC, the GNU linker is very broken 5060285206Sdes if test ia64 != "$host_cpu"; then 5061266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5062266072Sdes cat <<_LT_EOF 1>&2 5063266072Sdes 5064266072Sdes*** Warning: the GNU linker, at least up to release 2.19, is reported 5065266072Sdes*** to be unable to reliably create shared libraries on AIX. 5066266072Sdes*** Therefore, libtool is disabling shared libraries support. If you 5067266072Sdes*** really care for shared libraries, you may want to install binutils 5068266072Sdes*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5069266072Sdes*** You will then need to restart the configuration process. 5070266072Sdes 5071266072Sdes_LT_EOF 5072266072Sdes fi 5073266072Sdes ;; 5074266072Sdes 5075266072Sdes amigaos*) 5076266072Sdes case $host_cpu in 5077266072Sdes powerpc) 5078266072Sdes # see comment about AmigaOS4 .so support 5079285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5080266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='' 5081266072Sdes ;; 5082266072Sdes m68k) 5083266072Sdes _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)' 5084266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5085266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5086266072Sdes ;; 5087266072Sdes esac 5088266072Sdes ;; 5089266072Sdes 5090266072Sdes beos*) 5091266072Sdes if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5092266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5093266072Sdes # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5094266072Sdes # support --undefined. This deserves some investigation. FIXME 5095285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5096266072Sdes else 5097266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5098266072Sdes fi 5099266072Sdes ;; 5100266072Sdes 5101266072Sdes cygwin* | mingw* | pw32* | cegcc*) 5102266072Sdes # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5103266072Sdes # as there is no search path for DLLs. 5104266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5105285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5106266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5107266072Sdes _LT_TAGVAR(always_export_symbols, $1)=no 5108266072Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5109266072Sdes _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' 5110266072Sdes _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5111266072Sdes 5112266072Sdes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5113285206Sdes _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' 5114285206Sdes # If the export-symbols file already is a .def file, use it as 5115285206Sdes # is; otherwise, prepend EXPORTS... 5116285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5117285206Sdes cp $export_symbols $output_objdir/$soname.def; 5118285206Sdes else 5119285206Sdes echo EXPORTS > $output_objdir/$soname.def; 5120285206Sdes cat $export_symbols >> $output_objdir/$soname.def; 5121285206Sdes fi~ 5122285206Sdes $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5123266072Sdes else 5124266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5125266072Sdes fi 5126266072Sdes ;; 5127266072Sdes 5128266072Sdes haiku*) 5129285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5130266072Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 5131266072Sdes ;; 5132266072Sdes 5133285206Sdes os2*) 5134285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5135285206Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5136285206Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5137285206Sdes shrext_cmds=.dll 5138285206Sdes _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5139285206Sdes $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5140285206Sdes $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5141285206Sdes $ECHO EXPORTS >> $output_objdir/$libname.def~ 5142285206Sdes emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5143285206Sdes $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5144285206Sdes emximp -o $lib $output_objdir/$libname.def' 5145285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5146285206Sdes $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5147285206Sdes $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5148285206Sdes $ECHO EXPORTS >> $output_objdir/$libname.def~ 5149285206Sdes prefix_cmds="$SED"~ 5150285206Sdes if test EXPORTS = "`$SED 1q $export_symbols`"; then 5151285206Sdes prefix_cmds="$prefix_cmds -e 1d"; 5152285206Sdes fi~ 5153285206Sdes prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5154285206Sdes cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5155285206Sdes $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5156285206Sdes emximp -o $lib $output_objdir/$libname.def' 5157285206Sdes _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5158285206Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5159285206Sdes ;; 5160285206Sdes 5161266072Sdes interix[[3-9]]*) 5162266072Sdes _LT_TAGVAR(hardcode_direct, $1)=no 5163266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5164285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5165285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5166266072Sdes # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5167266072Sdes # Instead, shared libraries are loaded at an image base (0x10000000 by 5168266072Sdes # default) and relocated if they conflict, which is a slow very memory 5169266072Sdes # consuming and fragmenting process. To avoid this, we pick a random, 5170266072Sdes # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5171266072Sdes # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5172285206Sdes _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' 5173285206Sdes _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' 5174266072Sdes ;; 5175266072Sdes 5176266072Sdes gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5177266072Sdes tmp_diet=no 5178285206Sdes if test linux-dietlibc = "$host_os"; then 5179266072Sdes case $cc_basename in 5180266072Sdes diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5181266072Sdes esac 5182266072Sdes fi 5183266072Sdes if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5184285206Sdes && test no = "$tmp_diet" 5185266072Sdes then 5186266072Sdes tmp_addflag=' $pic_flag' 5187266072Sdes tmp_sharedflag='-shared' 5188266072Sdes case $cc_basename,$host_cpu in 5189266072Sdes pgcc*) # Portland Group C compiler 5190285206Sdes _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' 5191266072Sdes tmp_addflag=' $pic_flag' 5192266072Sdes ;; 5193266072Sdes pgf77* | pgf90* | pgf95* | pgfortran*) 5194266072Sdes # Portland Group f77 and f90 compilers 5195285206Sdes _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' 5196266072Sdes tmp_addflag=' $pic_flag -Mnomain' ;; 5197266072Sdes ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5198266072Sdes tmp_addflag=' -i_dynamic' ;; 5199266072Sdes efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5200266072Sdes tmp_addflag=' -i_dynamic -nofor_main' ;; 5201266072Sdes ifc* | ifort*) # Intel Fortran compiler 5202266072Sdes tmp_addflag=' -nofor_main' ;; 5203266072Sdes lf95*) # Lahey Fortran 8.1 5204266072Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 5205266072Sdes tmp_sharedflag='--shared' ;; 5206285206Sdes nagfor*) # NAGFOR 5.3 5207285206Sdes tmp_sharedflag='-Wl,-shared' ;; 5208266072Sdes xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5209266072Sdes tmp_sharedflag='-qmkshrobj' 5210266072Sdes tmp_addflag= ;; 5211266072Sdes nvcc*) # Cuda Compiler Driver 2.2 5212285206Sdes _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' 5213266072Sdes _LT_TAGVAR(compiler_needs_object, $1)=yes 5214266072Sdes ;; 5215266072Sdes esac 5216266072Sdes case `$CC -V 2>&1 | sed 5q` in 5217266072Sdes *Sun\ C*) # Sun C 5.9 5218285206Sdes _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' 5219266072Sdes _LT_TAGVAR(compiler_needs_object, $1)=yes 5220266072Sdes tmp_sharedflag='-G' ;; 5221266072Sdes *Sun\ F*) # Sun Fortran 8.3 5222266072Sdes tmp_sharedflag='-G' ;; 5223266072Sdes esac 5224285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5225266072Sdes 5226285206Sdes if test yes = "$supports_anon_versioning"; then 5227266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5228285206Sdes cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5229285206Sdes echo "local: *; };" >> $output_objdir/$libname.ver~ 5230285206Sdes $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5231266072Sdes fi 5232266072Sdes 5233266072Sdes case $cc_basename in 5234285206Sdes tcc*) 5235285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5236285206Sdes ;; 5237266072Sdes xlf* | bgf* | bgxlf* | mpixlf*) 5238266072Sdes # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5239266072Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5240285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5241266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5242285206Sdes if test yes = "$supports_anon_versioning"; then 5243266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5244285206Sdes cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5245285206Sdes echo "local: *; };" >> $output_objdir/$libname.ver~ 5246285206Sdes $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5247266072Sdes fi 5248266072Sdes ;; 5249266072Sdes esac 5250266072Sdes else 5251266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5252266072Sdes fi 5253266072Sdes ;; 5254266072Sdes 5255285206Sdes netbsd*) 5256266072Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5257266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5258266072Sdes wlarc= 5259266072Sdes else 5260285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5261285206Sdes _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' 5262266072Sdes fi 5263266072Sdes ;; 5264266072Sdes 5265266072Sdes solaris*) 5266266072Sdes if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5267266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5268266072Sdes cat <<_LT_EOF 1>&2 5269266072Sdes 5270266072Sdes*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5271266072Sdes*** create shared libraries on Solaris systems. Therefore, libtool 5272266072Sdes*** is disabling shared libraries support. We urge you to upgrade GNU 5273266072Sdes*** binutils to release 2.9.1 or newer. Another option is to modify 5274266072Sdes*** your PATH or compiler configuration so that the native linker is 5275266072Sdes*** used, and then restart. 5276266072Sdes 5277266072Sdes_LT_EOF 5278266072Sdes elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5279285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5280285206Sdes _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' 5281266072Sdes else 5282266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5283266072Sdes fi 5284266072Sdes ;; 5285266072Sdes 5286266072Sdes sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5287266072Sdes case `$LD -v 2>&1` in 5288266072Sdes *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5289266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5290266072Sdes cat <<_LT_EOF 1>&2 5291266072Sdes 5292285206Sdes*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5293266072Sdes*** reliably create shared libraries on SCO systems. Therefore, libtool 5294266072Sdes*** is disabling shared libraries support. We urge you to upgrade GNU 5295266072Sdes*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5296266072Sdes*** your PATH or compiler configuration so that the native linker is 5297266072Sdes*** used, and then restart. 5298266072Sdes 5299266072Sdes_LT_EOF 5300266072Sdes ;; 5301266072Sdes *) 5302266072Sdes # For security reasons, it is highly recommended that you always 5303266072Sdes # use absolute paths for naming shared libraries, and exclude the 5304266072Sdes # DT_RUNPATH tag from executables and libraries. But doing so 5305266072Sdes # requires that you compile everything twice, which is a pain. 5306266072Sdes if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5307285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5308285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5309285206Sdes _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' 5310266072Sdes else 5311266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5312266072Sdes fi 5313266072Sdes ;; 5314266072Sdes esac 5315266072Sdes ;; 5316266072Sdes 5317266072Sdes sunos4*) 5318266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5319266072Sdes wlarc= 5320266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5321266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5322266072Sdes ;; 5323266072Sdes 5324266072Sdes *) 5325266072Sdes if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5326285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5327285206Sdes _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' 5328266072Sdes else 5329266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5330266072Sdes fi 5331266072Sdes ;; 5332266072Sdes esac 5333266072Sdes 5334285206Sdes if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5335266072Sdes runpath_var= 5336266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5337266072Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5338266072Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 5339266072Sdes fi 5340266072Sdes else 5341266072Sdes # PORTME fill in a description of your system's linker (not GNU ld) 5342266072Sdes case $host_os in 5343266072Sdes aix3*) 5344266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5345266072Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 5346266072Sdes _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' 5347266072Sdes # Note: this linker hardcodes the directories in LIBPATH if there 5348266072Sdes # are no directories specified by -L. 5349266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5350285206Sdes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5351266072Sdes # Neither direct hardcoding nor static linking is supported with a 5352266072Sdes # broken collect2. 5353266072Sdes _LT_TAGVAR(hardcode_direct, $1)=unsupported 5354266072Sdes fi 5355266072Sdes ;; 5356266072Sdes 5357266072Sdes aix[[4-9]]*) 5358285206Sdes if test ia64 = "$host_cpu"; then 5359266072Sdes # On IA64, the linker does run time linking by default, so we don't 5360266072Sdes # have to do anything special. 5361266072Sdes aix_use_runtimelinking=no 5362266072Sdes exp_sym_flag='-Bexport' 5363285206Sdes no_entry_flag= 5364266072Sdes else 5365266072Sdes # If we're using GNU nm, then we don't want the "-C" option. 5366285206Sdes # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5367285206Sdes # Without the "-l" option, or with the "-B" option, AIX nm treats 5368285206Sdes # weak defined symbols like other global defined symbols, whereas 5369285206Sdes # GNU nm marks them as "W". 5370285206Sdes # While the 'weak' keyword is ignored in the Export File, we need 5371285206Sdes # it in the Import File for the 'aix-soname' feature, so we have 5372285206Sdes # to replace the "-B" option with "-P" for AIX nm. 5373266072Sdes if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5374285206Sdes _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 5375266072Sdes else 5376285206Sdes _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 5377266072Sdes fi 5378266072Sdes aix_use_runtimelinking=no 5379266072Sdes 5380266072Sdes # Test if we are trying to use run time linking or normal 5381266072Sdes # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5382285206Sdes # have runtime linking enabled, and use it for executables. 5383285206Sdes # For shared libraries, we enable/disable runtime linking 5384285206Sdes # depending on the kind of the shared library created - 5385285206Sdes # when "with_aix_soname,aix_use_runtimelinking" is: 5386285206Sdes # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5387285206Sdes # "aix,yes" lib.so shared, rtl:yes, for executables 5388285206Sdes # lib.a static archive 5389285206Sdes # "both,no" lib.so.V(shr.o) shared, rtl:yes 5390285206Sdes # lib.a(lib.so.V) shared, rtl:no, for executables 5391285206Sdes # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5392285206Sdes # lib.a(lib.so.V) shared, rtl:no 5393285206Sdes # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5394285206Sdes # lib.a static archive 5395266072Sdes case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5396266072Sdes for ld_flag in $LDFLAGS; do 5397285206Sdes if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5398266072Sdes aix_use_runtimelinking=yes 5399266072Sdes break 5400266072Sdes fi 5401266072Sdes done 5402285206Sdes if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5403285206Sdes # With aix-soname=svr4, we create the lib.so.V shared archives only, 5404285206Sdes # so we don't have lib.a shared libs to link our executables. 5405285206Sdes # We have to force runtime linking in this case. 5406285206Sdes aix_use_runtimelinking=yes 5407285206Sdes LDFLAGS="$LDFLAGS -Wl,-brtl" 5408285206Sdes fi 5409266072Sdes ;; 5410266072Sdes esac 5411266072Sdes 5412266072Sdes exp_sym_flag='-bexport' 5413266072Sdes no_entry_flag='-bnoentry' 5414266072Sdes fi 5415266072Sdes 5416266072Sdes # When large executables or shared objects are built, AIX ld can 5417266072Sdes # have problems creating the table of contents. If linking a library 5418266072Sdes # or program results in "error TOC overflow" add -mminimal-toc to 5419266072Sdes # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5420266072Sdes # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5421266072Sdes 5422266072Sdes _LT_TAGVAR(archive_cmds, $1)='' 5423266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5424266072Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5425266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5426266072Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 5427285206Sdes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5428285206Sdes case $with_aix_soname,$aix_use_runtimelinking in 5429285206Sdes aix,*) ;; # traditional, no import file 5430285206Sdes svr4,* | *,yes) # use import file 5431285206Sdes # The Import File defines what to hardcode. 5432285206Sdes _LT_TAGVAR(hardcode_direct, $1)=no 5433285206Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5434285206Sdes ;; 5435285206Sdes esac 5436266072Sdes 5437285206Sdes if test yes = "$GCC"; then 5438266072Sdes case $host_os in aix4.[[012]]|aix4.[[012]].*) 5439266072Sdes # We only want to do this on AIX 4.2 and lower, the check 5440266072Sdes # below for broken collect2 doesn't work under 4.3+ 5441285206Sdes collect2name=`$CC -print-prog-name=collect2` 5442266072Sdes if test -f "$collect2name" && 5443266072Sdes strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5444266072Sdes then 5445266072Sdes # We have reworked collect2 5446266072Sdes : 5447266072Sdes else 5448266072Sdes # We have old collect2 5449266072Sdes _LT_TAGVAR(hardcode_direct, $1)=unsupported 5450266072Sdes # It fails to find uninstalled libraries when the uninstalled 5451266072Sdes # path is not listed in the libpath. Setting hardcode_minus_L 5452266072Sdes # to unsupported forces relinking 5453266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5454266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5455266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)= 5456266072Sdes fi 5457266072Sdes ;; 5458266072Sdes esac 5459266072Sdes shared_flag='-shared' 5460285206Sdes if test yes = "$aix_use_runtimelinking"; then 5461285206Sdes shared_flag="$shared_flag "'$wl-G' 5462266072Sdes fi 5463285206Sdes # Need to ensure runtime linking is disabled for the traditional 5464285206Sdes # shared library, or the linker may eventually find shared libraries 5465285206Sdes # /with/ Import File - we do not want to mix them. 5466285206Sdes shared_flag_aix='-shared' 5467285206Sdes shared_flag_svr4='-shared $wl-G' 5468266072Sdes else 5469266072Sdes # not using gcc 5470285206Sdes if test ia64 = "$host_cpu"; then 5471266072Sdes # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5472266072Sdes # chokes on -Wl,-G. The following line is correct: 5473266072Sdes shared_flag='-G' 5474266072Sdes else 5475285206Sdes if test yes = "$aix_use_runtimelinking"; then 5476285206Sdes shared_flag='$wl-G' 5477266072Sdes else 5478285206Sdes shared_flag='$wl-bM:SRE' 5479266072Sdes fi 5480285206Sdes shared_flag_aix='$wl-bM:SRE' 5481285206Sdes shared_flag_svr4='$wl-G' 5482266072Sdes fi 5483266072Sdes fi 5484266072Sdes 5485285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5486266072Sdes # It seems that -bexpall does not export symbols beginning with 5487266072Sdes # underscore (_), so it is better to generate a list of symbols to export. 5488266072Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 5489285206Sdes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5490266072Sdes # Warning - without using the other runtime loading flags (-brtl), 5491266072Sdes # -berok will link without error, but may produce a broken library. 5492266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5493266072Sdes # Determine the default libpath from the value encoded in an 5494266072Sdes # empty executable. 5495266072Sdes _LT_SYS_MODULE_PATH_AIX([$1]) 5496285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5497285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 5498266072Sdes else 5499285206Sdes if test ia64 = "$host_cpu"; then 5500285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5501266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5502285206Sdes _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" 5503266072Sdes else 5504266072Sdes # Determine the default libpath from the value encoded in an 5505266072Sdes # empty executable. 5506266072Sdes _LT_SYS_MODULE_PATH_AIX([$1]) 5507285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5508266072Sdes # Warning - without using the other run time loading flags, 5509266072Sdes # -berok will link without error, but may produce a broken library. 5510285206Sdes _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5511285206Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5512285206Sdes if test yes = "$with_gnu_ld"; then 5513266072Sdes # We only use this code for GNU lds that support --whole-archive. 5514285206Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5515266072Sdes else 5516266072Sdes # Exported symbols can be pulled into shared objects from archives 5517266072Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5518266072Sdes fi 5519266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5520285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5521285206Sdes # -brtl affects multiple linker settings, -berok does not and is overridden later 5522285206Sdes compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5523285206Sdes if test svr4 != "$with_aix_soname"; then 5524285206Sdes # This is similar to how AIX traditionally builds its shared libraries. 5525285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 5526285206Sdes fi 5527285206Sdes if test aix != "$with_aix_soname"; then 5528285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 5529285206Sdes else 5530285206Sdes # used by -dlpreopen to get the symbols 5531285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5532285206Sdes fi 5533285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5534266072Sdes fi 5535266072Sdes fi 5536266072Sdes ;; 5537266072Sdes 5538266072Sdes amigaos*) 5539266072Sdes case $host_cpu in 5540266072Sdes powerpc) 5541266072Sdes # see comment about AmigaOS4 .so support 5542285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5543266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='' 5544266072Sdes ;; 5545266072Sdes m68k) 5546266072Sdes _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)' 5547266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5548266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5549266072Sdes ;; 5550266072Sdes esac 5551266072Sdes ;; 5552266072Sdes 5553266072Sdes bsdi[[45]]*) 5554266072Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5555266072Sdes ;; 5556266072Sdes 5557266072Sdes cygwin* | mingw* | pw32* | cegcc*) 5558266072Sdes # When not using gcc, we currently assume that we are using 5559266072Sdes # Microsoft Visual C++. 5560266072Sdes # hardcode_libdir_flag_spec is actually meaningless, as there is 5561266072Sdes # no search path for DLLs. 5562266072Sdes case $cc_basename in 5563266072Sdes cl*) 5564266072Sdes # Native MSVC 5565266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5566266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5567266072Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 5568266072Sdes _LT_TAGVAR(file_list_spec, $1)='@' 5569266072Sdes # Tell ltmain to make .lib files, not .a files. 5570266072Sdes libext=lib 5571266072Sdes # Tell ltmain to make .dll files, not .so files. 5572285206Sdes shrext_cmds=.dll 5573266072Sdes # FIXME: Setting linknames here is a bad hack. 5574285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5575285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5576285206Sdes cp "$export_symbols" "$output_objdir/$soname.def"; 5577285206Sdes echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5578285206Sdes else 5579285206Sdes $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5580285206Sdes fi~ 5581285206Sdes $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5582285206Sdes linknames=' 5583266072Sdes # The linker will not automatically build a static lib if we build a DLL. 5584266072Sdes # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5585266072Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5586266072Sdes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5587266072Sdes _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' 5588266072Sdes # Don't use ranlib 5589266072Sdes _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5590266072Sdes _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5591285206Sdes lt_tool_outputfile="@TOOL_OUTPUT@"~ 5592285206Sdes case $lt_outputfile in 5593285206Sdes *.exe|*.EXE) ;; 5594285206Sdes *) 5595285206Sdes lt_outputfile=$lt_outputfile.exe 5596285206Sdes lt_tool_outputfile=$lt_tool_outputfile.exe 5597285206Sdes ;; 5598285206Sdes esac~ 5599285206Sdes if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5600285206Sdes $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5601285206Sdes $RM "$lt_outputfile.manifest"; 5602285206Sdes fi' 5603266072Sdes ;; 5604266072Sdes *) 5605266072Sdes # Assume MSVC wrapper 5606266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5607266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5608266072Sdes # Tell ltmain to make .lib files, not .a files. 5609266072Sdes libext=lib 5610266072Sdes # Tell ltmain to make .dll files, not .so files. 5611285206Sdes shrext_cmds=.dll 5612266072Sdes # FIXME: Setting linknames here is a bad hack. 5613266072Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5614266072Sdes # The linker will automatically build a .lib file if we build a DLL. 5615266072Sdes _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5616266072Sdes # FIXME: Should let the user specify the lib program. 5617266072Sdes _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5618266072Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5619266072Sdes ;; 5620266072Sdes esac 5621266072Sdes ;; 5622266072Sdes 5623266072Sdes darwin* | rhapsody*) 5624266072Sdes _LT_DARWIN_LINKER_FEATURES($1) 5625266072Sdes ;; 5626266072Sdes 5627266072Sdes dgux*) 5628266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5629266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5630266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5631266072Sdes ;; 5632266072Sdes 5633266072Sdes # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5634266072Sdes # support. Future versions do this automatically, but an explicit c++rt0.o 5635266072Sdes # does not break anything, and helps significantly (at the cost of a little 5636266072Sdes # extra space). 5637266072Sdes freebsd2.2*) 5638266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5639266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5640266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5641266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5642266072Sdes ;; 5643266072Sdes 5644266072Sdes # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5645266072Sdes freebsd2.*) 5646266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5647266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5648266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5649266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5650266072Sdes ;; 5651266072Sdes 5652266072Sdes # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5653266072Sdes freebsd* | dragonfly*) 5654266072Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5655266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5656266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5657266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5658266072Sdes ;; 5659266072Sdes 5660266072Sdes hpux9*) 5661285206Sdes if test yes = "$GCC"; then 5662285206Sdes _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 5663266072Sdes else 5664285206Sdes _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 5665266072Sdes fi 5666285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5667266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5668266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5669266072Sdes 5670266072Sdes # hardcode_minus_L: Not really in the search PATH, 5671266072Sdes # but as the default location of the library. 5672266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5673285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5674266072Sdes ;; 5675266072Sdes 5676266072Sdes hpux10*) 5677285206Sdes if test yes,no = "$GCC,$with_gnu_ld"; then 5678285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5679266072Sdes else 5680266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5681266072Sdes fi 5682285206Sdes if test no = "$with_gnu_ld"; then 5683285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5684266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5685266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5686266072Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5687285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5688266072Sdes # hardcode_minus_L: Not really in the search PATH, 5689266072Sdes # but as the default location of the library. 5690266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5691266072Sdes fi 5692266072Sdes ;; 5693266072Sdes 5694266072Sdes hpux11*) 5695285206Sdes if test yes,no = "$GCC,$with_gnu_ld"; then 5696266072Sdes case $host_cpu in 5697266072Sdes hppa*64*) 5698285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5699266072Sdes ;; 5700266072Sdes ia64*) 5701285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5702266072Sdes ;; 5703266072Sdes *) 5704285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5705266072Sdes ;; 5706266072Sdes esac 5707266072Sdes else 5708266072Sdes case $host_cpu in 5709266072Sdes hppa*64*) 5710285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5711266072Sdes ;; 5712266072Sdes ia64*) 5713285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5714266072Sdes ;; 5715266072Sdes *) 5716266072Sdes m4_if($1, [], [ 5717266072Sdes # Older versions of the 11.00 compiler do not understand -b yet 5718266072Sdes # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5719266072Sdes _LT_LINKER_OPTION([if $CC understands -b], 5720266072Sdes _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5721285206Sdes [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5722266072Sdes [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5723285206Sdes [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5724266072Sdes ;; 5725266072Sdes esac 5726266072Sdes fi 5727285206Sdes if test no = "$with_gnu_ld"; then 5728285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5729266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5730266072Sdes 5731266072Sdes case $host_cpu in 5732266072Sdes hppa*64*|ia64*) 5733266072Sdes _LT_TAGVAR(hardcode_direct, $1)=no 5734266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5735266072Sdes ;; 5736266072Sdes *) 5737266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5738266072Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5739285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5740266072Sdes 5741266072Sdes # hardcode_minus_L: Not really in the search PATH, 5742266072Sdes # but as the default location of the library. 5743266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5744266072Sdes ;; 5745266072Sdes esac 5746266072Sdes fi 5747266072Sdes ;; 5748266072Sdes 5749266072Sdes irix5* | irix6* | nonstopux*) 5750285206Sdes if test yes = "$GCC"; then 5751285206Sdes _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' 5752266072Sdes # Try to use the -exported_symbol ld option, if it does not 5753266072Sdes # work, assume that -exports_file does not work either and 5754266072Sdes # implicitly export all symbols. 5755266072Sdes # This should be the same for all languages, so no per-tag cache variable. 5756266072Sdes AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5757266072Sdes [lt_cv_irix_exported_symbol], 5758285206Sdes [save_LDFLAGS=$LDFLAGS 5759285206Sdes LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5760266072Sdes AC_LINK_IFELSE( 5761266072Sdes [AC_LANG_SOURCE( 5762266072Sdes [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5763266072Sdes [C++], [[int foo (void) { return 0; }]], 5764266072Sdes [Fortran 77], [[ 5765266072Sdes subroutine foo 5766266072Sdes end]], 5767266072Sdes [Fortran], [[ 5768266072Sdes subroutine foo 5769266072Sdes end]])])], 5770266072Sdes [lt_cv_irix_exported_symbol=yes], 5771266072Sdes [lt_cv_irix_exported_symbol=no]) 5772285206Sdes LDFLAGS=$save_LDFLAGS]) 5773285206Sdes if test yes = "$lt_cv_irix_exported_symbol"; then 5774285206Sdes _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' 5775266072Sdes fi 5776266072Sdes else 5777285206Sdes _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' 5778285206Sdes _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' 5779266072Sdes fi 5780266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5781285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5782266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5783266072Sdes _LT_TAGVAR(inherit_rpath, $1)=yes 5784266072Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 5785266072Sdes ;; 5786266072Sdes 5787285206Sdes linux*) 5788285206Sdes case $cc_basename in 5789285206Sdes tcc*) 5790285206Sdes # Fabrice Bellard et al's Tiny C Compiler 5791285206Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 5792285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5793285206Sdes ;; 5794285206Sdes esac 5795285206Sdes ;; 5796285206Sdes 5797285206Sdes netbsd*) 5798266072Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5799266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5800266072Sdes else 5801266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5802266072Sdes fi 5803266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5804266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5805266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5806266072Sdes ;; 5807266072Sdes 5808266072Sdes newsos6) 5809266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5810266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5811285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5812266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5813266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5814266072Sdes ;; 5815266072Sdes 5816266072Sdes *nto* | *qnx*) 5817266072Sdes ;; 5818266072Sdes 5819285206Sdes openbsd* | bitrig*) 5820266072Sdes if test -f /usr/libexec/ld.so; then 5821266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5822266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5823266072Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5824285206Sdes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5825266072Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5826285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5827285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5828285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5829266072Sdes else 5830285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5831285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5832266072Sdes fi 5833266072Sdes else 5834266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 5835266072Sdes fi 5836266072Sdes ;; 5837266072Sdes 5838266072Sdes os2*) 5839266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5840266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5841266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5842285206Sdes shrext_cmds=.dll 5843285206Sdes _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5844285206Sdes $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5845285206Sdes $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5846285206Sdes $ECHO EXPORTS >> $output_objdir/$libname.def~ 5847285206Sdes emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5848285206Sdes $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5849285206Sdes emximp -o $lib $output_objdir/$libname.def' 5850285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5851285206Sdes $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5852285206Sdes $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5853285206Sdes $ECHO EXPORTS >> $output_objdir/$libname.def~ 5854285206Sdes prefix_cmds="$SED"~ 5855285206Sdes if test EXPORTS = "`$SED 1q $export_symbols`"; then 5856285206Sdes prefix_cmds="$prefix_cmds -e 1d"; 5857285206Sdes fi~ 5858285206Sdes prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5859285206Sdes cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5860285206Sdes $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5861285206Sdes emximp -o $lib $output_objdir/$libname.def' 5862285206Sdes _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5863285206Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5864266072Sdes ;; 5865266072Sdes 5866266072Sdes osf3*) 5867285206Sdes if test yes = "$GCC"; then 5868285206Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5869285206Sdes _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' 5870266072Sdes else 5871266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5872285206Sdes _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' 5873266072Sdes fi 5874266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5875285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5876266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5877266072Sdes ;; 5878266072Sdes 5879266072Sdes osf4* | osf5*) # as osf3* with the addition of -msym flag 5880285206Sdes if test yes = "$GCC"; then 5881285206Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5882285206Sdes _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' 5883285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5884266072Sdes else 5885266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5886285206Sdes _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' 5887266072Sdes _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~ 5888285206Sdes $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' 5889266072Sdes 5890266072Sdes # Both c and cxx compiler support -rpath directly 5891266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5892266072Sdes fi 5893266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5894266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5895266072Sdes ;; 5896266072Sdes 5897266072Sdes solaris*) 5898266072Sdes _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5899285206Sdes if test yes = "$GCC"; then 5900285206Sdes wlarc='$wl' 5901285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5902266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5903285206Sdes $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' 5904266072Sdes else 5905266072Sdes case `$CC -V 2>&1` in 5906266072Sdes *"Compilers 5.0"*) 5907266072Sdes wlarc='' 5908285206Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5909266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5910285206Sdes $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5911266072Sdes ;; 5912266072Sdes *) 5913285206Sdes wlarc='$wl' 5914285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5915266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5916285206Sdes $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5917266072Sdes ;; 5918266072Sdes esac 5919266072Sdes fi 5920266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5921266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5922266072Sdes case $host_os in 5923266072Sdes solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5924266072Sdes *) 5925266072Sdes # The compiler driver will combine and reorder linker options, 5926285206Sdes # but understands '-z linker_flag'. GCC discards it without '$wl', 5927266072Sdes # but is careful enough not to reorder. 5928266072Sdes # Supported since Solaris 2.6 (maybe 2.5.1?) 5929285206Sdes if test yes = "$GCC"; then 5930285206Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5931266072Sdes else 5932266072Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5933266072Sdes fi 5934266072Sdes ;; 5935266072Sdes esac 5936266072Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 5937266072Sdes ;; 5938266072Sdes 5939266072Sdes sunos4*) 5940285206Sdes if test sequent = "$host_vendor"; then 5941266072Sdes # Use $CC to link under sequent, because it throws in some extra .o 5942266072Sdes # files that make .init and .fini sections work. 5943285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5944266072Sdes else 5945266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5946266072Sdes fi 5947266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5948266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 5949266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 5950266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5951266072Sdes ;; 5952266072Sdes 5953266072Sdes sysv4) 5954266072Sdes case $host_vendor in 5955266072Sdes sni) 5956266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5957266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5958266072Sdes ;; 5959266072Sdes siemens) 5960266072Sdes ## LD is ld it makes a PLAMLIB 5961266072Sdes ## CC just makes a GrossModule. 5962266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5963266072Sdes _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5964266072Sdes _LT_TAGVAR(hardcode_direct, $1)=no 5965266072Sdes ;; 5966266072Sdes motorola) 5967266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5968266072Sdes _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5969266072Sdes ;; 5970266072Sdes esac 5971266072Sdes runpath_var='LD_RUN_PATH' 5972266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5973266072Sdes ;; 5974266072Sdes 5975266072Sdes sysv4.3*) 5976266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5977266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5978266072Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5979266072Sdes ;; 5980266072Sdes 5981266072Sdes sysv4*MP*) 5982266072Sdes if test -d /usr/nec; then 5983266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5984266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5985266072Sdes runpath_var=LD_RUN_PATH 5986266072Sdes hardcode_runpath_var=yes 5987266072Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 5988266072Sdes fi 5989266072Sdes ;; 5990266072Sdes 5991266072Sdes sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5992285206Sdes _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 5993266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5994266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5995266072Sdes runpath_var='LD_RUN_PATH' 5996266072Sdes 5997285206Sdes if test yes = "$GCC"; then 5998285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5999285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6000266072Sdes else 6001285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6002285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6003266072Sdes fi 6004266072Sdes ;; 6005266072Sdes 6006266072Sdes sysv5* | sco3.2v5* | sco5v6*) 6007285206Sdes # Note: We CANNOT use -z defs as we might desire, because we do not 6008266072Sdes # link with -lc, and that would cause any symbols used from libc to 6009266072Sdes # always be unresolved, which means just about no library would 6010266072Sdes # ever link correctly. If we're not using GNU ld we use -z text 6011266072Sdes # though, which does catch some bad symbols but isn't as heavy-handed 6012266072Sdes # as -z defs. 6013285206Sdes _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6014285206Sdes _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6015266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6016266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6017285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6018266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6019266072Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6020285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6021266072Sdes runpath_var='LD_RUN_PATH' 6022266072Sdes 6023285206Sdes if test yes = "$GCC"; then 6024285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6025285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6026266072Sdes else 6027285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6028285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6029266072Sdes fi 6030266072Sdes ;; 6031266072Sdes 6032266072Sdes uts4*) 6033266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6034266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6035266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6036266072Sdes ;; 6037266072Sdes 6038266072Sdes *) 6039266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6040266072Sdes ;; 6041266072Sdes esac 6042266072Sdes 6043285206Sdes if test sni = "$host_vendor"; then 6044266072Sdes case $host in 6045266072Sdes sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6046285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6047266072Sdes ;; 6048266072Sdes esac 6049266072Sdes fi 6050266072Sdes fi 6051266072Sdes]) 6052266072SdesAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6053285206Sdestest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6054266072Sdes 6055266072Sdes_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6056266072Sdes 6057266072Sdes_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6058266072Sdes_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6059266072Sdes_LT_DECL([], [extract_expsyms_cmds], [2], 6060266072Sdes [The commands to extract the exported symbol list from a shared archive]) 6061266072Sdes 6062266072Sdes# 6063266072Sdes# Do we need to explicitly link libc? 6064266072Sdes# 6065266072Sdescase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6066266072Sdesx|xyes) 6067266072Sdes # Assume -lc should be added 6068266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6069266072Sdes 6070285206Sdes if test yes,yes = "$GCC,$enable_shared"; then 6071266072Sdes case $_LT_TAGVAR(archive_cmds, $1) in 6072266072Sdes *'~'*) 6073266072Sdes # FIXME: we may have to deal with multi-command sequences. 6074266072Sdes ;; 6075266072Sdes '$CC '*) 6076266072Sdes # Test whether the compiler implicitly links with -lc since on some 6077266072Sdes # systems, -lgcc has to come before -lc. If gcc already passes -lc 6078266072Sdes # to ld, don't add -lc before -lgcc. 6079266072Sdes AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6080266072Sdes [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6081266072Sdes [$RM conftest* 6082266072Sdes echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6083266072Sdes 6084266072Sdes if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6085266072Sdes soname=conftest 6086266072Sdes lib=conftest 6087266072Sdes libobjs=conftest.$ac_objext 6088266072Sdes deplibs= 6089266072Sdes wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6090266072Sdes pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6091266072Sdes compiler_flags=-v 6092266072Sdes linker_flags=-v 6093266072Sdes verstring= 6094266072Sdes output_objdir=. 6095266072Sdes libname=conftest 6096266072Sdes lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6097266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)= 6098266072Sdes if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6099266072Sdes then 6100266072Sdes lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6101266072Sdes else 6102266072Sdes lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6103266072Sdes fi 6104266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6105266072Sdes else 6106266072Sdes cat conftest.err 1>&5 6107266072Sdes fi 6108266072Sdes $RM conftest* 6109266072Sdes ]) 6110266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6111266072Sdes ;; 6112266072Sdes esac 6113266072Sdes fi 6114266072Sdes ;; 6115266072Sdesesac 6116266072Sdes 6117266072Sdes_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6118266072Sdes [Whether or not to add -lc for building shared libraries]) 6119266072Sdes_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6120266072Sdes [enable_shared_with_static_runtimes], [0], 6121266072Sdes [Whether or not to disallow shared libs when runtime libs are static]) 6122266072Sdes_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6123266072Sdes [Compiler flag to allow reflexive dlopens]) 6124266072Sdes_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6125266072Sdes [Compiler flag to generate shared objects directly from archives]) 6126266072Sdes_LT_TAGDECL([], [compiler_needs_object], [1], 6127266072Sdes [Whether the compiler copes with passing no objects directly]) 6128266072Sdes_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6129266072Sdes [Create an old-style archive from a shared archive]) 6130266072Sdes_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6131266072Sdes [Create a temporary old-style archive to link instead of a shared archive]) 6132266072Sdes_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6133266072Sdes_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6134266072Sdes_LT_TAGDECL([], [module_cmds], [2], 6135266072Sdes [Commands used to build a loadable module if different from building 6136266072Sdes a shared archive.]) 6137266072Sdes_LT_TAGDECL([], [module_expsym_cmds], [2]) 6138266072Sdes_LT_TAGDECL([], [with_gnu_ld], [1], 6139266072Sdes [Whether we are building with GNU ld or not]) 6140266072Sdes_LT_TAGDECL([], [allow_undefined_flag], [1], 6141266072Sdes [Flag that allows shared libraries with undefined symbols to be built]) 6142266072Sdes_LT_TAGDECL([], [no_undefined_flag], [1], 6143266072Sdes [Flag that enforces no undefined symbols]) 6144266072Sdes_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6145266072Sdes [Flag to hardcode $libdir into a binary during linking. 6146266072Sdes This must work even if $libdir does not exist]) 6147266072Sdes_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6148266072Sdes [Whether we need a single "-rpath" flag with a separated argument]) 6149266072Sdes_LT_TAGDECL([], [hardcode_direct], [0], 6150285206Sdes [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6151266072Sdes DIR into the resulting binary]) 6152266072Sdes_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6153285206Sdes [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6154266072Sdes DIR into the resulting binary and the resulting library dependency is 6155285206Sdes "absolute", i.e impossible to change by setting $shlibpath_var if the 6156266072Sdes library is relocated]) 6157266072Sdes_LT_TAGDECL([], [hardcode_minus_L], [0], 6158266072Sdes [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6159266072Sdes into the resulting binary]) 6160266072Sdes_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6161266072Sdes [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6162266072Sdes into the resulting binary]) 6163266072Sdes_LT_TAGDECL([], [hardcode_automatic], [0], 6164266072Sdes [Set to "yes" if building a shared library automatically hardcodes DIR 6165266072Sdes into the library and all subsequent libraries and executables linked 6166266072Sdes against it]) 6167266072Sdes_LT_TAGDECL([], [inherit_rpath], [0], 6168266072Sdes [Set to yes if linker adds runtime paths of dependent libraries 6169266072Sdes to runtime path list]) 6170266072Sdes_LT_TAGDECL([], [link_all_deplibs], [0], 6171266072Sdes [Whether libtool must link a program against all its dependency libraries]) 6172266072Sdes_LT_TAGDECL([], [always_export_symbols], [0], 6173266072Sdes [Set to "yes" if exported symbols are required]) 6174266072Sdes_LT_TAGDECL([], [export_symbols_cmds], [2], 6175266072Sdes [The commands to list exported symbols]) 6176266072Sdes_LT_TAGDECL([], [exclude_expsyms], [1], 6177266072Sdes [Symbols that should not be listed in the preloaded symbols]) 6178266072Sdes_LT_TAGDECL([], [include_expsyms], [1], 6179266072Sdes [Symbols that must always be exported]) 6180266072Sdes_LT_TAGDECL([], [prelink_cmds], [2], 6181266072Sdes [Commands necessary for linking programs (against libraries) with templates]) 6182266072Sdes_LT_TAGDECL([], [postlink_cmds], [2], 6183266072Sdes [Commands necessary for finishing linking programs]) 6184266072Sdes_LT_TAGDECL([], [file_list_spec], [1], 6185266072Sdes [Specify filename containing input files]) 6186266072Sdesdnl FIXME: Not yet implemented 6187266072Sdesdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6188266072Sdesdnl [Compiler flag to generate thread safe objects]) 6189266072Sdes])# _LT_LINKER_SHLIBS 6190266072Sdes 6191266072Sdes 6192266072Sdes# _LT_LANG_C_CONFIG([TAG]) 6193266072Sdes# ------------------------ 6194266072Sdes# Ensure that the configuration variables for a C compiler are suitably 6195266072Sdes# defined. These variables are subsequently used by _LT_CONFIG to write 6196285206Sdes# the compiler configuration to 'libtool'. 6197266072Sdesm4_defun([_LT_LANG_C_CONFIG], 6198266072Sdes[m4_require([_LT_DECL_EGREP])dnl 6199285206Sdeslt_save_CC=$CC 6200266072SdesAC_LANG_PUSH(C) 6201266072Sdes 6202266072Sdes# Source file extension for C test sources. 6203266072Sdesac_ext=c 6204266072Sdes 6205266072Sdes# Object file extension for compiled C test sources. 6206266072Sdesobjext=o 6207266072Sdes_LT_TAGVAR(objext, $1)=$objext 6208266072Sdes 6209266072Sdes# Code to be used in simple compile tests 6210266072Sdeslt_simple_compile_test_code="int some_variable = 0;" 6211266072Sdes 6212266072Sdes# Code to be used in simple link tests 6213266072Sdeslt_simple_link_test_code='int main(){return(0);}' 6214266072Sdes 6215266072Sdes_LT_TAG_COMPILER 6216266072Sdes# Save the default compiler, since it gets overwritten when the other 6217266072Sdes# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6218266072Sdescompiler_DEFAULT=$CC 6219266072Sdes 6220266072Sdes# save warnings/boilerplate of simple test code 6221266072Sdes_LT_COMPILER_BOILERPLATE 6222266072Sdes_LT_LINKER_BOILERPLATE 6223266072Sdes 6224266072Sdes## CAVEAT EMPTOR: 6225266072Sdes## There is no encapsulation within the following macros, do not change 6226266072Sdes## the running order or otherwise move them around unless you know exactly 6227266072Sdes## what you are doing... 6228266072Sdesif test -n "$compiler"; then 6229266072Sdes _LT_COMPILER_NO_RTTI($1) 6230266072Sdes _LT_COMPILER_PIC($1) 6231266072Sdes _LT_COMPILER_C_O($1) 6232266072Sdes _LT_COMPILER_FILE_LOCKS($1) 6233266072Sdes _LT_LINKER_SHLIBS($1) 6234266072Sdes _LT_SYS_DYNAMIC_LINKER($1) 6235266072Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 6236266072Sdes LT_SYS_DLOPEN_SELF 6237266072Sdes _LT_CMD_STRIPLIB 6238266072Sdes 6239285206Sdes # Report what library types will actually be built 6240266072Sdes AC_MSG_CHECKING([if libtool supports shared libraries]) 6241266072Sdes AC_MSG_RESULT([$can_build_shared]) 6242266072Sdes 6243266072Sdes AC_MSG_CHECKING([whether to build shared libraries]) 6244285206Sdes test no = "$can_build_shared" && enable_shared=no 6245266072Sdes 6246266072Sdes # On AIX, shared libraries and static libraries use the same namespace, and 6247266072Sdes # are all built from PIC. 6248266072Sdes case $host_os in 6249266072Sdes aix3*) 6250285206Sdes test yes = "$enable_shared" && enable_static=no 6251266072Sdes if test -n "$RANLIB"; then 6252266072Sdes archive_cmds="$archive_cmds~\$RANLIB \$lib" 6253266072Sdes postinstall_cmds='$RANLIB $lib' 6254266072Sdes fi 6255266072Sdes ;; 6256266072Sdes 6257266072Sdes aix[[4-9]]*) 6258285206Sdes if test ia64 != "$host_cpu"; then 6259285206Sdes case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6260285206Sdes yes,aix,yes) ;; # shared object as lib.so file only 6261285206Sdes yes,svr4,*) ;; # shared object as lib.so archive member only 6262285206Sdes yes,*) enable_static=no ;; # shared object in lib.a archive as well 6263285206Sdes esac 6264266072Sdes fi 6265266072Sdes ;; 6266266072Sdes esac 6267266072Sdes AC_MSG_RESULT([$enable_shared]) 6268266072Sdes 6269266072Sdes AC_MSG_CHECKING([whether to build static libraries]) 6270266072Sdes # Make sure either enable_shared or enable_static is yes. 6271285206Sdes test yes = "$enable_shared" || enable_static=yes 6272266072Sdes AC_MSG_RESULT([$enable_static]) 6273266072Sdes 6274266072Sdes _LT_CONFIG($1) 6275266072Sdesfi 6276266072SdesAC_LANG_POP 6277285206SdesCC=$lt_save_CC 6278266072Sdes])# _LT_LANG_C_CONFIG 6279266072Sdes 6280266072Sdes 6281266072Sdes# _LT_LANG_CXX_CONFIG([TAG]) 6282266072Sdes# -------------------------- 6283266072Sdes# Ensure that the configuration variables for a C++ compiler are suitably 6284266072Sdes# defined. These variables are subsequently used by _LT_CONFIG to write 6285285206Sdes# the compiler configuration to 'libtool'. 6286266072Sdesm4_defun([_LT_LANG_CXX_CONFIG], 6287266072Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6288266072Sdesm4_require([_LT_DECL_EGREP])dnl 6289266072Sdesm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6290285206Sdesif test -n "$CXX" && ( test no != "$CXX" && 6291285206Sdes ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6292285206Sdes (test g++ != "$CXX"))); then 6293266072Sdes AC_PROG_CXXCPP 6294266072Sdeselse 6295266072Sdes _lt_caught_CXX_error=yes 6296266072Sdesfi 6297266072Sdes 6298266072SdesAC_LANG_PUSH(C++) 6299266072Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6300266072Sdes_LT_TAGVAR(allow_undefined_flag, $1)= 6301266072Sdes_LT_TAGVAR(always_export_symbols, $1)=no 6302266072Sdes_LT_TAGVAR(archive_expsym_cmds, $1)= 6303266072Sdes_LT_TAGVAR(compiler_needs_object, $1)=no 6304266072Sdes_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6305266072Sdes_LT_TAGVAR(hardcode_direct, $1)=no 6306266072Sdes_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6307266072Sdes_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6308266072Sdes_LT_TAGVAR(hardcode_libdir_separator, $1)= 6309266072Sdes_LT_TAGVAR(hardcode_minus_L, $1)=no 6310266072Sdes_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6311266072Sdes_LT_TAGVAR(hardcode_automatic, $1)=no 6312266072Sdes_LT_TAGVAR(inherit_rpath, $1)=no 6313266072Sdes_LT_TAGVAR(module_cmds, $1)= 6314266072Sdes_LT_TAGVAR(module_expsym_cmds, $1)= 6315266072Sdes_LT_TAGVAR(link_all_deplibs, $1)=unknown 6316266072Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6317266072Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 6318266072Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6319266072Sdes_LT_TAGVAR(no_undefined_flag, $1)= 6320266072Sdes_LT_TAGVAR(whole_archive_flag_spec, $1)= 6321266072Sdes_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6322266072Sdes 6323266072Sdes# Source file extension for C++ test sources. 6324266072Sdesac_ext=cpp 6325266072Sdes 6326266072Sdes# Object file extension for compiled C++ test sources. 6327266072Sdesobjext=o 6328266072Sdes_LT_TAGVAR(objext, $1)=$objext 6329266072Sdes 6330266072Sdes# No sense in running all these tests if we already determined that 6331266072Sdes# the CXX compiler isn't working. Some variables (like enable_shared) 6332266072Sdes# are currently assumed to apply to all compilers on this platform, 6333266072Sdes# and will be corrupted by setting them based on a non-working compiler. 6334285206Sdesif test yes != "$_lt_caught_CXX_error"; then 6335266072Sdes # Code to be used in simple compile tests 6336266072Sdes lt_simple_compile_test_code="int some_variable = 0;" 6337266072Sdes 6338266072Sdes # Code to be used in simple link tests 6339266072Sdes lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6340266072Sdes 6341266072Sdes # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6342266072Sdes _LT_TAG_COMPILER 6343266072Sdes 6344266072Sdes # save warnings/boilerplate of simple test code 6345266072Sdes _LT_COMPILER_BOILERPLATE 6346266072Sdes _LT_LINKER_BOILERPLATE 6347266072Sdes 6348266072Sdes # Allow CC to be a program name with arguments. 6349266072Sdes lt_save_CC=$CC 6350266072Sdes lt_save_CFLAGS=$CFLAGS 6351266072Sdes lt_save_LD=$LD 6352266072Sdes lt_save_GCC=$GCC 6353266072Sdes GCC=$GXX 6354266072Sdes lt_save_with_gnu_ld=$with_gnu_ld 6355266072Sdes lt_save_path_LD=$lt_cv_path_LD 6356266072Sdes if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6357266072Sdes lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6358266072Sdes else 6359266072Sdes $as_unset lt_cv_prog_gnu_ld 6360266072Sdes fi 6361266072Sdes if test -n "${lt_cv_path_LDCXX+set}"; then 6362266072Sdes lt_cv_path_LD=$lt_cv_path_LDCXX 6363266072Sdes else 6364266072Sdes $as_unset lt_cv_path_LD 6365266072Sdes fi 6366266072Sdes test -z "${LDCXX+set}" || LD=$LDCXX 6367266072Sdes CC=${CXX-"c++"} 6368266072Sdes CFLAGS=$CXXFLAGS 6369266072Sdes compiler=$CC 6370266072Sdes _LT_TAGVAR(compiler, $1)=$CC 6371266072Sdes _LT_CC_BASENAME([$compiler]) 6372266072Sdes 6373266072Sdes if test -n "$compiler"; then 6374266072Sdes # We don't want -fno-exception when compiling C++ code, so set the 6375266072Sdes # no_builtin_flag separately 6376285206Sdes if test yes = "$GXX"; then 6377266072Sdes _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6378266072Sdes else 6379266072Sdes _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6380266072Sdes fi 6381266072Sdes 6382285206Sdes if test yes = "$GXX"; then 6383266072Sdes # Set up default GNU C++ configuration 6384266072Sdes 6385266072Sdes LT_PATH_LD 6386266072Sdes 6387266072Sdes # Check if GNU C++ uses GNU ld as the underlying linker, since the 6388266072Sdes # archiving commands below assume that GNU ld is being used. 6389285206Sdes if test yes = "$with_gnu_ld"; then 6390285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6391285206Sdes _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' 6392266072Sdes 6393285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6394285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6395266072Sdes 6396266072Sdes # If archive_cmds runs LD, not CC, wlarc should be empty 6397266072Sdes # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6398266072Sdes # investigate it a little bit more. (MM) 6399285206Sdes wlarc='$wl' 6400266072Sdes 6401266072Sdes # ancient GNU ld didn't support --whole-archive et. al. 6402266072Sdes if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6403266072Sdes $GREP 'no-whole-archive' > /dev/null; then 6404285206Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6405266072Sdes else 6406266072Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)= 6407266072Sdes fi 6408266072Sdes else 6409266072Sdes with_gnu_ld=no 6410266072Sdes wlarc= 6411266072Sdes 6412266072Sdes # A generic and very simple default shared library creation 6413266072Sdes # command for GNU C++ for the case where it uses the native 6414266072Sdes # linker, instead of GNU ld. If possible, this setting should 6415266072Sdes # overridden to take advantage of the native linker features on 6416266072Sdes # the platform it is being used on. 6417266072Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6418266072Sdes fi 6419266072Sdes 6420266072Sdes # Commands to make compiler produce verbose output that lists 6421266072Sdes # what "hidden" libraries, object files and flags are used when 6422266072Sdes # linking a shared library. 6423266072Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6424266072Sdes 6425266072Sdes else 6426266072Sdes GXX=no 6427266072Sdes with_gnu_ld=no 6428266072Sdes wlarc= 6429266072Sdes fi 6430266072Sdes 6431266072Sdes # PORTME: fill in a description of your system's C++ link characteristics 6432266072Sdes AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6433266072Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 6434266072Sdes case $host_os in 6435266072Sdes aix3*) 6436266072Sdes # FIXME: insert proper C++ library support 6437266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6438266072Sdes ;; 6439266072Sdes aix[[4-9]]*) 6440285206Sdes if test ia64 = "$host_cpu"; then 6441266072Sdes # On IA64, the linker does run time linking by default, so we don't 6442266072Sdes # have to do anything special. 6443266072Sdes aix_use_runtimelinking=no 6444266072Sdes exp_sym_flag='-Bexport' 6445285206Sdes no_entry_flag= 6446266072Sdes else 6447266072Sdes aix_use_runtimelinking=no 6448266072Sdes 6449266072Sdes # Test if we are trying to use run time linking or normal 6450266072Sdes # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6451285206Sdes # have runtime linking enabled, and use it for executables. 6452285206Sdes # For shared libraries, we enable/disable runtime linking 6453285206Sdes # depending on the kind of the shared library created - 6454285206Sdes # when "with_aix_soname,aix_use_runtimelinking" is: 6455285206Sdes # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6456285206Sdes # "aix,yes" lib.so shared, rtl:yes, for executables 6457285206Sdes # lib.a static archive 6458285206Sdes # "both,no" lib.so.V(shr.o) shared, rtl:yes 6459285206Sdes # lib.a(lib.so.V) shared, rtl:no, for executables 6460285206Sdes # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6461285206Sdes # lib.a(lib.so.V) shared, rtl:no 6462285206Sdes # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6463285206Sdes # lib.a static archive 6464266072Sdes case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6465266072Sdes for ld_flag in $LDFLAGS; do 6466266072Sdes case $ld_flag in 6467266072Sdes *-brtl*) 6468266072Sdes aix_use_runtimelinking=yes 6469266072Sdes break 6470266072Sdes ;; 6471266072Sdes esac 6472266072Sdes done 6473285206Sdes if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6474285206Sdes # With aix-soname=svr4, we create the lib.so.V shared archives only, 6475285206Sdes # so we don't have lib.a shared libs to link our executables. 6476285206Sdes # We have to force runtime linking in this case. 6477285206Sdes aix_use_runtimelinking=yes 6478285206Sdes LDFLAGS="$LDFLAGS -Wl,-brtl" 6479285206Sdes fi 6480266072Sdes ;; 6481266072Sdes esac 6482266072Sdes 6483266072Sdes exp_sym_flag='-bexport' 6484266072Sdes no_entry_flag='-bnoentry' 6485266072Sdes fi 6486266072Sdes 6487266072Sdes # When large executables or shared objects are built, AIX ld can 6488266072Sdes # have problems creating the table of contents. If linking a library 6489266072Sdes # or program results in "error TOC overflow" add -mminimal-toc to 6490266072Sdes # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6491266072Sdes # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6492266072Sdes 6493266072Sdes _LT_TAGVAR(archive_cmds, $1)='' 6494266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6495266072Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6496266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6497266072Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6498285206Sdes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6499285206Sdes case $with_aix_soname,$aix_use_runtimelinking in 6500285206Sdes aix,*) ;; # no import file 6501285206Sdes svr4,* | *,yes) # use import file 6502285206Sdes # The Import File defines what to hardcode. 6503285206Sdes _LT_TAGVAR(hardcode_direct, $1)=no 6504285206Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6505285206Sdes ;; 6506285206Sdes esac 6507266072Sdes 6508285206Sdes if test yes = "$GXX"; then 6509266072Sdes case $host_os in aix4.[[012]]|aix4.[[012]].*) 6510266072Sdes # We only want to do this on AIX 4.2 and lower, the check 6511266072Sdes # below for broken collect2 doesn't work under 4.3+ 6512285206Sdes collect2name=`$CC -print-prog-name=collect2` 6513266072Sdes if test -f "$collect2name" && 6514266072Sdes strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6515266072Sdes then 6516266072Sdes # We have reworked collect2 6517266072Sdes : 6518266072Sdes else 6519266072Sdes # We have old collect2 6520266072Sdes _LT_TAGVAR(hardcode_direct, $1)=unsupported 6521266072Sdes # It fails to find uninstalled libraries when the uninstalled 6522266072Sdes # path is not listed in the libpath. Setting hardcode_minus_L 6523266072Sdes # to unsupported forces relinking 6524266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 6525266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6526266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)= 6527266072Sdes fi 6528266072Sdes esac 6529266072Sdes shared_flag='-shared' 6530285206Sdes if test yes = "$aix_use_runtimelinking"; then 6531285206Sdes shared_flag=$shared_flag' $wl-G' 6532266072Sdes fi 6533285206Sdes # Need to ensure runtime linking is disabled for the traditional 6534285206Sdes # shared library, or the linker may eventually find shared libraries 6535285206Sdes # /with/ Import File - we do not want to mix them. 6536285206Sdes shared_flag_aix='-shared' 6537285206Sdes shared_flag_svr4='-shared $wl-G' 6538266072Sdes else 6539266072Sdes # not using gcc 6540285206Sdes if test ia64 = "$host_cpu"; then 6541266072Sdes # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6542266072Sdes # chokes on -Wl,-G. The following line is correct: 6543266072Sdes shared_flag='-G' 6544266072Sdes else 6545285206Sdes if test yes = "$aix_use_runtimelinking"; then 6546285206Sdes shared_flag='$wl-G' 6547266072Sdes else 6548285206Sdes shared_flag='$wl-bM:SRE' 6549266072Sdes fi 6550285206Sdes shared_flag_aix='$wl-bM:SRE' 6551285206Sdes shared_flag_svr4='$wl-G' 6552266072Sdes fi 6553266072Sdes fi 6554266072Sdes 6555285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6556266072Sdes # It seems that -bexpall does not export symbols beginning with 6557266072Sdes # underscore (_), so it is better to generate a list of symbols to 6558266072Sdes # export. 6559266072Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 6560285206Sdes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6561266072Sdes # Warning - without using the other runtime loading flags (-brtl), 6562266072Sdes # -berok will link without error, but may produce a broken library. 6563285206Sdes # The "-G" linker flag allows undefined symbols. 6564285206Sdes _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6565266072Sdes # Determine the default libpath from the value encoded in an empty 6566266072Sdes # executable. 6567266072Sdes _LT_SYS_MODULE_PATH_AIX([$1]) 6568285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6569266072Sdes 6570285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 6571266072Sdes else 6572285206Sdes if test ia64 = "$host_cpu"; then 6573285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6574266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6575285206Sdes _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" 6576266072Sdes else 6577266072Sdes # Determine the default libpath from the value encoded in an 6578266072Sdes # empty executable. 6579266072Sdes _LT_SYS_MODULE_PATH_AIX([$1]) 6580285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6581266072Sdes # Warning - without using the other run time loading flags, 6582266072Sdes # -berok will link without error, but may produce a broken library. 6583285206Sdes _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6584285206Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6585285206Sdes if test yes = "$with_gnu_ld"; then 6586266072Sdes # We only use this code for GNU lds that support --whole-archive. 6587285206Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6588266072Sdes else 6589266072Sdes # Exported symbols can be pulled into shared objects from archives 6590266072Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6591266072Sdes fi 6592266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6593285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6594285206Sdes # -brtl affects multiple linker settings, -berok does not and is overridden later 6595285206Sdes compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6596285206Sdes if test svr4 != "$with_aix_soname"; then 6597285206Sdes # This is similar to how AIX traditionally builds its shared 6598285206Sdes # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6599285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 6600285206Sdes fi 6601285206Sdes if test aix != "$with_aix_soname"; then 6602285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 6603285206Sdes else 6604285206Sdes # used by -dlpreopen to get the symbols 6605285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6606285206Sdes fi 6607285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6608266072Sdes fi 6609266072Sdes fi 6610266072Sdes ;; 6611266072Sdes 6612266072Sdes beos*) 6613266072Sdes if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6614266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6615266072Sdes # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6616266072Sdes # support --undefined. This deserves some investigation. FIXME 6617285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6618266072Sdes else 6619266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6620266072Sdes fi 6621266072Sdes ;; 6622266072Sdes 6623266072Sdes chorus*) 6624266072Sdes case $cc_basename in 6625266072Sdes *) 6626266072Sdes # FIXME: insert proper C++ library support 6627266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6628266072Sdes ;; 6629266072Sdes esac 6630266072Sdes ;; 6631266072Sdes 6632266072Sdes cygwin* | mingw* | pw32* | cegcc*) 6633266072Sdes case $GXX,$cc_basename in 6634266072Sdes ,cl* | no,cl*) 6635266072Sdes # Native MSVC 6636266072Sdes # hardcode_libdir_flag_spec is actually meaningless, as there is 6637266072Sdes # no search path for DLLs. 6638266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6639266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6640266072Sdes _LT_TAGVAR(always_export_symbols, $1)=yes 6641266072Sdes _LT_TAGVAR(file_list_spec, $1)='@' 6642266072Sdes # Tell ltmain to make .lib files, not .a files. 6643266072Sdes libext=lib 6644266072Sdes # Tell ltmain to make .dll files, not .so files. 6645285206Sdes shrext_cmds=.dll 6646266072Sdes # FIXME: Setting linknames here is a bad hack. 6647285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6648285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6649285206Sdes cp "$export_symbols" "$output_objdir/$soname.def"; 6650285206Sdes echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6651285206Sdes else 6652285206Sdes $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6653285206Sdes fi~ 6654285206Sdes $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6655285206Sdes linknames=' 6656266072Sdes # The linker will not automatically build a static lib if we build a DLL. 6657266072Sdes # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6658266072Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6659266072Sdes # Don't use ranlib 6660266072Sdes _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6661266072Sdes _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6662285206Sdes lt_tool_outputfile="@TOOL_OUTPUT@"~ 6663285206Sdes case $lt_outputfile in 6664285206Sdes *.exe|*.EXE) ;; 6665285206Sdes *) 6666285206Sdes lt_outputfile=$lt_outputfile.exe 6667285206Sdes lt_tool_outputfile=$lt_tool_outputfile.exe 6668285206Sdes ;; 6669285206Sdes esac~ 6670285206Sdes func_to_tool_file "$lt_outputfile"~ 6671285206Sdes if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6672285206Sdes $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6673285206Sdes $RM "$lt_outputfile.manifest"; 6674285206Sdes fi' 6675266072Sdes ;; 6676266072Sdes *) 6677266072Sdes # g++ 6678266072Sdes # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6679266072Sdes # as there is no search path for DLLs. 6680266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6681285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6682266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6683266072Sdes _LT_TAGVAR(always_export_symbols, $1)=no 6684266072Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6685266072Sdes 6686266072Sdes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6687285206Sdes _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' 6688285206Sdes # If the export-symbols file already is a .def file, use it as 6689285206Sdes # is; otherwise, prepend EXPORTS... 6690285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6691285206Sdes cp $export_symbols $output_objdir/$soname.def; 6692285206Sdes else 6693285206Sdes echo EXPORTS > $output_objdir/$soname.def; 6694285206Sdes cat $export_symbols >> $output_objdir/$soname.def; 6695285206Sdes fi~ 6696285206Sdes $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' 6697266072Sdes else 6698266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6699266072Sdes fi 6700266072Sdes ;; 6701266072Sdes esac 6702266072Sdes ;; 6703266072Sdes darwin* | rhapsody*) 6704266072Sdes _LT_DARWIN_LINKER_FEATURES($1) 6705266072Sdes ;; 6706266072Sdes 6707285206Sdes os2*) 6708285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6709285206Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes 6710285206Sdes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6711285206Sdes shrext_cmds=.dll 6712285206Sdes _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6713285206Sdes $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6714285206Sdes $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6715285206Sdes $ECHO EXPORTS >> $output_objdir/$libname.def~ 6716285206Sdes emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6717285206Sdes $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6718285206Sdes emximp -o $lib $output_objdir/$libname.def' 6719285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6720285206Sdes $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6721285206Sdes $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6722285206Sdes $ECHO EXPORTS >> $output_objdir/$libname.def~ 6723285206Sdes prefix_cmds="$SED"~ 6724285206Sdes if test EXPORTS = "`$SED 1q $export_symbols`"; then 6725285206Sdes prefix_cmds="$prefix_cmds -e 1d"; 6726285206Sdes fi~ 6727285206Sdes prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6728285206Sdes cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6729285206Sdes $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6730285206Sdes emximp -o $lib $output_objdir/$libname.def' 6731285206Sdes _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6732285206Sdes _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6733285206Sdes ;; 6734285206Sdes 6735266072Sdes dgux*) 6736266072Sdes case $cc_basename in 6737266072Sdes ec++*) 6738266072Sdes # FIXME: insert proper C++ library support 6739266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6740266072Sdes ;; 6741266072Sdes ghcx*) 6742266072Sdes # Green Hills C++ Compiler 6743266072Sdes # FIXME: insert proper C++ library support 6744266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6745266072Sdes ;; 6746266072Sdes *) 6747266072Sdes # FIXME: insert proper C++ library support 6748266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6749266072Sdes ;; 6750266072Sdes esac 6751266072Sdes ;; 6752266072Sdes 6753266072Sdes freebsd2.*) 6754266072Sdes # C++ shared libraries reported to be fairly broken before 6755266072Sdes # switch to ELF 6756266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6757266072Sdes ;; 6758266072Sdes 6759266072Sdes freebsd-elf*) 6760266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6761266072Sdes ;; 6762266072Sdes 6763266072Sdes freebsd* | dragonfly*) 6764266072Sdes # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6765266072Sdes # conventions 6766266072Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 6767266072Sdes ;; 6768266072Sdes 6769266072Sdes haiku*) 6770285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6771266072Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6772266072Sdes ;; 6773266072Sdes 6774266072Sdes hpux9*) 6775285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6776266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6777285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6778266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6779266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6780266072Sdes # but as the default 6781266072Sdes # location of the library. 6782266072Sdes 6783266072Sdes case $cc_basename in 6784266072Sdes CC*) 6785266072Sdes # FIXME: insert proper C++ library support 6786266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6787266072Sdes ;; 6788266072Sdes aCC*) 6789285206Sdes _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 6790266072Sdes # Commands to make compiler produce verbose output that lists 6791266072Sdes # what "hidden" libraries, object files and flags are used when 6792266072Sdes # linking a shared library. 6793266072Sdes # 6794266072Sdes # There doesn't appear to be a way to prevent this compiler from 6795266072Sdes # explicitly linking system object files so we need to strip them 6796266072Sdes # from the output so that they don't get included in the library 6797266072Sdes # dependencies. 6798285206Sdes 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"' 6799266072Sdes ;; 6800266072Sdes *) 6801285206Sdes if test yes = "$GXX"; then 6802285206Sdes _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 6803266072Sdes else 6804266072Sdes # FIXME: insert proper C++ library support 6805266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6806266072Sdes fi 6807266072Sdes ;; 6808266072Sdes esac 6809266072Sdes ;; 6810266072Sdes 6811266072Sdes hpux10*|hpux11*) 6812285206Sdes if test no = "$with_gnu_ld"; then 6813285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6814266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6815266072Sdes 6816266072Sdes case $host_cpu in 6817266072Sdes hppa*64*|ia64*) 6818266072Sdes ;; 6819266072Sdes *) 6820285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6821266072Sdes ;; 6822266072Sdes esac 6823266072Sdes fi 6824266072Sdes case $host_cpu in 6825266072Sdes hppa*64*|ia64*) 6826266072Sdes _LT_TAGVAR(hardcode_direct, $1)=no 6827266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6828266072Sdes ;; 6829266072Sdes *) 6830266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 6831266072Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6832266072Sdes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6833266072Sdes # but as the default 6834266072Sdes # location of the library. 6835266072Sdes ;; 6836266072Sdes esac 6837266072Sdes 6838266072Sdes case $cc_basename in 6839266072Sdes CC*) 6840266072Sdes # FIXME: insert proper C++ library support 6841266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6842266072Sdes ;; 6843266072Sdes aCC*) 6844266072Sdes case $host_cpu in 6845266072Sdes hppa*64*) 6846285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6847266072Sdes ;; 6848266072Sdes ia64*) 6849285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6850266072Sdes ;; 6851266072Sdes *) 6852285206Sdes _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' 6853266072Sdes ;; 6854266072Sdes esac 6855266072Sdes # Commands to make compiler produce verbose output that lists 6856266072Sdes # what "hidden" libraries, object files and flags are used when 6857266072Sdes # linking a shared library. 6858266072Sdes # 6859266072Sdes # There doesn't appear to be a way to prevent this compiler from 6860266072Sdes # explicitly linking system object files so we need to strip them 6861266072Sdes # from the output so that they don't get included in the library 6862266072Sdes # dependencies. 6863285206Sdes 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"' 6864266072Sdes ;; 6865266072Sdes *) 6866285206Sdes if test yes = "$GXX"; then 6867285206Sdes if test no = "$with_gnu_ld"; then 6868266072Sdes case $host_cpu in 6869266072Sdes hppa*64*) 6870285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6871266072Sdes ;; 6872266072Sdes ia64*) 6873285206Sdes _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' 6874266072Sdes ;; 6875266072Sdes *) 6876285206Sdes _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' 6877266072Sdes ;; 6878266072Sdes esac 6879266072Sdes fi 6880266072Sdes else 6881266072Sdes # FIXME: insert proper C++ library support 6882266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 6883266072Sdes fi 6884266072Sdes ;; 6885266072Sdes esac 6886266072Sdes ;; 6887266072Sdes 6888266072Sdes interix[[3-9]]*) 6889266072Sdes _LT_TAGVAR(hardcode_direct, $1)=no 6890266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6891285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6892285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6893266072Sdes # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6894266072Sdes # Instead, shared libraries are loaded at an image base (0x10000000 by 6895266072Sdes # default) and relocated if they conflict, which is a slow very memory 6896266072Sdes # consuming and fragmenting process. To avoid this, we pick a random, 6897266072Sdes # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6898266072Sdes # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6899285206Sdes _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' 6900285206Sdes _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' 6901266072Sdes ;; 6902266072Sdes irix5* | irix6*) 6903266072Sdes case $cc_basename in 6904266072Sdes CC*) 6905266072Sdes # SGI C++ 6906285206Sdes _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' 6907266072Sdes 6908266072Sdes # Archives containing C++ object files must be created using 6909266072Sdes # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6910266072Sdes # necessary to make sure instantiated templates are included 6911266072Sdes # in the archive. 6912266072Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6913266072Sdes ;; 6914266072Sdes *) 6915285206Sdes if test yes = "$GXX"; then 6916285206Sdes if test no = "$with_gnu_ld"; then 6917285206Sdes _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' 6918266072Sdes else 6919285206Sdes _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' 6920266072Sdes fi 6921266072Sdes fi 6922266072Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 6923266072Sdes ;; 6924266072Sdes esac 6925285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6926266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6927266072Sdes _LT_TAGVAR(inherit_rpath, $1)=yes 6928266072Sdes ;; 6929266072Sdes 6930285206Sdes linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6931266072Sdes case $cc_basename in 6932266072Sdes KCC*) 6933266072Sdes # Kuck and Associates, Inc. (KAI) C++ Compiler 6934266072Sdes 6935266072Sdes # KCC will only create a shared library if the output file 6936266072Sdes # ends with ".so" (or ".sl" for HP-UX), so rename the library 6937266072Sdes # to its proper name (with version) after linking. 6938285206Sdes _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' 6939285206Sdes _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' 6940266072Sdes # Commands to make compiler produce verbose output that lists 6941266072Sdes # what "hidden" libraries, object files and flags are used when 6942266072Sdes # linking a shared library. 6943266072Sdes # 6944266072Sdes # There doesn't appear to be a way to prevent this compiler from 6945266072Sdes # explicitly linking system object files so we need to strip them 6946266072Sdes # from the output so that they don't get included in the library 6947266072Sdes # dependencies. 6948285206Sdes 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"' 6949266072Sdes 6950285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6951285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6952266072Sdes 6953266072Sdes # Archives containing C++ object files must be created using 6954266072Sdes # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6955266072Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6956266072Sdes ;; 6957266072Sdes icpc* | ecpc* ) 6958266072Sdes # Intel C++ 6959266072Sdes with_gnu_ld=yes 6960266072Sdes # version 8.0 and above of icpc choke on multiply defined symbols 6961266072Sdes # if we add $predep_objects and $postdep_objects, however 7.1 and 6962266072Sdes # earlier do not add the objects themselves. 6963266072Sdes case `$CC -V 2>&1` in 6964266072Sdes *"Version 7."*) 6965285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6966285206Sdes _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' 6967266072Sdes ;; 6968266072Sdes *) # Version 8.0 or newer 6969266072Sdes tmp_idyn= 6970266072Sdes case $host_cpu in 6971266072Sdes ia64*) tmp_idyn=' -i_dynamic';; 6972266072Sdes esac 6973285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6974285206Sdes _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' 6975266072Sdes ;; 6976266072Sdes esac 6977266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6978285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6979285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6980285206Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6981266072Sdes ;; 6982266072Sdes pgCC* | pgcpp*) 6983266072Sdes # Portland Group C++ compiler 6984266072Sdes case `$CC -V` in 6985266072Sdes *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6986266072Sdes _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6987285206Sdes rm -rf $tpldir~ 6988285206Sdes $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6989285206Sdes compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6990266072Sdes _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6991285206Sdes rm -rf $tpldir~ 6992285206Sdes $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6993285206Sdes $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6994285206Sdes $RANLIB $oldlib' 6995266072Sdes _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6996285206Sdes rm -rf $tpldir~ 6997285206Sdes $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6998285206Sdes $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6999266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7000285206Sdes rm -rf $tpldir~ 7001285206Sdes $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7002285206Sdes $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' 7003266072Sdes ;; 7004266072Sdes *) # Version 6 and above use weak symbols 7005285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7006285206Sdes _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' 7007266072Sdes ;; 7008266072Sdes esac 7009266072Sdes 7010285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7011285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7012285206Sdes _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' 7013266072Sdes ;; 7014266072Sdes cxx*) 7015266072Sdes # Compaq C++ 7016285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7017285206Sdes _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' 7018266072Sdes 7019266072Sdes runpath_var=LD_RUN_PATH 7020266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7021266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7022266072Sdes 7023266072Sdes # Commands to make compiler produce verbose output that lists 7024266072Sdes # what "hidden" libraries, object files and flags are used when 7025266072Sdes # linking a shared library. 7026266072Sdes # 7027266072Sdes # There doesn't appear to be a way to prevent this compiler from 7028266072Sdes # explicitly linking system object files so we need to strip them 7029266072Sdes # from the output so that they don't get included in the library 7030266072Sdes # dependencies. 7031285206Sdes 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' 7032266072Sdes ;; 7033266072Sdes xl* | mpixl* | bgxl*) 7034266072Sdes # IBM XL 8.0 on PPC, with GNU ld 7035285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7036285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7037285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7038285206Sdes if test yes = "$supports_anon_versioning"; then 7039266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7040285206Sdes cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7041285206Sdes echo "local: *; };" >> $output_objdir/$libname.ver~ 7042285206Sdes $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7043266072Sdes fi 7044266072Sdes ;; 7045266072Sdes *) 7046266072Sdes case `$CC -V 2>&1 | sed 5q` in 7047266072Sdes *Sun\ C*) 7048266072Sdes # Sun C++ 5.9 7049266072Sdes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7050285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7051285206Sdes _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' 7052266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7053285206Sdes _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' 7054266072Sdes _LT_TAGVAR(compiler_needs_object, $1)=yes 7055266072Sdes 7056266072Sdes # Not sure whether something based on 7057266072Sdes # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7058266072Sdes # would be better. 7059266072Sdes output_verbose_link_cmd='func_echo_all' 7060266072Sdes 7061266072Sdes # Archives containing C++ object files must be created using 7062266072Sdes # "CC -xar", where "CC" is the Sun C++ compiler. This is 7063266072Sdes # necessary to make sure instantiated templates are included 7064266072Sdes # in the archive. 7065266072Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7066266072Sdes ;; 7067266072Sdes esac 7068266072Sdes ;; 7069266072Sdes esac 7070266072Sdes ;; 7071266072Sdes 7072266072Sdes lynxos*) 7073266072Sdes # FIXME: insert proper C++ library support 7074266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7075266072Sdes ;; 7076266072Sdes 7077266072Sdes m88k*) 7078266072Sdes # FIXME: insert proper C++ library support 7079266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7080266072Sdes ;; 7081266072Sdes 7082266072Sdes mvs*) 7083266072Sdes case $cc_basename in 7084266072Sdes cxx*) 7085266072Sdes # FIXME: insert proper C++ library support 7086266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7087266072Sdes ;; 7088266072Sdes *) 7089266072Sdes # FIXME: insert proper C++ library support 7090266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7091266072Sdes ;; 7092266072Sdes esac 7093266072Sdes ;; 7094266072Sdes 7095266072Sdes netbsd*) 7096266072Sdes if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7097266072Sdes _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7098266072Sdes wlarc= 7099266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7100266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 7101266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7102266072Sdes fi 7103266072Sdes # Workaround some broken pre-1.5 toolchains 7104266072Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7105266072Sdes ;; 7106266072Sdes 7107266072Sdes *nto* | *qnx*) 7108266072Sdes _LT_TAGVAR(ld_shlibs, $1)=yes 7109266072Sdes ;; 7110266072Sdes 7111285206Sdes openbsd* | bitrig*) 7112266072Sdes if test -f /usr/libexec/ld.so; then 7113266072Sdes _LT_TAGVAR(hardcode_direct, $1)=yes 7114266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7115266072Sdes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7116266072Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7117285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7118285206Sdes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7119285206Sdes _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' 7120285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7121285206Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7122266072Sdes fi 7123266072Sdes output_verbose_link_cmd=func_echo_all 7124266072Sdes else 7125266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7126266072Sdes fi 7127266072Sdes ;; 7128266072Sdes 7129266072Sdes osf3* | osf4* | osf5*) 7130266072Sdes case $cc_basename in 7131266072Sdes KCC*) 7132266072Sdes # Kuck and Associates, Inc. (KAI) C++ Compiler 7133266072Sdes 7134266072Sdes # KCC will only create a shared library if the output file 7135266072Sdes # ends with ".so" (or ".sl" for HP-UX), so rename the library 7136266072Sdes # to its proper name (with version) after linking. 7137285206Sdes _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' 7138266072Sdes 7139285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7140266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7141266072Sdes 7142266072Sdes # Archives containing C++ object files must be created using 7143266072Sdes # the KAI C++ compiler. 7144266072Sdes case $host in 7145266072Sdes osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7146266072Sdes *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7147266072Sdes esac 7148266072Sdes ;; 7149266072Sdes RCC*) 7150266072Sdes # Rational C++ 2.4.1 7151266072Sdes # FIXME: insert proper C++ library support 7152266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7153266072Sdes ;; 7154266072Sdes cxx*) 7155266072Sdes case $host in 7156266072Sdes osf3*) 7157285206Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7158285206Sdes _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' 7159285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7160266072Sdes ;; 7161266072Sdes *) 7162266072Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7163285206Sdes _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' 7164266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7165285206Sdes echo "-hidden">> $lib.exp~ 7166285206Sdes $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~ 7167285206Sdes $RM $lib.exp' 7168266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7169266072Sdes ;; 7170266072Sdes esac 7171266072Sdes 7172266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7173266072Sdes 7174266072Sdes # Commands to make compiler produce verbose output that lists 7175266072Sdes # what "hidden" libraries, object files and flags are used when 7176266072Sdes # linking a shared library. 7177266072Sdes # 7178266072Sdes # There doesn't appear to be a way to prevent this compiler from 7179266072Sdes # explicitly linking system object files so we need to strip them 7180266072Sdes # from the output so that they don't get included in the library 7181266072Sdes # dependencies. 7182285206Sdes 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"' 7183266072Sdes ;; 7184266072Sdes *) 7185285206Sdes if test yes,no = "$GXX,$with_gnu_ld"; then 7186285206Sdes _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7187266072Sdes case $host in 7188266072Sdes osf3*) 7189285206Sdes _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' 7190266072Sdes ;; 7191266072Sdes *) 7192285206Sdes _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' 7193266072Sdes ;; 7194266072Sdes esac 7195266072Sdes 7196285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7197266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7198266072Sdes 7199266072Sdes # Commands to make compiler produce verbose output that lists 7200266072Sdes # what "hidden" libraries, object files and flags are used when 7201266072Sdes # linking a shared library. 7202266072Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7203266072Sdes 7204266072Sdes else 7205266072Sdes # FIXME: insert proper C++ library support 7206266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7207266072Sdes fi 7208266072Sdes ;; 7209266072Sdes esac 7210266072Sdes ;; 7211266072Sdes 7212266072Sdes psos*) 7213266072Sdes # FIXME: insert proper C++ library support 7214266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7215266072Sdes ;; 7216266072Sdes 7217266072Sdes sunos4*) 7218266072Sdes case $cc_basename in 7219266072Sdes CC*) 7220266072Sdes # Sun C++ 4.x 7221266072Sdes # FIXME: insert proper C++ library support 7222266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7223266072Sdes ;; 7224266072Sdes lcc*) 7225266072Sdes # Lucid 7226266072Sdes # FIXME: insert proper C++ library support 7227266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7228266072Sdes ;; 7229266072Sdes *) 7230266072Sdes # FIXME: insert proper C++ library support 7231266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7232266072Sdes ;; 7233266072Sdes esac 7234266072Sdes ;; 7235266072Sdes 7236266072Sdes solaris*) 7237266072Sdes case $cc_basename in 7238266072Sdes CC* | sunCC*) 7239266072Sdes # Sun C++ 4.2, 5.x and Centerline C++ 7240266072Sdes _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7241266072Sdes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7242285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7243266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7244285206Sdes $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' 7245266072Sdes 7246266072Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7247266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7248266072Sdes case $host_os in 7249266072Sdes solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7250266072Sdes *) 7251266072Sdes # The compiler driver will combine and reorder linker options, 7252285206Sdes # but understands '-z linker_flag'. 7253266072Sdes # Supported since Solaris 2.6 (maybe 2.5.1?) 7254266072Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7255266072Sdes ;; 7256266072Sdes esac 7257266072Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 7258266072Sdes 7259266072Sdes output_verbose_link_cmd='func_echo_all' 7260266072Sdes 7261266072Sdes # Archives containing C++ object files must be created using 7262266072Sdes # "CC -xar", where "CC" is the Sun C++ compiler. This is 7263266072Sdes # necessary to make sure instantiated templates are included 7264266072Sdes # in the archive. 7265266072Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7266266072Sdes ;; 7267266072Sdes gcx*) 7268266072Sdes # Green Hills C++ Compiler 7269285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7270266072Sdes 7271266072Sdes # The C++ compiler must be used to create the archive. 7272266072Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7273266072Sdes ;; 7274266072Sdes *) 7275266072Sdes # GNU C++ compiler with Solaris linker 7276285206Sdes if test yes,no = "$GXX,$with_gnu_ld"; then 7277285206Sdes _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7278266072Sdes if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7279285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7280266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7281285206Sdes $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7282266072Sdes 7283266072Sdes # Commands to make compiler produce verbose output that lists 7284266072Sdes # what "hidden" libraries, object files and flags are used when 7285266072Sdes # linking a shared library. 7286266072Sdes output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7287266072Sdes else 7288285206Sdes # g++ 2.7 appears to require '-G' NOT '-shared' on this 7289266072Sdes # platform. 7290285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7291266072Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7292285206Sdes $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 7293266072Sdes 7294266072Sdes # Commands to make compiler produce verbose output that lists 7295266072Sdes # what "hidden" libraries, object files and flags are used when 7296266072Sdes # linking a shared library. 7297266072Sdes output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7298266072Sdes fi 7299266072Sdes 7300285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7301266072Sdes case $host_os in 7302266072Sdes solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7303266072Sdes *) 7304285206Sdes _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7305266072Sdes ;; 7306266072Sdes esac 7307266072Sdes fi 7308266072Sdes ;; 7309266072Sdes esac 7310266072Sdes ;; 7311266072Sdes 7312266072Sdes sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7313285206Sdes _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7314266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7315266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7316266072Sdes runpath_var='LD_RUN_PATH' 7317266072Sdes 7318266072Sdes case $cc_basename in 7319266072Sdes CC*) 7320285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7321285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7322266072Sdes ;; 7323266072Sdes *) 7324285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7325285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7326266072Sdes ;; 7327266072Sdes esac 7328266072Sdes ;; 7329266072Sdes 7330266072Sdes sysv5* | sco3.2v5* | sco5v6*) 7331285206Sdes # Note: We CANNOT use -z defs as we might desire, because we do not 7332266072Sdes # link with -lc, and that would cause any symbols used from libc to 7333266072Sdes # always be unresolved, which means just about no library would 7334266072Sdes # ever link correctly. If we're not using GNU ld we use -z text 7335266072Sdes # though, which does catch some bad symbols but isn't as heavy-handed 7336266072Sdes # as -z defs. 7337285206Sdes _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7338285206Sdes _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7339266072Sdes _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7340266072Sdes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7341285206Sdes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7342266072Sdes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7343266072Sdes _LT_TAGVAR(link_all_deplibs, $1)=yes 7344285206Sdes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7345266072Sdes runpath_var='LD_RUN_PATH' 7346266072Sdes 7347266072Sdes case $cc_basename in 7348266072Sdes CC*) 7349285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7350285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7351266072Sdes _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7352285206Sdes '"$_LT_TAGVAR(old_archive_cmds, $1)" 7353266072Sdes _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7354285206Sdes '"$_LT_TAGVAR(reload_cmds, $1)" 7355266072Sdes ;; 7356266072Sdes *) 7357285206Sdes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7358285206Sdes _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7359266072Sdes ;; 7360266072Sdes esac 7361266072Sdes ;; 7362266072Sdes 7363266072Sdes tandem*) 7364266072Sdes case $cc_basename in 7365266072Sdes NCC*) 7366266072Sdes # NonStop-UX NCC 3.20 7367266072Sdes # FIXME: insert proper C++ library support 7368266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7369266072Sdes ;; 7370266072Sdes *) 7371266072Sdes # FIXME: insert proper C++ library support 7372266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7373266072Sdes ;; 7374266072Sdes esac 7375266072Sdes ;; 7376266072Sdes 7377266072Sdes vxworks*) 7378266072Sdes # FIXME: insert proper C++ library support 7379266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7380266072Sdes ;; 7381266072Sdes 7382266072Sdes *) 7383266072Sdes # FIXME: insert proper C++ library support 7384266072Sdes _LT_TAGVAR(ld_shlibs, $1)=no 7385266072Sdes ;; 7386266072Sdes esac 7387266072Sdes 7388266072Sdes AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7389285206Sdes test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7390266072Sdes 7391285206Sdes _LT_TAGVAR(GCC, $1)=$GXX 7392285206Sdes _LT_TAGVAR(LD, $1)=$LD 7393266072Sdes 7394266072Sdes ## CAVEAT EMPTOR: 7395266072Sdes ## There is no encapsulation within the following macros, do not change 7396266072Sdes ## the running order or otherwise move them around unless you know exactly 7397266072Sdes ## what you are doing... 7398266072Sdes _LT_SYS_HIDDEN_LIBDEPS($1) 7399266072Sdes _LT_COMPILER_PIC($1) 7400266072Sdes _LT_COMPILER_C_O($1) 7401266072Sdes _LT_COMPILER_FILE_LOCKS($1) 7402266072Sdes _LT_LINKER_SHLIBS($1) 7403266072Sdes _LT_SYS_DYNAMIC_LINKER($1) 7404266072Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 7405266072Sdes 7406266072Sdes _LT_CONFIG($1) 7407266072Sdes fi # test -n "$compiler" 7408266072Sdes 7409266072Sdes CC=$lt_save_CC 7410266072Sdes CFLAGS=$lt_save_CFLAGS 7411266072Sdes LDCXX=$LD 7412266072Sdes LD=$lt_save_LD 7413266072Sdes GCC=$lt_save_GCC 7414266072Sdes with_gnu_ld=$lt_save_with_gnu_ld 7415266072Sdes lt_cv_path_LDCXX=$lt_cv_path_LD 7416266072Sdes lt_cv_path_LD=$lt_save_path_LD 7417266072Sdes lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7418266072Sdes lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7419285206Sdesfi # test yes != "$_lt_caught_CXX_error" 7420266072Sdes 7421266072SdesAC_LANG_POP 7422266072Sdes])# _LT_LANG_CXX_CONFIG 7423266072Sdes 7424266072Sdes 7425266072Sdes# _LT_FUNC_STRIPNAME_CNF 7426266072Sdes# ---------------------- 7427266072Sdes# func_stripname_cnf prefix suffix name 7428266072Sdes# strip PREFIX and SUFFIX off of NAME. 7429266072Sdes# PREFIX and SUFFIX must not contain globbing or regex special 7430266072Sdes# characters, hashes, percent signs, but SUFFIX may contain a leading 7431266072Sdes# dot (in which case that matches only a dot). 7432266072Sdes# 7433266072Sdes# This function is identical to the (non-XSI) version of func_stripname, 7434266072Sdes# except this one can be used by m4 code that may be executed by configure, 7435266072Sdes# rather than the libtool script. 7436266072Sdesm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7437266072SdesAC_REQUIRE([_LT_DECL_SED]) 7438266072SdesAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7439266072Sdesfunc_stripname_cnf () 7440266072Sdes{ 7441285206Sdes case @S|@2 in 7442285206Sdes .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7443285206Sdes *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7444266072Sdes esac 7445266072Sdes} # func_stripname_cnf 7446266072Sdes])# _LT_FUNC_STRIPNAME_CNF 7447266072Sdes 7448285206Sdes 7449266072Sdes# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7450266072Sdes# --------------------------------- 7451266072Sdes# Figure out "hidden" library dependencies from verbose 7452266072Sdes# compiler output when linking a shared library. 7453266072Sdes# Parse the compiler output and extract the necessary 7454266072Sdes# objects, libraries and library flags. 7455266072Sdesm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7456266072Sdes[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7457266072SdesAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7458266072Sdes# Dependencies to place before and after the object being linked: 7459266072Sdes_LT_TAGVAR(predep_objects, $1)= 7460266072Sdes_LT_TAGVAR(postdep_objects, $1)= 7461266072Sdes_LT_TAGVAR(predeps, $1)= 7462266072Sdes_LT_TAGVAR(postdeps, $1)= 7463266072Sdes_LT_TAGVAR(compiler_lib_search_path, $1)= 7464266072Sdes 7465266072Sdesdnl we can't use the lt_simple_compile_test_code here, 7466266072Sdesdnl because it contains code intended for an executable, 7467266072Sdesdnl not a library. It's possible we should let each 7468266072Sdesdnl tag define a new lt_????_link_test_code variable, 7469266072Sdesdnl but it's only used here... 7470266072Sdesm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7471266072Sdesint a; 7472266072Sdesvoid foo (void) { a = 0; } 7473266072Sdes_LT_EOF 7474266072Sdes], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7475266072Sdesclass Foo 7476266072Sdes{ 7477266072Sdespublic: 7478266072Sdes Foo (void) { a = 0; } 7479266072Sdesprivate: 7480266072Sdes int a; 7481266072Sdes}; 7482266072Sdes_LT_EOF 7483266072Sdes], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7484266072Sdes subroutine foo 7485266072Sdes implicit none 7486266072Sdes integer*4 a 7487266072Sdes a=0 7488266072Sdes return 7489266072Sdes end 7490266072Sdes_LT_EOF 7491266072Sdes], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7492266072Sdes subroutine foo 7493266072Sdes implicit none 7494266072Sdes integer a 7495266072Sdes a=0 7496266072Sdes return 7497266072Sdes end 7498266072Sdes_LT_EOF 7499266072Sdes], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7500266072Sdespublic class foo { 7501266072Sdes private int a; 7502266072Sdes public void bar (void) { 7503266072Sdes a = 0; 7504266072Sdes } 7505266072Sdes}; 7506266072Sdes_LT_EOF 7507266072Sdes], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7508266072Sdespackage foo 7509266072Sdesfunc foo() { 7510266072Sdes} 7511266072Sdes_LT_EOF 7512266072Sdes]) 7513266072Sdes 7514266072Sdes_lt_libdeps_save_CFLAGS=$CFLAGS 7515266072Sdescase "$CC $CFLAGS " in #( 7516266072Sdes*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7517266072Sdes*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7518266072Sdes*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7519266072Sdesesac 7520266072Sdes 7521266072Sdesdnl Parse the compiler output and extract the necessary 7522266072Sdesdnl objects, libraries and library flags. 7523266072Sdesif AC_TRY_EVAL(ac_compile); then 7524266072Sdes # Parse the compiler output and extract the necessary 7525266072Sdes # objects, libraries and library flags. 7526266072Sdes 7527266072Sdes # Sentinel used to keep track of whether or not we are before 7528266072Sdes # the conftest object file. 7529266072Sdes pre_test_object_deps_done=no 7530266072Sdes 7531266072Sdes for p in `eval "$output_verbose_link_cmd"`; do 7532285206Sdes case $prev$p in 7533266072Sdes 7534266072Sdes -L* | -R* | -l*) 7535266072Sdes # Some compilers place space between "-{L,R}" and the path. 7536266072Sdes # Remove the space. 7537285206Sdes if test x-L = "$p" || 7538285206Sdes test x-R = "$p"; then 7539266072Sdes prev=$p 7540266072Sdes continue 7541266072Sdes fi 7542266072Sdes 7543266072Sdes # Expand the sysroot to ease extracting the directories later. 7544266072Sdes if test -z "$prev"; then 7545266072Sdes case $p in 7546266072Sdes -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7547266072Sdes -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7548266072Sdes -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7549266072Sdes esac 7550266072Sdes fi 7551266072Sdes case $p in 7552266072Sdes =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7553266072Sdes esac 7554285206Sdes if test no = "$pre_test_object_deps_done"; then 7555285206Sdes case $prev in 7556266072Sdes -L | -R) 7557266072Sdes # Internal compiler library paths should come after those 7558266072Sdes # provided the user. The postdeps already come after the 7559266072Sdes # user supplied libs so there is no need to process them. 7560266072Sdes if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7561285206Sdes _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7562266072Sdes else 7563285206Sdes _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7564266072Sdes fi 7565266072Sdes ;; 7566266072Sdes # The "-l" case would never come before the object being 7567266072Sdes # linked, so don't bother handling this case. 7568266072Sdes esac 7569266072Sdes else 7570266072Sdes if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7571285206Sdes _LT_TAGVAR(postdeps, $1)=$prev$p 7572266072Sdes else 7573285206Sdes _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7574266072Sdes fi 7575266072Sdes fi 7576266072Sdes prev= 7577266072Sdes ;; 7578266072Sdes 7579266072Sdes *.lto.$objext) ;; # Ignore GCC LTO objects 7580266072Sdes *.$objext) 7581266072Sdes # This assumes that the test object file only shows up 7582266072Sdes # once in the compiler output. 7583266072Sdes if test "$p" = "conftest.$objext"; then 7584266072Sdes pre_test_object_deps_done=yes 7585266072Sdes continue 7586266072Sdes fi 7587266072Sdes 7588285206Sdes if test no = "$pre_test_object_deps_done"; then 7589266072Sdes if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7590285206Sdes _LT_TAGVAR(predep_objects, $1)=$p 7591266072Sdes else 7592266072Sdes _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7593266072Sdes fi 7594266072Sdes else 7595266072Sdes if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7596285206Sdes _LT_TAGVAR(postdep_objects, $1)=$p 7597266072Sdes else 7598266072Sdes _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7599266072Sdes fi 7600266072Sdes fi 7601266072Sdes ;; 7602266072Sdes 7603266072Sdes *) ;; # Ignore the rest. 7604266072Sdes 7605266072Sdes esac 7606266072Sdes done 7607266072Sdes 7608266072Sdes # Clean up. 7609266072Sdes rm -f a.out a.exe 7610266072Sdeselse 7611266072Sdes echo "libtool.m4: error: problem compiling $1 test program" 7612266072Sdesfi 7613266072Sdes 7614266072Sdes$RM -f confest.$objext 7615266072SdesCFLAGS=$_lt_libdeps_save_CFLAGS 7616266072Sdes 7617266072Sdes# PORTME: override above test on systems where it is broken 7618266072Sdesm4_if([$1], [CXX], 7619266072Sdes[case $host_os in 7620266072Sdesinterix[[3-9]]*) 7621266072Sdes # Interix 3.5 installs completely hosed .la files for C++, so rather than 7622266072Sdes # hack all around it, let's just trust "g++" to DTRT. 7623266072Sdes _LT_TAGVAR(predep_objects,$1)= 7624266072Sdes _LT_TAGVAR(postdep_objects,$1)= 7625266072Sdes _LT_TAGVAR(postdeps,$1)= 7626266072Sdes ;; 7627266072Sdesesac 7628266072Sdes]) 7629266072Sdes 7630266072Sdescase " $_LT_TAGVAR(postdeps, $1) " in 7631266072Sdes*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7632266072Sdesesac 7633266072Sdes _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7634266072Sdesif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7635285206Sdes _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7636266072Sdesfi 7637266072Sdes_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7638266072Sdes [The directories searched by this compiler when creating a shared library]) 7639266072Sdes_LT_TAGDECL([], [predep_objects], [1], 7640266072Sdes [Dependencies to place before and after the objects being linked to 7641266072Sdes create a shared library]) 7642266072Sdes_LT_TAGDECL([], [postdep_objects], [1]) 7643266072Sdes_LT_TAGDECL([], [predeps], [1]) 7644266072Sdes_LT_TAGDECL([], [postdeps], [1]) 7645266072Sdes_LT_TAGDECL([], [compiler_lib_search_path], [1], 7646266072Sdes [The library search path used internally by the compiler when linking 7647266072Sdes a shared library]) 7648266072Sdes])# _LT_SYS_HIDDEN_LIBDEPS 7649266072Sdes 7650266072Sdes 7651266072Sdes# _LT_LANG_F77_CONFIG([TAG]) 7652266072Sdes# -------------------------- 7653266072Sdes# Ensure that the configuration variables for a Fortran 77 compiler are 7654266072Sdes# suitably defined. These variables are subsequently used by _LT_CONFIG 7655285206Sdes# to write the compiler configuration to 'libtool'. 7656266072Sdesm4_defun([_LT_LANG_F77_CONFIG], 7657266072Sdes[AC_LANG_PUSH(Fortran 77) 7658285206Sdesif test -z "$F77" || test no = "$F77"; then 7659266072Sdes _lt_disable_F77=yes 7660266072Sdesfi 7661266072Sdes 7662266072Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7663266072Sdes_LT_TAGVAR(allow_undefined_flag, $1)= 7664266072Sdes_LT_TAGVAR(always_export_symbols, $1)=no 7665266072Sdes_LT_TAGVAR(archive_expsym_cmds, $1)= 7666266072Sdes_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7667266072Sdes_LT_TAGVAR(hardcode_direct, $1)=no 7668266072Sdes_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7669266072Sdes_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7670266072Sdes_LT_TAGVAR(hardcode_libdir_separator, $1)= 7671266072Sdes_LT_TAGVAR(hardcode_minus_L, $1)=no 7672266072Sdes_LT_TAGVAR(hardcode_automatic, $1)=no 7673266072Sdes_LT_TAGVAR(inherit_rpath, $1)=no 7674266072Sdes_LT_TAGVAR(module_cmds, $1)= 7675266072Sdes_LT_TAGVAR(module_expsym_cmds, $1)= 7676266072Sdes_LT_TAGVAR(link_all_deplibs, $1)=unknown 7677266072Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7678266072Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 7679266072Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7680266072Sdes_LT_TAGVAR(no_undefined_flag, $1)= 7681266072Sdes_LT_TAGVAR(whole_archive_flag_spec, $1)= 7682266072Sdes_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7683266072Sdes 7684266072Sdes# Source file extension for f77 test sources. 7685266072Sdesac_ext=f 7686266072Sdes 7687266072Sdes# Object file extension for compiled f77 test sources. 7688266072Sdesobjext=o 7689266072Sdes_LT_TAGVAR(objext, $1)=$objext 7690266072Sdes 7691266072Sdes# No sense in running all these tests if we already determined that 7692266072Sdes# the F77 compiler isn't working. Some variables (like enable_shared) 7693266072Sdes# are currently assumed to apply to all compilers on this platform, 7694266072Sdes# and will be corrupted by setting them based on a non-working compiler. 7695285206Sdesif test yes != "$_lt_disable_F77"; then 7696266072Sdes # Code to be used in simple compile tests 7697266072Sdes lt_simple_compile_test_code="\ 7698266072Sdes subroutine t 7699266072Sdes return 7700266072Sdes end 7701266072Sdes" 7702266072Sdes 7703266072Sdes # Code to be used in simple link tests 7704266072Sdes lt_simple_link_test_code="\ 7705266072Sdes program t 7706266072Sdes end 7707266072Sdes" 7708266072Sdes 7709266072Sdes # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7710266072Sdes _LT_TAG_COMPILER 7711266072Sdes 7712266072Sdes # save warnings/boilerplate of simple test code 7713266072Sdes _LT_COMPILER_BOILERPLATE 7714266072Sdes _LT_LINKER_BOILERPLATE 7715266072Sdes 7716266072Sdes # Allow CC to be a program name with arguments. 7717285206Sdes lt_save_CC=$CC 7718266072Sdes lt_save_GCC=$GCC 7719266072Sdes lt_save_CFLAGS=$CFLAGS 7720266072Sdes CC=${F77-"f77"} 7721266072Sdes CFLAGS=$FFLAGS 7722266072Sdes compiler=$CC 7723266072Sdes _LT_TAGVAR(compiler, $1)=$CC 7724266072Sdes _LT_CC_BASENAME([$compiler]) 7725266072Sdes GCC=$G77 7726266072Sdes if test -n "$compiler"; then 7727266072Sdes AC_MSG_CHECKING([if libtool supports shared libraries]) 7728266072Sdes AC_MSG_RESULT([$can_build_shared]) 7729266072Sdes 7730266072Sdes AC_MSG_CHECKING([whether to build shared libraries]) 7731285206Sdes test no = "$can_build_shared" && enable_shared=no 7732266072Sdes 7733266072Sdes # On AIX, shared libraries and static libraries use the same namespace, and 7734266072Sdes # are all built from PIC. 7735266072Sdes case $host_os in 7736266072Sdes aix3*) 7737285206Sdes test yes = "$enable_shared" && enable_static=no 7738266072Sdes if test -n "$RANLIB"; then 7739266072Sdes archive_cmds="$archive_cmds~\$RANLIB \$lib" 7740266072Sdes postinstall_cmds='$RANLIB $lib' 7741266072Sdes fi 7742266072Sdes ;; 7743266072Sdes aix[[4-9]]*) 7744285206Sdes if test ia64 != "$host_cpu"; then 7745285206Sdes case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7746285206Sdes yes,aix,yes) ;; # shared object as lib.so file only 7747285206Sdes yes,svr4,*) ;; # shared object as lib.so archive member only 7748285206Sdes yes,*) enable_static=no ;; # shared object in lib.a archive as well 7749285206Sdes esac 7750266072Sdes fi 7751266072Sdes ;; 7752266072Sdes esac 7753266072Sdes AC_MSG_RESULT([$enable_shared]) 7754266072Sdes 7755266072Sdes AC_MSG_CHECKING([whether to build static libraries]) 7756266072Sdes # Make sure either enable_shared or enable_static is yes. 7757285206Sdes test yes = "$enable_shared" || enable_static=yes 7758266072Sdes AC_MSG_RESULT([$enable_static]) 7759266072Sdes 7760285206Sdes _LT_TAGVAR(GCC, $1)=$G77 7761285206Sdes _LT_TAGVAR(LD, $1)=$LD 7762266072Sdes 7763266072Sdes ## CAVEAT EMPTOR: 7764266072Sdes ## There is no encapsulation within the following macros, do not change 7765266072Sdes ## the running order or otherwise move them around unless you know exactly 7766266072Sdes ## what you are doing... 7767266072Sdes _LT_COMPILER_PIC($1) 7768266072Sdes _LT_COMPILER_C_O($1) 7769266072Sdes _LT_COMPILER_FILE_LOCKS($1) 7770266072Sdes _LT_LINKER_SHLIBS($1) 7771266072Sdes _LT_SYS_DYNAMIC_LINKER($1) 7772266072Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 7773266072Sdes 7774266072Sdes _LT_CONFIG($1) 7775266072Sdes fi # test -n "$compiler" 7776266072Sdes 7777266072Sdes GCC=$lt_save_GCC 7778285206Sdes CC=$lt_save_CC 7779285206Sdes CFLAGS=$lt_save_CFLAGS 7780285206Sdesfi # test yes != "$_lt_disable_F77" 7781266072Sdes 7782266072SdesAC_LANG_POP 7783266072Sdes])# _LT_LANG_F77_CONFIG 7784266072Sdes 7785266072Sdes 7786266072Sdes# _LT_LANG_FC_CONFIG([TAG]) 7787266072Sdes# ------------------------- 7788266072Sdes# Ensure that the configuration variables for a Fortran compiler are 7789266072Sdes# suitably defined. These variables are subsequently used by _LT_CONFIG 7790285206Sdes# to write the compiler configuration to 'libtool'. 7791266072Sdesm4_defun([_LT_LANG_FC_CONFIG], 7792266072Sdes[AC_LANG_PUSH(Fortran) 7793266072Sdes 7794285206Sdesif test -z "$FC" || test no = "$FC"; then 7795266072Sdes _lt_disable_FC=yes 7796266072Sdesfi 7797266072Sdes 7798266072Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7799266072Sdes_LT_TAGVAR(allow_undefined_flag, $1)= 7800266072Sdes_LT_TAGVAR(always_export_symbols, $1)=no 7801266072Sdes_LT_TAGVAR(archive_expsym_cmds, $1)= 7802266072Sdes_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7803266072Sdes_LT_TAGVAR(hardcode_direct, $1)=no 7804266072Sdes_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7805266072Sdes_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7806266072Sdes_LT_TAGVAR(hardcode_libdir_separator, $1)= 7807266072Sdes_LT_TAGVAR(hardcode_minus_L, $1)=no 7808266072Sdes_LT_TAGVAR(hardcode_automatic, $1)=no 7809266072Sdes_LT_TAGVAR(inherit_rpath, $1)=no 7810266072Sdes_LT_TAGVAR(module_cmds, $1)= 7811266072Sdes_LT_TAGVAR(module_expsym_cmds, $1)= 7812266072Sdes_LT_TAGVAR(link_all_deplibs, $1)=unknown 7813266072Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7814266072Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 7815266072Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7816266072Sdes_LT_TAGVAR(no_undefined_flag, $1)= 7817266072Sdes_LT_TAGVAR(whole_archive_flag_spec, $1)= 7818266072Sdes_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7819266072Sdes 7820266072Sdes# Source file extension for fc test sources. 7821266072Sdesac_ext=${ac_fc_srcext-f} 7822266072Sdes 7823266072Sdes# Object file extension for compiled fc test sources. 7824266072Sdesobjext=o 7825266072Sdes_LT_TAGVAR(objext, $1)=$objext 7826266072Sdes 7827266072Sdes# No sense in running all these tests if we already determined that 7828266072Sdes# the FC compiler isn't working. Some variables (like enable_shared) 7829266072Sdes# are currently assumed to apply to all compilers on this platform, 7830266072Sdes# and will be corrupted by setting them based on a non-working compiler. 7831285206Sdesif test yes != "$_lt_disable_FC"; then 7832266072Sdes # Code to be used in simple compile tests 7833266072Sdes lt_simple_compile_test_code="\ 7834266072Sdes subroutine t 7835266072Sdes return 7836266072Sdes end 7837266072Sdes" 7838266072Sdes 7839266072Sdes # Code to be used in simple link tests 7840266072Sdes lt_simple_link_test_code="\ 7841266072Sdes program t 7842266072Sdes end 7843266072Sdes" 7844266072Sdes 7845266072Sdes # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7846266072Sdes _LT_TAG_COMPILER 7847266072Sdes 7848266072Sdes # save warnings/boilerplate of simple test code 7849266072Sdes _LT_COMPILER_BOILERPLATE 7850266072Sdes _LT_LINKER_BOILERPLATE 7851266072Sdes 7852266072Sdes # Allow CC to be a program name with arguments. 7853285206Sdes lt_save_CC=$CC 7854266072Sdes lt_save_GCC=$GCC 7855266072Sdes lt_save_CFLAGS=$CFLAGS 7856266072Sdes CC=${FC-"f95"} 7857266072Sdes CFLAGS=$FCFLAGS 7858266072Sdes compiler=$CC 7859266072Sdes GCC=$ac_cv_fc_compiler_gnu 7860266072Sdes 7861266072Sdes _LT_TAGVAR(compiler, $1)=$CC 7862266072Sdes _LT_CC_BASENAME([$compiler]) 7863266072Sdes 7864266072Sdes if test -n "$compiler"; then 7865266072Sdes AC_MSG_CHECKING([if libtool supports shared libraries]) 7866266072Sdes AC_MSG_RESULT([$can_build_shared]) 7867266072Sdes 7868266072Sdes AC_MSG_CHECKING([whether to build shared libraries]) 7869285206Sdes test no = "$can_build_shared" && enable_shared=no 7870266072Sdes 7871266072Sdes # On AIX, shared libraries and static libraries use the same namespace, and 7872266072Sdes # are all built from PIC. 7873266072Sdes case $host_os in 7874266072Sdes aix3*) 7875285206Sdes test yes = "$enable_shared" && enable_static=no 7876266072Sdes if test -n "$RANLIB"; then 7877266072Sdes archive_cmds="$archive_cmds~\$RANLIB \$lib" 7878266072Sdes postinstall_cmds='$RANLIB $lib' 7879266072Sdes fi 7880266072Sdes ;; 7881266072Sdes aix[[4-9]]*) 7882285206Sdes if test ia64 != "$host_cpu"; then 7883285206Sdes case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7884285206Sdes yes,aix,yes) ;; # shared object as lib.so file only 7885285206Sdes yes,svr4,*) ;; # shared object as lib.so archive member only 7886285206Sdes yes,*) enable_static=no ;; # shared object in lib.a archive as well 7887285206Sdes esac 7888266072Sdes fi 7889266072Sdes ;; 7890266072Sdes esac 7891266072Sdes AC_MSG_RESULT([$enable_shared]) 7892266072Sdes 7893266072Sdes AC_MSG_CHECKING([whether to build static libraries]) 7894266072Sdes # Make sure either enable_shared or enable_static is yes. 7895285206Sdes test yes = "$enable_shared" || enable_static=yes 7896266072Sdes AC_MSG_RESULT([$enable_static]) 7897266072Sdes 7898285206Sdes _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7899285206Sdes _LT_TAGVAR(LD, $1)=$LD 7900266072Sdes 7901266072Sdes ## CAVEAT EMPTOR: 7902266072Sdes ## There is no encapsulation within the following macros, do not change 7903266072Sdes ## the running order or otherwise move them around unless you know exactly 7904266072Sdes ## what you are doing... 7905266072Sdes _LT_SYS_HIDDEN_LIBDEPS($1) 7906266072Sdes _LT_COMPILER_PIC($1) 7907266072Sdes _LT_COMPILER_C_O($1) 7908266072Sdes _LT_COMPILER_FILE_LOCKS($1) 7909266072Sdes _LT_LINKER_SHLIBS($1) 7910266072Sdes _LT_SYS_DYNAMIC_LINKER($1) 7911266072Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 7912266072Sdes 7913266072Sdes _LT_CONFIG($1) 7914266072Sdes fi # test -n "$compiler" 7915266072Sdes 7916266072Sdes GCC=$lt_save_GCC 7917266072Sdes CC=$lt_save_CC 7918266072Sdes CFLAGS=$lt_save_CFLAGS 7919285206Sdesfi # test yes != "$_lt_disable_FC" 7920266072Sdes 7921266072SdesAC_LANG_POP 7922266072Sdes])# _LT_LANG_FC_CONFIG 7923266072Sdes 7924266072Sdes 7925266072Sdes# _LT_LANG_GCJ_CONFIG([TAG]) 7926266072Sdes# -------------------------- 7927266072Sdes# Ensure that the configuration variables for the GNU Java Compiler compiler 7928266072Sdes# are suitably defined. These variables are subsequently used by _LT_CONFIG 7929285206Sdes# to write the compiler configuration to 'libtool'. 7930266072Sdesm4_defun([_LT_LANG_GCJ_CONFIG], 7931266072Sdes[AC_REQUIRE([LT_PROG_GCJ])dnl 7932266072SdesAC_LANG_SAVE 7933266072Sdes 7934266072Sdes# Source file extension for Java test sources. 7935266072Sdesac_ext=java 7936266072Sdes 7937266072Sdes# Object file extension for compiled Java test sources. 7938266072Sdesobjext=o 7939266072Sdes_LT_TAGVAR(objext, $1)=$objext 7940266072Sdes 7941266072Sdes# Code to be used in simple compile tests 7942266072Sdeslt_simple_compile_test_code="class foo {}" 7943266072Sdes 7944266072Sdes# Code to be used in simple link tests 7945266072Sdeslt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7946266072Sdes 7947266072Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7948266072Sdes_LT_TAG_COMPILER 7949266072Sdes 7950266072Sdes# save warnings/boilerplate of simple test code 7951266072Sdes_LT_COMPILER_BOILERPLATE 7952266072Sdes_LT_LINKER_BOILERPLATE 7953266072Sdes 7954266072Sdes# Allow CC to be a program name with arguments. 7955266072Sdeslt_save_CC=$CC 7956266072Sdeslt_save_CFLAGS=$CFLAGS 7957266072Sdeslt_save_GCC=$GCC 7958266072SdesGCC=yes 7959266072SdesCC=${GCJ-"gcj"} 7960266072SdesCFLAGS=$GCJFLAGS 7961266072Sdescompiler=$CC 7962266072Sdes_LT_TAGVAR(compiler, $1)=$CC 7963285206Sdes_LT_TAGVAR(LD, $1)=$LD 7964266072Sdes_LT_CC_BASENAME([$compiler]) 7965266072Sdes 7966266072Sdes# GCJ did not exist at the time GCC didn't implicitly link libc in. 7967266072Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7968266072Sdes 7969266072Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7970266072Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 7971266072Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7972266072Sdes 7973266072Sdes## CAVEAT EMPTOR: 7974266072Sdes## There is no encapsulation within the following macros, do not change 7975266072Sdes## the running order or otherwise move them around unless you know exactly 7976266072Sdes## what you are doing... 7977266072Sdesif test -n "$compiler"; then 7978266072Sdes _LT_COMPILER_NO_RTTI($1) 7979266072Sdes _LT_COMPILER_PIC($1) 7980266072Sdes _LT_COMPILER_C_O($1) 7981266072Sdes _LT_COMPILER_FILE_LOCKS($1) 7982266072Sdes _LT_LINKER_SHLIBS($1) 7983266072Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 7984266072Sdes 7985266072Sdes _LT_CONFIG($1) 7986266072Sdesfi 7987266072Sdes 7988266072SdesAC_LANG_RESTORE 7989266072Sdes 7990266072SdesGCC=$lt_save_GCC 7991266072SdesCC=$lt_save_CC 7992266072SdesCFLAGS=$lt_save_CFLAGS 7993266072Sdes])# _LT_LANG_GCJ_CONFIG 7994266072Sdes 7995266072Sdes 7996266072Sdes# _LT_LANG_GO_CONFIG([TAG]) 7997266072Sdes# -------------------------- 7998266072Sdes# Ensure that the configuration variables for the GNU Go compiler 7999266072Sdes# are suitably defined. These variables are subsequently used by _LT_CONFIG 8000285206Sdes# to write the compiler configuration to 'libtool'. 8001266072Sdesm4_defun([_LT_LANG_GO_CONFIG], 8002266072Sdes[AC_REQUIRE([LT_PROG_GO])dnl 8003266072SdesAC_LANG_SAVE 8004266072Sdes 8005266072Sdes# Source file extension for Go test sources. 8006266072Sdesac_ext=go 8007266072Sdes 8008266072Sdes# Object file extension for compiled Go test sources. 8009266072Sdesobjext=o 8010266072Sdes_LT_TAGVAR(objext, $1)=$objext 8011266072Sdes 8012266072Sdes# Code to be used in simple compile tests 8013266072Sdeslt_simple_compile_test_code="package main; func main() { }" 8014266072Sdes 8015266072Sdes# Code to be used in simple link tests 8016266072Sdeslt_simple_link_test_code='package main; func main() { }' 8017266072Sdes 8018266072Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8019266072Sdes_LT_TAG_COMPILER 8020266072Sdes 8021266072Sdes# save warnings/boilerplate of simple test code 8022266072Sdes_LT_COMPILER_BOILERPLATE 8023266072Sdes_LT_LINKER_BOILERPLATE 8024266072Sdes 8025266072Sdes# Allow CC to be a program name with arguments. 8026266072Sdeslt_save_CC=$CC 8027266072Sdeslt_save_CFLAGS=$CFLAGS 8028266072Sdeslt_save_GCC=$GCC 8029266072SdesGCC=yes 8030266072SdesCC=${GOC-"gccgo"} 8031266072SdesCFLAGS=$GOFLAGS 8032266072Sdescompiler=$CC 8033266072Sdes_LT_TAGVAR(compiler, $1)=$CC 8034285206Sdes_LT_TAGVAR(LD, $1)=$LD 8035266072Sdes_LT_CC_BASENAME([$compiler]) 8036266072Sdes 8037266072Sdes# Go did not exist at the time GCC didn't implicitly link libc in. 8038266072Sdes_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8039266072Sdes 8040266072Sdes_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8041266072Sdes_LT_TAGVAR(reload_flag, $1)=$reload_flag 8042266072Sdes_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8043266072Sdes 8044266072Sdes## CAVEAT EMPTOR: 8045266072Sdes## There is no encapsulation within the following macros, do not change 8046266072Sdes## the running order or otherwise move them around unless you know exactly 8047266072Sdes## what you are doing... 8048266072Sdesif test -n "$compiler"; then 8049266072Sdes _LT_COMPILER_NO_RTTI($1) 8050266072Sdes _LT_COMPILER_PIC($1) 8051266072Sdes _LT_COMPILER_C_O($1) 8052266072Sdes _LT_COMPILER_FILE_LOCKS($1) 8053266072Sdes _LT_LINKER_SHLIBS($1) 8054266072Sdes _LT_LINKER_HARDCODE_LIBPATH($1) 8055266072Sdes 8056266072Sdes _LT_CONFIG($1) 8057266072Sdesfi 8058266072Sdes 8059266072SdesAC_LANG_RESTORE 8060266072Sdes 8061266072SdesGCC=$lt_save_GCC 8062266072SdesCC=$lt_save_CC 8063266072SdesCFLAGS=$lt_save_CFLAGS 8064266072Sdes])# _LT_LANG_GO_CONFIG 8065266072Sdes 8066266072Sdes 8067266072Sdes# _LT_LANG_RC_CONFIG([TAG]) 8068266072Sdes# ------------------------- 8069266072Sdes# Ensure that the configuration variables for the Windows resource compiler 8070266072Sdes# are suitably defined. These variables are subsequently used by _LT_CONFIG 8071285206Sdes# to write the compiler configuration to 'libtool'. 8072266072Sdesm4_defun([_LT_LANG_RC_CONFIG], 8073266072Sdes[AC_REQUIRE([LT_PROG_RC])dnl 8074266072SdesAC_LANG_SAVE 8075266072Sdes 8076266072Sdes# Source file extension for RC test sources. 8077266072Sdesac_ext=rc 8078266072Sdes 8079266072Sdes# Object file extension for compiled RC test sources. 8080266072Sdesobjext=o 8081266072Sdes_LT_TAGVAR(objext, $1)=$objext 8082266072Sdes 8083266072Sdes# Code to be used in simple compile tests 8084266072Sdeslt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8085266072Sdes 8086266072Sdes# Code to be used in simple link tests 8087285206Sdeslt_simple_link_test_code=$lt_simple_compile_test_code 8088266072Sdes 8089266072Sdes# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8090266072Sdes_LT_TAG_COMPILER 8091266072Sdes 8092266072Sdes# save warnings/boilerplate of simple test code 8093266072Sdes_LT_COMPILER_BOILERPLATE 8094266072Sdes_LT_LINKER_BOILERPLATE 8095266072Sdes 8096266072Sdes# Allow CC to be a program name with arguments. 8097285206Sdeslt_save_CC=$CC 8098266072Sdeslt_save_CFLAGS=$CFLAGS 8099266072Sdeslt_save_GCC=$GCC 8100266072SdesGCC= 8101266072SdesCC=${RC-"windres"} 8102266072SdesCFLAGS= 8103266072Sdescompiler=$CC 8104266072Sdes_LT_TAGVAR(compiler, $1)=$CC 8105266072Sdes_LT_CC_BASENAME([$compiler]) 8106266072Sdes_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8107266072Sdes 8108266072Sdesif test -n "$compiler"; then 8109266072Sdes : 8110266072Sdes _LT_CONFIG($1) 8111266072Sdesfi 8112266072Sdes 8113266072SdesGCC=$lt_save_GCC 8114266072SdesAC_LANG_RESTORE 8115266072SdesCC=$lt_save_CC 8116266072SdesCFLAGS=$lt_save_CFLAGS 8117266072Sdes])# _LT_LANG_RC_CONFIG 8118266072Sdes 8119266072Sdes 8120266072Sdes# LT_PROG_GCJ 8121266072Sdes# ----------- 8122266072SdesAC_DEFUN([LT_PROG_GCJ], 8123266072Sdes[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8124266072Sdes [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8125266072Sdes [AC_CHECK_TOOL(GCJ, gcj,) 8126285206Sdes test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8127266072Sdes AC_SUBST(GCJFLAGS)])])[]dnl 8128266072Sdes]) 8129266072Sdes 8130266072Sdes# Old name: 8131266072SdesAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8132266072Sdesdnl aclocal-1.4 backwards compatibility: 8133266072Sdesdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8134266072Sdes 8135266072Sdes 8136266072Sdes# LT_PROG_GO 8137266072Sdes# ---------- 8138266072SdesAC_DEFUN([LT_PROG_GO], 8139266072Sdes[AC_CHECK_TOOL(GOC, gccgo,) 8140266072Sdes]) 8141266072Sdes 8142266072Sdes 8143266072Sdes# LT_PROG_RC 8144266072Sdes# ---------- 8145266072SdesAC_DEFUN([LT_PROG_RC], 8146266072Sdes[AC_CHECK_TOOL(RC, windres,) 8147266072Sdes]) 8148266072Sdes 8149266072Sdes# Old name: 8150266072SdesAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8151266072Sdesdnl aclocal-1.4 backwards compatibility: 8152266072Sdesdnl AC_DEFUN([LT_AC_PROG_RC], []) 8153266072Sdes 8154266072Sdes 8155266072Sdes# _LT_DECL_EGREP 8156266072Sdes# -------------- 8157266072Sdes# If we don't have a new enough Autoconf to choose the best grep 8158266072Sdes# available, choose the one first in the user's PATH. 8159266072Sdesm4_defun([_LT_DECL_EGREP], 8160266072Sdes[AC_REQUIRE([AC_PROG_EGREP])dnl 8161266072SdesAC_REQUIRE([AC_PROG_FGREP])dnl 8162266072Sdestest -z "$GREP" && GREP=grep 8163266072Sdes_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8164266072Sdes_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8165266072Sdes_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8166266072Sdesdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8167266072SdesAC_SUBST([GREP]) 8168266072Sdes]) 8169266072Sdes 8170266072Sdes 8171266072Sdes# _LT_DECL_OBJDUMP 8172266072Sdes# -------------- 8173266072Sdes# If we don't have a new enough Autoconf to choose the best objdump 8174266072Sdes# available, choose the one first in the user's PATH. 8175266072Sdesm4_defun([_LT_DECL_OBJDUMP], 8176266072Sdes[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8177266072Sdestest -z "$OBJDUMP" && OBJDUMP=objdump 8178266072Sdes_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8179266072SdesAC_SUBST([OBJDUMP]) 8180266072Sdes]) 8181266072Sdes 8182266072Sdes# _LT_DECL_DLLTOOL 8183266072Sdes# ---------------- 8184266072Sdes# Ensure DLLTOOL variable is set. 8185266072Sdesm4_defun([_LT_DECL_DLLTOOL], 8186266072Sdes[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8187266072Sdestest -z "$DLLTOOL" && DLLTOOL=dlltool 8188266072Sdes_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8189266072SdesAC_SUBST([DLLTOOL]) 8190266072Sdes]) 8191266072Sdes 8192266072Sdes# _LT_DECL_SED 8193266072Sdes# ------------ 8194266072Sdes# Check for a fully-functional sed program, that truncates 8195266072Sdes# as few characters as possible. Prefer GNU sed if found. 8196266072Sdesm4_defun([_LT_DECL_SED], 8197266072Sdes[AC_PROG_SED 8198266072Sdestest -z "$SED" && SED=sed 8199266072SdesXsed="$SED -e 1s/^X//" 8200266072Sdes_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8201266072Sdes_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8202266072Sdes [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8203266072Sdes])# _LT_DECL_SED 8204266072Sdes 8205266072Sdesm4_ifndef([AC_PROG_SED], [ 8206266072Sdes############################################################ 8207266072Sdes# NOTE: This macro has been submitted for inclusion into # 8208266072Sdes# GNU Autoconf as AC_PROG_SED. When it is available in # 8209266072Sdes# a released version of Autoconf we should remove this # 8210266072Sdes# macro and use it instead. # 8211266072Sdes############################################################ 8212266072Sdes 8213266072Sdesm4_defun([AC_PROG_SED], 8214266072Sdes[AC_MSG_CHECKING([for a sed that does not truncate output]) 8215266072SdesAC_CACHE_VAL(lt_cv_path_SED, 8216266072Sdes[# Loop through the user's path and test for sed and gsed. 8217266072Sdes# Then use that list of sed's as ones to test for truncation. 8218266072Sdesas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8219266072Sdesfor as_dir in $PATH 8220266072Sdesdo 8221266072Sdes IFS=$as_save_IFS 8222266072Sdes test -z "$as_dir" && as_dir=. 8223266072Sdes for lt_ac_prog in sed gsed; do 8224266072Sdes for ac_exec_ext in '' $ac_executable_extensions; do 8225266072Sdes if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8226266072Sdes lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8227266072Sdes fi 8228266072Sdes done 8229266072Sdes done 8230266072Sdesdone 8231266072SdesIFS=$as_save_IFS 8232266072Sdeslt_ac_max=0 8233266072Sdeslt_ac_count=0 8234266072Sdes# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8235266072Sdes# along with /bin/sed that truncates output. 8236266072Sdesfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8237285206Sdes test ! -f "$lt_ac_sed" && continue 8238266072Sdes cat /dev/null > conftest.in 8239266072Sdes lt_ac_count=0 8240266072Sdes echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8241266072Sdes # Check for GNU sed and select it if it is found. 8242266072Sdes if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8243266072Sdes lt_cv_path_SED=$lt_ac_sed 8244266072Sdes break 8245266072Sdes fi 8246266072Sdes while true; do 8247266072Sdes cat conftest.in conftest.in >conftest.tmp 8248266072Sdes mv conftest.tmp conftest.in 8249266072Sdes cp conftest.in conftest.nl 8250266072Sdes echo >>conftest.nl 8251266072Sdes $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8252266072Sdes cmp -s conftest.out conftest.nl || break 8253266072Sdes # 10000 chars as input seems more than enough 8254285206Sdes test 10 -lt "$lt_ac_count" && break 8255266072Sdes lt_ac_count=`expr $lt_ac_count + 1` 8256285206Sdes if test "$lt_ac_count" -gt "$lt_ac_max"; then 8257266072Sdes lt_ac_max=$lt_ac_count 8258266072Sdes lt_cv_path_SED=$lt_ac_sed 8259266072Sdes fi 8260266072Sdes done 8261266072Sdesdone 8262266072Sdes]) 8263266072SdesSED=$lt_cv_path_SED 8264266072SdesAC_SUBST([SED]) 8265266072SdesAC_MSG_RESULT([$SED]) 8266266072Sdes])#AC_PROG_SED 8267266072Sdes])#m4_ifndef 8268266072Sdes 8269266072Sdes# Old name: 8270266072SdesAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8271266072Sdesdnl aclocal-1.4 backwards compatibility: 8272266072Sdesdnl AC_DEFUN([LT_AC_PROG_SED], []) 8273266072Sdes 8274266072Sdes 8275266072Sdes# _LT_CHECK_SHELL_FEATURES 8276266072Sdes# ------------------------ 8277266072Sdes# Find out whether the shell is Bourne or XSI compatible, 8278266072Sdes# or has some other useful features. 8279266072Sdesm4_defun([_LT_CHECK_SHELL_FEATURES], 8280285206Sdes[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8281266072Sdes lt_unset=unset 8282266072Sdeselse 8283266072Sdes lt_unset=false 8284266072Sdesfi 8285266072Sdes_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8286266072Sdes 8287266072Sdes# test EBCDIC or ASCII 8288266072Sdescase `echo X|tr X '\101'` in 8289266072Sdes A) # ASCII based system 8290266072Sdes # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8291266072Sdes lt_SP2NL='tr \040 \012' 8292266072Sdes lt_NL2SP='tr \015\012 \040\040' 8293266072Sdes ;; 8294266072Sdes *) # EBCDIC based system 8295266072Sdes lt_SP2NL='tr \100 \n' 8296266072Sdes lt_NL2SP='tr \r\n \100\100' 8297266072Sdes ;; 8298266072Sdesesac 8299266072Sdes_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8300266072Sdes_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8301266072Sdes])# _LT_CHECK_SHELL_FEATURES 8302266072Sdes 8303266072Sdes 8304266072Sdes# _LT_PATH_CONVERSION_FUNCTIONS 8305266072Sdes# ----------------------------- 8306285206Sdes# Determine what file name conversion functions should be used by 8307266072Sdes# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8308266072Sdes# for certain cross-compile configurations and native mingw. 8309266072Sdesm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8310266072Sdes[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8311266072SdesAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8312266072SdesAC_MSG_CHECKING([how to convert $build file names to $host format]) 8313266072SdesAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8314266072Sdes[case $host in 8315266072Sdes *-*-mingw* ) 8316266072Sdes case $build in 8317266072Sdes *-*-mingw* ) # actually msys 8318266072Sdes lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8319266072Sdes ;; 8320266072Sdes *-*-cygwin* ) 8321266072Sdes lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8322266072Sdes ;; 8323266072Sdes * ) # otherwise, assume *nix 8324266072Sdes lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8325266072Sdes ;; 8326266072Sdes esac 8327266072Sdes ;; 8328266072Sdes *-*-cygwin* ) 8329266072Sdes case $build in 8330266072Sdes *-*-mingw* ) # actually msys 8331266072Sdes lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8332266072Sdes ;; 8333266072Sdes *-*-cygwin* ) 8334266072Sdes lt_cv_to_host_file_cmd=func_convert_file_noop 8335266072Sdes ;; 8336266072Sdes * ) # otherwise, assume *nix 8337266072Sdes lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8338266072Sdes ;; 8339266072Sdes esac 8340266072Sdes ;; 8341266072Sdes * ) # unhandled hosts (and "normal" native builds) 8342266072Sdes lt_cv_to_host_file_cmd=func_convert_file_noop 8343266072Sdes ;; 8344266072Sdesesac 8345266072Sdes]) 8346266072Sdesto_host_file_cmd=$lt_cv_to_host_file_cmd 8347266072SdesAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8348266072Sdes_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8349266072Sdes [0], [convert $build file names to $host format])dnl 8350266072Sdes 8351266072SdesAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8352266072SdesAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8353266072Sdes[#assume ordinary cross tools, or native build. 8354266072Sdeslt_cv_to_tool_file_cmd=func_convert_file_noop 8355266072Sdescase $host in 8356266072Sdes *-*-mingw* ) 8357266072Sdes case $build in 8358266072Sdes *-*-mingw* ) # actually msys 8359266072Sdes lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8360266072Sdes ;; 8361266072Sdes esac 8362266072Sdes ;; 8363266072Sdesesac 8364266072Sdes]) 8365266072Sdesto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8366266072SdesAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8367266072Sdes_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8368266072Sdes [0], [convert $build files to toolchain format])dnl 8369266072Sdes])# _LT_PATH_CONVERSION_FUNCTIONS 8370