110f94802Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 210f94802Smrg# 310f94802Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 410f94802Smrg# Foundation, Inc. 510f94802Smrg# Written by Gordon Matzigkeit, 1996 610f94802Smrg# 710f94802Smrg# This file is free software; the Free Software Foundation gives 810f94802Smrg# unlimited permission to copy and/or distribute it, with or without 910f94802Smrg# modifications, as long as this notice is preserved. 1010f94802Smrg 1110f94802Smrgm4_define([_LT_COPYING], [dnl 1210f94802Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 1310f94802Smrg# This is free software; see the source for copying conditions. There is NO 1410f94802Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 1510f94802Smrg 1610f94802Smrg# GNU Libtool is free software; you can redistribute it and/or modify 1710f94802Smrg# it under the terms of the GNU General Public License as published by 1810f94802Smrg# the Free Software Foundation; either version 2 of of the License, or 1910f94802Smrg# (at your option) any later version. 2010f94802Smrg# 2110f94802Smrg# As a special exception to the GNU General Public License, if you 2210f94802Smrg# distribute this file as part of a program or library that is built 2310f94802Smrg# using GNU Libtool, you may include this file under the same 2410f94802Smrg# distribution terms that you use for the rest of that program. 2510f94802Smrg# 2610f94802Smrg# GNU Libtool is distributed in the hope that it will be useful, but 2710f94802Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2810f94802Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2910f94802Smrg# GNU General Public License for more details. 3010f94802Smrg# 3110f94802Smrg# You should have received a copy of the GNU General Public License 3210f94802Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 3310f94802Smrg]) 3410f94802Smrg 3510f94802Smrg# serial 59 LT_INIT 3610f94802Smrg 3710f94802Smrg 3810f94802Smrg# LT_PREREQ(VERSION) 3910f94802Smrg# ------------------ 4010f94802Smrg# Complain and exit if this libtool version is less that VERSION. 4110f94802Smrgm4_defun([LT_PREREQ], 4210f94802Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 4310f94802Smrg [m4_default([$3], 4410f94802Smrg [m4_fatal([Libtool version $1 or higher is required], 4510f94802Smrg 63)])], 4610f94802Smrg [$2])]) 4710f94802Smrg 4810f94802Smrg 4910f94802Smrg# _LT_CHECK_BUILDDIR 5010f94802Smrg# ------------------ 5110f94802Smrg# Complain if the absolute build directory name contains unusual characters 5210f94802Smrgm4_defun([_LT_CHECK_BUILDDIR], 5310f94802Smrg[case `pwd` in 5410f94802Smrg *\ * | *\ *) 5510f94802Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 5610f94802Smrgesac 5710f94802Smrg]) 5810f94802Smrg 5910f94802Smrg 6010f94802Smrg# LT_INIT([OPTIONS]) 6110f94802Smrg# ------------------ 6210f94802SmrgAC_DEFUN([LT_INIT], 6310f94802Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 6410f94802SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 6510f94802SmrgAC_BEFORE([$0], [LT_LANG])dnl 6610f94802SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 6710f94802SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 6810f94802Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 6910f94802Smrg 7010f94802Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 7110f94802Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 7210f94802Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 7310f94802Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 7410f94802Smrgdnl unless we require an AC_DEFUNed macro: 7510f94802SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 7610f94802SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 7710f94802SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 7810f94802SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 7910f94802Smrgm4_require([_LT_PROG_LTMAIN])dnl 8010f94802Smrg 8110f94802Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 8210f94802Smrg 8310f94802Smrgdnl Parse OPTIONS 8410f94802Smrg_LT_SET_OPTIONS([$0], [$1]) 8510f94802Smrg 8610f94802Smrg# This can be used to rebuild libtool when needed 8710f94802SmrgLIBTOOL_DEPS=$ltmain 8810f94802Smrg 8910f94802Smrg# Always use our own libtool. 9010f94802SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 9110f94802SmrgAC_SUBST(LIBTOOL)dnl 9210f94802Smrg 9310f94802Smrg_LT_SETUP 9410f94802Smrg 9510f94802Smrg# Only expand once: 9610f94802Smrgm4_define([LT_INIT]) 9710f94802Smrg])# LT_INIT 9810f94802Smrg 9910f94802Smrg# Old names: 10010f94802SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 10110f94802SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 10210f94802Smrgdnl aclocal-1.4 backwards compatibility: 10310f94802Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 10410f94802Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 10510f94802Smrg 10610f94802Smrg 10710f94802Smrg# _LT_PREPARE_CC_BASENAME 10810f94802Smrg# ----------------------- 10910f94802Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 11010f94802Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 11110f94802Smrgfunc_cc_basename () 11210f94802Smrg{ 11310f94802Smrg for cc_temp in @S|@*""; do 11410f94802Smrg case $cc_temp in 11510f94802Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 11610f94802Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 11710f94802Smrg \-*) ;; 11810f94802Smrg *) break;; 11910f94802Smrg esac 12010f94802Smrg done 12110f94802Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 12210f94802Smrg} 12310f94802Smrg])# _LT_PREPARE_CC_BASENAME 12410f94802Smrg 12510f94802Smrg 12610f94802Smrg# _LT_CC_BASENAME(CC) 12710f94802Smrg# ------------------- 12810f94802Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 12910f94802Smrg# but that macro is also expanded into generated libtool script, which 13010f94802Smrg# arranges for $SED and $ECHO to be set by different means. 13110f94802Smrgm4_defun([_LT_CC_BASENAME], 13210f94802Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 13310f94802SmrgAC_REQUIRE([_LT_DECL_SED])dnl 13410f94802SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 13510f94802Smrgfunc_cc_basename $1 13610f94802Smrgcc_basename=$func_cc_basename_result 13710f94802Smrg]) 13810f94802Smrg 13910f94802Smrg 14010f94802Smrg# _LT_FILEUTILS_DEFAULTS 14110f94802Smrg# ---------------------- 14210f94802Smrg# It is okay to use these file commands and assume they have been set 14310f94802Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 14410f94802Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 14510f94802Smrg[: ${CP="cp -f"} 14610f94802Smrg: ${MV="mv -f"} 14710f94802Smrg: ${RM="rm -f"} 14810f94802Smrg])# _LT_FILEUTILS_DEFAULTS 14910f94802Smrg 15010f94802Smrg 15110f94802Smrg# _LT_SETUP 15210f94802Smrg# --------- 15310f94802Smrgm4_defun([_LT_SETUP], 15410f94802Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 15510f94802SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 15610f94802SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 15710f94802SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 15810f94802Smrg 15910f94802Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 16010f94802Smrgdnl 16110f94802Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 16210f94802Smrg_LT_DECL([], [host], [0])dnl 16310f94802Smrg_LT_DECL([], [host_os], [0])dnl 16410f94802Smrgdnl 16510f94802Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 16610f94802Smrg_LT_DECL([], [build], [0])dnl 16710f94802Smrg_LT_DECL([], [build_os], [0])dnl 16810f94802Smrgdnl 16910f94802SmrgAC_REQUIRE([AC_PROG_CC])dnl 17010f94802SmrgAC_REQUIRE([LT_PATH_LD])dnl 17110f94802SmrgAC_REQUIRE([LT_PATH_NM])dnl 17210f94802Smrgdnl 17310f94802SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 17410f94802Smrgtest -z "$LN_S" && LN_S="ln -s" 17510f94802Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 17610f94802Smrgdnl 17710f94802SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 17810f94802Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 17910f94802Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 18010f94802Smrgdnl 18110f94802Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 18210f94802Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 18310f94802Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 18410f94802Smrgm4_require([_LT_CMD_RELOAD])dnl 18510f94802Smrgm4_require([_LT_DECL_FILECMD])dnl 18610f94802Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 18710f94802Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 18810f94802Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 18910f94802Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 19010f94802Smrgm4_require([_LT_WITH_SYSROOT])dnl 19110f94802Smrgm4_require([_LT_CMD_TRUNCATE])dnl 19210f94802Smrg 19310f94802Smrg_LT_CONFIG_LIBTOOL_INIT([ 19410f94802Smrg# See if we are running on zsh, and set the options that allow our 19510f94802Smrg# commands through without removal of \ escapes INIT. 19610f94802Smrgif test -n "\${ZSH_VERSION+set}"; then 19710f94802Smrg setopt NO_GLOB_SUBST 19810f94802Smrgfi 19910f94802Smrg]) 20010f94802Smrgif test -n "${ZSH_VERSION+set}"; then 20110f94802Smrg setopt NO_GLOB_SUBST 20210f94802Smrgfi 20310f94802Smrg 20410f94802Smrg_LT_CHECK_OBJDIR 20510f94802Smrg 20610f94802Smrgm4_require([_LT_TAG_COMPILER])dnl 20710f94802Smrg 20810f94802Smrgcase $host_os in 20910f94802Smrgaix3*) 21010f94802Smrg # AIX sometimes has problems with the GCC collect2 program. For some 21110f94802Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 21210f94802Smrg # vanish in a puff of smoke. 21310f94802Smrg if test set != "${COLLECT_NAMES+set}"; then 21410f94802Smrg COLLECT_NAMES= 21510f94802Smrg export COLLECT_NAMES 21610f94802Smrg fi 21710f94802Smrg ;; 21810f94802Smrgesac 21910f94802Smrg 22010f94802Smrg# Global variables: 22110f94802Smrgofile=libtool 22210f94802Smrgcan_build_shared=yes 22310f94802Smrg 22410f94802Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 22510f94802Smrg# ICC, which need '.lib'). 22610f94802Smrglibext=a 22710f94802Smrg 22810f94802Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 22910f94802Smrg 23010f94802Smrgold_CC=$CC 23110f94802Smrgold_CFLAGS=$CFLAGS 23210f94802Smrg 23310f94802Smrg# Set sane defaults for various variables 23410f94802Smrgtest -z "$CC" && CC=cc 23510f94802Smrgtest -z "$LTCC" && LTCC=$CC 23610f94802Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 23710f94802Smrgtest -z "$LD" && LD=ld 23810f94802Smrgtest -z "$ac_objext" && ac_objext=o 23910f94802Smrg 24010f94802Smrg_LT_CC_BASENAME([$compiler]) 24110f94802Smrg 24210f94802Smrg# Only perform the check for file, if the check method requires it 24310f94802Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 24410f94802Smrgcase $deplibs_check_method in 24510f94802Smrgfile_magic*) 24610f94802Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 24710f94802Smrg _LT_PATH_MAGIC 24810f94802Smrg fi 24910f94802Smrg ;; 25010f94802Smrgesac 25110f94802Smrg 25210f94802Smrg# Use C for the default configuration in the libtool script 25310f94802SmrgLT_SUPPORTED_TAG([CC]) 25410f94802Smrg_LT_LANG_C_CONFIG 25510f94802Smrg_LT_LANG_DEFAULT_CONFIG 25610f94802Smrg_LT_CONFIG_COMMANDS 25710f94802Smrg])# _LT_SETUP 25810f94802Smrg 25910f94802Smrg 26010f94802Smrg# _LT_PREPARE_SED_QUOTE_VARS 26110f94802Smrg# -------------------------- 26210f94802Smrg# Define a few sed substitution that help us do robust quoting. 26310f94802Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 26410f94802Smrg[# Backslashify metacharacters that are still active within 26510f94802Smrg# double-quoted strings. 26610f94802Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 26710f94802Smrg 26810f94802Smrg# Same as above, but do not quote variable references. 26910f94802Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 27010f94802Smrg 27110f94802Smrg# Sed substitution to delay expansion of an escaped shell variable in a 27210f94802Smrg# double_quote_subst'ed string. 27310f94802Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 27410f94802Smrg 27510f94802Smrg# Sed substitution to delay expansion of an escaped single quote. 27610f94802Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 27710f94802Smrg 27810f94802Smrg# Sed substitution to avoid accidental globbing in evaled expressions 27910f94802Smrgno_glob_subst='s/\*/\\\*/g' 28010f94802Smrg]) 28110f94802Smrg 28210f94802Smrg# _LT_PROG_LTMAIN 28310f94802Smrg# --------------- 28410f94802Smrg# Note that this code is called both from 'configure', and 'config.status' 28510f94802Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 28610f94802Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 28710f94802Smrg# so we pass a copy along to make sure it has a sensible value anyway. 28810f94802Smrgm4_defun([_LT_PROG_LTMAIN], 28910f94802Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 29010f94802Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 29110f94802Smrgltmain=$ac_aux_dir/ltmain.sh 29210f94802Smrg])# _LT_PROG_LTMAIN 29310f94802Smrg 29410f94802Smrg 29510f94802Smrg## ------------------------------------- ## 29610f94802Smrg## Accumulate code for creating libtool. ## 29710f94802Smrg## ------------------------------------- ## 29810f94802Smrg 29910f94802Smrg# So that we can recreate a full libtool script including additional 30010f94802Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 30110f94802Smrg# in macros and then make a single call at the end using the 'libtool' 30210f94802Smrg# label. 30310f94802Smrg 30410f94802Smrg 30510f94802Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 30610f94802Smrg# ---------------------------------------- 30710f94802Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 30810f94802Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 30910f94802Smrg[m4_ifval([$1], 31010f94802Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 31110f94802Smrg [$1 31210f94802Smrg])])]) 31310f94802Smrg 31410f94802Smrg# Initialize. 31510f94802Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 31610f94802Smrg 31710f94802Smrg 31810f94802Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 31910f94802Smrg# ------------------------------ 32010f94802Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 32110f94802Smrgm4_define([_LT_CONFIG_LIBTOOL], 32210f94802Smrg[m4_ifval([$1], 32310f94802Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 32410f94802Smrg [$1 32510f94802Smrg])])]) 32610f94802Smrg 32710f94802Smrg# Initialize. 32810f94802Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 32910f94802Smrg 33010f94802Smrg 33110f94802Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 33210f94802Smrg# ----------------------------------------------------- 33310f94802Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 33410f94802Smrg[_LT_CONFIG_LIBTOOL([$1]) 33510f94802Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 33610f94802Smrg]) 33710f94802Smrg 33810f94802Smrg 33910f94802Smrg# _LT_FORMAT_COMMENT([COMMENT]) 34010f94802Smrg# ----------------------------- 34110f94802Smrg# Add leading comment marks to the start of each line, and a trailing 34210f94802Smrg# full-stop to the whole comment if one is not present already. 34310f94802Smrgm4_define([_LT_FORMAT_COMMENT], 34410f94802Smrg[m4_ifval([$1], [ 34510f94802Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 34610f94802Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 34710f94802Smrg)]) 34810f94802Smrg 34910f94802Smrg 35010f94802Smrg 35110f94802Smrg## ------------------------ ## 35210f94802Smrg## FIXME: Eliminate VARNAME ## 35310f94802Smrg## ------------------------ ## 35410f94802Smrg 35510f94802Smrg 35610f94802Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 35710f94802Smrg# ------------------------------------------------------------------- 35810f94802Smrg# CONFIGNAME is the name given to the value in the libtool script. 35910f94802Smrg# VARNAME is the (base) name used in the configure script. 36010f94802Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 36110f94802Smrg# VARNAME. Any other value will be used directly. 36210f94802Smrgm4_define([_LT_DECL], 36310f94802Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 36410f94802Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 36510f94802Smrg [m4_ifval([$1], [$1], [$2])]) 36610f94802Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 36710f94802Smrg m4_ifval([$4], 36810f94802Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 36910f94802Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 37010f94802Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 37110f94802Smrg]) 37210f94802Smrg 37310f94802Smrg 37410f94802Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 37510f94802Smrg# -------------------------------------------------------- 37610f94802Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 37710f94802Smrg 37810f94802Smrg 37910f94802Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 38010f94802Smrg# ------------------------------------------------ 38110f94802Smrgm4_define([lt_decl_tag_varnames], 38210f94802Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 38310f94802Smrg 38410f94802Smrg 38510f94802Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 38610f94802Smrg# --------------------------------------------------------- 38710f94802Smrgm4_define([_lt_decl_filter], 38810f94802Smrg[m4_case([$#], 38910f94802Smrg [0], [m4_fatal([$0: too few arguments: $#])], 39010f94802Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 39110f94802Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 39210f94802Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 39310f94802Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 39410f94802Smrg]) 39510f94802Smrg 39610f94802Smrg 39710f94802Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 39810f94802Smrg# -------------------------------------------------- 39910f94802Smrgm4_define([lt_decl_quote_varnames], 40010f94802Smrg[_lt_decl_filter([value], [1], $@)]) 40110f94802Smrg 40210f94802Smrg 40310f94802Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 40410f94802Smrg# --------------------------------------------------- 40510f94802Smrgm4_define([lt_decl_dquote_varnames], 40610f94802Smrg[_lt_decl_filter([value], [2], $@)]) 40710f94802Smrg 40810f94802Smrg 40910f94802Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 41010f94802Smrg# --------------------------------------------------- 41110f94802Smrgm4_define([lt_decl_varnames_tagged], 41210f94802Smrg[m4_assert([$# <= 2])dnl 41310f94802Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 41410f94802Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 41510f94802Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 41610f94802Smrgm4_define([_lt_decl_varnames_tagged], 41710f94802Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 41810f94802Smrg 41910f94802Smrg 42010f94802Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 42110f94802Smrg# ------------------------------------------------ 42210f94802Smrgm4_define([lt_decl_all_varnames], 42310f94802Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 42410f94802Smrg m4_if([$2], [], 42510f94802Smrg m4_quote(lt_decl_varnames), 42610f94802Smrg m4_quote(m4_shift($@))))[]dnl 42710f94802Smrg]) 42810f94802Smrgm4_define([_lt_decl_all_varnames], 42910f94802Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 43010f94802Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 43110f94802Smrg]) 43210f94802Smrg 43310f94802Smrg 43410f94802Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 43510f94802Smrg# ------------------------------------ 43610f94802Smrg# Quote a variable value, and forward it to 'config.status' so that its 43710f94802Smrg# declaration there will have the same value as in 'configure'. VARNAME 43810f94802Smrg# must have a single quote delimited value for this to work. 43910f94802Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 44010f94802Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 44110f94802Smrg 44210f94802Smrg 44310f94802Smrg# _LT_CONFIG_STATUS_DECLARATIONS 44410f94802Smrg# ------------------------------ 44510f94802Smrg# We delimit libtool config variables with single quotes, so when 44610f94802Smrg# we write them to config.status, we have to be sure to quote all 44710f94802Smrg# embedded single quotes properly. In configure, this macro expands 44810f94802Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 44910f94802Smrg# 45010f94802Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 45110f94802Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 45210f94802Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 45310f94802Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 45410f94802Smrg 45510f94802Smrg 45610f94802Smrg# _LT_LIBTOOL_TAGS 45710f94802Smrg# ---------------- 45810f94802Smrg# Output comment and list of tags supported by the script 45910f94802Smrgm4_defun([_LT_LIBTOOL_TAGS], 46010f94802Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 46110f94802Smrgavailable_tags='_LT_TAGS'dnl 46210f94802Smrg]) 46310f94802Smrg 46410f94802Smrg 46510f94802Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 46610f94802Smrg# ----------------------------------- 46710f94802Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 46810f94802Smrg# expand to a commented shell variable setting: 46910f94802Smrg# 47010f94802Smrg# # Some comment about what VAR is for. 47110f94802Smrg# visible_name=$lt_internal_name 47210f94802Smrgm4_define([_LT_LIBTOOL_DECLARE], 47310f94802Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 47410f94802Smrg [description])))[]dnl 47510f94802Smrgm4_pushdef([_libtool_name], 47610f94802Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 47710f94802Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 47810f94802Smrg [0], [_libtool_name=[$]$1], 47910f94802Smrg [1], [_libtool_name=$lt_[]$1], 48010f94802Smrg [2], [_libtool_name=$lt_[]$1], 48110f94802Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 48210f94802Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 48310f94802Smrg]) 48410f94802Smrg 48510f94802Smrg 48610f94802Smrg# _LT_LIBTOOL_CONFIG_VARS 48710f94802Smrg# ----------------------- 48810f94802Smrg# Produce commented declarations of non-tagged libtool config variables 48910f94802Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 49010f94802Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 49110f94802Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 49210f94802Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 49310f94802Smrg[m4_foreach([_lt_var], 49410f94802Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 49510f94802Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 49610f94802Smrg 49710f94802Smrg 49810f94802Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 49910f94802Smrg# ------------------------- 50010f94802Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 50110f94802Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 50210f94802Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 50310f94802Smrg 50410f94802Smrg 50510f94802Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 50610f94802Smrg# ------------------------------ 50710f94802Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 50810f94802Smrg 50910f94802Smrg 51010f94802Smrg# _LT_CONFIG_COMMANDS 51110f94802Smrg# ------------------- 51210f94802Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 51310f94802Smrg# variables for single and double quote escaping we saved from calls 51410f94802Smrg# to _LT_DECL, we can put quote escaped variables declarations 51510f94802Smrg# into 'config.status', and then the shell code to quote escape them in 51610f94802Smrg# for loops in 'config.status'. Finally, any additional code accumulated 51710f94802Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 51810f94802Smrgm4_defun([_LT_CONFIG_COMMANDS], 51910f94802Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 52010f94802Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 52110f94802Smrg dnl instead of duplicating it all over again into config.status, 52210f94802Smrg dnl then we will have config.status run $CONFIG_LT later, so it 52310f94802Smrg dnl needs to know what name is stored there: 52410f94802Smrg [AC_CONFIG_COMMANDS([libtool], 52510f94802Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 52610f94802Smrg dnl If the libtool generation code is destined for config.status, 52710f94802Smrg dnl expand the accumulated commands and init code now: 52810f94802Smrg [AC_CONFIG_COMMANDS([libtool], 52910f94802Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 53010f94802Smrg])#_LT_CONFIG_COMMANDS 53110f94802Smrg 53210f94802Smrg 53310f94802Smrg# Initialize. 53410f94802Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 53510f94802Smrg[ 53610f94802Smrg 53710f94802Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 53810f94802Smrg# if CDPATH is set. 53910f94802Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 54010f94802Smrg 54110f94802Smrgsed_quote_subst='$sed_quote_subst' 54210f94802Smrgdouble_quote_subst='$double_quote_subst' 54310f94802Smrgdelay_variable_subst='$delay_variable_subst' 54410f94802Smrg_LT_CONFIG_STATUS_DECLARATIONS 54510f94802SmrgLTCC='$LTCC' 54610f94802SmrgLTCFLAGS='$LTCFLAGS' 54710f94802Smrgcompiler='$compiler_DEFAULT' 54810f94802Smrg 54910f94802Smrg# A function that is used when there is no print builtin or printf. 55010f94802Smrgfunc_fallback_echo () 55110f94802Smrg{ 55210f94802Smrg eval 'cat <<_LTECHO_EOF 55310f94802Smrg\$[]1 55410f94802Smrg_LTECHO_EOF' 55510f94802Smrg} 55610f94802Smrg 55710f94802Smrg# Quote evaled strings. 55810f94802Smrgfor var in lt_decl_all_varnames([[ \ 55910f94802Smrg]], lt_decl_quote_varnames); do 56010f94802Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 56110f94802Smrg *[[\\\\\\\`\\"\\\$]]*) 56210f94802Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 56310f94802Smrg ;; 56410f94802Smrg *) 56510f94802Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 56610f94802Smrg ;; 56710f94802Smrg esac 56810f94802Smrgdone 56910f94802Smrg 57010f94802Smrg# Double-quote double-evaled strings. 57110f94802Smrgfor var in lt_decl_all_varnames([[ \ 57210f94802Smrg]], lt_decl_dquote_varnames); do 57310f94802Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 57410f94802Smrg *[[\\\\\\\`\\"\\\$]]*) 57510f94802Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 57610f94802Smrg ;; 57710f94802Smrg *) 57810f94802Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 57910f94802Smrg ;; 58010f94802Smrg esac 58110f94802Smrgdone 58210f94802Smrg 58310f94802Smrg_LT_OUTPUT_LIBTOOL_INIT 58410f94802Smrg]) 58510f94802Smrg 58610f94802Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 58710f94802Smrg# ------------------------------------ 58810f94802Smrg# Generate a child script FILE with all initialization necessary to 58910f94802Smrg# reuse the environment learned by the parent script, and make the 59010f94802Smrg# file executable. If COMMENT is supplied, it is inserted after the 59110f94802Smrg# '#!' sequence but before initialization text begins. After this 59210f94802Smrg# macro, additional text can be appended to FILE to form the body of 59310f94802Smrg# the child script. The macro ends with non-zero status if the 59410f94802Smrg# file could not be fully written (such as if the disk is full). 59510f94802Smrgm4_ifdef([AS_INIT_GENERATED], 59610f94802Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 59710f94802Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 59810f94802Smrg[m4_require([AS_PREPARE])]dnl 59910f94802Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 60010f94802Smrg[lt_write_fail=0 60110f94802Smrgcat >$1 <<_ASEOF || lt_write_fail=1 60210f94802Smrg#! $SHELL 60310f94802Smrg# Generated by $as_me. 60410f94802Smrg$2 60510f94802SmrgSHELL=\${CONFIG_SHELL-$SHELL} 60610f94802Smrgexport SHELL 60710f94802Smrg_ASEOF 60810f94802Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 60910f94802SmrgAS_SHELL_SANITIZE 61010f94802Smrg_AS_PREPARE 61110f94802Smrgexec AS_MESSAGE_FD>&1 61210f94802Smrg_ASEOF 61310f94802Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 61410f94802Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 61510f94802Smrg 61610f94802Smrg# LT_OUTPUT 61710f94802Smrg# --------- 61810f94802Smrg# This macro allows early generation of the libtool script (before 61910f94802Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 62010f94802Smrg# tests. 62110f94802SmrgAC_DEFUN([LT_OUTPUT], 62210f94802Smrg[: ${CONFIG_LT=./config.lt} 62310f94802SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 62410f94802Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 62510f94802Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 62610f94802Smrg 62710f94802Smrgcat >>"$CONFIG_LT" <<\_LTEOF 62810f94802Smrglt_cl_silent=false 62910f94802Smrgexec AS_MESSAGE_LOG_FD>>config.log 63010f94802Smrg{ 63110f94802Smrg echo 63210f94802Smrg AS_BOX([Running $as_me.]) 63310f94802Smrg} >&AS_MESSAGE_LOG_FD 63410f94802Smrg 63510f94802Smrglt_cl_help="\ 63610f94802Smrg'$as_me' creates a local libtool stub from the current configuration, 63710f94802Smrgfor use in further configure time tests before the real libtool is 63810f94802Smrggenerated. 63910f94802Smrg 64010f94802SmrgUsage: $[0] [[OPTIONS]] 64110f94802Smrg 64210f94802Smrg -h, --help print this help, then exit 64310f94802Smrg -V, --version print version number, then exit 64410f94802Smrg -q, --quiet do not print progress messages 64510f94802Smrg -d, --debug don't remove temporary files 64610f94802Smrg 64710f94802SmrgReport bugs to <bug-libtool@gnu.org>." 64810f94802Smrg 64910f94802Smrglt_cl_version="\ 65010f94802Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 65110f94802Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 65210f94802Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 65310f94802Smrg 65410f94802SmrgCopyright (C) 2011 Free Software Foundation, Inc. 65510f94802SmrgThis config.lt script is free software; the Free Software Foundation 65610f94802Smrggives unlimited permision to copy, distribute and modify it." 65710f94802Smrg 65810f94802Smrgwhile test 0 != $[#] 65910f94802Smrgdo 66010f94802Smrg case $[1] in 66110f94802Smrg --version | --v* | -V ) 66210f94802Smrg echo "$lt_cl_version"; exit 0 ;; 66310f94802Smrg --help | --h* | -h ) 66410f94802Smrg echo "$lt_cl_help"; exit 0 ;; 66510f94802Smrg --debug | --d* | -d ) 66610f94802Smrg debug=: ;; 66710f94802Smrg --quiet | --q* | --silent | --s* | -q ) 66810f94802Smrg lt_cl_silent=: ;; 66910f94802Smrg 67010f94802Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 67110f94802SmrgTry '$[0] --help' for more information.]) ;; 67210f94802Smrg 67310f94802Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 67410f94802SmrgTry '$[0] --help' for more information.]) ;; 67510f94802Smrg esac 67610f94802Smrg shift 67710f94802Smrgdone 67810f94802Smrg 67910f94802Smrgif $lt_cl_silent; then 68010f94802Smrg exec AS_MESSAGE_FD>/dev/null 68110f94802Smrgfi 68210f94802Smrg_LTEOF 68310f94802Smrg 68410f94802Smrgcat >>"$CONFIG_LT" <<_LTEOF 68510f94802Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 68610f94802Smrg_LTEOF 68710f94802Smrg 68810f94802Smrgcat >>"$CONFIG_LT" <<\_LTEOF 68910f94802SmrgAC_MSG_NOTICE([creating $ofile]) 69010f94802Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 69110f94802SmrgAS_EXIT(0) 69210f94802Smrg_LTEOF 69310f94802Smrgchmod +x "$CONFIG_LT" 69410f94802Smrg 69510f94802Smrg# configure is writing to config.log, but config.lt does its own redirection, 69610f94802Smrg# appending to config.log, which fails on DOS, as config.log is still kept 69710f94802Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 69810f94802Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 69910f94802Smrglt_cl_success=: 70010f94802Smrgtest yes = "$silent" && 70110f94802Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 70210f94802Smrgexec AS_MESSAGE_LOG_FD>/dev/null 70310f94802Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 70410f94802Smrgexec AS_MESSAGE_LOG_FD>>config.log 70510f94802Smrg$lt_cl_success || AS_EXIT(1) 70610f94802Smrg])# LT_OUTPUT 70710f94802Smrg 70810f94802Smrg 70910f94802Smrg# _LT_CONFIG(TAG) 71010f94802Smrg# --------------- 71110f94802Smrg# If TAG is the built-in tag, create an initial libtool script with a 71210f94802Smrg# default configuration from the untagged config vars. Otherwise add code 71310f94802Smrg# to config.status for appending the configuration named by TAG from the 71410f94802Smrg# matching tagged config vars. 71510f94802Smrgm4_defun([_LT_CONFIG], 71610f94802Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 71710f94802Smrg_LT_CONFIG_SAVE_COMMANDS([ 71810f94802Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 71910f94802Smrg m4_if(_LT_TAG, [C], [ 72010f94802Smrg # See if we are running on zsh, and set the options that allow our 72110f94802Smrg # commands through without removal of \ escapes. 72210f94802Smrg if test -n "${ZSH_VERSION+set}"; then 72310f94802Smrg setopt NO_GLOB_SUBST 72410f94802Smrg fi 72510f94802Smrg 72610f94802Smrg cfgfile=${ofile}T 72710f94802Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 72810f94802Smrg $RM "$cfgfile" 72910f94802Smrg 73010f94802Smrg cat <<_LT_EOF >> "$cfgfile" 73110f94802Smrg#! $SHELL 73210f94802Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 73310f94802Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 73410f94802Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 73510f94802Smrg 73610f94802Smrg# Provide generalized library-building support services. 73710f94802Smrg# Written by Gordon Matzigkeit, 1996 73810f94802Smrg 73910f94802Smrg_LT_COPYING 74010f94802Smrg_LT_LIBTOOL_TAGS 74110f94802Smrg 74210f94802Smrg# Configured defaults for sys_lib_dlsearch_path munging. 74310f94802Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 74410f94802Smrg 74510f94802Smrg# ### BEGIN LIBTOOL CONFIG 74610f94802Smrg_LT_LIBTOOL_CONFIG_VARS 74710f94802Smrg_LT_LIBTOOL_TAG_VARS 74810f94802Smrg# ### END LIBTOOL CONFIG 74910f94802Smrg 75010f94802Smrg_LT_EOF 75110f94802Smrg 75210f94802Smrg cat <<'_LT_EOF' >> "$cfgfile" 75310f94802Smrg 75410f94802Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 75510f94802Smrg 75610f94802Smrg_LT_PREPARE_MUNGE_PATH_LIST 75710f94802Smrg_LT_PREPARE_CC_BASENAME 75810f94802Smrg 75910f94802Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 76010f94802Smrg 76110f94802Smrg_LT_EOF 76210f94802Smrg 76310f94802Smrg case $host_os in 76410f94802Smrg aix3*) 76510f94802Smrg cat <<\_LT_EOF >> "$cfgfile" 76610f94802Smrg# AIX sometimes has problems with the GCC collect2 program. For some 76710f94802Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 76810f94802Smrg# vanish in a puff of smoke. 76910f94802Smrgif test set != "${COLLECT_NAMES+set}"; then 77010f94802Smrg COLLECT_NAMES= 77110f94802Smrg export COLLECT_NAMES 77210f94802Smrgfi 77310f94802Smrg_LT_EOF 77410f94802Smrg ;; 77510f94802Smrg esac 77610f94802Smrg 77710f94802Smrg _LT_PROG_LTMAIN 77810f94802Smrg 77910f94802Smrg # We use sed instead of cat because bash on DJGPP gets confused if 78010f94802Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 78110f94802Smrg # text mode, it properly converts lines to CR/LF. This bash problem 78210f94802Smrg # is reportedly fixed, but why not run on old versions too? 78310f94802Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 78410f94802Smrg || (rm -f "$cfgfile"; exit 1) 78510f94802Smrg 78610f94802Smrg mv -f "$cfgfile" "$ofile" || 78710f94802Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 78810f94802Smrg chmod +x "$ofile" 78910f94802Smrg], 79010f94802Smrg[cat <<_LT_EOF >> "$ofile" 79110f94802Smrg 79210f94802Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 79310f94802Smrgdnl in a comment (ie after a #). 79410f94802Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 79510f94802Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 79610f94802Smrg# ### END LIBTOOL TAG CONFIG: $1 79710f94802Smrg_LT_EOF 79810f94802Smrg])dnl /m4_if 79910f94802Smrg], 80010f94802Smrg[m4_if([$1], [], [ 80110f94802Smrg PACKAGE='$PACKAGE' 80210f94802Smrg VERSION='$VERSION' 80310f94802Smrg RM='$RM' 80410f94802Smrg ofile='$ofile'], []) 80510f94802Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 80610f94802Smrg])# _LT_CONFIG 80710f94802Smrg 80810f94802Smrg 80910f94802Smrg# LT_SUPPORTED_TAG(TAG) 81010f94802Smrg# --------------------- 81110f94802Smrg# Trace this macro to discover what tags are supported by the libtool 81210f94802Smrg# --tag option, using: 81310f94802Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 81410f94802SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 81510f94802Smrg 81610f94802Smrg 81710f94802Smrg# C support is built-in for now 81810f94802Smrgm4_define([_LT_LANG_C_enabled], []) 81910f94802Smrgm4_define([_LT_TAGS], []) 82010f94802Smrg 82110f94802Smrg 82210f94802Smrg# LT_LANG(LANG) 82310f94802Smrg# ------------- 82410f94802Smrg# Enable libtool support for the given language if not already enabled. 82510f94802SmrgAC_DEFUN([LT_LANG], 82610f94802Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 82710f94802Smrgm4_case([$1], 82810f94802Smrg [C], [_LT_LANG(C)], 82910f94802Smrg [C++], [_LT_LANG(CXX)], 83010f94802Smrg [Go], [_LT_LANG(GO)], 83110f94802Smrg [Java], [_LT_LANG(GCJ)], 83210f94802Smrg [Fortran 77], [_LT_LANG(F77)], 83310f94802Smrg [Fortran], [_LT_LANG(FC)], 83410f94802Smrg [Windows Resource], [_LT_LANG(RC)], 83510f94802Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 83610f94802Smrg [_LT_LANG($1)], 83710f94802Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 83810f94802Smrg])# LT_LANG 83910f94802Smrg 84010f94802Smrg 84110f94802Smrg# _LT_LANG(LANGNAME) 84210f94802Smrg# ------------------ 84310f94802Smrgm4_defun([_LT_LANG], 84410f94802Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 84510f94802Smrg [LT_SUPPORTED_TAG([$1])dnl 84610f94802Smrg m4_append([_LT_TAGS], [$1 ])dnl 84710f94802Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 84810f94802Smrg _LT_LANG_$1_CONFIG($1)])dnl 84910f94802Smrg])# _LT_LANG 85010f94802Smrg 85110f94802Smrg 85210f94802Smrgm4_ifndef([AC_PROG_GO], [ 85310f94802Smrg############################################################ 85410f94802Smrg# NOTE: This macro has been submitted for inclusion into # 85510f94802Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 85610f94802Smrg# a released version of Autoconf we should remove this # 85710f94802Smrg# macro and use it instead. # 85810f94802Smrg############################################################ 85910f94802Smrgm4_defun([AC_PROG_GO], 86010f94802Smrg[AC_LANG_PUSH(Go)dnl 86110f94802SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 86210f94802SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 86310f94802Smrg_AC_ARG_VAR_LDFLAGS()dnl 86410f94802SmrgAC_CHECK_TOOL(GOC, gccgo) 86510f94802Smrgif test -z "$GOC"; then 86610f94802Smrg if test -n "$ac_tool_prefix"; then 86710f94802Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 86810f94802Smrg fi 86910f94802Smrgfi 87010f94802Smrgif test -z "$GOC"; then 87110f94802Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 87210f94802Smrgfi 87310f94802Smrg])#m4_defun 87410f94802Smrg])#m4_ifndef 87510f94802Smrg 87610f94802Smrg 87710f94802Smrg# _LT_LANG_DEFAULT_CONFIG 87810f94802Smrg# ----------------------- 87910f94802Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 88010f94802Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 88110f94802Smrg [LT_LANG(CXX)], 88210f94802Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 88310f94802Smrg 88410f94802SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 88510f94802Smrg [LT_LANG(F77)], 88610f94802Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 88710f94802Smrg 88810f94802SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 88910f94802Smrg [LT_LANG(FC)], 89010f94802Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 89110f94802Smrg 89210f94802Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 89310f94802Smrgdnl pulling things in needlessly. 89410f94802SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 89510f94802Smrg [LT_LANG(GCJ)], 89610f94802Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 89710f94802Smrg [LT_LANG(GCJ)], 89810f94802Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 89910f94802Smrg [LT_LANG(GCJ)], 90010f94802Smrg [m4_ifdef([AC_PROG_GCJ], 90110f94802Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 90210f94802Smrg m4_ifdef([A][M_PROG_GCJ], 90310f94802Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 90410f94802Smrg m4_ifdef([LT_PROG_GCJ], 90510f94802Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 90610f94802Smrg 90710f94802SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 90810f94802Smrg [LT_LANG(GO)], 90910f94802Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 91010f94802Smrg 91110f94802SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 91210f94802Smrg [LT_LANG(RC)], 91310f94802Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 91410f94802Smrg])# _LT_LANG_DEFAULT_CONFIG 91510f94802Smrg 91610f94802Smrg# Obsolete macros: 91710f94802SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 91810f94802SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 91910f94802SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 92010f94802SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 92110f94802SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 92210f94802Smrgdnl aclocal-1.4 backwards compatibility: 92310f94802Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 92410f94802Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 92510f94802Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 92610f94802Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 92710f94802Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 92810f94802Smrg 92910f94802Smrg 93010f94802Smrg# _LT_TAG_COMPILER 93110f94802Smrg# ---------------- 93210f94802Smrgm4_defun([_LT_TAG_COMPILER], 93310f94802Smrg[AC_REQUIRE([AC_PROG_CC])dnl 93410f94802Smrg 93510f94802Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 93610f94802Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 93710f94802Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 93810f94802Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 93910f94802Smrg 94010f94802Smrg# If no C compiler was specified, use CC. 94110f94802SmrgLTCC=${LTCC-"$CC"} 94210f94802Smrg 94310f94802Smrg# If no C compiler flags were specified, use CFLAGS. 94410f94802SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 94510f94802Smrg 94610f94802Smrg# Allow CC to be a program name with arguments. 94710f94802Smrgcompiler=$CC 94810f94802Smrg])# _LT_TAG_COMPILER 94910f94802Smrg 95010f94802Smrg 95110f94802Smrg# _LT_COMPILER_BOILERPLATE 95210f94802Smrg# ------------------------ 95310f94802Smrg# Check for compiler boilerplate output or warnings with 95410f94802Smrg# the simple compiler test code. 95510f94802Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 95610f94802Smrg[m4_require([_LT_DECL_SED])dnl 95710f94802Smrgac_outfile=conftest.$ac_objext 95810f94802Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 95910f94802Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 96010f94802Smrg_lt_compiler_boilerplate=`cat conftest.err` 96110f94802Smrg$RM conftest* 96210f94802Smrg])# _LT_COMPILER_BOILERPLATE 96310f94802Smrg 96410f94802Smrg 96510f94802Smrg# _LT_LINKER_BOILERPLATE 96610f94802Smrg# ---------------------- 96710f94802Smrg# Check for linker boilerplate output or warnings with 96810f94802Smrg# the simple link test code. 96910f94802Smrgm4_defun([_LT_LINKER_BOILERPLATE], 97010f94802Smrg[m4_require([_LT_DECL_SED])dnl 97110f94802Smrgac_outfile=conftest.$ac_objext 97210f94802Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 97310f94802Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 97410f94802Smrg_lt_linker_boilerplate=`cat conftest.err` 97510f94802Smrg$RM -r conftest* 97610f94802Smrg])# _LT_LINKER_BOILERPLATE 97710f94802Smrg 97810f94802Smrg# _LT_REQUIRED_DARWIN_CHECKS 97910f94802Smrg# ------------------------- 98010f94802Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 98110f94802Smrg case $host_os in 98210f94802Smrg rhapsody* | darwin*) 98310f94802Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 98410f94802Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 98510f94802Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 98610f94802Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 98710f94802Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 98810f94802Smrg _LT_DECL([], [DSYMUTIL], [1], 98910f94802Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 99010f94802Smrg _LT_DECL([], [NMEDIT], [1], 99110f94802Smrg [Tool to change global to local symbols on Mac OS X]) 99210f94802Smrg _LT_DECL([], [LIPO], [1], 99310f94802Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 99410f94802Smrg _LT_DECL([], [OTOOL], [1], 99510f94802Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 99610f94802Smrg _LT_DECL([], [OTOOL64], [1], 99710f94802Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 99810f94802Smrg 99910f94802Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 100010f94802Smrg [lt_cv_apple_cc_single_mod=no 100110f94802Smrg if test -z "$LT_MULTI_MODULE"; then 100210f94802Smrg # By default we will add the -single_module flag. You can override 100310f94802Smrg # by either setting the environment variable LT_MULTI_MODULE 100410f94802Smrg # non-empty at configure time, or by adding -multi_module to the 100510f94802Smrg # link flags. 100610f94802Smrg rm -rf libconftest.dylib* 100710f94802Smrg echo "int foo(void){return 1;}" > conftest.c 100810f94802Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 100910f94802Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 101010f94802Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 101110f94802Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 101210f94802Smrg _lt_result=$? 101310f94802Smrg # If there is a non-empty error log, and "single_module" 101410f94802Smrg # appears in it, assume the flag caused a linker warning 101510f94802Smrg if test -s conftest.err && $GREP single_module conftest.err; then 101610f94802Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 101710f94802Smrg # Otherwise, if the output was created with a 0 exit code from 101810f94802Smrg # the compiler, it worked. 101910f94802Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 102010f94802Smrg lt_cv_apple_cc_single_mod=yes 102110f94802Smrg else 102210f94802Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 102310f94802Smrg fi 102410f94802Smrg rm -rf libconftest.dylib* 102510f94802Smrg rm -f conftest.* 102610f94802Smrg fi]) 102710f94802Smrg 102810f94802Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 102910f94802Smrg [lt_cv_ld_exported_symbols_list], 103010f94802Smrg [lt_cv_ld_exported_symbols_list=no 103110f94802Smrg save_LDFLAGS=$LDFLAGS 103210f94802Smrg echo "_main" > conftest.sym 103310f94802Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 103410f94802Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 103510f94802Smrg [lt_cv_ld_exported_symbols_list=yes], 103610f94802Smrg [lt_cv_ld_exported_symbols_list=no]) 103710f94802Smrg LDFLAGS=$save_LDFLAGS 103810f94802Smrg ]) 103910f94802Smrg 104010f94802Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 104110f94802Smrg [lt_cv_ld_force_load=no 104210f94802Smrg cat > conftest.c << _LT_EOF 104310f94802Smrgint forced_loaded() { return 2;} 104410f94802Smrg_LT_EOF 104510f94802Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 104610f94802Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 104710f94802Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 104810f94802Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 104910f94802Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 105010f94802Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 105110f94802Smrg cat > conftest.c << _LT_EOF 105210f94802Smrgint main() { return 0;} 105310f94802Smrg_LT_EOF 105410f94802Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 105510f94802Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 105610f94802Smrg _lt_result=$? 105710f94802Smrg if test -s conftest.err && $GREP force_load conftest.err; then 105810f94802Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 105910f94802Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 106010f94802Smrg lt_cv_ld_force_load=yes 106110f94802Smrg else 106210f94802Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 106310f94802Smrg fi 106410f94802Smrg rm -f conftest.err libconftest.a conftest conftest.c 106510f94802Smrg rm -rf conftest.dSYM 106610f94802Smrg ]) 106710f94802Smrg case $host_os in 106810f94802Smrg rhapsody* | darwin1.[[012]]) 106910f94802Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 107010f94802Smrg darwin1.*) 107110f94802Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 107210f94802Smrg darwin*) 107310f94802Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 107410f94802Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 107510f94802Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 107610f94802Smrg *) 107710f94802Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 107810f94802Smrg esac 107910f94802Smrg ;; 108010f94802Smrg esac 108110f94802Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 108210f94802Smrg _lt_dar_single_mod='$single_module' 108310f94802Smrg fi 108410f94802Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 108510f94802Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 108610f94802Smrg else 108710f94802Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 108810f94802Smrg fi 108910f94802Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 109010f94802Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 109110f94802Smrg else 109210f94802Smrg _lt_dsymutil= 109310f94802Smrg fi 109410f94802Smrg ;; 109510f94802Smrg esac 109610f94802Smrg]) 109710f94802Smrg 109810f94802Smrg 109910f94802Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 110010f94802Smrg# --------------------------------- 110110f94802Smrg# Checks for linker and compiler features on darwin 110210f94802Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 110310f94802Smrg[ 110410f94802Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 110510f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 110610f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=no 110710f94802Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 110810f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 110910f94802Smrg if test yes = "$lt_cv_ld_force_load"; then 111010f94802Smrg _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\"`' 111110f94802Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 111210f94802Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 111310f94802Smrg else 111410f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 111510f94802Smrg fi 111610f94802Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 111710f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 111810f94802Smrg case $cc_basename in 111910f94802Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 112010f94802Smrg *) _lt_dar_can_shared=$GCC ;; 112110f94802Smrg esac 112210f94802Smrg if test yes = "$_lt_dar_can_shared"; then 112310f94802Smrg output_verbose_link_cmd=func_echo_all 112410f94802Smrg _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" 112510f94802Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 112610f94802Smrg _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" 112710f94802Smrg _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" 112810f94802Smrg m4_if([$1], [CXX], 112910f94802Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 113010f94802Smrg _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" 113110f94802Smrg _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" 113210f94802Smrg fi 113310f94802Smrg],[]) 113410f94802Smrg else 113510f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 113610f94802Smrg fi 113710f94802Smrg]) 113810f94802Smrg 113910f94802Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 114010f94802Smrg# ---------------------------------- 114110f94802Smrg# Links a minimal program and checks the executable 114210f94802Smrg# for the system default hardcoded library path. In most cases, 114310f94802Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 114410f94802Smrg# the location of the communication and MPI libs are included too. 114510f94802Smrg# If we don't find anything, use the default library path according 114610f94802Smrg# to the aix ld manual. 114710f94802Smrg# Store the results from the different compilers for each TAGNAME. 114810f94802Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 114910f94802Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 115010f94802Smrg[m4_require([_LT_DECL_SED])dnl 115110f94802Smrgif test set = "${lt_cv_aix_libpath+set}"; then 115210f94802Smrg aix_libpath=$lt_cv_aix_libpath 115310f94802Smrgelse 115410f94802Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 115510f94802Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 115610f94802Smrg lt_aix_libpath_sed='[ 115710f94802Smrg /Import File Strings/,/^$/ { 115810f94802Smrg /^0/ { 115910f94802Smrg s/^0 *\([^ ]*\) *$/\1/ 116010f94802Smrg p 116110f94802Smrg } 116210f94802Smrg }]' 116310f94802Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 116410f94802Smrg # Check for a 64-bit object if we didn't find anything. 116510f94802Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 116610f94802Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 116710f94802Smrg fi],[]) 116810f94802Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 116910f94802Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 117010f94802Smrg fi 117110f94802Smrg ]) 117210f94802Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 117310f94802Smrgfi 117410f94802Smrg])# _LT_SYS_MODULE_PATH_AIX 117510f94802Smrg 117610f94802Smrg 117710f94802Smrg# _LT_SHELL_INIT(ARG) 117810f94802Smrg# ------------------- 117910f94802Smrgm4_define([_LT_SHELL_INIT], 118010f94802Smrg[m4_divert_text([M4SH-INIT], [$1 118110f94802Smrg])])# _LT_SHELL_INIT 118210f94802Smrg 118310f94802Smrg 118410f94802Smrg 118510f94802Smrg# _LT_PROG_ECHO_BACKSLASH 118610f94802Smrg# ----------------------- 118710f94802Smrg# Find how we can fake an echo command that does not interpret backslash. 118810f94802Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 118910f94802Smrg# of the generated configure script that will find a shell with a builtin 119010f94802Smrg# printf (that we can use as an echo command). 119110f94802Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 119210f94802Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 119310f94802SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 119410f94802SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 119510f94802Smrg 119610f94802SmrgAC_MSG_CHECKING([how to print strings]) 119710f94802Smrg# Test print first, because it will be a builtin if present. 119810f94802Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 119910f94802Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 120010f94802Smrg ECHO='print -r --' 120110f94802Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 120210f94802Smrg ECHO='printf %s\n' 120310f94802Smrgelse 120410f94802Smrg # Use this function as a fallback that always works. 120510f94802Smrg func_fallback_echo () 120610f94802Smrg { 120710f94802Smrg eval 'cat <<_LTECHO_EOF 120810f94802Smrg$[]1 120910f94802Smrg_LTECHO_EOF' 121010f94802Smrg } 121110f94802Smrg ECHO='func_fallback_echo' 121210f94802Smrgfi 121310f94802Smrg 121410f94802Smrg# func_echo_all arg... 121510f94802Smrg# Invoke $ECHO with all args, space-separated. 121610f94802Smrgfunc_echo_all () 121710f94802Smrg{ 121810f94802Smrg $ECHO "$*" 121910f94802Smrg} 122010f94802Smrg 122110f94802Smrgcase $ECHO in 122210f94802Smrg printf*) AC_MSG_RESULT([printf]) ;; 122310f94802Smrg print*) AC_MSG_RESULT([print -r]) ;; 122410f94802Smrg *) AC_MSG_RESULT([cat]) ;; 122510f94802Smrgesac 122610f94802Smrg 122710f94802Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 122810f94802Smrg[_AS_DETECT_SUGGESTED([ 122910f94802Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 123010f94802Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 123110f94802Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 123210f94802Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 123310f94802Smrg PATH=/empty FPATH=/empty; export PATH FPATH 123410f94802Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 123510f94802Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 123610f94802Smrg 123710f94802Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 123810f94802Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 123910f94802Smrg])# _LT_PROG_ECHO_BACKSLASH 124010f94802Smrg 124110f94802Smrg 124210f94802Smrg# _LT_WITH_SYSROOT 124310f94802Smrg# ---------------- 124410f94802SmrgAC_DEFUN([_LT_WITH_SYSROOT], 124510f94802Smrg[m4_require([_LT_DECL_SED])dnl 124610f94802SmrgAC_MSG_CHECKING([for sysroot]) 124710f94802SmrgAC_ARG_WITH([sysroot], 124810f94802Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 124910f94802Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 125010f94802Smrg if not specified).])], 125110f94802Smrg[], [with_sysroot=no]) 125210f94802Smrg 125310f94802Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 125410f94802Smrgdnl in case the user passed a directory name. 125510f94802Smrglt_sysroot= 125610f94802Smrgcase $with_sysroot in #( 125710f94802Smrg yes) 125810f94802Smrg if test yes = "$GCC"; then 125910f94802Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 126010f94802Smrg fi 126110f94802Smrg ;; #( 126210f94802Smrg /*) 126310f94802Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 126410f94802Smrg ;; #( 126510f94802Smrg no|'') 126610f94802Smrg ;; #( 126710f94802Smrg *) 126810f94802Smrg AC_MSG_RESULT([$with_sysroot]) 126910f94802Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 127010f94802Smrg ;; 127110f94802Smrgesac 127210f94802Smrg 127310f94802Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 127410f94802Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 127510f94802Smrg[dependent libraries, and where our libraries should be installed.])]) 127610f94802Smrg 127710f94802Smrg# _LT_ENABLE_LOCK 127810f94802Smrg# --------------- 127910f94802Smrgm4_defun([_LT_ENABLE_LOCK], 128010f94802Smrg[AC_ARG_ENABLE([libtool-lock], 128110f94802Smrg [AS_HELP_STRING([--disable-libtool-lock], 128210f94802Smrg [avoid locking (might break parallel builds)])]) 128310f94802Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 128410f94802Smrg 128510f94802Smrg# Some flags need to be propagated to the compiler or linker for good 128610f94802Smrg# libtool support. 128710f94802Smrgcase $host in 128810f94802Smrgia64-*-hpux*) 128910f94802Smrg # Find out what ABI is being produced by ac_compile, and set mode 129010f94802Smrg # options accordingly. 129110f94802Smrg echo 'int i;' > conftest.$ac_ext 129210f94802Smrg if AC_TRY_EVAL(ac_compile); then 129310f94802Smrg case `$FILECMD conftest.$ac_objext` in 129410f94802Smrg *ELF-32*) 129510f94802Smrg HPUX_IA64_MODE=32 129610f94802Smrg ;; 129710f94802Smrg *ELF-64*) 129810f94802Smrg HPUX_IA64_MODE=64 129910f94802Smrg ;; 130010f94802Smrg esac 130110f94802Smrg fi 130210f94802Smrg rm -rf conftest* 130310f94802Smrg ;; 130410f94802Smrg*-*-irix6*) 130510f94802Smrg # Find out what ABI is being produced by ac_compile, and set linker 130610f94802Smrg # options accordingly. 130710f94802Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 130810f94802Smrg if AC_TRY_EVAL(ac_compile); then 130910f94802Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 131010f94802Smrg case `$FILECMD conftest.$ac_objext` in 131110f94802Smrg *32-bit*) 131210f94802Smrg LD="${LD-ld} -melf32bsmip" 131310f94802Smrg ;; 131410f94802Smrg *N32*) 131510f94802Smrg LD="${LD-ld} -melf32bmipn32" 131610f94802Smrg ;; 131710f94802Smrg *64-bit*) 131810f94802Smrg LD="${LD-ld} -melf64bmip" 131910f94802Smrg ;; 132010f94802Smrg esac 132110f94802Smrg else 132210f94802Smrg case `$FILECMD conftest.$ac_objext` in 132310f94802Smrg *32-bit*) 132410f94802Smrg LD="${LD-ld} -32" 132510f94802Smrg ;; 132610f94802Smrg *N32*) 132710f94802Smrg LD="${LD-ld} -n32" 132810f94802Smrg ;; 132910f94802Smrg *64-bit*) 133010f94802Smrg LD="${LD-ld} -64" 133110f94802Smrg ;; 133210f94802Smrg esac 133310f94802Smrg fi 133410f94802Smrg fi 133510f94802Smrg rm -rf conftest* 133610f94802Smrg ;; 133710f94802Smrg 133810f94802Smrgmips64*-*linux*) 133910f94802Smrg # Find out what ABI is being produced by ac_compile, and set linker 134010f94802Smrg # options accordingly. 134110f94802Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 134210f94802Smrg if AC_TRY_EVAL(ac_compile); then 134310f94802Smrg emul=elf 134410f94802Smrg case `$FILECMD conftest.$ac_objext` in 134510f94802Smrg *32-bit*) 134610f94802Smrg emul="${emul}32" 134710f94802Smrg ;; 134810f94802Smrg *64-bit*) 134910f94802Smrg emul="${emul}64" 135010f94802Smrg ;; 135110f94802Smrg esac 135210f94802Smrg case `$FILECMD conftest.$ac_objext` in 135310f94802Smrg *MSB*) 135410f94802Smrg emul="${emul}btsmip" 135510f94802Smrg ;; 135610f94802Smrg *LSB*) 135710f94802Smrg emul="${emul}ltsmip" 135810f94802Smrg ;; 135910f94802Smrg esac 136010f94802Smrg case `$FILECMD conftest.$ac_objext` in 136110f94802Smrg *N32*) 136210f94802Smrg emul="${emul}n32" 136310f94802Smrg ;; 136410f94802Smrg esac 136510f94802Smrg LD="${LD-ld} -m $emul" 136610f94802Smrg fi 136710f94802Smrg rm -rf conftest* 136810f94802Smrg ;; 136910f94802Smrg 137010f94802Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 137110f94802Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 137210f94802Smrg # Find out what ABI is being produced by ac_compile, and set linker 137310f94802Smrg # options accordingly. Note that the listed cases only cover the 137410f94802Smrg # situations where additional linker options are needed (such as when 137510f94802Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 137610f94802Smrg # vice versa); the common cases where no linker options are needed do 137710f94802Smrg # not appear in the list. 137810f94802Smrg echo 'int i;' > conftest.$ac_ext 137910f94802Smrg if AC_TRY_EVAL(ac_compile); then 138010f94802Smrg case `$FILECMD conftest.o` in 138110f94802Smrg *32-bit*) 138210f94802Smrg case $host in 138310f94802Smrg x86_64-*kfreebsd*-gnu) 138410f94802Smrg LD="${LD-ld} -m elf_i386_fbsd" 138510f94802Smrg ;; 138610f94802Smrg x86_64-*linux*) 138710f94802Smrg case `$FILECMD conftest.o` in 138810f94802Smrg *x86-64*) 138910f94802Smrg LD="${LD-ld} -m elf32_x86_64" 139010f94802Smrg ;; 139110f94802Smrg *) 139210f94802Smrg LD="${LD-ld} -m elf_i386" 139310f94802Smrg ;; 139410f94802Smrg esac 139510f94802Smrg ;; 139610f94802Smrg powerpc64le-*linux*) 139710f94802Smrg LD="${LD-ld} -m elf32lppclinux" 139810f94802Smrg ;; 139910f94802Smrg powerpc64-*linux*) 140010f94802Smrg LD="${LD-ld} -m elf32ppclinux" 140110f94802Smrg ;; 140210f94802Smrg s390x-*linux*) 140310f94802Smrg LD="${LD-ld} -m elf_s390" 140410f94802Smrg ;; 140510f94802Smrg sparc64-*linux*) 140610f94802Smrg LD="${LD-ld} -m elf32_sparc" 140710f94802Smrg ;; 140810f94802Smrg esac 140910f94802Smrg ;; 141010f94802Smrg *64-bit*) 141110f94802Smrg case $host in 141210f94802Smrg x86_64-*kfreebsd*-gnu) 141310f94802Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 141410f94802Smrg ;; 141510f94802Smrg x86_64-*linux*) 141610f94802Smrg LD="${LD-ld} -m elf_x86_64" 141710f94802Smrg ;; 141810f94802Smrg powerpcle-*linux*) 141910f94802Smrg LD="${LD-ld} -m elf64lppc" 142010f94802Smrg ;; 142110f94802Smrg powerpc-*linux*) 142210f94802Smrg LD="${LD-ld} -m elf64ppc" 142310f94802Smrg ;; 142410f94802Smrg s390*-*linux*|s390*-*tpf*) 142510f94802Smrg LD="${LD-ld} -m elf64_s390" 142610f94802Smrg ;; 142710f94802Smrg sparc*-*linux*) 142810f94802Smrg LD="${LD-ld} -m elf64_sparc" 142910f94802Smrg ;; 143010f94802Smrg esac 143110f94802Smrg ;; 143210f94802Smrg esac 143310f94802Smrg fi 143410f94802Smrg rm -rf conftest* 143510f94802Smrg ;; 143610f94802Smrg 143710f94802Smrg*-*-sco3.2v5*) 143810f94802Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 143910f94802Smrg SAVE_CFLAGS=$CFLAGS 144010f94802Smrg CFLAGS="$CFLAGS -belf" 144110f94802Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 144210f94802Smrg [AC_LANG_PUSH(C) 144310f94802Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 144410f94802Smrg AC_LANG_POP]) 144510f94802Smrg if test yes != "$lt_cv_cc_needs_belf"; then 144610f94802Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 144710f94802Smrg CFLAGS=$SAVE_CFLAGS 144810f94802Smrg fi 144910f94802Smrg ;; 145010f94802Smrg*-*solaris*) 145110f94802Smrg # Find out what ABI is being produced by ac_compile, and set linker 145210f94802Smrg # options accordingly. 145310f94802Smrg echo 'int i;' > conftest.$ac_ext 145410f94802Smrg if AC_TRY_EVAL(ac_compile); then 145510f94802Smrg case `$FILECMD conftest.o` in 145610f94802Smrg *64-bit*) 145710f94802Smrg case $lt_cv_prog_gnu_ld in 145810f94802Smrg yes*) 145910f94802Smrg case $host in 146010f94802Smrg i?86-*-solaris*|x86_64-*-solaris*) 146110f94802Smrg LD="${LD-ld} -m elf_x86_64" 146210f94802Smrg ;; 146310f94802Smrg sparc*-*-solaris*) 146410f94802Smrg LD="${LD-ld} -m elf64_sparc" 146510f94802Smrg ;; 146610f94802Smrg esac 146710f94802Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 146810f94802Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 146910f94802Smrg LD=${LD-ld}_sol2 147010f94802Smrg fi 147110f94802Smrg ;; 147210f94802Smrg *) 147310f94802Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 147410f94802Smrg LD="${LD-ld} -64" 147510f94802Smrg fi 147610f94802Smrg ;; 147710f94802Smrg esac 147810f94802Smrg ;; 147910f94802Smrg esac 148010f94802Smrg fi 148110f94802Smrg rm -rf conftest* 148210f94802Smrg ;; 148310f94802Smrgesac 148410f94802Smrg 148510f94802Smrgneed_locks=$enable_libtool_lock 148610f94802Smrg])# _LT_ENABLE_LOCK 148710f94802Smrg 148810f94802Smrg 148910f94802Smrg# _LT_PROG_AR 149010f94802Smrg# ----------- 149110f94802Smrgm4_defun([_LT_PROG_AR], 149210f94802Smrg[AC_CHECK_TOOLS(AR, [ar], false) 149310f94802Smrg: ${AR=ar} 149410f94802Smrg_LT_DECL([], [AR], [1], [The archiver]) 149510f94802Smrg 149610f94802Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 149710f94802Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 149810f94802Smrg# higher priority because thats what people were doing historically (setting 149910f94802Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 150010f94802Smrg# variable obsoleted/removed. 150110f94802Smrg 150210f94802Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 150310f94802Smrglt_ar_flags=$AR_FLAGS 150410f94802Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 150510f94802Smrg 150610f94802Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 150710f94802Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 150810f94802Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 150910f94802Smrg [Flags to create an archive]) 151010f94802Smrg 151110f94802SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 151210f94802Smrg [lt_cv_ar_at_file=no 151310f94802Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 151410f94802Smrg [echo conftest.$ac_objext > conftest.lst 151510f94802Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 151610f94802Smrg AC_TRY_EVAL([lt_ar_try]) 151710f94802Smrg if test 0 -eq "$ac_status"; then 151810f94802Smrg # Ensure the archiver fails upon bogus file names. 151910f94802Smrg rm -f conftest.$ac_objext libconftest.a 152010f94802Smrg AC_TRY_EVAL([lt_ar_try]) 152110f94802Smrg if test 0 -ne "$ac_status"; then 152210f94802Smrg lt_cv_ar_at_file=@ 152310f94802Smrg fi 152410f94802Smrg fi 152510f94802Smrg rm -f conftest.* libconftest.a 152610f94802Smrg ]) 152710f94802Smrg ]) 152810f94802Smrg 152910f94802Smrgif test no = "$lt_cv_ar_at_file"; then 153010f94802Smrg archiver_list_spec= 153110f94802Smrgelse 153210f94802Smrg archiver_list_spec=$lt_cv_ar_at_file 153310f94802Smrgfi 153410f94802Smrg_LT_DECL([], [archiver_list_spec], [1], 153510f94802Smrg [How to feed a file listing to the archiver]) 153610f94802Smrg])# _LT_PROG_AR 153710f94802Smrg 153810f94802Smrg 153910f94802Smrg# _LT_CMD_OLD_ARCHIVE 154010f94802Smrg# ------------------- 154110f94802Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 154210f94802Smrg[_LT_PROG_AR 154310f94802Smrg 154410f94802SmrgAC_CHECK_TOOL(STRIP, strip, :) 154510f94802Smrgtest -z "$STRIP" && STRIP=: 154610f94802Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 154710f94802Smrg 154810f94802SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 154910f94802Smrgtest -z "$RANLIB" && RANLIB=: 155010f94802Smrg_LT_DECL([], [RANLIB], [1], 155110f94802Smrg [Commands used to install an old-style archive]) 155210f94802Smrg 155310f94802Smrg# Determine commands to create old-style static archives. 155410f94802Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 155510f94802Smrgold_postinstall_cmds='chmod 644 $oldlib' 155610f94802Smrgold_postuninstall_cmds= 155710f94802Smrg 155810f94802Smrgif test -n "$RANLIB"; then 155910f94802Smrg case $host_os in 156010f94802Smrg bitrig* | openbsd*) 156110f94802Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 156210f94802Smrg ;; 156310f94802Smrg *) 156410f94802Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 156510f94802Smrg ;; 156610f94802Smrg esac 156710f94802Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 156810f94802Smrgfi 156910f94802Smrg 157010f94802Smrgcase $host_os in 157110f94802Smrg darwin*) 157210f94802Smrg lock_old_archive_extraction=yes ;; 157310f94802Smrg *) 157410f94802Smrg lock_old_archive_extraction=no ;; 157510f94802Smrgesac 157610f94802Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 157710f94802Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 157810f94802Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 157910f94802Smrg [Commands used to build an old-style archive]) 158010f94802Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 158110f94802Smrg [Whether to use a lock for old archive extraction]) 158210f94802Smrg])# _LT_CMD_OLD_ARCHIVE 158310f94802Smrg 158410f94802Smrg 158510f94802Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 158610f94802Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 158710f94802Smrg# ---------------------------------------------------------------- 158810f94802Smrg# Check whether the given compiler option works 158910f94802SmrgAC_DEFUN([_LT_COMPILER_OPTION], 159010f94802Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 159110f94802Smrgm4_require([_LT_DECL_SED])dnl 159210f94802SmrgAC_CACHE_CHECK([$1], [$2], 159310f94802Smrg [$2=no 159410f94802Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 159510f94802Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 159610f94802Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 159710f94802Smrg # Insert the option either (1) after the last *FLAGS variable, or 159810f94802Smrg # (2) before a word containing "conftest.", or (3) at the end. 159910f94802Smrg # Note that $ac_compile itself does not contain backslashes and begins 160010f94802Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 160110f94802Smrg # The option is referenced via a variable to avoid confusing sed. 160210f94802Smrg lt_compile=`echo "$ac_compile" | $SED \ 160310f94802Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 160410f94802Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 160510f94802Smrg -e 's:$: $lt_compiler_flag:'` 160610f94802Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 160710f94802Smrg (eval "$lt_compile" 2>conftest.err) 160810f94802Smrg ac_status=$? 160910f94802Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 161010f94802Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 161110f94802Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 161210f94802Smrg # The compiler can only warn and ignore the option if not recognized 161310f94802Smrg # So say no if there are warnings other than the usual output. 161410f94802Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 161510f94802Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 161610f94802Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 161710f94802Smrg $2=yes 161810f94802Smrg fi 161910f94802Smrg fi 162010f94802Smrg $RM conftest* 162110f94802Smrg]) 162210f94802Smrg 162310f94802Smrgif test yes = "[$]$2"; then 162410f94802Smrg m4_if([$5], , :, [$5]) 162510f94802Smrgelse 162610f94802Smrg m4_if([$6], , :, [$6]) 162710f94802Smrgfi 162810f94802Smrg])# _LT_COMPILER_OPTION 162910f94802Smrg 163010f94802Smrg# Old name: 163110f94802SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 163210f94802Smrgdnl aclocal-1.4 backwards compatibility: 163310f94802Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 163410f94802Smrg 163510f94802Smrg 163610f94802Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 163710f94802Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 163810f94802Smrg# ---------------------------------------------------- 163910f94802Smrg# Check whether the given linker option works 164010f94802SmrgAC_DEFUN([_LT_LINKER_OPTION], 164110f94802Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 164210f94802Smrgm4_require([_LT_DECL_SED])dnl 164310f94802SmrgAC_CACHE_CHECK([$1], [$2], 164410f94802Smrg [$2=no 164510f94802Smrg save_LDFLAGS=$LDFLAGS 164610f94802Smrg LDFLAGS="$LDFLAGS $3" 164710f94802Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 164810f94802Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 164910f94802Smrg # The linker can only warn and ignore the option if not recognized 165010f94802Smrg # So say no if there are warnings 165110f94802Smrg if test -s conftest.err; then 165210f94802Smrg # Append any errors to the config.log. 165310f94802Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 165410f94802Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 165510f94802Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 165610f94802Smrg if diff conftest.exp conftest.er2 >/dev/null; then 165710f94802Smrg $2=yes 165810f94802Smrg fi 165910f94802Smrg else 166010f94802Smrg $2=yes 166110f94802Smrg fi 166210f94802Smrg fi 166310f94802Smrg $RM -r conftest* 166410f94802Smrg LDFLAGS=$save_LDFLAGS 166510f94802Smrg]) 166610f94802Smrg 166710f94802Smrgif test yes = "[$]$2"; then 166810f94802Smrg m4_if([$4], , :, [$4]) 166910f94802Smrgelse 167010f94802Smrg m4_if([$5], , :, [$5]) 167110f94802Smrgfi 167210f94802Smrg])# _LT_LINKER_OPTION 167310f94802Smrg 167410f94802Smrg# Old name: 167510f94802SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 167610f94802Smrgdnl aclocal-1.4 backwards compatibility: 167710f94802Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 167810f94802Smrg 167910f94802Smrg 168010f94802Smrg# LT_CMD_MAX_LEN 168110f94802Smrg#--------------- 168210f94802SmrgAC_DEFUN([LT_CMD_MAX_LEN], 168310f94802Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 168410f94802Smrg# find the maximum length of command line arguments 168510f94802SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 168610f94802SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 168710f94802Smrg i=0 168810f94802Smrg teststring=ABCD 168910f94802Smrg 169010f94802Smrg case $build_os in 169110f94802Smrg msdosdjgpp*) 169210f94802Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 169310f94802Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 169410f94802Smrg # during glob expansion). Even if it were fixed, the result of this 169510f94802Smrg # check would be larger than it should be. 169610f94802Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 169710f94802Smrg ;; 169810f94802Smrg 169910f94802Smrg gnu*) 170010f94802Smrg # Under GNU Hurd, this test is not required because there is 170110f94802Smrg # no limit to the length of command line arguments. 170210f94802Smrg # Libtool will interpret -1 as no limit whatsoever 170310f94802Smrg lt_cv_sys_max_cmd_len=-1; 170410f94802Smrg ;; 170510f94802Smrg 170610f94802Smrg cygwin* | mingw* | cegcc*) 170710f94802Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 170810f94802Smrg # about 5 minutes as the teststring grows exponentially. 170910f94802Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 171010f94802Smrg # you end up with a "frozen" computer, even though with patience 171110f94802Smrg # the test eventually succeeds (with a max line length of 256k). 171210f94802Smrg # Instead, let's just punt: use the minimum linelength reported by 171310f94802Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 171410f94802Smrg lt_cv_sys_max_cmd_len=8192; 171510f94802Smrg ;; 171610f94802Smrg 171710f94802Smrg mint*) 171810f94802Smrg # On MiNT this can take a long time and run out of memory. 171910f94802Smrg lt_cv_sys_max_cmd_len=8192; 172010f94802Smrg ;; 172110f94802Smrg 172210f94802Smrg amigaos*) 172310f94802Smrg # On AmigaOS with pdksh, this test takes hours, literally. 172410f94802Smrg # So we just punt and use a minimum line length of 8192. 172510f94802Smrg lt_cv_sys_max_cmd_len=8192; 172610f94802Smrg ;; 172710f94802Smrg 172810f94802Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 172910f94802Smrg # This has been around since 386BSD, at least. Likely further. 173010f94802Smrg if test -x /sbin/sysctl; then 173110f94802Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 173210f94802Smrg elif test -x /usr/sbin/sysctl; then 173310f94802Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 173410f94802Smrg else 173510f94802Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 173610f94802Smrg fi 173710f94802Smrg # And add a safety zone 173810f94802Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 173910f94802Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 174010f94802Smrg ;; 174110f94802Smrg 174210f94802Smrg interix*) 174310f94802Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 174410f94802Smrg lt_cv_sys_max_cmd_len=196608 174510f94802Smrg ;; 174610f94802Smrg 174710f94802Smrg os2*) 174810f94802Smrg # The test takes a long time on OS/2. 174910f94802Smrg lt_cv_sys_max_cmd_len=8192 175010f94802Smrg ;; 175110f94802Smrg 175210f94802Smrg osf*) 175310f94802Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 175410f94802Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 175510f94802Smrg # nice to cause kernel panics so lets avoid the loop below. 175610f94802Smrg # First set a reasonable default. 175710f94802Smrg lt_cv_sys_max_cmd_len=16384 175810f94802Smrg # 175910f94802Smrg if test -x /sbin/sysconfig; then 176010f94802Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 176110f94802Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 176210f94802Smrg esac 176310f94802Smrg fi 176410f94802Smrg ;; 176510f94802Smrg sco3.2v5*) 176610f94802Smrg lt_cv_sys_max_cmd_len=102400 176710f94802Smrg ;; 176810f94802Smrg sysv5* | sco5v6* | sysv4.2uw2*) 176910f94802Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 177010f94802Smrg if test -n "$kargmax"; then 177110f94802Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 177210f94802Smrg else 177310f94802Smrg lt_cv_sys_max_cmd_len=32768 177410f94802Smrg fi 177510f94802Smrg ;; 177610f94802Smrg *) 177710f94802Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 177810f94802Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 177910f94802Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 178010f94802Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 178110f94802Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 178210f94802Smrg else 178310f94802Smrg # Make teststring a little bigger before we do anything with it. 178410f94802Smrg # a 1K string should be a reasonable start. 178510f94802Smrg for i in 1 2 3 4 5 6 7 8; do 178610f94802Smrg teststring=$teststring$teststring 178710f94802Smrg done 178810f94802Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 178910f94802Smrg # If test is not a shell built-in, we'll probably end up computing a 179010f94802Smrg # maximum length that is only half of the actual maximum length, but 179110f94802Smrg # we can't tell. 179210f94802Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 179310f94802Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 179410f94802Smrg test 17 != "$i" # 1/2 MB should be enough 179510f94802Smrg do 179610f94802Smrg i=`expr $i + 1` 179710f94802Smrg teststring=$teststring$teststring 179810f94802Smrg done 179910f94802Smrg # Only check the string length outside the loop. 180010f94802Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 180110f94802Smrg teststring= 180210f94802Smrg # Add a significant safety factor because C++ compilers can tack on 180310f94802Smrg # massive amounts of additional arguments before passing them to the 180410f94802Smrg # linker. It appears as though 1/2 is a usable value. 180510f94802Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 180610f94802Smrg fi 180710f94802Smrg ;; 180810f94802Smrg esac 180910f94802Smrg]) 181010f94802Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 181110f94802Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 181210f94802Smrgelse 181310f94802Smrg AC_MSG_RESULT(none) 181410f94802Smrgfi 181510f94802Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 181610f94802Smrg_LT_DECL([], [max_cmd_len], [0], 181710f94802Smrg [What is the maximum length of a command?]) 181810f94802Smrg])# LT_CMD_MAX_LEN 181910f94802Smrg 182010f94802Smrg# Old name: 182110f94802SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 182210f94802Smrgdnl aclocal-1.4 backwards compatibility: 182310f94802Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 182410f94802Smrg 182510f94802Smrg 182610f94802Smrg# _LT_HEADER_DLFCN 182710f94802Smrg# ---------------- 182810f94802Smrgm4_defun([_LT_HEADER_DLFCN], 182910f94802Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 183010f94802Smrg])# _LT_HEADER_DLFCN 183110f94802Smrg 183210f94802Smrg 183310f94802Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 183410f94802Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 183510f94802Smrg# ---------------------------------------------------------------- 183610f94802Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 183710f94802Smrg[m4_require([_LT_HEADER_DLFCN])dnl 183810f94802Smrgif test yes = "$cross_compiling"; then : 183910f94802Smrg [$4] 184010f94802Smrgelse 184110f94802Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 184210f94802Smrg lt_status=$lt_dlunknown 184310f94802Smrg cat > conftest.$ac_ext <<_LT_EOF 184410f94802Smrg[#line $LINENO "configure" 184510f94802Smrg#include "confdefs.h" 184610f94802Smrg 184710f94802Smrg#if HAVE_DLFCN_H 184810f94802Smrg#include <dlfcn.h> 184910f94802Smrg#endif 185010f94802Smrg 185110f94802Smrg#include <stdio.h> 185210f94802Smrg 185310f94802Smrg#ifdef RTLD_GLOBAL 185410f94802Smrg# define LT_DLGLOBAL RTLD_GLOBAL 185510f94802Smrg#else 185610f94802Smrg# ifdef DL_GLOBAL 185710f94802Smrg# define LT_DLGLOBAL DL_GLOBAL 185810f94802Smrg# else 185910f94802Smrg# define LT_DLGLOBAL 0 186010f94802Smrg# endif 186110f94802Smrg#endif 186210f94802Smrg 186310f94802Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 186410f94802Smrg find out it does not work in some platform. */ 186510f94802Smrg#ifndef LT_DLLAZY_OR_NOW 186610f94802Smrg# ifdef RTLD_LAZY 186710f94802Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 186810f94802Smrg# else 186910f94802Smrg# ifdef DL_LAZY 187010f94802Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 187110f94802Smrg# else 187210f94802Smrg# ifdef RTLD_NOW 187310f94802Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 187410f94802Smrg# else 187510f94802Smrg# ifdef DL_NOW 187610f94802Smrg# define LT_DLLAZY_OR_NOW DL_NOW 187710f94802Smrg# else 187810f94802Smrg# define LT_DLLAZY_OR_NOW 0 187910f94802Smrg# endif 188010f94802Smrg# endif 188110f94802Smrg# endif 188210f94802Smrg# endif 188310f94802Smrg#endif 188410f94802Smrg 188510f94802Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 188610f94802Smrg correspondingly for the symbols needed. */ 188710f94802Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 188810f94802Smrgint fnord () __attribute__((visibility("default"))); 188910f94802Smrg#endif 189010f94802Smrg 189110f94802Smrgint fnord () { return 42; } 189210f94802Smrgint main () 189310f94802Smrg{ 189410f94802Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 189510f94802Smrg int status = $lt_dlunknown; 189610f94802Smrg 189710f94802Smrg if (self) 189810f94802Smrg { 189910f94802Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 190010f94802Smrg else 190110f94802Smrg { 190210f94802Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 190310f94802Smrg else puts (dlerror ()); 190410f94802Smrg } 190510f94802Smrg /* dlclose (self); */ 190610f94802Smrg } 190710f94802Smrg else 190810f94802Smrg puts (dlerror ()); 190910f94802Smrg 191010f94802Smrg return status; 191110f94802Smrg}] 191210f94802Smrg_LT_EOF 191310f94802Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 191410f94802Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 191510f94802Smrg lt_status=$? 191610f94802Smrg case x$lt_status in 191710f94802Smrg x$lt_dlno_uscore) $1 ;; 191810f94802Smrg x$lt_dlneed_uscore) $2 ;; 191910f94802Smrg x$lt_dlunknown|x*) $3 ;; 192010f94802Smrg esac 192110f94802Smrg else : 192210f94802Smrg # compilation failed 192310f94802Smrg $3 192410f94802Smrg fi 192510f94802Smrgfi 192610f94802Smrgrm -fr conftest* 192710f94802Smrg])# _LT_TRY_DLOPEN_SELF 192810f94802Smrg 192910f94802Smrg 193010f94802Smrg# LT_SYS_DLOPEN_SELF 193110f94802Smrg# ------------------ 193210f94802SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 193310f94802Smrg[m4_require([_LT_HEADER_DLFCN])dnl 193410f94802Smrgif test yes != "$enable_dlopen"; then 193510f94802Smrg enable_dlopen=unknown 193610f94802Smrg enable_dlopen_self=unknown 193710f94802Smrg enable_dlopen_self_static=unknown 193810f94802Smrgelse 193910f94802Smrg lt_cv_dlopen=no 194010f94802Smrg lt_cv_dlopen_libs= 194110f94802Smrg 194210f94802Smrg case $host_os in 194310f94802Smrg beos*) 194410f94802Smrg lt_cv_dlopen=load_add_on 194510f94802Smrg lt_cv_dlopen_libs= 194610f94802Smrg lt_cv_dlopen_self=yes 194710f94802Smrg ;; 194810f94802Smrg 194910f94802Smrg mingw* | pw32* | cegcc*) 195010f94802Smrg lt_cv_dlopen=LoadLibrary 195110f94802Smrg lt_cv_dlopen_libs= 195210f94802Smrg ;; 195310f94802Smrg 195410f94802Smrg cygwin*) 195510f94802Smrg lt_cv_dlopen=dlopen 195610f94802Smrg lt_cv_dlopen_libs= 195710f94802Smrg ;; 195810f94802Smrg 195910f94802Smrg darwin*) 196010f94802Smrg # if libdl is installed we need to link against it 196110f94802Smrg AC_CHECK_LIB([dl], [dlopen], 196210f94802Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 196310f94802Smrg lt_cv_dlopen=dyld 196410f94802Smrg lt_cv_dlopen_libs= 196510f94802Smrg lt_cv_dlopen_self=yes 196610f94802Smrg ]) 196710f94802Smrg ;; 196810f94802Smrg 196910f94802Smrg tpf*) 197010f94802Smrg # Don't try to run any link tests for TPF. We know it's impossible 197110f94802Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 197210f94802Smrg lt_cv_dlopen=dlopen 197310f94802Smrg lt_cv_dlopen_libs= 197410f94802Smrg lt_cv_dlopen_self=no 197510f94802Smrg ;; 197610f94802Smrg 197710f94802Smrg *) 197810f94802Smrg AC_CHECK_FUNC([shl_load], 197910f94802Smrg [lt_cv_dlopen=shl_load], 198010f94802Smrg [AC_CHECK_LIB([dld], [shl_load], 198110f94802Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 198210f94802Smrg [AC_CHECK_FUNC([dlopen], 198310f94802Smrg [lt_cv_dlopen=dlopen], 198410f94802Smrg [AC_CHECK_LIB([dl], [dlopen], 198510f94802Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 198610f94802Smrg [AC_CHECK_LIB([svld], [dlopen], 198710f94802Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 198810f94802Smrg [AC_CHECK_LIB([dld], [dld_link], 198910f94802Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 199010f94802Smrg ]) 199110f94802Smrg ]) 199210f94802Smrg ]) 199310f94802Smrg ]) 199410f94802Smrg ]) 199510f94802Smrg ;; 199610f94802Smrg esac 199710f94802Smrg 199810f94802Smrg if test no = "$lt_cv_dlopen"; then 199910f94802Smrg enable_dlopen=no 200010f94802Smrg else 200110f94802Smrg enable_dlopen=yes 200210f94802Smrg fi 200310f94802Smrg 200410f94802Smrg case $lt_cv_dlopen in 200510f94802Smrg dlopen) 200610f94802Smrg save_CPPFLAGS=$CPPFLAGS 200710f94802Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 200810f94802Smrg 200910f94802Smrg save_LDFLAGS=$LDFLAGS 201010f94802Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 201110f94802Smrg 201210f94802Smrg save_LIBS=$LIBS 201310f94802Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 201410f94802Smrg 201510f94802Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 201610f94802Smrg lt_cv_dlopen_self, [dnl 201710f94802Smrg _LT_TRY_DLOPEN_SELF( 201810f94802Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 201910f94802Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 202010f94802Smrg ]) 202110f94802Smrg 202210f94802Smrg if test yes = "$lt_cv_dlopen_self"; then 202310f94802Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 202410f94802Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 202510f94802Smrg lt_cv_dlopen_self_static, [dnl 202610f94802Smrg _LT_TRY_DLOPEN_SELF( 202710f94802Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 202810f94802Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 202910f94802Smrg ]) 203010f94802Smrg fi 203110f94802Smrg 203210f94802Smrg CPPFLAGS=$save_CPPFLAGS 203310f94802Smrg LDFLAGS=$save_LDFLAGS 203410f94802Smrg LIBS=$save_LIBS 203510f94802Smrg ;; 203610f94802Smrg esac 203710f94802Smrg 203810f94802Smrg case $lt_cv_dlopen_self in 203910f94802Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 204010f94802Smrg *) enable_dlopen_self=unknown ;; 204110f94802Smrg esac 204210f94802Smrg 204310f94802Smrg case $lt_cv_dlopen_self_static in 204410f94802Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 204510f94802Smrg *) enable_dlopen_self_static=unknown ;; 204610f94802Smrg esac 204710f94802Smrgfi 204810f94802Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 204910f94802Smrg [Whether dlopen is supported]) 205010f94802Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 205110f94802Smrg [Whether dlopen of programs is supported]) 205210f94802Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 205310f94802Smrg [Whether dlopen of statically linked programs is supported]) 205410f94802Smrg])# LT_SYS_DLOPEN_SELF 205510f94802Smrg 205610f94802Smrg# Old name: 205710f94802SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 205810f94802Smrgdnl aclocal-1.4 backwards compatibility: 205910f94802Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 206010f94802Smrg 206110f94802Smrg 206210f94802Smrg# _LT_COMPILER_C_O([TAGNAME]) 206310f94802Smrg# --------------------------- 206410f94802Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 206510f94802Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 206610f94802Smrgm4_defun([_LT_COMPILER_C_O], 206710f94802Smrg[m4_require([_LT_DECL_SED])dnl 206810f94802Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 206910f94802Smrgm4_require([_LT_TAG_COMPILER])dnl 207010f94802SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 207110f94802Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 207210f94802Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 207310f94802Smrg $RM -r conftest 2>/dev/null 207410f94802Smrg mkdir conftest 207510f94802Smrg cd conftest 207610f94802Smrg mkdir out 207710f94802Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 207810f94802Smrg 207910f94802Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 208010f94802Smrg # Insert the option either (1) after the last *FLAGS variable, or 208110f94802Smrg # (2) before a word containing "conftest.", or (3) at the end. 208210f94802Smrg # Note that $ac_compile itself does not contain backslashes and begins 208310f94802Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 208410f94802Smrg lt_compile=`echo "$ac_compile" | $SED \ 208510f94802Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 208610f94802Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 208710f94802Smrg -e 's:$: $lt_compiler_flag:'` 208810f94802Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 208910f94802Smrg (eval "$lt_compile" 2>out/conftest.err) 209010f94802Smrg ac_status=$? 209110f94802Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 209210f94802Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 209310f94802Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 209410f94802Smrg then 209510f94802Smrg # The compiler can only warn and ignore the option if not recognized 209610f94802Smrg # So say no if there are warnings 209710f94802Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 209810f94802Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 209910f94802Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 210010f94802Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 210110f94802Smrg fi 210210f94802Smrg fi 210310f94802Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 210410f94802Smrg $RM conftest* 210510f94802Smrg # SGI C++ compiler will create directory out/ii_files/ for 210610f94802Smrg # template instantiation 210710f94802Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 210810f94802Smrg $RM out/* && rmdir out 210910f94802Smrg cd .. 211010f94802Smrg $RM -r conftest 211110f94802Smrg $RM conftest* 211210f94802Smrg]) 211310f94802Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 211410f94802Smrg [Does compiler simultaneously support -c and -o options?]) 211510f94802Smrg])# _LT_COMPILER_C_O 211610f94802Smrg 211710f94802Smrg 211810f94802Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 211910f94802Smrg# ---------------------------------- 212010f94802Smrg# Check to see if we can do hard links to lock some files if needed 212110f94802Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 212210f94802Smrg[m4_require([_LT_ENABLE_LOCK])dnl 212310f94802Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 212410f94802Smrg_LT_COMPILER_C_O([$1]) 212510f94802Smrg 212610f94802Smrghard_links=nottested 212710f94802Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 212810f94802Smrg # do not overwrite the value of need_locks provided by the user 212910f94802Smrg AC_MSG_CHECKING([if we can lock with hard links]) 213010f94802Smrg hard_links=yes 213110f94802Smrg $RM conftest* 213210f94802Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213310f94802Smrg touch conftest.a 213410f94802Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 213510f94802Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213610f94802Smrg AC_MSG_RESULT([$hard_links]) 213710f94802Smrg if test no = "$hard_links"; then 213810f94802Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 213910f94802Smrg need_locks=warn 214010f94802Smrg fi 214110f94802Smrgelse 214210f94802Smrg need_locks=no 214310f94802Smrgfi 214410f94802Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 214510f94802Smrg])# _LT_COMPILER_FILE_LOCKS 214610f94802Smrg 214710f94802Smrg 214810f94802Smrg# _LT_CHECK_OBJDIR 214910f94802Smrg# ---------------- 215010f94802Smrgm4_defun([_LT_CHECK_OBJDIR], 215110f94802Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 215210f94802Smrg[rm -f .libs 2>/dev/null 215310f94802Smrgmkdir .libs 2>/dev/null 215410f94802Smrgif test -d .libs; then 215510f94802Smrg lt_cv_objdir=.libs 215610f94802Smrgelse 215710f94802Smrg # MS-DOS does not allow filenames that begin with a dot. 215810f94802Smrg lt_cv_objdir=_libs 215910f94802Smrgfi 216010f94802Smrgrmdir .libs 2>/dev/null]) 216110f94802Smrgobjdir=$lt_cv_objdir 216210f94802Smrg_LT_DECL([], [objdir], [0], 216310f94802Smrg [The name of the directory that contains temporary libtool files])dnl 216410f94802Smrgm4_pattern_allow([LT_OBJDIR])dnl 216510f94802SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 216610f94802Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 216710f94802Smrg])# _LT_CHECK_OBJDIR 216810f94802Smrg 216910f94802Smrg 217010f94802Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 217110f94802Smrg# -------------------------------------- 217210f94802Smrg# Check hardcoding attributes. 217310f94802Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 217410f94802Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 217510f94802Smrg_LT_TAGVAR(hardcode_action, $1)= 217610f94802Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 217710f94802Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 217810f94802Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 217910f94802Smrg 218010f94802Smrg # We can hardcode non-existent directories. 218110f94802Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 218210f94802Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 218310f94802Smrg # have to relink, otherwise we might link with an installed library 218410f94802Smrg # when we should be linking with a yet-to-be-installed one 218510f94802Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 218610f94802Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 218710f94802Smrg # Linking always hardcodes the temporary library directory. 218810f94802Smrg _LT_TAGVAR(hardcode_action, $1)=relink 218910f94802Smrg else 219010f94802Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 219110f94802Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 219210f94802Smrg fi 219310f94802Smrgelse 219410f94802Smrg # We cannot hardcode anything, or else we can only hardcode existing 219510f94802Smrg # directories. 219610f94802Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 219710f94802Smrgfi 219810f94802SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 219910f94802Smrg 220010f94802Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 220110f94802Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 220210f94802Smrg # Fast installation is not supported 220310f94802Smrg enable_fast_install=no 220410f94802Smrgelif test yes = "$shlibpath_overrides_runpath" || 220510f94802Smrg test no = "$enable_shared"; then 220610f94802Smrg # Fast installation is not necessary 220710f94802Smrg enable_fast_install=needless 220810f94802Smrgfi 220910f94802Smrg_LT_TAGDECL([], [hardcode_action], [0], 221010f94802Smrg [How to hardcode a shared library path into an executable]) 221110f94802Smrg])# _LT_LINKER_HARDCODE_LIBPATH 221210f94802Smrg 221310f94802Smrg 221410f94802Smrg# _LT_CMD_STRIPLIB 221510f94802Smrg# ---------------- 221610f94802Smrgm4_defun([_LT_CMD_STRIPLIB], 221710f94802Smrg[m4_require([_LT_DECL_EGREP]) 221810f94802Smrgstriplib= 221910f94802Smrgold_striplib= 222010f94802SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 222110f94802Smrgif test -z "$STRIP"; then 222210f94802Smrg AC_MSG_RESULT([no]) 222310f94802Smrgelse 222410f94802Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 222510f94802Smrg old_striplib="$STRIP --strip-debug" 222610f94802Smrg striplib="$STRIP --strip-unneeded" 222710f94802Smrg AC_MSG_RESULT([yes]) 222810f94802Smrg else 222910f94802Smrg case $host_os in 223010f94802Smrg darwin*) 223110f94802Smrg # FIXME - insert some real tests, host_os isn't really good enough 223210f94802Smrg striplib="$STRIP -x" 223310f94802Smrg old_striplib="$STRIP -S" 223410f94802Smrg AC_MSG_RESULT([yes]) 223510f94802Smrg ;; 223610f94802Smrg freebsd*) 223710f94802Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 223810f94802Smrg old_striplib="$STRIP --strip-debug" 223910f94802Smrg striplib="$STRIP --strip-unneeded" 224010f94802Smrg AC_MSG_RESULT([yes]) 224110f94802Smrg else 224210f94802Smrg AC_MSG_RESULT([no]) 224310f94802Smrg fi 224410f94802Smrg ;; 224510f94802Smrg *) 224610f94802Smrg AC_MSG_RESULT([no]) 224710f94802Smrg ;; 224810f94802Smrg esac 224910f94802Smrg fi 225010f94802Smrgfi 225110f94802Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 225210f94802Smrg_LT_DECL([], [striplib], [1]) 225310f94802Smrg])# _LT_CMD_STRIPLIB 225410f94802Smrg 225510f94802Smrg 225610f94802Smrg# _LT_PREPARE_MUNGE_PATH_LIST 225710f94802Smrg# --------------------------- 225810f94802Smrg# Make sure func_munge_path_list() is defined correctly. 225910f94802Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 226010f94802Smrg[[# func_munge_path_list VARIABLE PATH 226110f94802Smrg# ----------------------------------- 226210f94802Smrg# VARIABLE is name of variable containing _space_ separated list of 226310f94802Smrg# directories to be munged by the contents of PATH, which is string 226410f94802Smrg# having a format: 226510f94802Smrg# "DIR[:DIR]:" 226610f94802Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 226710f94802Smrg# ":DIR[:DIR]" 226810f94802Smrg# string "DIR[ DIR]" will be appended to VARIABLE 226910f94802Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 227010f94802Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 227110f94802Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 227210f94802Smrg# "DIR[:DIR]" 227310f94802Smrg# VARIABLE will be replaced by "DIR[ DIR]" 227410f94802Smrgfunc_munge_path_list () 227510f94802Smrg{ 227610f94802Smrg case x@S|@2 in 227710f94802Smrg x) 227810f94802Smrg ;; 227910f94802Smrg *:) 228010f94802Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 228110f94802Smrg ;; 228210f94802Smrg x:*) 228310f94802Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 228410f94802Smrg ;; 228510f94802Smrg *::*) 228610f94802Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 228710f94802Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 228810f94802Smrg ;; 228910f94802Smrg *) 229010f94802Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 229110f94802Smrg ;; 229210f94802Smrg esac 229310f94802Smrg} 229410f94802Smrg]])# _LT_PREPARE_PATH_LIST 229510f94802Smrg 229610f94802Smrg 229710f94802Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 229810f94802Smrg# ----------------------------- 229910f94802Smrg# PORTME Fill in your ld.so characteristics 230010f94802Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 230110f94802Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 230210f94802Smrgm4_require([_LT_DECL_EGREP])dnl 230310f94802Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 230410f94802Smrgm4_require([_LT_DECL_OBJDUMP])dnl 230510f94802Smrgm4_require([_LT_DECL_SED])dnl 230610f94802Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 230710f94802Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 230810f94802SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 230910f94802Smrgm4_if([$1], 231010f94802Smrg [], [ 231110f94802Smrgif test yes = "$GCC"; then 231210f94802Smrg case $host_os in 231310f94802Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 231410f94802Smrg *) lt_awk_arg='/^libraries:/' ;; 231510f94802Smrg esac 231610f94802Smrg case $host_os in 231710f94802Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 231810f94802Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 231910f94802Smrg esac 232010f94802Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 232110f94802Smrg case $lt_search_path_spec in 232210f94802Smrg *\;*) 232310f94802Smrg # if the path contains ";" then we assume it to be the separator 232410f94802Smrg # otherwise default to the standard path separator (i.e. ":") - it is 232510f94802Smrg # assumed that no part of a normal pathname contains ";" but that should 232610f94802Smrg # okay in the real world where ";" in dirpaths is itself problematic. 232710f94802Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 232810f94802Smrg ;; 232910f94802Smrg *) 233010f94802Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 233110f94802Smrg ;; 233210f94802Smrg esac 233310f94802Smrg # Ok, now we have the path, separated by spaces, we can step through it 233410f94802Smrg # and add multilib dir if necessary... 233510f94802Smrg lt_tmp_lt_search_path_spec= 233610f94802Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 233710f94802Smrg # ...but if some path component already ends with the multilib dir we assume 233810f94802Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 233910f94802Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 234010f94802Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 234110f94802Smrg lt_multi_os_dir= 234210f94802Smrg ;; 234310f94802Smrg esac 234410f94802Smrg for lt_sys_path in $lt_search_path_spec; do 234510f94802Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 234610f94802Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 234710f94802Smrg elif test -n "$lt_multi_os_dir"; then 234810f94802Smrg test -d "$lt_sys_path" && \ 234910f94802Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 235010f94802Smrg fi 235110f94802Smrg done 235210f94802Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 235310f94802SmrgBEGIN {RS = " "; FS = "/|\n";} { 235410f94802Smrg lt_foo = ""; 235510f94802Smrg lt_count = 0; 235610f94802Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 235710f94802Smrg if ($lt_i != "" && $lt_i != ".") { 235810f94802Smrg if ($lt_i == "..") { 235910f94802Smrg lt_count++; 236010f94802Smrg } else { 236110f94802Smrg if (lt_count == 0) { 236210f94802Smrg lt_foo = "/" $lt_i lt_foo; 236310f94802Smrg } else { 236410f94802Smrg lt_count--; 236510f94802Smrg } 236610f94802Smrg } 236710f94802Smrg } 236810f94802Smrg } 236910f94802Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 237010f94802Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 237110f94802Smrg}'` 237210f94802Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 237310f94802Smrg # for these hosts. 237410f94802Smrg case $host_os in 237510f94802Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 237610f94802Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 237710f94802Smrg esac 237810f94802Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 237910f94802Smrgelse 238010f94802Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 238110f94802Smrgfi]) 238210f94802Smrglibrary_names_spec= 238310f94802Smrglibname_spec='lib$name' 238410f94802Smrgsoname_spec= 238510f94802Smrgshrext_cmds=.so 238610f94802Smrgpostinstall_cmds= 238710f94802Smrgpostuninstall_cmds= 238810f94802Smrgfinish_cmds= 238910f94802Smrgfinish_eval= 239010f94802Smrgshlibpath_var= 239110f94802Smrgshlibpath_overrides_runpath=unknown 239210f94802Smrgversion_type=none 239310f94802Smrgdynamic_linker="$host_os ld.so" 239410f94802Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 239510f94802Smrgneed_lib_prefix=unknown 239610f94802Smrghardcode_into_libs=no 239710f94802Smrg 239810f94802Smrg# when you set need_version to no, make sure it does not cause -set_version 239910f94802Smrg# flags to be left without arguments 240010f94802Smrgneed_version=unknown 240110f94802Smrg 240210f94802SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 240310f94802Smrg[User-defined run-time library search path.]) 240410f94802Smrg 240510f94802Smrgcase $host_os in 240610f94802Smrgaix3*) 240710f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 240810f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 240910f94802Smrg shlibpath_var=LIBPATH 241010f94802Smrg 241110f94802Smrg # AIX 3 has no versioning support, so we append a major version to the name. 241210f94802Smrg soname_spec='$libname$release$shared_ext$major' 241310f94802Smrg ;; 241410f94802Smrg 241510f94802Smrgaix[[4-9]]*) 241610f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 241710f94802Smrg need_lib_prefix=no 241810f94802Smrg need_version=no 241910f94802Smrg hardcode_into_libs=yes 242010f94802Smrg if test ia64 = "$host_cpu"; then 242110f94802Smrg # AIX 5 supports IA64 242210f94802Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 242310f94802Smrg shlibpath_var=LD_LIBRARY_PATH 242410f94802Smrg else 242510f94802Smrg # With GCC up to 2.95.x, collect2 would create an import file 242610f94802Smrg # for dependence libraries. The import file would start with 242710f94802Smrg # the line '#! .'. This would cause the generated library to 242810f94802Smrg # depend on '.', always an invalid library. This was fixed in 242910f94802Smrg # development snapshots of GCC prior to 3.0. 243010f94802Smrg case $host_os in 243110f94802Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 243210f94802Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 243310f94802Smrg echo ' yes ' 243410f94802Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 243510f94802Smrg : 243610f94802Smrg else 243710f94802Smrg can_build_shared=no 243810f94802Smrg fi 243910f94802Smrg ;; 244010f94802Smrg esac 244110f94802Smrg # Using Import Files as archive members, it is possible to support 244210f94802Smrg # filename-based versioning of shared library archives on AIX. While 244310f94802Smrg # this would work for both with and without runtime linking, it will 244410f94802Smrg # prevent static linking of such archives. So we do filename-based 244510f94802Smrg # shared library versioning with .so extension only, which is used 244610f94802Smrg # when both runtime linking and shared linking is enabled. 244710f94802Smrg # Unfortunately, runtime linking may impact performance, so we do 244810f94802Smrg # not want this to be the default eventually. Also, we use the 244910f94802Smrg # versioned .so libs for executables only if there is the -brtl 245010f94802Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 245110f94802Smrg # To allow for filename-based versioning support, we need to create 245210f94802Smrg # libNAME.so.V as an archive file, containing: 245310f94802Smrg # *) an Import File, referring to the versioned filename of the 245410f94802Smrg # archive as well as the shared archive member, telling the 245510f94802Smrg # bitwidth (32 or 64) of that shared object, and providing the 245610f94802Smrg # list of exported symbols of that shared object, eventually 245710f94802Smrg # decorated with the 'weak' keyword 245810f94802Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 245910f94802Smrg # it being seen by the linker. 246010f94802Smrg # At run time we better use the real file rather than another symlink, 246110f94802Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 246210f94802Smrg 246310f94802Smrg case $with_aix_soname,$aix_use_runtimelinking in 246410f94802Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 246510f94802Smrg # soname into executable. Probably we can add versioning support to 246610f94802Smrg # collect2, so additional links can be useful in future. 246710f94802Smrg aix,yes) # traditional libtool 246810f94802Smrg dynamic_linker='AIX unversionable lib.so' 246910f94802Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 247010f94802Smrg # instead of lib<name>.a to let people know that these are not 247110f94802Smrg # typical AIX shared libraries. 247210f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 247310f94802Smrg ;; 247410f94802Smrg aix,no) # traditional AIX only 247510f94802Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 247610f94802Smrg # We preserve .a as extension for shared libraries through AIX4.2 247710f94802Smrg # and later when we are not doing run time linking. 247810f94802Smrg library_names_spec='$libname$release.a $libname.a' 247910f94802Smrg soname_spec='$libname$release$shared_ext$major' 248010f94802Smrg ;; 248110f94802Smrg svr4,*) # full svr4 only 248210f94802Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 248310f94802Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 248410f94802Smrg # We do not specify a path in Import Files, so LIBPATH fires. 248510f94802Smrg shlibpath_overrides_runpath=yes 248610f94802Smrg ;; 248710f94802Smrg *,yes) # both, prefer svr4 248810f94802Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 248910f94802Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 249010f94802Smrg # unpreferred sharedlib libNAME.a needs extra handling 249110f94802Smrg 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"' 249210f94802Smrg 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"' 249310f94802Smrg # We do not specify a path in Import Files, so LIBPATH fires. 249410f94802Smrg shlibpath_overrides_runpath=yes 249510f94802Smrg ;; 249610f94802Smrg *,no) # both, prefer aix 249710f94802Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 249810f94802Smrg library_names_spec='$libname$release.a $libname.a' 249910f94802Smrg soname_spec='$libname$release$shared_ext$major' 250010f94802Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 250110f94802Smrg 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)' 250210f94802Smrg 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"' 250310f94802Smrg ;; 250410f94802Smrg esac 250510f94802Smrg shlibpath_var=LIBPATH 250610f94802Smrg fi 250710f94802Smrg ;; 250810f94802Smrg 250910f94802Smrgamigaos*) 251010f94802Smrg case $host_cpu in 251110f94802Smrg powerpc) 251210f94802Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 251310f94802Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 251410f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 251510f94802Smrg ;; 251610f94802Smrg m68k) 251710f94802Smrg library_names_spec='$libname.ixlibrary $libname.a' 251810f94802Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 251910f94802Smrg 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' 252010f94802Smrg ;; 252110f94802Smrg esac 252210f94802Smrg ;; 252310f94802Smrg 252410f94802Smrgbeos*) 252510f94802Smrg library_names_spec='$libname$shared_ext' 252610f94802Smrg dynamic_linker="$host_os ld.so" 252710f94802Smrg shlibpath_var=LIBRARY_PATH 252810f94802Smrg ;; 252910f94802Smrg 253010f94802Smrgbsdi[[45]]*) 253110f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 253210f94802Smrg need_version=no 253310f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 253410f94802Smrg soname_spec='$libname$release$shared_ext$major' 253510f94802Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 253610f94802Smrg shlibpath_var=LD_LIBRARY_PATH 253710f94802Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 253810f94802Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 253910f94802Smrg # the default ld.so.conf also contains /usr/contrib/lib and 254010f94802Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 254110f94802Smrg # libtool to hard-code these into programs 254210f94802Smrg ;; 254310f94802Smrg 254410f94802Smrgcygwin* | mingw* | pw32* | cegcc*) 254510f94802Smrg version_type=windows 254610f94802Smrg shrext_cmds=.dll 254710f94802Smrg need_version=no 254810f94802Smrg need_lib_prefix=no 254910f94802Smrg 255010f94802Smrg case $GCC,$cc_basename in 255110f94802Smrg yes,*) 255210f94802Smrg # gcc 255310f94802Smrg library_names_spec='$libname.dll.a' 255410f94802Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 255510f94802Smrg postinstall_cmds='base_file=`basename \$file`~ 255610f94802Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 255710f94802Smrg dldir=$destdir/`dirname \$dlpath`~ 255810f94802Smrg test -d \$dldir || mkdir -p \$dldir~ 255910f94802Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 256010f94802Smrg chmod a+x \$dldir/$dlname~ 256110f94802Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 256210f94802Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 256310f94802Smrg fi' 256410f94802Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 256510f94802Smrg dlpath=$dir/\$dldll~ 256610f94802Smrg $RM \$dlpath' 256710f94802Smrg shlibpath_overrides_runpath=yes 256810f94802Smrg 256910f94802Smrg case $host_os in 257010f94802Smrg cygwin*) 257110f94802Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 257210f94802Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257310f94802Smrgm4_if([$1], [],[ 257410f94802Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 257510f94802Smrg ;; 257610f94802Smrg mingw* | cegcc*) 257710f94802Smrg # MinGW DLLs use traditional 'lib' prefix 257810f94802Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257910f94802Smrg ;; 258010f94802Smrg pw32*) 258110f94802Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 258210f94802Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 258310f94802Smrg ;; 258410f94802Smrg esac 258510f94802Smrg dynamic_linker='Win32 ld.exe' 258610f94802Smrg ;; 258710f94802Smrg 258810f94802Smrg *,cl* | *,icl*) 258910f94802Smrg # Native MSVC or ICC 259010f94802Smrg libname_spec='$name' 259110f94802Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 259210f94802Smrg library_names_spec='$libname.dll.lib' 259310f94802Smrg 259410f94802Smrg case $build_os in 259510f94802Smrg mingw*) 259610f94802Smrg sys_lib_search_path_spec= 259710f94802Smrg lt_save_ifs=$IFS 259810f94802Smrg IFS=';' 259910f94802Smrg for lt_path in $LIB 260010f94802Smrg do 260110f94802Smrg IFS=$lt_save_ifs 260210f94802Smrg # Let DOS variable expansion print the short 8.3 style file name. 260310f94802Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 260410f94802Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 260510f94802Smrg done 260610f94802Smrg IFS=$lt_save_ifs 260710f94802Smrg # Convert to MSYS style. 260810f94802Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 260910f94802Smrg ;; 261010f94802Smrg cygwin*) 261110f94802Smrg # Convert to unix form, then to dos form, then back to unix form 261210f94802Smrg # but this time dos style (no spaces!) so that the unix form looks 261310f94802Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 261410f94802Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 261510f94802Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 261610f94802Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 261710f94802Smrg ;; 261810f94802Smrg *) 261910f94802Smrg sys_lib_search_path_spec=$LIB 262010f94802Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 262110f94802Smrg # It is most probably a Windows format PATH. 262210f94802Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 262310f94802Smrg else 262410f94802Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 262510f94802Smrg fi 262610f94802Smrg # FIXME: find the short name or the path components, as spaces are 262710f94802Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 262810f94802Smrg ;; 262910f94802Smrg esac 263010f94802Smrg 263110f94802Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 263210f94802Smrg postinstall_cmds='base_file=`basename \$file`~ 263310f94802Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 263410f94802Smrg dldir=$destdir/`dirname \$dlpath`~ 263510f94802Smrg test -d \$dldir || mkdir -p \$dldir~ 263610f94802Smrg $install_prog $dir/$dlname \$dldir/$dlname' 263710f94802Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 263810f94802Smrg dlpath=$dir/\$dldll~ 263910f94802Smrg $RM \$dlpath' 264010f94802Smrg shlibpath_overrides_runpath=yes 264110f94802Smrg dynamic_linker='Win32 link.exe' 264210f94802Smrg ;; 264310f94802Smrg 264410f94802Smrg *) 264510f94802Smrg # Assume MSVC and ICC wrapper 264610f94802Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 264710f94802Smrg dynamic_linker='Win32 ld.exe' 264810f94802Smrg ;; 264910f94802Smrg esac 265010f94802Smrg # FIXME: first we should search . and the directory the executable is in 265110f94802Smrg shlibpath_var=PATH 265210f94802Smrg ;; 265310f94802Smrg 265410f94802Smrgdarwin* | rhapsody*) 265510f94802Smrg dynamic_linker="$host_os dyld" 265610f94802Smrg version_type=darwin 265710f94802Smrg need_lib_prefix=no 265810f94802Smrg need_version=no 265910f94802Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 266010f94802Smrg soname_spec='$libname$release$major$shared_ext' 266110f94802Smrg shlibpath_overrides_runpath=yes 266210f94802Smrg shlibpath_var=DYLD_LIBRARY_PATH 266310f94802Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 266410f94802Smrgm4_if([$1], [],[ 266510f94802Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 266610f94802Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 266710f94802Smrg ;; 266810f94802Smrg 266910f94802Smrgdgux*) 267010f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 267110f94802Smrg need_lib_prefix=no 267210f94802Smrg need_version=no 267310f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 267410f94802Smrg soname_spec='$libname$release$shared_ext$major' 267510f94802Smrg shlibpath_var=LD_LIBRARY_PATH 267610f94802Smrg ;; 267710f94802Smrg 267810f94802Smrgfreebsd* | dragonfly* | midnightbsd*) 267910f94802Smrg # DragonFly does not have aout. When/if they implement a new 268010f94802Smrg # versioning mechanism, adjust this. 268110f94802Smrg if test -x /usr/bin/objformat; then 268210f94802Smrg objformat=`/usr/bin/objformat` 268310f94802Smrg else 268410f94802Smrg case $host_os in 268510f94802Smrg freebsd[[23]].*) objformat=aout ;; 268610f94802Smrg *) objformat=elf ;; 268710f94802Smrg esac 268810f94802Smrg fi 268910f94802Smrg version_type=freebsd-$objformat 269010f94802Smrg case $version_type in 269110f94802Smrg freebsd-elf*) 269210f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 269310f94802Smrg soname_spec='$libname$release$shared_ext$major' 269410f94802Smrg need_version=no 269510f94802Smrg need_lib_prefix=no 269610f94802Smrg ;; 269710f94802Smrg freebsd-*) 269810f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 269910f94802Smrg need_version=yes 270010f94802Smrg ;; 270110f94802Smrg esac 270210f94802Smrg shlibpath_var=LD_LIBRARY_PATH 270310f94802Smrg case $host_os in 270410f94802Smrg freebsd2.*) 270510f94802Smrg shlibpath_overrides_runpath=yes 270610f94802Smrg ;; 270710f94802Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 270810f94802Smrg shlibpath_overrides_runpath=yes 270910f94802Smrg hardcode_into_libs=yes 271010f94802Smrg ;; 271110f94802Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 271210f94802Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 271310f94802Smrg shlibpath_overrides_runpath=no 271410f94802Smrg hardcode_into_libs=yes 271510f94802Smrg ;; 271610f94802Smrg *) # from 4.6 on, and DragonFly 271710f94802Smrg shlibpath_overrides_runpath=yes 271810f94802Smrg hardcode_into_libs=yes 271910f94802Smrg ;; 272010f94802Smrg esac 272110f94802Smrg ;; 272210f94802Smrg 272310f94802Smrghaiku*) 272410f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 272510f94802Smrg need_lib_prefix=no 272610f94802Smrg need_version=no 272710f94802Smrg dynamic_linker="$host_os runtime_loader" 272810f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 272910f94802Smrg soname_spec='$libname$release$shared_ext$major' 273010f94802Smrg shlibpath_var=LIBRARY_PATH 273110f94802Smrg shlibpath_overrides_runpath=no 273210f94802Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 273310f94802Smrg hardcode_into_libs=yes 273410f94802Smrg ;; 273510f94802Smrg 273610f94802Smrghpux9* | hpux10* | hpux11*) 273710f94802Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 273810f94802Smrg # link against other versions. 273910f94802Smrg version_type=sunos 274010f94802Smrg need_lib_prefix=no 274110f94802Smrg need_version=no 274210f94802Smrg case $host_cpu in 274310f94802Smrg ia64*) 274410f94802Smrg shrext_cmds='.so' 274510f94802Smrg hardcode_into_libs=yes 274610f94802Smrg dynamic_linker="$host_os dld.so" 274710f94802Smrg shlibpath_var=LD_LIBRARY_PATH 274810f94802Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 274910f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 275010f94802Smrg soname_spec='$libname$release$shared_ext$major' 275110f94802Smrg if test 32 = "$HPUX_IA64_MODE"; then 275210f94802Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 275310f94802Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 275410f94802Smrg else 275510f94802Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 275610f94802Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 275710f94802Smrg fi 275810f94802Smrg ;; 275910f94802Smrg hppa*64*) 276010f94802Smrg shrext_cmds='.sl' 276110f94802Smrg hardcode_into_libs=yes 276210f94802Smrg dynamic_linker="$host_os dld.sl" 276310f94802Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 276410f94802Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 276510f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 276610f94802Smrg soname_spec='$libname$release$shared_ext$major' 276710f94802Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 276810f94802Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 276910f94802Smrg ;; 277010f94802Smrg *) 277110f94802Smrg shrext_cmds='.sl' 277210f94802Smrg dynamic_linker="$host_os dld.sl" 277310f94802Smrg shlibpath_var=SHLIB_PATH 277410f94802Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 277510f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 277610f94802Smrg soname_spec='$libname$release$shared_ext$major' 277710f94802Smrg ;; 277810f94802Smrg esac 277910f94802Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 278010f94802Smrg postinstall_cmds='chmod 555 $lib' 278110f94802Smrg # or fails outright, so override atomically: 278210f94802Smrg install_override_mode=555 278310f94802Smrg ;; 278410f94802Smrg 278510f94802Smrginterix[[3-9]]*) 278610f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 278710f94802Smrg need_lib_prefix=no 278810f94802Smrg need_version=no 278910f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 279010f94802Smrg soname_spec='$libname$release$shared_ext$major' 279110f94802Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 279210f94802Smrg shlibpath_var=LD_LIBRARY_PATH 279310f94802Smrg shlibpath_overrides_runpath=no 279410f94802Smrg hardcode_into_libs=yes 279510f94802Smrg ;; 279610f94802Smrg 279710f94802Smrgirix5* | irix6* | nonstopux*) 279810f94802Smrg case $host_os in 279910f94802Smrg nonstopux*) version_type=nonstopux ;; 280010f94802Smrg *) 280110f94802Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 280210f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 280310f94802Smrg else 280410f94802Smrg version_type=irix 280510f94802Smrg fi ;; 280610f94802Smrg esac 280710f94802Smrg need_lib_prefix=no 280810f94802Smrg need_version=no 280910f94802Smrg soname_spec='$libname$release$shared_ext$major' 281010f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 281110f94802Smrg case $host_os in 281210f94802Smrg irix5* | nonstopux*) 281310f94802Smrg libsuff= shlibsuff= 281410f94802Smrg ;; 281510f94802Smrg *) 281610f94802Smrg case $LD in # libtool.m4 will add one of these switches to LD 281710f94802Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 281810f94802Smrg libsuff= shlibsuff= libmagic=32-bit;; 281910f94802Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 282010f94802Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 282110f94802Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 282210f94802Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 282310f94802Smrg *) libsuff= shlibsuff= libmagic=never-match;; 282410f94802Smrg esac 282510f94802Smrg ;; 282610f94802Smrg esac 282710f94802Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 282810f94802Smrg shlibpath_overrides_runpath=no 282910f94802Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 283010f94802Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 283110f94802Smrg hardcode_into_libs=yes 283210f94802Smrg ;; 283310f94802Smrg 283410f94802Smrg# No shared lib support for Linux oldld, aout, or coff. 283510f94802Smrglinux*oldld* | linux*aout* | linux*coff*) 283610f94802Smrg dynamic_linker=no 283710f94802Smrg ;; 283810f94802Smrg 283910f94802Smrglinux*android*) 284010f94802Smrg version_type=none # Android doesn't support versioned libraries. 284110f94802Smrg need_lib_prefix=no 284210f94802Smrg need_version=no 284310f94802Smrg library_names_spec='$libname$release$shared_ext' 284410f94802Smrg soname_spec='$libname$release$shared_ext' 284510f94802Smrg finish_cmds= 284610f94802Smrg shlibpath_var=LD_LIBRARY_PATH 284710f94802Smrg shlibpath_overrides_runpath=yes 284810f94802Smrg 284910f94802Smrg # This implies no fast_install, which is unacceptable. 285010f94802Smrg # Some rework will be needed to allow for fast_install 285110f94802Smrg # before this can be enabled. 285210f94802Smrg hardcode_into_libs=yes 285310f94802Smrg 285410f94802Smrg dynamic_linker='Android linker' 285510f94802Smrg # Don't embed -rpath directories since the linker doesn't support them. 285610f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 285710f94802Smrg ;; 285810f94802Smrg 285910f94802Smrg# This must be glibc/ELF. 286010f94802Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 286110f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 286210f94802Smrg need_lib_prefix=no 286310f94802Smrg need_version=no 286410f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 286510f94802Smrg soname_spec='$libname$release$shared_ext$major' 286610f94802Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 286710f94802Smrg shlibpath_var=LD_LIBRARY_PATH 286810f94802Smrg shlibpath_overrides_runpath=no 286910f94802Smrg 287010f94802Smrg # Some binutils ld are patched to set DT_RUNPATH 287110f94802Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 287210f94802Smrg [lt_cv_shlibpath_overrides_runpath=no 287310f94802Smrg save_LDFLAGS=$LDFLAGS 287410f94802Smrg save_libdir=$libdir 287510f94802Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 287610f94802Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 287710f94802Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 287810f94802Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 287910f94802Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 288010f94802Smrg LDFLAGS=$save_LDFLAGS 288110f94802Smrg libdir=$save_libdir 288210f94802Smrg ]) 288310f94802Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 288410f94802Smrg 288510f94802Smrg # This implies no fast_install, which is unacceptable. 288610f94802Smrg # Some rework will be needed to allow for fast_install 288710f94802Smrg # before this can be enabled. 288810f94802Smrg hardcode_into_libs=yes 288910f94802Smrg 289010f94802Smrg # Ideally, we could use ldconfig to report *all* directores which are 289110f94802Smrg # searched for libraries, however this is still not possible. Aside from not 289210f94802Smrg # being certain /sbin/ldconfig is available, command 289310f94802Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 289410f94802Smrg # even though it is searched at run-time. Try to do the best guess by 289510f94802Smrg # appending ld.so.conf contents (and includes) to the search path. 289610f94802Smrg if test -f /etc/ld.so.conf; then 289710f94802Smrg 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' ' '` 289810f94802Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 289910f94802Smrg fi 290010f94802Smrg 290110f94802Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 290210f94802Smrg # powerpc, because MkLinux only supported shared libraries with the 290310f94802Smrg # GNU dynamic linker. Since this was broken with cross compilers, 290410f94802Smrg # most powerpc-linux boxes support dynamic linking these days and 290510f94802Smrg # people can always --disable-shared, the test was removed, and we 290610f94802Smrg # assume the GNU/Linux dynamic linker is in use. 290710f94802Smrg dynamic_linker='GNU/Linux ld.so' 290810f94802Smrg ;; 290910f94802Smrg 291010f94802Smrgnetbsd*) 291110f94802Smrg version_type=sunos 291210f94802Smrg need_lib_prefix=no 291310f94802Smrg need_version=no 291410f94802Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 291510f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 291610f94802Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 291710f94802Smrg dynamic_linker='NetBSD (a.out) ld.so' 291810f94802Smrg else 291910f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 292010f94802Smrg soname_spec='$libname$release$shared_ext$major' 292110f94802Smrg dynamic_linker='NetBSD ld.elf_so' 292210f94802Smrg fi 292310f94802Smrg shlibpath_var=LD_LIBRARY_PATH 292410f94802Smrg shlibpath_overrides_runpath=yes 292510f94802Smrg hardcode_into_libs=yes 292610f94802Smrg ;; 292710f94802Smrg 292810f94802Smrgnewsos6) 292910f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 293010f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 293110f94802Smrg shlibpath_var=LD_LIBRARY_PATH 293210f94802Smrg shlibpath_overrides_runpath=yes 293310f94802Smrg ;; 293410f94802Smrg 293510f94802Smrg*nto* | *qnx*) 293610f94802Smrg version_type=qnx 293710f94802Smrg need_lib_prefix=no 293810f94802Smrg need_version=no 293910f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 294010f94802Smrg soname_spec='$libname$release$shared_ext$major' 294110f94802Smrg shlibpath_var=LD_LIBRARY_PATH 294210f94802Smrg shlibpath_overrides_runpath=no 294310f94802Smrg hardcode_into_libs=yes 294410f94802Smrg dynamic_linker='ldqnx.so' 294510f94802Smrg ;; 294610f94802Smrg 294710f94802Smrgopenbsd* | bitrig*) 294810f94802Smrg version_type=sunos 294910f94802Smrg sys_lib_dlsearch_path_spec=/usr/lib 295010f94802Smrg need_lib_prefix=no 295110f94802Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 295210f94802Smrg need_version=no 295310f94802Smrg else 295410f94802Smrg need_version=yes 295510f94802Smrg fi 295610f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 295710f94802Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 295810f94802Smrg shlibpath_var=LD_LIBRARY_PATH 295910f94802Smrg shlibpath_overrides_runpath=yes 296010f94802Smrg ;; 296110f94802Smrg 296210f94802Smrgos2*) 296310f94802Smrg libname_spec='$name' 296410f94802Smrg version_type=windows 296510f94802Smrg shrext_cmds=.dll 296610f94802Smrg need_version=no 296710f94802Smrg need_lib_prefix=no 296810f94802Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 296910f94802Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 297010f94802Smrg v=$($ECHO $release$versuffix | tr -d .-); 297110f94802Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 297210f94802Smrg $ECHO $n$v`$shared_ext' 297310f94802Smrg library_names_spec='${libname}_dll.$libext' 297410f94802Smrg dynamic_linker='OS/2 ld.exe' 297510f94802Smrg shlibpath_var=BEGINLIBPATH 297610f94802Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 297710f94802Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 297810f94802Smrg postinstall_cmds='base_file=`basename \$file`~ 297910f94802Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 298010f94802Smrg dldir=$destdir/`dirname \$dlpath`~ 298110f94802Smrg test -d \$dldir || mkdir -p \$dldir~ 298210f94802Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 298310f94802Smrg chmod a+x \$dldir/$dlname~ 298410f94802Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 298510f94802Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 298610f94802Smrg fi' 298710f94802Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 298810f94802Smrg dlpath=$dir/\$dldll~ 298910f94802Smrg $RM \$dlpath' 299010f94802Smrg ;; 299110f94802Smrg 299210f94802Smrgosf3* | osf4* | osf5*) 299310f94802Smrg version_type=osf 299410f94802Smrg need_lib_prefix=no 299510f94802Smrg need_version=no 299610f94802Smrg soname_spec='$libname$release$shared_ext$major' 299710f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 299810f94802Smrg shlibpath_var=LD_LIBRARY_PATH 299910f94802Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 300010f94802Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 300110f94802Smrg ;; 300210f94802Smrg 300310f94802Smrgrdos*) 300410f94802Smrg dynamic_linker=no 300510f94802Smrg ;; 300610f94802Smrg 300710f94802Smrgsolaris*) 300810f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 300910f94802Smrg need_lib_prefix=no 301010f94802Smrg need_version=no 301110f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 301210f94802Smrg soname_spec='$libname$release$shared_ext$major' 301310f94802Smrg shlibpath_var=LD_LIBRARY_PATH 301410f94802Smrg shlibpath_overrides_runpath=yes 301510f94802Smrg hardcode_into_libs=yes 301610f94802Smrg # ldd complains unless libraries are executable 301710f94802Smrg postinstall_cmds='chmod +x $lib' 301810f94802Smrg ;; 301910f94802Smrg 302010f94802Smrgsunos4*) 302110f94802Smrg version_type=sunos 302210f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 302310f94802Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 302410f94802Smrg shlibpath_var=LD_LIBRARY_PATH 302510f94802Smrg shlibpath_overrides_runpath=yes 302610f94802Smrg if test yes = "$with_gnu_ld"; then 302710f94802Smrg need_lib_prefix=no 302810f94802Smrg fi 302910f94802Smrg need_version=yes 303010f94802Smrg ;; 303110f94802Smrg 303210f94802Smrgsysv4 | sysv4.3*) 303310f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 303410f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 303510f94802Smrg soname_spec='$libname$release$shared_ext$major' 303610f94802Smrg shlibpath_var=LD_LIBRARY_PATH 303710f94802Smrg case $host_vendor in 303810f94802Smrg sni) 303910f94802Smrg shlibpath_overrides_runpath=no 304010f94802Smrg need_lib_prefix=no 304110f94802Smrg runpath_var=LD_RUN_PATH 304210f94802Smrg ;; 304310f94802Smrg siemens) 304410f94802Smrg need_lib_prefix=no 304510f94802Smrg ;; 304610f94802Smrg motorola) 304710f94802Smrg need_lib_prefix=no 304810f94802Smrg need_version=no 304910f94802Smrg shlibpath_overrides_runpath=no 305010f94802Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 305110f94802Smrg ;; 305210f94802Smrg esac 305310f94802Smrg ;; 305410f94802Smrg 305510f94802Smrgsysv4*MP*) 305610f94802Smrg if test -d /usr/nec; then 305710f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 305810f94802Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 305910f94802Smrg soname_spec='$libname$shared_ext.$major' 306010f94802Smrg shlibpath_var=LD_LIBRARY_PATH 306110f94802Smrg fi 306210f94802Smrg ;; 306310f94802Smrg 306410f94802Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 306510f94802Smrg version_type=sco 306610f94802Smrg need_lib_prefix=no 306710f94802Smrg need_version=no 306810f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 306910f94802Smrg soname_spec='$libname$release$shared_ext$major' 307010f94802Smrg shlibpath_var=LD_LIBRARY_PATH 307110f94802Smrg shlibpath_overrides_runpath=yes 307210f94802Smrg hardcode_into_libs=yes 307310f94802Smrg if test yes = "$with_gnu_ld"; then 307410f94802Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 307510f94802Smrg else 307610f94802Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 307710f94802Smrg case $host_os in 307810f94802Smrg sco3.2v5*) 307910f94802Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 308010f94802Smrg ;; 308110f94802Smrg esac 308210f94802Smrg fi 308310f94802Smrg sys_lib_dlsearch_path_spec='/usr/lib' 308410f94802Smrg ;; 308510f94802Smrg 308610f94802Smrgtpf*) 308710f94802Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 308810f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 308910f94802Smrg need_lib_prefix=no 309010f94802Smrg need_version=no 309110f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 309210f94802Smrg shlibpath_var=LD_LIBRARY_PATH 309310f94802Smrg shlibpath_overrides_runpath=no 309410f94802Smrg hardcode_into_libs=yes 309510f94802Smrg ;; 309610f94802Smrg 309710f94802Smrguts4*) 309810f94802Smrg version_type=linux # correct to gnu/linux during the next big refactor 309910f94802Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 310010f94802Smrg soname_spec='$libname$release$shared_ext$major' 310110f94802Smrg shlibpath_var=LD_LIBRARY_PATH 310210f94802Smrg ;; 310310f94802Smrg 310410f94802Smrg*) 310510f94802Smrg dynamic_linker=no 310610f94802Smrg ;; 310710f94802Smrgesac 310810f94802SmrgAC_MSG_RESULT([$dynamic_linker]) 310910f94802Smrgtest no = "$dynamic_linker" && can_build_shared=no 311010f94802Smrg 311110f94802Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 311210f94802Smrgif test yes = "$GCC"; then 311310f94802Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 311410f94802Smrgfi 311510f94802Smrg 311610f94802Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 311710f94802Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 311810f94802Smrgfi 311910f94802Smrg 312010f94802Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 312110f94802Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 312210f94802Smrgfi 312310f94802Smrg 312410f94802Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 312510f94802Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 312610f94802Smrg 312710f94802Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 312810f94802Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 312910f94802Smrg 313010f94802Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 313110f94802Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 313210f94802Smrg 313310f94802Smrg_LT_DECL([], [variables_saved_for_relink], [1], 313410f94802Smrg [Variables whose values should be saved in libtool wrapper scripts and 313510f94802Smrg restored at link time]) 313610f94802Smrg_LT_DECL([], [need_lib_prefix], [0], 313710f94802Smrg [Do we need the "lib" prefix for modules?]) 313810f94802Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 313910f94802Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 314010f94802Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 314110f94802Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 314210f94802Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 314310f94802Smrg [Is shlibpath searched before the hard-coded library search path?]) 314410f94802Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 314510f94802Smrg_LT_DECL([], [library_names_spec], [1], 314610f94802Smrg [[List of archive names. First name is the real one, the rest are links. 314710f94802Smrg The last name is the one that the linker finds with -lNAME]]) 314810f94802Smrg_LT_DECL([], [soname_spec], [1], 314910f94802Smrg [[The coded name of the library, if different from the real name]]) 315010f94802Smrg_LT_DECL([], [install_override_mode], [1], 315110f94802Smrg [Permission mode override for installation of shared libraries]) 315210f94802Smrg_LT_DECL([], [postinstall_cmds], [2], 315310f94802Smrg [Command to use after installation of a shared archive]) 315410f94802Smrg_LT_DECL([], [postuninstall_cmds], [2], 315510f94802Smrg [Command to use after uninstallation of a shared archive]) 315610f94802Smrg_LT_DECL([], [finish_cmds], [2], 315710f94802Smrg [Commands used to finish a libtool library installation in a directory]) 315810f94802Smrg_LT_DECL([], [finish_eval], [1], 315910f94802Smrg [[As "finish_cmds", except a single script fragment to be evaled but 316010f94802Smrg not shown]]) 316110f94802Smrg_LT_DECL([], [hardcode_into_libs], [0], 316210f94802Smrg [Whether we should hardcode library paths into libraries]) 316310f94802Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 316410f94802Smrg [Compile-time system search path for libraries]) 316510f94802Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 316610f94802Smrg [Detected run-time system search path for libraries]) 316710f94802Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 316810f94802Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 316910f94802Smrg])# _LT_SYS_DYNAMIC_LINKER 317010f94802Smrg 317110f94802Smrg 317210f94802Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 317310f94802Smrg# -------------------------- 317410f94802Smrg# find a file program that can recognize shared library 317510f94802SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 317610f94802Smrg[m4_require([_LT_DECL_EGREP])dnl 317710f94802SmrgAC_MSG_CHECKING([for $1]) 317810f94802SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 317910f94802Smrg[case $MAGIC_CMD in 318010f94802Smrg[[\\/*] | ?:[\\/]*]) 318110f94802Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 318210f94802Smrg ;; 318310f94802Smrg*) 318410f94802Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 318510f94802Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 318610f94802Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 318710f94802Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 318810f94802Smrgdnl not every word. This closes a longstanding sh security hole. 318910f94802Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 319010f94802Smrg for ac_dir in $ac_dummy; do 319110f94802Smrg IFS=$lt_save_ifs 319210f94802Smrg test -z "$ac_dir" && ac_dir=. 319310f94802Smrg if test -f "$ac_dir/$1"; then 319410f94802Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 319510f94802Smrg if test -n "$file_magic_test_file"; then 319610f94802Smrg case $deplibs_check_method in 319710f94802Smrg "file_magic "*) 319810f94802Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 319910f94802Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 320010f94802Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 320110f94802Smrg $EGREP "$file_magic_regex" > /dev/null; then 320210f94802Smrg : 320310f94802Smrg else 320410f94802Smrg cat <<_LT_EOF 1>&2 320510f94802Smrg 320610f94802Smrg*** Warning: the command libtool uses to detect shared libraries, 320710f94802Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 320810f94802Smrg*** The result is that libtool may fail to recognize shared libraries 320910f94802Smrg*** as such. This will affect the creation of libtool libraries that 321010f94802Smrg*** depend on shared libraries, but programs linked with such libtool 321110f94802Smrg*** libraries will work regardless of this problem. Nevertheless, you 321210f94802Smrg*** may want to report the problem to your system manager and/or to 321310f94802Smrg*** bug-libtool@gnu.org 321410f94802Smrg 321510f94802Smrg_LT_EOF 321610f94802Smrg fi ;; 321710f94802Smrg esac 321810f94802Smrg fi 321910f94802Smrg break 322010f94802Smrg fi 322110f94802Smrg done 322210f94802Smrg IFS=$lt_save_ifs 322310f94802Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 322410f94802Smrg ;; 322510f94802Smrgesac]) 322610f94802SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 322710f94802Smrgif test -n "$MAGIC_CMD"; then 322810f94802Smrg AC_MSG_RESULT($MAGIC_CMD) 322910f94802Smrgelse 323010f94802Smrg AC_MSG_RESULT(no) 323110f94802Smrgfi 323210f94802Smrg_LT_DECL([], [MAGIC_CMD], [0], 323310f94802Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 323410f94802Smrg])# _LT_PATH_TOOL_PREFIX 323510f94802Smrg 323610f94802Smrg# Old name: 323710f94802SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 323810f94802Smrgdnl aclocal-1.4 backwards compatibility: 323910f94802Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 324010f94802Smrg 324110f94802Smrg 324210f94802Smrg# _LT_PATH_MAGIC 324310f94802Smrg# -------------- 324410f94802Smrg# find a file program that can recognize a shared library 324510f94802Smrgm4_defun([_LT_PATH_MAGIC], 324610f94802Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 324710f94802Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 324810f94802Smrg if test -n "$ac_tool_prefix"; then 324910f94802Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 325010f94802Smrg else 325110f94802Smrg MAGIC_CMD=: 325210f94802Smrg fi 325310f94802Smrgfi 325410f94802Smrg])# _LT_PATH_MAGIC 325510f94802Smrg 325610f94802Smrg 325710f94802Smrg# LT_PATH_LD 325810f94802Smrg# ---------- 325910f94802Smrg# find the pathname to the GNU or non-GNU linker 326010f94802SmrgAC_DEFUN([LT_PATH_LD], 326110f94802Smrg[AC_REQUIRE([AC_PROG_CC])dnl 326210f94802SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 326310f94802SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 326410f94802Smrgm4_require([_LT_DECL_SED])dnl 326510f94802Smrgm4_require([_LT_DECL_EGREP])dnl 326610f94802Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 326710f94802Smrg 326810f94802SmrgAC_ARG_WITH([gnu-ld], 326910f94802Smrg [AS_HELP_STRING([--with-gnu-ld], 327010f94802Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 327110f94802Smrg [test no = "$withval" || with_gnu_ld=yes], 327210f94802Smrg [with_gnu_ld=no])dnl 327310f94802Smrg 327410f94802Smrgac_prog=ld 327510f94802Smrgif test yes = "$GCC"; then 327610f94802Smrg # Check if gcc -print-prog-name=ld gives a path. 327710f94802Smrg AC_MSG_CHECKING([for ld used by $CC]) 327810f94802Smrg case $host in 327910f94802Smrg *-*-mingw*) 328010f94802Smrg # gcc leaves a trailing carriage return, which upsets mingw 328110f94802Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 328210f94802Smrg *) 328310f94802Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 328410f94802Smrg esac 328510f94802Smrg case $ac_prog in 328610f94802Smrg # Accept absolute paths. 328710f94802Smrg [[\\/]]* | ?:[[\\/]]*) 328810f94802Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 328910f94802Smrg # Canonicalize the pathname of ld 329010f94802Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 329110f94802Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 329210f94802Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 329310f94802Smrg done 329410f94802Smrg test -z "$LD" && LD=$ac_prog 329510f94802Smrg ;; 329610f94802Smrg "") 329710f94802Smrg # If it fails, then pretend we aren't using GCC. 329810f94802Smrg ac_prog=ld 329910f94802Smrg ;; 330010f94802Smrg *) 330110f94802Smrg # If it is relative, then search for the first ld in PATH. 330210f94802Smrg with_gnu_ld=unknown 330310f94802Smrg ;; 330410f94802Smrg esac 330510f94802Smrgelif test yes = "$with_gnu_ld"; then 330610f94802Smrg AC_MSG_CHECKING([for GNU ld]) 330710f94802Smrgelse 330810f94802Smrg AC_MSG_CHECKING([for non-GNU ld]) 330910f94802Smrgfi 331010f94802SmrgAC_CACHE_VAL(lt_cv_path_LD, 331110f94802Smrg[if test -z "$LD"; then 331210f94802Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 331310f94802Smrg for ac_dir in $PATH; do 331410f94802Smrg IFS=$lt_save_ifs 331510f94802Smrg test -z "$ac_dir" && ac_dir=. 331610f94802Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 331710f94802Smrg lt_cv_path_LD=$ac_dir/$ac_prog 331810f94802Smrg # Check to see if the program is GNU ld. I'd rather use --version, 331910f94802Smrg # but apparently some variants of GNU ld only accept -v. 332010f94802Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 332110f94802Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 332210f94802Smrg *GNU* | *'with BFD'*) 332310f94802Smrg test no != "$with_gnu_ld" && break 332410f94802Smrg ;; 332510f94802Smrg *) 332610f94802Smrg test yes != "$with_gnu_ld" && break 332710f94802Smrg ;; 332810f94802Smrg esac 332910f94802Smrg fi 333010f94802Smrg done 333110f94802Smrg IFS=$lt_save_ifs 333210f94802Smrgelse 333310f94802Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 333410f94802Smrgfi]) 333510f94802SmrgLD=$lt_cv_path_LD 333610f94802Smrgif test -n "$LD"; then 333710f94802Smrg AC_MSG_RESULT($LD) 333810f94802Smrgelse 333910f94802Smrg AC_MSG_RESULT(no) 334010f94802Smrgfi 334110f94802Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 334210f94802Smrg_LT_PATH_LD_GNU 334310f94802SmrgAC_SUBST([LD]) 334410f94802Smrg 334510f94802Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 334610f94802Smrg])# LT_PATH_LD 334710f94802Smrg 334810f94802Smrg# Old names: 334910f94802SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 335010f94802SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 335110f94802Smrgdnl aclocal-1.4 backwards compatibility: 335210f94802Smrgdnl AC_DEFUN([AM_PROG_LD], []) 335310f94802Smrgdnl AC_DEFUN([AC_PROG_LD], []) 335410f94802Smrg 335510f94802Smrg 335610f94802Smrg# _LT_PATH_LD_GNU 335710f94802Smrg#- -------------- 335810f94802Smrgm4_defun([_LT_PATH_LD_GNU], 335910f94802Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 336010f94802Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 336110f94802Smrgcase `$LD -v 2>&1 </dev/null` in 336210f94802Smrg*GNU* | *'with BFD'*) 336310f94802Smrg lt_cv_prog_gnu_ld=yes 336410f94802Smrg ;; 336510f94802Smrg*) 336610f94802Smrg lt_cv_prog_gnu_ld=no 336710f94802Smrg ;; 336810f94802Smrgesac]) 336910f94802Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 337010f94802Smrg])# _LT_PATH_LD_GNU 337110f94802Smrg 337210f94802Smrg 337310f94802Smrg# _LT_CMD_RELOAD 337410f94802Smrg# -------------- 337510f94802Smrg# find reload flag for linker 337610f94802Smrg# -- PORTME Some linkers may need a different reload flag. 337710f94802Smrgm4_defun([_LT_CMD_RELOAD], 337810f94802Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 337910f94802Smrg lt_cv_ld_reload_flag, 338010f94802Smrg [lt_cv_ld_reload_flag='-r']) 338110f94802Smrgreload_flag=$lt_cv_ld_reload_flag 338210f94802Smrgcase $reload_flag in 338310f94802Smrg"" | " "*) ;; 338410f94802Smrg*) reload_flag=" $reload_flag" ;; 338510f94802Smrgesac 338610f94802Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 338710f94802Smrgcase $host_os in 338810f94802Smrg cygwin* | mingw* | pw32* | cegcc*) 338910f94802Smrg if test yes != "$GCC"; then 339010f94802Smrg reload_cmds=false 339110f94802Smrg fi 339210f94802Smrg ;; 339310f94802Smrg darwin*) 339410f94802Smrg if test yes = "$GCC"; then 339510f94802Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 339610f94802Smrg else 339710f94802Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 339810f94802Smrg fi 339910f94802Smrg ;; 340010f94802Smrgesac 340110f94802Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 340210f94802Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 340310f94802Smrg])# _LT_CMD_RELOAD 340410f94802Smrg 340510f94802Smrg 340610f94802Smrg# _LT_PATH_DD 340710f94802Smrg# ----------- 340810f94802Smrg# find a working dd 340910f94802Smrgm4_defun([_LT_PATH_DD], 341010f94802Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 341110f94802Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 341210f94802Smrgcat conftest.i conftest.i >conftest2.i 341310f94802Smrg: ${lt_DD:=$DD} 341410f94802SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 341510f94802Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 341610f94802Smrg cmp -s conftest.i conftest.out \ 341710f94802Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 341810f94802Smrgfi]) 341910f94802Smrgrm -f conftest.i conftest2.i conftest.out]) 342010f94802Smrg])# _LT_PATH_DD 342110f94802Smrg 342210f94802Smrg 342310f94802Smrg# _LT_CMD_TRUNCATE 342410f94802Smrg# ---------------- 342510f94802Smrg# find command to truncate a binary pipe 342610f94802Smrgm4_defun([_LT_CMD_TRUNCATE], 342710f94802Smrg[m4_require([_LT_PATH_DD]) 342810f94802SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 342910f94802Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 343010f94802Smrgcat conftest.i conftest.i >conftest2.i 343110f94802Smrglt_cv_truncate_bin= 343210f94802Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 343310f94802Smrg cmp -s conftest.i conftest.out \ 343410f94802Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 343510f94802Smrgfi 343610f94802Smrgrm -f conftest.i conftest2.i conftest.out 343710f94802Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 343810f94802Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 343910f94802Smrg [Command to truncate a binary pipe]) 344010f94802Smrg])# _LT_CMD_TRUNCATE 344110f94802Smrg 344210f94802Smrg 344310f94802Smrg# _LT_CHECK_MAGIC_METHOD 344410f94802Smrg# ---------------------- 344510f94802Smrg# how to check for library dependencies 344610f94802Smrg# -- PORTME fill in with the dynamic library characteristics 344710f94802Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 344810f94802Smrg[m4_require([_LT_DECL_EGREP]) 344910f94802Smrgm4_require([_LT_DECL_OBJDUMP]) 345010f94802SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 345110f94802Smrglt_cv_deplibs_check_method, 345210f94802Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 345310f94802Smrglt_cv_file_magic_test_file= 345410f94802Smrglt_cv_deplibs_check_method='unknown' 345510f94802Smrg# Need to set the preceding variable on all platforms that support 345610f94802Smrg# interlibrary dependencies. 345710f94802Smrg# 'none' -- dependencies not supported. 345810f94802Smrg# 'unknown' -- same as none, but documents that we really don't know. 345910f94802Smrg# 'pass_all' -- all dependencies passed with no checks. 346010f94802Smrg# 'test_compile' -- check by making test program. 346110f94802Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 346210f94802Smrg# that responds to the $file_magic_cmd with a given extended regex. 346310f94802Smrg# If you have 'file' or equivalent on your system and you're not sure 346410f94802Smrg# whether 'pass_all' will *always* work, you probably want this one. 346510f94802Smrg 346610f94802Smrgcase $host_os in 346710f94802Smrgaix[[4-9]]*) 346810f94802Smrg lt_cv_deplibs_check_method=pass_all 346910f94802Smrg ;; 347010f94802Smrg 347110f94802Smrgbeos*) 347210f94802Smrg lt_cv_deplibs_check_method=pass_all 347310f94802Smrg ;; 347410f94802Smrg 347510f94802Smrgbsdi[[45]]*) 347610f94802Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 347710f94802Smrg lt_cv_file_magic_cmd='$FILECMD -L' 347810f94802Smrg lt_cv_file_magic_test_file=/shlib/libc.so 347910f94802Smrg ;; 348010f94802Smrg 348110f94802Smrgcygwin*) 348210f94802Smrg # func_win32_libid is a shell function defined in ltmain.sh 348310f94802Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 348410f94802Smrg lt_cv_file_magic_cmd='func_win32_libid' 348510f94802Smrg ;; 348610f94802Smrg 348710f94802Smrgmingw* | pw32*) 348810f94802Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 348910f94802Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 349010f94802Smrg # unless we find 'file', for example because we are cross-compiling. 349110f94802Smrg if ( file / ) >/dev/null 2>&1; then 349210f94802Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 349310f94802Smrg lt_cv_file_magic_cmd='func_win32_libid' 349410f94802Smrg else 349510f94802Smrg # Keep this pattern in sync with the one in func_win32_libid. 349610f94802Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 349710f94802Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 349810f94802Smrg fi 349910f94802Smrg ;; 350010f94802Smrg 350110f94802Smrgcegcc*) 350210f94802Smrg # use the weaker test based on 'objdump'. See mingw*. 350310f94802Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 350410f94802Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 350510f94802Smrg ;; 350610f94802Smrg 350710f94802Smrgdarwin* | rhapsody*) 350810f94802Smrg lt_cv_deplibs_check_method=pass_all 350910f94802Smrg ;; 351010f94802Smrg 351110f94802Smrgfreebsd* | dragonfly* | midnightbsd*) 351210f94802Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 351310f94802Smrg case $host_cpu in 351410f94802Smrg i*86 ) 351510f94802Smrg # Not sure whether the presence of OpenBSD here was a mistake. 351610f94802Smrg # Let's accept both of them until this is cleared up. 351710f94802Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 351810f94802Smrg lt_cv_file_magic_cmd=$FILECMD 351910f94802Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 352010f94802Smrg ;; 352110f94802Smrg esac 352210f94802Smrg else 352310f94802Smrg lt_cv_deplibs_check_method=pass_all 352410f94802Smrg fi 352510f94802Smrg ;; 352610f94802Smrg 352710f94802Smrghaiku*) 352810f94802Smrg lt_cv_deplibs_check_method=pass_all 352910f94802Smrg ;; 353010f94802Smrg 353110f94802Smrghpux10.20* | hpux11*) 353210f94802Smrg lt_cv_file_magic_cmd=$FILECMD 353310f94802Smrg case $host_cpu in 353410f94802Smrg ia64*) 353510f94802Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 353610f94802Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 353710f94802Smrg ;; 353810f94802Smrg hppa*64*) 353910f94802Smrg [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]'] 354010f94802Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 354110f94802Smrg ;; 354210f94802Smrg *) 354310f94802Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 354410f94802Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 354510f94802Smrg ;; 354610f94802Smrg esac 354710f94802Smrg ;; 354810f94802Smrg 354910f94802Smrginterix[[3-9]]*) 355010f94802Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 355110f94802Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 355210f94802Smrg ;; 355310f94802Smrg 355410f94802Smrgirix5* | irix6* | nonstopux*) 355510f94802Smrg case $LD in 355610f94802Smrg *-32|*"-32 ") libmagic=32-bit;; 355710f94802Smrg *-n32|*"-n32 ") libmagic=N32;; 355810f94802Smrg *-64|*"-64 ") libmagic=64-bit;; 355910f94802Smrg *) libmagic=never-match;; 356010f94802Smrg esac 356110f94802Smrg lt_cv_deplibs_check_method=pass_all 356210f94802Smrg ;; 356310f94802Smrg 356410f94802Smrg# This must be glibc/ELF. 356510f94802Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 356610f94802Smrg lt_cv_deplibs_check_method=pass_all 356710f94802Smrg ;; 356810f94802Smrg 356910f94802Smrgnetbsd*) 357010f94802Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 357110f94802Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 357210f94802Smrg else 357310f94802Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 357410f94802Smrg fi 357510f94802Smrg ;; 357610f94802Smrg 357710f94802Smrgnewos6*) 357810f94802Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 357910f94802Smrg lt_cv_file_magic_cmd=$FILECMD 358010f94802Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 358110f94802Smrg ;; 358210f94802Smrg 358310f94802Smrg*nto* | *qnx*) 358410f94802Smrg lt_cv_deplibs_check_method=pass_all 358510f94802Smrg ;; 358610f94802Smrg 358710f94802Smrgopenbsd* | bitrig*) 358810f94802Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 358910f94802Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 359010f94802Smrg else 359110f94802Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 359210f94802Smrg fi 359310f94802Smrg ;; 359410f94802Smrg 359510f94802Smrgosf3* | osf4* | osf5*) 359610f94802Smrg lt_cv_deplibs_check_method=pass_all 359710f94802Smrg ;; 359810f94802Smrg 359910f94802Smrgrdos*) 360010f94802Smrg lt_cv_deplibs_check_method=pass_all 360110f94802Smrg ;; 360210f94802Smrg 360310f94802Smrgsolaris*) 360410f94802Smrg lt_cv_deplibs_check_method=pass_all 360510f94802Smrg ;; 360610f94802Smrg 360710f94802Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 360810f94802Smrg lt_cv_deplibs_check_method=pass_all 360910f94802Smrg ;; 361010f94802Smrg 361110f94802Smrgsysv4 | sysv4.3*) 361210f94802Smrg case $host_vendor in 361310f94802Smrg motorola) 361410f94802Smrg 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]]' 361510f94802Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 361610f94802Smrg ;; 361710f94802Smrg ncr) 361810f94802Smrg lt_cv_deplibs_check_method=pass_all 361910f94802Smrg ;; 362010f94802Smrg sequent) 362110f94802Smrg lt_cv_file_magic_cmd='/bin/file' 362210f94802Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 362310f94802Smrg ;; 362410f94802Smrg sni) 362510f94802Smrg lt_cv_file_magic_cmd='/bin/file' 362610f94802Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 362710f94802Smrg lt_cv_file_magic_test_file=/lib/libc.so 362810f94802Smrg ;; 362910f94802Smrg siemens) 363010f94802Smrg lt_cv_deplibs_check_method=pass_all 363110f94802Smrg ;; 363210f94802Smrg pc) 363310f94802Smrg lt_cv_deplibs_check_method=pass_all 363410f94802Smrg ;; 363510f94802Smrg esac 363610f94802Smrg ;; 363710f94802Smrg 363810f94802Smrgtpf*) 363910f94802Smrg lt_cv_deplibs_check_method=pass_all 364010f94802Smrg ;; 364110f94802Smrgos2*) 364210f94802Smrg lt_cv_deplibs_check_method=pass_all 364310f94802Smrg ;; 364410f94802Smrgesac 364510f94802Smrg]) 364610f94802Smrg 364710f94802Smrgfile_magic_glob= 364810f94802Smrgwant_nocaseglob=no 364910f94802Smrgif test "$build" = "$host"; then 365010f94802Smrg case $host_os in 365110f94802Smrg mingw* | pw32*) 365210f94802Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 365310f94802Smrg want_nocaseglob=yes 365410f94802Smrg else 365510f94802Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 365610f94802Smrg fi 365710f94802Smrg ;; 365810f94802Smrg esac 365910f94802Smrgfi 366010f94802Smrg 366110f94802Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 366210f94802Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 366310f94802Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 366410f94802Smrg 366510f94802Smrg_LT_DECL([], [deplibs_check_method], [1], 366610f94802Smrg [Method to check whether dependent libraries are shared objects]) 366710f94802Smrg_LT_DECL([], [file_magic_cmd], [1], 366810f94802Smrg [Command to use when deplibs_check_method = "file_magic"]) 366910f94802Smrg_LT_DECL([], [file_magic_glob], [1], 367010f94802Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 367110f94802Smrg_LT_DECL([], [want_nocaseglob], [1], 367210f94802Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 367310f94802Smrg])# _LT_CHECK_MAGIC_METHOD 367410f94802Smrg 367510f94802Smrg 367610f94802Smrg# LT_PATH_NM 367710f94802Smrg# ---------- 367810f94802Smrg# find the pathname to a BSD- or MS-compatible name lister 367910f94802SmrgAC_DEFUN([LT_PATH_NM], 368010f94802Smrg[AC_REQUIRE([AC_PROG_CC])dnl 368110f94802SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 368210f94802Smrg[if test -n "$NM"; then 368310f94802Smrg # Let the user override the test. 368410f94802Smrg lt_cv_path_NM=$NM 368510f94802Smrgelse 368610f94802Smrg lt_nm_to_check=${ac_tool_prefix}nm 368710f94802Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 368810f94802Smrg lt_nm_to_check="$lt_nm_to_check nm" 368910f94802Smrg fi 369010f94802Smrg for lt_tmp_nm in $lt_nm_to_check; do 369110f94802Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 369210f94802Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 369310f94802Smrg IFS=$lt_save_ifs 369410f94802Smrg test -z "$ac_dir" && ac_dir=. 369510f94802Smrg tmp_nm=$ac_dir/$lt_tmp_nm 369610f94802Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 369710f94802Smrg # Check to see if the nm accepts a BSD-compat flag. 369810f94802Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 369910f94802Smrg # nm: unknown option "B" ignored 370010f94802Smrg # Tru64's nm complains that /dev/null is an invalid object file 370110f94802Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 370210f94802Smrg case $build_os in 370310f94802Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 370410f94802Smrg *) lt_bad_file=/dev/null ;; 370510f94802Smrg esac 370610f94802Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 370710f94802Smrg *$lt_bad_file* | *'Invalid file or object type'*) 370810f94802Smrg lt_cv_path_NM="$tmp_nm -B" 370910f94802Smrg break 2 371010f94802Smrg ;; 371110f94802Smrg *) 371210f94802Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 371310f94802Smrg */dev/null*) 371410f94802Smrg lt_cv_path_NM="$tmp_nm -p" 371510f94802Smrg break 2 371610f94802Smrg ;; 371710f94802Smrg *) 371810f94802Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 371910f94802Smrg continue # so that we can try to find one that supports BSD flags 372010f94802Smrg ;; 372110f94802Smrg esac 372210f94802Smrg ;; 372310f94802Smrg esac 372410f94802Smrg fi 372510f94802Smrg done 372610f94802Smrg IFS=$lt_save_ifs 372710f94802Smrg done 372810f94802Smrg : ${lt_cv_path_NM=no} 372910f94802Smrgfi]) 373010f94802Smrgif test no != "$lt_cv_path_NM"; then 373110f94802Smrg NM=$lt_cv_path_NM 373210f94802Smrgelse 373310f94802Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 373410f94802Smrg if test -n "$DUMPBIN"; then : 373510f94802Smrg # Let the user override the test. 373610f94802Smrg else 373710f94802Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 373810f94802Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 373910f94802Smrg *COFF*) 374010f94802Smrg DUMPBIN="$DUMPBIN -symbols -headers" 374110f94802Smrg ;; 374210f94802Smrg *) 374310f94802Smrg DUMPBIN=: 374410f94802Smrg ;; 374510f94802Smrg esac 374610f94802Smrg fi 374710f94802Smrg AC_SUBST([DUMPBIN]) 374810f94802Smrg if test : != "$DUMPBIN"; then 374910f94802Smrg NM=$DUMPBIN 375010f94802Smrg fi 375110f94802Smrgfi 375210f94802Smrgtest -z "$NM" && NM=nm 375310f94802SmrgAC_SUBST([NM]) 375410f94802Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 375510f94802Smrg 375610f94802SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 375710f94802Smrg [lt_cv_nm_interface="BSD nm" 375810f94802Smrg echo "int some_variable = 0;" > conftest.$ac_ext 375910f94802Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 376010f94802Smrg (eval "$ac_compile" 2>conftest.err) 376110f94802Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 376210f94802Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 376310f94802Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 376410f94802Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 376510f94802Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 376610f94802Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 376710f94802Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 376810f94802Smrg lt_cv_nm_interface="MS dumpbin" 376910f94802Smrg fi 377010f94802Smrg rm -f conftest*]) 377110f94802Smrg])# LT_PATH_NM 377210f94802Smrg 377310f94802Smrg# Old names: 377410f94802SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 377510f94802SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 377610f94802Smrgdnl aclocal-1.4 backwards compatibility: 377710f94802Smrgdnl AC_DEFUN([AM_PROG_NM], []) 377810f94802Smrgdnl AC_DEFUN([AC_PROG_NM], []) 377910f94802Smrg 378010f94802Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 378110f94802Smrg# -------------------------------- 378210f94802Smrg# how to determine the name of the shared library 378310f94802Smrg# associated with a specific link library. 378410f94802Smrg# -- PORTME fill in with the dynamic library characteristics 378510f94802Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 378610f94802Smrg[m4_require([_LT_DECL_EGREP]) 378710f94802Smrgm4_require([_LT_DECL_OBJDUMP]) 378810f94802Smrgm4_require([_LT_DECL_DLLTOOL]) 378910f94802SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 379010f94802Smrglt_cv_sharedlib_from_linklib_cmd, 379110f94802Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 379210f94802Smrg 379310f94802Smrgcase $host_os in 379410f94802Smrgcygwin* | mingw* | pw32* | cegcc*) 379510f94802Smrg # two different shell functions defined in ltmain.sh; 379610f94802Smrg # decide which one to use based on capabilities of $DLLTOOL 379710f94802Smrg case `$DLLTOOL --help 2>&1` in 379810f94802Smrg *--identify-strict*) 379910f94802Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 380010f94802Smrg ;; 380110f94802Smrg *) 380210f94802Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 380310f94802Smrg ;; 380410f94802Smrg esac 380510f94802Smrg ;; 380610f94802Smrg*) 380710f94802Smrg # fallback: assume linklib IS sharedlib 380810f94802Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 380910f94802Smrg ;; 381010f94802Smrgesac 381110f94802Smrg]) 381210f94802Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 381310f94802Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 381410f94802Smrg 381510f94802Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 381610f94802Smrg [Command to associate shared and link libraries]) 381710f94802Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 381810f94802Smrg 381910f94802Smrg 382010f94802Smrg# _LT_PATH_MANIFEST_TOOL 382110f94802Smrg# ---------------------- 382210f94802Smrg# locate the manifest tool 382310f94802Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 382410f94802Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 382510f94802Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 382610f94802SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 382710f94802Smrg [lt_cv_path_mainfest_tool=no 382810f94802Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 382910f94802Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 383010f94802Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 383110f94802Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 383210f94802Smrg lt_cv_path_mainfest_tool=yes 383310f94802Smrg fi 383410f94802Smrg rm -f conftest*]) 383510f94802Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 383610f94802Smrg MANIFEST_TOOL=: 383710f94802Smrgfi 383810f94802Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 383910f94802Smrg])# _LT_PATH_MANIFEST_TOOL 384010f94802Smrg 384110f94802Smrg 384210f94802Smrg# _LT_DLL_DEF_P([FILE]) 384310f94802Smrg# --------------------- 384410f94802Smrg# True iff FILE is a Windows DLL '.def' file. 384510f94802Smrg# Keep in sync with func_dll_def_p in the libtool script 384610f94802SmrgAC_DEFUN([_LT_DLL_DEF_P], 384710f94802Smrg[dnl 384810f94802Smrg test DEF = "`$SED -n dnl 384910f94802Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 385010f94802Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 385110f94802Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 385210f94802Smrg -e q dnl Only consider the first "real" line 385310f94802Smrg $1`" dnl 385410f94802Smrg])# _LT_DLL_DEF_P 385510f94802Smrg 385610f94802Smrg 385710f94802Smrg# LT_LIB_M 385810f94802Smrg# -------- 385910f94802Smrg# check for math library 386010f94802SmrgAC_DEFUN([LT_LIB_M], 386110f94802Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 386210f94802SmrgLIBM= 386310f94802Smrgcase $host in 386410f94802Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 386510f94802Smrg # These system don't have libm, or don't need it 386610f94802Smrg ;; 386710f94802Smrg*-ncr-sysv4.3*) 386810f94802Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 386910f94802Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 387010f94802Smrg ;; 387110f94802Smrg*) 387210f94802Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 387310f94802Smrg ;; 387410f94802Smrgesac 387510f94802SmrgAC_SUBST([LIBM]) 387610f94802Smrg])# LT_LIB_M 387710f94802Smrg 387810f94802Smrg# Old name: 387910f94802SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 388010f94802Smrgdnl aclocal-1.4 backwards compatibility: 388110f94802Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 388210f94802Smrg 388310f94802Smrg 388410f94802Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 388510f94802Smrg# ------------------------------- 388610f94802Smrgm4_defun([_LT_COMPILER_NO_RTTI], 388710f94802Smrg[m4_require([_LT_TAG_COMPILER])dnl 388810f94802Smrg 388910f94802Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 389010f94802Smrg 389110f94802Smrgif test yes = "$GCC"; then 389210f94802Smrg case $cc_basename in 389310f94802Smrg nvcc*) 389410f94802Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 389510f94802Smrg *) 389610f94802Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 389710f94802Smrg esac 389810f94802Smrg 389910f94802Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 390010f94802Smrg lt_cv_prog_compiler_rtti_exceptions, 390110f94802Smrg [-fno-rtti -fno-exceptions], [], 390210f94802Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 390310f94802Smrgfi 390410f94802Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 390510f94802Smrg [Compiler flag to turn off builtin functions]) 390610f94802Smrg])# _LT_COMPILER_NO_RTTI 390710f94802Smrg 390810f94802Smrg 390910f94802Smrg# _LT_CMD_GLOBAL_SYMBOLS 391010f94802Smrg# ---------------------- 391110f94802Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 391210f94802Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 391310f94802SmrgAC_REQUIRE([AC_PROG_CC])dnl 391410f94802SmrgAC_REQUIRE([AC_PROG_AWK])dnl 391510f94802SmrgAC_REQUIRE([LT_PATH_NM])dnl 391610f94802SmrgAC_REQUIRE([LT_PATH_LD])dnl 391710f94802Smrgm4_require([_LT_DECL_SED])dnl 391810f94802Smrgm4_require([_LT_DECL_EGREP])dnl 391910f94802Smrgm4_require([_LT_TAG_COMPILER])dnl 392010f94802Smrg 392110f94802Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 392210f94802SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 392310f94802SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 392410f94802Smrg[ 392510f94802Smrg# These are sane defaults that work on at least a few old systems. 392610f94802Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 392710f94802Smrg 392810f94802Smrg# Character class describing NM global symbol codes. 392910f94802Smrgsymcode='[[BCDEGRST]]' 393010f94802Smrg 393110f94802Smrg# Regexp to match symbols that can be accessed directly from C. 393210f94802Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 393310f94802Smrg 393410f94802Smrg# Define system-specific variables. 393510f94802Smrgcase $host_os in 393610f94802Smrgaix*) 393710f94802Smrg symcode='[[BCDT]]' 393810f94802Smrg ;; 393910f94802Smrgcygwin* | mingw* | pw32* | cegcc*) 394010f94802Smrg symcode='[[ABCDGISTW]]' 394110f94802Smrg ;; 394210f94802Smrghpux*) 394310f94802Smrg if test ia64 = "$host_cpu"; then 394410f94802Smrg symcode='[[ABCDEGRST]]' 394510f94802Smrg fi 394610f94802Smrg ;; 394710f94802Smrgirix* | nonstopux*) 394810f94802Smrg symcode='[[BCDEGRST]]' 394910f94802Smrg ;; 395010f94802Smrgosf*) 395110f94802Smrg symcode='[[BCDEGQRST]]' 395210f94802Smrg ;; 395310f94802Smrgsolaris*) 395410f94802Smrg symcode='[[BDRT]]' 395510f94802Smrg ;; 395610f94802Smrgsco3.2v5*) 395710f94802Smrg symcode='[[DT]]' 395810f94802Smrg ;; 395910f94802Smrgsysv4.2uw2*) 396010f94802Smrg symcode='[[DT]]' 396110f94802Smrg ;; 396210f94802Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 396310f94802Smrg symcode='[[ABDT]]' 396410f94802Smrg ;; 396510f94802Smrgsysv4) 396610f94802Smrg symcode='[[DFNSTU]]' 396710f94802Smrg ;; 396810f94802Smrgesac 396910f94802Smrg 397010f94802Smrg# If we're using GNU nm, then use its standard symbol codes. 397110f94802Smrgcase `$NM -V 2>&1` in 397210f94802Smrg*GNU* | *'with BFD'*) 397310f94802Smrg symcode='[[ABCDGIRSTW]]' ;; 397410f94802Smrgesac 397510f94802Smrg 397610f94802Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 397710f94802Smrg # Gets list of data symbols to import. 397810f94802Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 397910f94802Smrg # Adjust the below global symbol transforms to fixup imported variables. 398010f94802Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 398110f94802Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 398210f94802Smrg lt_c_name_lib_hook="\ 398310f94802Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 398410f94802Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 398510f94802Smrgelse 398610f94802Smrg # Disable hooks by default. 398710f94802Smrg lt_cv_sys_global_symbol_to_import= 398810f94802Smrg lt_cdecl_hook= 398910f94802Smrg lt_c_name_hook= 399010f94802Smrg lt_c_name_lib_hook= 399110f94802Smrgfi 399210f94802Smrg 399310f94802Smrg# Transform an extracted symbol line into a proper C declaration. 399410f94802Smrg# Some systems (esp. on ia64) link data and code symbols differently, 399510f94802Smrg# so use this general approach. 399610f94802Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 399710f94802Smrg$lt_cdecl_hook\ 399810f94802Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 399910f94802Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 400010f94802Smrg 400110f94802Smrg# Transform an extracted symbol line into symbol name and symbol address 400210f94802Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 400310f94802Smrg$lt_c_name_hook\ 400410f94802Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 400510f94802Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 400610f94802Smrg 400710f94802Smrg# Transform an extracted symbol line into symbol name with lib prefix and 400810f94802Smrg# symbol address. 400910f94802Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 401010f94802Smrg$lt_c_name_lib_hook\ 401110f94802Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 401210f94802Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 401310f94802Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 401410f94802Smrg 401510f94802Smrg# Handle CRLF in mingw tool chain 401610f94802Smrgopt_cr= 401710f94802Smrgcase $build_os in 401810f94802Smrgmingw*) 401910f94802Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 402010f94802Smrg ;; 402110f94802Smrgesac 402210f94802Smrg 402310f94802Smrg# Try without a prefix underscore, then with it. 402410f94802Smrgfor ac_symprfx in "" "_"; do 402510f94802Smrg 402610f94802Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 402710f94802Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 402810f94802Smrg 402910f94802Smrg # Write the raw and C identifiers. 403010f94802Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 403110f94802Smrg # Fake it for dumpbin and say T for any non-static function, 403210f94802Smrg # D for any global variable and I for any imported variable. 403310f94802Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 403410f94802Smrg # which start with @ or ?. 403510f94802Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 403610f94802Smrg" {last_section=section; section=\$ 3};"\ 403710f94802Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 403810f94802Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 403910f94802Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 404010f94802Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 404110f94802Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 404210f94802Smrg" \$ 0!~/External *\|/{next};"\ 404310f94802Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 404410f94802Smrg" {if(hide[section]) next};"\ 404510f94802Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 404610f94802Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 404710f94802Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 404810f94802Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 404910f94802Smrg" ' prfx=^$ac_symprfx]" 405010f94802Smrg else 405110f94802Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 405210f94802Smrg fi 405310f94802Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 405410f94802Smrg 405510f94802Smrg # Check to see that the pipe works correctly. 405610f94802Smrg pipe_works=no 405710f94802Smrg 405810f94802Smrg rm -f conftest* 405910f94802Smrg cat > conftest.$ac_ext <<_LT_EOF 406010f94802Smrg#ifdef __cplusplus 406110f94802Smrgextern "C" { 406210f94802Smrg#endif 406310f94802Smrgchar nm_test_var; 406410f94802Smrgvoid nm_test_func(void); 406510f94802Smrgvoid nm_test_func(void){} 406610f94802Smrg#ifdef __cplusplus 406710f94802Smrg} 406810f94802Smrg#endif 406910f94802Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 407010f94802Smrg_LT_EOF 407110f94802Smrg 407210f94802Smrg if AC_TRY_EVAL(ac_compile); then 407310f94802Smrg # Now try to grab the symbols. 407410f94802Smrg nlist=conftest.nm 407510f94802Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 407610f94802Smrg # Try sorting and uniquifying the output. 407710f94802Smrg if sort "$nlist" | uniq > "$nlist"T; then 407810f94802Smrg mv -f "$nlist"T "$nlist" 407910f94802Smrg else 408010f94802Smrg rm -f "$nlist"T 408110f94802Smrg fi 408210f94802Smrg 408310f94802Smrg # Make sure that we snagged all the symbols we need. 408410f94802Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 408510f94802Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 408610f94802Smrg cat <<_LT_EOF > conftest.$ac_ext 408710f94802Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 408810f94802Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 408910f94802Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 409010f94802Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 409110f94802Smrg# define LT@&t@_DLSYM_CONST 409210f94802Smrg#elif defined __osf__ 409310f94802Smrg/* This system does not cope well with relocations in const data. */ 409410f94802Smrg# define LT@&t@_DLSYM_CONST 409510f94802Smrg#else 409610f94802Smrg# define LT@&t@_DLSYM_CONST const 409710f94802Smrg#endif 409810f94802Smrg 409910f94802Smrg#ifdef __cplusplus 410010f94802Smrgextern "C" { 410110f94802Smrg#endif 410210f94802Smrg 410310f94802Smrg_LT_EOF 410410f94802Smrg # Now generate the symbol file. 410510f94802Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 410610f94802Smrg 410710f94802Smrg cat <<_LT_EOF >> conftest.$ac_ext 410810f94802Smrg 410910f94802Smrg/* The mapping between symbol names and symbols. */ 411010f94802SmrgLT@&t@_DLSYM_CONST struct { 411110f94802Smrg const char *name; 411210f94802Smrg void *address; 411310f94802Smrg} 411410f94802Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 411510f94802Smrg{ 411610f94802Smrg { "@PROGRAM@", (void *) 0 }, 411710f94802Smrg_LT_EOF 411810f94802Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 411910f94802Smrg cat <<\_LT_EOF >> conftest.$ac_ext 412010f94802Smrg {0, (void *) 0} 412110f94802Smrg}; 412210f94802Smrg 412310f94802Smrg/* This works around a problem in FreeBSD linker */ 412410f94802Smrg#ifdef FREEBSD_WORKAROUND 412510f94802Smrgstatic const void *lt_preloaded_setup() { 412610f94802Smrg return lt__PROGRAM__LTX_preloaded_symbols; 412710f94802Smrg} 412810f94802Smrg#endif 412910f94802Smrg 413010f94802Smrg#ifdef __cplusplus 413110f94802Smrg} 413210f94802Smrg#endif 413310f94802Smrg_LT_EOF 413410f94802Smrg # Now try linking the two files. 413510f94802Smrg mv conftest.$ac_objext conftstm.$ac_objext 413610f94802Smrg lt_globsym_save_LIBS=$LIBS 413710f94802Smrg lt_globsym_save_CFLAGS=$CFLAGS 413810f94802Smrg LIBS=conftstm.$ac_objext 413910f94802Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 414010f94802Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 414110f94802Smrg pipe_works=yes 414210f94802Smrg fi 414310f94802Smrg LIBS=$lt_globsym_save_LIBS 414410f94802Smrg CFLAGS=$lt_globsym_save_CFLAGS 414510f94802Smrg else 414610f94802Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 414710f94802Smrg fi 414810f94802Smrg else 414910f94802Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 415010f94802Smrg fi 415110f94802Smrg else 415210f94802Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 415310f94802Smrg fi 415410f94802Smrg else 415510f94802Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 415610f94802Smrg cat conftest.$ac_ext >&5 415710f94802Smrg fi 415810f94802Smrg rm -rf conftest* conftst* 415910f94802Smrg 416010f94802Smrg # Do not use the global_symbol_pipe unless it works. 416110f94802Smrg if test yes = "$pipe_works"; then 416210f94802Smrg break 416310f94802Smrg else 416410f94802Smrg lt_cv_sys_global_symbol_pipe= 416510f94802Smrg fi 416610f94802Smrgdone 416710f94802Smrg]) 416810f94802Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 416910f94802Smrg lt_cv_sys_global_symbol_to_cdecl= 417010f94802Smrgfi 417110f94802Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 417210f94802Smrg AC_MSG_RESULT(failed) 417310f94802Smrgelse 417410f94802Smrg AC_MSG_RESULT(ok) 417510f94802Smrgfi 417610f94802Smrg 417710f94802Smrg# Response file support. 417810f94802Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 417910f94802Smrg nm_file_list_spec='@' 418010f94802Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 418110f94802Smrg nm_file_list_spec='@' 418210f94802Smrgfi 418310f94802Smrg 418410f94802Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 418510f94802Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 418610f94802Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 418710f94802Smrg [Transform the output of nm in a proper C declaration]) 418810f94802Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 418910f94802Smrg [Transform the output of nm into a list of symbols to manually relocate]) 419010f94802Smrg_LT_DECL([global_symbol_to_c_name_address], 419110f94802Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 419210f94802Smrg [Transform the output of nm in a C name address pair]) 419310f94802Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 419410f94802Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 419510f94802Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 419610f94802Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 419710f94802Smrg [The name lister interface]) 419810f94802Smrg_LT_DECL([], [nm_file_list_spec], [1], 419910f94802Smrg [Specify filename containing input files for $NM]) 420010f94802Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 420110f94802Smrg 420210f94802Smrg 420310f94802Smrg# _LT_COMPILER_PIC([TAGNAME]) 420410f94802Smrg# --------------------------- 420510f94802Smrgm4_defun([_LT_COMPILER_PIC], 420610f94802Smrg[m4_require([_LT_TAG_COMPILER])dnl 420710f94802Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 420810f94802Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 420910f94802Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 421010f94802Smrg 421110f94802Smrgm4_if([$1], [CXX], [ 421210f94802Smrg # C++ specific cases for pic, static, wl, etc. 421310f94802Smrg if test yes = "$GXX"; then 421410f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 421510f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 421610f94802Smrg 421710f94802Smrg case $host_os in 421810f94802Smrg aix*) 421910f94802Smrg # All AIX code is PIC. 422010f94802Smrg if test ia64 = "$host_cpu"; then 422110f94802Smrg # AIX 5 now supports IA64 processor 422210f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 422310f94802Smrg fi 422410f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 422510f94802Smrg ;; 422610f94802Smrg 422710f94802Smrg amigaos*) 422810f94802Smrg case $host_cpu in 422910f94802Smrg powerpc) 423010f94802Smrg # see comment about AmigaOS4 .so support 423110f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 423210f94802Smrg ;; 423310f94802Smrg m68k) 423410f94802Smrg # FIXME: we need at least 68020 code to build shared libraries, but 423510f94802Smrg # adding the '-m68020' flag to GCC prevents building anything better, 423610f94802Smrg # like '-m68040'. 423710f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 423810f94802Smrg ;; 423910f94802Smrg esac 424010f94802Smrg ;; 424110f94802Smrg 424210f94802Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 424310f94802Smrg # PIC is the default for these OSes. 424410f94802Smrg ;; 424510f94802Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 424610f94802Smrg # This hack is so that the source file can tell whether it is being 424710f94802Smrg # built for inclusion in a dll (and should export symbols for example). 424810f94802Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 424910f94802Smrg # (--disable-auto-import) libraries 425010f94802Smrg m4_if([$1], [GCJ], [], 425110f94802Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 425210f94802Smrg case $host_os in 425310f94802Smrg os2*) 425410f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 425510f94802Smrg ;; 425610f94802Smrg esac 425710f94802Smrg ;; 425810f94802Smrg darwin* | rhapsody*) 425910f94802Smrg # PIC is the default on this platform 426010f94802Smrg # Common symbols not allowed in MH_DYLIB files 426110f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 426210f94802Smrg ;; 426310f94802Smrg *djgpp*) 426410f94802Smrg # DJGPP does not support shared libraries at all 426510f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 426610f94802Smrg ;; 426710f94802Smrg haiku*) 426810f94802Smrg # PIC is the default for Haiku. 426910f94802Smrg # The "-static" flag exists, but is broken. 427010f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 427110f94802Smrg ;; 427210f94802Smrg interix[[3-9]]*) 427310f94802Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 427410f94802Smrg # Instead, we relocate shared libraries at runtime. 427510f94802Smrg ;; 427610f94802Smrg sysv4*MP*) 427710f94802Smrg if test -d /usr/nec; then 427810f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 427910f94802Smrg fi 428010f94802Smrg ;; 428110f94802Smrg hpux*) 428210f94802Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 428310f94802Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 428410f94802Smrg # sets the default TLS model and affects inlining. 428510f94802Smrg case $host_cpu in 428610f94802Smrg hppa*64*) 428710f94802Smrg ;; 428810f94802Smrg *) 428910f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 429010f94802Smrg ;; 429110f94802Smrg esac 429210f94802Smrg ;; 429310f94802Smrg *qnx* | *nto*) 429410f94802Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 429510f94802Smrg # it will coredump. 429610f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 429710f94802Smrg ;; 429810f94802Smrg *) 429910f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 430010f94802Smrg ;; 430110f94802Smrg esac 430210f94802Smrg else 430310f94802Smrg case $host_os in 430410f94802Smrg aix[[4-9]]*) 430510f94802Smrg # All AIX code is PIC. 430610f94802Smrg if test ia64 = "$host_cpu"; then 430710f94802Smrg # AIX 5 now supports IA64 processor 430810f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 430910f94802Smrg else 431010f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 431110f94802Smrg fi 431210f94802Smrg ;; 431310f94802Smrg chorus*) 431410f94802Smrg case $cc_basename in 431510f94802Smrg cxch68*) 431610f94802Smrg # Green Hills C++ Compiler 431710f94802Smrg # _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" 431810f94802Smrg ;; 431910f94802Smrg esac 432010f94802Smrg ;; 432110f94802Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 432210f94802Smrg # This hack is so that the source file can tell whether it is being 432310f94802Smrg # built for inclusion in a dll (and should export symbols for example). 432410f94802Smrg m4_if([$1], [GCJ], [], 432510f94802Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 432610f94802Smrg ;; 432710f94802Smrg dgux*) 432810f94802Smrg case $cc_basename in 432910f94802Smrg ec++*) 433010f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 433110f94802Smrg ;; 433210f94802Smrg ghcx*) 433310f94802Smrg # Green Hills C++ Compiler 433410f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 433510f94802Smrg ;; 433610f94802Smrg *) 433710f94802Smrg ;; 433810f94802Smrg esac 433910f94802Smrg ;; 434010f94802Smrg freebsd* | dragonfly* | midnightbsd*) 434110f94802Smrg # FreeBSD uses GNU C++ 434210f94802Smrg ;; 434310f94802Smrg hpux9* | hpux10* | hpux11*) 434410f94802Smrg case $cc_basename in 434510f94802Smrg CC*) 434610f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 434710f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 434810f94802Smrg if test ia64 != "$host_cpu"; then 434910f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 435010f94802Smrg fi 435110f94802Smrg ;; 435210f94802Smrg aCC*) 435310f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 435410f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 435510f94802Smrg case $host_cpu in 435610f94802Smrg hppa*64*|ia64*) 435710f94802Smrg # +Z the default 435810f94802Smrg ;; 435910f94802Smrg *) 436010f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 436110f94802Smrg ;; 436210f94802Smrg esac 436310f94802Smrg ;; 436410f94802Smrg *) 436510f94802Smrg ;; 436610f94802Smrg esac 436710f94802Smrg ;; 436810f94802Smrg interix*) 436910f94802Smrg # This is c89, which is MS Visual C++ (no shared libs) 437010f94802Smrg # Anyone wants to do a port? 437110f94802Smrg ;; 437210f94802Smrg irix5* | irix6* | nonstopux*) 437310f94802Smrg case $cc_basename in 437410f94802Smrg CC*) 437510f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 437610f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 437710f94802Smrg # CC pic flag -KPIC is the default. 437810f94802Smrg ;; 437910f94802Smrg *) 438010f94802Smrg ;; 438110f94802Smrg esac 438210f94802Smrg ;; 438310f94802Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 438410f94802Smrg case $cc_basename in 438510f94802Smrg KCC*) 438610f94802Smrg # KAI C++ Compiler 438710f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 438810f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 438910f94802Smrg ;; 439010f94802Smrg ecpc* ) 439110f94802Smrg # old Intel C++ for x86_64, which still supported -KPIC. 439210f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 439310f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 439410f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 439510f94802Smrg ;; 439610f94802Smrg icpc* ) 439710f94802Smrg # Intel C++, used to be incompatible with GCC. 439810f94802Smrg # ICC 10 doesn't accept -KPIC any more. 439910f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 440010f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 440110f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 440210f94802Smrg ;; 440310f94802Smrg pgCC* | pgcpp*) 440410f94802Smrg # Portland Group C++ compiler 440510f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 440610f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 440710f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 440810f94802Smrg ;; 440910f94802Smrg cxx*) 441010f94802Smrg # Compaq C++ 441110f94802Smrg # Make sure the PIC flag is empty. It appears that all Alpha 441210f94802Smrg # Linux and Compaq Tru64 Unix objects are PIC. 441310f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 441410f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 441510f94802Smrg ;; 441610f94802Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 441710f94802Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 441810f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 441910f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 442010f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 442110f94802Smrg ;; 442210f94802Smrg *) 442310f94802Smrg case `$CC -V 2>&1 | $SED 5q` in 442410f94802Smrg *Sun\ C*) 442510f94802Smrg # Sun C++ 5.9 442610f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 442710f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 442810f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 442910f94802Smrg ;; 443010f94802Smrg esac 443110f94802Smrg ;; 443210f94802Smrg esac 443310f94802Smrg ;; 443410f94802Smrg lynxos*) 443510f94802Smrg ;; 443610f94802Smrg m88k*) 443710f94802Smrg ;; 443810f94802Smrg mvs*) 443910f94802Smrg case $cc_basename in 444010f94802Smrg cxx*) 444110f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 444210f94802Smrg ;; 444310f94802Smrg *) 444410f94802Smrg ;; 444510f94802Smrg esac 444610f94802Smrg ;; 444710f94802Smrg netbsd*) 444810f94802Smrg ;; 444910f94802Smrg *qnx* | *nto*) 445010f94802Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 445110f94802Smrg # it will coredump. 445210f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 445310f94802Smrg ;; 445410f94802Smrg osf3* | osf4* | osf5*) 445510f94802Smrg case $cc_basename in 445610f94802Smrg KCC*) 445710f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 445810f94802Smrg ;; 445910f94802Smrg RCC*) 446010f94802Smrg # Rational C++ 2.4.1 446110f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 446210f94802Smrg ;; 446310f94802Smrg cxx*) 446410f94802Smrg # Digital/Compaq C++ 446510f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 446610f94802Smrg # Make sure the PIC flag is empty. It appears that all Alpha 446710f94802Smrg # Linux and Compaq Tru64 Unix objects are PIC. 446810f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 446910f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 447010f94802Smrg ;; 447110f94802Smrg *) 447210f94802Smrg ;; 447310f94802Smrg esac 447410f94802Smrg ;; 447510f94802Smrg psos*) 447610f94802Smrg ;; 447710f94802Smrg solaris*) 447810f94802Smrg case $cc_basename in 447910f94802Smrg CC* | sunCC*) 448010f94802Smrg # Sun C++ 4.2, 5.x and Centerline C++ 448110f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 448210f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 448310f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 448410f94802Smrg ;; 448510f94802Smrg gcx*) 448610f94802Smrg # Green Hills C++ Compiler 448710f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 448810f94802Smrg ;; 448910f94802Smrg *) 449010f94802Smrg ;; 449110f94802Smrg esac 449210f94802Smrg ;; 449310f94802Smrg sunos4*) 449410f94802Smrg case $cc_basename in 449510f94802Smrg CC*) 449610f94802Smrg # Sun C++ 4.x 449710f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 449810f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 449910f94802Smrg ;; 450010f94802Smrg lcc*) 450110f94802Smrg # Lucid 450210f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 450310f94802Smrg ;; 450410f94802Smrg *) 450510f94802Smrg ;; 450610f94802Smrg esac 450710f94802Smrg ;; 450810f94802Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 450910f94802Smrg case $cc_basename in 451010f94802Smrg CC*) 451110f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 451210f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 451310f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 451410f94802Smrg ;; 451510f94802Smrg esac 451610f94802Smrg ;; 451710f94802Smrg tandem*) 451810f94802Smrg case $cc_basename in 451910f94802Smrg NCC*) 452010f94802Smrg # NonStop-UX NCC 3.20 452110f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 452210f94802Smrg ;; 452310f94802Smrg *) 452410f94802Smrg ;; 452510f94802Smrg esac 452610f94802Smrg ;; 452710f94802Smrg vxworks*) 452810f94802Smrg ;; 452910f94802Smrg *) 453010f94802Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 453110f94802Smrg ;; 453210f94802Smrg esac 453310f94802Smrg fi 453410f94802Smrg], 453510f94802Smrg[ 453610f94802Smrg if test yes = "$GCC"; then 453710f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 453810f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 453910f94802Smrg 454010f94802Smrg case $host_os in 454110f94802Smrg aix*) 454210f94802Smrg # All AIX code is PIC. 454310f94802Smrg if test ia64 = "$host_cpu"; then 454410f94802Smrg # AIX 5 now supports IA64 processor 454510f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 454610f94802Smrg fi 454710f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 454810f94802Smrg ;; 454910f94802Smrg 455010f94802Smrg amigaos*) 455110f94802Smrg case $host_cpu in 455210f94802Smrg powerpc) 455310f94802Smrg # see comment about AmigaOS4 .so support 455410f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 455510f94802Smrg ;; 455610f94802Smrg m68k) 455710f94802Smrg # FIXME: we need at least 68020 code to build shared libraries, but 455810f94802Smrg # adding the '-m68020' flag to GCC prevents building anything better, 455910f94802Smrg # like '-m68040'. 456010f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 456110f94802Smrg ;; 456210f94802Smrg esac 456310f94802Smrg ;; 456410f94802Smrg 456510f94802Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 456610f94802Smrg # PIC is the default for these OSes. 456710f94802Smrg ;; 456810f94802Smrg 456910f94802Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 457010f94802Smrg # This hack is so that the source file can tell whether it is being 457110f94802Smrg # built for inclusion in a dll (and should export symbols for example). 457210f94802Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 457310f94802Smrg # (--disable-auto-import) libraries 457410f94802Smrg m4_if([$1], [GCJ], [], 457510f94802Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 457610f94802Smrg case $host_os in 457710f94802Smrg os2*) 457810f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 457910f94802Smrg ;; 458010f94802Smrg esac 458110f94802Smrg ;; 458210f94802Smrg 458310f94802Smrg darwin* | rhapsody*) 458410f94802Smrg # PIC is the default on this platform 458510f94802Smrg # Common symbols not allowed in MH_DYLIB files 458610f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 458710f94802Smrg ;; 458810f94802Smrg 458910f94802Smrg haiku*) 459010f94802Smrg # PIC is the default for Haiku. 459110f94802Smrg # The "-static" flag exists, but is broken. 459210f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 459310f94802Smrg ;; 459410f94802Smrg 459510f94802Smrg hpux*) 459610f94802Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 459710f94802Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 459810f94802Smrg # sets the default TLS model and affects inlining. 459910f94802Smrg case $host_cpu in 460010f94802Smrg hppa*64*) 460110f94802Smrg # +Z the default 460210f94802Smrg ;; 460310f94802Smrg *) 460410f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 460510f94802Smrg ;; 460610f94802Smrg esac 460710f94802Smrg ;; 460810f94802Smrg 460910f94802Smrg interix[[3-9]]*) 461010f94802Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 461110f94802Smrg # Instead, we relocate shared libraries at runtime. 461210f94802Smrg ;; 461310f94802Smrg 461410f94802Smrg msdosdjgpp*) 461510f94802Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 461610f94802Smrg # on systems that don't support them. 461710f94802Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 461810f94802Smrg enable_shared=no 461910f94802Smrg ;; 462010f94802Smrg 462110f94802Smrg *nto* | *qnx*) 462210f94802Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 462310f94802Smrg # it will coredump. 462410f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 462510f94802Smrg ;; 462610f94802Smrg 462710f94802Smrg sysv4*MP*) 462810f94802Smrg if test -d /usr/nec; then 462910f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 463010f94802Smrg fi 463110f94802Smrg ;; 463210f94802Smrg 463310f94802Smrg *) 463410f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 463510f94802Smrg ;; 463610f94802Smrg esac 463710f94802Smrg 463810f94802Smrg case $cc_basename in 463910f94802Smrg nvcc*) # Cuda Compiler Driver 2.2 464010f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 464110f94802Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 464210f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 464310f94802Smrg fi 464410f94802Smrg ;; 464510f94802Smrg esac 464610f94802Smrg else 464710f94802Smrg # PORTME Check for flag to pass linker flags through the system compiler. 464810f94802Smrg case $host_os in 464910f94802Smrg aix*) 465010f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 465110f94802Smrg if test ia64 = "$host_cpu"; then 465210f94802Smrg # AIX 5 now supports IA64 processor 465310f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 465410f94802Smrg else 465510f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 465610f94802Smrg fi 465710f94802Smrg ;; 465810f94802Smrg 465910f94802Smrg darwin* | rhapsody*) 466010f94802Smrg # PIC is the default on this platform 466110f94802Smrg # Common symbols not allowed in MH_DYLIB files 466210f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 466310f94802Smrg case $cc_basename in 466410f94802Smrg nagfor*) 466510f94802Smrg # NAG Fortran compiler 466610f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 466710f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 466810f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 466910f94802Smrg ;; 467010f94802Smrg esac 467110f94802Smrg ;; 467210f94802Smrg 467310f94802Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 467410f94802Smrg # This hack is so that the source file can tell whether it is being 467510f94802Smrg # built for inclusion in a dll (and should export symbols for example). 467610f94802Smrg m4_if([$1], [GCJ], [], 467710f94802Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 467810f94802Smrg case $host_os in 467910f94802Smrg os2*) 468010f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 468110f94802Smrg ;; 468210f94802Smrg esac 468310f94802Smrg ;; 468410f94802Smrg 468510f94802Smrg hpux9* | hpux10* | hpux11*) 468610f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 468710f94802Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 468810f94802Smrg # not for PA HP-UX. 468910f94802Smrg case $host_cpu in 469010f94802Smrg hppa*64*|ia64*) 469110f94802Smrg # +Z the default 469210f94802Smrg ;; 469310f94802Smrg *) 469410f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 469510f94802Smrg ;; 469610f94802Smrg esac 469710f94802Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 469810f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 469910f94802Smrg ;; 470010f94802Smrg 470110f94802Smrg irix5* | irix6* | nonstopux*) 470210f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 470310f94802Smrg # PIC (with -KPIC) is the default. 470410f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 470510f94802Smrg ;; 470610f94802Smrg 470710f94802Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 470810f94802Smrg case $cc_basename in 470910f94802Smrg # old Intel for x86_64, which still supported -KPIC. 471010f94802Smrg ecc*) 471110f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 471210f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 471310f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 471410f94802Smrg ;; 471510f94802Smrg # icc used to be incompatible with GCC. 471610f94802Smrg # ICC 10 doesn't accept -KPIC any more. 471710f94802Smrg icc* | ifort*) 471810f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 471910f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 472010f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 472110f94802Smrg ;; 472210f94802Smrg # Lahey Fortran 8.1. 472310f94802Smrg lf95*) 472410f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 472510f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 472610f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 472710f94802Smrg ;; 472810f94802Smrg nagfor*) 472910f94802Smrg # NAG Fortran compiler 473010f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 473110f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 473210f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 473310f94802Smrg ;; 473410f94802Smrg tcc*) 473510f94802Smrg # Fabrice Bellard et al's Tiny C Compiler 473610f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 473710f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 473810f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 473910f94802Smrg ;; 474010f94802Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 474110f94802Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 474210f94802Smrg # which looks to be a dead project) 474310f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 474410f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 474510f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 474610f94802Smrg ;; 474710f94802Smrg ccc*) 474810f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 474910f94802Smrg # All Alpha code is PIC. 475010f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 475110f94802Smrg ;; 475210f94802Smrg xl* | bgxl* | bgf* | mpixl*) 475310f94802Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 475410f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 475510f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 475610f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 475710f94802Smrg ;; 475810f94802Smrg *) 475910f94802Smrg case `$CC -V 2>&1 | $SED 5q` in 476010f94802Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 476110f94802Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 476210f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 476310f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 476410f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 476510f94802Smrg ;; 476610f94802Smrg *Sun\ F* | *Sun*Fortran*) 476710f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 476810f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 476910f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 477010f94802Smrg ;; 477110f94802Smrg *Sun\ C*) 477210f94802Smrg # Sun C 5.9 477310f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 477410f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 477510f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 477610f94802Smrg ;; 477710f94802Smrg *Intel*\ [[CF]]*Compiler*) 477810f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 477910f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 478010f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 478110f94802Smrg ;; 478210f94802Smrg *Portland\ Group*) 478310f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 478410f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 478510f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 478610f94802Smrg ;; 478710f94802Smrg esac 478810f94802Smrg ;; 478910f94802Smrg esac 479010f94802Smrg ;; 479110f94802Smrg 479210f94802Smrg newsos6) 479310f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 479410f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 479510f94802Smrg ;; 479610f94802Smrg 479710f94802Smrg *nto* | *qnx*) 479810f94802Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 479910f94802Smrg # it will coredump. 480010f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 480110f94802Smrg ;; 480210f94802Smrg 480310f94802Smrg osf3* | osf4* | osf5*) 480410f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 480510f94802Smrg # All OSF/1 code is PIC. 480610f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 480710f94802Smrg ;; 480810f94802Smrg 480910f94802Smrg rdos*) 481010f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 481110f94802Smrg ;; 481210f94802Smrg 481310f94802Smrg solaris*) 481410f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 481510f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 481610f94802Smrg case $cc_basename in 481710f94802Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 481810f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 481910f94802Smrg *) 482010f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 482110f94802Smrg esac 482210f94802Smrg ;; 482310f94802Smrg 482410f94802Smrg sunos4*) 482510f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 482610f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 482710f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 482810f94802Smrg ;; 482910f94802Smrg 483010f94802Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 483110f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 483210f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 483310f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 483410f94802Smrg ;; 483510f94802Smrg 483610f94802Smrg sysv4*MP*) 483710f94802Smrg if test -d /usr/nec; then 483810f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 483910f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484010f94802Smrg fi 484110f94802Smrg ;; 484210f94802Smrg 484310f94802Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 484410f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 484510f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 484610f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484710f94802Smrg ;; 484810f94802Smrg 484910f94802Smrg unicos*) 485010f94802Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 485110f94802Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 485210f94802Smrg ;; 485310f94802Smrg 485410f94802Smrg uts4*) 485510f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 485610f94802Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 485710f94802Smrg ;; 485810f94802Smrg 485910f94802Smrg *) 486010f94802Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 486110f94802Smrg ;; 486210f94802Smrg esac 486310f94802Smrg fi 486410f94802Smrg]) 486510f94802Smrgcase $host_os in 486610f94802Smrg # For platforms that do not support PIC, -DPIC is meaningless: 486710f94802Smrg *djgpp*) 486810f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 486910f94802Smrg ;; 487010f94802Smrg *) 487110f94802Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 487210f94802Smrg ;; 487310f94802Smrgesac 487410f94802Smrg 487510f94802SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 487610f94802Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 487710f94802Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 487810f94802Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 487910f94802Smrg 488010f94802Smrg# 488110f94802Smrg# Check to make sure the PIC flag actually works. 488210f94802Smrg# 488310f94802Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 488410f94802Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 488510f94802Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 488610f94802Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 488710f94802Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 488810f94802Smrg "" | " "*) ;; 488910f94802Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 489010f94802Smrg esac], 489110f94802Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 489210f94802Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 489310f94802Smrgfi 489410f94802Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 489510f94802Smrg [Additional compiler flags for building library objects]) 489610f94802Smrg 489710f94802Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 489810f94802Smrg [How to pass a linker flag through the compiler]) 489910f94802Smrg# 490010f94802Smrg# Check to make sure the static flag actually works. 490110f94802Smrg# 490210f94802Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 490310f94802Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 490410f94802Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 490510f94802Smrg $lt_tmp_static_flag, 490610f94802Smrg [], 490710f94802Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 490810f94802Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 490910f94802Smrg [Compiler flag to prevent dynamic linking]) 491010f94802Smrg])# _LT_COMPILER_PIC 491110f94802Smrg 491210f94802Smrg 491310f94802Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 491410f94802Smrg# ---------------------------- 491510f94802Smrg# See if the linker supports building shared libraries. 491610f94802Smrgm4_defun([_LT_LINKER_SHLIBS], 491710f94802Smrg[AC_REQUIRE([LT_PATH_LD])dnl 491810f94802SmrgAC_REQUIRE([LT_PATH_NM])dnl 491910f94802Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 492010f94802Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 492110f94802Smrgm4_require([_LT_DECL_EGREP])dnl 492210f94802Smrgm4_require([_LT_DECL_SED])dnl 492310f94802Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 492410f94802Smrgm4_require([_LT_TAG_COMPILER])dnl 492510f94802SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 492610f94802Smrgm4_if([$1], [CXX], [ 492710f94802Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 492810f94802Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 492910f94802Smrg case $host_os in 493010f94802Smrg aix[[4-9]]*) 493110f94802Smrg # If we're using GNU nm, then we don't want the "-C" option. 493210f94802Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 493310f94802Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 493410f94802Smrg # weak defined symbols like other global defined symbols, whereas 493510f94802Smrg # GNU nm marks them as "W". 493610f94802Smrg # While the 'weak' keyword is ignored in the Export File, we need 493710f94802Smrg # it in the Import File for the 'aix-soname' feature, so we have 493810f94802Smrg # to replace the "-B" option with "-P" for AIX nm. 493910f94802Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 494010f94802Smrg _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' 494110f94802Smrg else 494210f94802Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 494310f94802Smrg fi 494410f94802Smrg ;; 494510f94802Smrg pw32*) 494610f94802Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 494710f94802Smrg ;; 494810f94802Smrg cygwin* | mingw* | cegcc*) 494910f94802Smrg case $cc_basename in 495010f94802Smrg cl* | icl*) 495110f94802Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 495210f94802Smrg ;; 495310f94802Smrg *) 495410f94802Smrg _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' 495510f94802Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 495610f94802Smrg ;; 495710f94802Smrg esac 495810f94802Smrg ;; 495910f94802Smrg *) 496010f94802Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 496110f94802Smrg ;; 496210f94802Smrg esac 496310f94802Smrg], [ 496410f94802Smrg runpath_var= 496510f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 496610f94802Smrg _LT_TAGVAR(always_export_symbols, $1)=no 496710f94802Smrg _LT_TAGVAR(archive_cmds, $1)= 496810f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 496910f94802Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 497010f94802Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 497110f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 497210f94802Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 497310f94802Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 497410f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=no 497510f94802Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 497610f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 497710f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 497810f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 497910f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 498010f94802Smrg _LT_TAGVAR(inherit_rpath, $1)=no 498110f94802Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 498210f94802Smrg _LT_TAGVAR(module_cmds, $1)= 498310f94802Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 498410f94802Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 498510f94802Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 498610f94802Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 498710f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 498810f94802Smrg # include_expsyms should be a list of space-separated symbols to be *always* 498910f94802Smrg # included in the symbol list 499010f94802Smrg _LT_TAGVAR(include_expsyms, $1)= 499110f94802Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 499210f94802Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 499310f94802Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 499410f94802Smrg # as well as any symbol that contains 'd'. 499510f94802Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 499610f94802Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 499710f94802Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 499810f94802Smrg # the symbol is explicitly referenced. Since portable code cannot 499910f94802Smrg # rely on this symbol name, it's probably fine to never include it in 500010f94802Smrg # preloaded symbol tables. 500110f94802Smrg # Exclude shared library initialization/finalization symbols. 500210f94802Smrgdnl Note also adjust exclude_expsyms for C++ above. 500310f94802Smrg extract_expsyms_cmds= 500410f94802Smrg 500510f94802Smrg case $host_os in 500610f94802Smrg cygwin* | mingw* | pw32* | cegcc*) 500710f94802Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 500810f94802Smrg # When not using gcc, we currently assume that we are using 500910f94802Smrg # Microsoft Visual C++ or Intel C++ Compiler. 501010f94802Smrg if test yes != "$GCC"; then 501110f94802Smrg with_gnu_ld=no 501210f94802Smrg fi 501310f94802Smrg ;; 501410f94802Smrg interix*) 501510f94802Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 501610f94802Smrg with_gnu_ld=yes 501710f94802Smrg ;; 501810f94802Smrg openbsd* | bitrig*) 501910f94802Smrg with_gnu_ld=no 502010f94802Smrg ;; 502110f94802Smrg esac 502210f94802Smrg 502310f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 502410f94802Smrg 502510f94802Smrg # On some targets, GNU ld is compatible enough with the native linker 502610f94802Smrg # that we're better off using the native interface for both. 502710f94802Smrg lt_use_gnu_ld_interface=no 502810f94802Smrg if test yes = "$with_gnu_ld"; then 502910f94802Smrg case $host_os in 503010f94802Smrg aix*) 503110f94802Smrg # The AIX port of GNU ld has always aspired to compatibility 503210f94802Smrg # with the native linker. However, as the warning in the GNU ld 503310f94802Smrg # block says, versions before 2.19.5* couldn't really create working 503410f94802Smrg # shared libraries, regardless of the interface used. 503510f94802Smrg case `$LD -v 2>&1` in 503610f94802Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 503710f94802Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 503810f94802Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 503910f94802Smrg *) 504010f94802Smrg lt_use_gnu_ld_interface=yes 504110f94802Smrg ;; 504210f94802Smrg esac 504310f94802Smrg ;; 504410f94802Smrg *) 504510f94802Smrg lt_use_gnu_ld_interface=yes 504610f94802Smrg ;; 504710f94802Smrg esac 504810f94802Smrg fi 504910f94802Smrg 505010f94802Smrg if test yes = "$lt_use_gnu_ld_interface"; then 505110f94802Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 505210f94802Smrg wlarc='$wl' 505310f94802Smrg 505410f94802Smrg # Set some defaults for GNU ld with shared library support. These 505510f94802Smrg # are reset later if shared libraries are not supported. Putting them 505610f94802Smrg # here allows them to be overridden if necessary. 505710f94802Smrg runpath_var=LD_RUN_PATH 505810f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 505910f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 506010f94802Smrg # ancient GNU ld didn't support --whole-archive et. al. 506110f94802Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 506210f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 506310f94802Smrg else 506410f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 506510f94802Smrg fi 506610f94802Smrg supports_anon_versioning=no 506710f94802Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 506810f94802Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 506910f94802Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 507010f94802Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 507110f94802Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 507210f94802Smrg *\ 2.11.*) ;; # other 2.11 versions 507310f94802Smrg *) supports_anon_versioning=yes ;; 507410f94802Smrg esac 507510f94802Smrg 507610f94802Smrg # See if GNU ld supports shared libraries. 507710f94802Smrg case $host_os in 507810f94802Smrg aix[[3-9]]*) 507910f94802Smrg # On AIX/PPC, the GNU linker is very broken 508010f94802Smrg if test ia64 != "$host_cpu"; then 508110f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 508210f94802Smrg cat <<_LT_EOF 1>&2 508310f94802Smrg 508410f94802Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 508510f94802Smrg*** to be unable to reliably create shared libraries on AIX. 508610f94802Smrg*** Therefore, libtool is disabling shared libraries support. If you 508710f94802Smrg*** really care for shared libraries, you may want to install binutils 508810f94802Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 508910f94802Smrg*** You will then need to restart the configuration process. 509010f94802Smrg 509110f94802Smrg_LT_EOF 509210f94802Smrg fi 509310f94802Smrg ;; 509410f94802Smrg 509510f94802Smrg amigaos*) 509610f94802Smrg case $host_cpu in 509710f94802Smrg powerpc) 509810f94802Smrg # see comment about AmigaOS4 .so support 509910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 510010f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 510110f94802Smrg ;; 510210f94802Smrg m68k) 510310f94802Smrg _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)' 510410f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 510510f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 510610f94802Smrg ;; 510710f94802Smrg esac 510810f94802Smrg ;; 510910f94802Smrg 511010f94802Smrg beos*) 511110f94802Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 511210f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 511310f94802Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 511410f94802Smrg # support --undefined. This deserves some investigation. FIXME 511510f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 511610f94802Smrg else 511710f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 511810f94802Smrg fi 511910f94802Smrg ;; 512010f94802Smrg 512110f94802Smrg cygwin* | mingw* | pw32* | cegcc*) 512210f94802Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 512310f94802Smrg # as there is no search path for DLLs. 512410f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 512510f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 512610f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 512710f94802Smrg _LT_TAGVAR(always_export_symbols, $1)=no 512810f94802Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 512910f94802Smrg _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' 513010f94802Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 513110f94802Smrg 513210f94802Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 513310f94802Smrg _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' 513410f94802Smrg # If the export-symbols file already is a .def file, use it as 513510f94802Smrg # is; otherwise, prepend EXPORTS... 513610f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 513710f94802Smrg cp $export_symbols $output_objdir/$soname.def; 513810f94802Smrg else 513910f94802Smrg echo EXPORTS > $output_objdir/$soname.def; 514010f94802Smrg cat $export_symbols >> $output_objdir/$soname.def; 514110f94802Smrg fi~ 514210f94802Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 514310f94802Smrg else 514410f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 514510f94802Smrg fi 514610f94802Smrg ;; 514710f94802Smrg 514810f94802Smrg haiku*) 514910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 515010f94802Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 515110f94802Smrg ;; 515210f94802Smrg 515310f94802Smrg os2*) 515410f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 515510f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 515610f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 515710f94802Smrg shrext_cmds=.dll 515810f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 515910f94802Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 516010f94802Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 516110f94802Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 516210f94802Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 516310f94802Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 516410f94802Smrg emximp -o $lib $output_objdir/$libname.def' 516510f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 516610f94802Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 516710f94802Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 516810f94802Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 516910f94802Smrg prefix_cmds="$SED"~ 517010f94802Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 517110f94802Smrg prefix_cmds="$prefix_cmds -e 1d"; 517210f94802Smrg fi~ 517310f94802Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 517410f94802Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 517510f94802Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 517610f94802Smrg emximp -o $lib $output_objdir/$libname.def' 517710f94802Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 517810f94802Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 517910f94802Smrg _LT_TAGVAR(file_list_spec, $1)='@' 518010f94802Smrg ;; 518110f94802Smrg 518210f94802Smrg interix[[3-9]]*) 518310f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=no 518410f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 518510f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 518610f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 518710f94802Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 518810f94802Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 518910f94802Smrg # default) and relocated if they conflict, which is a slow very memory 519010f94802Smrg # consuming and fragmenting process. To avoid this, we pick a random, 519110f94802Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 519210f94802Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 519310f94802Smrg _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' 519410f94802Smrg _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' 519510f94802Smrg ;; 519610f94802Smrg 519710f94802Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 519810f94802Smrg tmp_diet=no 519910f94802Smrg if test linux-dietlibc = "$host_os"; then 520010f94802Smrg case $cc_basename in 520110f94802Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 520210f94802Smrg esac 520310f94802Smrg fi 520410f94802Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 520510f94802Smrg && test no = "$tmp_diet" 520610f94802Smrg then 520710f94802Smrg tmp_addflag=' $pic_flag' 520810f94802Smrg tmp_sharedflag='-shared' 520910f94802Smrg case $cc_basename,$host_cpu in 521010f94802Smrg pgcc*) # Portland Group C compiler 521110f94802Smrg _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' 521210f94802Smrg tmp_addflag=' $pic_flag' 521310f94802Smrg ;; 521410f94802Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 521510f94802Smrg # Portland Group f77 and f90 compilers 521610f94802Smrg _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' 521710f94802Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 521810f94802Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 521910f94802Smrg tmp_addflag=' -i_dynamic' ;; 522010f94802Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 522110f94802Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 522210f94802Smrg ifc* | ifort*) # Intel Fortran compiler 522310f94802Smrg tmp_addflag=' -nofor_main' ;; 522410f94802Smrg lf95*) # Lahey Fortran 8.1 522510f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 522610f94802Smrg tmp_sharedflag='--shared' ;; 522710f94802Smrg nagfor*) # NAGFOR 5.3 522810f94802Smrg tmp_sharedflag='-Wl,-shared' ;; 522910f94802Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 523010f94802Smrg tmp_sharedflag='-qmkshrobj' 523110f94802Smrg tmp_addflag= ;; 523210f94802Smrg nvcc*) # Cuda Compiler Driver 2.2 523310f94802Smrg _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' 523410f94802Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 523510f94802Smrg ;; 523610f94802Smrg esac 523710f94802Smrg case `$CC -V 2>&1 | $SED 5q` in 523810f94802Smrg *Sun\ C*) # Sun C 5.9 523910f94802Smrg _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' 524010f94802Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 524110f94802Smrg tmp_sharedflag='-G' ;; 524210f94802Smrg *Sun\ F*) # Sun Fortran 8.3 524310f94802Smrg tmp_sharedflag='-G' ;; 524410f94802Smrg esac 524510f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 524610f94802Smrg 524710f94802Smrg if test yes = "$supports_anon_versioning"; then 524810f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 524910f94802Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 525010f94802Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 525110f94802Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 525210f94802Smrg fi 525310f94802Smrg 525410f94802Smrg case $cc_basename in 525510f94802Smrg tcc*) 525610f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 525710f94802Smrg ;; 525810f94802Smrg xlf* | bgf* | bgxlf* | mpixlf*) 525910f94802Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 526010f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 526110f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 526210f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 526310f94802Smrg if test yes = "$supports_anon_versioning"; then 526410f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 526510f94802Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 526610f94802Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 526710f94802Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 526810f94802Smrg fi 526910f94802Smrg ;; 527010f94802Smrg esac 527110f94802Smrg else 527210f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 527310f94802Smrg fi 527410f94802Smrg ;; 527510f94802Smrg 527610f94802Smrg netbsd*) 527710f94802Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 527810f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 527910f94802Smrg wlarc= 528010f94802Smrg else 528110f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 528210f94802Smrg _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' 528310f94802Smrg fi 528410f94802Smrg ;; 528510f94802Smrg 528610f94802Smrg solaris*) 528710f94802Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 528810f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 528910f94802Smrg cat <<_LT_EOF 1>&2 529010f94802Smrg 529110f94802Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 529210f94802Smrg*** create shared libraries on Solaris systems. Therefore, libtool 529310f94802Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 529410f94802Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 529510f94802Smrg*** your PATH or compiler configuration so that the native linker is 529610f94802Smrg*** used, and then restart. 529710f94802Smrg 529810f94802Smrg_LT_EOF 529910f94802Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 530010f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 530110f94802Smrg _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' 530210f94802Smrg else 530310f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 530410f94802Smrg fi 530510f94802Smrg ;; 530610f94802Smrg 530710f94802Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 530810f94802Smrg case `$LD -v 2>&1` in 530910f94802Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 531010f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 531110f94802Smrg cat <<_LT_EOF 1>&2 531210f94802Smrg 531310f94802Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 531410f94802Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 531510f94802Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 531610f94802Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 531710f94802Smrg*** your PATH or compiler configuration so that the native linker is 531810f94802Smrg*** used, and then restart. 531910f94802Smrg 532010f94802Smrg_LT_EOF 532110f94802Smrg ;; 532210f94802Smrg *) 532310f94802Smrg # For security reasons, it is highly recommended that you always 532410f94802Smrg # use absolute paths for naming shared libraries, and exclude the 532510f94802Smrg # DT_RUNPATH tag from executables and libraries. But doing so 532610f94802Smrg # requires that you compile everything twice, which is a pain. 532710f94802Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 532810f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 532910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 533010f94802Smrg _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' 533110f94802Smrg else 533210f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 533310f94802Smrg fi 533410f94802Smrg ;; 533510f94802Smrg esac 533610f94802Smrg ;; 533710f94802Smrg 533810f94802Smrg sunos4*) 533910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 534010f94802Smrg wlarc= 534110f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 534210f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 534310f94802Smrg ;; 534410f94802Smrg 534510f94802Smrg *) 534610f94802Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 534710f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 534810f94802Smrg _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' 534910f94802Smrg else 535010f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 535110f94802Smrg fi 535210f94802Smrg ;; 535310f94802Smrg esac 535410f94802Smrg 535510f94802Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 535610f94802Smrg runpath_var= 535710f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 535810f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 535910f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 536010f94802Smrg fi 536110f94802Smrg else 536210f94802Smrg # PORTME fill in a description of your system's linker (not GNU ld) 536310f94802Smrg case $host_os in 536410f94802Smrg aix3*) 536510f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 536610f94802Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 536710f94802Smrg _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' 536810f94802Smrg # Note: this linker hardcodes the directories in LIBPATH if there 536910f94802Smrg # are no directories specified by -L. 537010f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 537110f94802Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 537210f94802Smrg # Neither direct hardcoding nor static linking is supported with a 537310f94802Smrg # broken collect2. 537410f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 537510f94802Smrg fi 537610f94802Smrg ;; 537710f94802Smrg 537810f94802Smrg aix[[4-9]]*) 537910f94802Smrg if test ia64 = "$host_cpu"; then 538010f94802Smrg # On IA64, the linker does run time linking by default, so we don't 538110f94802Smrg # have to do anything special. 538210f94802Smrg aix_use_runtimelinking=no 538310f94802Smrg exp_sym_flag='-Bexport' 538410f94802Smrg no_entry_flag= 538510f94802Smrg else 538610f94802Smrg # If we're using GNU nm, then we don't want the "-C" option. 538710f94802Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 538810f94802Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 538910f94802Smrg # weak defined symbols like other global defined symbols, whereas 539010f94802Smrg # GNU nm marks them as "W". 539110f94802Smrg # While the 'weak' keyword is ignored in the Export File, we need 539210f94802Smrg # it in the Import File for the 'aix-soname' feature, so we have 539310f94802Smrg # to replace the "-B" option with "-P" for AIX nm. 539410f94802Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 539510f94802Smrg _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' 539610f94802Smrg else 539710f94802Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 539810f94802Smrg fi 539910f94802Smrg aix_use_runtimelinking=no 540010f94802Smrg 540110f94802Smrg # Test if we are trying to use run time linking or normal 540210f94802Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 540310f94802Smrg # have runtime linking enabled, and use it for executables. 540410f94802Smrg # For shared libraries, we enable/disable runtime linking 540510f94802Smrg # depending on the kind of the shared library created - 540610f94802Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 540710f94802Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 540810f94802Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 540910f94802Smrg # lib.a static archive 541010f94802Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 541110f94802Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 541210f94802Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 541310f94802Smrg # lib.a(lib.so.V) shared, rtl:no 541410f94802Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 541510f94802Smrg # lib.a static archive 541610f94802Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 541710f94802Smrg for ld_flag in $LDFLAGS; do 541810f94802Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 541910f94802Smrg aix_use_runtimelinking=yes 542010f94802Smrg break 542110f94802Smrg fi 542210f94802Smrg done 542310f94802Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 542410f94802Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 542510f94802Smrg # so we don't have lib.a shared libs to link our executables. 542610f94802Smrg # We have to force runtime linking in this case. 542710f94802Smrg aix_use_runtimelinking=yes 542810f94802Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 542910f94802Smrg fi 543010f94802Smrg ;; 543110f94802Smrg esac 543210f94802Smrg 543310f94802Smrg exp_sym_flag='-bexport' 543410f94802Smrg no_entry_flag='-bnoentry' 543510f94802Smrg fi 543610f94802Smrg 543710f94802Smrg # When large executables or shared objects are built, AIX ld can 543810f94802Smrg # have problems creating the table of contents. If linking a library 543910f94802Smrg # or program results in "error TOC overflow" add -mminimal-toc to 544010f94802Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 544110f94802Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 544210f94802Smrg 544310f94802Smrg _LT_TAGVAR(archive_cmds, $1)='' 544410f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 544510f94802Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 544610f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 544710f94802Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 544810f94802Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 544910f94802Smrg case $with_aix_soname,$aix_use_runtimelinking in 545010f94802Smrg aix,*) ;; # traditional, no import file 545110f94802Smrg svr4,* | *,yes) # use import file 545210f94802Smrg # The Import File defines what to hardcode. 545310f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=no 545410f94802Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 545510f94802Smrg ;; 545610f94802Smrg esac 545710f94802Smrg 545810f94802Smrg if test yes = "$GCC"; then 545910f94802Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 546010f94802Smrg # We only want to do this on AIX 4.2 and lower, the check 546110f94802Smrg # below for broken collect2 doesn't work under 4.3+ 546210f94802Smrg collect2name=`$CC -print-prog-name=collect2` 546310f94802Smrg if test -f "$collect2name" && 546410f94802Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 546510f94802Smrg then 546610f94802Smrg # We have reworked collect2 546710f94802Smrg : 546810f94802Smrg else 546910f94802Smrg # We have old collect2 547010f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 547110f94802Smrg # It fails to find uninstalled libraries when the uninstalled 547210f94802Smrg # path is not listed in the libpath. Setting hardcode_minus_L 547310f94802Smrg # to unsupported forces relinking 547410f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 547510f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 547610f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 547710f94802Smrg fi 547810f94802Smrg ;; 547910f94802Smrg esac 548010f94802Smrg shared_flag='-shared' 548110f94802Smrg if test yes = "$aix_use_runtimelinking"; then 548210f94802Smrg shared_flag="$shared_flag "'$wl-G' 548310f94802Smrg fi 548410f94802Smrg # Need to ensure runtime linking is disabled for the traditional 548510f94802Smrg # shared library, or the linker may eventually find shared libraries 548610f94802Smrg # /with/ Import File - we do not want to mix them. 548710f94802Smrg shared_flag_aix='-shared' 548810f94802Smrg shared_flag_svr4='-shared $wl-G' 548910f94802Smrg else 549010f94802Smrg # not using gcc 549110f94802Smrg if test ia64 = "$host_cpu"; then 549210f94802Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 549310f94802Smrg # chokes on -Wl,-G. The following line is correct: 549410f94802Smrg shared_flag='-G' 549510f94802Smrg else 549610f94802Smrg if test yes = "$aix_use_runtimelinking"; then 549710f94802Smrg shared_flag='$wl-G' 549810f94802Smrg else 549910f94802Smrg shared_flag='$wl-bM:SRE' 550010f94802Smrg fi 550110f94802Smrg shared_flag_aix='$wl-bM:SRE' 550210f94802Smrg shared_flag_svr4='$wl-G' 550310f94802Smrg fi 550410f94802Smrg fi 550510f94802Smrg 550610f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 550710f94802Smrg # It seems that -bexpall does not export symbols beginning with 550810f94802Smrg # underscore (_), so it is better to generate a list of symbols to export. 550910f94802Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 551010f94802Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 551110f94802Smrg # Warning - without using the other runtime loading flags (-brtl), 551210f94802Smrg # -berok will link without error, but may produce a broken library. 551310f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 551410f94802Smrg # Determine the default libpath from the value encoded in an 551510f94802Smrg # empty executable. 551610f94802Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 551710f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 551810f94802Smrg _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 551910f94802Smrg else 552010f94802Smrg if test ia64 = "$host_cpu"; then 552110f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 552210f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 552310f94802Smrg _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" 552410f94802Smrg else 552510f94802Smrg # Determine the default libpath from the value encoded in an 552610f94802Smrg # empty executable. 552710f94802Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 552810f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 552910f94802Smrg # Warning - without using the other run time loading flags, 553010f94802Smrg # -berok will link without error, but may produce a broken library. 553110f94802Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 553210f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 553310f94802Smrg if test yes = "$with_gnu_ld"; then 553410f94802Smrg # We only use this code for GNU lds that support --whole-archive. 553510f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 553610f94802Smrg else 553710f94802Smrg # Exported symbols can be pulled into shared objects from archives 553810f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 553910f94802Smrg fi 554010f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 554110f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 554210f94802Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 554310f94802Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 554410f94802Smrg if test svr4 != "$with_aix_soname"; then 554510f94802Smrg # This is similar to how AIX traditionally builds its shared libraries. 554610f94802Smrg _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' 554710f94802Smrg fi 554810f94802Smrg if test aix != "$with_aix_soname"; then 554910f94802Smrg _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' 555010f94802Smrg else 555110f94802Smrg # used by -dlpreopen to get the symbols 555210f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 555310f94802Smrg fi 555410f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 555510f94802Smrg fi 555610f94802Smrg fi 555710f94802Smrg ;; 555810f94802Smrg 555910f94802Smrg amigaos*) 556010f94802Smrg case $host_cpu in 556110f94802Smrg powerpc) 556210f94802Smrg # see comment about AmigaOS4 .so support 556310f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 556410f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 556510f94802Smrg ;; 556610f94802Smrg m68k) 556710f94802Smrg _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)' 556810f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 556910f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 557010f94802Smrg ;; 557110f94802Smrg esac 557210f94802Smrg ;; 557310f94802Smrg 557410f94802Smrg bsdi[[45]]*) 557510f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 557610f94802Smrg ;; 557710f94802Smrg 557810f94802Smrg cygwin* | mingw* | pw32* | cegcc*) 557910f94802Smrg # When not using gcc, we currently assume that we are using 558010f94802Smrg # Microsoft Visual C++ or Intel C++ Compiler. 558110f94802Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 558210f94802Smrg # no search path for DLLs. 558310f94802Smrg case $cc_basename in 558410f94802Smrg cl* | icl*) 558510f94802Smrg # Native MSVC or ICC 558610f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 558710f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 558810f94802Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 558910f94802Smrg _LT_TAGVAR(file_list_spec, $1)='@' 559010f94802Smrg # Tell ltmain to make .lib files, not .a files. 559110f94802Smrg libext=lib 559210f94802Smrg # Tell ltmain to make .dll files, not .so files. 559310f94802Smrg shrext_cmds=.dll 559410f94802Smrg # FIXME: Setting linknames here is a bad hack. 559510f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 559610f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 559710f94802Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 559810f94802Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 559910f94802Smrg else 560010f94802Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 560110f94802Smrg fi~ 560210f94802Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 560310f94802Smrg linknames=' 560410f94802Smrg # The linker will not automatically build a static lib if we build a DLL. 560510f94802Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 560610f94802Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 560710f94802Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 560810f94802Smrg _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' 560910f94802Smrg # Don't use ranlib 561010f94802Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 561110f94802Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 561210f94802Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 561310f94802Smrg case $lt_outputfile in 561410f94802Smrg *.exe|*.EXE) ;; 561510f94802Smrg *) 561610f94802Smrg lt_outputfile=$lt_outputfile.exe 561710f94802Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 561810f94802Smrg ;; 561910f94802Smrg esac~ 562010f94802Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 562110f94802Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 562210f94802Smrg $RM "$lt_outputfile.manifest"; 562310f94802Smrg fi' 562410f94802Smrg ;; 562510f94802Smrg *) 562610f94802Smrg # Assume MSVC and ICC wrapper 562710f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 562810f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 562910f94802Smrg # Tell ltmain to make .lib files, not .a files. 563010f94802Smrg libext=lib 563110f94802Smrg # Tell ltmain to make .dll files, not .so files. 563210f94802Smrg shrext_cmds=.dll 563310f94802Smrg # FIXME: Setting linknames here is a bad hack. 563410f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 563510f94802Smrg # The linker will automatically build a .lib file if we build a DLL. 563610f94802Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 563710f94802Smrg # FIXME: Should let the user specify the lib program. 563810f94802Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 563910f94802Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 564010f94802Smrg ;; 564110f94802Smrg esac 564210f94802Smrg ;; 564310f94802Smrg 564410f94802Smrg darwin* | rhapsody*) 564510f94802Smrg _LT_DARWIN_LINKER_FEATURES($1) 564610f94802Smrg ;; 564710f94802Smrg 564810f94802Smrg dgux*) 564910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 565010f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 565110f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 565210f94802Smrg ;; 565310f94802Smrg 565410f94802Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 565510f94802Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 565610f94802Smrg # does not break anything, and helps significantly (at the cost of a little 565710f94802Smrg # extra space). 565810f94802Smrg freebsd2.2*) 565910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 566010f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 566110f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 566210f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 566310f94802Smrg ;; 566410f94802Smrg 566510f94802Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 566610f94802Smrg freebsd2.*) 566710f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 566810f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 566910f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 567010f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 567110f94802Smrg ;; 567210f94802Smrg 567310f94802Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 567410f94802Smrg freebsd* | dragonfly* | midnightbsd*) 567510f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 567610f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 567710f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 567810f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 567910f94802Smrg ;; 568010f94802Smrg 568110f94802Smrg hpux9*) 568210f94802Smrg if test yes = "$GCC"; then 568310f94802Smrg _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' 568410f94802Smrg else 568510f94802Smrg _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' 568610f94802Smrg fi 568710f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 568810f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 568910f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 569010f94802Smrg 569110f94802Smrg # hardcode_minus_L: Not really in the search PATH, 569210f94802Smrg # but as the default location of the library. 569310f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 569410f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 569510f94802Smrg ;; 569610f94802Smrg 569710f94802Smrg hpux10*) 569810f94802Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 569910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 570010f94802Smrg else 570110f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 570210f94802Smrg fi 570310f94802Smrg if test no = "$with_gnu_ld"; then 570410f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 570510f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 570610f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 570710f94802Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 570810f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 570910f94802Smrg # hardcode_minus_L: Not really in the search PATH, 571010f94802Smrg # but as the default location of the library. 571110f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 571210f94802Smrg fi 571310f94802Smrg ;; 571410f94802Smrg 571510f94802Smrg hpux11*) 571610f94802Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 571710f94802Smrg case $host_cpu in 571810f94802Smrg hppa*64*) 571910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 572010f94802Smrg ;; 572110f94802Smrg ia64*) 572210f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 572310f94802Smrg ;; 572410f94802Smrg *) 572510f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 572610f94802Smrg ;; 572710f94802Smrg esac 572810f94802Smrg else 572910f94802Smrg case $host_cpu in 573010f94802Smrg hppa*64*) 573110f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 573210f94802Smrg ;; 573310f94802Smrg ia64*) 573410f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 573510f94802Smrg ;; 573610f94802Smrg *) 573710f94802Smrg m4_if($1, [], [ 573810f94802Smrg # Older versions of the 11.00 compiler do not understand -b yet 573910f94802Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 574010f94802Smrg _LT_LINKER_OPTION([if $CC understands -b], 574110f94802Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 574210f94802Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 574310f94802Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 574410f94802Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 574510f94802Smrg ;; 574610f94802Smrg esac 574710f94802Smrg fi 574810f94802Smrg if test no = "$with_gnu_ld"; then 574910f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 575010f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 575110f94802Smrg 575210f94802Smrg case $host_cpu in 575310f94802Smrg hppa*64*|ia64*) 575410f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=no 575510f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 575610f94802Smrg ;; 575710f94802Smrg *) 575810f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 575910f94802Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 576010f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 576110f94802Smrg 576210f94802Smrg # hardcode_minus_L: Not really in the search PATH, 576310f94802Smrg # but as the default location of the library. 576410f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 576510f94802Smrg ;; 576610f94802Smrg esac 576710f94802Smrg fi 576810f94802Smrg ;; 576910f94802Smrg 577010f94802Smrg irix5* | irix6* | nonstopux*) 577110f94802Smrg if test yes = "$GCC"; then 577210f94802Smrg _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' 577310f94802Smrg # Try to use the -exported_symbol ld option, if it does not 577410f94802Smrg # work, assume that -exports_file does not work either and 577510f94802Smrg # implicitly export all symbols. 577610f94802Smrg # This should be the same for all languages, so no per-tag cache variable. 577710f94802Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 577810f94802Smrg [lt_cv_irix_exported_symbol], 577910f94802Smrg [save_LDFLAGS=$LDFLAGS 578010f94802Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 578110f94802Smrg AC_LINK_IFELSE( 578210f94802Smrg [AC_LANG_SOURCE( 578310f94802Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 578410f94802Smrg [C++], [[int foo (void) { return 0; }]], 578510f94802Smrg [Fortran 77], [[ 578610f94802Smrg subroutine foo 578710f94802Smrg end]], 578810f94802Smrg [Fortran], [[ 578910f94802Smrg subroutine foo 579010f94802Smrg end]])])], 579110f94802Smrg [lt_cv_irix_exported_symbol=yes], 579210f94802Smrg [lt_cv_irix_exported_symbol=no]) 579310f94802Smrg LDFLAGS=$save_LDFLAGS]) 579410f94802Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 579510f94802Smrg _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' 579610f94802Smrg fi 579710f94802Smrg else 579810f94802Smrg _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' 579910f94802Smrg _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' 580010f94802Smrg fi 580110f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 580210f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 580310f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 580410f94802Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 580510f94802Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 580610f94802Smrg ;; 580710f94802Smrg 580810f94802Smrg linux*) 580910f94802Smrg case $cc_basename in 581010f94802Smrg tcc*) 581110f94802Smrg # Fabrice Bellard et al's Tiny C Compiler 581210f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 581310f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 581410f94802Smrg ;; 581510f94802Smrg esac 581610f94802Smrg ;; 581710f94802Smrg 581810f94802Smrg netbsd*) 581910f94802Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 582010f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 582110f94802Smrg else 582210f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 582310f94802Smrg fi 582410f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 582510f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 582610f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 582710f94802Smrg ;; 582810f94802Smrg 582910f94802Smrg newsos6) 583010f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 583110f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 583210f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 583310f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 583410f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 583510f94802Smrg ;; 583610f94802Smrg 583710f94802Smrg *nto* | *qnx*) 583810f94802Smrg ;; 583910f94802Smrg 584010f94802Smrg openbsd* | bitrig*) 584110f94802Smrg if test -f /usr/libexec/ld.so; then 584210f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 584310f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 584410f94802Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 584510f94802Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 584610f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 584710f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 584810f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 584910f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 585010f94802Smrg else 585110f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 585210f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 585310f94802Smrg fi 585410f94802Smrg else 585510f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 585610f94802Smrg fi 585710f94802Smrg ;; 585810f94802Smrg 585910f94802Smrg os2*) 586010f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 586110f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 586210f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 586310f94802Smrg shrext_cmds=.dll 586410f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 586510f94802Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 586610f94802Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 586710f94802Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 586810f94802Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 586910f94802Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 587010f94802Smrg emximp -o $lib $output_objdir/$libname.def' 587110f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 587210f94802Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 587310f94802Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 587410f94802Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 587510f94802Smrg prefix_cmds="$SED"~ 587610f94802Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 587710f94802Smrg prefix_cmds="$prefix_cmds -e 1d"; 587810f94802Smrg fi~ 587910f94802Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 588010f94802Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 588110f94802Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 588210f94802Smrg emximp -o $lib $output_objdir/$libname.def' 588310f94802Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 588410f94802Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 588510f94802Smrg _LT_TAGVAR(file_list_spec, $1)='@' 588610f94802Smrg ;; 588710f94802Smrg 588810f94802Smrg osf3*) 588910f94802Smrg if test yes = "$GCC"; then 589010f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 589110f94802Smrg _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' 589210f94802Smrg else 589310f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 589410f94802Smrg _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' 589510f94802Smrg fi 589610f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 589710f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 589810f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 589910f94802Smrg ;; 590010f94802Smrg 590110f94802Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 590210f94802Smrg if test yes = "$GCC"; then 590310f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 590410f94802Smrg _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' 590510f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 590610f94802Smrg else 590710f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 590810f94802Smrg _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' 590910f94802Smrg _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~ 591010f94802Smrg $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' 591110f94802Smrg 591210f94802Smrg # Both c and cxx compiler support -rpath directly 591310f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 591410f94802Smrg fi 591510f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 591610f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 591710f94802Smrg ;; 591810f94802Smrg 591910f94802Smrg solaris*) 592010f94802Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 592110f94802Smrg if test yes = "$GCC"; then 592210f94802Smrg wlarc='$wl' 592310f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 592410f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 592510f94802Smrg $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' 592610f94802Smrg else 592710f94802Smrg case `$CC -V 2>&1` in 592810f94802Smrg *"Compilers 5.0"*) 592910f94802Smrg wlarc='' 593010f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 593110f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 593210f94802Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 593310f94802Smrg ;; 593410f94802Smrg *) 593510f94802Smrg wlarc='$wl' 593610f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 593710f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 593810f94802Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 593910f94802Smrg ;; 594010f94802Smrg esac 594110f94802Smrg fi 594210f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 594310f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 594410f94802Smrg case $host_os in 594510f94802Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 594610f94802Smrg *) 594710f94802Smrg # The compiler driver will combine and reorder linker options, 594810f94802Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 594910f94802Smrg # but is careful enough not to reorder. 595010f94802Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 595110f94802Smrg if test yes = "$GCC"; then 595210f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 595310f94802Smrg else 595410f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 595510f94802Smrg fi 595610f94802Smrg ;; 595710f94802Smrg esac 595810f94802Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 595910f94802Smrg ;; 596010f94802Smrg 596110f94802Smrg sunos4*) 596210f94802Smrg if test sequent = "$host_vendor"; then 596310f94802Smrg # Use $CC to link under sequent, because it throws in some extra .o 596410f94802Smrg # files that make .init and .fini sections work. 596510f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 596610f94802Smrg else 596710f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 596810f94802Smrg fi 596910f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 597010f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 597110f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 597210f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 597310f94802Smrg ;; 597410f94802Smrg 597510f94802Smrg sysv4) 597610f94802Smrg case $host_vendor in 597710f94802Smrg sni) 597810f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 597910f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 598010f94802Smrg ;; 598110f94802Smrg siemens) 598210f94802Smrg ## LD is ld it makes a PLAMLIB 598310f94802Smrg ## CC just makes a GrossModule. 598410f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 598510f94802Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 598610f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=no 598710f94802Smrg ;; 598810f94802Smrg motorola) 598910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 599010f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 599110f94802Smrg ;; 599210f94802Smrg esac 599310f94802Smrg runpath_var='LD_RUN_PATH' 599410f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 599510f94802Smrg ;; 599610f94802Smrg 599710f94802Smrg sysv4.3*) 599810f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 599910f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 600010f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 600110f94802Smrg ;; 600210f94802Smrg 600310f94802Smrg sysv4*MP*) 600410f94802Smrg if test -d /usr/nec; then 600510f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 600610f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 600710f94802Smrg runpath_var=LD_RUN_PATH 600810f94802Smrg hardcode_runpath_var=yes 600910f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 601010f94802Smrg fi 601110f94802Smrg ;; 601210f94802Smrg 601310f94802Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 601410f94802Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 601510f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 601610f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 601710f94802Smrg runpath_var='LD_RUN_PATH' 601810f94802Smrg 601910f94802Smrg if test yes = "$GCC"; then 602010f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602110f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602210f94802Smrg else 602310f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602410f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602510f94802Smrg fi 602610f94802Smrg ;; 602710f94802Smrg 602810f94802Smrg sysv5* | sco3.2v5* | sco5v6*) 602910f94802Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 603010f94802Smrg # link with -lc, and that would cause any symbols used from libc to 603110f94802Smrg # always be unresolved, which means just about no library would 603210f94802Smrg # ever link correctly. If we're not using GNU ld we use -z text 603310f94802Smrg # though, which does catch some bad symbols but isn't as heavy-handed 603410f94802Smrg # as -z defs. 603510f94802Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 603610f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 603710f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 603810f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 603910f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 604010f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 604110f94802Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 604210f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 604310f94802Smrg runpath_var='LD_RUN_PATH' 604410f94802Smrg 604510f94802Smrg if test yes = "$GCC"; then 604610f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 604710f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 604810f94802Smrg else 604910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605010f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605110f94802Smrg fi 605210f94802Smrg ;; 605310f94802Smrg 605410f94802Smrg uts4*) 605510f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 605610f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 605710f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 605810f94802Smrg ;; 605910f94802Smrg 606010f94802Smrg *) 606110f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 606210f94802Smrg ;; 606310f94802Smrg esac 606410f94802Smrg 606510f94802Smrg if test sni = "$host_vendor"; then 606610f94802Smrg case $host in 606710f94802Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 606810f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 606910f94802Smrg ;; 607010f94802Smrg esac 607110f94802Smrg fi 607210f94802Smrg fi 607310f94802Smrg]) 607410f94802SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 607510f94802Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 607610f94802Smrg 607710f94802Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 607810f94802Smrg 607910f94802Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 608010f94802Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 608110f94802Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 608210f94802Smrg [The commands to extract the exported symbol list from a shared archive]) 608310f94802Smrg 608410f94802Smrg# 608510f94802Smrg# Do we need to explicitly link libc? 608610f94802Smrg# 608710f94802Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 608810f94802Smrgx|xyes) 608910f94802Smrg # Assume -lc should be added 609010f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 609110f94802Smrg 609210f94802Smrg if test yes,yes = "$GCC,$enable_shared"; then 609310f94802Smrg case $_LT_TAGVAR(archive_cmds, $1) in 609410f94802Smrg *'~'*) 609510f94802Smrg # FIXME: we may have to deal with multi-command sequences. 609610f94802Smrg ;; 609710f94802Smrg '$CC '*) 609810f94802Smrg # Test whether the compiler implicitly links with -lc since on some 609910f94802Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 610010f94802Smrg # to ld, don't add -lc before -lgcc. 610110f94802Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 610210f94802Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 610310f94802Smrg [$RM conftest* 610410f94802Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 610510f94802Smrg 610610f94802Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 610710f94802Smrg soname=conftest 610810f94802Smrg lib=conftest 610910f94802Smrg libobjs=conftest.$ac_objext 611010f94802Smrg deplibs= 611110f94802Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 611210f94802Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 611310f94802Smrg compiler_flags=-v 611410f94802Smrg linker_flags=-v 611510f94802Smrg verstring= 611610f94802Smrg output_objdir=. 611710f94802Smrg libname=conftest 611810f94802Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 611910f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 612010f94802Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 612110f94802Smrg then 612210f94802Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 612310f94802Smrg else 612410f94802Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 612510f94802Smrg fi 612610f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 612710f94802Smrg else 612810f94802Smrg cat conftest.err 1>&5 612910f94802Smrg fi 613010f94802Smrg $RM conftest* 613110f94802Smrg ]) 613210f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 613310f94802Smrg ;; 613410f94802Smrg esac 613510f94802Smrg fi 613610f94802Smrg ;; 613710f94802Smrgesac 613810f94802Smrg 613910f94802Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 614010f94802Smrg [Whether or not to add -lc for building shared libraries]) 614110f94802Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 614210f94802Smrg [enable_shared_with_static_runtimes], [0], 614310f94802Smrg [Whether or not to disallow shared libs when runtime libs are static]) 614410f94802Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 614510f94802Smrg [Compiler flag to allow reflexive dlopens]) 614610f94802Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 614710f94802Smrg [Compiler flag to generate shared objects directly from archives]) 614810f94802Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 614910f94802Smrg [Whether the compiler copes with passing no objects directly]) 615010f94802Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 615110f94802Smrg [Create an old-style archive from a shared archive]) 615210f94802Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 615310f94802Smrg [Create a temporary old-style archive to link instead of a shared archive]) 615410f94802Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 615510f94802Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 615610f94802Smrg_LT_TAGDECL([], [module_cmds], [2], 615710f94802Smrg [Commands used to build a loadable module if different from building 615810f94802Smrg a shared archive.]) 615910f94802Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 616010f94802Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 616110f94802Smrg [Whether we are building with GNU ld or not]) 616210f94802Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 616310f94802Smrg [Flag that allows shared libraries with undefined symbols to be built]) 616410f94802Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 616510f94802Smrg [Flag that enforces no undefined symbols]) 616610f94802Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 616710f94802Smrg [Flag to hardcode $libdir into a binary during linking. 616810f94802Smrg This must work even if $libdir does not exist]) 616910f94802Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 617010f94802Smrg [Whether we need a single "-rpath" flag with a separated argument]) 617110f94802Smrg_LT_TAGDECL([], [hardcode_direct], [0], 617210f94802Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 617310f94802Smrg DIR into the resulting binary]) 617410f94802Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 617510f94802Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 617610f94802Smrg DIR into the resulting binary and the resulting library dependency is 617710f94802Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 617810f94802Smrg library is relocated]) 617910f94802Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 618010f94802Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 618110f94802Smrg into the resulting binary]) 618210f94802Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 618310f94802Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 618410f94802Smrg into the resulting binary]) 618510f94802Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 618610f94802Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 618710f94802Smrg into the library and all subsequent libraries and executables linked 618810f94802Smrg against it]) 618910f94802Smrg_LT_TAGDECL([], [inherit_rpath], [0], 619010f94802Smrg [Set to yes if linker adds runtime paths of dependent libraries 619110f94802Smrg to runtime path list]) 619210f94802Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 619310f94802Smrg [Whether libtool must link a program against all its dependency libraries]) 619410f94802Smrg_LT_TAGDECL([], [always_export_symbols], [0], 619510f94802Smrg [Set to "yes" if exported symbols are required]) 619610f94802Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 619710f94802Smrg [The commands to list exported symbols]) 619810f94802Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 619910f94802Smrg [Symbols that should not be listed in the preloaded symbols]) 620010f94802Smrg_LT_TAGDECL([], [include_expsyms], [1], 620110f94802Smrg [Symbols that must always be exported]) 620210f94802Smrg_LT_TAGDECL([], [prelink_cmds], [2], 620310f94802Smrg [Commands necessary for linking programs (against libraries) with templates]) 620410f94802Smrg_LT_TAGDECL([], [postlink_cmds], [2], 620510f94802Smrg [Commands necessary for finishing linking programs]) 620610f94802Smrg_LT_TAGDECL([], [file_list_spec], [1], 620710f94802Smrg [Specify filename containing input files]) 620810f94802Smrgdnl FIXME: Not yet implemented 620910f94802Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 621010f94802Smrgdnl [Compiler flag to generate thread safe objects]) 621110f94802Smrg])# _LT_LINKER_SHLIBS 621210f94802Smrg 621310f94802Smrg 621410f94802Smrg# _LT_LANG_C_CONFIG([TAG]) 621510f94802Smrg# ------------------------ 621610f94802Smrg# Ensure that the configuration variables for a C compiler are suitably 621710f94802Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 621810f94802Smrg# the compiler configuration to 'libtool'. 621910f94802Smrgm4_defun([_LT_LANG_C_CONFIG], 622010f94802Smrg[m4_require([_LT_DECL_EGREP])dnl 622110f94802Smrglt_save_CC=$CC 622210f94802SmrgAC_LANG_PUSH(C) 622310f94802Smrg 622410f94802Smrg# Source file extension for C test sources. 622510f94802Smrgac_ext=c 622610f94802Smrg 622710f94802Smrg# Object file extension for compiled C test sources. 622810f94802Smrgobjext=o 622910f94802Smrg_LT_TAGVAR(objext, $1)=$objext 623010f94802Smrg 623110f94802Smrg# Code to be used in simple compile tests 623210f94802Smrglt_simple_compile_test_code="int some_variable = 0;" 623310f94802Smrg 623410f94802Smrg# Code to be used in simple link tests 623510f94802Smrglt_simple_link_test_code='int main(){return(0);}' 623610f94802Smrg 623710f94802Smrg_LT_TAG_COMPILER 623810f94802Smrg# Save the default compiler, since it gets overwritten when the other 623910f94802Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 624010f94802Smrgcompiler_DEFAULT=$CC 624110f94802Smrg 624210f94802Smrg# save warnings/boilerplate of simple test code 624310f94802Smrg_LT_COMPILER_BOILERPLATE 624410f94802Smrg_LT_LINKER_BOILERPLATE 624510f94802Smrg 624610f94802Smrg## CAVEAT EMPTOR: 624710f94802Smrg## There is no encapsulation within the following macros, do not change 624810f94802Smrg## the running order or otherwise move them around unless you know exactly 624910f94802Smrg## what you are doing... 625010f94802Smrgif test -n "$compiler"; then 625110f94802Smrg _LT_COMPILER_NO_RTTI($1) 625210f94802Smrg _LT_COMPILER_PIC($1) 625310f94802Smrg _LT_COMPILER_C_O($1) 625410f94802Smrg _LT_COMPILER_FILE_LOCKS($1) 625510f94802Smrg _LT_LINKER_SHLIBS($1) 625610f94802Smrg _LT_SYS_DYNAMIC_LINKER($1) 625710f94802Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 625810f94802Smrg LT_SYS_DLOPEN_SELF 625910f94802Smrg _LT_CMD_STRIPLIB 626010f94802Smrg 626110f94802Smrg # Report what library types will actually be built 626210f94802Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 626310f94802Smrg AC_MSG_RESULT([$can_build_shared]) 626410f94802Smrg 626510f94802Smrg AC_MSG_CHECKING([whether to build shared libraries]) 626610f94802Smrg test no = "$can_build_shared" && enable_shared=no 626710f94802Smrg 626810f94802Smrg # On AIX, shared libraries and static libraries use the same namespace, and 626910f94802Smrg # are all built from PIC. 627010f94802Smrg case $host_os in 627110f94802Smrg aix3*) 627210f94802Smrg test yes = "$enable_shared" && enable_static=no 627310f94802Smrg if test -n "$RANLIB"; then 627410f94802Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 627510f94802Smrg postinstall_cmds='$RANLIB $lib' 627610f94802Smrg fi 627710f94802Smrg ;; 627810f94802Smrg 627910f94802Smrg aix[[4-9]]*) 628010f94802Smrg if test ia64 != "$host_cpu"; then 628110f94802Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 628210f94802Smrg yes,aix,yes) ;; # shared object as lib.so file only 628310f94802Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 628410f94802Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 628510f94802Smrg esac 628610f94802Smrg fi 628710f94802Smrg ;; 628810f94802Smrg esac 628910f94802Smrg AC_MSG_RESULT([$enable_shared]) 629010f94802Smrg 629110f94802Smrg AC_MSG_CHECKING([whether to build static libraries]) 629210f94802Smrg # Make sure either enable_shared or enable_static is yes. 629310f94802Smrg test yes = "$enable_shared" || enable_static=yes 629410f94802Smrg AC_MSG_RESULT([$enable_static]) 629510f94802Smrg 629610f94802Smrg _LT_CONFIG($1) 629710f94802Smrgfi 629810f94802SmrgAC_LANG_POP 629910f94802SmrgCC=$lt_save_CC 630010f94802Smrg])# _LT_LANG_C_CONFIG 630110f94802Smrg 630210f94802Smrg 630310f94802Smrg# _LT_LANG_CXX_CONFIG([TAG]) 630410f94802Smrg# -------------------------- 630510f94802Smrg# Ensure that the configuration variables for a C++ compiler are suitably 630610f94802Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 630710f94802Smrg# the compiler configuration to 'libtool'. 630810f94802Smrgm4_defun([_LT_LANG_CXX_CONFIG], 630910f94802Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 631010f94802Smrgm4_require([_LT_DECL_EGREP])dnl 631110f94802Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 631210f94802Smrgif test -n "$CXX" && ( test no != "$CXX" && 631310f94802Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 631410f94802Smrg (test g++ != "$CXX"))); then 631510f94802Smrg AC_PROG_CXXCPP 631610f94802Smrgelse 631710f94802Smrg _lt_caught_CXX_error=yes 631810f94802Smrgfi 631910f94802Smrg 632010f94802SmrgAC_LANG_PUSH(C++) 632110f94802Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 632210f94802Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 632310f94802Smrg_LT_TAGVAR(always_export_symbols, $1)=no 632410f94802Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 632510f94802Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 632610f94802Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 632710f94802Smrg_LT_TAGVAR(hardcode_direct, $1)=no 632810f94802Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 632910f94802Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 633010f94802Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 633110f94802Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 633210f94802Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 633310f94802Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 633410f94802Smrg_LT_TAGVAR(inherit_rpath, $1)=no 633510f94802Smrg_LT_TAGVAR(module_cmds, $1)= 633610f94802Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 633710f94802Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 633810f94802Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 633910f94802Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 634010f94802Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 634110f94802Smrg_LT_TAGVAR(no_undefined_flag, $1)= 634210f94802Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 634310f94802Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 634410f94802Smrg 634510f94802Smrg# Source file extension for C++ test sources. 634610f94802Smrgac_ext=cpp 634710f94802Smrg 634810f94802Smrg# Object file extension for compiled C++ test sources. 634910f94802Smrgobjext=o 635010f94802Smrg_LT_TAGVAR(objext, $1)=$objext 635110f94802Smrg 635210f94802Smrg# No sense in running all these tests if we already determined that 635310f94802Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 635410f94802Smrg# are currently assumed to apply to all compilers on this platform, 635510f94802Smrg# and will be corrupted by setting them based on a non-working compiler. 635610f94802Smrgif test yes != "$_lt_caught_CXX_error"; then 635710f94802Smrg # Code to be used in simple compile tests 635810f94802Smrg lt_simple_compile_test_code="int some_variable = 0;" 635910f94802Smrg 636010f94802Smrg # Code to be used in simple link tests 636110f94802Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 636210f94802Smrg 636310f94802Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 636410f94802Smrg _LT_TAG_COMPILER 636510f94802Smrg 636610f94802Smrg # save warnings/boilerplate of simple test code 636710f94802Smrg _LT_COMPILER_BOILERPLATE 636810f94802Smrg _LT_LINKER_BOILERPLATE 636910f94802Smrg 637010f94802Smrg # Allow CC to be a program name with arguments. 637110f94802Smrg lt_save_CC=$CC 637210f94802Smrg lt_save_CFLAGS=$CFLAGS 637310f94802Smrg lt_save_LD=$LD 637410f94802Smrg lt_save_GCC=$GCC 637510f94802Smrg GCC=$GXX 637610f94802Smrg lt_save_with_gnu_ld=$with_gnu_ld 637710f94802Smrg lt_save_path_LD=$lt_cv_path_LD 637810f94802Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 637910f94802Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 638010f94802Smrg else 638110f94802Smrg $as_unset lt_cv_prog_gnu_ld 638210f94802Smrg fi 638310f94802Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 638410f94802Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 638510f94802Smrg else 638610f94802Smrg $as_unset lt_cv_path_LD 638710f94802Smrg fi 638810f94802Smrg test -z "${LDCXX+set}" || LD=$LDCXX 638910f94802Smrg CC=${CXX-"c++"} 639010f94802Smrg CFLAGS=$CXXFLAGS 639110f94802Smrg compiler=$CC 639210f94802Smrg _LT_TAGVAR(compiler, $1)=$CC 639310f94802Smrg _LT_CC_BASENAME([$compiler]) 639410f94802Smrg 639510f94802Smrg if test -n "$compiler"; then 639610f94802Smrg # We don't want -fno-exception when compiling C++ code, so set the 639710f94802Smrg # no_builtin_flag separately 639810f94802Smrg if test yes = "$GXX"; then 639910f94802Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 640010f94802Smrg else 640110f94802Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 640210f94802Smrg fi 640310f94802Smrg 640410f94802Smrg if test yes = "$GXX"; then 640510f94802Smrg # Set up default GNU C++ configuration 640610f94802Smrg 640710f94802Smrg LT_PATH_LD 640810f94802Smrg 640910f94802Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 641010f94802Smrg # archiving commands below assume that GNU ld is being used. 641110f94802Smrg if test yes = "$with_gnu_ld"; then 641210f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 641310f94802Smrg _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' 641410f94802Smrg 641510f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 641610f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 641710f94802Smrg 641810f94802Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 641910f94802Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 642010f94802Smrg # investigate it a little bit more. (MM) 642110f94802Smrg wlarc='$wl' 642210f94802Smrg 642310f94802Smrg # ancient GNU ld didn't support --whole-archive et. al. 642410f94802Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 642510f94802Smrg $GREP 'no-whole-archive' > /dev/null; then 642610f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 642710f94802Smrg else 642810f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 642910f94802Smrg fi 643010f94802Smrg else 643110f94802Smrg with_gnu_ld=no 643210f94802Smrg wlarc= 643310f94802Smrg 643410f94802Smrg # A generic and very simple default shared library creation 643510f94802Smrg # command for GNU C++ for the case where it uses the native 643610f94802Smrg # linker, instead of GNU ld. If possible, this setting should 643710f94802Smrg # overridden to take advantage of the native linker features on 643810f94802Smrg # the platform it is being used on. 643910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 644010f94802Smrg fi 644110f94802Smrg 644210f94802Smrg # Commands to make compiler produce verbose output that lists 644310f94802Smrg # what "hidden" libraries, object files and flags are used when 644410f94802Smrg # linking a shared library. 644510f94802Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 644610f94802Smrg 644710f94802Smrg else 644810f94802Smrg GXX=no 644910f94802Smrg with_gnu_ld=no 645010f94802Smrg wlarc= 645110f94802Smrg fi 645210f94802Smrg 645310f94802Smrg # PORTME: fill in a description of your system's C++ link characteristics 645410f94802Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 645510f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 645610f94802Smrg case $host_os in 645710f94802Smrg aix3*) 645810f94802Smrg # FIXME: insert proper C++ library support 645910f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 646010f94802Smrg ;; 646110f94802Smrg aix[[4-9]]*) 646210f94802Smrg if test ia64 = "$host_cpu"; then 646310f94802Smrg # On IA64, the linker does run time linking by default, so we don't 646410f94802Smrg # have to do anything special. 646510f94802Smrg aix_use_runtimelinking=no 646610f94802Smrg exp_sym_flag='-Bexport' 646710f94802Smrg no_entry_flag= 646810f94802Smrg else 646910f94802Smrg aix_use_runtimelinking=no 647010f94802Smrg 647110f94802Smrg # Test if we are trying to use run time linking or normal 647210f94802Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 647310f94802Smrg # have runtime linking enabled, and use it for executables. 647410f94802Smrg # For shared libraries, we enable/disable runtime linking 647510f94802Smrg # depending on the kind of the shared library created - 647610f94802Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 647710f94802Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 647810f94802Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 647910f94802Smrg # lib.a static archive 648010f94802Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 648110f94802Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 648210f94802Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 648310f94802Smrg # lib.a(lib.so.V) shared, rtl:no 648410f94802Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 648510f94802Smrg # lib.a static archive 648610f94802Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 648710f94802Smrg for ld_flag in $LDFLAGS; do 648810f94802Smrg case $ld_flag in 648910f94802Smrg *-brtl*) 649010f94802Smrg aix_use_runtimelinking=yes 649110f94802Smrg break 649210f94802Smrg ;; 649310f94802Smrg esac 649410f94802Smrg done 649510f94802Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 649610f94802Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 649710f94802Smrg # so we don't have lib.a shared libs to link our executables. 649810f94802Smrg # We have to force runtime linking in this case. 649910f94802Smrg aix_use_runtimelinking=yes 650010f94802Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 650110f94802Smrg fi 650210f94802Smrg ;; 650310f94802Smrg esac 650410f94802Smrg 650510f94802Smrg exp_sym_flag='-bexport' 650610f94802Smrg no_entry_flag='-bnoentry' 650710f94802Smrg fi 650810f94802Smrg 650910f94802Smrg # When large executables or shared objects are built, AIX ld can 651010f94802Smrg # have problems creating the table of contents. If linking a library 651110f94802Smrg # or program results in "error TOC overflow" add -mminimal-toc to 651210f94802Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 651310f94802Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 651410f94802Smrg 651510f94802Smrg _LT_TAGVAR(archive_cmds, $1)='' 651610f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 651710f94802Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 651810f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 651910f94802Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 652010f94802Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 652110f94802Smrg case $with_aix_soname,$aix_use_runtimelinking in 652210f94802Smrg aix,*) ;; # no import file 652310f94802Smrg svr4,* | *,yes) # use import file 652410f94802Smrg # The Import File defines what to hardcode. 652510f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=no 652610f94802Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 652710f94802Smrg ;; 652810f94802Smrg esac 652910f94802Smrg 653010f94802Smrg if test yes = "$GXX"; then 653110f94802Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 653210f94802Smrg # We only want to do this on AIX 4.2 and lower, the check 653310f94802Smrg # below for broken collect2 doesn't work under 4.3+ 653410f94802Smrg collect2name=`$CC -print-prog-name=collect2` 653510f94802Smrg if test -f "$collect2name" && 653610f94802Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 653710f94802Smrg then 653810f94802Smrg # We have reworked collect2 653910f94802Smrg : 654010f94802Smrg else 654110f94802Smrg # We have old collect2 654210f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 654310f94802Smrg # It fails to find uninstalled libraries when the uninstalled 654410f94802Smrg # path is not listed in the libpath. Setting hardcode_minus_L 654510f94802Smrg # to unsupported forces relinking 654610f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 654710f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 654810f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 654910f94802Smrg fi 655010f94802Smrg esac 655110f94802Smrg shared_flag='-shared' 655210f94802Smrg if test yes = "$aix_use_runtimelinking"; then 655310f94802Smrg shared_flag=$shared_flag' $wl-G' 655410f94802Smrg fi 655510f94802Smrg # Need to ensure runtime linking is disabled for the traditional 655610f94802Smrg # shared library, or the linker may eventually find shared libraries 655710f94802Smrg # /with/ Import File - we do not want to mix them. 655810f94802Smrg shared_flag_aix='-shared' 655910f94802Smrg shared_flag_svr4='-shared $wl-G' 656010f94802Smrg else 656110f94802Smrg # not using gcc 656210f94802Smrg if test ia64 = "$host_cpu"; then 656310f94802Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 656410f94802Smrg # chokes on -Wl,-G. The following line is correct: 656510f94802Smrg shared_flag='-G' 656610f94802Smrg else 656710f94802Smrg if test yes = "$aix_use_runtimelinking"; then 656810f94802Smrg shared_flag='$wl-G' 656910f94802Smrg else 657010f94802Smrg shared_flag='$wl-bM:SRE' 657110f94802Smrg fi 657210f94802Smrg shared_flag_aix='$wl-bM:SRE' 657310f94802Smrg shared_flag_svr4='$wl-G' 657410f94802Smrg fi 657510f94802Smrg fi 657610f94802Smrg 657710f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 657810f94802Smrg # It seems that -bexpall does not export symbols beginning with 657910f94802Smrg # underscore (_), so it is better to generate a list of symbols to 658010f94802Smrg # export. 658110f94802Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 658210f94802Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 658310f94802Smrg # Warning - without using the other runtime loading flags (-brtl), 658410f94802Smrg # -berok will link without error, but may produce a broken library. 658510f94802Smrg # The "-G" linker flag allows undefined symbols. 658610f94802Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 658710f94802Smrg # Determine the default libpath from the value encoded in an empty 658810f94802Smrg # executable. 658910f94802Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 659010f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 659110f94802Smrg 659210f94802Smrg _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 659310f94802Smrg else 659410f94802Smrg if test ia64 = "$host_cpu"; then 659510f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 659610f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 659710f94802Smrg _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" 659810f94802Smrg else 659910f94802Smrg # Determine the default libpath from the value encoded in an 660010f94802Smrg # empty executable. 660110f94802Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 660210f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 660310f94802Smrg # Warning - without using the other run time loading flags, 660410f94802Smrg # -berok will link without error, but may produce a broken library. 660510f94802Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 660610f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 660710f94802Smrg if test yes = "$with_gnu_ld"; then 660810f94802Smrg # We only use this code for GNU lds that support --whole-archive. 660910f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 661010f94802Smrg else 661110f94802Smrg # Exported symbols can be pulled into shared objects from archives 661210f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 661310f94802Smrg fi 661410f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 661510f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 661610f94802Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 661710f94802Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 661810f94802Smrg if test svr4 != "$with_aix_soname"; then 661910f94802Smrg # This is similar to how AIX traditionally builds its shared 662010f94802Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 662110f94802Smrg _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' 662210f94802Smrg fi 662310f94802Smrg if test aix != "$with_aix_soname"; then 662410f94802Smrg _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' 662510f94802Smrg else 662610f94802Smrg # used by -dlpreopen to get the symbols 662710f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 662810f94802Smrg fi 662910f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 663010f94802Smrg fi 663110f94802Smrg fi 663210f94802Smrg ;; 663310f94802Smrg 663410f94802Smrg beos*) 663510f94802Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 663610f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 663710f94802Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 663810f94802Smrg # support --undefined. This deserves some investigation. FIXME 663910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 664010f94802Smrg else 664110f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 664210f94802Smrg fi 664310f94802Smrg ;; 664410f94802Smrg 664510f94802Smrg chorus*) 664610f94802Smrg case $cc_basename in 664710f94802Smrg *) 664810f94802Smrg # FIXME: insert proper C++ library support 664910f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 665010f94802Smrg ;; 665110f94802Smrg esac 665210f94802Smrg ;; 665310f94802Smrg 665410f94802Smrg cygwin* | mingw* | pw32* | cegcc*) 665510f94802Smrg case $GXX,$cc_basename in 665610f94802Smrg ,cl* | no,cl* | ,icl* | no,icl*) 665710f94802Smrg # Native MSVC or ICC 665810f94802Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 665910f94802Smrg # no search path for DLLs. 666010f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 666110f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 666210f94802Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 666310f94802Smrg _LT_TAGVAR(file_list_spec, $1)='@' 666410f94802Smrg # Tell ltmain to make .lib files, not .a files. 666510f94802Smrg libext=lib 666610f94802Smrg # Tell ltmain to make .dll files, not .so files. 666710f94802Smrg shrext_cmds=.dll 666810f94802Smrg # FIXME: Setting linknames here is a bad hack. 666910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 667010f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 667110f94802Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 667210f94802Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 667310f94802Smrg else 667410f94802Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 667510f94802Smrg fi~ 667610f94802Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 667710f94802Smrg linknames=' 667810f94802Smrg # The linker will not automatically build a static lib if we build a DLL. 667910f94802Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 668010f94802Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 668110f94802Smrg # Don't use ranlib 668210f94802Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 668310f94802Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 668410f94802Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 668510f94802Smrg case $lt_outputfile in 668610f94802Smrg *.exe|*.EXE) ;; 668710f94802Smrg *) 668810f94802Smrg lt_outputfile=$lt_outputfile.exe 668910f94802Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 669010f94802Smrg ;; 669110f94802Smrg esac~ 669210f94802Smrg func_to_tool_file "$lt_outputfile"~ 669310f94802Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 669410f94802Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 669510f94802Smrg $RM "$lt_outputfile.manifest"; 669610f94802Smrg fi' 669710f94802Smrg ;; 669810f94802Smrg *) 669910f94802Smrg # g++ 670010f94802Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 670110f94802Smrg # as there is no search path for DLLs. 670210f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 670310f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 670410f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 670510f94802Smrg _LT_TAGVAR(always_export_symbols, $1)=no 670610f94802Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 670710f94802Smrg 670810f94802Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 670910f94802Smrg _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' 671010f94802Smrg # If the export-symbols file already is a .def file, use it as 671110f94802Smrg # is; otherwise, prepend EXPORTS... 671210f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 671310f94802Smrg cp $export_symbols $output_objdir/$soname.def; 671410f94802Smrg else 671510f94802Smrg echo EXPORTS > $output_objdir/$soname.def; 671610f94802Smrg cat $export_symbols >> $output_objdir/$soname.def; 671710f94802Smrg fi~ 671810f94802Smrg $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' 671910f94802Smrg else 672010f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 672110f94802Smrg fi 672210f94802Smrg ;; 672310f94802Smrg esac 672410f94802Smrg ;; 672510f94802Smrg darwin* | rhapsody*) 672610f94802Smrg _LT_DARWIN_LINKER_FEATURES($1) 672710f94802Smrg ;; 672810f94802Smrg 672910f94802Smrg os2*) 673010f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 673110f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 673210f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 673310f94802Smrg shrext_cmds=.dll 673410f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 673510f94802Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 673610f94802Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 673710f94802Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 673810f94802Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 673910f94802Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 674010f94802Smrg emximp -o $lib $output_objdir/$libname.def' 674110f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 674210f94802Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 674310f94802Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 674410f94802Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 674510f94802Smrg prefix_cmds="$SED"~ 674610f94802Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 674710f94802Smrg prefix_cmds="$prefix_cmds -e 1d"; 674810f94802Smrg fi~ 674910f94802Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 675010f94802Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 675110f94802Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 675210f94802Smrg emximp -o $lib $output_objdir/$libname.def' 675310f94802Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 675410f94802Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 675510f94802Smrg _LT_TAGVAR(file_list_spec, $1)='@' 675610f94802Smrg ;; 675710f94802Smrg 675810f94802Smrg dgux*) 675910f94802Smrg case $cc_basename in 676010f94802Smrg ec++*) 676110f94802Smrg # FIXME: insert proper C++ library support 676210f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 676310f94802Smrg ;; 676410f94802Smrg ghcx*) 676510f94802Smrg # Green Hills C++ Compiler 676610f94802Smrg # FIXME: insert proper C++ library support 676710f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 676810f94802Smrg ;; 676910f94802Smrg *) 677010f94802Smrg # FIXME: insert proper C++ library support 677110f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 677210f94802Smrg ;; 677310f94802Smrg esac 677410f94802Smrg ;; 677510f94802Smrg 677610f94802Smrg freebsd2.*) 677710f94802Smrg # C++ shared libraries reported to be fairly broken before 677810f94802Smrg # switch to ELF 677910f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 678010f94802Smrg ;; 678110f94802Smrg 678210f94802Smrg freebsd-elf*) 678310f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 678410f94802Smrg ;; 678510f94802Smrg 678610f94802Smrg freebsd* | dragonfly* | midnightbsd*) 678710f94802Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 678810f94802Smrg # conventions 678910f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 679010f94802Smrg ;; 679110f94802Smrg 679210f94802Smrg haiku*) 679310f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 679410f94802Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 679510f94802Smrg ;; 679610f94802Smrg 679710f94802Smrg hpux9*) 679810f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 679910f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 680010f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 680110f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 680210f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 680310f94802Smrg # but as the default 680410f94802Smrg # location of the library. 680510f94802Smrg 680610f94802Smrg case $cc_basename in 680710f94802Smrg CC*) 680810f94802Smrg # FIXME: insert proper C++ library support 680910f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 681010f94802Smrg ;; 681110f94802Smrg aCC*) 681210f94802Smrg _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' 681310f94802Smrg # Commands to make compiler produce verbose output that lists 681410f94802Smrg # what "hidden" libraries, object files and flags are used when 681510f94802Smrg # linking a shared library. 681610f94802Smrg # 681710f94802Smrg # There doesn't appear to be a way to prevent this compiler from 681810f94802Smrg # explicitly linking system object files so we need to strip them 681910f94802Smrg # from the output so that they don't get included in the library 682010f94802Smrg # dependencies. 682110f94802Smrg 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"' 682210f94802Smrg ;; 682310f94802Smrg *) 682410f94802Smrg if test yes = "$GXX"; then 682510f94802Smrg _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' 682610f94802Smrg else 682710f94802Smrg # FIXME: insert proper C++ library support 682810f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 682910f94802Smrg fi 683010f94802Smrg ;; 683110f94802Smrg esac 683210f94802Smrg ;; 683310f94802Smrg 683410f94802Smrg hpux10*|hpux11*) 683510f94802Smrg if test no = "$with_gnu_ld"; then 683610f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 683710f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 683810f94802Smrg 683910f94802Smrg case $host_cpu in 684010f94802Smrg hppa*64*|ia64*) 684110f94802Smrg ;; 684210f94802Smrg *) 684310f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 684410f94802Smrg ;; 684510f94802Smrg esac 684610f94802Smrg fi 684710f94802Smrg case $host_cpu in 684810f94802Smrg hppa*64*|ia64*) 684910f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=no 685010f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 685110f94802Smrg ;; 685210f94802Smrg *) 685310f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 685410f94802Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 685510f94802Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 685610f94802Smrg # but as the default 685710f94802Smrg # location of the library. 685810f94802Smrg ;; 685910f94802Smrg esac 686010f94802Smrg 686110f94802Smrg case $cc_basename in 686210f94802Smrg CC*) 686310f94802Smrg # FIXME: insert proper C++ library support 686410f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 686510f94802Smrg ;; 686610f94802Smrg aCC*) 686710f94802Smrg case $host_cpu in 686810f94802Smrg hppa*64*) 686910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 687010f94802Smrg ;; 687110f94802Smrg ia64*) 687210f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 687310f94802Smrg ;; 687410f94802Smrg *) 687510f94802Smrg _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' 687610f94802Smrg ;; 687710f94802Smrg esac 687810f94802Smrg # Commands to make compiler produce verbose output that lists 687910f94802Smrg # what "hidden" libraries, object files and flags are used when 688010f94802Smrg # linking a shared library. 688110f94802Smrg # 688210f94802Smrg # There doesn't appear to be a way to prevent this compiler from 688310f94802Smrg # explicitly linking system object files so we need to strip them 688410f94802Smrg # from the output so that they don't get included in the library 688510f94802Smrg # dependencies. 688610f94802Smrg 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"' 688710f94802Smrg ;; 688810f94802Smrg *) 688910f94802Smrg if test yes = "$GXX"; then 689010f94802Smrg if test no = "$with_gnu_ld"; then 689110f94802Smrg case $host_cpu in 689210f94802Smrg hppa*64*) 689310f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 689410f94802Smrg ;; 689510f94802Smrg ia64*) 689610f94802Smrg _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' 689710f94802Smrg ;; 689810f94802Smrg *) 689910f94802Smrg _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' 690010f94802Smrg ;; 690110f94802Smrg esac 690210f94802Smrg fi 690310f94802Smrg else 690410f94802Smrg # FIXME: insert proper C++ library support 690510f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 690610f94802Smrg fi 690710f94802Smrg ;; 690810f94802Smrg esac 690910f94802Smrg ;; 691010f94802Smrg 691110f94802Smrg interix[[3-9]]*) 691210f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=no 691310f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 691410f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 691510f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 691610f94802Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 691710f94802Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 691810f94802Smrg # default) and relocated if they conflict, which is a slow very memory 691910f94802Smrg # consuming and fragmenting process. To avoid this, we pick a random, 692010f94802Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 692110f94802Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 692210f94802Smrg _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' 692310f94802Smrg _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' 692410f94802Smrg ;; 692510f94802Smrg irix5* | irix6*) 692610f94802Smrg case $cc_basename in 692710f94802Smrg CC*) 692810f94802Smrg # SGI C++ 692910f94802Smrg _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' 693010f94802Smrg 693110f94802Smrg # Archives containing C++ object files must be created using 693210f94802Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 693310f94802Smrg # necessary to make sure instantiated templates are included 693410f94802Smrg # in the archive. 693510f94802Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 693610f94802Smrg ;; 693710f94802Smrg *) 693810f94802Smrg if test yes = "$GXX"; then 693910f94802Smrg if test no = "$with_gnu_ld"; then 694010f94802Smrg _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' 694110f94802Smrg else 694210f94802Smrg _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' 694310f94802Smrg fi 694410f94802Smrg fi 694510f94802Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 694610f94802Smrg ;; 694710f94802Smrg esac 694810f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 694910f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 695010f94802Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 695110f94802Smrg ;; 695210f94802Smrg 695310f94802Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 695410f94802Smrg case $cc_basename in 695510f94802Smrg KCC*) 695610f94802Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 695710f94802Smrg 695810f94802Smrg # KCC will only create a shared library if the output file 695910f94802Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 696010f94802Smrg # to its proper name (with version) after linking. 696110f94802Smrg _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' 696210f94802Smrg _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' 696310f94802Smrg # Commands to make compiler produce verbose output that lists 696410f94802Smrg # what "hidden" libraries, object files and flags are used when 696510f94802Smrg # linking a shared library. 696610f94802Smrg # 696710f94802Smrg # There doesn't appear to be a way to prevent this compiler from 696810f94802Smrg # explicitly linking system object files so we need to strip them 696910f94802Smrg # from the output so that they don't get included in the library 697010f94802Smrg # dependencies. 697110f94802Smrg 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"' 697210f94802Smrg 697310f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 697410f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 697510f94802Smrg 697610f94802Smrg # Archives containing C++ object files must be created using 697710f94802Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 697810f94802Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 697910f94802Smrg ;; 698010f94802Smrg icpc* | ecpc* ) 698110f94802Smrg # Intel C++ 698210f94802Smrg with_gnu_ld=yes 698310f94802Smrg # version 8.0 and above of icpc choke on multiply defined symbols 698410f94802Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 698510f94802Smrg # earlier do not add the objects themselves. 698610f94802Smrg case `$CC -V 2>&1` in 698710f94802Smrg *"Version 7."*) 698810f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 698910f94802Smrg _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' 699010f94802Smrg ;; 699110f94802Smrg *) # Version 8.0 or newer 699210f94802Smrg tmp_idyn= 699310f94802Smrg case $host_cpu in 699410f94802Smrg ia64*) tmp_idyn=' -i_dynamic';; 699510f94802Smrg esac 699610f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 699710f94802Smrg _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' 699810f94802Smrg ;; 699910f94802Smrg esac 700010f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 700110f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 700210f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 700310f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 700410f94802Smrg ;; 700510f94802Smrg pgCC* | pgcpp*) 700610f94802Smrg # Portland Group C++ compiler 700710f94802Smrg case `$CC -V` in 700810f94802Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 700910f94802Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 701010f94802Smrg rm -rf $tpldir~ 701110f94802Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 701210f94802Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 701310f94802Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 701410f94802Smrg rm -rf $tpldir~ 701510f94802Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 701610f94802Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 701710f94802Smrg $RANLIB $oldlib' 701810f94802Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 701910f94802Smrg rm -rf $tpldir~ 702010f94802Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 702110f94802Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 702210f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 702310f94802Smrg rm -rf $tpldir~ 702410f94802Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 702510f94802Smrg $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' 702610f94802Smrg ;; 702710f94802Smrg *) # Version 6 and above use weak symbols 702810f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 702910f94802Smrg _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' 703010f94802Smrg ;; 703110f94802Smrg esac 703210f94802Smrg 703310f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 703410f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 703510f94802Smrg _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' 703610f94802Smrg ;; 703710f94802Smrg cxx*) 703810f94802Smrg # Compaq C++ 703910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 704010f94802Smrg _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' 704110f94802Smrg 704210f94802Smrg runpath_var=LD_RUN_PATH 704310f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 704410f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 704510f94802Smrg 704610f94802Smrg # Commands to make compiler produce verbose output that lists 704710f94802Smrg # what "hidden" libraries, object files and flags are used when 704810f94802Smrg # linking a shared library. 704910f94802Smrg # 705010f94802Smrg # There doesn't appear to be a way to prevent this compiler from 705110f94802Smrg # explicitly linking system object files so we need to strip them 705210f94802Smrg # from the output so that they don't get included in the library 705310f94802Smrg # dependencies. 705410f94802Smrg 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' 705510f94802Smrg ;; 705610f94802Smrg xl* | mpixl* | bgxl*) 705710f94802Smrg # IBM XL 8.0 on PPC, with GNU ld 705810f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 705910f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 706010f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 706110f94802Smrg if test yes = "$supports_anon_versioning"; then 706210f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 706310f94802Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 706410f94802Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 706510f94802Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 706610f94802Smrg fi 706710f94802Smrg ;; 706810f94802Smrg *) 706910f94802Smrg case `$CC -V 2>&1 | $SED 5q` in 707010f94802Smrg *Sun\ C*) 707110f94802Smrg # Sun C++ 5.9 707210f94802Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 707310f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 707410f94802Smrg _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' 707510f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 707610f94802Smrg _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' 707710f94802Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 707810f94802Smrg 707910f94802Smrg # Not sure whether something based on 708010f94802Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 708110f94802Smrg # would be better. 708210f94802Smrg output_verbose_link_cmd='func_echo_all' 708310f94802Smrg 708410f94802Smrg # Archives containing C++ object files must be created using 708510f94802Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 708610f94802Smrg # necessary to make sure instantiated templates are included 708710f94802Smrg # in the archive. 708810f94802Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 708910f94802Smrg ;; 709010f94802Smrg esac 709110f94802Smrg ;; 709210f94802Smrg esac 709310f94802Smrg ;; 709410f94802Smrg 709510f94802Smrg lynxos*) 709610f94802Smrg # FIXME: insert proper C++ library support 709710f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 709810f94802Smrg ;; 709910f94802Smrg 710010f94802Smrg m88k*) 710110f94802Smrg # FIXME: insert proper C++ library support 710210f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 710310f94802Smrg ;; 710410f94802Smrg 710510f94802Smrg mvs*) 710610f94802Smrg case $cc_basename in 710710f94802Smrg cxx*) 710810f94802Smrg # FIXME: insert proper C++ library support 710910f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 711010f94802Smrg ;; 711110f94802Smrg *) 711210f94802Smrg # FIXME: insert proper C++ library support 711310f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 711410f94802Smrg ;; 711510f94802Smrg esac 711610f94802Smrg ;; 711710f94802Smrg 711810f94802Smrg netbsd*) 711910f94802Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 712010f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 712110f94802Smrg wlarc= 712210f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 712310f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 712410f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 712510f94802Smrg fi 712610f94802Smrg # Workaround some broken pre-1.5 toolchains 712710f94802Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 712810f94802Smrg ;; 712910f94802Smrg 713010f94802Smrg *nto* | *qnx*) 713110f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 713210f94802Smrg ;; 713310f94802Smrg 713410f94802Smrg openbsd* | bitrig*) 713510f94802Smrg if test -f /usr/libexec/ld.so; then 713610f94802Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 713710f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 713810f94802Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 713910f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 714010f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 714110f94802Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 714210f94802Smrg _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' 714310f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 714410f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 714510f94802Smrg fi 714610f94802Smrg output_verbose_link_cmd=func_echo_all 714710f94802Smrg else 714810f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 714910f94802Smrg fi 715010f94802Smrg ;; 715110f94802Smrg 715210f94802Smrg osf3* | osf4* | osf5*) 715310f94802Smrg case $cc_basename in 715410f94802Smrg KCC*) 715510f94802Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 715610f94802Smrg 715710f94802Smrg # KCC will only create a shared library if the output file 715810f94802Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 715910f94802Smrg # to its proper name (with version) after linking. 716010f94802Smrg _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' 716110f94802Smrg 716210f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 716310f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 716410f94802Smrg 716510f94802Smrg # Archives containing C++ object files must be created using 716610f94802Smrg # the KAI C++ compiler. 716710f94802Smrg case $host in 716810f94802Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 716910f94802Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 717010f94802Smrg esac 717110f94802Smrg ;; 717210f94802Smrg RCC*) 717310f94802Smrg # Rational C++ 2.4.1 717410f94802Smrg # FIXME: insert proper C++ library support 717510f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 717610f94802Smrg ;; 717710f94802Smrg cxx*) 717810f94802Smrg case $host in 717910f94802Smrg osf3*) 718010f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 718110f94802Smrg _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' 718210f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 718310f94802Smrg ;; 718410f94802Smrg *) 718510f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 718610f94802Smrg _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' 718710f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 718810f94802Smrg echo "-hidden">> $lib.exp~ 718910f94802Smrg $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~ 719010f94802Smrg $RM $lib.exp' 719110f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 719210f94802Smrg ;; 719310f94802Smrg esac 719410f94802Smrg 719510f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 719610f94802Smrg 719710f94802Smrg # Commands to make compiler produce verbose output that lists 719810f94802Smrg # what "hidden" libraries, object files and flags are used when 719910f94802Smrg # linking a shared library. 720010f94802Smrg # 720110f94802Smrg # There doesn't appear to be a way to prevent this compiler from 720210f94802Smrg # explicitly linking system object files so we need to strip them 720310f94802Smrg # from the output so that they don't get included in the library 720410f94802Smrg # dependencies. 720510f94802Smrg 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"' 720610f94802Smrg ;; 720710f94802Smrg *) 720810f94802Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 720910f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 721010f94802Smrg case $host in 721110f94802Smrg osf3*) 721210f94802Smrg _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' 721310f94802Smrg ;; 721410f94802Smrg *) 721510f94802Smrg _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' 721610f94802Smrg ;; 721710f94802Smrg esac 721810f94802Smrg 721910f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 722010f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 722110f94802Smrg 722210f94802Smrg # Commands to make compiler produce verbose output that lists 722310f94802Smrg # what "hidden" libraries, object files and flags are used when 722410f94802Smrg # linking a shared library. 722510f94802Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 722610f94802Smrg 722710f94802Smrg else 722810f94802Smrg # FIXME: insert proper C++ library support 722910f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 723010f94802Smrg fi 723110f94802Smrg ;; 723210f94802Smrg esac 723310f94802Smrg ;; 723410f94802Smrg 723510f94802Smrg psos*) 723610f94802Smrg # FIXME: insert proper C++ library support 723710f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 723810f94802Smrg ;; 723910f94802Smrg 724010f94802Smrg sunos4*) 724110f94802Smrg case $cc_basename in 724210f94802Smrg CC*) 724310f94802Smrg # Sun C++ 4.x 724410f94802Smrg # FIXME: insert proper C++ library support 724510f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 724610f94802Smrg ;; 724710f94802Smrg lcc*) 724810f94802Smrg # Lucid 724910f94802Smrg # FIXME: insert proper C++ library support 725010f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 725110f94802Smrg ;; 725210f94802Smrg *) 725310f94802Smrg # FIXME: insert proper C++ library support 725410f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 725510f94802Smrg ;; 725610f94802Smrg esac 725710f94802Smrg ;; 725810f94802Smrg 725910f94802Smrg solaris*) 726010f94802Smrg case $cc_basename in 726110f94802Smrg CC* | sunCC*) 726210f94802Smrg # Sun C++ 4.2, 5.x and Centerline C++ 726310f94802Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 726410f94802Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 726510f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 726610f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 726710f94802Smrg $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' 726810f94802Smrg 726910f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 727010f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 727110f94802Smrg case $host_os in 727210f94802Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 727310f94802Smrg *) 727410f94802Smrg # The compiler driver will combine and reorder linker options, 727510f94802Smrg # but understands '-z linker_flag'. 727610f94802Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 727710f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 727810f94802Smrg ;; 727910f94802Smrg esac 728010f94802Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 728110f94802Smrg 728210f94802Smrg output_verbose_link_cmd='func_echo_all' 728310f94802Smrg 728410f94802Smrg # Archives containing C++ object files must be created using 728510f94802Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 728610f94802Smrg # necessary to make sure instantiated templates are included 728710f94802Smrg # in the archive. 728810f94802Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 728910f94802Smrg ;; 729010f94802Smrg gcx*) 729110f94802Smrg # Green Hills C++ Compiler 729210f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 729310f94802Smrg 729410f94802Smrg # The C++ compiler must be used to create the archive. 729510f94802Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 729610f94802Smrg ;; 729710f94802Smrg *) 729810f94802Smrg # GNU C++ compiler with Solaris linker 729910f94802Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 730010f94802Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 730110f94802Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 730210f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 730310f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 730410f94802Smrg $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' 730510f94802Smrg 730610f94802Smrg # Commands to make compiler produce verbose output that lists 730710f94802Smrg # what "hidden" libraries, object files and flags are used when 730810f94802Smrg # linking a shared library. 730910f94802Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 731010f94802Smrg else 731110f94802Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 731210f94802Smrg # platform. 731310f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 731410f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 731510f94802Smrg $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' 731610f94802Smrg 731710f94802Smrg # Commands to make compiler produce verbose output that lists 731810f94802Smrg # what "hidden" libraries, object files and flags are used when 731910f94802Smrg # linking a shared library. 732010f94802Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 732110f94802Smrg fi 732210f94802Smrg 732310f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 732410f94802Smrg case $host_os in 732510f94802Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 732610f94802Smrg *) 732710f94802Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 732810f94802Smrg ;; 732910f94802Smrg esac 733010f94802Smrg fi 733110f94802Smrg ;; 733210f94802Smrg esac 733310f94802Smrg ;; 733410f94802Smrg 733510f94802Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 733610f94802Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 733710f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 733810f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 733910f94802Smrg runpath_var='LD_RUN_PATH' 734010f94802Smrg 734110f94802Smrg case $cc_basename in 734210f94802Smrg CC*) 734310f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734410f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734510f94802Smrg ;; 734610f94802Smrg *) 734710f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734810f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734910f94802Smrg ;; 735010f94802Smrg esac 735110f94802Smrg ;; 735210f94802Smrg 735310f94802Smrg sysv5* | sco3.2v5* | sco5v6*) 735410f94802Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 735510f94802Smrg # link with -lc, and that would cause any symbols used from libc to 735610f94802Smrg # always be unresolved, which means just about no library would 735710f94802Smrg # ever link correctly. If we're not using GNU ld we use -z text 735810f94802Smrg # though, which does catch some bad symbols but isn't as heavy-handed 735910f94802Smrg # as -z defs. 736010f94802Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 736110f94802Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 736210f94802Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 736310f94802Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 736410f94802Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 736510f94802Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 736610f94802Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 736710f94802Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 736810f94802Smrg runpath_var='LD_RUN_PATH' 736910f94802Smrg 737010f94802Smrg case $cc_basename in 737110f94802Smrg CC*) 737210f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737310f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737410f94802Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 737510f94802Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 737610f94802Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 737710f94802Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 737810f94802Smrg ;; 737910f94802Smrg *) 738010f94802Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 738110f94802Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 738210f94802Smrg ;; 738310f94802Smrg esac 738410f94802Smrg ;; 738510f94802Smrg 738610f94802Smrg tandem*) 738710f94802Smrg case $cc_basename in 738810f94802Smrg NCC*) 738910f94802Smrg # NonStop-UX NCC 3.20 739010f94802Smrg # FIXME: insert proper C++ library support 739110f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 739210f94802Smrg ;; 739310f94802Smrg *) 739410f94802Smrg # FIXME: insert proper C++ library support 739510f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 739610f94802Smrg ;; 739710f94802Smrg esac 739810f94802Smrg ;; 739910f94802Smrg 740010f94802Smrg vxworks*) 740110f94802Smrg # FIXME: insert proper C++ library support 740210f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 740310f94802Smrg ;; 740410f94802Smrg 740510f94802Smrg *) 740610f94802Smrg # FIXME: insert proper C++ library support 740710f94802Smrg _LT_TAGVAR(ld_shlibs, $1)=no 740810f94802Smrg ;; 740910f94802Smrg esac 741010f94802Smrg 741110f94802Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 741210f94802Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 741310f94802Smrg 741410f94802Smrg _LT_TAGVAR(GCC, $1)=$GXX 741510f94802Smrg _LT_TAGVAR(LD, $1)=$LD 741610f94802Smrg 741710f94802Smrg ## CAVEAT EMPTOR: 741810f94802Smrg ## There is no encapsulation within the following macros, do not change 741910f94802Smrg ## the running order or otherwise move them around unless you know exactly 742010f94802Smrg ## what you are doing... 742110f94802Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 742210f94802Smrg _LT_COMPILER_PIC($1) 742310f94802Smrg _LT_COMPILER_C_O($1) 742410f94802Smrg _LT_COMPILER_FILE_LOCKS($1) 742510f94802Smrg _LT_LINKER_SHLIBS($1) 742610f94802Smrg _LT_SYS_DYNAMIC_LINKER($1) 742710f94802Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 742810f94802Smrg 742910f94802Smrg _LT_CONFIG($1) 743010f94802Smrg fi # test -n "$compiler" 743110f94802Smrg 743210f94802Smrg CC=$lt_save_CC 743310f94802Smrg CFLAGS=$lt_save_CFLAGS 743410f94802Smrg LDCXX=$LD 743510f94802Smrg LD=$lt_save_LD 743610f94802Smrg GCC=$lt_save_GCC 743710f94802Smrg with_gnu_ld=$lt_save_with_gnu_ld 743810f94802Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 743910f94802Smrg lt_cv_path_LD=$lt_save_path_LD 744010f94802Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 744110f94802Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 744210f94802Smrgfi # test yes != "$_lt_caught_CXX_error" 744310f94802Smrg 744410f94802SmrgAC_LANG_POP 744510f94802Smrg])# _LT_LANG_CXX_CONFIG 744610f94802Smrg 744710f94802Smrg 744810f94802Smrg# _LT_FUNC_STRIPNAME_CNF 744910f94802Smrg# ---------------------- 745010f94802Smrg# func_stripname_cnf prefix suffix name 745110f94802Smrg# strip PREFIX and SUFFIX off of NAME. 745210f94802Smrg# PREFIX and SUFFIX must not contain globbing or regex special 745310f94802Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 745410f94802Smrg# dot (in which case that matches only a dot). 745510f94802Smrg# 745610f94802Smrg# This function is identical to the (non-XSI) version of func_stripname, 745710f94802Smrg# except this one can be used by m4 code that may be executed by configure, 745810f94802Smrg# rather than the libtool script. 745910f94802Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 746010f94802SmrgAC_REQUIRE([_LT_DECL_SED]) 746110f94802SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 746210f94802Smrgfunc_stripname_cnf () 746310f94802Smrg{ 746410f94802Smrg case @S|@2 in 746510f94802Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 746610f94802Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 746710f94802Smrg esac 746810f94802Smrg} # func_stripname_cnf 746910f94802Smrg])# _LT_FUNC_STRIPNAME_CNF 747010f94802Smrg 747110f94802Smrg 747210f94802Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 747310f94802Smrg# --------------------------------- 747410f94802Smrg# Figure out "hidden" library dependencies from verbose 747510f94802Smrg# compiler output when linking a shared library. 747610f94802Smrg# Parse the compiler output and extract the necessary 747710f94802Smrg# objects, libraries and library flags. 747810f94802Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 747910f94802Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 748010f94802SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 748110f94802Smrg# Dependencies to place before and after the object being linked: 748210f94802Smrg_LT_TAGVAR(predep_objects, $1)= 748310f94802Smrg_LT_TAGVAR(postdep_objects, $1)= 748410f94802Smrg_LT_TAGVAR(predeps, $1)= 748510f94802Smrg_LT_TAGVAR(postdeps, $1)= 748610f94802Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 748710f94802Smrg 748810f94802Smrgdnl we can't use the lt_simple_compile_test_code here, 748910f94802Smrgdnl because it contains code intended for an executable, 749010f94802Smrgdnl not a library. It's possible we should let each 749110f94802Smrgdnl tag define a new lt_????_link_test_code variable, 749210f94802Smrgdnl but it's only used here... 749310f94802Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 749410f94802Smrgint a; 749510f94802Smrgvoid foo (void) { a = 0; } 749610f94802Smrg_LT_EOF 749710f94802Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 749810f94802Smrgclass Foo 749910f94802Smrg{ 750010f94802Smrgpublic: 750110f94802Smrg Foo (void) { a = 0; } 750210f94802Smrgprivate: 750310f94802Smrg int a; 750410f94802Smrg}; 750510f94802Smrg_LT_EOF 750610f94802Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 750710f94802Smrg subroutine foo 750810f94802Smrg implicit none 750910f94802Smrg integer*4 a 751010f94802Smrg a=0 751110f94802Smrg return 751210f94802Smrg end 751310f94802Smrg_LT_EOF 751410f94802Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 751510f94802Smrg subroutine foo 751610f94802Smrg implicit none 751710f94802Smrg integer a 751810f94802Smrg a=0 751910f94802Smrg return 752010f94802Smrg end 752110f94802Smrg_LT_EOF 752210f94802Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 752310f94802Smrgpublic class foo { 752410f94802Smrg private int a; 752510f94802Smrg public void bar (void) { 752610f94802Smrg a = 0; 752710f94802Smrg } 752810f94802Smrg}; 752910f94802Smrg_LT_EOF 753010f94802Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 753110f94802Smrgpackage foo 753210f94802Smrgfunc foo() { 753310f94802Smrg} 753410f94802Smrg_LT_EOF 753510f94802Smrg]) 753610f94802Smrg 753710f94802Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 753810f94802Smrgcase "$CC $CFLAGS " in #( 753910f94802Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 754010f94802Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 754110f94802Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 754210f94802Smrgesac 754310f94802Smrg 754410f94802Smrgdnl Parse the compiler output and extract the necessary 754510f94802Smrgdnl objects, libraries and library flags. 754610f94802Smrgif AC_TRY_EVAL(ac_compile); then 754710f94802Smrg # Parse the compiler output and extract the necessary 754810f94802Smrg # objects, libraries and library flags. 754910f94802Smrg 755010f94802Smrg # Sentinel used to keep track of whether or not we are before 755110f94802Smrg # the conftest object file. 755210f94802Smrg pre_test_object_deps_done=no 755310f94802Smrg 755410f94802Smrg for p in `eval "$output_verbose_link_cmd"`; do 755510f94802Smrg case $prev$p in 755610f94802Smrg 755710f94802Smrg -L* | -R* | -l*) 755810f94802Smrg # Some compilers place space between "-{L,R}" and the path. 755910f94802Smrg # Remove the space. 756010f94802Smrg if test x-L = "$p" || 756110f94802Smrg test x-R = "$p"; then 756210f94802Smrg prev=$p 756310f94802Smrg continue 756410f94802Smrg fi 756510f94802Smrg 756610f94802Smrg # Expand the sysroot to ease extracting the directories later. 756710f94802Smrg if test -z "$prev"; then 756810f94802Smrg case $p in 756910f94802Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 757010f94802Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 757110f94802Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 757210f94802Smrg esac 757310f94802Smrg fi 757410f94802Smrg case $p in 757510f94802Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 757610f94802Smrg esac 757710f94802Smrg if test no = "$pre_test_object_deps_done"; then 757810f94802Smrg case $prev in 757910f94802Smrg -L | -R) 758010f94802Smrg # Internal compiler library paths should come after those 758110f94802Smrg # provided the user. The postdeps already come after the 758210f94802Smrg # user supplied libs so there is no need to process them. 758310f94802Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 758410f94802Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 758510f94802Smrg else 758610f94802Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 758710f94802Smrg fi 758810f94802Smrg ;; 758910f94802Smrg # The "-l" case would never come before the object being 759010f94802Smrg # linked, so don't bother handling this case. 759110f94802Smrg esac 759210f94802Smrg else 759310f94802Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 759410f94802Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 759510f94802Smrg else 759610f94802Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 759710f94802Smrg fi 759810f94802Smrg fi 759910f94802Smrg prev= 760010f94802Smrg ;; 760110f94802Smrg 760210f94802Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 760310f94802Smrg *.$objext) 760410f94802Smrg # This assumes that the test object file only shows up 760510f94802Smrg # once in the compiler output. 760610f94802Smrg if test "$p" = "conftest.$objext"; then 760710f94802Smrg pre_test_object_deps_done=yes 760810f94802Smrg continue 760910f94802Smrg fi 761010f94802Smrg 761110f94802Smrg if test no = "$pre_test_object_deps_done"; then 761210f94802Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 761310f94802Smrg _LT_TAGVAR(predep_objects, $1)=$p 761410f94802Smrg else 761510f94802Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 761610f94802Smrg fi 761710f94802Smrg else 761810f94802Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 761910f94802Smrg _LT_TAGVAR(postdep_objects, $1)=$p 762010f94802Smrg else 762110f94802Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 762210f94802Smrg fi 762310f94802Smrg fi 762410f94802Smrg ;; 762510f94802Smrg 762610f94802Smrg *) ;; # Ignore the rest. 762710f94802Smrg 762810f94802Smrg esac 762910f94802Smrg done 763010f94802Smrg 763110f94802Smrg # Clean up. 763210f94802Smrg rm -f a.out a.exe 763310f94802Smrgelse 763410f94802Smrg echo "libtool.m4: error: problem compiling $1 test program" 763510f94802Smrgfi 763610f94802Smrg 763710f94802Smrg$RM -f confest.$objext 763810f94802SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 763910f94802Smrg 764010f94802Smrg# PORTME: override above test on systems where it is broken 764110f94802Smrgm4_if([$1], [CXX], 764210f94802Smrg[case $host_os in 764310f94802Smrginterix[[3-9]]*) 764410f94802Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 764510f94802Smrg # hack all around it, let's just trust "g++" to DTRT. 764610f94802Smrg _LT_TAGVAR(predep_objects,$1)= 764710f94802Smrg _LT_TAGVAR(postdep_objects,$1)= 764810f94802Smrg _LT_TAGVAR(postdeps,$1)= 764910f94802Smrg ;; 765010f94802Smrgesac 765110f94802Smrg]) 765210f94802Smrg 765310f94802Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 765410f94802Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 765510f94802Smrgesac 765610f94802Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 765710f94802Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 765810f94802Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 765910f94802Smrgfi 766010f94802Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 766110f94802Smrg [The directories searched by this compiler when creating a shared library]) 766210f94802Smrg_LT_TAGDECL([], [predep_objects], [1], 766310f94802Smrg [Dependencies to place before and after the objects being linked to 766410f94802Smrg create a shared library]) 766510f94802Smrg_LT_TAGDECL([], [postdep_objects], [1]) 766610f94802Smrg_LT_TAGDECL([], [predeps], [1]) 766710f94802Smrg_LT_TAGDECL([], [postdeps], [1]) 766810f94802Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 766910f94802Smrg [The library search path used internally by the compiler when linking 767010f94802Smrg a shared library]) 767110f94802Smrg])# _LT_SYS_HIDDEN_LIBDEPS 767210f94802Smrg 767310f94802Smrg 767410f94802Smrg# _LT_LANG_F77_CONFIG([TAG]) 767510f94802Smrg# -------------------------- 767610f94802Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 767710f94802Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 767810f94802Smrg# to write the compiler configuration to 'libtool'. 767910f94802Smrgm4_defun([_LT_LANG_F77_CONFIG], 768010f94802Smrg[AC_LANG_PUSH(Fortran 77) 768110f94802Smrgif test -z "$F77" || test no = "$F77"; then 768210f94802Smrg _lt_disable_F77=yes 768310f94802Smrgfi 768410f94802Smrg 768510f94802Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 768610f94802Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 768710f94802Smrg_LT_TAGVAR(always_export_symbols, $1)=no 768810f94802Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 768910f94802Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 769010f94802Smrg_LT_TAGVAR(hardcode_direct, $1)=no 769110f94802Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 769210f94802Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 769310f94802Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 769410f94802Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 769510f94802Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 769610f94802Smrg_LT_TAGVAR(inherit_rpath, $1)=no 769710f94802Smrg_LT_TAGVAR(module_cmds, $1)= 769810f94802Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 769910f94802Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 770010f94802Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 770110f94802Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 770210f94802Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 770310f94802Smrg_LT_TAGVAR(no_undefined_flag, $1)= 770410f94802Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 770510f94802Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 770610f94802Smrg 770710f94802Smrg# Source file extension for f77 test sources. 770810f94802Smrgac_ext=f 770910f94802Smrg 771010f94802Smrg# Object file extension for compiled f77 test sources. 771110f94802Smrgobjext=o 771210f94802Smrg_LT_TAGVAR(objext, $1)=$objext 771310f94802Smrg 771410f94802Smrg# No sense in running all these tests if we already determined that 771510f94802Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 771610f94802Smrg# are currently assumed to apply to all compilers on this platform, 771710f94802Smrg# and will be corrupted by setting them based on a non-working compiler. 771810f94802Smrgif test yes != "$_lt_disable_F77"; then 771910f94802Smrg # Code to be used in simple compile tests 772010f94802Smrg lt_simple_compile_test_code="\ 772110f94802Smrg subroutine t 772210f94802Smrg return 772310f94802Smrg end 772410f94802Smrg" 772510f94802Smrg 772610f94802Smrg # Code to be used in simple link tests 772710f94802Smrg lt_simple_link_test_code="\ 772810f94802Smrg program t 772910f94802Smrg end 773010f94802Smrg" 773110f94802Smrg 773210f94802Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 773310f94802Smrg _LT_TAG_COMPILER 773410f94802Smrg 773510f94802Smrg # save warnings/boilerplate of simple test code 773610f94802Smrg _LT_COMPILER_BOILERPLATE 773710f94802Smrg _LT_LINKER_BOILERPLATE 773810f94802Smrg 773910f94802Smrg # Allow CC to be a program name with arguments. 774010f94802Smrg lt_save_CC=$CC 774110f94802Smrg lt_save_GCC=$GCC 774210f94802Smrg lt_save_CFLAGS=$CFLAGS 774310f94802Smrg CC=${F77-"f77"} 774410f94802Smrg CFLAGS=$FFLAGS 774510f94802Smrg compiler=$CC 774610f94802Smrg _LT_TAGVAR(compiler, $1)=$CC 774710f94802Smrg _LT_CC_BASENAME([$compiler]) 774810f94802Smrg GCC=$G77 774910f94802Smrg if test -n "$compiler"; then 775010f94802Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 775110f94802Smrg AC_MSG_RESULT([$can_build_shared]) 775210f94802Smrg 775310f94802Smrg AC_MSG_CHECKING([whether to build shared libraries]) 775410f94802Smrg test no = "$can_build_shared" && enable_shared=no 775510f94802Smrg 775610f94802Smrg # On AIX, shared libraries and static libraries use the same namespace, and 775710f94802Smrg # are all built from PIC. 775810f94802Smrg case $host_os in 775910f94802Smrg aix3*) 776010f94802Smrg test yes = "$enable_shared" && enable_static=no 776110f94802Smrg if test -n "$RANLIB"; then 776210f94802Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 776310f94802Smrg postinstall_cmds='$RANLIB $lib' 776410f94802Smrg fi 776510f94802Smrg ;; 776610f94802Smrg aix[[4-9]]*) 776710f94802Smrg if test ia64 != "$host_cpu"; then 776810f94802Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 776910f94802Smrg yes,aix,yes) ;; # shared object as lib.so file only 777010f94802Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 777110f94802Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 777210f94802Smrg esac 777310f94802Smrg fi 777410f94802Smrg ;; 777510f94802Smrg esac 777610f94802Smrg AC_MSG_RESULT([$enable_shared]) 777710f94802Smrg 777810f94802Smrg AC_MSG_CHECKING([whether to build static libraries]) 777910f94802Smrg # Make sure either enable_shared or enable_static is yes. 778010f94802Smrg test yes = "$enable_shared" || enable_static=yes 778110f94802Smrg AC_MSG_RESULT([$enable_static]) 778210f94802Smrg 778310f94802Smrg _LT_TAGVAR(GCC, $1)=$G77 778410f94802Smrg _LT_TAGVAR(LD, $1)=$LD 778510f94802Smrg 778610f94802Smrg ## CAVEAT EMPTOR: 778710f94802Smrg ## There is no encapsulation within the following macros, do not change 778810f94802Smrg ## the running order or otherwise move them around unless you know exactly 778910f94802Smrg ## what you are doing... 779010f94802Smrg _LT_COMPILER_PIC($1) 779110f94802Smrg _LT_COMPILER_C_O($1) 779210f94802Smrg _LT_COMPILER_FILE_LOCKS($1) 779310f94802Smrg _LT_LINKER_SHLIBS($1) 779410f94802Smrg _LT_SYS_DYNAMIC_LINKER($1) 779510f94802Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 779610f94802Smrg 779710f94802Smrg _LT_CONFIG($1) 779810f94802Smrg fi # test -n "$compiler" 779910f94802Smrg 780010f94802Smrg GCC=$lt_save_GCC 780110f94802Smrg CC=$lt_save_CC 780210f94802Smrg CFLAGS=$lt_save_CFLAGS 780310f94802Smrgfi # test yes != "$_lt_disable_F77" 780410f94802Smrg 780510f94802SmrgAC_LANG_POP 780610f94802Smrg])# _LT_LANG_F77_CONFIG 780710f94802Smrg 780810f94802Smrg 780910f94802Smrg# _LT_LANG_FC_CONFIG([TAG]) 781010f94802Smrg# ------------------------- 781110f94802Smrg# Ensure that the configuration variables for a Fortran compiler are 781210f94802Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 781310f94802Smrg# to write the compiler configuration to 'libtool'. 781410f94802Smrgm4_defun([_LT_LANG_FC_CONFIG], 781510f94802Smrg[AC_LANG_PUSH(Fortran) 781610f94802Smrg 781710f94802Smrgif test -z "$FC" || test no = "$FC"; then 781810f94802Smrg _lt_disable_FC=yes 781910f94802Smrgfi 782010f94802Smrg 782110f94802Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 782210f94802Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 782310f94802Smrg_LT_TAGVAR(always_export_symbols, $1)=no 782410f94802Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 782510f94802Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 782610f94802Smrg_LT_TAGVAR(hardcode_direct, $1)=no 782710f94802Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 782810f94802Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 782910f94802Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 783010f94802Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 783110f94802Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 783210f94802Smrg_LT_TAGVAR(inherit_rpath, $1)=no 783310f94802Smrg_LT_TAGVAR(module_cmds, $1)= 783410f94802Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 783510f94802Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 783610f94802Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 783710f94802Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 783810f94802Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 783910f94802Smrg_LT_TAGVAR(no_undefined_flag, $1)= 784010f94802Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 784110f94802Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 784210f94802Smrg 784310f94802Smrg# Source file extension for fc test sources. 784410f94802Smrgac_ext=${ac_fc_srcext-f} 784510f94802Smrg 784610f94802Smrg# Object file extension for compiled fc test sources. 784710f94802Smrgobjext=o 784810f94802Smrg_LT_TAGVAR(objext, $1)=$objext 784910f94802Smrg 785010f94802Smrg# No sense in running all these tests if we already determined that 785110f94802Smrg# the FC compiler isn't working. Some variables (like enable_shared) 785210f94802Smrg# are currently assumed to apply to all compilers on this platform, 785310f94802Smrg# and will be corrupted by setting them based on a non-working compiler. 785410f94802Smrgif test yes != "$_lt_disable_FC"; then 785510f94802Smrg # Code to be used in simple compile tests 785610f94802Smrg lt_simple_compile_test_code="\ 785710f94802Smrg subroutine t 785810f94802Smrg return 785910f94802Smrg end 786010f94802Smrg" 786110f94802Smrg 786210f94802Smrg # Code to be used in simple link tests 786310f94802Smrg lt_simple_link_test_code="\ 786410f94802Smrg program t 786510f94802Smrg end 786610f94802Smrg" 786710f94802Smrg 786810f94802Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 786910f94802Smrg _LT_TAG_COMPILER 787010f94802Smrg 787110f94802Smrg # save warnings/boilerplate of simple test code 787210f94802Smrg _LT_COMPILER_BOILERPLATE 787310f94802Smrg _LT_LINKER_BOILERPLATE 787410f94802Smrg 787510f94802Smrg # Allow CC to be a program name with arguments. 787610f94802Smrg lt_save_CC=$CC 787710f94802Smrg lt_save_GCC=$GCC 787810f94802Smrg lt_save_CFLAGS=$CFLAGS 787910f94802Smrg CC=${FC-"f95"} 788010f94802Smrg CFLAGS=$FCFLAGS 788110f94802Smrg compiler=$CC 788210f94802Smrg GCC=$ac_cv_fc_compiler_gnu 788310f94802Smrg 788410f94802Smrg _LT_TAGVAR(compiler, $1)=$CC 788510f94802Smrg _LT_CC_BASENAME([$compiler]) 788610f94802Smrg 788710f94802Smrg if test -n "$compiler"; then 788810f94802Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 788910f94802Smrg AC_MSG_RESULT([$can_build_shared]) 789010f94802Smrg 789110f94802Smrg AC_MSG_CHECKING([whether to build shared libraries]) 789210f94802Smrg test no = "$can_build_shared" && enable_shared=no 789310f94802Smrg 789410f94802Smrg # On AIX, shared libraries and static libraries use the same namespace, and 789510f94802Smrg # are all built from PIC. 789610f94802Smrg case $host_os in 789710f94802Smrg aix3*) 789810f94802Smrg test yes = "$enable_shared" && enable_static=no 789910f94802Smrg if test -n "$RANLIB"; then 790010f94802Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 790110f94802Smrg postinstall_cmds='$RANLIB $lib' 790210f94802Smrg fi 790310f94802Smrg ;; 790410f94802Smrg aix[[4-9]]*) 790510f94802Smrg if test ia64 != "$host_cpu"; then 790610f94802Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 790710f94802Smrg yes,aix,yes) ;; # shared object as lib.so file only 790810f94802Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 790910f94802Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 791010f94802Smrg esac 791110f94802Smrg fi 791210f94802Smrg ;; 791310f94802Smrg esac 791410f94802Smrg AC_MSG_RESULT([$enable_shared]) 791510f94802Smrg 791610f94802Smrg AC_MSG_CHECKING([whether to build static libraries]) 791710f94802Smrg # Make sure either enable_shared or enable_static is yes. 791810f94802Smrg test yes = "$enable_shared" || enable_static=yes 791910f94802Smrg AC_MSG_RESULT([$enable_static]) 792010f94802Smrg 792110f94802Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 792210f94802Smrg _LT_TAGVAR(LD, $1)=$LD 792310f94802Smrg 792410f94802Smrg ## CAVEAT EMPTOR: 792510f94802Smrg ## There is no encapsulation within the following macros, do not change 792610f94802Smrg ## the running order or otherwise move them around unless you know exactly 792710f94802Smrg ## what you are doing... 792810f94802Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 792910f94802Smrg _LT_COMPILER_PIC($1) 793010f94802Smrg _LT_COMPILER_C_O($1) 793110f94802Smrg _LT_COMPILER_FILE_LOCKS($1) 793210f94802Smrg _LT_LINKER_SHLIBS($1) 793310f94802Smrg _LT_SYS_DYNAMIC_LINKER($1) 793410f94802Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 793510f94802Smrg 793610f94802Smrg _LT_CONFIG($1) 793710f94802Smrg fi # test -n "$compiler" 793810f94802Smrg 793910f94802Smrg GCC=$lt_save_GCC 794010f94802Smrg CC=$lt_save_CC 794110f94802Smrg CFLAGS=$lt_save_CFLAGS 794210f94802Smrgfi # test yes != "$_lt_disable_FC" 794310f94802Smrg 794410f94802SmrgAC_LANG_POP 794510f94802Smrg])# _LT_LANG_FC_CONFIG 794610f94802Smrg 794710f94802Smrg 794810f94802Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 794910f94802Smrg# -------------------------- 795010f94802Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 795110f94802Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 795210f94802Smrg# to write the compiler configuration to 'libtool'. 795310f94802Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 795410f94802Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 795510f94802SmrgAC_LANG_SAVE 795610f94802Smrg 795710f94802Smrg# Source file extension for Java test sources. 795810f94802Smrgac_ext=java 795910f94802Smrg 796010f94802Smrg# Object file extension for compiled Java test sources. 796110f94802Smrgobjext=o 796210f94802Smrg_LT_TAGVAR(objext, $1)=$objext 796310f94802Smrg 796410f94802Smrg# Code to be used in simple compile tests 796510f94802Smrglt_simple_compile_test_code="class foo {}" 796610f94802Smrg 796710f94802Smrg# Code to be used in simple link tests 796810f94802Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 796910f94802Smrg 797010f94802Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 797110f94802Smrg_LT_TAG_COMPILER 797210f94802Smrg 797310f94802Smrg# save warnings/boilerplate of simple test code 797410f94802Smrg_LT_COMPILER_BOILERPLATE 797510f94802Smrg_LT_LINKER_BOILERPLATE 797610f94802Smrg 797710f94802Smrg# Allow CC to be a program name with arguments. 797810f94802Smrglt_save_CC=$CC 797910f94802Smrglt_save_CFLAGS=$CFLAGS 798010f94802Smrglt_save_GCC=$GCC 798110f94802SmrgGCC=yes 798210f94802SmrgCC=${GCJ-"gcj"} 798310f94802SmrgCFLAGS=$GCJFLAGS 798410f94802Smrgcompiler=$CC 798510f94802Smrg_LT_TAGVAR(compiler, $1)=$CC 798610f94802Smrg_LT_TAGVAR(LD, $1)=$LD 798710f94802Smrg_LT_CC_BASENAME([$compiler]) 798810f94802Smrg 798910f94802Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 799010f94802Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 799110f94802Smrg 799210f94802Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 799310f94802Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 799410f94802Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 799510f94802Smrg 799610f94802Smrg## CAVEAT EMPTOR: 799710f94802Smrg## There is no encapsulation within the following macros, do not change 799810f94802Smrg## the running order or otherwise move them around unless you know exactly 799910f94802Smrg## what you are doing... 800010f94802Smrgif test -n "$compiler"; then 800110f94802Smrg _LT_COMPILER_NO_RTTI($1) 800210f94802Smrg _LT_COMPILER_PIC($1) 800310f94802Smrg _LT_COMPILER_C_O($1) 800410f94802Smrg _LT_COMPILER_FILE_LOCKS($1) 800510f94802Smrg _LT_LINKER_SHLIBS($1) 800610f94802Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 800710f94802Smrg 800810f94802Smrg _LT_CONFIG($1) 800910f94802Smrgfi 801010f94802Smrg 801110f94802SmrgAC_LANG_RESTORE 801210f94802Smrg 801310f94802SmrgGCC=$lt_save_GCC 801410f94802SmrgCC=$lt_save_CC 801510f94802SmrgCFLAGS=$lt_save_CFLAGS 801610f94802Smrg])# _LT_LANG_GCJ_CONFIG 801710f94802Smrg 801810f94802Smrg 801910f94802Smrg# _LT_LANG_GO_CONFIG([TAG]) 802010f94802Smrg# -------------------------- 802110f94802Smrg# Ensure that the configuration variables for the GNU Go compiler 802210f94802Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 802310f94802Smrg# to write the compiler configuration to 'libtool'. 802410f94802Smrgm4_defun([_LT_LANG_GO_CONFIG], 802510f94802Smrg[AC_REQUIRE([LT_PROG_GO])dnl 802610f94802SmrgAC_LANG_SAVE 802710f94802Smrg 802810f94802Smrg# Source file extension for Go test sources. 802910f94802Smrgac_ext=go 803010f94802Smrg 803110f94802Smrg# Object file extension for compiled Go test sources. 803210f94802Smrgobjext=o 803310f94802Smrg_LT_TAGVAR(objext, $1)=$objext 803410f94802Smrg 803510f94802Smrg# Code to be used in simple compile tests 803610f94802Smrglt_simple_compile_test_code="package main; func main() { }" 803710f94802Smrg 803810f94802Smrg# Code to be used in simple link tests 803910f94802Smrglt_simple_link_test_code='package main; func main() { }' 804010f94802Smrg 804110f94802Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 804210f94802Smrg_LT_TAG_COMPILER 804310f94802Smrg 804410f94802Smrg# save warnings/boilerplate of simple test code 804510f94802Smrg_LT_COMPILER_BOILERPLATE 804610f94802Smrg_LT_LINKER_BOILERPLATE 804710f94802Smrg 804810f94802Smrg# Allow CC to be a program name with arguments. 804910f94802Smrglt_save_CC=$CC 805010f94802Smrglt_save_CFLAGS=$CFLAGS 805110f94802Smrglt_save_GCC=$GCC 805210f94802SmrgGCC=yes 805310f94802SmrgCC=${GOC-"gccgo"} 805410f94802SmrgCFLAGS=$GOFLAGS 805510f94802Smrgcompiler=$CC 805610f94802Smrg_LT_TAGVAR(compiler, $1)=$CC 805710f94802Smrg_LT_TAGVAR(LD, $1)=$LD 805810f94802Smrg_LT_CC_BASENAME([$compiler]) 805910f94802Smrg 806010f94802Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 806110f94802Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 806210f94802Smrg 806310f94802Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 806410f94802Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 806510f94802Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 806610f94802Smrg 806710f94802Smrg## CAVEAT EMPTOR: 806810f94802Smrg## There is no encapsulation within the following macros, do not change 806910f94802Smrg## the running order or otherwise move them around unless you know exactly 807010f94802Smrg## what you are doing... 807110f94802Smrgif test -n "$compiler"; then 807210f94802Smrg _LT_COMPILER_NO_RTTI($1) 807310f94802Smrg _LT_COMPILER_PIC($1) 807410f94802Smrg _LT_COMPILER_C_O($1) 807510f94802Smrg _LT_COMPILER_FILE_LOCKS($1) 807610f94802Smrg _LT_LINKER_SHLIBS($1) 807710f94802Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 807810f94802Smrg 807910f94802Smrg _LT_CONFIG($1) 808010f94802Smrgfi 808110f94802Smrg 808210f94802SmrgAC_LANG_RESTORE 808310f94802Smrg 808410f94802SmrgGCC=$lt_save_GCC 808510f94802SmrgCC=$lt_save_CC 808610f94802SmrgCFLAGS=$lt_save_CFLAGS 808710f94802Smrg])# _LT_LANG_GO_CONFIG 808810f94802Smrg 808910f94802Smrg 809010f94802Smrg# _LT_LANG_RC_CONFIG([TAG]) 809110f94802Smrg# ------------------------- 809210f94802Smrg# Ensure that the configuration variables for the Windows resource compiler 809310f94802Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 809410f94802Smrg# to write the compiler configuration to 'libtool'. 809510f94802Smrgm4_defun([_LT_LANG_RC_CONFIG], 809610f94802Smrg[AC_REQUIRE([LT_PROG_RC])dnl 809710f94802SmrgAC_LANG_SAVE 809810f94802Smrg 809910f94802Smrg# Source file extension for RC test sources. 810010f94802Smrgac_ext=rc 810110f94802Smrg 810210f94802Smrg# Object file extension for compiled RC test sources. 810310f94802Smrgobjext=o 810410f94802Smrg_LT_TAGVAR(objext, $1)=$objext 810510f94802Smrg 810610f94802Smrg# Code to be used in simple compile tests 810710f94802Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 810810f94802Smrg 810910f94802Smrg# Code to be used in simple link tests 811010f94802Smrglt_simple_link_test_code=$lt_simple_compile_test_code 811110f94802Smrg 811210f94802Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 811310f94802Smrg_LT_TAG_COMPILER 811410f94802Smrg 811510f94802Smrg# save warnings/boilerplate of simple test code 811610f94802Smrg_LT_COMPILER_BOILERPLATE 811710f94802Smrg_LT_LINKER_BOILERPLATE 811810f94802Smrg 811910f94802Smrg# Allow CC to be a program name with arguments. 812010f94802Smrglt_save_CC=$CC 812110f94802Smrglt_save_CFLAGS=$CFLAGS 812210f94802Smrglt_save_GCC=$GCC 812310f94802SmrgGCC= 812410f94802SmrgCC=${RC-"windres"} 812510f94802SmrgCFLAGS= 812610f94802Smrgcompiler=$CC 812710f94802Smrg_LT_TAGVAR(compiler, $1)=$CC 812810f94802Smrg_LT_CC_BASENAME([$compiler]) 812910f94802Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 813010f94802Smrg 813110f94802Smrgif test -n "$compiler"; then 813210f94802Smrg : 813310f94802Smrg _LT_CONFIG($1) 813410f94802Smrgfi 813510f94802Smrg 813610f94802SmrgGCC=$lt_save_GCC 813710f94802SmrgAC_LANG_RESTORE 813810f94802SmrgCC=$lt_save_CC 813910f94802SmrgCFLAGS=$lt_save_CFLAGS 814010f94802Smrg])# _LT_LANG_RC_CONFIG 814110f94802Smrg 814210f94802Smrg 814310f94802Smrg# LT_PROG_GCJ 814410f94802Smrg# ----------- 814510f94802SmrgAC_DEFUN([LT_PROG_GCJ], 814610f94802Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 814710f94802Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 814810f94802Smrg [AC_CHECK_TOOL(GCJ, gcj,) 814910f94802Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 815010f94802Smrg AC_SUBST(GCJFLAGS)])])[]dnl 815110f94802Smrg]) 815210f94802Smrg 815310f94802Smrg# Old name: 815410f94802SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 815510f94802Smrgdnl aclocal-1.4 backwards compatibility: 815610f94802Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 815710f94802Smrg 815810f94802Smrg 815910f94802Smrg# LT_PROG_GO 816010f94802Smrg# ---------- 816110f94802SmrgAC_DEFUN([LT_PROG_GO], 816210f94802Smrg[AC_CHECK_TOOL(GOC, gccgo,) 816310f94802Smrg]) 816410f94802Smrg 816510f94802Smrg 816610f94802Smrg# LT_PROG_RC 816710f94802Smrg# ---------- 816810f94802SmrgAC_DEFUN([LT_PROG_RC], 816910f94802Smrg[AC_CHECK_TOOL(RC, windres,) 817010f94802Smrg]) 817110f94802Smrg 817210f94802Smrg# Old name: 817310f94802SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 817410f94802Smrgdnl aclocal-1.4 backwards compatibility: 817510f94802Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 817610f94802Smrg 817710f94802Smrg 817810f94802Smrg# _LT_DECL_EGREP 817910f94802Smrg# -------------- 818010f94802Smrg# If we don't have a new enough Autoconf to choose the best grep 818110f94802Smrg# available, choose the one first in the user's PATH. 818210f94802Smrgm4_defun([_LT_DECL_EGREP], 818310f94802Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 818410f94802SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 818510f94802Smrgtest -z "$GREP" && GREP=grep 818610f94802Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 818710f94802Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 818810f94802Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 818910f94802Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 819010f94802SmrgAC_SUBST([GREP]) 819110f94802Smrg]) 819210f94802Smrg 819310f94802Smrg 819410f94802Smrg# _LT_DECL_OBJDUMP 819510f94802Smrg# -------------- 819610f94802Smrg# If we don't have a new enough Autoconf to choose the best objdump 819710f94802Smrg# available, choose the one first in the user's PATH. 819810f94802Smrgm4_defun([_LT_DECL_OBJDUMP], 819910f94802Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 820010f94802Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 820110f94802Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 820210f94802SmrgAC_SUBST([OBJDUMP]) 820310f94802Smrg]) 820410f94802Smrg 820510f94802Smrg# _LT_DECL_DLLTOOL 820610f94802Smrg# ---------------- 820710f94802Smrg# Ensure DLLTOOL variable is set. 820810f94802Smrgm4_defun([_LT_DECL_DLLTOOL], 820910f94802Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 821010f94802Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 821110f94802Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 821210f94802SmrgAC_SUBST([DLLTOOL]) 821310f94802Smrg]) 821410f94802Smrg 821510f94802Smrg# _LT_DECL_FILECMD 821610f94802Smrg# ---------------- 821710f94802Smrg# Check for a file(cmd) program that can be used to detect file type and magic 821810f94802Smrgm4_defun([_LT_DECL_FILECMD], 821910f94802Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 822010f94802Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 822110f94802Smrg])# _LD_DECL_FILECMD 822210f94802Smrg 822310f94802Smrg# _LT_DECL_SED 822410f94802Smrg# ------------ 822510f94802Smrg# Check for a fully-functional sed program, that truncates 822610f94802Smrg# as few characters as possible. Prefer GNU sed if found. 822710f94802Smrgm4_defun([_LT_DECL_SED], 822810f94802Smrg[AC_PROG_SED 822910f94802Smrgtest -z "$SED" && SED=sed 823010f94802SmrgXsed="$SED -e 1s/^X//" 823110f94802Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 823210f94802Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 823310f94802Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 823410f94802Smrg])# _LT_DECL_SED 823510f94802Smrg 823610f94802Smrgm4_ifndef([AC_PROG_SED], [ 823710f94802Smrg############################################################ 823810f94802Smrg# NOTE: This macro has been submitted for inclusion into # 823910f94802Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 824010f94802Smrg# a released version of Autoconf we should remove this # 824110f94802Smrg# macro and use it instead. # 824210f94802Smrg############################################################ 824310f94802Smrg 824410f94802Smrgm4_defun([AC_PROG_SED], 824510f94802Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 824610f94802SmrgAC_CACHE_VAL(lt_cv_path_SED, 824710f94802Smrg[# Loop through the user's path and test for sed and gsed. 824810f94802Smrg# Then use that list of sed's as ones to test for truncation. 824910f94802Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 825010f94802Smrgfor as_dir in $PATH 825110f94802Smrgdo 825210f94802Smrg IFS=$as_save_IFS 825310f94802Smrg test -z "$as_dir" && as_dir=. 825410f94802Smrg for lt_ac_prog in sed gsed; do 825510f94802Smrg for ac_exec_ext in '' $ac_executable_extensions; do 825610f94802Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 825710f94802Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 825810f94802Smrg fi 825910f94802Smrg done 826010f94802Smrg done 826110f94802Smrgdone 826210f94802SmrgIFS=$as_save_IFS 826310f94802Smrglt_ac_max=0 826410f94802Smrglt_ac_count=0 826510f94802Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 826610f94802Smrg# along with /bin/sed that truncates output. 826710f94802Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 826810f94802Smrg test ! -f "$lt_ac_sed" && continue 826910f94802Smrg cat /dev/null > conftest.in 827010f94802Smrg lt_ac_count=0 827110f94802Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 827210f94802Smrg # Check for GNU sed and select it if it is found. 827310f94802Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 827410f94802Smrg lt_cv_path_SED=$lt_ac_sed 827510f94802Smrg break 827610f94802Smrg fi 827710f94802Smrg while true; do 827810f94802Smrg cat conftest.in conftest.in >conftest.tmp 827910f94802Smrg mv conftest.tmp conftest.in 828010f94802Smrg cp conftest.in conftest.nl 828110f94802Smrg echo >>conftest.nl 828210f94802Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 828310f94802Smrg cmp -s conftest.out conftest.nl || break 828410f94802Smrg # 10000 chars as input seems more than enough 828510f94802Smrg test 10 -lt "$lt_ac_count" && break 828610f94802Smrg lt_ac_count=`expr $lt_ac_count + 1` 828710f94802Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 828810f94802Smrg lt_ac_max=$lt_ac_count 828910f94802Smrg lt_cv_path_SED=$lt_ac_sed 829010f94802Smrg fi 829110f94802Smrg done 829210f94802Smrgdone 829310f94802Smrg]) 829410f94802SmrgSED=$lt_cv_path_SED 829510f94802SmrgAC_SUBST([SED]) 829610f94802SmrgAC_MSG_RESULT([$SED]) 829710f94802Smrg])#AC_PROG_SED 829810f94802Smrg])#m4_ifndef 829910f94802Smrg 830010f94802Smrg# Old name: 830110f94802SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 830210f94802Smrgdnl aclocal-1.4 backwards compatibility: 830310f94802Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 830410f94802Smrg 830510f94802Smrg 830610f94802Smrg# _LT_CHECK_SHELL_FEATURES 830710f94802Smrg# ------------------------ 830810f94802Smrg# Find out whether the shell is Bourne or XSI compatible, 830910f94802Smrg# or has some other useful features. 831010f94802Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 831110f94802Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 831210f94802Smrg lt_unset=unset 831310f94802Smrgelse 831410f94802Smrg lt_unset=false 831510f94802Smrgfi 831610f94802Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 831710f94802Smrg 831810f94802Smrg# test EBCDIC or ASCII 831910f94802Smrgcase `echo X|tr X '\101'` in 832010f94802Smrg A) # ASCII based system 832110f94802Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 832210f94802Smrg lt_SP2NL='tr \040 \012' 832310f94802Smrg lt_NL2SP='tr \015\012 \040\040' 832410f94802Smrg ;; 832510f94802Smrg *) # EBCDIC based system 832610f94802Smrg lt_SP2NL='tr \100 \n' 832710f94802Smrg lt_NL2SP='tr \r\n \100\100' 832810f94802Smrg ;; 832910f94802Smrgesac 833010f94802Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 833110f94802Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 833210f94802Smrg])# _LT_CHECK_SHELL_FEATURES 833310f94802Smrg 833410f94802Smrg 833510f94802Smrg# _LT_PATH_CONVERSION_FUNCTIONS 833610f94802Smrg# ----------------------------- 833710f94802Smrg# Determine what file name conversion functions should be used by 833810f94802Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 833910f94802Smrg# for certain cross-compile configurations and native mingw. 834010f94802Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 834110f94802Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 834210f94802SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 834310f94802SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 834410f94802SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 834510f94802Smrg[case $host in 834610f94802Smrg *-*-mingw* ) 834710f94802Smrg case $build in 834810f94802Smrg *-*-mingw* ) # actually msys 834910f94802Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 835010f94802Smrg ;; 835110f94802Smrg *-*-cygwin* ) 835210f94802Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 835310f94802Smrg ;; 835410f94802Smrg * ) # otherwise, assume *nix 835510f94802Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 835610f94802Smrg ;; 835710f94802Smrg esac 835810f94802Smrg ;; 835910f94802Smrg *-*-cygwin* ) 836010f94802Smrg case $build in 836110f94802Smrg *-*-mingw* ) # actually msys 836210f94802Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 836310f94802Smrg ;; 836410f94802Smrg *-*-cygwin* ) 836510f94802Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 836610f94802Smrg ;; 836710f94802Smrg * ) # otherwise, assume *nix 836810f94802Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 836910f94802Smrg ;; 837010f94802Smrg esac 837110f94802Smrg ;; 837210f94802Smrg * ) # unhandled hosts (and "normal" native builds) 837310f94802Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 837410f94802Smrg ;; 837510f94802Smrgesac 837610f94802Smrg]) 837710f94802Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 837810f94802SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 837910f94802Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 838010f94802Smrg [0], [convert $build file names to $host format])dnl 838110f94802Smrg 838210f94802SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 838310f94802SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 838410f94802Smrg[#assume ordinary cross tools, or native build. 838510f94802Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 838610f94802Smrgcase $host in 838710f94802Smrg *-*-mingw* ) 838810f94802Smrg case $build in 838910f94802Smrg *-*-mingw* ) # actually msys 839010f94802Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 839110f94802Smrg ;; 839210f94802Smrg esac 839310f94802Smrg ;; 839410f94802Smrgesac 839510f94802Smrg]) 839610f94802Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 839710f94802SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 839810f94802Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 839910f94802Smrg [0], [convert $build files to toolchain format])dnl 840010f94802Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8401