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