172af6995Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 272af6995Smrg# 3a773ec55Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 4a773ec55Smrg# Foundation, Inc. 572af6995Smrg# Written by Gordon Matzigkeit, 1996 672af6995Smrg# 772af6995Smrg# This file is free software; the Free Software Foundation gives 872af6995Smrg# unlimited permission to copy and/or distribute it, with or without 972af6995Smrg# modifications, as long as this notice is preserved. 1072af6995Smrg 1172af6995Smrgm4_define([_LT_COPYING], [dnl 1272af6995Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 1372af6995Smrg# This is free software; see the source for copying conditions. There is NO 1472af6995Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 1572af6995Smrg 1672af6995Smrg# GNU Libtool is free software; you can redistribute it and/or modify 1772af6995Smrg# it under the terms of the GNU General Public License as published by 1872af6995Smrg# the Free Software Foundation; either version 2 of of the License, or 1972af6995Smrg# (at your option) any later version. 2072af6995Smrg# 2172af6995Smrg# As a special exception to the GNU General Public License, if you 2272af6995Smrg# distribute this file as part of a program or library that is built 2372af6995Smrg# using GNU Libtool, you may include this file under the same 2472af6995Smrg# distribution terms that you use for the rest of that program. 2572af6995Smrg# 2672af6995Smrg# GNU Libtool is distributed in the hope that it will be useful, but 2772af6995Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2872af6995Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2972af6995Smrg# GNU General Public License for more details. 3072af6995Smrg# 3172af6995Smrg# You should have received a copy of the GNU General Public License 3272af6995Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 3372af6995Smrg]) 3472af6995Smrg 35a773ec55Smrg# serial 59 LT_INIT 3672af6995Smrg 3772af6995Smrg 3872af6995Smrg# LT_PREREQ(VERSION) 3972af6995Smrg# ------------------ 4072af6995Smrg# Complain and exit if this libtool version is less that VERSION. 4172af6995Smrgm4_defun([LT_PREREQ], 4272af6995Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 4372af6995Smrg [m4_default([$3], 4472af6995Smrg [m4_fatal([Libtool version $1 or higher is required], 4572af6995Smrg 63)])], 4672af6995Smrg [$2])]) 4772af6995Smrg 4872af6995Smrg 4972af6995Smrg# _LT_CHECK_BUILDDIR 5072af6995Smrg# ------------------ 5172af6995Smrg# Complain if the absolute build directory name contains unusual characters 5272af6995Smrgm4_defun([_LT_CHECK_BUILDDIR], 5372af6995Smrg[case `pwd` in 5472af6995Smrg *\ * | *\ *) 5572af6995Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 5672af6995Smrgesac 5772af6995Smrg]) 5872af6995Smrg 5972af6995Smrg 6072af6995Smrg# LT_INIT([OPTIONS]) 6172af6995Smrg# ------------------ 6272af6995SmrgAC_DEFUN([LT_INIT], 6372af6995Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 6472af6995SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 6572af6995SmrgAC_BEFORE([$0], [LT_LANG])dnl 6672af6995SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 6772af6995SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 6872af6995Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 6972af6995Smrg 7072af6995Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 7172af6995Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 7272af6995Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 7372af6995Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 7472af6995Smrgdnl unless we require an AC_DEFUNed macro: 7572af6995SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 7672af6995SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 7772af6995SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 7872af6995SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 7972af6995Smrgm4_require([_LT_PROG_LTMAIN])dnl 8072af6995Smrg 8172af6995Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 8272af6995Smrg 8372af6995Smrgdnl Parse OPTIONS 8472af6995Smrg_LT_SET_OPTIONS([$0], [$1]) 8572af6995Smrg 8672af6995Smrg# This can be used to rebuild libtool when needed 8772af6995SmrgLIBTOOL_DEPS=$ltmain 8872af6995Smrg 8972af6995Smrg# Always use our own libtool. 9072af6995SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 9172af6995SmrgAC_SUBST(LIBTOOL)dnl 9272af6995Smrg 9372af6995Smrg_LT_SETUP 9472af6995Smrg 9572af6995Smrg# Only expand once: 9672af6995Smrgm4_define([LT_INIT]) 9772af6995Smrg])# LT_INIT 9872af6995Smrg 9972af6995Smrg# Old names: 10072af6995SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 10172af6995SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 10272af6995Smrgdnl aclocal-1.4 backwards compatibility: 10372af6995Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 10472af6995Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 10572af6995Smrg 10672af6995Smrg 10772af6995Smrg# _LT_PREPARE_CC_BASENAME 10872af6995Smrg# ----------------------- 10972af6995Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 11072af6995Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 11172af6995Smrgfunc_cc_basename () 11272af6995Smrg{ 11372af6995Smrg for cc_temp in @S|@*""; do 11472af6995Smrg case $cc_temp in 11572af6995Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 11672af6995Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 11772af6995Smrg \-*) ;; 11872af6995Smrg *) break;; 11972af6995Smrg esac 12072af6995Smrg done 12172af6995Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 12272af6995Smrg} 12372af6995Smrg])# _LT_PREPARE_CC_BASENAME 12472af6995Smrg 12572af6995Smrg 12672af6995Smrg# _LT_CC_BASENAME(CC) 12772af6995Smrg# ------------------- 12872af6995Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 12972af6995Smrg# but that macro is also expanded into generated libtool script, which 13072af6995Smrg# arranges for $SED and $ECHO to be set by different means. 13172af6995Smrgm4_defun([_LT_CC_BASENAME], 13272af6995Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 13372af6995SmrgAC_REQUIRE([_LT_DECL_SED])dnl 13472af6995SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 13572af6995Smrgfunc_cc_basename $1 13672af6995Smrgcc_basename=$func_cc_basename_result 13772af6995Smrg]) 13872af6995Smrg 13972af6995Smrg 14072af6995Smrg# _LT_FILEUTILS_DEFAULTS 14172af6995Smrg# ---------------------- 14272af6995Smrg# It is okay to use these file commands and assume they have been set 14372af6995Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 14472af6995Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 14572af6995Smrg[: ${CP="cp -f"} 14672af6995Smrg: ${MV="mv -f"} 14772af6995Smrg: ${RM="rm -f"} 14872af6995Smrg])# _LT_FILEUTILS_DEFAULTS 14972af6995Smrg 15072af6995Smrg 15172af6995Smrg# _LT_SETUP 15272af6995Smrg# --------- 15372af6995Smrgm4_defun([_LT_SETUP], 15472af6995Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 15572af6995SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 15672af6995SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 15772af6995SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 15872af6995Smrg 15972af6995Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 16072af6995Smrgdnl 16172af6995Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 16272af6995Smrg_LT_DECL([], [host], [0])dnl 16372af6995Smrg_LT_DECL([], [host_os], [0])dnl 16472af6995Smrgdnl 16572af6995Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 16672af6995Smrg_LT_DECL([], [build], [0])dnl 16772af6995Smrg_LT_DECL([], [build_os], [0])dnl 16872af6995Smrgdnl 16972af6995SmrgAC_REQUIRE([AC_PROG_CC])dnl 17072af6995SmrgAC_REQUIRE([LT_PATH_LD])dnl 17172af6995SmrgAC_REQUIRE([LT_PATH_NM])dnl 17272af6995Smrgdnl 17372af6995SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 17472af6995Smrgtest -z "$LN_S" && LN_S="ln -s" 17572af6995Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 17672af6995Smrgdnl 17772af6995SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 17872af6995Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 17972af6995Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 18072af6995Smrgdnl 18172af6995Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 18272af6995Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 18372af6995Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 18472af6995Smrgm4_require([_LT_CMD_RELOAD])dnl 185a773ec55Smrgm4_require([_LT_DECL_FILECMD])dnl 18672af6995Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 18772af6995Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 18872af6995Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 18972af6995Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 19072af6995Smrgm4_require([_LT_WITH_SYSROOT])dnl 19172af6995Smrgm4_require([_LT_CMD_TRUNCATE])dnl 19272af6995Smrg 19372af6995Smrg_LT_CONFIG_LIBTOOL_INIT([ 19472af6995Smrg# See if we are running on zsh, and set the options that allow our 19572af6995Smrg# commands through without removal of \ escapes INIT. 19672af6995Smrgif test -n "\${ZSH_VERSION+set}"; then 19772af6995Smrg setopt NO_GLOB_SUBST 19872af6995Smrgfi 19972af6995Smrg]) 20072af6995Smrgif test -n "${ZSH_VERSION+set}"; then 20172af6995Smrg setopt NO_GLOB_SUBST 20272af6995Smrgfi 20372af6995Smrg 20472af6995Smrg_LT_CHECK_OBJDIR 20572af6995Smrg 20672af6995Smrgm4_require([_LT_TAG_COMPILER])dnl 20772af6995Smrg 20872af6995Smrgcase $host_os in 20972af6995Smrgaix3*) 21072af6995Smrg # AIX sometimes has problems with the GCC collect2 program. For some 21172af6995Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 21272af6995Smrg # vanish in a puff of smoke. 21372af6995Smrg if test set != "${COLLECT_NAMES+set}"; then 21472af6995Smrg COLLECT_NAMES= 21572af6995Smrg export COLLECT_NAMES 21672af6995Smrg fi 21772af6995Smrg ;; 21872af6995Smrgesac 21972af6995Smrg 22072af6995Smrg# Global variables: 22172af6995Smrgofile=libtool 22272af6995Smrgcan_build_shared=yes 22372af6995Smrg 224a773ec55Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 225a773ec55Smrg# ICC, which need '.lib'). 22672af6995Smrglibext=a 22772af6995Smrg 22872af6995Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 22972af6995Smrg 23072af6995Smrgold_CC=$CC 23172af6995Smrgold_CFLAGS=$CFLAGS 23272af6995Smrg 23372af6995Smrg# Set sane defaults for various variables 23472af6995Smrgtest -z "$CC" && CC=cc 23572af6995Smrgtest -z "$LTCC" && LTCC=$CC 23672af6995Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 23772af6995Smrgtest -z "$LD" && LD=ld 23872af6995Smrgtest -z "$ac_objext" && ac_objext=o 23972af6995Smrg 24072af6995Smrg_LT_CC_BASENAME([$compiler]) 24172af6995Smrg 24272af6995Smrg# Only perform the check for file, if the check method requires it 24372af6995Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 24472af6995Smrgcase $deplibs_check_method in 24572af6995Smrgfile_magic*) 24672af6995Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 24772af6995Smrg _LT_PATH_MAGIC 24872af6995Smrg fi 24972af6995Smrg ;; 25072af6995Smrgesac 25172af6995Smrg 25272af6995Smrg# Use C for the default configuration in the libtool script 25372af6995SmrgLT_SUPPORTED_TAG([CC]) 25472af6995Smrg_LT_LANG_C_CONFIG 25572af6995Smrg_LT_LANG_DEFAULT_CONFIG 25672af6995Smrg_LT_CONFIG_COMMANDS 25772af6995Smrg])# _LT_SETUP 25872af6995Smrg 25972af6995Smrg 26072af6995Smrg# _LT_PREPARE_SED_QUOTE_VARS 26172af6995Smrg# -------------------------- 26272af6995Smrg# Define a few sed substitution that help us do robust quoting. 26372af6995Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 26472af6995Smrg[# Backslashify metacharacters that are still active within 26572af6995Smrg# double-quoted strings. 26672af6995Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 26772af6995Smrg 26872af6995Smrg# Same as above, but do not quote variable references. 26972af6995Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 27072af6995Smrg 27172af6995Smrg# Sed substitution to delay expansion of an escaped shell variable in a 27272af6995Smrg# double_quote_subst'ed string. 27372af6995Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 27472af6995Smrg 27572af6995Smrg# Sed substitution to delay expansion of an escaped single quote. 27672af6995Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 27772af6995Smrg 27872af6995Smrg# Sed substitution to avoid accidental globbing in evaled expressions 27972af6995Smrgno_glob_subst='s/\*/\\\*/g' 28072af6995Smrg]) 28172af6995Smrg 28272af6995Smrg# _LT_PROG_LTMAIN 28372af6995Smrg# --------------- 28472af6995Smrg# Note that this code is called both from 'configure', and 'config.status' 28572af6995Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 28672af6995Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 28772af6995Smrg# so we pass a copy along to make sure it has a sensible value anyway. 28872af6995Smrgm4_defun([_LT_PROG_LTMAIN], 28972af6995Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 29072af6995Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 29172af6995Smrgltmain=$ac_aux_dir/ltmain.sh 29272af6995Smrg])# _LT_PROG_LTMAIN 29372af6995Smrg 29472af6995Smrg 29572af6995Smrg## ------------------------------------- ## 29672af6995Smrg## Accumulate code for creating libtool. ## 29772af6995Smrg## ------------------------------------- ## 29872af6995Smrg 29972af6995Smrg# So that we can recreate a full libtool script including additional 30072af6995Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 30172af6995Smrg# in macros and then make a single call at the end using the 'libtool' 30272af6995Smrg# label. 30372af6995Smrg 30472af6995Smrg 30572af6995Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 30672af6995Smrg# ---------------------------------------- 30772af6995Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 30872af6995Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 30972af6995Smrg[m4_ifval([$1], 31072af6995Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 31172af6995Smrg [$1 31272af6995Smrg])])]) 31372af6995Smrg 31472af6995Smrg# Initialize. 31572af6995Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 31672af6995Smrg 31772af6995Smrg 31872af6995Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 31972af6995Smrg# ------------------------------ 32072af6995Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 32172af6995Smrgm4_define([_LT_CONFIG_LIBTOOL], 32272af6995Smrg[m4_ifval([$1], 32372af6995Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 32472af6995Smrg [$1 32572af6995Smrg])])]) 32672af6995Smrg 32772af6995Smrg# Initialize. 32872af6995Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 32972af6995Smrg 33072af6995Smrg 33172af6995Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 33272af6995Smrg# ----------------------------------------------------- 33372af6995Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 33472af6995Smrg[_LT_CONFIG_LIBTOOL([$1]) 33572af6995Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 33672af6995Smrg]) 33772af6995Smrg 33872af6995Smrg 33972af6995Smrg# _LT_FORMAT_COMMENT([COMMENT]) 34072af6995Smrg# ----------------------------- 34172af6995Smrg# Add leading comment marks to the start of each line, and a trailing 34272af6995Smrg# full-stop to the whole comment if one is not present already. 34372af6995Smrgm4_define([_LT_FORMAT_COMMENT], 34472af6995Smrg[m4_ifval([$1], [ 34572af6995Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 34672af6995Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 34772af6995Smrg)]) 34872af6995Smrg 34972af6995Smrg 35072af6995Smrg 35172af6995Smrg## ------------------------ ## 35272af6995Smrg## FIXME: Eliminate VARNAME ## 35372af6995Smrg## ------------------------ ## 35472af6995Smrg 35572af6995Smrg 35672af6995Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 35772af6995Smrg# ------------------------------------------------------------------- 35872af6995Smrg# CONFIGNAME is the name given to the value in the libtool script. 35972af6995Smrg# VARNAME is the (base) name used in the configure script. 36072af6995Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 36172af6995Smrg# VARNAME. Any other value will be used directly. 36272af6995Smrgm4_define([_LT_DECL], 36372af6995Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 36472af6995Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 36572af6995Smrg [m4_ifval([$1], [$1], [$2])]) 36672af6995Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 36772af6995Smrg m4_ifval([$4], 36872af6995Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 36972af6995Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 37072af6995Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 37172af6995Smrg]) 37272af6995Smrg 37372af6995Smrg 37472af6995Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 37572af6995Smrg# -------------------------------------------------------- 37672af6995Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 37772af6995Smrg 37872af6995Smrg 37972af6995Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 38072af6995Smrg# ------------------------------------------------ 38172af6995Smrgm4_define([lt_decl_tag_varnames], 38272af6995Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 38372af6995Smrg 38472af6995Smrg 38572af6995Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 38672af6995Smrg# --------------------------------------------------------- 38772af6995Smrgm4_define([_lt_decl_filter], 38872af6995Smrg[m4_case([$#], 38972af6995Smrg [0], [m4_fatal([$0: too few arguments: $#])], 39072af6995Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 39172af6995Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 39272af6995Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 39372af6995Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 39472af6995Smrg]) 39572af6995Smrg 39672af6995Smrg 39772af6995Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 39872af6995Smrg# -------------------------------------------------- 39972af6995Smrgm4_define([lt_decl_quote_varnames], 40072af6995Smrg[_lt_decl_filter([value], [1], $@)]) 40172af6995Smrg 40272af6995Smrg 40372af6995Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 40472af6995Smrg# --------------------------------------------------- 40572af6995Smrgm4_define([lt_decl_dquote_varnames], 40672af6995Smrg[_lt_decl_filter([value], [2], $@)]) 40772af6995Smrg 40872af6995Smrg 40972af6995Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 41072af6995Smrg# --------------------------------------------------- 41172af6995Smrgm4_define([lt_decl_varnames_tagged], 41272af6995Smrg[m4_assert([$# <= 2])dnl 41372af6995Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 41472af6995Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 41572af6995Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 41672af6995Smrgm4_define([_lt_decl_varnames_tagged], 41772af6995Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 41872af6995Smrg 41972af6995Smrg 42072af6995Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 42172af6995Smrg# ------------------------------------------------ 42272af6995Smrgm4_define([lt_decl_all_varnames], 42372af6995Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 42472af6995Smrg m4_if([$2], [], 42572af6995Smrg m4_quote(lt_decl_varnames), 42672af6995Smrg m4_quote(m4_shift($@))))[]dnl 42772af6995Smrg]) 42872af6995Smrgm4_define([_lt_decl_all_varnames], 42972af6995Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 43072af6995Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 43172af6995Smrg]) 43272af6995Smrg 43372af6995Smrg 43472af6995Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 43572af6995Smrg# ------------------------------------ 43672af6995Smrg# Quote a variable value, and forward it to 'config.status' so that its 43772af6995Smrg# declaration there will have the same value as in 'configure'. VARNAME 43872af6995Smrg# must have a single quote delimited value for this to work. 43972af6995Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 44072af6995Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 44172af6995Smrg 44272af6995Smrg 44372af6995Smrg# _LT_CONFIG_STATUS_DECLARATIONS 44472af6995Smrg# ------------------------------ 44572af6995Smrg# We delimit libtool config variables with single quotes, so when 44672af6995Smrg# we write them to config.status, we have to be sure to quote all 44772af6995Smrg# embedded single quotes properly. In configure, this macro expands 44872af6995Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 44972af6995Smrg# 45072af6995Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 45172af6995Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 45272af6995Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 45372af6995Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 45472af6995Smrg 45572af6995Smrg 45672af6995Smrg# _LT_LIBTOOL_TAGS 45772af6995Smrg# ---------------- 45872af6995Smrg# Output comment and list of tags supported by the script 45972af6995Smrgm4_defun([_LT_LIBTOOL_TAGS], 46072af6995Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 46172af6995Smrgavailable_tags='_LT_TAGS'dnl 46272af6995Smrg]) 46372af6995Smrg 46472af6995Smrg 46572af6995Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 46672af6995Smrg# ----------------------------------- 46772af6995Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 46872af6995Smrg# expand to a commented shell variable setting: 46972af6995Smrg# 47072af6995Smrg# # Some comment about what VAR is for. 47172af6995Smrg# visible_name=$lt_internal_name 47272af6995Smrgm4_define([_LT_LIBTOOL_DECLARE], 47372af6995Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 47472af6995Smrg [description])))[]dnl 47572af6995Smrgm4_pushdef([_libtool_name], 47672af6995Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 47772af6995Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 47872af6995Smrg [0], [_libtool_name=[$]$1], 47972af6995Smrg [1], [_libtool_name=$lt_[]$1], 48072af6995Smrg [2], [_libtool_name=$lt_[]$1], 48172af6995Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 48272af6995Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 48372af6995Smrg]) 48472af6995Smrg 48572af6995Smrg 48672af6995Smrg# _LT_LIBTOOL_CONFIG_VARS 48772af6995Smrg# ----------------------- 48872af6995Smrg# Produce commented declarations of non-tagged libtool config variables 48972af6995Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 49072af6995Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 49172af6995Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 49272af6995Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 49372af6995Smrg[m4_foreach([_lt_var], 49472af6995Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 49572af6995Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 49672af6995Smrg 49772af6995Smrg 49872af6995Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 49972af6995Smrg# ------------------------- 50072af6995Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 50172af6995Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 50272af6995Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 50372af6995Smrg 50472af6995Smrg 50572af6995Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 50672af6995Smrg# ------------------------------ 50772af6995Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 50872af6995Smrg 50972af6995Smrg 51072af6995Smrg# _LT_CONFIG_COMMANDS 51172af6995Smrg# ------------------- 51272af6995Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 51372af6995Smrg# variables for single and double quote escaping we saved from calls 51472af6995Smrg# to _LT_DECL, we can put quote escaped variables declarations 51572af6995Smrg# into 'config.status', and then the shell code to quote escape them in 51672af6995Smrg# for loops in 'config.status'. Finally, any additional code accumulated 51772af6995Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 51872af6995Smrgm4_defun([_LT_CONFIG_COMMANDS], 51972af6995Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 52072af6995Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 52172af6995Smrg dnl instead of duplicating it all over again into config.status, 52272af6995Smrg dnl then we will have config.status run $CONFIG_LT later, so it 52372af6995Smrg dnl needs to know what name is stored there: 52472af6995Smrg [AC_CONFIG_COMMANDS([libtool], 52572af6995Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 52672af6995Smrg dnl If the libtool generation code is destined for config.status, 52772af6995Smrg dnl expand the accumulated commands and init code now: 52872af6995Smrg [AC_CONFIG_COMMANDS([libtool], 52972af6995Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 53072af6995Smrg])#_LT_CONFIG_COMMANDS 53172af6995Smrg 53272af6995Smrg 53372af6995Smrg# Initialize. 53472af6995Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 53572af6995Smrg[ 53672af6995Smrg 53772af6995Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 53872af6995Smrg# if CDPATH is set. 53972af6995Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 54072af6995Smrg 54172af6995Smrgsed_quote_subst='$sed_quote_subst' 54272af6995Smrgdouble_quote_subst='$double_quote_subst' 54372af6995Smrgdelay_variable_subst='$delay_variable_subst' 54472af6995Smrg_LT_CONFIG_STATUS_DECLARATIONS 54572af6995SmrgLTCC='$LTCC' 54672af6995SmrgLTCFLAGS='$LTCFLAGS' 54772af6995Smrgcompiler='$compiler_DEFAULT' 54872af6995Smrg 54972af6995Smrg# A function that is used when there is no print builtin or printf. 55072af6995Smrgfunc_fallback_echo () 55172af6995Smrg{ 55272af6995Smrg eval 'cat <<_LTECHO_EOF 55372af6995Smrg\$[]1 55472af6995Smrg_LTECHO_EOF' 55572af6995Smrg} 55672af6995Smrg 55772af6995Smrg# Quote evaled strings. 55872af6995Smrgfor var in lt_decl_all_varnames([[ \ 55972af6995Smrg]], lt_decl_quote_varnames); do 56072af6995Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 56172af6995Smrg *[[\\\\\\\`\\"\\\$]]*) 56272af6995Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 56372af6995Smrg ;; 56472af6995Smrg *) 56572af6995Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 56672af6995Smrg ;; 56772af6995Smrg esac 56872af6995Smrgdone 56972af6995Smrg 57072af6995Smrg# Double-quote double-evaled strings. 57172af6995Smrgfor var in lt_decl_all_varnames([[ \ 57272af6995Smrg]], lt_decl_dquote_varnames); do 57372af6995Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 57472af6995Smrg *[[\\\\\\\`\\"\\\$]]*) 57572af6995Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 57672af6995Smrg ;; 57772af6995Smrg *) 57872af6995Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 57972af6995Smrg ;; 58072af6995Smrg esac 58172af6995Smrgdone 58272af6995Smrg 58372af6995Smrg_LT_OUTPUT_LIBTOOL_INIT 58472af6995Smrg]) 58572af6995Smrg 58672af6995Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 58772af6995Smrg# ------------------------------------ 58872af6995Smrg# Generate a child script FILE with all initialization necessary to 58972af6995Smrg# reuse the environment learned by the parent script, and make the 59072af6995Smrg# file executable. If COMMENT is supplied, it is inserted after the 59172af6995Smrg# '#!' sequence but before initialization text begins. After this 59272af6995Smrg# macro, additional text can be appended to FILE to form the body of 59372af6995Smrg# the child script. The macro ends with non-zero status if the 59472af6995Smrg# file could not be fully written (such as if the disk is full). 59572af6995Smrgm4_ifdef([AS_INIT_GENERATED], 59672af6995Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 59772af6995Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 59872af6995Smrg[m4_require([AS_PREPARE])]dnl 59972af6995Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 60072af6995Smrg[lt_write_fail=0 60172af6995Smrgcat >$1 <<_ASEOF || lt_write_fail=1 60272af6995Smrg#! $SHELL 60372af6995Smrg# Generated by $as_me. 60472af6995Smrg$2 60572af6995SmrgSHELL=\${CONFIG_SHELL-$SHELL} 60672af6995Smrgexport SHELL 60772af6995Smrg_ASEOF 60872af6995Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 60972af6995SmrgAS_SHELL_SANITIZE 61072af6995Smrg_AS_PREPARE 61172af6995Smrgexec AS_MESSAGE_FD>&1 61272af6995Smrg_ASEOF 61372af6995Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 61472af6995Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 61572af6995Smrg 61672af6995Smrg# LT_OUTPUT 61772af6995Smrg# --------- 61872af6995Smrg# This macro allows early generation of the libtool script (before 61972af6995Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 62072af6995Smrg# tests. 62172af6995SmrgAC_DEFUN([LT_OUTPUT], 62272af6995Smrg[: ${CONFIG_LT=./config.lt} 62372af6995SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 62472af6995Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 62572af6995Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 62672af6995Smrg 62772af6995Smrgcat >>"$CONFIG_LT" <<\_LTEOF 62872af6995Smrglt_cl_silent=false 62972af6995Smrgexec AS_MESSAGE_LOG_FD>>config.log 63072af6995Smrg{ 63172af6995Smrg echo 63272af6995Smrg AS_BOX([Running $as_me.]) 63372af6995Smrg} >&AS_MESSAGE_LOG_FD 63472af6995Smrg 63572af6995Smrglt_cl_help="\ 63672af6995Smrg'$as_me' creates a local libtool stub from the current configuration, 63772af6995Smrgfor use in further configure time tests before the real libtool is 63872af6995Smrggenerated. 63972af6995Smrg 64072af6995SmrgUsage: $[0] [[OPTIONS]] 64172af6995Smrg 64272af6995Smrg -h, --help print this help, then exit 64372af6995Smrg -V, --version print version number, then exit 64472af6995Smrg -q, --quiet do not print progress messages 64572af6995Smrg -d, --debug don't remove temporary files 64672af6995Smrg 64772af6995SmrgReport bugs to <bug-libtool@gnu.org>." 64872af6995Smrg 64972af6995Smrglt_cl_version="\ 65072af6995Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 65172af6995Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 65272af6995Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 65372af6995Smrg 65472af6995SmrgCopyright (C) 2011 Free Software Foundation, Inc. 65572af6995SmrgThis config.lt script is free software; the Free Software Foundation 65672af6995Smrggives unlimited permision to copy, distribute and modify it." 65772af6995Smrg 65872af6995Smrgwhile test 0 != $[#] 65972af6995Smrgdo 66072af6995Smrg case $[1] in 66172af6995Smrg --version | --v* | -V ) 66272af6995Smrg echo "$lt_cl_version"; exit 0 ;; 66372af6995Smrg --help | --h* | -h ) 66472af6995Smrg echo "$lt_cl_help"; exit 0 ;; 66572af6995Smrg --debug | --d* | -d ) 66672af6995Smrg debug=: ;; 66772af6995Smrg --quiet | --q* | --silent | --s* | -q ) 66872af6995Smrg lt_cl_silent=: ;; 66972af6995Smrg 67072af6995Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 67172af6995SmrgTry '$[0] --help' for more information.]) ;; 67272af6995Smrg 67372af6995Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 67472af6995SmrgTry '$[0] --help' for more information.]) ;; 67572af6995Smrg esac 67672af6995Smrg shift 67772af6995Smrgdone 67872af6995Smrg 67972af6995Smrgif $lt_cl_silent; then 68072af6995Smrg exec AS_MESSAGE_FD>/dev/null 68172af6995Smrgfi 68272af6995Smrg_LTEOF 68372af6995Smrg 68472af6995Smrgcat >>"$CONFIG_LT" <<_LTEOF 68572af6995Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 68672af6995Smrg_LTEOF 68772af6995Smrg 68872af6995Smrgcat >>"$CONFIG_LT" <<\_LTEOF 68972af6995SmrgAC_MSG_NOTICE([creating $ofile]) 69072af6995Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 69172af6995SmrgAS_EXIT(0) 69272af6995Smrg_LTEOF 69372af6995Smrgchmod +x "$CONFIG_LT" 69472af6995Smrg 69572af6995Smrg# configure is writing to config.log, but config.lt does its own redirection, 69672af6995Smrg# appending to config.log, which fails on DOS, as config.log is still kept 69772af6995Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 69872af6995Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 69972af6995Smrglt_cl_success=: 70072af6995Smrgtest yes = "$silent" && 70172af6995Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 70272af6995Smrgexec AS_MESSAGE_LOG_FD>/dev/null 70372af6995Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 70472af6995Smrgexec AS_MESSAGE_LOG_FD>>config.log 70572af6995Smrg$lt_cl_success || AS_EXIT(1) 70672af6995Smrg])# LT_OUTPUT 70772af6995Smrg 70872af6995Smrg 70972af6995Smrg# _LT_CONFIG(TAG) 71072af6995Smrg# --------------- 71172af6995Smrg# If TAG is the built-in tag, create an initial libtool script with a 71272af6995Smrg# default configuration from the untagged config vars. Otherwise add code 71372af6995Smrg# to config.status for appending the configuration named by TAG from the 71472af6995Smrg# matching tagged config vars. 71572af6995Smrgm4_defun([_LT_CONFIG], 71672af6995Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 71772af6995Smrg_LT_CONFIG_SAVE_COMMANDS([ 71872af6995Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 71972af6995Smrg m4_if(_LT_TAG, [C], [ 72072af6995Smrg # See if we are running on zsh, and set the options that allow our 72172af6995Smrg # commands through without removal of \ escapes. 72272af6995Smrg if test -n "${ZSH_VERSION+set}"; then 72372af6995Smrg setopt NO_GLOB_SUBST 72472af6995Smrg fi 72572af6995Smrg 72672af6995Smrg cfgfile=${ofile}T 72772af6995Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 72872af6995Smrg $RM "$cfgfile" 72972af6995Smrg 73072af6995Smrg cat <<_LT_EOF >> "$cfgfile" 73172af6995Smrg#! $SHELL 73272af6995Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 733362b94d5Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 73472af6995Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 73572af6995Smrg 73672af6995Smrg# Provide generalized library-building support services. 73772af6995Smrg# Written by Gordon Matzigkeit, 1996 73872af6995Smrg 73972af6995Smrg_LT_COPYING 74072af6995Smrg_LT_LIBTOOL_TAGS 74172af6995Smrg 74272af6995Smrg# Configured defaults for sys_lib_dlsearch_path munging. 74372af6995Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 74472af6995Smrg 74572af6995Smrg# ### BEGIN LIBTOOL CONFIG 74672af6995Smrg_LT_LIBTOOL_CONFIG_VARS 74772af6995Smrg_LT_LIBTOOL_TAG_VARS 74872af6995Smrg# ### END LIBTOOL CONFIG 74972af6995Smrg 75072af6995Smrg_LT_EOF 75172af6995Smrg 75272af6995Smrg cat <<'_LT_EOF' >> "$cfgfile" 75372af6995Smrg 75472af6995Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 75572af6995Smrg 75672af6995Smrg_LT_PREPARE_MUNGE_PATH_LIST 75772af6995Smrg_LT_PREPARE_CC_BASENAME 75872af6995Smrg 75972af6995Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 76072af6995Smrg 76172af6995Smrg_LT_EOF 76272af6995Smrg 76372af6995Smrg case $host_os in 76472af6995Smrg aix3*) 76572af6995Smrg cat <<\_LT_EOF >> "$cfgfile" 76672af6995Smrg# AIX sometimes has problems with the GCC collect2 program. For some 76772af6995Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 76872af6995Smrg# vanish in a puff of smoke. 76972af6995Smrgif test set != "${COLLECT_NAMES+set}"; then 77072af6995Smrg COLLECT_NAMES= 77172af6995Smrg export COLLECT_NAMES 77272af6995Smrgfi 77372af6995Smrg_LT_EOF 77472af6995Smrg ;; 77572af6995Smrg esac 77672af6995Smrg 77772af6995Smrg _LT_PROG_LTMAIN 77872af6995Smrg 77972af6995Smrg # We use sed instead of cat because bash on DJGPP gets confused if 78072af6995Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 78172af6995Smrg # text mode, it properly converts lines to CR/LF. This bash problem 78272af6995Smrg # is reportedly fixed, but why not run on old versions too? 783a773ec55Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 78472af6995Smrg || (rm -f "$cfgfile"; exit 1) 78572af6995Smrg 78672af6995Smrg mv -f "$cfgfile" "$ofile" || 78772af6995Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 78872af6995Smrg chmod +x "$ofile" 78972af6995Smrg], 79072af6995Smrg[cat <<_LT_EOF >> "$ofile" 79172af6995Smrg 79272af6995Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 79372af6995Smrgdnl in a comment (ie after a #). 79472af6995Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 79572af6995Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 79672af6995Smrg# ### END LIBTOOL TAG CONFIG: $1 79772af6995Smrg_LT_EOF 79872af6995Smrg])dnl /m4_if 79972af6995Smrg], 80072af6995Smrg[m4_if([$1], [], [ 80172af6995Smrg PACKAGE='$PACKAGE' 80272af6995Smrg VERSION='$VERSION' 80372af6995Smrg RM='$RM' 80472af6995Smrg ofile='$ofile'], []) 80572af6995Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 80672af6995Smrg])# _LT_CONFIG 80772af6995Smrg 80872af6995Smrg 80972af6995Smrg# LT_SUPPORTED_TAG(TAG) 81072af6995Smrg# --------------------- 81172af6995Smrg# Trace this macro to discover what tags are supported by the libtool 81272af6995Smrg# --tag option, using: 81372af6995Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 81472af6995SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 81572af6995Smrg 81672af6995Smrg 81772af6995Smrg# C support is built-in for now 81872af6995Smrgm4_define([_LT_LANG_C_enabled], []) 81972af6995Smrgm4_define([_LT_TAGS], []) 82072af6995Smrg 82172af6995Smrg 82272af6995Smrg# LT_LANG(LANG) 82372af6995Smrg# ------------- 82472af6995Smrg# Enable libtool support for the given language if not already enabled. 82572af6995SmrgAC_DEFUN([LT_LANG], 82672af6995Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 82772af6995Smrgm4_case([$1], 82872af6995Smrg [C], [_LT_LANG(C)], 82972af6995Smrg [C++], [_LT_LANG(CXX)], 83072af6995Smrg [Go], [_LT_LANG(GO)], 83172af6995Smrg [Java], [_LT_LANG(GCJ)], 83272af6995Smrg [Fortran 77], [_LT_LANG(F77)], 83372af6995Smrg [Fortran], [_LT_LANG(FC)], 83472af6995Smrg [Windows Resource], [_LT_LANG(RC)], 83572af6995Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 83672af6995Smrg [_LT_LANG($1)], 83772af6995Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 83872af6995Smrg])# LT_LANG 83972af6995Smrg 84072af6995Smrg 84172af6995Smrg# _LT_LANG(LANGNAME) 84272af6995Smrg# ------------------ 84372af6995Smrgm4_defun([_LT_LANG], 84472af6995Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 84572af6995Smrg [LT_SUPPORTED_TAG([$1])dnl 84672af6995Smrg m4_append([_LT_TAGS], [$1 ])dnl 84772af6995Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 84872af6995Smrg _LT_LANG_$1_CONFIG($1)])dnl 84972af6995Smrg])# _LT_LANG 85072af6995Smrg 85172af6995Smrg 85272af6995Smrgm4_ifndef([AC_PROG_GO], [ 85372af6995Smrg############################################################ 85472af6995Smrg# NOTE: This macro has been submitted for inclusion into # 85572af6995Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 85672af6995Smrg# a released version of Autoconf we should remove this # 85772af6995Smrg# macro and use it instead. # 85872af6995Smrg############################################################ 85972af6995Smrgm4_defun([AC_PROG_GO], 86072af6995Smrg[AC_LANG_PUSH(Go)dnl 86172af6995SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 86272af6995SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 86372af6995Smrg_AC_ARG_VAR_LDFLAGS()dnl 86472af6995SmrgAC_CHECK_TOOL(GOC, gccgo) 86572af6995Smrgif test -z "$GOC"; then 86672af6995Smrg if test -n "$ac_tool_prefix"; then 86772af6995Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 86872af6995Smrg fi 86972af6995Smrgfi 87072af6995Smrgif test -z "$GOC"; then 87172af6995Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 87272af6995Smrgfi 87372af6995Smrg])#m4_defun 87472af6995Smrg])#m4_ifndef 87572af6995Smrg 87672af6995Smrg 87772af6995Smrg# _LT_LANG_DEFAULT_CONFIG 87872af6995Smrg# ----------------------- 87972af6995Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 88072af6995Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 88172af6995Smrg [LT_LANG(CXX)], 88272af6995Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 88372af6995Smrg 88472af6995SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 88572af6995Smrg [LT_LANG(F77)], 88672af6995Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 88772af6995Smrg 88872af6995SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 88972af6995Smrg [LT_LANG(FC)], 89072af6995Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 89172af6995Smrg 89272af6995Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 89372af6995Smrgdnl pulling things in needlessly. 89472af6995SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 89572af6995Smrg [LT_LANG(GCJ)], 89672af6995Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 89772af6995Smrg [LT_LANG(GCJ)], 89872af6995Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 89972af6995Smrg [LT_LANG(GCJ)], 90072af6995Smrg [m4_ifdef([AC_PROG_GCJ], 90172af6995Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 90272af6995Smrg m4_ifdef([A][M_PROG_GCJ], 90372af6995Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 90472af6995Smrg m4_ifdef([LT_PROG_GCJ], 90572af6995Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 90672af6995Smrg 90772af6995SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 90872af6995Smrg [LT_LANG(GO)], 90972af6995Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 91072af6995Smrg 91172af6995SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 91272af6995Smrg [LT_LANG(RC)], 91372af6995Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 91472af6995Smrg])# _LT_LANG_DEFAULT_CONFIG 91572af6995Smrg 91672af6995Smrg# Obsolete macros: 91772af6995SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 91872af6995SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 91972af6995SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 92072af6995SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 92172af6995SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 92272af6995Smrgdnl aclocal-1.4 backwards compatibility: 92372af6995Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 92472af6995Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 92572af6995Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 92672af6995Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 92772af6995Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 92872af6995Smrg 92972af6995Smrg 93072af6995Smrg# _LT_TAG_COMPILER 93172af6995Smrg# ---------------- 93272af6995Smrgm4_defun([_LT_TAG_COMPILER], 93372af6995Smrg[AC_REQUIRE([AC_PROG_CC])dnl 93472af6995Smrg 93572af6995Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 93672af6995Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 93772af6995Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 93872af6995Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 93972af6995Smrg 94072af6995Smrg# If no C compiler was specified, use CC. 94172af6995SmrgLTCC=${LTCC-"$CC"} 94272af6995Smrg 94372af6995Smrg# If no C compiler flags were specified, use CFLAGS. 94472af6995SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 94572af6995Smrg 94672af6995Smrg# Allow CC to be a program name with arguments. 94772af6995Smrgcompiler=$CC 94872af6995Smrg])# _LT_TAG_COMPILER 94972af6995Smrg 95072af6995Smrg 95172af6995Smrg# _LT_COMPILER_BOILERPLATE 95272af6995Smrg# ------------------------ 95372af6995Smrg# Check for compiler boilerplate output or warnings with 95472af6995Smrg# the simple compiler test code. 95572af6995Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 95672af6995Smrg[m4_require([_LT_DECL_SED])dnl 95772af6995Smrgac_outfile=conftest.$ac_objext 95872af6995Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 95972af6995Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 96072af6995Smrg_lt_compiler_boilerplate=`cat conftest.err` 96172af6995Smrg$RM conftest* 96272af6995Smrg])# _LT_COMPILER_BOILERPLATE 96372af6995Smrg 96472af6995Smrg 96572af6995Smrg# _LT_LINKER_BOILERPLATE 96672af6995Smrg# ---------------------- 96772af6995Smrg# Check for linker boilerplate output or warnings with 96872af6995Smrg# the simple link test code. 96972af6995Smrgm4_defun([_LT_LINKER_BOILERPLATE], 97072af6995Smrg[m4_require([_LT_DECL_SED])dnl 97172af6995Smrgac_outfile=conftest.$ac_objext 97272af6995Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 97372af6995Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 97472af6995Smrg_lt_linker_boilerplate=`cat conftest.err` 97572af6995Smrg$RM -r conftest* 97672af6995Smrg])# _LT_LINKER_BOILERPLATE 97772af6995Smrg 97872af6995Smrg# _LT_REQUIRED_DARWIN_CHECKS 97972af6995Smrg# ------------------------- 98072af6995Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 98172af6995Smrg case $host_os in 98272af6995Smrg rhapsody* | darwin*) 98372af6995Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 98472af6995Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 98572af6995Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 98672af6995Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 98772af6995Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 98872af6995Smrg _LT_DECL([], [DSYMUTIL], [1], 98972af6995Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 99072af6995Smrg _LT_DECL([], [NMEDIT], [1], 99172af6995Smrg [Tool to change global to local symbols on Mac OS X]) 99272af6995Smrg _LT_DECL([], [LIPO], [1], 99372af6995Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 99472af6995Smrg _LT_DECL([], [OTOOL], [1], 99572af6995Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 99672af6995Smrg _LT_DECL([], [OTOOL64], [1], 99772af6995Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 99872af6995Smrg 99972af6995Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 100072af6995Smrg [lt_cv_apple_cc_single_mod=no 100172af6995Smrg if test -z "$LT_MULTI_MODULE"; then 100272af6995Smrg # By default we will add the -single_module flag. You can override 100372af6995Smrg # by either setting the environment variable LT_MULTI_MODULE 100472af6995Smrg # non-empty at configure time, or by adding -multi_module to the 100572af6995Smrg # link flags. 100672af6995Smrg rm -rf libconftest.dylib* 100772af6995Smrg echo "int foo(void){return 1;}" > conftest.c 100872af6995Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 100972af6995Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 101072af6995Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 101172af6995Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 101272af6995Smrg _lt_result=$? 101372af6995Smrg # If there is a non-empty error log, and "single_module" 101472af6995Smrg # appears in it, assume the flag caused a linker warning 101572af6995Smrg if test -s conftest.err && $GREP single_module conftest.err; then 101672af6995Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 101772af6995Smrg # Otherwise, if the output was created with a 0 exit code from 101872af6995Smrg # the compiler, it worked. 101972af6995Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 102072af6995Smrg lt_cv_apple_cc_single_mod=yes 102172af6995Smrg else 102272af6995Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 102372af6995Smrg fi 102472af6995Smrg rm -rf libconftest.dylib* 102572af6995Smrg rm -f conftest.* 102672af6995Smrg fi]) 102772af6995Smrg 102872af6995Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 102972af6995Smrg [lt_cv_ld_exported_symbols_list], 103072af6995Smrg [lt_cv_ld_exported_symbols_list=no 103172af6995Smrg save_LDFLAGS=$LDFLAGS 103272af6995Smrg echo "_main" > conftest.sym 103372af6995Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 103472af6995Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 103572af6995Smrg [lt_cv_ld_exported_symbols_list=yes], 103672af6995Smrg [lt_cv_ld_exported_symbols_list=no]) 103772af6995Smrg LDFLAGS=$save_LDFLAGS 103872af6995Smrg ]) 103972af6995Smrg 104072af6995Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 104172af6995Smrg [lt_cv_ld_force_load=no 104272af6995Smrg cat > conftest.c << _LT_EOF 104372af6995Smrgint forced_loaded() { return 2;} 104472af6995Smrg_LT_EOF 104572af6995Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 104672af6995Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1047a773ec55Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1048a773ec55Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 104972af6995Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 105072af6995Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 105172af6995Smrg cat > conftest.c << _LT_EOF 105272af6995Smrgint main() { return 0;} 105372af6995Smrg_LT_EOF 105472af6995Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 105572af6995Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 105672af6995Smrg _lt_result=$? 105772af6995Smrg if test -s conftest.err && $GREP force_load conftest.err; then 105872af6995Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 105972af6995Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 106072af6995Smrg lt_cv_ld_force_load=yes 106172af6995Smrg else 106272af6995Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 106372af6995Smrg fi 106472af6995Smrg rm -f conftest.err libconftest.a conftest conftest.c 106572af6995Smrg rm -rf conftest.dSYM 106672af6995Smrg ]) 106772af6995Smrg case $host_os in 106872af6995Smrg rhapsody* | darwin1.[[012]]) 106972af6995Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 107072af6995Smrg darwin1.*) 107172af6995Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1072a773ec55Smrg darwin*) 1073a773ec55Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 1074a773ec55Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 1075a773ec55Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1076a773ec55Smrg *) 1077a773ec55Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 107872af6995Smrg esac 107972af6995Smrg ;; 108072af6995Smrg esac 108172af6995Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 108272af6995Smrg _lt_dar_single_mod='$single_module' 108372af6995Smrg fi 108472af6995Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 108572af6995Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 108672af6995Smrg else 108772af6995Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 108872af6995Smrg fi 108972af6995Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 109072af6995Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 109172af6995Smrg else 109272af6995Smrg _lt_dsymutil= 109372af6995Smrg fi 109472af6995Smrg ;; 109572af6995Smrg esac 109672af6995Smrg]) 109772af6995Smrg 109872af6995Smrg 109972af6995Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 110072af6995Smrg# --------------------------------- 110172af6995Smrg# Checks for linker and compiler features on darwin 110272af6995Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 110372af6995Smrg[ 110472af6995Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 110572af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 110672af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=no 110772af6995Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 110872af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 110972af6995Smrg if test yes = "$lt_cv_ld_force_load"; then 111072af6995Smrg _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\"`' 111172af6995Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 111272af6995Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 111372af6995Smrg else 111472af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 111572af6995Smrg fi 111672af6995Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 111772af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 111872af6995Smrg case $cc_basename in 111972af6995Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 112072af6995Smrg *) _lt_dar_can_shared=$GCC ;; 112172af6995Smrg esac 112272af6995Smrg if test yes = "$_lt_dar_can_shared"; then 112372af6995Smrg output_verbose_link_cmd=func_echo_all 112472af6995Smrg _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" 112572af6995Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1126a773ec55Smrg _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" 1127a773ec55Smrg _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" 112872af6995Smrg m4_if([$1], [CXX], 112972af6995Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 113072af6995Smrg _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" 1131a773ec55Smrg _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" 113272af6995Smrg fi 113372af6995Smrg],[]) 113472af6995Smrg else 113572af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 113672af6995Smrg fi 113772af6995Smrg]) 113872af6995Smrg 113972af6995Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 114072af6995Smrg# ---------------------------------- 114172af6995Smrg# Links a minimal program and checks the executable 114272af6995Smrg# for the system default hardcoded library path. In most cases, 114372af6995Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 114472af6995Smrg# the location of the communication and MPI libs are included too. 114572af6995Smrg# If we don't find anything, use the default library path according 114672af6995Smrg# to the aix ld manual. 114772af6995Smrg# Store the results from the different compilers for each TAGNAME. 114872af6995Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 114972af6995Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 115072af6995Smrg[m4_require([_LT_DECL_SED])dnl 115172af6995Smrgif test set = "${lt_cv_aix_libpath+set}"; then 115272af6995Smrg aix_libpath=$lt_cv_aix_libpath 115372af6995Smrgelse 115472af6995Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 115572af6995Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 115672af6995Smrg lt_aix_libpath_sed='[ 115772af6995Smrg /Import File Strings/,/^$/ { 115872af6995Smrg /^0/ { 115972af6995Smrg s/^0 *\([^ ]*\) *$/\1/ 116072af6995Smrg p 116172af6995Smrg } 116272af6995Smrg }]' 116372af6995Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 116472af6995Smrg # Check for a 64-bit object if we didn't find anything. 116572af6995Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 116672af6995Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 116772af6995Smrg fi],[]) 116872af6995Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 116972af6995Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 117072af6995Smrg fi 117172af6995Smrg ]) 117272af6995Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 117372af6995Smrgfi 117472af6995Smrg])# _LT_SYS_MODULE_PATH_AIX 117572af6995Smrg 117672af6995Smrg 117772af6995Smrg# _LT_SHELL_INIT(ARG) 117872af6995Smrg# ------------------- 117972af6995Smrgm4_define([_LT_SHELL_INIT], 118072af6995Smrg[m4_divert_text([M4SH-INIT], [$1 118172af6995Smrg])])# _LT_SHELL_INIT 118272af6995Smrg 118372af6995Smrg 118472af6995Smrg 118572af6995Smrg# _LT_PROG_ECHO_BACKSLASH 118672af6995Smrg# ----------------------- 118772af6995Smrg# Find how we can fake an echo command that does not interpret backslash. 118872af6995Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 118972af6995Smrg# of the generated configure script that will find a shell with a builtin 119072af6995Smrg# printf (that we can use as an echo command). 119172af6995Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 119272af6995Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 119372af6995SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 119472af6995SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 119572af6995Smrg 119672af6995SmrgAC_MSG_CHECKING([how to print strings]) 119772af6995Smrg# Test print first, because it will be a builtin if present. 119872af6995Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 119972af6995Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 120072af6995Smrg ECHO='print -r --' 120172af6995Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 120272af6995Smrg ECHO='printf %s\n' 120372af6995Smrgelse 120472af6995Smrg # Use this function as a fallback that always works. 120572af6995Smrg func_fallback_echo () 120672af6995Smrg { 120772af6995Smrg eval 'cat <<_LTECHO_EOF 120872af6995Smrg$[]1 120972af6995Smrg_LTECHO_EOF' 121072af6995Smrg } 121172af6995Smrg ECHO='func_fallback_echo' 121272af6995Smrgfi 121372af6995Smrg 121472af6995Smrg# func_echo_all arg... 121572af6995Smrg# Invoke $ECHO with all args, space-separated. 121672af6995Smrgfunc_echo_all () 121772af6995Smrg{ 121872af6995Smrg $ECHO "$*" 121972af6995Smrg} 122072af6995Smrg 122172af6995Smrgcase $ECHO in 122272af6995Smrg printf*) AC_MSG_RESULT([printf]) ;; 122372af6995Smrg print*) AC_MSG_RESULT([print -r]) ;; 122472af6995Smrg *) AC_MSG_RESULT([cat]) ;; 122572af6995Smrgesac 122672af6995Smrg 122772af6995Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 122872af6995Smrg[_AS_DETECT_SUGGESTED([ 122972af6995Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 123072af6995Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 123172af6995Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 123272af6995Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 123372af6995Smrg PATH=/empty FPATH=/empty; export PATH FPATH 123472af6995Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 123572af6995Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 123672af6995Smrg 123772af6995Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 123872af6995Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 123972af6995Smrg])# _LT_PROG_ECHO_BACKSLASH 124072af6995Smrg 124172af6995Smrg 124272af6995Smrg# _LT_WITH_SYSROOT 124372af6995Smrg# ---------------- 124472af6995SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1245a773ec55Smrg[m4_require([_LT_DECL_SED])dnl 1246a773ec55SmrgAC_MSG_CHECKING([for sysroot]) 124772af6995SmrgAC_ARG_WITH([sysroot], 124872af6995Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 124972af6995Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 125072af6995Smrg if not specified).])], 125172af6995Smrg[], [with_sysroot=no]) 125272af6995Smrg 125372af6995Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 125472af6995Smrgdnl in case the user passed a directory name. 125572af6995Smrglt_sysroot= 125672af6995Smrgcase $with_sysroot in #( 125772af6995Smrg yes) 125872af6995Smrg if test yes = "$GCC"; then 125972af6995Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 126072af6995Smrg fi 126172af6995Smrg ;; #( 126272af6995Smrg /*) 1263a773ec55Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 126472af6995Smrg ;; #( 126572af6995Smrg no|'') 126672af6995Smrg ;; #( 126772af6995Smrg *) 126872af6995Smrg AC_MSG_RESULT([$with_sysroot]) 126972af6995Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 127072af6995Smrg ;; 127172af6995Smrgesac 127272af6995Smrg 127372af6995Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 127472af6995Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 127572af6995Smrg[dependent libraries, and where our libraries should be installed.])]) 127672af6995Smrg 127772af6995Smrg# _LT_ENABLE_LOCK 127872af6995Smrg# --------------- 127972af6995Smrgm4_defun([_LT_ENABLE_LOCK], 128072af6995Smrg[AC_ARG_ENABLE([libtool-lock], 128172af6995Smrg [AS_HELP_STRING([--disable-libtool-lock], 128272af6995Smrg [avoid locking (might break parallel builds)])]) 128372af6995Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 128472af6995Smrg 128572af6995Smrg# Some flags need to be propagated to the compiler or linker for good 128672af6995Smrg# libtool support. 128772af6995Smrgcase $host in 128872af6995Smrgia64-*-hpux*) 128972af6995Smrg # Find out what ABI is being produced by ac_compile, and set mode 129072af6995Smrg # options accordingly. 129172af6995Smrg echo 'int i;' > conftest.$ac_ext 129272af6995Smrg if AC_TRY_EVAL(ac_compile); then 1293a773ec55Smrg case `$FILECMD conftest.$ac_objext` in 129472af6995Smrg *ELF-32*) 129572af6995Smrg HPUX_IA64_MODE=32 129672af6995Smrg ;; 129772af6995Smrg *ELF-64*) 129872af6995Smrg HPUX_IA64_MODE=64 129972af6995Smrg ;; 130072af6995Smrg esac 130172af6995Smrg fi 130272af6995Smrg rm -rf conftest* 130372af6995Smrg ;; 130472af6995Smrg*-*-irix6*) 130572af6995Smrg # Find out what ABI is being produced by ac_compile, and set linker 130672af6995Smrg # options accordingly. 130772af6995Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 130872af6995Smrg if AC_TRY_EVAL(ac_compile); then 130972af6995Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 1310a773ec55Smrg case `$FILECMD conftest.$ac_objext` in 131172af6995Smrg *32-bit*) 131272af6995Smrg LD="${LD-ld} -melf32bsmip" 131372af6995Smrg ;; 131472af6995Smrg *N32*) 131572af6995Smrg LD="${LD-ld} -melf32bmipn32" 131672af6995Smrg ;; 131772af6995Smrg *64-bit*) 131872af6995Smrg LD="${LD-ld} -melf64bmip" 131972af6995Smrg ;; 132072af6995Smrg esac 132172af6995Smrg else 1322a773ec55Smrg case `$FILECMD conftest.$ac_objext` in 132372af6995Smrg *32-bit*) 132472af6995Smrg LD="${LD-ld} -32" 132572af6995Smrg ;; 132672af6995Smrg *N32*) 132772af6995Smrg LD="${LD-ld} -n32" 132872af6995Smrg ;; 132972af6995Smrg *64-bit*) 133072af6995Smrg LD="${LD-ld} -64" 133172af6995Smrg ;; 133272af6995Smrg esac 133372af6995Smrg fi 133472af6995Smrg fi 133572af6995Smrg rm -rf conftest* 133672af6995Smrg ;; 133772af6995Smrg 133872af6995Smrgmips64*-*linux*) 133972af6995Smrg # Find out what ABI is being produced by ac_compile, and set linker 134072af6995Smrg # options accordingly. 134172af6995Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 134272af6995Smrg if AC_TRY_EVAL(ac_compile); then 134372af6995Smrg emul=elf 1344a773ec55Smrg case `$FILECMD conftest.$ac_objext` in 134572af6995Smrg *32-bit*) 134672af6995Smrg emul="${emul}32" 134772af6995Smrg ;; 134872af6995Smrg *64-bit*) 134972af6995Smrg emul="${emul}64" 135072af6995Smrg ;; 135172af6995Smrg esac 1352a773ec55Smrg case `$FILECMD conftest.$ac_objext` in 135372af6995Smrg *MSB*) 135472af6995Smrg emul="${emul}btsmip" 135572af6995Smrg ;; 135672af6995Smrg *LSB*) 135772af6995Smrg emul="${emul}ltsmip" 135872af6995Smrg ;; 135972af6995Smrg esac 1360a773ec55Smrg case `$FILECMD conftest.$ac_objext` in 136172af6995Smrg *N32*) 136272af6995Smrg emul="${emul}n32" 136372af6995Smrg ;; 136472af6995Smrg esac 136572af6995Smrg LD="${LD-ld} -m $emul" 136672af6995Smrg fi 136772af6995Smrg rm -rf conftest* 136872af6995Smrg ;; 136972af6995Smrg 137072af6995Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 137172af6995Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 137272af6995Smrg # Find out what ABI is being produced by ac_compile, and set linker 137372af6995Smrg # options accordingly. Note that the listed cases only cover the 137472af6995Smrg # situations where additional linker options are needed (such as when 137572af6995Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 137672af6995Smrg # vice versa); the common cases where no linker options are needed do 137772af6995Smrg # not appear in the list. 137872af6995Smrg echo 'int i;' > conftest.$ac_ext 137972af6995Smrg if AC_TRY_EVAL(ac_compile); then 1380a773ec55Smrg case `$FILECMD conftest.o` in 138172af6995Smrg *32-bit*) 138272af6995Smrg case $host in 138372af6995Smrg x86_64-*kfreebsd*-gnu) 138472af6995Smrg LD="${LD-ld} -m elf_i386_fbsd" 138572af6995Smrg ;; 138672af6995Smrg x86_64-*linux*) 1387a773ec55Smrg case `$FILECMD conftest.o` in 138872af6995Smrg *x86-64*) 138972af6995Smrg LD="${LD-ld} -m elf32_x86_64" 139072af6995Smrg ;; 139172af6995Smrg *) 139272af6995Smrg LD="${LD-ld} -m elf_i386" 139372af6995Smrg ;; 139472af6995Smrg esac 139572af6995Smrg ;; 139672af6995Smrg powerpc64le-*linux*) 139772af6995Smrg LD="${LD-ld} -m elf32lppclinux" 139872af6995Smrg ;; 139972af6995Smrg powerpc64-*linux*) 140072af6995Smrg LD="${LD-ld} -m elf32ppclinux" 140172af6995Smrg ;; 140272af6995Smrg s390x-*linux*) 140372af6995Smrg LD="${LD-ld} -m elf_s390" 140472af6995Smrg ;; 140572af6995Smrg sparc64-*linux*) 140672af6995Smrg LD="${LD-ld} -m elf32_sparc" 140772af6995Smrg ;; 140872af6995Smrg esac 140972af6995Smrg ;; 141072af6995Smrg *64-bit*) 141172af6995Smrg case $host in 141272af6995Smrg x86_64-*kfreebsd*-gnu) 141372af6995Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 141472af6995Smrg ;; 141572af6995Smrg x86_64-*linux*) 141672af6995Smrg LD="${LD-ld} -m elf_x86_64" 141772af6995Smrg ;; 14187854a16aSmrg powerpcle-*linux*|powerpc64le-*linux*) 141972af6995Smrg LD="${LD-ld} -m elf64lppc" 142072af6995Smrg ;; 14217854a16aSmrg powerpc-*linux*|powerpc64-*linux*) 142272af6995Smrg LD="${LD-ld} -m elf64ppc" 142372af6995Smrg ;; 142472af6995Smrg s390*-*linux*|s390*-*tpf*) 142572af6995Smrg LD="${LD-ld} -m elf64_s390" 142672af6995Smrg ;; 142772af6995Smrg sparc*-*linux*) 142872af6995Smrg LD="${LD-ld} -m elf64_sparc" 142972af6995Smrg ;; 143072af6995Smrg esac 143172af6995Smrg ;; 143272af6995Smrg esac 143372af6995Smrg fi 143472af6995Smrg rm -rf conftest* 143572af6995Smrg ;; 143672af6995Smrg 143772af6995Smrg*-*-sco3.2v5*) 143872af6995Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 143972af6995Smrg SAVE_CFLAGS=$CFLAGS 144072af6995Smrg CFLAGS="$CFLAGS -belf" 144172af6995Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 144272af6995Smrg [AC_LANG_PUSH(C) 144372af6995Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 144472af6995Smrg AC_LANG_POP]) 144572af6995Smrg if test yes != "$lt_cv_cc_needs_belf"; then 144672af6995Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 144772af6995Smrg CFLAGS=$SAVE_CFLAGS 144872af6995Smrg fi 144972af6995Smrg ;; 145072af6995Smrg*-*solaris*) 145172af6995Smrg # Find out what ABI is being produced by ac_compile, and set linker 145272af6995Smrg # options accordingly. 145372af6995Smrg echo 'int i;' > conftest.$ac_ext 145472af6995Smrg if AC_TRY_EVAL(ac_compile); then 1455a773ec55Smrg case `$FILECMD conftest.o` in 145672af6995Smrg *64-bit*) 145772af6995Smrg case $lt_cv_prog_gnu_ld in 145872af6995Smrg yes*) 145972af6995Smrg case $host in 146072af6995Smrg i?86-*-solaris*|x86_64-*-solaris*) 146172af6995Smrg LD="${LD-ld} -m elf_x86_64" 146272af6995Smrg ;; 146372af6995Smrg sparc*-*-solaris*) 146472af6995Smrg LD="${LD-ld} -m elf64_sparc" 146572af6995Smrg ;; 146672af6995Smrg esac 146772af6995Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 146872af6995Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 146972af6995Smrg LD=${LD-ld}_sol2 147072af6995Smrg fi 147172af6995Smrg ;; 147272af6995Smrg *) 147372af6995Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 147472af6995Smrg LD="${LD-ld} -64" 147572af6995Smrg fi 147672af6995Smrg ;; 147772af6995Smrg esac 147872af6995Smrg ;; 147972af6995Smrg esac 148072af6995Smrg fi 148172af6995Smrg rm -rf conftest* 148272af6995Smrg ;; 148372af6995Smrgesac 148472af6995Smrg 148572af6995Smrgneed_locks=$enable_libtool_lock 148672af6995Smrg])# _LT_ENABLE_LOCK 148772af6995Smrg 148872af6995Smrg 148972af6995Smrg# _LT_PROG_AR 149072af6995Smrg# ----------- 149172af6995Smrgm4_defun([_LT_PROG_AR], 149272af6995Smrg[AC_CHECK_TOOLS(AR, [ar], false) 149372af6995Smrg: ${AR=ar} 149472af6995Smrg_LT_DECL([], [AR], [1], [The archiver]) 1495a773ec55Smrg 1496a773ec55Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 1497a773ec55Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 1498a773ec55Smrg# higher priority because thats what people were doing historically (setting 1499a773ec55Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 1500a773ec55Smrg# variable obsoleted/removed. 1501a773ec55Smrg 1502a773ec55Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 1503a773ec55Smrglt_ar_flags=$AR_FLAGS 1504a773ec55Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 1505a773ec55Smrg 1506a773ec55Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 1507a773ec55Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 1508a773ec55Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 1509a773ec55Smrg [Flags to create an archive]) 151072af6995Smrg 151172af6995SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 151272af6995Smrg [lt_cv_ar_at_file=no 151372af6995Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 151472af6995Smrg [echo conftest.$ac_objext > conftest.lst 151572af6995Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 151672af6995Smrg AC_TRY_EVAL([lt_ar_try]) 151772af6995Smrg if test 0 -eq "$ac_status"; then 151872af6995Smrg # Ensure the archiver fails upon bogus file names. 151972af6995Smrg rm -f conftest.$ac_objext libconftest.a 152072af6995Smrg AC_TRY_EVAL([lt_ar_try]) 152172af6995Smrg if test 0 -ne "$ac_status"; then 152272af6995Smrg lt_cv_ar_at_file=@ 152372af6995Smrg fi 152472af6995Smrg fi 152572af6995Smrg rm -f conftest.* libconftest.a 152672af6995Smrg ]) 152772af6995Smrg ]) 152872af6995Smrg 152972af6995Smrgif test no = "$lt_cv_ar_at_file"; then 153072af6995Smrg archiver_list_spec= 153172af6995Smrgelse 153272af6995Smrg archiver_list_spec=$lt_cv_ar_at_file 153372af6995Smrgfi 153472af6995Smrg_LT_DECL([], [archiver_list_spec], [1], 153572af6995Smrg [How to feed a file listing to the archiver]) 153672af6995Smrg])# _LT_PROG_AR 153772af6995Smrg 153872af6995Smrg 153972af6995Smrg# _LT_CMD_OLD_ARCHIVE 154072af6995Smrg# ------------------- 154172af6995Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 154272af6995Smrg[_LT_PROG_AR 154372af6995Smrg 154472af6995SmrgAC_CHECK_TOOL(STRIP, strip, :) 154572af6995Smrgtest -z "$STRIP" && STRIP=: 154672af6995Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 154772af6995Smrg 154872af6995SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 154972af6995Smrgtest -z "$RANLIB" && RANLIB=: 155072af6995Smrg_LT_DECL([], [RANLIB], [1], 155172af6995Smrg [Commands used to install an old-style archive]) 155272af6995Smrg 155372af6995Smrg# Determine commands to create old-style static archives. 155472af6995Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 155572af6995Smrgold_postinstall_cmds='chmod 644 $oldlib' 155672af6995Smrgold_postuninstall_cmds= 155772af6995Smrg 155872af6995Smrgif test -n "$RANLIB"; then 155972af6995Smrg case $host_os in 156072af6995Smrg bitrig* | openbsd*) 156172af6995Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 156272af6995Smrg ;; 156372af6995Smrg *) 156472af6995Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 156572af6995Smrg ;; 156672af6995Smrg esac 156772af6995Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 156872af6995Smrgfi 156972af6995Smrg 157072af6995Smrgcase $host_os in 157172af6995Smrg darwin*) 157272af6995Smrg lock_old_archive_extraction=yes ;; 157372af6995Smrg *) 157472af6995Smrg lock_old_archive_extraction=no ;; 157572af6995Smrgesac 157672af6995Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 157772af6995Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 157872af6995Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 157972af6995Smrg [Commands used to build an old-style archive]) 158072af6995Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 158172af6995Smrg [Whether to use a lock for old archive extraction]) 158272af6995Smrg])# _LT_CMD_OLD_ARCHIVE 158372af6995Smrg 158472af6995Smrg 158572af6995Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 158672af6995Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 158772af6995Smrg# ---------------------------------------------------------------- 158872af6995Smrg# Check whether the given compiler option works 158972af6995SmrgAC_DEFUN([_LT_COMPILER_OPTION], 159072af6995Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 159172af6995Smrgm4_require([_LT_DECL_SED])dnl 159272af6995SmrgAC_CACHE_CHECK([$1], [$2], 159372af6995Smrg [$2=no 159472af6995Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 159572af6995Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 159672af6995Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 159772af6995Smrg # Insert the option either (1) after the last *FLAGS variable, or 159872af6995Smrg # (2) before a word containing "conftest.", or (3) at the end. 159972af6995Smrg # Note that $ac_compile itself does not contain backslashes and begins 160072af6995Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 160172af6995Smrg # The option is referenced via a variable to avoid confusing sed. 160272af6995Smrg lt_compile=`echo "$ac_compile" | $SED \ 160372af6995Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 160472af6995Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 160572af6995Smrg -e 's:$: $lt_compiler_flag:'` 160672af6995Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 160772af6995Smrg (eval "$lt_compile" 2>conftest.err) 160872af6995Smrg ac_status=$? 160972af6995Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 161072af6995Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 161172af6995Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 161272af6995Smrg # The compiler can only warn and ignore the option if not recognized 161372af6995Smrg # So say no if there are warnings other than the usual output. 161472af6995Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 161572af6995Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 161672af6995Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 161772af6995Smrg $2=yes 161872af6995Smrg fi 161972af6995Smrg fi 162072af6995Smrg $RM conftest* 162172af6995Smrg]) 162272af6995Smrg 162372af6995Smrgif test yes = "[$]$2"; then 162472af6995Smrg m4_if([$5], , :, [$5]) 162572af6995Smrgelse 162672af6995Smrg m4_if([$6], , :, [$6]) 162772af6995Smrgfi 162872af6995Smrg])# _LT_COMPILER_OPTION 162972af6995Smrg 163072af6995Smrg# Old name: 163172af6995SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 163272af6995Smrgdnl aclocal-1.4 backwards compatibility: 163372af6995Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 163472af6995Smrg 163572af6995Smrg 163672af6995Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 163772af6995Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 163872af6995Smrg# ---------------------------------------------------- 163972af6995Smrg# Check whether the given linker option works 164072af6995SmrgAC_DEFUN([_LT_LINKER_OPTION], 164172af6995Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 164272af6995Smrgm4_require([_LT_DECL_SED])dnl 164372af6995SmrgAC_CACHE_CHECK([$1], [$2], 164472af6995Smrg [$2=no 164572af6995Smrg save_LDFLAGS=$LDFLAGS 164672af6995Smrg LDFLAGS="$LDFLAGS $3" 164772af6995Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 164872af6995Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 164972af6995Smrg # The linker can only warn and ignore the option if not recognized 165072af6995Smrg # So say no if there are warnings 165172af6995Smrg if test -s conftest.err; then 165272af6995Smrg # Append any errors to the config.log. 165372af6995Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 165472af6995Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 165572af6995Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 165672af6995Smrg if diff conftest.exp conftest.er2 >/dev/null; then 165772af6995Smrg $2=yes 165872af6995Smrg fi 165972af6995Smrg else 166072af6995Smrg $2=yes 166172af6995Smrg fi 166272af6995Smrg fi 166372af6995Smrg $RM -r conftest* 166472af6995Smrg LDFLAGS=$save_LDFLAGS 166572af6995Smrg]) 166672af6995Smrg 166772af6995Smrgif test yes = "[$]$2"; then 166872af6995Smrg m4_if([$4], , :, [$4]) 166972af6995Smrgelse 167072af6995Smrg m4_if([$5], , :, [$5]) 167172af6995Smrgfi 167272af6995Smrg])# _LT_LINKER_OPTION 167372af6995Smrg 167472af6995Smrg# Old name: 167572af6995SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 167672af6995Smrgdnl aclocal-1.4 backwards compatibility: 167772af6995Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 167872af6995Smrg 167972af6995Smrg 168072af6995Smrg# LT_CMD_MAX_LEN 168172af6995Smrg#--------------- 168272af6995SmrgAC_DEFUN([LT_CMD_MAX_LEN], 168372af6995Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 168472af6995Smrg# find the maximum length of command line arguments 168572af6995SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 168672af6995SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 168772af6995Smrg i=0 168872af6995Smrg teststring=ABCD 168972af6995Smrg 169072af6995Smrg case $build_os in 169172af6995Smrg msdosdjgpp*) 169272af6995Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 169372af6995Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 169472af6995Smrg # during glob expansion). Even if it were fixed, the result of this 169572af6995Smrg # check would be larger than it should be. 169672af6995Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 169772af6995Smrg ;; 169872af6995Smrg 169972af6995Smrg gnu*) 170072af6995Smrg # Under GNU Hurd, this test is not required because there is 170172af6995Smrg # no limit to the length of command line arguments. 170272af6995Smrg # Libtool will interpret -1 as no limit whatsoever 170372af6995Smrg lt_cv_sys_max_cmd_len=-1; 170472af6995Smrg ;; 170572af6995Smrg 170672af6995Smrg cygwin* | mingw* | cegcc*) 170772af6995Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 170872af6995Smrg # about 5 minutes as the teststring grows exponentially. 170972af6995Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 171072af6995Smrg # you end up with a "frozen" computer, even though with patience 171172af6995Smrg # the test eventually succeeds (with a max line length of 256k). 171272af6995Smrg # Instead, let's just punt: use the minimum linelength reported by 171372af6995Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 171472af6995Smrg lt_cv_sys_max_cmd_len=8192; 171572af6995Smrg ;; 171672af6995Smrg 171772af6995Smrg mint*) 171872af6995Smrg # On MiNT this can take a long time and run out of memory. 171972af6995Smrg lt_cv_sys_max_cmd_len=8192; 172072af6995Smrg ;; 172172af6995Smrg 172272af6995Smrg amigaos*) 172372af6995Smrg # On AmigaOS with pdksh, this test takes hours, literally. 172472af6995Smrg # So we just punt and use a minimum line length of 8192. 172572af6995Smrg lt_cv_sys_max_cmd_len=8192; 172672af6995Smrg ;; 172772af6995Smrg 1728a773ec55Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 172972af6995Smrg # This has been around since 386BSD, at least. Likely further. 173072af6995Smrg if test -x /sbin/sysctl; then 173172af6995Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 173272af6995Smrg elif test -x /usr/sbin/sysctl; then 173372af6995Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 173472af6995Smrg else 173572af6995Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 173672af6995Smrg fi 173772af6995Smrg # And add a safety zone 173872af6995Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 173972af6995Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 174072af6995Smrg ;; 174172af6995Smrg 174272af6995Smrg interix*) 174372af6995Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 174472af6995Smrg lt_cv_sys_max_cmd_len=196608 174572af6995Smrg ;; 174672af6995Smrg 174772af6995Smrg os2*) 174872af6995Smrg # The test takes a long time on OS/2. 174972af6995Smrg lt_cv_sys_max_cmd_len=8192 175072af6995Smrg ;; 175172af6995Smrg 175272af6995Smrg osf*) 175372af6995Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 175472af6995Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 175572af6995Smrg # nice to cause kernel panics so lets avoid the loop below. 175672af6995Smrg # First set a reasonable default. 175772af6995Smrg lt_cv_sys_max_cmd_len=16384 175872af6995Smrg # 175972af6995Smrg if test -x /sbin/sysconfig; then 176072af6995Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 176172af6995Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 176272af6995Smrg esac 176372af6995Smrg fi 176472af6995Smrg ;; 176572af6995Smrg sco3.2v5*) 176672af6995Smrg lt_cv_sys_max_cmd_len=102400 176772af6995Smrg ;; 176872af6995Smrg sysv5* | sco5v6* | sysv4.2uw2*) 176972af6995Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 177072af6995Smrg if test -n "$kargmax"; then 1771a773ec55Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 177272af6995Smrg else 177372af6995Smrg lt_cv_sys_max_cmd_len=32768 177472af6995Smrg fi 177572af6995Smrg ;; 177672af6995Smrg *) 177772af6995Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 177872af6995Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 177972af6995Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 178072af6995Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 178172af6995Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 178272af6995Smrg else 178372af6995Smrg # Make teststring a little bigger before we do anything with it. 178472af6995Smrg # a 1K string should be a reasonable start. 178572af6995Smrg for i in 1 2 3 4 5 6 7 8; do 178672af6995Smrg teststring=$teststring$teststring 178772af6995Smrg done 178872af6995Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 178972af6995Smrg # If test is not a shell built-in, we'll probably end up computing a 179072af6995Smrg # maximum length that is only half of the actual maximum length, but 179172af6995Smrg # we can't tell. 179272af6995Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 179372af6995Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 179472af6995Smrg test 17 != "$i" # 1/2 MB should be enough 179572af6995Smrg do 179672af6995Smrg i=`expr $i + 1` 179772af6995Smrg teststring=$teststring$teststring 179872af6995Smrg done 179972af6995Smrg # Only check the string length outside the loop. 180072af6995Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 180172af6995Smrg teststring= 180272af6995Smrg # Add a significant safety factor because C++ compilers can tack on 180372af6995Smrg # massive amounts of additional arguments before passing them to the 180472af6995Smrg # linker. It appears as though 1/2 is a usable value. 180572af6995Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 180672af6995Smrg fi 180772af6995Smrg ;; 180872af6995Smrg esac 180972af6995Smrg]) 181072af6995Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 181172af6995Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 181272af6995Smrgelse 181372af6995Smrg AC_MSG_RESULT(none) 181472af6995Smrgfi 181572af6995Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 181672af6995Smrg_LT_DECL([], [max_cmd_len], [0], 181772af6995Smrg [What is the maximum length of a command?]) 181872af6995Smrg])# LT_CMD_MAX_LEN 181972af6995Smrg 182072af6995Smrg# Old name: 182172af6995SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 182272af6995Smrgdnl aclocal-1.4 backwards compatibility: 182372af6995Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 182472af6995Smrg 182572af6995Smrg 182672af6995Smrg# _LT_HEADER_DLFCN 182772af6995Smrg# ---------------- 182872af6995Smrgm4_defun([_LT_HEADER_DLFCN], 182972af6995Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 183072af6995Smrg])# _LT_HEADER_DLFCN 183172af6995Smrg 183272af6995Smrg 183372af6995Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 183472af6995Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 183572af6995Smrg# ---------------------------------------------------------------- 183672af6995Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 183772af6995Smrg[m4_require([_LT_HEADER_DLFCN])dnl 183872af6995Smrgif test yes = "$cross_compiling"; then : 183972af6995Smrg [$4] 184072af6995Smrgelse 184172af6995Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 184272af6995Smrg lt_status=$lt_dlunknown 184372af6995Smrg cat > conftest.$ac_ext <<_LT_EOF 184472af6995Smrg[#line $LINENO "configure" 184572af6995Smrg#include "confdefs.h" 184672af6995Smrg 184772af6995Smrg#if HAVE_DLFCN_H 184872af6995Smrg#include <dlfcn.h> 184972af6995Smrg#endif 185072af6995Smrg 185172af6995Smrg#include <stdio.h> 185272af6995Smrg 185372af6995Smrg#ifdef RTLD_GLOBAL 185472af6995Smrg# define LT_DLGLOBAL RTLD_GLOBAL 185572af6995Smrg#else 185672af6995Smrg# ifdef DL_GLOBAL 185772af6995Smrg# define LT_DLGLOBAL DL_GLOBAL 185872af6995Smrg# else 185972af6995Smrg# define LT_DLGLOBAL 0 186072af6995Smrg# endif 186172af6995Smrg#endif 186272af6995Smrg 186372af6995Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 186472af6995Smrg find out it does not work in some platform. */ 186572af6995Smrg#ifndef LT_DLLAZY_OR_NOW 186672af6995Smrg# ifdef RTLD_LAZY 186772af6995Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 186872af6995Smrg# else 186972af6995Smrg# ifdef DL_LAZY 187072af6995Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 187172af6995Smrg# else 187272af6995Smrg# ifdef RTLD_NOW 187372af6995Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 187472af6995Smrg# else 187572af6995Smrg# ifdef DL_NOW 187672af6995Smrg# define LT_DLLAZY_OR_NOW DL_NOW 187772af6995Smrg# else 187872af6995Smrg# define LT_DLLAZY_OR_NOW 0 187972af6995Smrg# endif 188072af6995Smrg# endif 188172af6995Smrg# endif 188272af6995Smrg# endif 188372af6995Smrg#endif 188472af6995Smrg 188572af6995Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 188672af6995Smrg correspondingly for the symbols needed. */ 188772af6995Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 188872af6995Smrgint fnord () __attribute__((visibility("default"))); 188972af6995Smrg#endif 189072af6995Smrg 189172af6995Smrgint fnord () { return 42; } 189272af6995Smrgint main () 189372af6995Smrg{ 189472af6995Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 189572af6995Smrg int status = $lt_dlunknown; 189672af6995Smrg 189772af6995Smrg if (self) 189872af6995Smrg { 189972af6995Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 190072af6995Smrg else 190172af6995Smrg { 190272af6995Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 190372af6995Smrg else puts (dlerror ()); 190472af6995Smrg } 190572af6995Smrg /* dlclose (self); */ 190672af6995Smrg } 190772af6995Smrg else 190872af6995Smrg puts (dlerror ()); 190972af6995Smrg 191072af6995Smrg return status; 191172af6995Smrg}] 191272af6995Smrg_LT_EOF 191372af6995Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 191472af6995Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 191572af6995Smrg lt_status=$? 191672af6995Smrg case x$lt_status in 191772af6995Smrg x$lt_dlno_uscore) $1 ;; 191872af6995Smrg x$lt_dlneed_uscore) $2 ;; 191972af6995Smrg x$lt_dlunknown|x*) $3 ;; 192072af6995Smrg esac 192172af6995Smrg else : 192272af6995Smrg # compilation failed 192372af6995Smrg $3 192472af6995Smrg fi 192572af6995Smrgfi 192672af6995Smrgrm -fr conftest* 192772af6995Smrg])# _LT_TRY_DLOPEN_SELF 192872af6995Smrg 192972af6995Smrg 193072af6995Smrg# LT_SYS_DLOPEN_SELF 193172af6995Smrg# ------------------ 193272af6995SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 193372af6995Smrg[m4_require([_LT_HEADER_DLFCN])dnl 193472af6995Smrgif test yes != "$enable_dlopen"; then 193572af6995Smrg enable_dlopen=unknown 193672af6995Smrg enable_dlopen_self=unknown 193772af6995Smrg enable_dlopen_self_static=unknown 193872af6995Smrgelse 193972af6995Smrg lt_cv_dlopen=no 194072af6995Smrg lt_cv_dlopen_libs= 194172af6995Smrg 194272af6995Smrg case $host_os in 194372af6995Smrg beos*) 194472af6995Smrg lt_cv_dlopen=load_add_on 194572af6995Smrg lt_cv_dlopen_libs= 194672af6995Smrg lt_cv_dlopen_self=yes 194772af6995Smrg ;; 194872af6995Smrg 194972af6995Smrg mingw* | pw32* | cegcc*) 195072af6995Smrg lt_cv_dlopen=LoadLibrary 195172af6995Smrg lt_cv_dlopen_libs= 195272af6995Smrg ;; 195372af6995Smrg 195472af6995Smrg cygwin*) 195572af6995Smrg lt_cv_dlopen=dlopen 195672af6995Smrg lt_cv_dlopen_libs= 195772af6995Smrg ;; 195872af6995Smrg 195972af6995Smrg darwin*) 196072af6995Smrg # if libdl is installed we need to link against it 196172af6995Smrg AC_CHECK_LIB([dl], [dlopen], 196272af6995Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 196372af6995Smrg lt_cv_dlopen=dyld 196472af6995Smrg lt_cv_dlopen_libs= 196572af6995Smrg lt_cv_dlopen_self=yes 196672af6995Smrg ]) 196772af6995Smrg ;; 196872af6995Smrg 196972af6995Smrg tpf*) 197072af6995Smrg # Don't try to run any link tests for TPF. We know it's impossible 197172af6995Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 197272af6995Smrg lt_cv_dlopen=dlopen 197372af6995Smrg lt_cv_dlopen_libs= 197472af6995Smrg lt_cv_dlopen_self=no 197572af6995Smrg ;; 197672af6995Smrg 197772af6995Smrg *) 197872af6995Smrg AC_CHECK_FUNC([shl_load], 197972af6995Smrg [lt_cv_dlopen=shl_load], 198072af6995Smrg [AC_CHECK_LIB([dld], [shl_load], 198172af6995Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 198272af6995Smrg [AC_CHECK_FUNC([dlopen], 198372af6995Smrg [lt_cv_dlopen=dlopen], 198472af6995Smrg [AC_CHECK_LIB([dl], [dlopen], 198572af6995Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 198672af6995Smrg [AC_CHECK_LIB([svld], [dlopen], 198772af6995Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 198872af6995Smrg [AC_CHECK_LIB([dld], [dld_link], 198972af6995Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 199072af6995Smrg ]) 199172af6995Smrg ]) 199272af6995Smrg ]) 199372af6995Smrg ]) 199472af6995Smrg ]) 199572af6995Smrg ;; 199672af6995Smrg esac 199772af6995Smrg 199872af6995Smrg if test no = "$lt_cv_dlopen"; then 199972af6995Smrg enable_dlopen=no 200072af6995Smrg else 200172af6995Smrg enable_dlopen=yes 200272af6995Smrg fi 200372af6995Smrg 200472af6995Smrg case $lt_cv_dlopen in 200572af6995Smrg dlopen) 200672af6995Smrg save_CPPFLAGS=$CPPFLAGS 200772af6995Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 200872af6995Smrg 200972af6995Smrg save_LDFLAGS=$LDFLAGS 201072af6995Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 201172af6995Smrg 201272af6995Smrg save_LIBS=$LIBS 201372af6995Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 201472af6995Smrg 201572af6995Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 201672af6995Smrg lt_cv_dlopen_self, [dnl 201772af6995Smrg _LT_TRY_DLOPEN_SELF( 201872af6995Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 201972af6995Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 202072af6995Smrg ]) 202172af6995Smrg 202272af6995Smrg if test yes = "$lt_cv_dlopen_self"; then 202372af6995Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 202472af6995Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 202572af6995Smrg lt_cv_dlopen_self_static, [dnl 202672af6995Smrg _LT_TRY_DLOPEN_SELF( 202772af6995Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 202872af6995Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 202972af6995Smrg ]) 203072af6995Smrg fi 203172af6995Smrg 203272af6995Smrg CPPFLAGS=$save_CPPFLAGS 203372af6995Smrg LDFLAGS=$save_LDFLAGS 203472af6995Smrg LIBS=$save_LIBS 203572af6995Smrg ;; 203672af6995Smrg esac 203772af6995Smrg 203872af6995Smrg case $lt_cv_dlopen_self in 203972af6995Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 204072af6995Smrg *) enable_dlopen_self=unknown ;; 204172af6995Smrg esac 204272af6995Smrg 204372af6995Smrg case $lt_cv_dlopen_self_static in 204472af6995Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 204572af6995Smrg *) enable_dlopen_self_static=unknown ;; 204672af6995Smrg esac 204772af6995Smrgfi 204872af6995Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 204972af6995Smrg [Whether dlopen is supported]) 205072af6995Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 205172af6995Smrg [Whether dlopen of programs is supported]) 205272af6995Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 205372af6995Smrg [Whether dlopen of statically linked programs is supported]) 205472af6995Smrg])# LT_SYS_DLOPEN_SELF 205572af6995Smrg 205672af6995Smrg# Old name: 205772af6995SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 205872af6995Smrgdnl aclocal-1.4 backwards compatibility: 205972af6995Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 206072af6995Smrg 206172af6995Smrg 206272af6995Smrg# _LT_COMPILER_C_O([TAGNAME]) 206372af6995Smrg# --------------------------- 206472af6995Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 206572af6995Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 206672af6995Smrgm4_defun([_LT_COMPILER_C_O], 206772af6995Smrg[m4_require([_LT_DECL_SED])dnl 206872af6995Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 206972af6995Smrgm4_require([_LT_TAG_COMPILER])dnl 207072af6995SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 207172af6995Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 207272af6995Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 207372af6995Smrg $RM -r conftest 2>/dev/null 207472af6995Smrg mkdir conftest 207572af6995Smrg cd conftest 207672af6995Smrg mkdir out 207772af6995Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 207872af6995Smrg 207972af6995Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 208072af6995Smrg # Insert the option either (1) after the last *FLAGS variable, or 208172af6995Smrg # (2) before a word containing "conftest.", or (3) at the end. 208272af6995Smrg # Note that $ac_compile itself does not contain backslashes and begins 208372af6995Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 208472af6995Smrg lt_compile=`echo "$ac_compile" | $SED \ 208572af6995Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 208672af6995Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 208772af6995Smrg -e 's:$: $lt_compiler_flag:'` 208872af6995Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 208972af6995Smrg (eval "$lt_compile" 2>out/conftest.err) 209072af6995Smrg ac_status=$? 209172af6995Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 209272af6995Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 209372af6995Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 209472af6995Smrg then 209572af6995Smrg # The compiler can only warn and ignore the option if not recognized 209672af6995Smrg # So say no if there are warnings 209772af6995Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 209872af6995Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 209972af6995Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 210072af6995Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 210172af6995Smrg fi 210272af6995Smrg fi 210372af6995Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 210472af6995Smrg $RM conftest* 210572af6995Smrg # SGI C++ compiler will create directory out/ii_files/ for 210672af6995Smrg # template instantiation 210772af6995Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 210872af6995Smrg $RM out/* && rmdir out 210972af6995Smrg cd .. 211072af6995Smrg $RM -r conftest 211172af6995Smrg $RM conftest* 211272af6995Smrg]) 211372af6995Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 211472af6995Smrg [Does compiler simultaneously support -c and -o options?]) 211572af6995Smrg])# _LT_COMPILER_C_O 211672af6995Smrg 211772af6995Smrg 211872af6995Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 211972af6995Smrg# ---------------------------------- 212072af6995Smrg# Check to see if we can do hard links to lock some files if needed 212172af6995Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 212272af6995Smrg[m4_require([_LT_ENABLE_LOCK])dnl 212372af6995Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 212472af6995Smrg_LT_COMPILER_C_O([$1]) 212572af6995Smrg 212672af6995Smrghard_links=nottested 212772af6995Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 212872af6995Smrg # do not overwrite the value of need_locks provided by the user 212972af6995Smrg AC_MSG_CHECKING([if we can lock with hard links]) 213072af6995Smrg hard_links=yes 213172af6995Smrg $RM conftest* 213272af6995Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213372af6995Smrg touch conftest.a 213472af6995Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 213572af6995Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213672af6995Smrg AC_MSG_RESULT([$hard_links]) 213772af6995Smrg if test no = "$hard_links"; then 213872af6995Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 213972af6995Smrg need_locks=warn 214072af6995Smrg fi 214172af6995Smrgelse 214272af6995Smrg need_locks=no 214372af6995Smrgfi 214472af6995Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 214572af6995Smrg])# _LT_COMPILER_FILE_LOCKS 214672af6995Smrg 214772af6995Smrg 214872af6995Smrg# _LT_CHECK_OBJDIR 214972af6995Smrg# ---------------- 215072af6995Smrgm4_defun([_LT_CHECK_OBJDIR], 215172af6995Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 215272af6995Smrg[rm -f .libs 2>/dev/null 215372af6995Smrgmkdir .libs 2>/dev/null 215472af6995Smrgif test -d .libs; then 215572af6995Smrg lt_cv_objdir=.libs 215672af6995Smrgelse 215772af6995Smrg # MS-DOS does not allow filenames that begin with a dot. 215872af6995Smrg lt_cv_objdir=_libs 215972af6995Smrgfi 216072af6995Smrgrmdir .libs 2>/dev/null]) 216172af6995Smrgobjdir=$lt_cv_objdir 216272af6995Smrg_LT_DECL([], [objdir], [0], 216372af6995Smrg [The name of the directory that contains temporary libtool files])dnl 216472af6995Smrgm4_pattern_allow([LT_OBJDIR])dnl 216572af6995SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 216672af6995Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 216772af6995Smrg])# _LT_CHECK_OBJDIR 216872af6995Smrg 216972af6995Smrg 217072af6995Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 217172af6995Smrg# -------------------------------------- 217272af6995Smrg# Check hardcoding attributes. 217372af6995Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 217472af6995Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 217572af6995Smrg_LT_TAGVAR(hardcode_action, $1)= 217672af6995Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 217772af6995Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 217872af6995Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 217972af6995Smrg 218072af6995Smrg # We can hardcode non-existent directories. 218172af6995Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 218272af6995Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 218372af6995Smrg # have to relink, otherwise we might link with an installed library 218472af6995Smrg # when we should be linking with a yet-to-be-installed one 218572af6995Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 218672af6995Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 218772af6995Smrg # Linking always hardcodes the temporary library directory. 218872af6995Smrg _LT_TAGVAR(hardcode_action, $1)=relink 218972af6995Smrg else 219072af6995Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 219172af6995Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 219272af6995Smrg fi 219372af6995Smrgelse 219472af6995Smrg # We cannot hardcode anything, or else we can only hardcode existing 219572af6995Smrg # directories. 219672af6995Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 219772af6995Smrgfi 219872af6995SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 219972af6995Smrg 220072af6995Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 220172af6995Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 220272af6995Smrg # Fast installation is not supported 220372af6995Smrg enable_fast_install=no 220472af6995Smrgelif test yes = "$shlibpath_overrides_runpath" || 220572af6995Smrg test no = "$enable_shared"; then 220672af6995Smrg # Fast installation is not necessary 220772af6995Smrg enable_fast_install=needless 220872af6995Smrgfi 220972af6995Smrg_LT_TAGDECL([], [hardcode_action], [0], 221072af6995Smrg [How to hardcode a shared library path into an executable]) 221172af6995Smrg])# _LT_LINKER_HARDCODE_LIBPATH 221272af6995Smrg 221372af6995Smrg 221472af6995Smrg# _LT_CMD_STRIPLIB 221572af6995Smrg# ---------------- 221672af6995Smrgm4_defun([_LT_CMD_STRIPLIB], 221772af6995Smrg[m4_require([_LT_DECL_EGREP]) 221872af6995Smrgstriplib= 221972af6995Smrgold_striplib= 222072af6995SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2221a773ec55Smrgif test -z "$STRIP"; then 2222a773ec55Smrg AC_MSG_RESULT([no]) 222372af6995Smrgelse 2224a773ec55Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2225a773ec55Smrg old_striplib="$STRIP --strip-debug" 2226a773ec55Smrg striplib="$STRIP --strip-unneeded" 2227a773ec55Smrg AC_MSG_RESULT([yes]) 2228a773ec55Smrg else 2229a773ec55Smrg case $host_os in 2230a773ec55Smrg darwin*) 2231a773ec55Smrg # FIXME - insert some real tests, host_os isn't really good enough 223272af6995Smrg striplib="$STRIP -x" 223372af6995Smrg old_striplib="$STRIP -S" 223472af6995Smrg AC_MSG_RESULT([yes]) 2235a773ec55Smrg ;; 2236a773ec55Smrg freebsd*) 2237a773ec55Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 2238a773ec55Smrg old_striplib="$STRIP --strip-debug" 2239a773ec55Smrg striplib="$STRIP --strip-unneeded" 2240a773ec55Smrg AC_MSG_RESULT([yes]) 2241a773ec55Smrg else 2242a773ec55Smrg AC_MSG_RESULT([no]) 2243a773ec55Smrg fi 2244a773ec55Smrg ;; 2245a773ec55Smrg *) 224672af6995Smrg AC_MSG_RESULT([no]) 2247a773ec55Smrg ;; 2248a773ec55Smrg esac 2249a773ec55Smrg fi 225072af6995Smrgfi 225172af6995Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 225272af6995Smrg_LT_DECL([], [striplib], [1]) 225372af6995Smrg])# _LT_CMD_STRIPLIB 225472af6995Smrg 225572af6995Smrg 225672af6995Smrg# _LT_PREPARE_MUNGE_PATH_LIST 225772af6995Smrg# --------------------------- 225872af6995Smrg# Make sure func_munge_path_list() is defined correctly. 225972af6995Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 226072af6995Smrg[[# func_munge_path_list VARIABLE PATH 226172af6995Smrg# ----------------------------------- 226272af6995Smrg# VARIABLE is name of variable containing _space_ separated list of 226372af6995Smrg# directories to be munged by the contents of PATH, which is string 226472af6995Smrg# having a format: 226572af6995Smrg# "DIR[:DIR]:" 226672af6995Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 226772af6995Smrg# ":DIR[:DIR]" 226872af6995Smrg# string "DIR[ DIR]" will be appended to VARIABLE 226972af6995Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 227072af6995Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 227172af6995Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 227272af6995Smrg# "DIR[:DIR]" 227372af6995Smrg# VARIABLE will be replaced by "DIR[ DIR]" 227472af6995Smrgfunc_munge_path_list () 227572af6995Smrg{ 227672af6995Smrg case x@S|@2 in 227772af6995Smrg x) 227872af6995Smrg ;; 227972af6995Smrg *:) 228072af6995Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 228172af6995Smrg ;; 228272af6995Smrg x:*) 228372af6995Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 228472af6995Smrg ;; 228572af6995Smrg *::*) 228672af6995Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 228772af6995Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 228872af6995Smrg ;; 228972af6995Smrg *) 229072af6995Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 229172af6995Smrg ;; 229272af6995Smrg esac 229372af6995Smrg} 229472af6995Smrg]])# _LT_PREPARE_PATH_LIST 229572af6995Smrg 229672af6995Smrg 229772af6995Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 229872af6995Smrg# ----------------------------- 229972af6995Smrg# PORTME Fill in your ld.so characteristics 230072af6995Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 230172af6995Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 230272af6995Smrgm4_require([_LT_DECL_EGREP])dnl 230372af6995Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 230472af6995Smrgm4_require([_LT_DECL_OBJDUMP])dnl 230572af6995Smrgm4_require([_LT_DECL_SED])dnl 230672af6995Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 230772af6995Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 230872af6995SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 230972af6995Smrgm4_if([$1], 231072af6995Smrg [], [ 231172af6995Smrgif test yes = "$GCC"; then 231272af6995Smrg case $host_os in 231372af6995Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 231472af6995Smrg *) lt_awk_arg='/^libraries:/' ;; 231572af6995Smrg esac 231672af6995Smrg case $host_os in 231772af6995Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 231872af6995Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 231972af6995Smrg esac 232072af6995Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 232172af6995Smrg case $lt_search_path_spec in 232272af6995Smrg *\;*) 232372af6995Smrg # if the path contains ";" then we assume it to be the separator 232472af6995Smrg # otherwise default to the standard path separator (i.e. ":") - it is 232572af6995Smrg # assumed that no part of a normal pathname contains ";" but that should 232672af6995Smrg # okay in the real world where ";" in dirpaths is itself problematic. 232772af6995Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 232872af6995Smrg ;; 232972af6995Smrg *) 233072af6995Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 233172af6995Smrg ;; 233272af6995Smrg esac 233372af6995Smrg # Ok, now we have the path, separated by spaces, we can step through it 233472af6995Smrg # and add multilib dir if necessary... 233572af6995Smrg lt_tmp_lt_search_path_spec= 233672af6995Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 233772af6995Smrg # ...but if some path component already ends with the multilib dir we assume 233872af6995Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 233972af6995Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 234072af6995Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 234172af6995Smrg lt_multi_os_dir= 234272af6995Smrg ;; 234372af6995Smrg esac 234472af6995Smrg for lt_sys_path in $lt_search_path_spec; do 234572af6995Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 234672af6995Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 234772af6995Smrg elif test -n "$lt_multi_os_dir"; then 234872af6995Smrg test -d "$lt_sys_path" && \ 234972af6995Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 235072af6995Smrg fi 235172af6995Smrg done 235272af6995Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 235372af6995SmrgBEGIN {RS = " "; FS = "/|\n";} { 235472af6995Smrg lt_foo = ""; 235572af6995Smrg lt_count = 0; 235672af6995Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 235772af6995Smrg if ($lt_i != "" && $lt_i != ".") { 235872af6995Smrg if ($lt_i == "..") { 235972af6995Smrg lt_count++; 236072af6995Smrg } else { 236172af6995Smrg if (lt_count == 0) { 236272af6995Smrg lt_foo = "/" $lt_i lt_foo; 236372af6995Smrg } else { 236472af6995Smrg lt_count--; 236572af6995Smrg } 236672af6995Smrg } 236772af6995Smrg } 236872af6995Smrg } 236972af6995Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 237072af6995Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 237172af6995Smrg}'` 237272af6995Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 237372af6995Smrg # for these hosts. 237472af6995Smrg case $host_os in 237572af6995Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 237672af6995Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 237772af6995Smrg esac 237872af6995Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 237972af6995Smrgelse 238072af6995Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 238172af6995Smrgfi]) 238272af6995Smrglibrary_names_spec= 238372af6995Smrglibname_spec='lib$name' 238472af6995Smrgsoname_spec= 238572af6995Smrgshrext_cmds=.so 238672af6995Smrgpostinstall_cmds= 238772af6995Smrgpostuninstall_cmds= 238872af6995Smrgfinish_cmds= 238972af6995Smrgfinish_eval= 239072af6995Smrgshlibpath_var= 239172af6995Smrgshlibpath_overrides_runpath=unknown 239272af6995Smrgversion_type=none 239372af6995Smrgdynamic_linker="$host_os ld.so" 239472af6995Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 239572af6995Smrgneed_lib_prefix=unknown 239672af6995Smrghardcode_into_libs=no 239772af6995Smrg 239872af6995Smrg# when you set need_version to no, make sure it does not cause -set_version 239972af6995Smrg# flags to be left without arguments 240072af6995Smrgneed_version=unknown 240172af6995Smrg 240272af6995SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 240372af6995Smrg[User-defined run-time library search path.]) 240472af6995Smrg 240572af6995Smrgcase $host_os in 240672af6995Smrgaix3*) 240772af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 240872af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 240972af6995Smrg shlibpath_var=LIBPATH 241072af6995Smrg 241172af6995Smrg # AIX 3 has no versioning support, so we append a major version to the name. 241272af6995Smrg soname_spec='$libname$release$shared_ext$major' 241372af6995Smrg ;; 241472af6995Smrg 241572af6995Smrgaix[[4-9]]*) 241672af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 241772af6995Smrg need_lib_prefix=no 241872af6995Smrg need_version=no 241972af6995Smrg hardcode_into_libs=yes 242072af6995Smrg if test ia64 = "$host_cpu"; then 242172af6995Smrg # AIX 5 supports IA64 242272af6995Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 242372af6995Smrg shlibpath_var=LD_LIBRARY_PATH 242472af6995Smrg else 242572af6995Smrg # With GCC up to 2.95.x, collect2 would create an import file 242672af6995Smrg # for dependence libraries. The import file would start with 242772af6995Smrg # the line '#! .'. This would cause the generated library to 242872af6995Smrg # depend on '.', always an invalid library. This was fixed in 242972af6995Smrg # development snapshots of GCC prior to 3.0. 243072af6995Smrg case $host_os in 243172af6995Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 243272af6995Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 243372af6995Smrg echo ' yes ' 243472af6995Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 243572af6995Smrg : 243672af6995Smrg else 243772af6995Smrg can_build_shared=no 243872af6995Smrg fi 243972af6995Smrg ;; 244072af6995Smrg esac 244172af6995Smrg # Using Import Files as archive members, it is possible to support 244272af6995Smrg # filename-based versioning of shared library archives on AIX. While 244372af6995Smrg # this would work for both with and without runtime linking, it will 244472af6995Smrg # prevent static linking of such archives. So we do filename-based 244572af6995Smrg # shared library versioning with .so extension only, which is used 244672af6995Smrg # when both runtime linking and shared linking is enabled. 244772af6995Smrg # Unfortunately, runtime linking may impact performance, so we do 244872af6995Smrg # not want this to be the default eventually. Also, we use the 244972af6995Smrg # versioned .so libs for executables only if there is the -brtl 245072af6995Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 245172af6995Smrg # To allow for filename-based versioning support, we need to create 245272af6995Smrg # libNAME.so.V as an archive file, containing: 245372af6995Smrg # *) an Import File, referring to the versioned filename of the 245472af6995Smrg # archive as well as the shared archive member, telling the 245572af6995Smrg # bitwidth (32 or 64) of that shared object, and providing the 245672af6995Smrg # list of exported symbols of that shared object, eventually 245772af6995Smrg # decorated with the 'weak' keyword 245872af6995Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 245972af6995Smrg # it being seen by the linker. 246072af6995Smrg # At run time we better use the real file rather than another symlink, 246172af6995Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 246272af6995Smrg 246372af6995Smrg case $with_aix_soname,$aix_use_runtimelinking in 246472af6995Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 246572af6995Smrg # soname into executable. Probably we can add versioning support to 246672af6995Smrg # collect2, so additional links can be useful in future. 246772af6995Smrg aix,yes) # traditional libtool 246872af6995Smrg dynamic_linker='AIX unversionable lib.so' 246972af6995Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 247072af6995Smrg # instead of lib<name>.a to let people know that these are not 247172af6995Smrg # typical AIX shared libraries. 247272af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 247372af6995Smrg ;; 247472af6995Smrg aix,no) # traditional AIX only 247572af6995Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 247672af6995Smrg # We preserve .a as extension for shared libraries through AIX4.2 247772af6995Smrg # and later when we are not doing run time linking. 247872af6995Smrg library_names_spec='$libname$release.a $libname.a' 247972af6995Smrg soname_spec='$libname$release$shared_ext$major' 248072af6995Smrg ;; 248172af6995Smrg svr4,*) # full svr4 only 248272af6995Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 248372af6995Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 248472af6995Smrg # We do not specify a path in Import Files, so LIBPATH fires. 248572af6995Smrg shlibpath_overrides_runpath=yes 248672af6995Smrg ;; 248772af6995Smrg *,yes) # both, prefer svr4 248872af6995Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 248972af6995Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 249072af6995Smrg # unpreferred sharedlib libNAME.a needs extra handling 249172af6995Smrg 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"' 249272af6995Smrg 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"' 249372af6995Smrg # We do not specify a path in Import Files, so LIBPATH fires. 249472af6995Smrg shlibpath_overrides_runpath=yes 249572af6995Smrg ;; 249672af6995Smrg *,no) # both, prefer aix 249772af6995Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 249872af6995Smrg library_names_spec='$libname$release.a $libname.a' 249972af6995Smrg soname_spec='$libname$release$shared_ext$major' 250072af6995Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 250172af6995Smrg 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)' 250272af6995Smrg 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"' 250372af6995Smrg ;; 250472af6995Smrg esac 250572af6995Smrg shlibpath_var=LIBPATH 250672af6995Smrg fi 250772af6995Smrg ;; 250872af6995Smrg 250972af6995Smrgamigaos*) 251072af6995Smrg case $host_cpu in 251172af6995Smrg powerpc) 251272af6995Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 251372af6995Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 251472af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 251572af6995Smrg ;; 251672af6995Smrg m68k) 251772af6995Smrg library_names_spec='$libname.ixlibrary $libname.a' 251872af6995Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 251972af6995Smrg 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' 252072af6995Smrg ;; 252172af6995Smrg esac 252272af6995Smrg ;; 252372af6995Smrg 252472af6995Smrgbeos*) 252572af6995Smrg library_names_spec='$libname$shared_ext' 252672af6995Smrg dynamic_linker="$host_os ld.so" 252772af6995Smrg shlibpath_var=LIBRARY_PATH 252872af6995Smrg ;; 252972af6995Smrg 253072af6995Smrgbsdi[[45]]*) 253172af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 253272af6995Smrg need_version=no 253372af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 253472af6995Smrg soname_spec='$libname$release$shared_ext$major' 253572af6995Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 253672af6995Smrg shlibpath_var=LD_LIBRARY_PATH 253772af6995Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 253872af6995Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 253972af6995Smrg # the default ld.so.conf also contains /usr/contrib/lib and 254072af6995Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 254172af6995Smrg # libtool to hard-code these into programs 254272af6995Smrg ;; 254372af6995Smrg 254472af6995Smrgcygwin* | mingw* | pw32* | cegcc*) 254572af6995Smrg version_type=windows 254672af6995Smrg shrext_cmds=.dll 254772af6995Smrg need_version=no 254872af6995Smrg need_lib_prefix=no 254972af6995Smrg 255072af6995Smrg case $GCC,$cc_basename in 255172af6995Smrg yes,*) 255272af6995Smrg # gcc 255372af6995Smrg library_names_spec='$libname.dll.a' 255472af6995Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 255572af6995Smrg postinstall_cmds='base_file=`basename \$file`~ 255672af6995Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 255772af6995Smrg dldir=$destdir/`dirname \$dlpath`~ 255872af6995Smrg test -d \$dldir || mkdir -p \$dldir~ 255972af6995Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 256072af6995Smrg chmod a+x \$dldir/$dlname~ 256172af6995Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 256272af6995Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 256372af6995Smrg fi' 256472af6995Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 256572af6995Smrg dlpath=$dir/\$dldll~ 256672af6995Smrg $RM \$dlpath' 256772af6995Smrg shlibpath_overrides_runpath=yes 256872af6995Smrg 256972af6995Smrg case $host_os in 257072af6995Smrg cygwin*) 257172af6995Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2572a773ec55Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257372af6995Smrgm4_if([$1], [],[ 257472af6995Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 257572af6995Smrg ;; 257672af6995Smrg mingw* | cegcc*) 257772af6995Smrg # MinGW DLLs use traditional 'lib' prefix 257872af6995Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257972af6995Smrg ;; 258072af6995Smrg pw32*) 258172af6995Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2582a773ec55Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 258372af6995Smrg ;; 258472af6995Smrg esac 258572af6995Smrg dynamic_linker='Win32 ld.exe' 258672af6995Smrg ;; 258772af6995Smrg 2588a773ec55Smrg *,cl* | *,icl*) 2589a773ec55Smrg # Native MSVC or ICC 259072af6995Smrg libname_spec='$name' 259172af6995Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 259272af6995Smrg library_names_spec='$libname.dll.lib' 259372af6995Smrg 259472af6995Smrg case $build_os in 259572af6995Smrg mingw*) 259672af6995Smrg sys_lib_search_path_spec= 259772af6995Smrg lt_save_ifs=$IFS 259872af6995Smrg IFS=';' 259972af6995Smrg for lt_path in $LIB 260072af6995Smrg do 260172af6995Smrg IFS=$lt_save_ifs 260272af6995Smrg # Let DOS variable expansion print the short 8.3 style file name. 260372af6995Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 260472af6995Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 260572af6995Smrg done 260672af6995Smrg IFS=$lt_save_ifs 260772af6995Smrg # Convert to MSYS style. 2608a773ec55Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 260972af6995Smrg ;; 261072af6995Smrg cygwin*) 261172af6995Smrg # Convert to unix form, then to dos form, then back to unix form 261272af6995Smrg # but this time dos style (no spaces!) so that the unix form looks 261372af6995Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 261472af6995Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 261572af6995Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 261672af6995Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 261772af6995Smrg ;; 261872af6995Smrg *) 261972af6995Smrg sys_lib_search_path_spec=$LIB 262072af6995Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 262172af6995Smrg # It is most probably a Windows format PATH. 262272af6995Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 262372af6995Smrg else 262472af6995Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 262572af6995Smrg fi 262672af6995Smrg # FIXME: find the short name or the path components, as spaces are 262772af6995Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 262872af6995Smrg ;; 262972af6995Smrg esac 263072af6995Smrg 263172af6995Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 263272af6995Smrg postinstall_cmds='base_file=`basename \$file`~ 263372af6995Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 263472af6995Smrg dldir=$destdir/`dirname \$dlpath`~ 263572af6995Smrg test -d \$dldir || mkdir -p \$dldir~ 263672af6995Smrg $install_prog $dir/$dlname \$dldir/$dlname' 263772af6995Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 263872af6995Smrg dlpath=$dir/\$dldll~ 263972af6995Smrg $RM \$dlpath' 264072af6995Smrg shlibpath_overrides_runpath=yes 264172af6995Smrg dynamic_linker='Win32 link.exe' 264272af6995Smrg ;; 264372af6995Smrg 264472af6995Smrg *) 2645a773ec55Smrg # Assume MSVC and ICC wrapper 264672af6995Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 264772af6995Smrg dynamic_linker='Win32 ld.exe' 264872af6995Smrg ;; 264972af6995Smrg esac 265072af6995Smrg # FIXME: first we should search . and the directory the executable is in 265172af6995Smrg shlibpath_var=PATH 265272af6995Smrg ;; 265372af6995Smrg 265472af6995Smrgdarwin* | rhapsody*) 265572af6995Smrg dynamic_linker="$host_os dyld" 265672af6995Smrg version_type=darwin 265772af6995Smrg need_lib_prefix=no 265872af6995Smrg need_version=no 26597854a16aSmrg library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext' 266072af6995Smrg soname_spec='$libname$release$major$shared_ext' 266172af6995Smrg shlibpath_overrides_runpath=yes 266272af6995Smrg shlibpath_var=DYLD_LIBRARY_PATH 26637854a16aSmrg shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`' 266472af6995Smrgm4_if([$1], [],[ 266572af6995Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 266672af6995Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 266772af6995Smrg ;; 266872af6995Smrg 266972af6995Smrgdgux*) 267072af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 267172af6995Smrg need_lib_prefix=no 267272af6995Smrg need_version=no 267372af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 267472af6995Smrg soname_spec='$libname$release$shared_ext$major' 267572af6995Smrg shlibpath_var=LD_LIBRARY_PATH 267672af6995Smrg ;; 267772af6995Smrg 2678a773ec55Smrgfreebsd* | dragonfly* | midnightbsd*) 267972af6995Smrg # DragonFly does not have aout. When/if they implement a new 268072af6995Smrg # versioning mechanism, adjust this. 268172af6995Smrg if test -x /usr/bin/objformat; then 268272af6995Smrg objformat=`/usr/bin/objformat` 268372af6995Smrg else 268472af6995Smrg case $host_os in 268572af6995Smrg freebsd[[23]].*) objformat=aout ;; 268672af6995Smrg *) objformat=elf ;; 268772af6995Smrg esac 268872af6995Smrg fi 26897854a16aSmrg # Handle Gentoo/FreeBSD as it was Linux 26907854a16aSmrg case $host_vendor in 26917854a16aSmrg gentoo) 26927854a16aSmrg version_type=linux ;; 26937854a16aSmrg *) 26947854a16aSmrg version_type=freebsd-$objformat ;; 26957854a16aSmrg esac 26967854a16aSmrg 269772af6995Smrg case $version_type in 269872af6995Smrg freebsd-elf*) 269972af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 270072af6995Smrg soname_spec='$libname$release$shared_ext$major' 270172af6995Smrg need_version=no 270272af6995Smrg need_lib_prefix=no 270372af6995Smrg ;; 270472af6995Smrg freebsd-*) 270572af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 270672af6995Smrg need_version=yes 270772af6995Smrg ;; 27087854a16aSmrg linux) 27097854a16aSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27107854a16aSmrg soname_spec='${libname}${release}${shared_ext}$major' 27117854a16aSmrg need_lib_prefix=no 27127854a16aSmrg need_version=no 27137854a16aSmrg ;; 271472af6995Smrg esac 271572af6995Smrg shlibpath_var=LD_LIBRARY_PATH 271672af6995Smrg case $host_os in 271772af6995Smrg freebsd2.*) 271872af6995Smrg shlibpath_overrides_runpath=yes 271972af6995Smrg ;; 272072af6995Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 272172af6995Smrg shlibpath_overrides_runpath=yes 272272af6995Smrg hardcode_into_libs=yes 272372af6995Smrg ;; 272472af6995Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 272572af6995Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 272672af6995Smrg shlibpath_overrides_runpath=no 272772af6995Smrg hardcode_into_libs=yes 272872af6995Smrg ;; 272972af6995Smrg *) # from 4.6 on, and DragonFly 273072af6995Smrg shlibpath_overrides_runpath=yes 273172af6995Smrg hardcode_into_libs=yes 273272af6995Smrg ;; 273372af6995Smrg esac 273472af6995Smrg ;; 273572af6995Smrg 273672af6995Smrghaiku*) 273772af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 273872af6995Smrg need_lib_prefix=no 273972af6995Smrg need_version=no 274072af6995Smrg dynamic_linker="$host_os runtime_loader" 274172af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 274272af6995Smrg soname_spec='$libname$release$shared_ext$major' 274372af6995Smrg shlibpath_var=LIBRARY_PATH 274472af6995Smrg shlibpath_overrides_runpath=no 274572af6995Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 274672af6995Smrg hardcode_into_libs=yes 274772af6995Smrg ;; 274872af6995Smrg 274972af6995Smrghpux9* | hpux10* | hpux11*) 275072af6995Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 275172af6995Smrg # link against other versions. 275272af6995Smrg version_type=sunos 275372af6995Smrg need_lib_prefix=no 275472af6995Smrg need_version=no 275572af6995Smrg case $host_cpu in 275672af6995Smrg ia64*) 275772af6995Smrg shrext_cmds='.so' 275872af6995Smrg hardcode_into_libs=yes 275972af6995Smrg dynamic_linker="$host_os dld.so" 276072af6995Smrg shlibpath_var=LD_LIBRARY_PATH 276172af6995Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 276272af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 276372af6995Smrg soname_spec='$libname$release$shared_ext$major' 276472af6995Smrg if test 32 = "$HPUX_IA64_MODE"; then 276572af6995Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 276672af6995Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 276772af6995Smrg else 276872af6995Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 276972af6995Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 277072af6995Smrg fi 277172af6995Smrg ;; 277272af6995Smrg hppa*64*) 277372af6995Smrg shrext_cmds='.sl' 277472af6995Smrg hardcode_into_libs=yes 277572af6995Smrg dynamic_linker="$host_os dld.sl" 277672af6995Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 277772af6995Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 277872af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 277972af6995Smrg soname_spec='$libname$release$shared_ext$major' 278072af6995Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 278172af6995Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 278272af6995Smrg ;; 278372af6995Smrg *) 278472af6995Smrg shrext_cmds='.sl' 278572af6995Smrg dynamic_linker="$host_os dld.sl" 278672af6995Smrg shlibpath_var=SHLIB_PATH 278772af6995Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 278872af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 278972af6995Smrg soname_spec='$libname$release$shared_ext$major' 279072af6995Smrg ;; 279172af6995Smrg esac 279272af6995Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 279372af6995Smrg postinstall_cmds='chmod 555 $lib' 279472af6995Smrg # or fails outright, so override atomically: 279572af6995Smrg install_override_mode=555 279672af6995Smrg ;; 279772af6995Smrg 279872af6995Smrginterix[[3-9]]*) 279972af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 280072af6995Smrg need_lib_prefix=no 280172af6995Smrg need_version=no 280272af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 280372af6995Smrg soname_spec='$libname$release$shared_ext$major' 280472af6995Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 280572af6995Smrg shlibpath_var=LD_LIBRARY_PATH 280672af6995Smrg shlibpath_overrides_runpath=no 280772af6995Smrg hardcode_into_libs=yes 280872af6995Smrg ;; 280972af6995Smrg 281072af6995Smrgirix5* | irix6* | nonstopux*) 281172af6995Smrg case $host_os in 281272af6995Smrg nonstopux*) version_type=nonstopux ;; 281372af6995Smrg *) 281472af6995Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 281572af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 281672af6995Smrg else 281772af6995Smrg version_type=irix 281872af6995Smrg fi ;; 281972af6995Smrg esac 282072af6995Smrg need_lib_prefix=no 282172af6995Smrg need_version=no 282272af6995Smrg soname_spec='$libname$release$shared_ext$major' 282372af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 282472af6995Smrg case $host_os in 282572af6995Smrg irix5* | nonstopux*) 282672af6995Smrg libsuff= shlibsuff= 282772af6995Smrg ;; 282872af6995Smrg *) 282972af6995Smrg case $LD in # libtool.m4 will add one of these switches to LD 283072af6995Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 283172af6995Smrg libsuff= shlibsuff= libmagic=32-bit;; 283272af6995Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 283372af6995Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 283472af6995Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 283572af6995Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 283672af6995Smrg *) libsuff= shlibsuff= libmagic=never-match;; 283772af6995Smrg esac 283872af6995Smrg ;; 283972af6995Smrg esac 284072af6995Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 284172af6995Smrg shlibpath_overrides_runpath=no 284272af6995Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 284372af6995Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 284472af6995Smrg hardcode_into_libs=yes 284572af6995Smrg ;; 284672af6995Smrg 284772af6995Smrg# No shared lib support for Linux oldld, aout, or coff. 284872af6995Smrglinux*oldld* | linux*aout* | linux*coff*) 284972af6995Smrg dynamic_linker=no 285072af6995Smrg ;; 285172af6995Smrg 285272af6995Smrglinux*android*) 285372af6995Smrg version_type=none # Android doesn't support versioned libraries. 285472af6995Smrg need_lib_prefix=no 285572af6995Smrg need_version=no 285672af6995Smrg library_names_spec='$libname$release$shared_ext' 285772af6995Smrg soname_spec='$libname$release$shared_ext' 285872af6995Smrg finish_cmds= 285972af6995Smrg shlibpath_var=LD_LIBRARY_PATH 286072af6995Smrg shlibpath_overrides_runpath=yes 286172af6995Smrg 286272af6995Smrg # This implies no fast_install, which is unacceptable. 286372af6995Smrg # Some rework will be needed to allow for fast_install 286472af6995Smrg # before this can be enabled. 286572af6995Smrg hardcode_into_libs=yes 286672af6995Smrg 286772af6995Smrg dynamic_linker='Android linker' 286872af6995Smrg # Don't embed -rpath directories since the linker doesn't support them. 286972af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 287072af6995Smrg ;; 287172af6995Smrg 287272af6995Smrg# This must be glibc/ELF. 287372af6995Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 287472af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 287572af6995Smrg need_lib_prefix=no 287672af6995Smrg need_version=no 287772af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 287872af6995Smrg soname_spec='$libname$release$shared_ext$major' 287972af6995Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 288072af6995Smrg shlibpath_var=LD_LIBRARY_PATH 288172af6995Smrg shlibpath_overrides_runpath=no 288272af6995Smrg 288372af6995Smrg # Some binutils ld are patched to set DT_RUNPATH 288472af6995Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 288572af6995Smrg [lt_cv_shlibpath_overrides_runpath=no 288672af6995Smrg save_LDFLAGS=$LDFLAGS 288772af6995Smrg save_libdir=$libdir 288872af6995Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 288972af6995Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 289072af6995Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 289172af6995Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 289272af6995Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 289372af6995Smrg LDFLAGS=$save_LDFLAGS 289472af6995Smrg libdir=$save_libdir 289572af6995Smrg ]) 289672af6995Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 289772af6995Smrg 289872af6995Smrg # This implies no fast_install, which is unacceptable. 289972af6995Smrg # Some rework will be needed to allow for fast_install 290072af6995Smrg # before this can be enabled. 290172af6995Smrg hardcode_into_libs=yes 290272af6995Smrg 290372af6995Smrg # Ideally, we could use ldconfig to report *all* directores which are 290472af6995Smrg # searched for libraries, however this is still not possible. Aside from not 290572af6995Smrg # being certain /sbin/ldconfig is available, command 290672af6995Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 290772af6995Smrg # even though it is searched at run-time. Try to do the best guess by 290872af6995Smrg # appending ld.so.conf contents (and includes) to the search path. 290972af6995Smrg if test -f /etc/ld.so.conf; then 291072af6995Smrg 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' ' '` 291172af6995Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 291272af6995Smrg fi 291372af6995Smrg 291472af6995Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 291572af6995Smrg # powerpc, because MkLinux only supported shared libraries with the 291672af6995Smrg # GNU dynamic linker. Since this was broken with cross compilers, 291772af6995Smrg # most powerpc-linux boxes support dynamic linking these days and 291872af6995Smrg # people can always --disable-shared, the test was removed, and we 291972af6995Smrg # assume the GNU/Linux dynamic linker is in use. 292072af6995Smrg dynamic_linker='GNU/Linux ld.so' 292172af6995Smrg ;; 292272af6995Smrg 292372af6995Smrgnetbsd*) 292472af6995Smrg version_type=sunos 292572af6995Smrg need_lib_prefix=no 292672af6995Smrg need_version=no 292772af6995Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 292872af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 292972af6995Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 293072af6995Smrg dynamic_linker='NetBSD (a.out) ld.so' 293172af6995Smrg else 293272af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 293372af6995Smrg soname_spec='$libname$release$shared_ext$major' 293472af6995Smrg dynamic_linker='NetBSD ld.elf_so' 293572af6995Smrg fi 293672af6995Smrg shlibpath_var=LD_LIBRARY_PATH 293772af6995Smrg shlibpath_overrides_runpath=yes 293872af6995Smrg hardcode_into_libs=yes 293972af6995Smrg ;; 294072af6995Smrg 294172af6995Smrgnewsos6) 294272af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 294372af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 294472af6995Smrg shlibpath_var=LD_LIBRARY_PATH 294572af6995Smrg shlibpath_overrides_runpath=yes 294672af6995Smrg ;; 294772af6995Smrg 294872af6995Smrg*nto* | *qnx*) 294972af6995Smrg version_type=qnx 295072af6995Smrg need_lib_prefix=no 295172af6995Smrg need_version=no 295272af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 295372af6995Smrg soname_spec='$libname$release$shared_ext$major' 295472af6995Smrg shlibpath_var=LD_LIBRARY_PATH 295572af6995Smrg shlibpath_overrides_runpath=no 295672af6995Smrg hardcode_into_libs=yes 295772af6995Smrg dynamic_linker='ldqnx.so' 295872af6995Smrg ;; 295972af6995Smrg 296072af6995Smrgopenbsd* | bitrig*) 296172af6995Smrg version_type=sunos 296272af6995Smrg sys_lib_dlsearch_path_spec=/usr/lib 296372af6995Smrg need_lib_prefix=no 296472af6995Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 296572af6995Smrg need_version=no 296672af6995Smrg else 296772af6995Smrg need_version=yes 296872af6995Smrg fi 296972af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 297072af6995Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 297172af6995Smrg shlibpath_var=LD_LIBRARY_PATH 297272af6995Smrg shlibpath_overrides_runpath=yes 297372af6995Smrg ;; 297472af6995Smrg 297572af6995Smrgos2*) 297672af6995Smrg libname_spec='$name' 297772af6995Smrg version_type=windows 297872af6995Smrg shrext_cmds=.dll 297972af6995Smrg need_version=no 298072af6995Smrg need_lib_prefix=no 298172af6995Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 298272af6995Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 298372af6995Smrg v=$($ECHO $release$versuffix | tr -d .-); 298472af6995Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 298572af6995Smrg $ECHO $n$v`$shared_ext' 298672af6995Smrg library_names_spec='${libname}_dll.$libext' 298772af6995Smrg dynamic_linker='OS/2 ld.exe' 298872af6995Smrg shlibpath_var=BEGINLIBPATH 298972af6995Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 299072af6995Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 299172af6995Smrg postinstall_cmds='base_file=`basename \$file`~ 299272af6995Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 299372af6995Smrg dldir=$destdir/`dirname \$dlpath`~ 299472af6995Smrg test -d \$dldir || mkdir -p \$dldir~ 299572af6995Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 299672af6995Smrg chmod a+x \$dldir/$dlname~ 299772af6995Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 299872af6995Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 299972af6995Smrg fi' 300072af6995Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 300172af6995Smrg dlpath=$dir/\$dldll~ 300272af6995Smrg $RM \$dlpath' 300372af6995Smrg ;; 300472af6995Smrg 300572af6995Smrgosf3* | osf4* | osf5*) 300672af6995Smrg version_type=osf 300772af6995Smrg need_lib_prefix=no 300872af6995Smrg need_version=no 300972af6995Smrg soname_spec='$libname$release$shared_ext$major' 301072af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 301172af6995Smrg shlibpath_var=LD_LIBRARY_PATH 301272af6995Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 301372af6995Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 301472af6995Smrg ;; 301572af6995Smrg 301672af6995Smrgrdos*) 301772af6995Smrg dynamic_linker=no 301872af6995Smrg ;; 301972af6995Smrg 302072af6995Smrgsolaris*) 302172af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 302272af6995Smrg need_lib_prefix=no 302372af6995Smrg need_version=no 302472af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 302572af6995Smrg soname_spec='$libname$release$shared_ext$major' 302672af6995Smrg shlibpath_var=LD_LIBRARY_PATH 302772af6995Smrg shlibpath_overrides_runpath=yes 302872af6995Smrg hardcode_into_libs=yes 302972af6995Smrg # ldd complains unless libraries are executable 303072af6995Smrg postinstall_cmds='chmod +x $lib' 303172af6995Smrg ;; 303272af6995Smrg 303372af6995Smrgsunos4*) 303472af6995Smrg version_type=sunos 303572af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 303672af6995Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 303772af6995Smrg shlibpath_var=LD_LIBRARY_PATH 303872af6995Smrg shlibpath_overrides_runpath=yes 303972af6995Smrg if test yes = "$with_gnu_ld"; then 304072af6995Smrg need_lib_prefix=no 304172af6995Smrg fi 304272af6995Smrg need_version=yes 304372af6995Smrg ;; 304472af6995Smrg 304572af6995Smrgsysv4 | sysv4.3*) 304672af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 304772af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 304872af6995Smrg soname_spec='$libname$release$shared_ext$major' 304972af6995Smrg shlibpath_var=LD_LIBRARY_PATH 305072af6995Smrg case $host_vendor in 305172af6995Smrg sni) 305272af6995Smrg shlibpath_overrides_runpath=no 305372af6995Smrg need_lib_prefix=no 305472af6995Smrg runpath_var=LD_RUN_PATH 305572af6995Smrg ;; 305672af6995Smrg siemens) 305772af6995Smrg need_lib_prefix=no 305872af6995Smrg ;; 305972af6995Smrg motorola) 306072af6995Smrg need_lib_prefix=no 306172af6995Smrg need_version=no 306272af6995Smrg shlibpath_overrides_runpath=no 306372af6995Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 306472af6995Smrg ;; 306572af6995Smrg esac 306672af6995Smrg ;; 306772af6995Smrg 306872af6995Smrgsysv4*MP*) 306972af6995Smrg if test -d /usr/nec; then 307072af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 307172af6995Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 307272af6995Smrg soname_spec='$libname$shared_ext.$major' 307372af6995Smrg shlibpath_var=LD_LIBRARY_PATH 307472af6995Smrg fi 307572af6995Smrg ;; 307672af6995Smrg 307772af6995Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 307872af6995Smrg version_type=sco 307972af6995Smrg need_lib_prefix=no 308072af6995Smrg need_version=no 308172af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 308272af6995Smrg soname_spec='$libname$release$shared_ext$major' 308372af6995Smrg shlibpath_var=LD_LIBRARY_PATH 308472af6995Smrg shlibpath_overrides_runpath=yes 308572af6995Smrg hardcode_into_libs=yes 308672af6995Smrg if test yes = "$with_gnu_ld"; then 308772af6995Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 308872af6995Smrg else 308972af6995Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 309072af6995Smrg case $host_os in 309172af6995Smrg sco3.2v5*) 309272af6995Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 309372af6995Smrg ;; 309472af6995Smrg esac 309572af6995Smrg fi 309672af6995Smrg sys_lib_dlsearch_path_spec='/usr/lib' 309772af6995Smrg ;; 309872af6995Smrg 309972af6995Smrgtpf*) 310072af6995Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 310172af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 310272af6995Smrg need_lib_prefix=no 310372af6995Smrg need_version=no 310472af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 310572af6995Smrg shlibpath_var=LD_LIBRARY_PATH 310672af6995Smrg shlibpath_overrides_runpath=no 310772af6995Smrg hardcode_into_libs=yes 310872af6995Smrg ;; 310972af6995Smrg 311072af6995Smrguts4*) 311172af6995Smrg version_type=linux # correct to gnu/linux during the next big refactor 311272af6995Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 311372af6995Smrg soname_spec='$libname$release$shared_ext$major' 311472af6995Smrg shlibpath_var=LD_LIBRARY_PATH 311572af6995Smrg ;; 311672af6995Smrg 311772af6995Smrg*) 311872af6995Smrg dynamic_linker=no 311972af6995Smrg ;; 312072af6995Smrgesac 312172af6995SmrgAC_MSG_RESULT([$dynamic_linker]) 312272af6995Smrgtest no = "$dynamic_linker" && can_build_shared=no 312372af6995Smrg 312472af6995Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 312572af6995Smrgif test yes = "$GCC"; then 312672af6995Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 312772af6995Smrgfi 312872af6995Smrg 312972af6995Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 313072af6995Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 313172af6995Smrgfi 313272af6995Smrg 313372af6995Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 313472af6995Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 313572af6995Smrgfi 313672af6995Smrg 313772af6995Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 313872af6995Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 313972af6995Smrg 314072af6995Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 314172af6995Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 314272af6995Smrg 314372af6995Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 314472af6995Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 314572af6995Smrg 314672af6995Smrg_LT_DECL([], [variables_saved_for_relink], [1], 314772af6995Smrg [Variables whose values should be saved in libtool wrapper scripts and 314872af6995Smrg restored at link time]) 314972af6995Smrg_LT_DECL([], [need_lib_prefix], [0], 315072af6995Smrg [Do we need the "lib" prefix for modules?]) 315172af6995Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 315272af6995Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 315372af6995Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 315472af6995Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 315572af6995Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 315672af6995Smrg [Is shlibpath searched before the hard-coded library search path?]) 315772af6995Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 315872af6995Smrg_LT_DECL([], [library_names_spec], [1], 315972af6995Smrg [[List of archive names. First name is the real one, the rest are links. 316072af6995Smrg The last name is the one that the linker finds with -lNAME]]) 316172af6995Smrg_LT_DECL([], [soname_spec], [1], 316272af6995Smrg [[The coded name of the library, if different from the real name]]) 316372af6995Smrg_LT_DECL([], [install_override_mode], [1], 316472af6995Smrg [Permission mode override for installation of shared libraries]) 316572af6995Smrg_LT_DECL([], [postinstall_cmds], [2], 316672af6995Smrg [Command to use after installation of a shared archive]) 316772af6995Smrg_LT_DECL([], [postuninstall_cmds], [2], 316872af6995Smrg [Command to use after uninstallation of a shared archive]) 316972af6995Smrg_LT_DECL([], [finish_cmds], [2], 317072af6995Smrg [Commands used to finish a libtool library installation in a directory]) 317172af6995Smrg_LT_DECL([], [finish_eval], [1], 317272af6995Smrg [[As "finish_cmds", except a single script fragment to be evaled but 317372af6995Smrg not shown]]) 317472af6995Smrg_LT_DECL([], [hardcode_into_libs], [0], 317572af6995Smrg [Whether we should hardcode library paths into libraries]) 317672af6995Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 317772af6995Smrg [Compile-time system search path for libraries]) 317872af6995Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 317972af6995Smrg [Detected run-time system search path for libraries]) 318072af6995Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 318172af6995Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 318272af6995Smrg])# _LT_SYS_DYNAMIC_LINKER 318372af6995Smrg 318472af6995Smrg 318572af6995Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 318672af6995Smrg# -------------------------- 318772af6995Smrg# find a file program that can recognize shared library 318872af6995SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 318972af6995Smrg[m4_require([_LT_DECL_EGREP])dnl 319072af6995SmrgAC_MSG_CHECKING([for $1]) 319172af6995SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 319272af6995Smrg[case $MAGIC_CMD in 319372af6995Smrg[[\\/*] | ?:[\\/]*]) 319472af6995Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 319572af6995Smrg ;; 319672af6995Smrg*) 319772af6995Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 319872af6995Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 319972af6995Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 320072af6995Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 320172af6995Smrgdnl not every word. This closes a longstanding sh security hole. 320272af6995Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 320372af6995Smrg for ac_dir in $ac_dummy; do 320472af6995Smrg IFS=$lt_save_ifs 320572af6995Smrg test -z "$ac_dir" && ac_dir=. 320672af6995Smrg if test -f "$ac_dir/$1"; then 320772af6995Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 320872af6995Smrg if test -n "$file_magic_test_file"; then 320972af6995Smrg case $deplibs_check_method in 321072af6995Smrg "file_magic "*) 321172af6995Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 321272af6995Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 321372af6995Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 321472af6995Smrg $EGREP "$file_magic_regex" > /dev/null; then 321572af6995Smrg : 321672af6995Smrg else 321772af6995Smrg cat <<_LT_EOF 1>&2 321872af6995Smrg 321972af6995Smrg*** Warning: the command libtool uses to detect shared libraries, 322072af6995Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 322172af6995Smrg*** The result is that libtool may fail to recognize shared libraries 322272af6995Smrg*** as such. This will affect the creation of libtool libraries that 322372af6995Smrg*** depend on shared libraries, but programs linked with such libtool 322472af6995Smrg*** libraries will work regardless of this problem. Nevertheless, you 322572af6995Smrg*** may want to report the problem to your system manager and/or to 322672af6995Smrg*** bug-libtool@gnu.org 322772af6995Smrg 322872af6995Smrg_LT_EOF 322972af6995Smrg fi ;; 323072af6995Smrg esac 323172af6995Smrg fi 323272af6995Smrg break 323372af6995Smrg fi 323472af6995Smrg done 323572af6995Smrg IFS=$lt_save_ifs 323672af6995Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 323772af6995Smrg ;; 323872af6995Smrgesac]) 323972af6995SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 324072af6995Smrgif test -n "$MAGIC_CMD"; then 324172af6995Smrg AC_MSG_RESULT($MAGIC_CMD) 324272af6995Smrgelse 324372af6995Smrg AC_MSG_RESULT(no) 324472af6995Smrgfi 324572af6995Smrg_LT_DECL([], [MAGIC_CMD], [0], 324672af6995Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 324772af6995Smrg])# _LT_PATH_TOOL_PREFIX 324872af6995Smrg 324972af6995Smrg# Old name: 325072af6995SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 325172af6995Smrgdnl aclocal-1.4 backwards compatibility: 325272af6995Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 325372af6995Smrg 325472af6995Smrg 325572af6995Smrg# _LT_PATH_MAGIC 325672af6995Smrg# -------------- 325772af6995Smrg# find a file program that can recognize a shared library 325872af6995Smrgm4_defun([_LT_PATH_MAGIC], 325972af6995Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 326072af6995Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 326172af6995Smrg if test -n "$ac_tool_prefix"; then 326272af6995Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 326372af6995Smrg else 326472af6995Smrg MAGIC_CMD=: 326572af6995Smrg fi 326672af6995Smrgfi 326772af6995Smrg])# _LT_PATH_MAGIC 326872af6995Smrg 326972af6995Smrg 327072af6995Smrg# LT_PATH_LD 327172af6995Smrg# ---------- 327272af6995Smrg# find the pathname to the GNU or non-GNU linker 327372af6995SmrgAC_DEFUN([LT_PATH_LD], 327472af6995Smrg[AC_REQUIRE([AC_PROG_CC])dnl 327572af6995SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 327672af6995SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 327772af6995Smrgm4_require([_LT_DECL_SED])dnl 327872af6995Smrgm4_require([_LT_DECL_EGREP])dnl 327972af6995Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 328072af6995Smrg 328172af6995SmrgAC_ARG_WITH([gnu-ld], 328272af6995Smrg [AS_HELP_STRING([--with-gnu-ld], 328372af6995Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 328472af6995Smrg [test no = "$withval" || with_gnu_ld=yes], 328572af6995Smrg [with_gnu_ld=no])dnl 328672af6995Smrg 328772af6995Smrgac_prog=ld 328872af6995Smrgif test yes = "$GCC"; then 328972af6995Smrg # Check if gcc -print-prog-name=ld gives a path. 329072af6995Smrg AC_MSG_CHECKING([for ld used by $CC]) 329172af6995Smrg case $host in 329272af6995Smrg *-*-mingw*) 329372af6995Smrg # gcc leaves a trailing carriage return, which upsets mingw 329472af6995Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 329572af6995Smrg *) 329672af6995Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 329772af6995Smrg esac 329872af6995Smrg case $ac_prog in 329972af6995Smrg # Accept absolute paths. 330072af6995Smrg [[\\/]]* | ?:[[\\/]]*) 330172af6995Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 330272af6995Smrg # Canonicalize the pathname of ld 330372af6995Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 330472af6995Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 330572af6995Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 330672af6995Smrg done 330772af6995Smrg test -z "$LD" && LD=$ac_prog 330872af6995Smrg ;; 330972af6995Smrg "") 331072af6995Smrg # If it fails, then pretend we aren't using GCC. 331172af6995Smrg ac_prog=ld 331272af6995Smrg ;; 331372af6995Smrg *) 331472af6995Smrg # If it is relative, then search for the first ld in PATH. 331572af6995Smrg with_gnu_ld=unknown 331672af6995Smrg ;; 331772af6995Smrg esac 331872af6995Smrgelif test yes = "$with_gnu_ld"; then 331972af6995Smrg AC_MSG_CHECKING([for GNU ld]) 332072af6995Smrgelse 332172af6995Smrg AC_MSG_CHECKING([for non-GNU ld]) 332272af6995Smrgfi 332372af6995SmrgAC_CACHE_VAL(lt_cv_path_LD, 332472af6995Smrg[if test -z "$LD"; then 332572af6995Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 332672af6995Smrg for ac_dir in $PATH; do 332772af6995Smrg IFS=$lt_save_ifs 332872af6995Smrg test -z "$ac_dir" && ac_dir=. 332972af6995Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 333072af6995Smrg lt_cv_path_LD=$ac_dir/$ac_prog 333172af6995Smrg # Check to see if the program is GNU ld. I'd rather use --version, 333272af6995Smrg # but apparently some variants of GNU ld only accept -v. 333372af6995Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 333472af6995Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 333572af6995Smrg *GNU* | *'with BFD'*) 333672af6995Smrg test no != "$with_gnu_ld" && break 333772af6995Smrg ;; 333872af6995Smrg *) 333972af6995Smrg test yes != "$with_gnu_ld" && break 334072af6995Smrg ;; 334172af6995Smrg esac 334272af6995Smrg fi 334372af6995Smrg done 334472af6995Smrg IFS=$lt_save_ifs 334572af6995Smrgelse 334672af6995Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 334772af6995Smrgfi]) 334872af6995SmrgLD=$lt_cv_path_LD 334972af6995Smrgif test -n "$LD"; then 335072af6995Smrg AC_MSG_RESULT($LD) 335172af6995Smrgelse 335272af6995Smrg AC_MSG_RESULT(no) 335372af6995Smrgfi 335472af6995Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 335572af6995Smrg_LT_PATH_LD_GNU 335672af6995SmrgAC_SUBST([LD]) 335772af6995Smrg 335872af6995Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 335972af6995Smrg])# LT_PATH_LD 336072af6995Smrg 336172af6995Smrg# Old names: 336272af6995SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 336372af6995SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 336472af6995Smrgdnl aclocal-1.4 backwards compatibility: 336572af6995Smrgdnl AC_DEFUN([AM_PROG_LD], []) 336672af6995Smrgdnl AC_DEFUN([AC_PROG_LD], []) 336772af6995Smrg 336872af6995Smrg 336972af6995Smrg# _LT_PATH_LD_GNU 337072af6995Smrg#- -------------- 337172af6995Smrgm4_defun([_LT_PATH_LD_GNU], 337272af6995Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 337372af6995Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 337472af6995Smrgcase `$LD -v 2>&1 </dev/null` in 337572af6995Smrg*GNU* | *'with BFD'*) 337672af6995Smrg lt_cv_prog_gnu_ld=yes 337772af6995Smrg ;; 337872af6995Smrg*) 337972af6995Smrg lt_cv_prog_gnu_ld=no 338072af6995Smrg ;; 338172af6995Smrgesac]) 338272af6995Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 338372af6995Smrg])# _LT_PATH_LD_GNU 338472af6995Smrg 338572af6995Smrg 338672af6995Smrg# _LT_CMD_RELOAD 338772af6995Smrg# -------------- 338872af6995Smrg# find reload flag for linker 338972af6995Smrg# -- PORTME Some linkers may need a different reload flag. 339072af6995Smrgm4_defun([_LT_CMD_RELOAD], 339172af6995Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 339272af6995Smrg lt_cv_ld_reload_flag, 339372af6995Smrg [lt_cv_ld_reload_flag='-r']) 339472af6995Smrgreload_flag=$lt_cv_ld_reload_flag 339572af6995Smrgcase $reload_flag in 339672af6995Smrg"" | " "*) ;; 339772af6995Smrg*) reload_flag=" $reload_flag" ;; 339872af6995Smrgesac 339972af6995Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 340072af6995Smrgcase $host_os in 340172af6995Smrg cygwin* | mingw* | pw32* | cegcc*) 340272af6995Smrg if test yes != "$GCC"; then 340372af6995Smrg reload_cmds=false 340472af6995Smrg fi 340572af6995Smrg ;; 340672af6995Smrg darwin*) 340772af6995Smrg if test yes = "$GCC"; then 340872af6995Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 340972af6995Smrg else 341072af6995Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 341172af6995Smrg fi 341272af6995Smrg ;; 341372af6995Smrgesac 341472af6995Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 341572af6995Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 341672af6995Smrg])# _LT_CMD_RELOAD 341772af6995Smrg 341872af6995Smrg 341972af6995Smrg# _LT_PATH_DD 342072af6995Smrg# ----------- 342172af6995Smrg# find a working dd 342272af6995Smrgm4_defun([_LT_PATH_DD], 342372af6995Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 342472af6995Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 342572af6995Smrgcat conftest.i conftest.i >conftest2.i 342672af6995Smrg: ${lt_DD:=$DD} 342772af6995SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 342872af6995Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 342972af6995Smrg cmp -s conftest.i conftest.out \ 343072af6995Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 343172af6995Smrgfi]) 343272af6995Smrgrm -f conftest.i conftest2.i conftest.out]) 343372af6995Smrg])# _LT_PATH_DD 343472af6995Smrg 343572af6995Smrg 343672af6995Smrg# _LT_CMD_TRUNCATE 343772af6995Smrg# ---------------- 343872af6995Smrg# find command to truncate a binary pipe 343972af6995Smrgm4_defun([_LT_CMD_TRUNCATE], 344072af6995Smrg[m4_require([_LT_PATH_DD]) 344172af6995SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 344272af6995Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 344372af6995Smrgcat conftest.i conftest.i >conftest2.i 344472af6995Smrglt_cv_truncate_bin= 344572af6995Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 344672af6995Smrg cmp -s conftest.i conftest.out \ 344772af6995Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 344872af6995Smrgfi 344972af6995Smrgrm -f conftest.i conftest2.i conftest.out 345072af6995Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 345172af6995Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 345272af6995Smrg [Command to truncate a binary pipe]) 345372af6995Smrg])# _LT_CMD_TRUNCATE 345472af6995Smrg 345572af6995Smrg 345672af6995Smrg# _LT_CHECK_MAGIC_METHOD 345772af6995Smrg# ---------------------- 345872af6995Smrg# how to check for library dependencies 345972af6995Smrg# -- PORTME fill in with the dynamic library characteristics 346072af6995Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 346172af6995Smrg[m4_require([_LT_DECL_EGREP]) 346272af6995Smrgm4_require([_LT_DECL_OBJDUMP]) 346372af6995SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 346472af6995Smrglt_cv_deplibs_check_method, 346572af6995Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 346672af6995Smrglt_cv_file_magic_test_file= 346772af6995Smrglt_cv_deplibs_check_method='unknown' 346872af6995Smrg# Need to set the preceding variable on all platforms that support 346972af6995Smrg# interlibrary dependencies. 347072af6995Smrg# 'none' -- dependencies not supported. 347172af6995Smrg# 'unknown' -- same as none, but documents that we really don't know. 347272af6995Smrg# 'pass_all' -- all dependencies passed with no checks. 347372af6995Smrg# 'test_compile' -- check by making test program. 347472af6995Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 347572af6995Smrg# that responds to the $file_magic_cmd with a given extended regex. 347672af6995Smrg# If you have 'file' or equivalent on your system and you're not sure 347772af6995Smrg# whether 'pass_all' will *always* work, you probably want this one. 347872af6995Smrg 347972af6995Smrgcase $host_os in 348072af6995Smrgaix[[4-9]]*) 348172af6995Smrg lt_cv_deplibs_check_method=pass_all 348272af6995Smrg ;; 348372af6995Smrg 348472af6995Smrgbeos*) 348572af6995Smrg lt_cv_deplibs_check_method=pass_all 348672af6995Smrg ;; 348772af6995Smrg 348872af6995Smrgbsdi[[45]]*) 348972af6995Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3490a773ec55Smrg lt_cv_file_magic_cmd='$FILECMD -L' 349172af6995Smrg lt_cv_file_magic_test_file=/shlib/libc.so 349272af6995Smrg ;; 349372af6995Smrg 349472af6995Smrgcygwin*) 349572af6995Smrg # func_win32_libid is a shell function defined in ltmain.sh 349672af6995Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 349772af6995Smrg lt_cv_file_magic_cmd='func_win32_libid' 349872af6995Smrg ;; 349972af6995Smrg 350072af6995Smrgmingw* | pw32*) 350172af6995Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 350272af6995Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 350372af6995Smrg # unless we find 'file', for example because we are cross-compiling. 350472af6995Smrg if ( file / ) >/dev/null 2>&1; then 350572af6995Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 350672af6995Smrg lt_cv_file_magic_cmd='func_win32_libid' 350772af6995Smrg else 350872af6995Smrg # Keep this pattern in sync with the one in func_win32_libid. 350972af6995Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 351072af6995Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 351172af6995Smrg fi 351272af6995Smrg ;; 351372af6995Smrg 351472af6995Smrgcegcc*) 351572af6995Smrg # use the weaker test based on 'objdump'. See mingw*. 351672af6995Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 351772af6995Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 351872af6995Smrg ;; 351972af6995Smrg 352072af6995Smrgdarwin* | rhapsody*) 352172af6995Smrg lt_cv_deplibs_check_method=pass_all 352272af6995Smrg ;; 352372af6995Smrg 3524a773ec55Smrgfreebsd* | dragonfly* | midnightbsd*) 352572af6995Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 352672af6995Smrg case $host_cpu in 352772af6995Smrg i*86 ) 352872af6995Smrg # Not sure whether the presence of OpenBSD here was a mistake. 352972af6995Smrg # Let's accept both of them until this is cleared up. 353072af6995Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3531a773ec55Smrg lt_cv_file_magic_cmd=$FILECMD 353272af6995Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 353372af6995Smrg ;; 353472af6995Smrg esac 353572af6995Smrg else 353672af6995Smrg lt_cv_deplibs_check_method=pass_all 353772af6995Smrg fi 353872af6995Smrg ;; 353972af6995Smrg 354072af6995Smrghaiku*) 354172af6995Smrg lt_cv_deplibs_check_method=pass_all 354272af6995Smrg ;; 354372af6995Smrg 354472af6995Smrghpux10.20* | hpux11*) 3545a773ec55Smrg lt_cv_file_magic_cmd=$FILECMD 354672af6995Smrg case $host_cpu in 354772af6995Smrg ia64*) 354872af6995Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 354972af6995Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 355072af6995Smrg ;; 355172af6995Smrg hppa*64*) 355272af6995Smrg [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]'] 355372af6995Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 355472af6995Smrg ;; 355572af6995Smrg *) 355672af6995Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 355772af6995Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 355872af6995Smrg ;; 355972af6995Smrg esac 356072af6995Smrg ;; 356172af6995Smrg 356272af6995Smrginterix[[3-9]]*) 356372af6995Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 356472af6995Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 356572af6995Smrg ;; 356672af6995Smrg 356772af6995Smrgirix5* | irix6* | nonstopux*) 356872af6995Smrg case $LD in 356972af6995Smrg *-32|*"-32 ") libmagic=32-bit;; 357072af6995Smrg *-n32|*"-n32 ") libmagic=N32;; 357172af6995Smrg *-64|*"-64 ") libmagic=64-bit;; 357272af6995Smrg *) libmagic=never-match;; 357372af6995Smrg esac 357472af6995Smrg lt_cv_deplibs_check_method=pass_all 357572af6995Smrg ;; 357672af6995Smrg 357772af6995Smrg# This must be glibc/ELF. 357872af6995Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 357972af6995Smrg lt_cv_deplibs_check_method=pass_all 358072af6995Smrg ;; 358172af6995Smrg 3582362b94d5Smrgnetbsd*) 358372af6995Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 358472af6995Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 358572af6995Smrg else 358672af6995Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 358772af6995Smrg fi 358872af6995Smrg ;; 358972af6995Smrg 359072af6995Smrgnewos6*) 359172af6995Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3592a773ec55Smrg lt_cv_file_magic_cmd=$FILECMD 359372af6995Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 359472af6995Smrg ;; 359572af6995Smrg 359672af6995Smrg*nto* | *qnx*) 359772af6995Smrg lt_cv_deplibs_check_method=pass_all 359872af6995Smrg ;; 359972af6995Smrg 360072af6995Smrgopenbsd* | bitrig*) 360172af6995Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 360272af6995Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 360372af6995Smrg else 360472af6995Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 360572af6995Smrg fi 360672af6995Smrg ;; 360772af6995Smrg 360872af6995Smrgosf3* | osf4* | osf5*) 360972af6995Smrg lt_cv_deplibs_check_method=pass_all 361072af6995Smrg ;; 361172af6995Smrg 361272af6995Smrgrdos*) 361372af6995Smrg lt_cv_deplibs_check_method=pass_all 361472af6995Smrg ;; 361572af6995Smrg 361672af6995Smrgsolaris*) 361772af6995Smrg lt_cv_deplibs_check_method=pass_all 361872af6995Smrg ;; 361972af6995Smrg 362072af6995Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 362172af6995Smrg lt_cv_deplibs_check_method=pass_all 362272af6995Smrg ;; 362372af6995Smrg 362472af6995Smrgsysv4 | sysv4.3*) 362572af6995Smrg case $host_vendor in 362672af6995Smrg motorola) 362772af6995Smrg 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]]' 362872af6995Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 362972af6995Smrg ;; 363072af6995Smrg ncr) 363172af6995Smrg lt_cv_deplibs_check_method=pass_all 363272af6995Smrg ;; 363372af6995Smrg sequent) 363472af6995Smrg lt_cv_file_magic_cmd='/bin/file' 363572af6995Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 363672af6995Smrg ;; 363772af6995Smrg sni) 363872af6995Smrg lt_cv_file_magic_cmd='/bin/file' 363972af6995Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 364072af6995Smrg lt_cv_file_magic_test_file=/lib/libc.so 364172af6995Smrg ;; 364272af6995Smrg siemens) 364372af6995Smrg lt_cv_deplibs_check_method=pass_all 364472af6995Smrg ;; 364572af6995Smrg pc) 364672af6995Smrg lt_cv_deplibs_check_method=pass_all 364772af6995Smrg ;; 364872af6995Smrg esac 364972af6995Smrg ;; 365072af6995Smrg 365172af6995Smrgtpf*) 365272af6995Smrg lt_cv_deplibs_check_method=pass_all 365372af6995Smrg ;; 365472af6995Smrgos2*) 365572af6995Smrg lt_cv_deplibs_check_method=pass_all 365672af6995Smrg ;; 365772af6995Smrgesac 365872af6995Smrg]) 365972af6995Smrg 366072af6995Smrgfile_magic_glob= 366172af6995Smrgwant_nocaseglob=no 366272af6995Smrgif test "$build" = "$host"; then 366372af6995Smrg case $host_os in 366472af6995Smrg mingw* | pw32*) 366572af6995Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 366672af6995Smrg want_nocaseglob=yes 366772af6995Smrg else 366872af6995Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 366972af6995Smrg fi 367072af6995Smrg ;; 367172af6995Smrg esac 367272af6995Smrgfi 367372af6995Smrg 367472af6995Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 367572af6995Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 367672af6995Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 367772af6995Smrg 367872af6995Smrg_LT_DECL([], [deplibs_check_method], [1], 367972af6995Smrg [Method to check whether dependent libraries are shared objects]) 368072af6995Smrg_LT_DECL([], [file_magic_cmd], [1], 368172af6995Smrg [Command to use when deplibs_check_method = "file_magic"]) 368272af6995Smrg_LT_DECL([], [file_magic_glob], [1], 368372af6995Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 368472af6995Smrg_LT_DECL([], [want_nocaseglob], [1], 368572af6995Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 368672af6995Smrg])# _LT_CHECK_MAGIC_METHOD 368772af6995Smrg 368872af6995Smrg 368972af6995Smrg# LT_PATH_NM 369072af6995Smrg# ---------- 369172af6995Smrg# find the pathname to a BSD- or MS-compatible name lister 369272af6995SmrgAC_DEFUN([LT_PATH_NM], 369372af6995Smrg[AC_REQUIRE([AC_PROG_CC])dnl 369472af6995SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 369572af6995Smrg[if test -n "$NM"; then 369672af6995Smrg # Let the user override the test. 369772af6995Smrg lt_cv_path_NM=$NM 369872af6995Smrgelse 369972af6995Smrg lt_nm_to_check=${ac_tool_prefix}nm 370072af6995Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 370172af6995Smrg lt_nm_to_check="$lt_nm_to_check nm" 370272af6995Smrg fi 370372af6995Smrg for lt_tmp_nm in $lt_nm_to_check; do 370472af6995Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 370572af6995Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 370672af6995Smrg IFS=$lt_save_ifs 370772af6995Smrg test -z "$ac_dir" && ac_dir=. 370872af6995Smrg tmp_nm=$ac_dir/$lt_tmp_nm 370972af6995Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 371072af6995Smrg # Check to see if the nm accepts a BSD-compat flag. 371172af6995Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 371272af6995Smrg # nm: unknown option "B" ignored 371372af6995Smrg # Tru64's nm complains that /dev/null is an invalid object file 371472af6995Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 371572af6995Smrg case $build_os in 371672af6995Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 371772af6995Smrg *) lt_bad_file=/dev/null ;; 371872af6995Smrg esac 3719a773ec55Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 372072af6995Smrg *$lt_bad_file* | *'Invalid file or object type'*) 372172af6995Smrg lt_cv_path_NM="$tmp_nm -B" 372272af6995Smrg break 2 372372af6995Smrg ;; 372472af6995Smrg *) 3725a773ec55Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 372672af6995Smrg */dev/null*) 372772af6995Smrg lt_cv_path_NM="$tmp_nm -p" 372872af6995Smrg break 2 372972af6995Smrg ;; 373072af6995Smrg *) 373172af6995Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 373272af6995Smrg continue # so that we can try to find one that supports BSD flags 373372af6995Smrg ;; 373472af6995Smrg esac 373572af6995Smrg ;; 373672af6995Smrg esac 373772af6995Smrg fi 373872af6995Smrg done 373972af6995Smrg IFS=$lt_save_ifs 374072af6995Smrg done 374172af6995Smrg : ${lt_cv_path_NM=no} 374272af6995Smrgfi]) 374372af6995Smrgif test no != "$lt_cv_path_NM"; then 374472af6995Smrg NM=$lt_cv_path_NM 374572af6995Smrgelse 374672af6995Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 374772af6995Smrg if test -n "$DUMPBIN"; then : 374872af6995Smrg # Let the user override the test. 374972af6995Smrg else 375072af6995Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3751a773ec55Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 375272af6995Smrg *COFF*) 375372af6995Smrg DUMPBIN="$DUMPBIN -symbols -headers" 375472af6995Smrg ;; 375572af6995Smrg *) 375672af6995Smrg DUMPBIN=: 375772af6995Smrg ;; 375872af6995Smrg esac 375972af6995Smrg fi 376072af6995Smrg AC_SUBST([DUMPBIN]) 376172af6995Smrg if test : != "$DUMPBIN"; then 376272af6995Smrg NM=$DUMPBIN 376372af6995Smrg fi 376472af6995Smrgfi 376572af6995Smrgtest -z "$NM" && NM=nm 376672af6995SmrgAC_SUBST([NM]) 376772af6995Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 376872af6995Smrg 376972af6995SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 377072af6995Smrg [lt_cv_nm_interface="BSD nm" 377172af6995Smrg echo "int some_variable = 0;" > conftest.$ac_ext 377272af6995Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 377372af6995Smrg (eval "$ac_compile" 2>conftest.err) 377472af6995Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 377572af6995Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 377672af6995Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 377772af6995Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 377872af6995Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 377972af6995Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 378072af6995Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 378172af6995Smrg lt_cv_nm_interface="MS dumpbin" 378272af6995Smrg fi 378372af6995Smrg rm -f conftest*]) 378472af6995Smrg])# LT_PATH_NM 378572af6995Smrg 378672af6995Smrg# Old names: 378772af6995SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 378872af6995SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 378972af6995Smrgdnl aclocal-1.4 backwards compatibility: 379072af6995Smrgdnl AC_DEFUN([AM_PROG_NM], []) 379172af6995Smrgdnl AC_DEFUN([AC_PROG_NM], []) 379272af6995Smrg 379372af6995Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 379472af6995Smrg# -------------------------------- 379572af6995Smrg# how to determine the name of the shared library 379672af6995Smrg# associated with a specific link library. 379772af6995Smrg# -- PORTME fill in with the dynamic library characteristics 379872af6995Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 379972af6995Smrg[m4_require([_LT_DECL_EGREP]) 380072af6995Smrgm4_require([_LT_DECL_OBJDUMP]) 380172af6995Smrgm4_require([_LT_DECL_DLLTOOL]) 380272af6995SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 380372af6995Smrglt_cv_sharedlib_from_linklib_cmd, 380472af6995Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 380572af6995Smrg 380672af6995Smrgcase $host_os in 380772af6995Smrgcygwin* | mingw* | pw32* | cegcc*) 380872af6995Smrg # two different shell functions defined in ltmain.sh; 380972af6995Smrg # decide which one to use based on capabilities of $DLLTOOL 381072af6995Smrg case `$DLLTOOL --help 2>&1` in 381172af6995Smrg *--identify-strict*) 381272af6995Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 381372af6995Smrg ;; 381472af6995Smrg *) 381572af6995Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 381672af6995Smrg ;; 381772af6995Smrg esac 381872af6995Smrg ;; 381972af6995Smrg*) 382072af6995Smrg # fallback: assume linklib IS sharedlib 382172af6995Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 382272af6995Smrg ;; 382372af6995Smrgesac 382472af6995Smrg]) 382572af6995Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 382672af6995Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 382772af6995Smrg 382872af6995Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 382972af6995Smrg [Command to associate shared and link libraries]) 383072af6995Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 383172af6995Smrg 383272af6995Smrg 383372af6995Smrg# _LT_PATH_MANIFEST_TOOL 383472af6995Smrg# ---------------------- 383572af6995Smrg# locate the manifest tool 383672af6995Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 383772af6995Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 383872af6995Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 383972af6995SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 384072af6995Smrg [lt_cv_path_mainfest_tool=no 384172af6995Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 384272af6995Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 384372af6995Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 384472af6995Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 384572af6995Smrg lt_cv_path_mainfest_tool=yes 384672af6995Smrg fi 384772af6995Smrg rm -f conftest*]) 384872af6995Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 384972af6995Smrg MANIFEST_TOOL=: 385072af6995Smrgfi 385172af6995Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 385272af6995Smrg])# _LT_PATH_MANIFEST_TOOL 385372af6995Smrg 385472af6995Smrg 385572af6995Smrg# _LT_DLL_DEF_P([FILE]) 385672af6995Smrg# --------------------- 385772af6995Smrg# True iff FILE is a Windows DLL '.def' file. 385872af6995Smrg# Keep in sync with func_dll_def_p in the libtool script 385972af6995SmrgAC_DEFUN([_LT_DLL_DEF_P], 386072af6995Smrg[dnl 386172af6995Smrg test DEF = "`$SED -n dnl 386272af6995Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 386372af6995Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 386472af6995Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 386572af6995Smrg -e q dnl Only consider the first "real" line 386672af6995Smrg $1`" dnl 386772af6995Smrg])# _LT_DLL_DEF_P 386872af6995Smrg 386972af6995Smrg 387072af6995Smrg# LT_LIB_M 387172af6995Smrg# -------- 387272af6995Smrg# check for math library 387372af6995SmrgAC_DEFUN([LT_LIB_M], 387472af6995Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 387572af6995SmrgLIBM= 387672af6995Smrgcase $host in 387772af6995Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 387872af6995Smrg # These system don't have libm, or don't need it 387972af6995Smrg ;; 388072af6995Smrg*-ncr-sysv4.3*) 388172af6995Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 388272af6995Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 388372af6995Smrg ;; 388472af6995Smrg*) 388572af6995Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 388672af6995Smrg ;; 388772af6995Smrgesac 388872af6995SmrgAC_SUBST([LIBM]) 388972af6995Smrg])# LT_LIB_M 389072af6995Smrg 389172af6995Smrg# Old name: 389272af6995SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 389372af6995Smrgdnl aclocal-1.4 backwards compatibility: 389472af6995Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 389572af6995Smrg 389672af6995Smrg 389772af6995Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 389872af6995Smrg# ------------------------------- 389972af6995Smrgm4_defun([_LT_COMPILER_NO_RTTI], 390072af6995Smrg[m4_require([_LT_TAG_COMPILER])dnl 390172af6995Smrg 390272af6995Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 390372af6995Smrg 390472af6995Smrgif test yes = "$GCC"; then 390572af6995Smrg case $cc_basename in 390672af6995Smrg nvcc*) 390772af6995Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 390872af6995Smrg *) 390972af6995Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 391072af6995Smrg esac 391172af6995Smrg 391272af6995Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 391372af6995Smrg lt_cv_prog_compiler_rtti_exceptions, 391472af6995Smrg [-fno-rtti -fno-exceptions], [], 391572af6995Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 391672af6995Smrgfi 391772af6995Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 391872af6995Smrg [Compiler flag to turn off builtin functions]) 391972af6995Smrg])# _LT_COMPILER_NO_RTTI 392072af6995Smrg 392172af6995Smrg 392272af6995Smrg# _LT_CMD_GLOBAL_SYMBOLS 392372af6995Smrg# ---------------------- 392472af6995Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 392572af6995Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 392672af6995SmrgAC_REQUIRE([AC_PROG_CC])dnl 392772af6995SmrgAC_REQUIRE([AC_PROG_AWK])dnl 392872af6995SmrgAC_REQUIRE([LT_PATH_NM])dnl 392972af6995SmrgAC_REQUIRE([LT_PATH_LD])dnl 393072af6995Smrgm4_require([_LT_DECL_SED])dnl 393172af6995Smrgm4_require([_LT_DECL_EGREP])dnl 393272af6995Smrgm4_require([_LT_TAG_COMPILER])dnl 393372af6995Smrg 393472af6995Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 393572af6995SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 393672af6995SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 393772af6995Smrg[ 393872af6995Smrg# These are sane defaults that work on at least a few old systems. 393972af6995Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 394072af6995Smrg 394172af6995Smrg# Character class describing NM global symbol codes. 394272af6995Smrgsymcode='[[BCDEGRST]]' 394372af6995Smrg 394472af6995Smrg# Regexp to match symbols that can be accessed directly from C. 394572af6995Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 394672af6995Smrg 394772af6995Smrg# Define system-specific variables. 394872af6995Smrgcase $host_os in 394972af6995Smrgaix*) 395072af6995Smrg symcode='[[BCDT]]' 395172af6995Smrg ;; 395272af6995Smrgcygwin* | mingw* | pw32* | cegcc*) 395372af6995Smrg symcode='[[ABCDGISTW]]' 395472af6995Smrg ;; 395572af6995Smrghpux*) 395672af6995Smrg if test ia64 = "$host_cpu"; then 395772af6995Smrg symcode='[[ABCDEGRST]]' 395872af6995Smrg fi 395972af6995Smrg ;; 396072af6995Smrgirix* | nonstopux*) 396172af6995Smrg symcode='[[BCDEGRST]]' 396272af6995Smrg ;; 396372af6995Smrgosf*) 396472af6995Smrg symcode='[[BCDEGQRST]]' 396572af6995Smrg ;; 396672af6995Smrgsolaris*) 396772af6995Smrg symcode='[[BDRT]]' 396872af6995Smrg ;; 396972af6995Smrgsco3.2v5*) 397072af6995Smrg symcode='[[DT]]' 397172af6995Smrg ;; 397272af6995Smrgsysv4.2uw2*) 397372af6995Smrg symcode='[[DT]]' 397472af6995Smrg ;; 397572af6995Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 397672af6995Smrg symcode='[[ABDT]]' 397772af6995Smrg ;; 397872af6995Smrgsysv4) 397972af6995Smrg symcode='[[DFNSTU]]' 398072af6995Smrg ;; 398172af6995Smrgesac 398272af6995Smrg 398372af6995Smrg# If we're using GNU nm, then use its standard symbol codes. 398472af6995Smrgcase `$NM -V 2>&1` in 398572af6995Smrg*GNU* | *'with BFD'*) 398672af6995Smrg symcode='[[ABCDGIRSTW]]' ;; 398772af6995Smrgesac 398872af6995Smrg 398972af6995Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 399072af6995Smrg # Gets list of data symbols to import. 3991a773ec55Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 399272af6995Smrg # Adjust the below global symbol transforms to fixup imported variables. 399372af6995Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 399472af6995Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 399572af6995Smrg lt_c_name_lib_hook="\ 399672af6995Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 399772af6995Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 399872af6995Smrgelse 399972af6995Smrg # Disable hooks by default. 400072af6995Smrg lt_cv_sys_global_symbol_to_import= 400172af6995Smrg lt_cdecl_hook= 400272af6995Smrg lt_c_name_hook= 400372af6995Smrg lt_c_name_lib_hook= 400472af6995Smrgfi 400572af6995Smrg 400672af6995Smrg# Transform an extracted symbol line into a proper C declaration. 400772af6995Smrg# Some systems (esp. on ia64) link data and code symbols differently, 400872af6995Smrg# so use this general approach. 4009a773ec55Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 401072af6995Smrg$lt_cdecl_hook\ 401172af6995Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 401272af6995Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 401372af6995Smrg 401472af6995Smrg# Transform an extracted symbol line into symbol name and symbol address 4015a773ec55Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 401672af6995Smrg$lt_c_name_hook\ 401772af6995Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 401872af6995Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 401972af6995Smrg 402072af6995Smrg# Transform an extracted symbol line into symbol name with lib prefix and 402172af6995Smrg# symbol address. 4022a773ec55Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 402372af6995Smrg$lt_c_name_lib_hook\ 402472af6995Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 402572af6995Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 402672af6995Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 402772af6995Smrg 402872af6995Smrg# Handle CRLF in mingw tool chain 402972af6995Smrgopt_cr= 403072af6995Smrgcase $build_os in 403172af6995Smrgmingw*) 403272af6995Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 403372af6995Smrg ;; 403472af6995Smrgesac 403572af6995Smrg 403672af6995Smrg# Try without a prefix underscore, then with it. 403772af6995Smrgfor ac_symprfx in "" "_"; do 403872af6995Smrg 403972af6995Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 404072af6995Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 404172af6995Smrg 404272af6995Smrg # Write the raw and C identifiers. 404372af6995Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 404472af6995Smrg # Fake it for dumpbin and say T for any non-static function, 404572af6995Smrg # D for any global variable and I for any imported variable. 4046a773ec55Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 404772af6995Smrg # which start with @ or ?. 404872af6995Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 404972af6995Smrg" {last_section=section; section=\$ 3};"\ 405072af6995Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 405172af6995Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 405272af6995Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 405372af6995Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 405472af6995Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 405572af6995Smrg" \$ 0!~/External *\|/{next};"\ 405672af6995Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 405772af6995Smrg" {if(hide[section]) next};"\ 405872af6995Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 405972af6995Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 406072af6995Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 406172af6995Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 406272af6995Smrg" ' prfx=^$ac_symprfx]" 406372af6995Smrg else 4064a773ec55Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 406572af6995Smrg fi 4066a773ec55Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 406772af6995Smrg 406872af6995Smrg # Check to see that the pipe works correctly. 406972af6995Smrg pipe_works=no 407072af6995Smrg 407172af6995Smrg rm -f conftest* 407272af6995Smrg cat > conftest.$ac_ext <<_LT_EOF 407372af6995Smrg#ifdef __cplusplus 407472af6995Smrgextern "C" { 407572af6995Smrg#endif 407672af6995Smrgchar nm_test_var; 407772af6995Smrgvoid nm_test_func(void); 407872af6995Smrgvoid nm_test_func(void){} 407972af6995Smrg#ifdef __cplusplus 408072af6995Smrg} 408172af6995Smrg#endif 408272af6995Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 408372af6995Smrg_LT_EOF 408472af6995Smrg 408572af6995Smrg if AC_TRY_EVAL(ac_compile); then 408672af6995Smrg # Now try to grab the symbols. 408772af6995Smrg nlist=conftest.nm 4088362b94d5Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 408972af6995Smrg # Try sorting and uniquifying the output. 409072af6995Smrg if sort "$nlist" | uniq > "$nlist"T; then 409172af6995Smrg mv -f "$nlist"T "$nlist" 409272af6995Smrg else 409372af6995Smrg rm -f "$nlist"T 409472af6995Smrg fi 409572af6995Smrg 409672af6995Smrg # Make sure that we snagged all the symbols we need. 409772af6995Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 409872af6995Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 409972af6995Smrg cat <<_LT_EOF > conftest.$ac_ext 410072af6995Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 410172af6995Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 410272af6995Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 410372af6995Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 410472af6995Smrg# define LT@&t@_DLSYM_CONST 410572af6995Smrg#elif defined __osf__ 410672af6995Smrg/* This system does not cope well with relocations in const data. */ 410772af6995Smrg# define LT@&t@_DLSYM_CONST 410872af6995Smrg#else 410972af6995Smrg# define LT@&t@_DLSYM_CONST const 411072af6995Smrg#endif 411172af6995Smrg 411272af6995Smrg#ifdef __cplusplus 411372af6995Smrgextern "C" { 411472af6995Smrg#endif 411572af6995Smrg 411672af6995Smrg_LT_EOF 411772af6995Smrg # Now generate the symbol file. 411872af6995Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 411972af6995Smrg 412072af6995Smrg cat <<_LT_EOF >> conftest.$ac_ext 412172af6995Smrg 412272af6995Smrg/* The mapping between symbol names and symbols. */ 412372af6995SmrgLT@&t@_DLSYM_CONST struct { 412472af6995Smrg const char *name; 412572af6995Smrg void *address; 412672af6995Smrg} 412772af6995Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 412872af6995Smrg{ 412972af6995Smrg { "@PROGRAM@", (void *) 0 }, 413072af6995Smrg_LT_EOF 413172af6995Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 413272af6995Smrg cat <<\_LT_EOF >> conftest.$ac_ext 413372af6995Smrg {0, (void *) 0} 413472af6995Smrg}; 413572af6995Smrg 413672af6995Smrg/* This works around a problem in FreeBSD linker */ 413772af6995Smrg#ifdef FREEBSD_WORKAROUND 413872af6995Smrgstatic const void *lt_preloaded_setup() { 413972af6995Smrg return lt__PROGRAM__LTX_preloaded_symbols; 414072af6995Smrg} 414172af6995Smrg#endif 414272af6995Smrg 414372af6995Smrg#ifdef __cplusplus 414472af6995Smrg} 414572af6995Smrg#endif 414672af6995Smrg_LT_EOF 414772af6995Smrg # Now try linking the two files. 414872af6995Smrg mv conftest.$ac_objext conftstm.$ac_objext 414972af6995Smrg lt_globsym_save_LIBS=$LIBS 415072af6995Smrg lt_globsym_save_CFLAGS=$CFLAGS 415172af6995Smrg LIBS=conftstm.$ac_objext 415272af6995Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 415372af6995Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 415472af6995Smrg pipe_works=yes 415572af6995Smrg fi 415672af6995Smrg LIBS=$lt_globsym_save_LIBS 415772af6995Smrg CFLAGS=$lt_globsym_save_CFLAGS 415872af6995Smrg else 415972af6995Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 416072af6995Smrg fi 416172af6995Smrg else 416272af6995Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 416372af6995Smrg fi 416472af6995Smrg else 416572af6995Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 416672af6995Smrg fi 416772af6995Smrg else 416872af6995Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 416972af6995Smrg cat conftest.$ac_ext >&5 417072af6995Smrg fi 417172af6995Smrg rm -rf conftest* conftst* 417272af6995Smrg 417372af6995Smrg # Do not use the global_symbol_pipe unless it works. 417472af6995Smrg if test yes = "$pipe_works"; then 417572af6995Smrg break 417672af6995Smrg else 417772af6995Smrg lt_cv_sys_global_symbol_pipe= 417872af6995Smrg fi 417972af6995Smrgdone 418072af6995Smrg]) 418172af6995Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 418272af6995Smrg lt_cv_sys_global_symbol_to_cdecl= 418372af6995Smrgfi 418472af6995Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 418572af6995Smrg AC_MSG_RESULT(failed) 418672af6995Smrgelse 418772af6995Smrg AC_MSG_RESULT(ok) 418872af6995Smrgfi 418972af6995Smrg 419072af6995Smrg# Response file support. 419172af6995Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 419272af6995Smrg nm_file_list_spec='@' 419372af6995Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 419472af6995Smrg nm_file_list_spec='@' 419572af6995Smrgfi 419672af6995Smrg 419772af6995Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 419872af6995Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 419972af6995Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 420072af6995Smrg [Transform the output of nm in a proper C declaration]) 420172af6995Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 420272af6995Smrg [Transform the output of nm into a list of symbols to manually relocate]) 420372af6995Smrg_LT_DECL([global_symbol_to_c_name_address], 420472af6995Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 420572af6995Smrg [Transform the output of nm in a C name address pair]) 420672af6995Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 420772af6995Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 420872af6995Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 420972af6995Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 421072af6995Smrg [The name lister interface]) 421172af6995Smrg_LT_DECL([], [nm_file_list_spec], [1], 421272af6995Smrg [Specify filename containing input files for $NM]) 421372af6995Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 421472af6995Smrg 421572af6995Smrg 421672af6995Smrg# _LT_COMPILER_PIC([TAGNAME]) 421772af6995Smrg# --------------------------- 421872af6995Smrgm4_defun([_LT_COMPILER_PIC], 421972af6995Smrg[m4_require([_LT_TAG_COMPILER])dnl 422072af6995Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 422172af6995Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 422272af6995Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 422372af6995Smrg 422472af6995Smrgm4_if([$1], [CXX], [ 422572af6995Smrg # C++ specific cases for pic, static, wl, etc. 422672af6995Smrg if test yes = "$GXX"; then 422772af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 422872af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 422972af6995Smrg 423072af6995Smrg case $host_os in 423172af6995Smrg aix*) 423272af6995Smrg # All AIX code is PIC. 423372af6995Smrg if test ia64 = "$host_cpu"; then 423472af6995Smrg # AIX 5 now supports IA64 processor 423572af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 423672af6995Smrg fi 423772af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 423872af6995Smrg ;; 423972af6995Smrg 424072af6995Smrg amigaos*) 424172af6995Smrg case $host_cpu in 424272af6995Smrg powerpc) 424372af6995Smrg # see comment about AmigaOS4 .so support 424472af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 424572af6995Smrg ;; 424672af6995Smrg m68k) 424772af6995Smrg # FIXME: we need at least 68020 code to build shared libraries, but 424872af6995Smrg # adding the '-m68020' flag to GCC prevents building anything better, 424972af6995Smrg # like '-m68040'. 425072af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 425172af6995Smrg ;; 425272af6995Smrg esac 425372af6995Smrg ;; 425472af6995Smrg 425572af6995Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 425672af6995Smrg # PIC is the default for these OSes. 425772af6995Smrg ;; 425872af6995Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 425972af6995Smrg # This hack is so that the source file can tell whether it is being 426072af6995Smrg # built for inclusion in a dll (and should export symbols for example). 426172af6995Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 426272af6995Smrg # (--disable-auto-import) libraries 426372af6995Smrg m4_if([$1], [GCJ], [], 426472af6995Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 426572af6995Smrg case $host_os in 426672af6995Smrg os2*) 426772af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 426872af6995Smrg ;; 426972af6995Smrg esac 427072af6995Smrg ;; 427172af6995Smrg darwin* | rhapsody*) 427272af6995Smrg # PIC is the default on this platform 427372af6995Smrg # Common symbols not allowed in MH_DYLIB files 427472af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 427572af6995Smrg ;; 427672af6995Smrg *djgpp*) 427772af6995Smrg # DJGPP does not support shared libraries at all 427872af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 427972af6995Smrg ;; 428072af6995Smrg haiku*) 428172af6995Smrg # PIC is the default for Haiku. 428272af6995Smrg # The "-static" flag exists, but is broken. 428372af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 428472af6995Smrg ;; 428572af6995Smrg interix[[3-9]]*) 428672af6995Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 428772af6995Smrg # Instead, we relocate shared libraries at runtime. 428872af6995Smrg ;; 428972af6995Smrg sysv4*MP*) 429072af6995Smrg if test -d /usr/nec; then 429172af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 429272af6995Smrg fi 429372af6995Smrg ;; 429472af6995Smrg hpux*) 429572af6995Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 429672af6995Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 429772af6995Smrg # sets the default TLS model and affects inlining. 429872af6995Smrg case $host_cpu in 429972af6995Smrg hppa*64*) 430072af6995Smrg ;; 430172af6995Smrg *) 430272af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 430372af6995Smrg ;; 430472af6995Smrg esac 430572af6995Smrg ;; 430672af6995Smrg *qnx* | *nto*) 430772af6995Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 430872af6995Smrg # it will coredump. 430972af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 431072af6995Smrg ;; 431172af6995Smrg *) 431272af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 431372af6995Smrg ;; 431472af6995Smrg esac 431572af6995Smrg else 431672af6995Smrg case $host_os in 431772af6995Smrg aix[[4-9]]*) 431872af6995Smrg # All AIX code is PIC. 431972af6995Smrg if test ia64 = "$host_cpu"; then 432072af6995Smrg # AIX 5 now supports IA64 processor 432172af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 432272af6995Smrg else 432372af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 432472af6995Smrg fi 432572af6995Smrg ;; 432672af6995Smrg chorus*) 432772af6995Smrg case $cc_basename in 432872af6995Smrg cxch68*) 432972af6995Smrg # Green Hills C++ Compiler 433072af6995Smrg # _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" 433172af6995Smrg ;; 433272af6995Smrg esac 433372af6995Smrg ;; 433472af6995Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 433572af6995Smrg # This hack is so that the source file can tell whether it is being 433672af6995Smrg # built for inclusion in a dll (and should export symbols for example). 433772af6995Smrg m4_if([$1], [GCJ], [], 433872af6995Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 433972af6995Smrg ;; 434072af6995Smrg dgux*) 434172af6995Smrg case $cc_basename in 434272af6995Smrg ec++*) 434372af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 434472af6995Smrg ;; 434572af6995Smrg ghcx*) 434672af6995Smrg # Green Hills C++ Compiler 434772af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 434872af6995Smrg ;; 434972af6995Smrg *) 435072af6995Smrg ;; 435172af6995Smrg esac 435272af6995Smrg ;; 4353a773ec55Smrg freebsd* | dragonfly* | midnightbsd*) 435472af6995Smrg # FreeBSD uses GNU C++ 435572af6995Smrg ;; 435672af6995Smrg hpux9* | hpux10* | hpux11*) 435772af6995Smrg case $cc_basename in 435872af6995Smrg CC*) 435972af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 436072af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 436172af6995Smrg if test ia64 != "$host_cpu"; then 436272af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 436372af6995Smrg fi 436472af6995Smrg ;; 436572af6995Smrg aCC*) 436672af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 436772af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 436872af6995Smrg case $host_cpu in 436972af6995Smrg hppa*64*|ia64*) 437072af6995Smrg # +Z the default 437172af6995Smrg ;; 437272af6995Smrg *) 437372af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 437472af6995Smrg ;; 437572af6995Smrg esac 437672af6995Smrg ;; 437772af6995Smrg *) 437872af6995Smrg ;; 437972af6995Smrg esac 438072af6995Smrg ;; 438172af6995Smrg interix*) 438272af6995Smrg # This is c89, which is MS Visual C++ (no shared libs) 438372af6995Smrg # Anyone wants to do a port? 438472af6995Smrg ;; 438572af6995Smrg irix5* | irix6* | nonstopux*) 438672af6995Smrg case $cc_basename in 438772af6995Smrg CC*) 438872af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 438972af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 439072af6995Smrg # CC pic flag -KPIC is the default. 439172af6995Smrg ;; 439272af6995Smrg *) 439372af6995Smrg ;; 439472af6995Smrg esac 439572af6995Smrg ;; 439672af6995Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 439772af6995Smrg case $cc_basename in 439872af6995Smrg KCC*) 439972af6995Smrg # KAI C++ Compiler 440072af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 440172af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 440272af6995Smrg ;; 440372af6995Smrg ecpc* ) 440472af6995Smrg # old Intel C++ for x86_64, which still supported -KPIC. 440572af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 440672af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 440772af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 440872af6995Smrg ;; 440972af6995Smrg icpc* ) 441072af6995Smrg # Intel C++, used to be incompatible with GCC. 441172af6995Smrg # ICC 10 doesn't accept -KPIC any more. 441272af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 441372af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 441472af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 441572af6995Smrg ;; 441672af6995Smrg pgCC* | pgcpp*) 441772af6995Smrg # Portland Group C++ compiler 441872af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 441972af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 442072af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 442172af6995Smrg ;; 442272af6995Smrg cxx*) 442372af6995Smrg # Compaq C++ 442472af6995Smrg # Make sure the PIC flag is empty. It appears that all Alpha 442572af6995Smrg # Linux and Compaq Tru64 Unix objects are PIC. 442672af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 442772af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 442872af6995Smrg ;; 442972af6995Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 443072af6995Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 443172af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 443272af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 443372af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 443472af6995Smrg ;; 443572af6995Smrg *) 4436a773ec55Smrg case `$CC -V 2>&1 | $SED 5q` in 443772af6995Smrg *Sun\ C*) 443872af6995Smrg # Sun C++ 5.9 443972af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 444072af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 444172af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 444272af6995Smrg ;; 444372af6995Smrg esac 444472af6995Smrg ;; 444572af6995Smrg esac 444672af6995Smrg ;; 444772af6995Smrg lynxos*) 444872af6995Smrg ;; 444972af6995Smrg m88k*) 445072af6995Smrg ;; 445172af6995Smrg mvs*) 445272af6995Smrg case $cc_basename in 445372af6995Smrg cxx*) 445472af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 445572af6995Smrg ;; 445672af6995Smrg *) 445772af6995Smrg ;; 445872af6995Smrg esac 445972af6995Smrg ;; 4460362b94d5Smrg netbsd*) 446172af6995Smrg ;; 446272af6995Smrg *qnx* | *nto*) 446372af6995Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 446472af6995Smrg # it will coredump. 446572af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 446672af6995Smrg ;; 446772af6995Smrg osf3* | osf4* | osf5*) 446872af6995Smrg case $cc_basename in 446972af6995Smrg KCC*) 447072af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 447172af6995Smrg ;; 447272af6995Smrg RCC*) 447372af6995Smrg # Rational C++ 2.4.1 447472af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 447572af6995Smrg ;; 447672af6995Smrg cxx*) 447772af6995Smrg # Digital/Compaq C++ 447872af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 447972af6995Smrg # Make sure the PIC flag is empty. It appears that all Alpha 448072af6995Smrg # Linux and Compaq Tru64 Unix objects are PIC. 448172af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 448272af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 448372af6995Smrg ;; 448472af6995Smrg *) 448572af6995Smrg ;; 448672af6995Smrg esac 448772af6995Smrg ;; 448872af6995Smrg psos*) 448972af6995Smrg ;; 449072af6995Smrg solaris*) 449172af6995Smrg case $cc_basename in 449272af6995Smrg CC* | sunCC*) 449372af6995Smrg # Sun C++ 4.2, 5.x and Centerline C++ 449472af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 449572af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 449672af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 449772af6995Smrg ;; 449872af6995Smrg gcx*) 449972af6995Smrg # Green Hills C++ Compiler 450072af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 450172af6995Smrg ;; 450272af6995Smrg *) 450372af6995Smrg ;; 450472af6995Smrg esac 450572af6995Smrg ;; 450672af6995Smrg sunos4*) 450772af6995Smrg case $cc_basename in 450872af6995Smrg CC*) 450972af6995Smrg # Sun C++ 4.x 451072af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 451172af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 451272af6995Smrg ;; 451372af6995Smrg lcc*) 451472af6995Smrg # Lucid 451572af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 451672af6995Smrg ;; 451772af6995Smrg *) 451872af6995Smrg ;; 451972af6995Smrg esac 452072af6995Smrg ;; 452172af6995Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 452272af6995Smrg case $cc_basename in 452372af6995Smrg CC*) 452472af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 452572af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 452672af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 452772af6995Smrg ;; 452872af6995Smrg esac 452972af6995Smrg ;; 453072af6995Smrg tandem*) 453172af6995Smrg case $cc_basename in 453272af6995Smrg NCC*) 453372af6995Smrg # NonStop-UX NCC 3.20 453472af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 453572af6995Smrg ;; 453672af6995Smrg *) 453772af6995Smrg ;; 453872af6995Smrg esac 453972af6995Smrg ;; 454072af6995Smrg vxworks*) 454172af6995Smrg ;; 454272af6995Smrg *) 454372af6995Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 454472af6995Smrg ;; 454572af6995Smrg esac 454672af6995Smrg fi 454772af6995Smrg], 454872af6995Smrg[ 454972af6995Smrg if test yes = "$GCC"; then 455072af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 455172af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 455272af6995Smrg 455372af6995Smrg case $host_os in 455472af6995Smrg aix*) 455572af6995Smrg # All AIX code is PIC. 455672af6995Smrg if test ia64 = "$host_cpu"; then 455772af6995Smrg # AIX 5 now supports IA64 processor 455872af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 455972af6995Smrg fi 456072af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 456172af6995Smrg ;; 456272af6995Smrg 456372af6995Smrg amigaos*) 456472af6995Smrg case $host_cpu in 456572af6995Smrg powerpc) 456672af6995Smrg # see comment about AmigaOS4 .so support 456772af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 456872af6995Smrg ;; 456972af6995Smrg m68k) 457072af6995Smrg # FIXME: we need at least 68020 code to build shared libraries, but 457172af6995Smrg # adding the '-m68020' flag to GCC prevents building anything better, 457272af6995Smrg # like '-m68040'. 457372af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 457472af6995Smrg ;; 457572af6995Smrg esac 457672af6995Smrg ;; 457772af6995Smrg 457872af6995Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 457972af6995Smrg # PIC is the default for these OSes. 458072af6995Smrg ;; 458172af6995Smrg 458272af6995Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 458372af6995Smrg # This hack is so that the source file can tell whether it is being 458472af6995Smrg # built for inclusion in a dll (and should export symbols for example). 458572af6995Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 458672af6995Smrg # (--disable-auto-import) libraries 458772af6995Smrg m4_if([$1], [GCJ], [], 458872af6995Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 458972af6995Smrg case $host_os in 459072af6995Smrg os2*) 459172af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 459272af6995Smrg ;; 459372af6995Smrg esac 459472af6995Smrg ;; 459572af6995Smrg 459672af6995Smrg darwin* | rhapsody*) 459772af6995Smrg # PIC is the default on this platform 459872af6995Smrg # Common symbols not allowed in MH_DYLIB files 459972af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 460072af6995Smrg ;; 460172af6995Smrg 460272af6995Smrg haiku*) 460372af6995Smrg # PIC is the default for Haiku. 460472af6995Smrg # The "-static" flag exists, but is broken. 460572af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 460672af6995Smrg ;; 460772af6995Smrg 460872af6995Smrg hpux*) 460972af6995Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 461072af6995Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 461172af6995Smrg # sets the default TLS model and affects inlining. 461272af6995Smrg case $host_cpu in 461372af6995Smrg hppa*64*) 461472af6995Smrg # +Z the default 461572af6995Smrg ;; 461672af6995Smrg *) 461772af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 461872af6995Smrg ;; 461972af6995Smrg esac 462072af6995Smrg ;; 462172af6995Smrg 462272af6995Smrg interix[[3-9]]*) 462372af6995Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 462472af6995Smrg # Instead, we relocate shared libraries at runtime. 462572af6995Smrg ;; 462672af6995Smrg 462772af6995Smrg msdosdjgpp*) 462872af6995Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 462972af6995Smrg # on systems that don't support them. 463072af6995Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 463172af6995Smrg enable_shared=no 463272af6995Smrg ;; 463372af6995Smrg 463472af6995Smrg *nto* | *qnx*) 463572af6995Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 463672af6995Smrg # it will coredump. 463772af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 463872af6995Smrg ;; 463972af6995Smrg 464072af6995Smrg sysv4*MP*) 464172af6995Smrg if test -d /usr/nec; then 464272af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 464372af6995Smrg fi 464472af6995Smrg ;; 464572af6995Smrg 464672af6995Smrg *) 464772af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 464872af6995Smrg ;; 464972af6995Smrg esac 465072af6995Smrg 465172af6995Smrg case $cc_basename in 465272af6995Smrg nvcc*) # Cuda Compiler Driver 2.2 465372af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 465472af6995Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 465572af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 465672af6995Smrg fi 465772af6995Smrg ;; 465872af6995Smrg esac 465972af6995Smrg else 466072af6995Smrg # PORTME Check for flag to pass linker flags through the system compiler. 466172af6995Smrg case $host_os in 466272af6995Smrg aix*) 466372af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 466472af6995Smrg if test ia64 = "$host_cpu"; then 466572af6995Smrg # AIX 5 now supports IA64 processor 466672af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 466772af6995Smrg else 466872af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 466972af6995Smrg fi 467072af6995Smrg ;; 467172af6995Smrg 467272af6995Smrg darwin* | rhapsody*) 467372af6995Smrg # PIC is the default on this platform 467472af6995Smrg # Common symbols not allowed in MH_DYLIB files 467572af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 467672af6995Smrg case $cc_basename in 467772af6995Smrg nagfor*) 467872af6995Smrg # NAG Fortran compiler 467972af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 468072af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 468172af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 468272af6995Smrg ;; 468372af6995Smrg esac 468472af6995Smrg ;; 468572af6995Smrg 468672af6995Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 468772af6995Smrg # This hack is so that the source file can tell whether it is being 468872af6995Smrg # built for inclusion in a dll (and should export symbols for example). 468972af6995Smrg m4_if([$1], [GCJ], [], 469072af6995Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 469172af6995Smrg case $host_os in 469272af6995Smrg os2*) 469372af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 469472af6995Smrg ;; 469572af6995Smrg esac 469672af6995Smrg ;; 469772af6995Smrg 469872af6995Smrg hpux9* | hpux10* | hpux11*) 469972af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 470072af6995Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 470172af6995Smrg # not for PA HP-UX. 470272af6995Smrg case $host_cpu in 470372af6995Smrg hppa*64*|ia64*) 470472af6995Smrg # +Z the default 470572af6995Smrg ;; 470672af6995Smrg *) 470772af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 470872af6995Smrg ;; 470972af6995Smrg esac 471072af6995Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 471172af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 471272af6995Smrg ;; 471372af6995Smrg 471472af6995Smrg irix5* | irix6* | nonstopux*) 471572af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 471672af6995Smrg # PIC (with -KPIC) is the default. 471772af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 471872af6995Smrg ;; 471972af6995Smrg 472072af6995Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 472172af6995Smrg case $cc_basename in 472272af6995Smrg # old Intel for x86_64, which still supported -KPIC. 472372af6995Smrg ecc*) 472472af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 472572af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 472672af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 472772af6995Smrg ;; 472872af6995Smrg # icc used to be incompatible with GCC. 472972af6995Smrg # ICC 10 doesn't accept -KPIC any more. 473072af6995Smrg icc* | ifort*) 473172af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 473272af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 473372af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 473472af6995Smrg ;; 473572af6995Smrg # Lahey Fortran 8.1. 473672af6995Smrg lf95*) 473772af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 473872af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 473972af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 474072af6995Smrg ;; 474172af6995Smrg nagfor*) 474272af6995Smrg # NAG Fortran compiler 474372af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 474472af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 474572af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 474672af6995Smrg ;; 474772af6995Smrg tcc*) 474872af6995Smrg # Fabrice Bellard et al's Tiny C Compiler 474972af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 475072af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 475172af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 475272af6995Smrg ;; 475372af6995Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 475472af6995Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 475572af6995Smrg # which looks to be a dead project) 475672af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 475772af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 475872af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 475972af6995Smrg ;; 476072af6995Smrg ccc*) 476172af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 476272af6995Smrg # All Alpha code is PIC. 476372af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 476472af6995Smrg ;; 476572af6995Smrg xl* | bgxl* | bgf* | mpixl*) 476672af6995Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 476772af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 476872af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 476972af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 477072af6995Smrg ;; 477172af6995Smrg *) 4772a773ec55Smrg case `$CC -V 2>&1 | $SED 5q` in 477372af6995Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 477472af6995Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 477572af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 477672af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 477772af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 477872af6995Smrg ;; 477972af6995Smrg *Sun\ F* | *Sun*Fortran*) 478072af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 478172af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 478272af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 478372af6995Smrg ;; 478472af6995Smrg *Sun\ C*) 478572af6995Smrg # Sun C 5.9 478672af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 478772af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 478872af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 478972af6995Smrg ;; 479072af6995Smrg *Intel*\ [[CF]]*Compiler*) 479172af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 479272af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 479372af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 479472af6995Smrg ;; 479572af6995Smrg *Portland\ Group*) 479672af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 479772af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 479872af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 479972af6995Smrg ;; 480072af6995Smrg esac 480172af6995Smrg ;; 480272af6995Smrg esac 480372af6995Smrg ;; 480472af6995Smrg 480572af6995Smrg newsos6) 480672af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 480772af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 480872af6995Smrg ;; 480972af6995Smrg 481072af6995Smrg *nto* | *qnx*) 481172af6995Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 481272af6995Smrg # it will coredump. 481372af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 481472af6995Smrg ;; 481572af6995Smrg 481672af6995Smrg osf3* | osf4* | osf5*) 481772af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 481872af6995Smrg # All OSF/1 code is PIC. 481972af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 482072af6995Smrg ;; 482172af6995Smrg 482272af6995Smrg rdos*) 482372af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 482472af6995Smrg ;; 482572af6995Smrg 482672af6995Smrg solaris*) 482772af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 482872af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 482972af6995Smrg case $cc_basename in 483072af6995Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 483172af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 483272af6995Smrg *) 483372af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 483472af6995Smrg esac 483572af6995Smrg ;; 483672af6995Smrg 483772af6995Smrg sunos4*) 483872af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 483972af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 484072af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484172af6995Smrg ;; 484272af6995Smrg 484372af6995Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 484472af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 484572af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 484672af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484772af6995Smrg ;; 484872af6995Smrg 484972af6995Smrg sysv4*MP*) 485072af6995Smrg if test -d /usr/nec; then 485172af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 485272af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 485372af6995Smrg fi 485472af6995Smrg ;; 485572af6995Smrg 485672af6995Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 485772af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 485872af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 485972af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 486072af6995Smrg ;; 486172af6995Smrg 486272af6995Smrg unicos*) 486372af6995Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 486472af6995Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 486572af6995Smrg ;; 486672af6995Smrg 486772af6995Smrg uts4*) 486872af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 486972af6995Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 487072af6995Smrg ;; 487172af6995Smrg 487272af6995Smrg *) 487372af6995Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 487472af6995Smrg ;; 487572af6995Smrg esac 487672af6995Smrg fi 487772af6995Smrg]) 487872af6995Smrgcase $host_os in 487972af6995Smrg # For platforms that do not support PIC, -DPIC is meaningless: 488072af6995Smrg *djgpp*) 488172af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 488272af6995Smrg ;; 488372af6995Smrg *) 488472af6995Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 488572af6995Smrg ;; 488672af6995Smrgesac 488772af6995Smrg 488872af6995SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 488972af6995Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 489072af6995Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 489172af6995Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 489272af6995Smrg 489372af6995Smrg# 489472af6995Smrg# Check to make sure the PIC flag actually works. 489572af6995Smrg# 489672af6995Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 489772af6995Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 489872af6995Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 489972af6995Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 490072af6995Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 490172af6995Smrg "" | " "*) ;; 490272af6995Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 490372af6995Smrg esac], 490472af6995Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 490572af6995Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 490672af6995Smrgfi 490772af6995Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 490872af6995Smrg [Additional compiler flags for building library objects]) 490972af6995Smrg 491072af6995Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 491172af6995Smrg [How to pass a linker flag through the compiler]) 491272af6995Smrg# 491372af6995Smrg# Check to make sure the static flag actually works. 491472af6995Smrg# 491572af6995Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 491672af6995Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 491772af6995Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 491872af6995Smrg $lt_tmp_static_flag, 491972af6995Smrg [], 492072af6995Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 492172af6995Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 492272af6995Smrg [Compiler flag to prevent dynamic linking]) 492372af6995Smrg])# _LT_COMPILER_PIC 492472af6995Smrg 492572af6995Smrg 492672af6995Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 492772af6995Smrg# ---------------------------- 492872af6995Smrg# See if the linker supports building shared libraries. 492972af6995Smrgm4_defun([_LT_LINKER_SHLIBS], 493072af6995Smrg[AC_REQUIRE([LT_PATH_LD])dnl 493172af6995SmrgAC_REQUIRE([LT_PATH_NM])dnl 493272af6995Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 493372af6995Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 493472af6995Smrgm4_require([_LT_DECL_EGREP])dnl 493572af6995Smrgm4_require([_LT_DECL_SED])dnl 493672af6995Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 493772af6995Smrgm4_require([_LT_TAG_COMPILER])dnl 493872af6995SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 493972af6995Smrgm4_if([$1], [CXX], [ 494072af6995Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 494172af6995Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 494272af6995Smrg case $host_os in 494372af6995Smrg aix[[4-9]]*) 494472af6995Smrg # If we're using GNU nm, then we don't want the "-C" option. 494572af6995Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 494672af6995Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 494772af6995Smrg # weak defined symbols like other global defined symbols, whereas 494872af6995Smrg # GNU nm marks them as "W". 494972af6995Smrg # While the 'weak' keyword is ignored in the Export File, we need 495072af6995Smrg # it in the Import File for the 'aix-soname' feature, so we have 495172af6995Smrg # to replace the "-B" option with "-P" for AIX nm. 495272af6995Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 495372af6995Smrg _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' 495472af6995Smrg else 4955a773ec55Smrg _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' 495672af6995Smrg fi 495772af6995Smrg ;; 495872af6995Smrg pw32*) 495972af6995Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 496072af6995Smrg ;; 496172af6995Smrg cygwin* | mingw* | cegcc*) 496272af6995Smrg case $cc_basename in 4963a773ec55Smrg cl* | icl*) 496472af6995Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 496572af6995Smrg ;; 496672af6995Smrg *) 496772af6995Smrg _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' 496872af6995Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 496972af6995Smrg ;; 497072af6995Smrg esac 497172af6995Smrg ;; 497272af6995Smrg *) 497372af6995Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 497472af6995Smrg ;; 497572af6995Smrg esac 497672af6995Smrg], [ 497772af6995Smrg runpath_var= 497872af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 497972af6995Smrg _LT_TAGVAR(always_export_symbols, $1)=no 498072af6995Smrg _LT_TAGVAR(archive_cmds, $1)= 498172af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 498272af6995Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 498372af6995Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 498472af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 498572af6995Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 498672af6995Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 498772af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=no 498872af6995Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 498972af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 499072af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 499172af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 499272af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 499372af6995Smrg _LT_TAGVAR(inherit_rpath, $1)=no 499472af6995Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 499572af6995Smrg _LT_TAGVAR(module_cmds, $1)= 499672af6995Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 499772af6995Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 499872af6995Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 499972af6995Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 500072af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 500172af6995Smrg # include_expsyms should be a list of space-separated symbols to be *always* 500272af6995Smrg # included in the symbol list 500372af6995Smrg _LT_TAGVAR(include_expsyms, $1)= 500472af6995Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 500572af6995Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 500672af6995Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 500772af6995Smrg # as well as any symbol that contains 'd'. 500872af6995Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 500972af6995Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 501072af6995Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 501172af6995Smrg # the symbol is explicitly referenced. Since portable code cannot 501272af6995Smrg # rely on this symbol name, it's probably fine to never include it in 501372af6995Smrg # preloaded symbol tables. 501472af6995Smrg # Exclude shared library initialization/finalization symbols. 501572af6995Smrgdnl Note also adjust exclude_expsyms for C++ above. 501672af6995Smrg extract_expsyms_cmds= 501772af6995Smrg 501872af6995Smrg case $host_os in 501972af6995Smrg cygwin* | mingw* | pw32* | cegcc*) 5020a773ec55Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 502172af6995Smrg # When not using gcc, we currently assume that we are using 5022a773ec55Smrg # Microsoft Visual C++ or Intel C++ Compiler. 502372af6995Smrg if test yes != "$GCC"; then 502472af6995Smrg with_gnu_ld=no 502572af6995Smrg fi 502672af6995Smrg ;; 502772af6995Smrg interix*) 5028a773ec55Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 502972af6995Smrg with_gnu_ld=yes 503072af6995Smrg ;; 503172af6995Smrg openbsd* | bitrig*) 503272af6995Smrg with_gnu_ld=no 503372af6995Smrg ;; 503472af6995Smrg esac 503572af6995Smrg 503672af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 503772af6995Smrg 503872af6995Smrg # On some targets, GNU ld is compatible enough with the native linker 503972af6995Smrg # that we're better off using the native interface for both. 504072af6995Smrg lt_use_gnu_ld_interface=no 504172af6995Smrg if test yes = "$with_gnu_ld"; then 504272af6995Smrg case $host_os in 504372af6995Smrg aix*) 504472af6995Smrg # The AIX port of GNU ld has always aspired to compatibility 504572af6995Smrg # with the native linker. However, as the warning in the GNU ld 504672af6995Smrg # block says, versions before 2.19.5* couldn't really create working 504772af6995Smrg # shared libraries, regardless of the interface used. 504872af6995Smrg case `$LD -v 2>&1` in 504972af6995Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 505072af6995Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 505172af6995Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 505272af6995Smrg *) 505372af6995Smrg lt_use_gnu_ld_interface=yes 505472af6995Smrg ;; 505572af6995Smrg esac 505672af6995Smrg ;; 505772af6995Smrg *) 505872af6995Smrg lt_use_gnu_ld_interface=yes 505972af6995Smrg ;; 506072af6995Smrg esac 506172af6995Smrg fi 506272af6995Smrg 506372af6995Smrg if test yes = "$lt_use_gnu_ld_interface"; then 506472af6995Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 506572af6995Smrg wlarc='$wl' 506672af6995Smrg 506772af6995Smrg # Set some defaults for GNU ld with shared library support. These 506872af6995Smrg # are reset later if shared libraries are not supported. Putting them 506972af6995Smrg # here allows them to be overridden if necessary. 507072af6995Smrg runpath_var=LD_RUN_PATH 507172af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 507272af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 507372af6995Smrg # ancient GNU ld didn't support --whole-archive et. al. 507472af6995Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 507572af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 507672af6995Smrg else 507772af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 507872af6995Smrg fi 507972af6995Smrg supports_anon_versioning=no 5080a773ec55Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 508172af6995Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 508272af6995Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 508372af6995Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 508472af6995Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 508572af6995Smrg *\ 2.11.*) ;; # other 2.11 versions 508672af6995Smrg *) supports_anon_versioning=yes ;; 508772af6995Smrg esac 508872af6995Smrg 508972af6995Smrg # See if GNU ld supports shared libraries. 509072af6995Smrg case $host_os in 509172af6995Smrg aix[[3-9]]*) 509272af6995Smrg # On AIX/PPC, the GNU linker is very broken 509372af6995Smrg if test ia64 != "$host_cpu"; then 509472af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 509572af6995Smrg cat <<_LT_EOF 1>&2 509672af6995Smrg 509772af6995Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 509872af6995Smrg*** to be unable to reliably create shared libraries on AIX. 509972af6995Smrg*** Therefore, libtool is disabling shared libraries support. If you 510072af6995Smrg*** really care for shared libraries, you may want to install binutils 510172af6995Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 510272af6995Smrg*** You will then need to restart the configuration process. 510372af6995Smrg 510472af6995Smrg_LT_EOF 510572af6995Smrg fi 510672af6995Smrg ;; 510772af6995Smrg 510872af6995Smrg amigaos*) 510972af6995Smrg case $host_cpu in 511072af6995Smrg powerpc) 511172af6995Smrg # see comment about AmigaOS4 .so support 511272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 511372af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 511472af6995Smrg ;; 511572af6995Smrg m68k) 511672af6995Smrg _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)' 511772af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 511872af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 511972af6995Smrg ;; 512072af6995Smrg esac 512172af6995Smrg ;; 512272af6995Smrg 512372af6995Smrg beos*) 512472af6995Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 512572af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 512672af6995Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 512772af6995Smrg # support --undefined. This deserves some investigation. FIXME 512872af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 512972af6995Smrg else 513072af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 513172af6995Smrg fi 513272af6995Smrg ;; 513372af6995Smrg 513472af6995Smrg cygwin* | mingw* | pw32* | cegcc*) 513572af6995Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 513672af6995Smrg # as there is no search path for DLLs. 513772af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 513872af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 513972af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 514072af6995Smrg _LT_TAGVAR(always_export_symbols, $1)=no 514172af6995Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 514272af6995Smrg _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' 514372af6995Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 514472af6995Smrg 514572af6995Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 514672af6995Smrg _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' 514772af6995Smrg # If the export-symbols file already is a .def file, use it as 514872af6995Smrg # is; otherwise, prepend EXPORTS... 514972af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 515072af6995Smrg cp $export_symbols $output_objdir/$soname.def; 515172af6995Smrg else 515272af6995Smrg echo EXPORTS > $output_objdir/$soname.def; 515372af6995Smrg cat $export_symbols >> $output_objdir/$soname.def; 515472af6995Smrg fi~ 515572af6995Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 515672af6995Smrg else 515772af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 515872af6995Smrg fi 515972af6995Smrg ;; 516072af6995Smrg 516172af6995Smrg haiku*) 516272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 516372af6995Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 516472af6995Smrg ;; 516572af6995Smrg 516672af6995Smrg os2*) 516772af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 516872af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 516972af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 517072af6995Smrg shrext_cmds=.dll 517172af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 517272af6995Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 517372af6995Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 517472af6995Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 517572af6995Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 517672af6995Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 517772af6995Smrg emximp -o $lib $output_objdir/$libname.def' 517872af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 517972af6995Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 518072af6995Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 518172af6995Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 518272af6995Smrg prefix_cmds="$SED"~ 518372af6995Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 518472af6995Smrg prefix_cmds="$prefix_cmds -e 1d"; 518572af6995Smrg fi~ 518672af6995Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 518772af6995Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 518872af6995Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 518972af6995Smrg emximp -o $lib $output_objdir/$libname.def' 519072af6995Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 519172af6995Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5192a773ec55Smrg _LT_TAGVAR(file_list_spec, $1)='@' 519372af6995Smrg ;; 519472af6995Smrg 519572af6995Smrg interix[[3-9]]*) 519672af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=no 519772af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 519872af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 519972af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 520072af6995Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 520172af6995Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 520272af6995Smrg # default) and relocated if they conflict, which is a slow very memory 520372af6995Smrg # consuming and fragmenting process. To avoid this, we pick a random, 520472af6995Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 520572af6995Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 520672af6995Smrg _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' 5207a773ec55Smrg _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' 520872af6995Smrg ;; 520972af6995Smrg 521072af6995Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 521172af6995Smrg tmp_diet=no 521272af6995Smrg if test linux-dietlibc = "$host_os"; then 521372af6995Smrg case $cc_basename in 521472af6995Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 521572af6995Smrg esac 521672af6995Smrg fi 521772af6995Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 521872af6995Smrg && test no = "$tmp_diet" 521972af6995Smrg then 522072af6995Smrg tmp_addflag=' $pic_flag' 522172af6995Smrg tmp_sharedflag='-shared' 522272af6995Smrg case $cc_basename,$host_cpu in 522372af6995Smrg pgcc*) # Portland Group C compiler 522472af6995Smrg _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' 522572af6995Smrg tmp_addflag=' $pic_flag' 522672af6995Smrg ;; 522772af6995Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 522872af6995Smrg # Portland Group f77 and f90 compilers 522972af6995Smrg _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' 523072af6995Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 523172af6995Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 523272af6995Smrg tmp_addflag=' -i_dynamic' ;; 523372af6995Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 523472af6995Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 523572af6995Smrg ifc* | ifort*) # Intel Fortran compiler 523672af6995Smrg tmp_addflag=' -nofor_main' ;; 523772af6995Smrg lf95*) # Lahey Fortran 8.1 523872af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 523972af6995Smrg tmp_sharedflag='--shared' ;; 524072af6995Smrg nagfor*) # NAGFOR 5.3 524172af6995Smrg tmp_sharedflag='-Wl,-shared' ;; 524272af6995Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 524372af6995Smrg tmp_sharedflag='-qmkshrobj' 524472af6995Smrg tmp_addflag= ;; 524572af6995Smrg nvcc*) # Cuda Compiler Driver 2.2 524672af6995Smrg _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' 524772af6995Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 524872af6995Smrg ;; 524972af6995Smrg esac 5250a773ec55Smrg case `$CC -V 2>&1 | $SED 5q` in 525172af6995Smrg *Sun\ C*) # Sun C 5.9 525272af6995Smrg _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' 525372af6995Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 525472af6995Smrg tmp_sharedflag='-G' ;; 525572af6995Smrg *Sun\ F*) # Sun Fortran 8.3 525672af6995Smrg tmp_sharedflag='-G' ;; 525772af6995Smrg esac 525872af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 525972af6995Smrg 526072af6995Smrg if test yes = "$supports_anon_versioning"; then 526172af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5262a773ec55Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 526372af6995Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 526472af6995Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 526572af6995Smrg fi 526672af6995Smrg 526772af6995Smrg case $cc_basename in 526872af6995Smrg tcc*) 526972af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 527072af6995Smrg ;; 527172af6995Smrg xlf* | bgf* | bgxlf* | mpixlf*) 527272af6995Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 527372af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 527472af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 527572af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 527672af6995Smrg if test yes = "$supports_anon_versioning"; then 527772af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5278a773ec55Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 527972af6995Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 528072af6995Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 528172af6995Smrg fi 528272af6995Smrg ;; 528372af6995Smrg esac 528472af6995Smrg else 528572af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 528672af6995Smrg fi 528772af6995Smrg ;; 528872af6995Smrg 5289362b94d5Smrg netbsd*) 529072af6995Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 529172af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 529272af6995Smrg wlarc= 529372af6995Smrg else 529472af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 529572af6995Smrg _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' 529672af6995Smrg fi 529772af6995Smrg ;; 529872af6995Smrg 529972af6995Smrg solaris*) 530072af6995Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 530172af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 530272af6995Smrg cat <<_LT_EOF 1>&2 530372af6995Smrg 530472af6995Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 530572af6995Smrg*** create shared libraries on Solaris systems. Therefore, libtool 530672af6995Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 530772af6995Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 530872af6995Smrg*** your PATH or compiler configuration so that the native linker is 530972af6995Smrg*** used, and then restart. 531072af6995Smrg 531172af6995Smrg_LT_EOF 531272af6995Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 531372af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 531472af6995Smrg _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' 531572af6995Smrg else 531672af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 531772af6995Smrg fi 531872af6995Smrg ;; 531972af6995Smrg 532072af6995Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 532172af6995Smrg case `$LD -v 2>&1` in 532272af6995Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 532372af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 532472af6995Smrg cat <<_LT_EOF 1>&2 532572af6995Smrg 532672af6995Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 532772af6995Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 532872af6995Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 532972af6995Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 533072af6995Smrg*** your PATH or compiler configuration so that the native linker is 533172af6995Smrg*** used, and then restart. 533272af6995Smrg 533372af6995Smrg_LT_EOF 533472af6995Smrg ;; 533572af6995Smrg *) 533672af6995Smrg # For security reasons, it is highly recommended that you always 533772af6995Smrg # use absolute paths for naming shared libraries, and exclude the 533872af6995Smrg # DT_RUNPATH tag from executables and libraries. But doing so 533972af6995Smrg # requires that you compile everything twice, which is a pain. 534072af6995Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 534172af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 534272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 534372af6995Smrg _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' 534472af6995Smrg else 534572af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 534672af6995Smrg fi 534772af6995Smrg ;; 534872af6995Smrg esac 534972af6995Smrg ;; 535072af6995Smrg 535172af6995Smrg sunos4*) 535272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 535372af6995Smrg wlarc= 535472af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 535572af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 535672af6995Smrg ;; 535772af6995Smrg 535872af6995Smrg *) 535972af6995Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 536072af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 536172af6995Smrg _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' 536272af6995Smrg else 536372af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 536472af6995Smrg fi 536572af6995Smrg ;; 536672af6995Smrg esac 536772af6995Smrg 536872af6995Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 536972af6995Smrg runpath_var= 537072af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 537172af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 537272af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 537372af6995Smrg fi 537472af6995Smrg else 537572af6995Smrg # PORTME fill in a description of your system's linker (not GNU ld) 537672af6995Smrg case $host_os in 537772af6995Smrg aix3*) 537872af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 537972af6995Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 538072af6995Smrg _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' 538172af6995Smrg # Note: this linker hardcodes the directories in LIBPATH if there 538272af6995Smrg # are no directories specified by -L. 538372af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 538472af6995Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 538572af6995Smrg # Neither direct hardcoding nor static linking is supported with a 538672af6995Smrg # broken collect2. 538772af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 538872af6995Smrg fi 538972af6995Smrg ;; 539072af6995Smrg 539172af6995Smrg aix[[4-9]]*) 539272af6995Smrg if test ia64 = "$host_cpu"; then 539372af6995Smrg # On IA64, the linker does run time linking by default, so we don't 539472af6995Smrg # have to do anything special. 539572af6995Smrg aix_use_runtimelinking=no 539672af6995Smrg exp_sym_flag='-Bexport' 539772af6995Smrg no_entry_flag= 539872af6995Smrg else 539972af6995Smrg # If we're using GNU nm, then we don't want the "-C" option. 540072af6995Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 540172af6995Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 540272af6995Smrg # weak defined symbols like other global defined symbols, whereas 540372af6995Smrg # GNU nm marks them as "W". 540472af6995Smrg # While the 'weak' keyword is ignored in the Export File, we need 540572af6995Smrg # it in the Import File for the 'aix-soname' feature, so we have 540672af6995Smrg # to replace the "-B" option with "-P" for AIX nm. 540772af6995Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 540872af6995Smrg _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' 540972af6995Smrg else 5410a773ec55Smrg _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' 541172af6995Smrg fi 541272af6995Smrg aix_use_runtimelinking=no 541372af6995Smrg 541472af6995Smrg # Test if we are trying to use run time linking or normal 541572af6995Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 541672af6995Smrg # have runtime linking enabled, and use it for executables. 541772af6995Smrg # For shared libraries, we enable/disable runtime linking 541872af6995Smrg # depending on the kind of the shared library created - 541972af6995Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 542072af6995Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 542172af6995Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 542272af6995Smrg # lib.a static archive 542372af6995Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 542472af6995Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 542572af6995Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 542672af6995Smrg # lib.a(lib.so.V) shared, rtl:no 542772af6995Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 542872af6995Smrg # lib.a static archive 542972af6995Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 543072af6995Smrg for ld_flag in $LDFLAGS; do 543172af6995Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 543272af6995Smrg aix_use_runtimelinking=yes 543372af6995Smrg break 543472af6995Smrg fi 543572af6995Smrg done 543672af6995Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 543772af6995Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 543872af6995Smrg # so we don't have lib.a shared libs to link our executables. 543972af6995Smrg # We have to force runtime linking in this case. 544072af6995Smrg aix_use_runtimelinking=yes 544172af6995Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 544272af6995Smrg fi 544372af6995Smrg ;; 544472af6995Smrg esac 544572af6995Smrg 544672af6995Smrg exp_sym_flag='-bexport' 544772af6995Smrg no_entry_flag='-bnoentry' 544872af6995Smrg fi 544972af6995Smrg 545072af6995Smrg # When large executables or shared objects are built, AIX ld can 545172af6995Smrg # have problems creating the table of contents. If linking a library 545272af6995Smrg # or program results in "error TOC overflow" add -mminimal-toc to 545372af6995Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 545472af6995Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 545572af6995Smrg 545672af6995Smrg _LT_TAGVAR(archive_cmds, $1)='' 545772af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 545872af6995Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 545972af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 546072af6995Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 546172af6995Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 546272af6995Smrg case $with_aix_soname,$aix_use_runtimelinking in 546372af6995Smrg aix,*) ;; # traditional, no import file 546472af6995Smrg svr4,* | *,yes) # use import file 546572af6995Smrg # The Import File defines what to hardcode. 546672af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=no 546772af6995Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 546872af6995Smrg ;; 546972af6995Smrg esac 547072af6995Smrg 547172af6995Smrg if test yes = "$GCC"; then 547272af6995Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 547372af6995Smrg # We only want to do this on AIX 4.2 and lower, the check 547472af6995Smrg # below for broken collect2 doesn't work under 4.3+ 547572af6995Smrg collect2name=`$CC -print-prog-name=collect2` 547672af6995Smrg if test -f "$collect2name" && 547772af6995Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 547872af6995Smrg then 547972af6995Smrg # We have reworked collect2 548072af6995Smrg : 548172af6995Smrg else 548272af6995Smrg # We have old collect2 548372af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 548472af6995Smrg # It fails to find uninstalled libraries when the uninstalled 548572af6995Smrg # path is not listed in the libpath. Setting hardcode_minus_L 548672af6995Smrg # to unsupported forces relinking 548772af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 548872af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 548972af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 549072af6995Smrg fi 549172af6995Smrg ;; 549272af6995Smrg esac 549372af6995Smrg shared_flag='-shared' 549472af6995Smrg if test yes = "$aix_use_runtimelinking"; then 549572af6995Smrg shared_flag="$shared_flag "'$wl-G' 549672af6995Smrg fi 549772af6995Smrg # Need to ensure runtime linking is disabled for the traditional 549872af6995Smrg # shared library, or the linker may eventually find shared libraries 549972af6995Smrg # /with/ Import File - we do not want to mix them. 550072af6995Smrg shared_flag_aix='-shared' 550172af6995Smrg shared_flag_svr4='-shared $wl-G' 550272af6995Smrg else 550372af6995Smrg # not using gcc 550472af6995Smrg if test ia64 = "$host_cpu"; then 550572af6995Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 550672af6995Smrg # chokes on -Wl,-G. The following line is correct: 550772af6995Smrg shared_flag='-G' 550872af6995Smrg else 550972af6995Smrg if test yes = "$aix_use_runtimelinking"; then 551072af6995Smrg shared_flag='$wl-G' 551172af6995Smrg else 551272af6995Smrg shared_flag='$wl-bM:SRE' 551372af6995Smrg fi 551472af6995Smrg shared_flag_aix='$wl-bM:SRE' 551572af6995Smrg shared_flag_svr4='$wl-G' 551672af6995Smrg fi 551772af6995Smrg fi 551872af6995Smrg 551972af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 552072af6995Smrg # It seems that -bexpall does not export symbols beginning with 552172af6995Smrg # underscore (_), so it is better to generate a list of symbols to export. 552272af6995Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 552372af6995Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 552472af6995Smrg # Warning - without using the other runtime loading flags (-brtl), 552572af6995Smrg # -berok will link without error, but may produce a broken library. 552672af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 552772af6995Smrg # Determine the default libpath from the value encoded in an 552872af6995Smrg # empty executable. 552972af6995Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 553072af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 553172af6995Smrg _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 553272af6995Smrg else 553372af6995Smrg if test ia64 = "$host_cpu"; then 553472af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 553572af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 553672af6995Smrg _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" 553772af6995Smrg else 553872af6995Smrg # Determine the default libpath from the value encoded in an 553972af6995Smrg # empty executable. 554072af6995Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 554172af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 554272af6995Smrg # Warning - without using the other run time loading flags, 554372af6995Smrg # -berok will link without error, but may produce a broken library. 554472af6995Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 554572af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 554672af6995Smrg if test yes = "$with_gnu_ld"; then 554772af6995Smrg # We only use this code for GNU lds that support --whole-archive. 554872af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 554972af6995Smrg else 555072af6995Smrg # Exported symbols can be pulled into shared objects from archives 555172af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 555272af6995Smrg fi 555372af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 555472af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 555572af6995Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 555672af6995Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 555772af6995Smrg if test svr4 != "$with_aix_soname"; then 555872af6995Smrg # This is similar to how AIX traditionally builds its shared libraries. 555972af6995Smrg _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' 556072af6995Smrg fi 556172af6995Smrg if test aix != "$with_aix_soname"; then 556272af6995Smrg _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' 556372af6995Smrg else 556472af6995Smrg # used by -dlpreopen to get the symbols 556572af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 556672af6995Smrg fi 556772af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 556872af6995Smrg fi 556972af6995Smrg fi 557072af6995Smrg ;; 557172af6995Smrg 557272af6995Smrg amigaos*) 557372af6995Smrg case $host_cpu in 557472af6995Smrg powerpc) 557572af6995Smrg # see comment about AmigaOS4 .so support 557672af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 557772af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 557872af6995Smrg ;; 557972af6995Smrg m68k) 558072af6995Smrg _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)' 558172af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 558272af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 558372af6995Smrg ;; 558472af6995Smrg esac 558572af6995Smrg ;; 558672af6995Smrg 558772af6995Smrg bsdi[[45]]*) 558872af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 558972af6995Smrg ;; 559072af6995Smrg 559172af6995Smrg cygwin* | mingw* | pw32* | cegcc*) 559272af6995Smrg # When not using gcc, we currently assume that we are using 5593a773ec55Smrg # Microsoft Visual C++ or Intel C++ Compiler. 559472af6995Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 559572af6995Smrg # no search path for DLLs. 559672af6995Smrg case $cc_basename in 5597a773ec55Smrg cl* | icl*) 5598a773ec55Smrg # Native MSVC or ICC 559972af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 560072af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 560172af6995Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 560272af6995Smrg _LT_TAGVAR(file_list_spec, $1)='@' 560372af6995Smrg # Tell ltmain to make .lib files, not .a files. 560472af6995Smrg libext=lib 560572af6995Smrg # Tell ltmain to make .dll files, not .so files. 560672af6995Smrg shrext_cmds=.dll 560772af6995Smrg # FIXME: Setting linknames here is a bad hack. 560872af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 560972af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 561072af6995Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 561172af6995Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 561272af6995Smrg else 561372af6995Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 561472af6995Smrg fi~ 561572af6995Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 561672af6995Smrg linknames=' 561772af6995Smrg # The linker will not automatically build a static lib if we build a DLL. 561872af6995Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 561972af6995Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 562072af6995Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 562172af6995Smrg _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' 562272af6995Smrg # Don't use ranlib 562372af6995Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 562472af6995Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 562572af6995Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 562672af6995Smrg case $lt_outputfile in 562772af6995Smrg *.exe|*.EXE) ;; 562872af6995Smrg *) 562972af6995Smrg lt_outputfile=$lt_outputfile.exe 563072af6995Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 563172af6995Smrg ;; 563272af6995Smrg esac~ 563372af6995Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 563472af6995Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 563572af6995Smrg $RM "$lt_outputfile.manifest"; 563672af6995Smrg fi' 563772af6995Smrg ;; 563872af6995Smrg *) 5639a773ec55Smrg # Assume MSVC and ICC wrapper 564072af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 564172af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 564272af6995Smrg # Tell ltmain to make .lib files, not .a files. 564372af6995Smrg libext=lib 564472af6995Smrg # Tell ltmain to make .dll files, not .so files. 564572af6995Smrg shrext_cmds=.dll 564672af6995Smrg # FIXME: Setting linknames here is a bad hack. 564772af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 564872af6995Smrg # The linker will automatically build a .lib file if we build a DLL. 564972af6995Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 565072af6995Smrg # FIXME: Should let the user specify the lib program. 565172af6995Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 565272af6995Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 565372af6995Smrg ;; 565472af6995Smrg esac 565572af6995Smrg ;; 565672af6995Smrg 565772af6995Smrg darwin* | rhapsody*) 565872af6995Smrg _LT_DARWIN_LINKER_FEATURES($1) 565972af6995Smrg ;; 566072af6995Smrg 566172af6995Smrg dgux*) 566272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 566372af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 566472af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 566572af6995Smrg ;; 566672af6995Smrg 566772af6995Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 566872af6995Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 566972af6995Smrg # does not break anything, and helps significantly (at the cost of a little 567072af6995Smrg # extra space). 567172af6995Smrg freebsd2.2*) 567272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 567372af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 567472af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 567572af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 567672af6995Smrg ;; 567772af6995Smrg 567872af6995Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 567972af6995Smrg freebsd2.*) 568072af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 568172af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 568272af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 568372af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 568472af6995Smrg ;; 568572af6995Smrg 568672af6995Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5687a773ec55Smrg freebsd* | dragonfly* | midnightbsd*) 568872af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 568972af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 569072af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 569172af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 569272af6995Smrg ;; 569372af6995Smrg 569472af6995Smrg hpux9*) 569572af6995Smrg if test yes = "$GCC"; then 569672af6995Smrg _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' 569772af6995Smrg else 569872af6995Smrg _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' 569972af6995Smrg fi 570072af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 570172af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 570272af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 570372af6995Smrg 570472af6995Smrg # hardcode_minus_L: Not really in the search PATH, 570572af6995Smrg # but as the default location of the library. 570672af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 570772af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 570872af6995Smrg ;; 570972af6995Smrg 571072af6995Smrg hpux10*) 571172af6995Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 571272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 571372af6995Smrg else 571472af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 571572af6995Smrg fi 571672af6995Smrg if test no = "$with_gnu_ld"; then 571772af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 571872af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 571972af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 572072af6995Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 572172af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 572272af6995Smrg # hardcode_minus_L: Not really in the search PATH, 572372af6995Smrg # but as the default location of the library. 572472af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 572572af6995Smrg fi 572672af6995Smrg ;; 572772af6995Smrg 572872af6995Smrg hpux11*) 572972af6995Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 573072af6995Smrg case $host_cpu in 573172af6995Smrg hppa*64*) 573272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 573372af6995Smrg ;; 573472af6995Smrg ia64*) 573572af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 573672af6995Smrg ;; 573772af6995Smrg *) 573872af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 573972af6995Smrg ;; 574072af6995Smrg esac 574172af6995Smrg else 574272af6995Smrg case $host_cpu in 574372af6995Smrg hppa*64*) 574472af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 574572af6995Smrg ;; 574672af6995Smrg ia64*) 574772af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 574872af6995Smrg ;; 574972af6995Smrg *) 575072af6995Smrg m4_if($1, [], [ 575172af6995Smrg # Older versions of the 11.00 compiler do not understand -b yet 575272af6995Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 575372af6995Smrg _LT_LINKER_OPTION([if $CC understands -b], 575472af6995Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 575572af6995Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 575672af6995Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 575772af6995Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 575872af6995Smrg ;; 575972af6995Smrg esac 576072af6995Smrg fi 576172af6995Smrg if test no = "$with_gnu_ld"; then 576272af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 576372af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 576472af6995Smrg 576572af6995Smrg case $host_cpu in 576672af6995Smrg hppa*64*|ia64*) 576772af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=no 576872af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 576972af6995Smrg ;; 577072af6995Smrg *) 577172af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 577272af6995Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 577372af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 577472af6995Smrg 577572af6995Smrg # hardcode_minus_L: Not really in the search PATH, 577672af6995Smrg # but as the default location of the library. 577772af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 577872af6995Smrg ;; 577972af6995Smrg esac 578072af6995Smrg fi 578172af6995Smrg ;; 578272af6995Smrg 578372af6995Smrg irix5* | irix6* | nonstopux*) 578472af6995Smrg if test yes = "$GCC"; then 578572af6995Smrg _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' 578672af6995Smrg # Try to use the -exported_symbol ld option, if it does not 578772af6995Smrg # work, assume that -exports_file does not work either and 578872af6995Smrg # implicitly export all symbols. 578972af6995Smrg # This should be the same for all languages, so no per-tag cache variable. 579072af6995Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 579172af6995Smrg [lt_cv_irix_exported_symbol], 579272af6995Smrg [save_LDFLAGS=$LDFLAGS 579372af6995Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 579472af6995Smrg AC_LINK_IFELSE( 579572af6995Smrg [AC_LANG_SOURCE( 579672af6995Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 579772af6995Smrg [C++], [[int foo (void) { return 0; }]], 579872af6995Smrg [Fortran 77], [[ 579972af6995Smrg subroutine foo 580072af6995Smrg end]], 580172af6995Smrg [Fortran], [[ 580272af6995Smrg subroutine foo 580372af6995Smrg end]])])], 580472af6995Smrg [lt_cv_irix_exported_symbol=yes], 580572af6995Smrg [lt_cv_irix_exported_symbol=no]) 580672af6995Smrg LDFLAGS=$save_LDFLAGS]) 580772af6995Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 580872af6995Smrg _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' 580972af6995Smrg fi 581072af6995Smrg else 581172af6995Smrg _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' 581272af6995Smrg _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' 581372af6995Smrg fi 581472af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 581572af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 581672af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 581772af6995Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 581872af6995Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 581972af6995Smrg ;; 582072af6995Smrg 582172af6995Smrg linux*) 582272af6995Smrg case $cc_basename in 582372af6995Smrg tcc*) 582472af6995Smrg # Fabrice Bellard et al's Tiny C Compiler 582572af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 582672af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 582772af6995Smrg ;; 582872af6995Smrg esac 582972af6995Smrg ;; 583072af6995Smrg 5831362b94d5Smrg netbsd*) 583272af6995Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 583372af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 583472af6995Smrg else 583572af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 583672af6995Smrg fi 583772af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 583872af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 583972af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 584072af6995Smrg ;; 584172af6995Smrg 584272af6995Smrg newsos6) 584372af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 584472af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 584572af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 584672af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 584772af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 584872af6995Smrg ;; 584972af6995Smrg 585072af6995Smrg *nto* | *qnx*) 585172af6995Smrg ;; 585272af6995Smrg 585372af6995Smrg openbsd* | bitrig*) 585472af6995Smrg if test -f /usr/libexec/ld.so; then 585572af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 585672af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 585772af6995Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 585872af6995Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 585972af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 586072af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 586172af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 586272af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 586372af6995Smrg else 586472af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 586572af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 586672af6995Smrg fi 586772af6995Smrg else 586872af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 586972af6995Smrg fi 587072af6995Smrg ;; 587172af6995Smrg 587272af6995Smrg os2*) 587372af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 587472af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 587572af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 587672af6995Smrg shrext_cmds=.dll 587772af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 587872af6995Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 587972af6995Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 588072af6995Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 588172af6995Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 588272af6995Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 588372af6995Smrg emximp -o $lib $output_objdir/$libname.def' 588472af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 588572af6995Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 588672af6995Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 588772af6995Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 588872af6995Smrg prefix_cmds="$SED"~ 588972af6995Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 589072af6995Smrg prefix_cmds="$prefix_cmds -e 1d"; 589172af6995Smrg fi~ 589272af6995Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 589372af6995Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 589472af6995Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 589572af6995Smrg emximp -o $lib $output_objdir/$libname.def' 589672af6995Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 589772af6995Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5898a773ec55Smrg _LT_TAGVAR(file_list_spec, $1)='@' 589972af6995Smrg ;; 590072af6995Smrg 590172af6995Smrg osf3*) 590272af6995Smrg if test yes = "$GCC"; then 590372af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 590472af6995Smrg _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' 590572af6995Smrg else 590672af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 590772af6995Smrg _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' 590872af6995Smrg fi 590972af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 591072af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 591172af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 591272af6995Smrg ;; 591372af6995Smrg 591472af6995Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 591572af6995Smrg if test yes = "$GCC"; then 591672af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 591772af6995Smrg _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' 591872af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 591972af6995Smrg else 592072af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 592172af6995Smrg _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' 592272af6995Smrg _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~ 592372af6995Smrg $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' 592472af6995Smrg 592572af6995Smrg # Both c and cxx compiler support -rpath directly 592672af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 592772af6995Smrg fi 592872af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 592972af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 593072af6995Smrg ;; 593172af6995Smrg 593272af6995Smrg solaris*) 593372af6995Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 593472af6995Smrg if test yes = "$GCC"; then 593572af6995Smrg wlarc='$wl' 593672af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 593772af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 593872af6995Smrg $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' 593972af6995Smrg else 594072af6995Smrg case `$CC -V 2>&1` in 594172af6995Smrg *"Compilers 5.0"*) 594272af6995Smrg wlarc='' 594372af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 594472af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 594572af6995Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 594672af6995Smrg ;; 594772af6995Smrg *) 594872af6995Smrg wlarc='$wl' 594972af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 595072af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 595172af6995Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 595272af6995Smrg ;; 595372af6995Smrg esac 595472af6995Smrg fi 595572af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 595672af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 595772af6995Smrg case $host_os in 595872af6995Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 595972af6995Smrg *) 596072af6995Smrg # The compiler driver will combine and reorder linker options, 596172af6995Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 596272af6995Smrg # but is careful enough not to reorder. 596372af6995Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 596472af6995Smrg if test yes = "$GCC"; then 596572af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 596672af6995Smrg else 596772af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 596872af6995Smrg fi 596972af6995Smrg ;; 597072af6995Smrg esac 597172af6995Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 597272af6995Smrg ;; 597372af6995Smrg 597472af6995Smrg sunos4*) 597572af6995Smrg if test sequent = "$host_vendor"; then 597672af6995Smrg # Use $CC to link under sequent, because it throws in some extra .o 597772af6995Smrg # files that make .init and .fini sections work. 597872af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 597972af6995Smrg else 598072af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 598172af6995Smrg fi 598272af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 598372af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 598472af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 598572af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 598672af6995Smrg ;; 598772af6995Smrg 598872af6995Smrg sysv4) 598972af6995Smrg case $host_vendor in 599072af6995Smrg sni) 599172af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 599272af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 599372af6995Smrg ;; 599472af6995Smrg siemens) 599572af6995Smrg ## LD is ld it makes a PLAMLIB 599672af6995Smrg ## CC just makes a GrossModule. 599772af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 599872af6995Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 599972af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=no 600072af6995Smrg ;; 600172af6995Smrg motorola) 600272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 600372af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 600472af6995Smrg ;; 600572af6995Smrg esac 600672af6995Smrg runpath_var='LD_RUN_PATH' 600772af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 600872af6995Smrg ;; 600972af6995Smrg 601072af6995Smrg sysv4.3*) 601172af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 601272af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 601372af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 601472af6995Smrg ;; 601572af6995Smrg 601672af6995Smrg sysv4*MP*) 601772af6995Smrg if test -d /usr/nec; then 601872af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 601972af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 602072af6995Smrg runpath_var=LD_RUN_PATH 602172af6995Smrg hardcode_runpath_var=yes 602272af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 602372af6995Smrg fi 602472af6995Smrg ;; 602572af6995Smrg 602672af6995Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 602772af6995Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 602872af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 602972af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 603072af6995Smrg runpath_var='LD_RUN_PATH' 603172af6995Smrg 603272af6995Smrg if test yes = "$GCC"; then 603372af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 603472af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 603572af6995Smrg else 603672af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 603772af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 603872af6995Smrg fi 603972af6995Smrg ;; 604072af6995Smrg 604172af6995Smrg sysv5* | sco3.2v5* | sco5v6*) 604272af6995Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 604372af6995Smrg # link with -lc, and that would cause any symbols used from libc to 604472af6995Smrg # always be unresolved, which means just about no library would 604572af6995Smrg # ever link correctly. If we're not using GNU ld we use -z text 604672af6995Smrg # though, which does catch some bad symbols but isn't as heavy-handed 604772af6995Smrg # as -z defs. 604872af6995Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 604972af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 605072af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 605172af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 605272af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 605372af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 605472af6995Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 605572af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 605672af6995Smrg runpath_var='LD_RUN_PATH' 605772af6995Smrg 605872af6995Smrg if test yes = "$GCC"; then 605972af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 606072af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 606172af6995Smrg else 606272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 606372af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 606472af6995Smrg fi 606572af6995Smrg ;; 606672af6995Smrg 606772af6995Smrg uts4*) 606872af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 606972af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 607072af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 607172af6995Smrg ;; 607272af6995Smrg 607372af6995Smrg *) 607472af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 607572af6995Smrg ;; 607672af6995Smrg esac 607772af6995Smrg 607872af6995Smrg if test sni = "$host_vendor"; then 607972af6995Smrg case $host in 608072af6995Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 608172af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 608272af6995Smrg ;; 608372af6995Smrg esac 608472af6995Smrg fi 608572af6995Smrg fi 608672af6995Smrg]) 608772af6995SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 608872af6995Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 608972af6995Smrg 609072af6995Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 609172af6995Smrg 609272af6995Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 609372af6995Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 609472af6995Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 609572af6995Smrg [The commands to extract the exported symbol list from a shared archive]) 609672af6995Smrg 609772af6995Smrg# 609872af6995Smrg# Do we need to explicitly link libc? 609972af6995Smrg# 610072af6995Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 610172af6995Smrgx|xyes) 610272af6995Smrg # Assume -lc should be added 610372af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 610472af6995Smrg 610572af6995Smrg if test yes,yes = "$GCC,$enable_shared"; then 610672af6995Smrg case $_LT_TAGVAR(archive_cmds, $1) in 610772af6995Smrg *'~'*) 610872af6995Smrg # FIXME: we may have to deal with multi-command sequences. 610972af6995Smrg ;; 611072af6995Smrg '$CC '*) 611172af6995Smrg # Test whether the compiler implicitly links with -lc since on some 611272af6995Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 611372af6995Smrg # to ld, don't add -lc before -lgcc. 611472af6995Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 611572af6995Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 611672af6995Smrg [$RM conftest* 611772af6995Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 611872af6995Smrg 611972af6995Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 612072af6995Smrg soname=conftest 612172af6995Smrg lib=conftest 612272af6995Smrg libobjs=conftest.$ac_objext 612372af6995Smrg deplibs= 612472af6995Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 612572af6995Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 612672af6995Smrg compiler_flags=-v 612772af6995Smrg linker_flags=-v 612872af6995Smrg verstring= 612972af6995Smrg output_objdir=. 613072af6995Smrg libname=conftest 613172af6995Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 613272af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 613372af6995Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 613472af6995Smrg then 613572af6995Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 613672af6995Smrg else 613772af6995Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 613872af6995Smrg fi 613972af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 614072af6995Smrg else 614172af6995Smrg cat conftest.err 1>&5 614272af6995Smrg fi 614372af6995Smrg $RM conftest* 614472af6995Smrg ]) 614572af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 614672af6995Smrg ;; 614772af6995Smrg esac 614872af6995Smrg fi 614972af6995Smrg ;; 615072af6995Smrgesac 615172af6995Smrg 615272af6995Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 615372af6995Smrg [Whether or not to add -lc for building shared libraries]) 615472af6995Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 615572af6995Smrg [enable_shared_with_static_runtimes], [0], 615672af6995Smrg [Whether or not to disallow shared libs when runtime libs are static]) 615772af6995Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 615872af6995Smrg [Compiler flag to allow reflexive dlopens]) 615972af6995Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 616072af6995Smrg [Compiler flag to generate shared objects directly from archives]) 616172af6995Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 616272af6995Smrg [Whether the compiler copes with passing no objects directly]) 616372af6995Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 616472af6995Smrg [Create an old-style archive from a shared archive]) 616572af6995Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 616672af6995Smrg [Create a temporary old-style archive to link instead of a shared archive]) 616772af6995Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 616872af6995Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 616972af6995Smrg_LT_TAGDECL([], [module_cmds], [2], 617072af6995Smrg [Commands used to build a loadable module if different from building 617172af6995Smrg a shared archive.]) 617272af6995Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 617372af6995Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 617472af6995Smrg [Whether we are building with GNU ld or not]) 617572af6995Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 617672af6995Smrg [Flag that allows shared libraries with undefined symbols to be built]) 617772af6995Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 617872af6995Smrg [Flag that enforces no undefined symbols]) 617972af6995Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 618072af6995Smrg [Flag to hardcode $libdir into a binary during linking. 618172af6995Smrg This must work even if $libdir does not exist]) 618272af6995Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 618372af6995Smrg [Whether we need a single "-rpath" flag with a separated argument]) 618472af6995Smrg_LT_TAGDECL([], [hardcode_direct], [0], 618572af6995Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 618672af6995Smrg DIR into the resulting binary]) 618772af6995Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 618872af6995Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 618972af6995Smrg DIR into the resulting binary and the resulting library dependency is 619072af6995Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 619172af6995Smrg library is relocated]) 619272af6995Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 619372af6995Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 619472af6995Smrg into the resulting binary]) 619572af6995Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 619672af6995Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 619772af6995Smrg into the resulting binary]) 619872af6995Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 619972af6995Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 620072af6995Smrg into the library and all subsequent libraries and executables linked 620172af6995Smrg against it]) 620272af6995Smrg_LT_TAGDECL([], [inherit_rpath], [0], 620372af6995Smrg [Set to yes if linker adds runtime paths of dependent libraries 620472af6995Smrg to runtime path list]) 620572af6995Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 620672af6995Smrg [Whether libtool must link a program against all its dependency libraries]) 620772af6995Smrg_LT_TAGDECL([], [always_export_symbols], [0], 620872af6995Smrg [Set to "yes" if exported symbols are required]) 620972af6995Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 621072af6995Smrg [The commands to list exported symbols]) 621172af6995Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 621272af6995Smrg [Symbols that should not be listed in the preloaded symbols]) 621372af6995Smrg_LT_TAGDECL([], [include_expsyms], [1], 621472af6995Smrg [Symbols that must always be exported]) 621572af6995Smrg_LT_TAGDECL([], [prelink_cmds], [2], 621672af6995Smrg [Commands necessary for linking programs (against libraries) with templates]) 621772af6995Smrg_LT_TAGDECL([], [postlink_cmds], [2], 621872af6995Smrg [Commands necessary for finishing linking programs]) 621972af6995Smrg_LT_TAGDECL([], [file_list_spec], [1], 622072af6995Smrg [Specify filename containing input files]) 622172af6995Smrgdnl FIXME: Not yet implemented 622272af6995Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 622372af6995Smrgdnl [Compiler flag to generate thread safe objects]) 622472af6995Smrg])# _LT_LINKER_SHLIBS 622572af6995Smrg 622672af6995Smrg 622772af6995Smrg# _LT_LANG_C_CONFIG([TAG]) 622872af6995Smrg# ------------------------ 622972af6995Smrg# Ensure that the configuration variables for a C compiler are suitably 623072af6995Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 623172af6995Smrg# the compiler configuration to 'libtool'. 623272af6995Smrgm4_defun([_LT_LANG_C_CONFIG], 623372af6995Smrg[m4_require([_LT_DECL_EGREP])dnl 623472af6995Smrglt_save_CC=$CC 623572af6995SmrgAC_LANG_PUSH(C) 623672af6995Smrg 623772af6995Smrg# Source file extension for C test sources. 623872af6995Smrgac_ext=c 623972af6995Smrg 624072af6995Smrg# Object file extension for compiled C test sources. 624172af6995Smrgobjext=o 624272af6995Smrg_LT_TAGVAR(objext, $1)=$objext 624372af6995Smrg 624472af6995Smrg# Code to be used in simple compile tests 624572af6995Smrglt_simple_compile_test_code="int some_variable = 0;" 624672af6995Smrg 624772af6995Smrg# Code to be used in simple link tests 624872af6995Smrglt_simple_link_test_code='int main(){return(0);}' 624972af6995Smrg 625072af6995Smrg_LT_TAG_COMPILER 625172af6995Smrg# Save the default compiler, since it gets overwritten when the other 625272af6995Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 625372af6995Smrgcompiler_DEFAULT=$CC 625472af6995Smrg 625572af6995Smrg# save warnings/boilerplate of simple test code 625672af6995Smrg_LT_COMPILER_BOILERPLATE 625772af6995Smrg_LT_LINKER_BOILERPLATE 625872af6995Smrg 625972af6995Smrg## CAVEAT EMPTOR: 626072af6995Smrg## There is no encapsulation within the following macros, do not change 626172af6995Smrg## the running order or otherwise move them around unless you know exactly 626272af6995Smrg## what you are doing... 626372af6995Smrgif test -n "$compiler"; then 626472af6995Smrg _LT_COMPILER_NO_RTTI($1) 626572af6995Smrg _LT_COMPILER_PIC($1) 626672af6995Smrg _LT_COMPILER_C_O($1) 626772af6995Smrg _LT_COMPILER_FILE_LOCKS($1) 626872af6995Smrg _LT_LINKER_SHLIBS($1) 626972af6995Smrg _LT_SYS_DYNAMIC_LINKER($1) 627072af6995Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 627172af6995Smrg LT_SYS_DLOPEN_SELF 627272af6995Smrg _LT_CMD_STRIPLIB 627372af6995Smrg 627472af6995Smrg # Report what library types will actually be built 627572af6995Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 627672af6995Smrg AC_MSG_RESULT([$can_build_shared]) 627772af6995Smrg 627872af6995Smrg AC_MSG_CHECKING([whether to build shared libraries]) 627972af6995Smrg test no = "$can_build_shared" && enable_shared=no 628072af6995Smrg 628172af6995Smrg # On AIX, shared libraries and static libraries use the same namespace, and 628272af6995Smrg # are all built from PIC. 628372af6995Smrg case $host_os in 628472af6995Smrg aix3*) 628572af6995Smrg test yes = "$enable_shared" && enable_static=no 628672af6995Smrg if test -n "$RANLIB"; then 628772af6995Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 628872af6995Smrg postinstall_cmds='$RANLIB $lib' 628972af6995Smrg fi 629072af6995Smrg ;; 629172af6995Smrg 629272af6995Smrg aix[[4-9]]*) 629372af6995Smrg if test ia64 != "$host_cpu"; then 629472af6995Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 629572af6995Smrg yes,aix,yes) ;; # shared object as lib.so file only 629672af6995Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 629772af6995Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 629872af6995Smrg esac 629972af6995Smrg fi 630072af6995Smrg ;; 630172af6995Smrg esac 630272af6995Smrg AC_MSG_RESULT([$enable_shared]) 630372af6995Smrg 630472af6995Smrg AC_MSG_CHECKING([whether to build static libraries]) 630572af6995Smrg # Make sure either enable_shared or enable_static is yes. 630672af6995Smrg test yes = "$enable_shared" || enable_static=yes 630772af6995Smrg AC_MSG_RESULT([$enable_static]) 630872af6995Smrg 630972af6995Smrg _LT_CONFIG($1) 631072af6995Smrgfi 631172af6995SmrgAC_LANG_POP 631272af6995SmrgCC=$lt_save_CC 631372af6995Smrg])# _LT_LANG_C_CONFIG 631472af6995Smrg 631572af6995Smrg 631672af6995Smrg# _LT_LANG_CXX_CONFIG([TAG]) 631772af6995Smrg# -------------------------- 631872af6995Smrg# Ensure that the configuration variables for a C++ compiler are suitably 631972af6995Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 632072af6995Smrg# the compiler configuration to 'libtool'. 632172af6995Smrgm4_defun([_LT_LANG_CXX_CONFIG], 632272af6995Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 632372af6995Smrgm4_require([_LT_DECL_EGREP])dnl 632472af6995Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 632572af6995Smrgif test -n "$CXX" && ( test no != "$CXX" && 632672af6995Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 632772af6995Smrg (test g++ != "$CXX"))); then 632872af6995Smrg AC_PROG_CXXCPP 632972af6995Smrgelse 633072af6995Smrg _lt_caught_CXX_error=yes 633172af6995Smrgfi 633272af6995Smrg 633372af6995SmrgAC_LANG_PUSH(C++) 633472af6995Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 633572af6995Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 633672af6995Smrg_LT_TAGVAR(always_export_symbols, $1)=no 633772af6995Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 633872af6995Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 633972af6995Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 634072af6995Smrg_LT_TAGVAR(hardcode_direct, $1)=no 634172af6995Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 634272af6995Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 634372af6995Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 634472af6995Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 634572af6995Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 634672af6995Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 634772af6995Smrg_LT_TAGVAR(inherit_rpath, $1)=no 634872af6995Smrg_LT_TAGVAR(module_cmds, $1)= 634972af6995Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 635072af6995Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 635172af6995Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 635272af6995Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 635372af6995Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 635472af6995Smrg_LT_TAGVAR(no_undefined_flag, $1)= 635572af6995Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 635672af6995Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 635772af6995Smrg 635872af6995Smrg# Source file extension for C++ test sources. 635972af6995Smrgac_ext=cpp 636072af6995Smrg 636172af6995Smrg# Object file extension for compiled C++ test sources. 636272af6995Smrgobjext=o 636372af6995Smrg_LT_TAGVAR(objext, $1)=$objext 636472af6995Smrg 636572af6995Smrg# No sense in running all these tests if we already determined that 636672af6995Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 636772af6995Smrg# are currently assumed to apply to all compilers on this platform, 636872af6995Smrg# and will be corrupted by setting them based on a non-working compiler. 636972af6995Smrgif test yes != "$_lt_caught_CXX_error"; then 637072af6995Smrg # Code to be used in simple compile tests 637172af6995Smrg lt_simple_compile_test_code="int some_variable = 0;" 637272af6995Smrg 637372af6995Smrg # Code to be used in simple link tests 637472af6995Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 637572af6995Smrg 637672af6995Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 637772af6995Smrg _LT_TAG_COMPILER 637872af6995Smrg 637972af6995Smrg # save warnings/boilerplate of simple test code 638072af6995Smrg _LT_COMPILER_BOILERPLATE 638172af6995Smrg _LT_LINKER_BOILERPLATE 638272af6995Smrg 638372af6995Smrg # Allow CC to be a program name with arguments. 638472af6995Smrg lt_save_CC=$CC 638572af6995Smrg lt_save_CFLAGS=$CFLAGS 638672af6995Smrg lt_save_LD=$LD 638772af6995Smrg lt_save_GCC=$GCC 638872af6995Smrg GCC=$GXX 638972af6995Smrg lt_save_with_gnu_ld=$with_gnu_ld 639072af6995Smrg lt_save_path_LD=$lt_cv_path_LD 639172af6995Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 639272af6995Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 639372af6995Smrg else 639472af6995Smrg $as_unset lt_cv_prog_gnu_ld 639572af6995Smrg fi 639672af6995Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 639772af6995Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 639872af6995Smrg else 639972af6995Smrg $as_unset lt_cv_path_LD 640072af6995Smrg fi 640172af6995Smrg test -z "${LDCXX+set}" || LD=$LDCXX 640272af6995Smrg CC=${CXX-"c++"} 640372af6995Smrg CFLAGS=$CXXFLAGS 640472af6995Smrg compiler=$CC 640572af6995Smrg _LT_TAGVAR(compiler, $1)=$CC 640672af6995Smrg _LT_CC_BASENAME([$compiler]) 640772af6995Smrg 640872af6995Smrg if test -n "$compiler"; then 640972af6995Smrg # We don't want -fno-exception when compiling C++ code, so set the 641072af6995Smrg # no_builtin_flag separately 641172af6995Smrg if test yes = "$GXX"; then 641272af6995Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 641372af6995Smrg else 641472af6995Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 641572af6995Smrg fi 641672af6995Smrg 641772af6995Smrg if test yes = "$GXX"; then 641872af6995Smrg # Set up default GNU C++ configuration 641972af6995Smrg 642072af6995Smrg LT_PATH_LD 642172af6995Smrg 642272af6995Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 642372af6995Smrg # archiving commands below assume that GNU ld is being used. 642472af6995Smrg if test yes = "$with_gnu_ld"; then 642572af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 642672af6995Smrg _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' 642772af6995Smrg 642872af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 642972af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 643072af6995Smrg 643172af6995Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 643272af6995Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 643372af6995Smrg # investigate it a little bit more. (MM) 643472af6995Smrg wlarc='$wl' 643572af6995Smrg 643672af6995Smrg # ancient GNU ld didn't support --whole-archive et. al. 643772af6995Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 643872af6995Smrg $GREP 'no-whole-archive' > /dev/null; then 643972af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 644072af6995Smrg else 644172af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 644272af6995Smrg fi 644372af6995Smrg else 644472af6995Smrg with_gnu_ld=no 644572af6995Smrg wlarc= 644672af6995Smrg 644772af6995Smrg # A generic and very simple default shared library creation 644872af6995Smrg # command for GNU C++ for the case where it uses the native 644972af6995Smrg # linker, instead of GNU ld. If possible, this setting should 645072af6995Smrg # overridden to take advantage of the native linker features on 645172af6995Smrg # the platform it is being used on. 645272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 645372af6995Smrg fi 645472af6995Smrg 645572af6995Smrg # Commands to make compiler produce verbose output that lists 645672af6995Smrg # what "hidden" libraries, object files and flags are used when 645772af6995Smrg # linking a shared library. 6458362b94d5Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 645972af6995Smrg 646072af6995Smrg else 646172af6995Smrg GXX=no 646272af6995Smrg with_gnu_ld=no 646372af6995Smrg wlarc= 646472af6995Smrg fi 646572af6995Smrg 646672af6995Smrg # PORTME: fill in a description of your system's C++ link characteristics 646772af6995Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 646872af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 646972af6995Smrg case $host_os in 647072af6995Smrg aix3*) 647172af6995Smrg # FIXME: insert proper C++ library support 647272af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 647372af6995Smrg ;; 647472af6995Smrg aix[[4-9]]*) 647572af6995Smrg if test ia64 = "$host_cpu"; then 647672af6995Smrg # On IA64, the linker does run time linking by default, so we don't 647772af6995Smrg # have to do anything special. 647872af6995Smrg aix_use_runtimelinking=no 647972af6995Smrg exp_sym_flag='-Bexport' 648072af6995Smrg no_entry_flag= 648172af6995Smrg else 648272af6995Smrg aix_use_runtimelinking=no 648372af6995Smrg 648472af6995Smrg # Test if we are trying to use run time linking or normal 648572af6995Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 648672af6995Smrg # have runtime linking enabled, and use it for executables. 648772af6995Smrg # For shared libraries, we enable/disable runtime linking 648872af6995Smrg # depending on the kind of the shared library created - 648972af6995Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 649072af6995Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 649172af6995Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 649272af6995Smrg # lib.a static archive 649372af6995Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 649472af6995Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 649572af6995Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 649672af6995Smrg # lib.a(lib.so.V) shared, rtl:no 649772af6995Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 649872af6995Smrg # lib.a static archive 649972af6995Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 650072af6995Smrg for ld_flag in $LDFLAGS; do 650172af6995Smrg case $ld_flag in 650272af6995Smrg *-brtl*) 650372af6995Smrg aix_use_runtimelinking=yes 650472af6995Smrg break 650572af6995Smrg ;; 650672af6995Smrg esac 650772af6995Smrg done 650872af6995Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 650972af6995Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 651072af6995Smrg # so we don't have lib.a shared libs to link our executables. 651172af6995Smrg # We have to force runtime linking in this case. 651272af6995Smrg aix_use_runtimelinking=yes 651372af6995Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 651472af6995Smrg fi 651572af6995Smrg ;; 651672af6995Smrg esac 651772af6995Smrg 651872af6995Smrg exp_sym_flag='-bexport' 651972af6995Smrg no_entry_flag='-bnoentry' 652072af6995Smrg fi 652172af6995Smrg 652272af6995Smrg # When large executables or shared objects are built, AIX ld can 652372af6995Smrg # have problems creating the table of contents. If linking a library 652472af6995Smrg # or program results in "error TOC overflow" add -mminimal-toc to 652572af6995Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 652672af6995Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 652772af6995Smrg 652872af6995Smrg _LT_TAGVAR(archive_cmds, $1)='' 652972af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 653072af6995Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 653172af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 653272af6995Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 653372af6995Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 653472af6995Smrg case $with_aix_soname,$aix_use_runtimelinking in 653572af6995Smrg aix,*) ;; # no import file 653672af6995Smrg svr4,* | *,yes) # use import file 653772af6995Smrg # The Import File defines what to hardcode. 653872af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=no 653972af6995Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 654072af6995Smrg ;; 654172af6995Smrg esac 654272af6995Smrg 654372af6995Smrg if test yes = "$GXX"; then 654472af6995Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 654572af6995Smrg # We only want to do this on AIX 4.2 and lower, the check 654672af6995Smrg # below for broken collect2 doesn't work under 4.3+ 654772af6995Smrg collect2name=`$CC -print-prog-name=collect2` 654872af6995Smrg if test -f "$collect2name" && 654972af6995Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 655072af6995Smrg then 655172af6995Smrg # We have reworked collect2 655272af6995Smrg : 655372af6995Smrg else 655472af6995Smrg # We have old collect2 655572af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 655672af6995Smrg # It fails to find uninstalled libraries when the uninstalled 655772af6995Smrg # path is not listed in the libpath. Setting hardcode_minus_L 655872af6995Smrg # to unsupported forces relinking 655972af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 656072af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 656172af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 656272af6995Smrg fi 656372af6995Smrg esac 656472af6995Smrg shared_flag='-shared' 656572af6995Smrg if test yes = "$aix_use_runtimelinking"; then 656672af6995Smrg shared_flag=$shared_flag' $wl-G' 656772af6995Smrg fi 656872af6995Smrg # Need to ensure runtime linking is disabled for the traditional 656972af6995Smrg # shared library, or the linker may eventually find shared libraries 657072af6995Smrg # /with/ Import File - we do not want to mix them. 657172af6995Smrg shared_flag_aix='-shared' 657272af6995Smrg shared_flag_svr4='-shared $wl-G' 657372af6995Smrg else 657472af6995Smrg # not using gcc 657572af6995Smrg if test ia64 = "$host_cpu"; then 657672af6995Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 657772af6995Smrg # chokes on -Wl,-G. The following line is correct: 657872af6995Smrg shared_flag='-G' 657972af6995Smrg else 658072af6995Smrg if test yes = "$aix_use_runtimelinking"; then 658172af6995Smrg shared_flag='$wl-G' 658272af6995Smrg else 658372af6995Smrg shared_flag='$wl-bM:SRE' 658472af6995Smrg fi 658572af6995Smrg shared_flag_aix='$wl-bM:SRE' 658672af6995Smrg shared_flag_svr4='$wl-G' 658772af6995Smrg fi 658872af6995Smrg fi 658972af6995Smrg 659072af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 659172af6995Smrg # It seems that -bexpall does not export symbols beginning with 659272af6995Smrg # underscore (_), so it is better to generate a list of symbols to 659372af6995Smrg # export. 659472af6995Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 659572af6995Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 659672af6995Smrg # Warning - without using the other runtime loading flags (-brtl), 659772af6995Smrg # -berok will link without error, but may produce a broken library. 659872af6995Smrg # The "-G" linker flag allows undefined symbols. 659972af6995Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 660072af6995Smrg # Determine the default libpath from the value encoded in an empty 660172af6995Smrg # executable. 660272af6995Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 660372af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 660472af6995Smrg 660572af6995Smrg _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 660672af6995Smrg else 660772af6995Smrg if test ia64 = "$host_cpu"; then 660872af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 660972af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 661072af6995Smrg _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" 661172af6995Smrg else 661272af6995Smrg # Determine the default libpath from the value encoded in an 661372af6995Smrg # empty executable. 661472af6995Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 661572af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 661672af6995Smrg # Warning - without using the other run time loading flags, 661772af6995Smrg # -berok will link without error, but may produce a broken library. 661872af6995Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 661972af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 662072af6995Smrg if test yes = "$with_gnu_ld"; then 662172af6995Smrg # We only use this code for GNU lds that support --whole-archive. 662272af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 662372af6995Smrg else 662472af6995Smrg # Exported symbols can be pulled into shared objects from archives 662572af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 662672af6995Smrg fi 662772af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 662872af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 662972af6995Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 663072af6995Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 663172af6995Smrg if test svr4 != "$with_aix_soname"; then 663272af6995Smrg # This is similar to how AIX traditionally builds its shared 663372af6995Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 663472af6995Smrg _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' 663572af6995Smrg fi 663672af6995Smrg if test aix != "$with_aix_soname"; then 663772af6995Smrg _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' 663872af6995Smrg else 663972af6995Smrg # used by -dlpreopen to get the symbols 664072af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 664172af6995Smrg fi 664272af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 664372af6995Smrg fi 664472af6995Smrg fi 664572af6995Smrg ;; 664672af6995Smrg 664772af6995Smrg beos*) 664872af6995Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 664972af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 665072af6995Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 665172af6995Smrg # support --undefined. This deserves some investigation. FIXME 665272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 665372af6995Smrg else 665472af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 665572af6995Smrg fi 665672af6995Smrg ;; 665772af6995Smrg 665872af6995Smrg chorus*) 665972af6995Smrg case $cc_basename in 666072af6995Smrg *) 666172af6995Smrg # FIXME: insert proper C++ library support 666272af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 666372af6995Smrg ;; 666472af6995Smrg esac 666572af6995Smrg ;; 666672af6995Smrg 666772af6995Smrg cygwin* | mingw* | pw32* | cegcc*) 666872af6995Smrg case $GXX,$cc_basename in 6669a773ec55Smrg ,cl* | no,cl* | ,icl* | no,icl*) 6670a773ec55Smrg # Native MSVC or ICC 667172af6995Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 667272af6995Smrg # no search path for DLLs. 667372af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 667472af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 667572af6995Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 667672af6995Smrg _LT_TAGVAR(file_list_spec, $1)='@' 667772af6995Smrg # Tell ltmain to make .lib files, not .a files. 667872af6995Smrg libext=lib 667972af6995Smrg # Tell ltmain to make .dll files, not .so files. 668072af6995Smrg shrext_cmds=.dll 668172af6995Smrg # FIXME: Setting linknames here is a bad hack. 668272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 668372af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 668472af6995Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 668572af6995Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 668672af6995Smrg else 668772af6995Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 668872af6995Smrg fi~ 668972af6995Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 669072af6995Smrg linknames=' 669172af6995Smrg # The linker will not automatically build a static lib if we build a DLL. 669272af6995Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 669372af6995Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 669472af6995Smrg # Don't use ranlib 669572af6995Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 669672af6995Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 669772af6995Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 669872af6995Smrg case $lt_outputfile in 669972af6995Smrg *.exe|*.EXE) ;; 670072af6995Smrg *) 670172af6995Smrg lt_outputfile=$lt_outputfile.exe 670272af6995Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 670372af6995Smrg ;; 670472af6995Smrg esac~ 670572af6995Smrg func_to_tool_file "$lt_outputfile"~ 670672af6995Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 670772af6995Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 670872af6995Smrg $RM "$lt_outputfile.manifest"; 670972af6995Smrg fi' 671072af6995Smrg ;; 671172af6995Smrg *) 671272af6995Smrg # g++ 671372af6995Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 671472af6995Smrg # as there is no search path for DLLs. 671572af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 671672af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 671772af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 671872af6995Smrg _LT_TAGVAR(always_export_symbols, $1)=no 671972af6995Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 672072af6995Smrg 672172af6995Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 672272af6995Smrg _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' 672372af6995Smrg # If the export-symbols file already is a .def file, use it as 672472af6995Smrg # is; otherwise, prepend EXPORTS... 672572af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 672672af6995Smrg cp $export_symbols $output_objdir/$soname.def; 672772af6995Smrg else 672872af6995Smrg echo EXPORTS > $output_objdir/$soname.def; 672972af6995Smrg cat $export_symbols >> $output_objdir/$soname.def; 673072af6995Smrg fi~ 673172af6995Smrg $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' 673272af6995Smrg else 673372af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 673472af6995Smrg fi 673572af6995Smrg ;; 673672af6995Smrg esac 673772af6995Smrg ;; 673872af6995Smrg darwin* | rhapsody*) 673972af6995Smrg _LT_DARWIN_LINKER_FEATURES($1) 674072af6995Smrg ;; 674172af6995Smrg 674272af6995Smrg os2*) 674372af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 674472af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 674572af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 674672af6995Smrg shrext_cmds=.dll 674772af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 674872af6995Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 674972af6995Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 675072af6995Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 675172af6995Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 675272af6995Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 675372af6995Smrg emximp -o $lib $output_objdir/$libname.def' 675472af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 675572af6995Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 675672af6995Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 675772af6995Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 675872af6995Smrg prefix_cmds="$SED"~ 675972af6995Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 676072af6995Smrg prefix_cmds="$prefix_cmds -e 1d"; 676172af6995Smrg fi~ 676272af6995Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 676372af6995Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 676472af6995Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 676572af6995Smrg emximp -o $lib $output_objdir/$libname.def' 676672af6995Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 676772af6995Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6768a773ec55Smrg _LT_TAGVAR(file_list_spec, $1)='@' 676972af6995Smrg ;; 677072af6995Smrg 677172af6995Smrg dgux*) 677272af6995Smrg case $cc_basename in 677372af6995Smrg ec++*) 677472af6995Smrg # FIXME: insert proper C++ library support 677572af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 677672af6995Smrg ;; 677772af6995Smrg ghcx*) 677872af6995Smrg # Green Hills C++ Compiler 677972af6995Smrg # FIXME: insert proper C++ library support 678072af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 678172af6995Smrg ;; 678272af6995Smrg *) 678372af6995Smrg # FIXME: insert proper C++ library support 678472af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 678572af6995Smrg ;; 678672af6995Smrg esac 678772af6995Smrg ;; 678872af6995Smrg 678972af6995Smrg freebsd2.*) 679072af6995Smrg # C++ shared libraries reported to be fairly broken before 679172af6995Smrg # switch to ELF 679272af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 679372af6995Smrg ;; 679472af6995Smrg 679572af6995Smrg freebsd-elf*) 679672af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 679772af6995Smrg ;; 679872af6995Smrg 6799a773ec55Smrg freebsd* | dragonfly* | midnightbsd*) 680072af6995Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 680172af6995Smrg # conventions 680272af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 680372af6995Smrg ;; 680472af6995Smrg 680572af6995Smrg haiku*) 680672af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 680772af6995Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 680872af6995Smrg ;; 680972af6995Smrg 681072af6995Smrg hpux9*) 681172af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 681272af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 681372af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 681472af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 681572af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 681672af6995Smrg # but as the default 681772af6995Smrg # location of the library. 681872af6995Smrg 681972af6995Smrg case $cc_basename in 682072af6995Smrg CC*) 682172af6995Smrg # FIXME: insert proper C++ library support 682272af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 682372af6995Smrg ;; 682472af6995Smrg aCC*) 682572af6995Smrg _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' 682672af6995Smrg # Commands to make compiler produce verbose output that lists 682772af6995Smrg # what "hidden" libraries, object files and flags are used when 682872af6995Smrg # linking a shared library. 682972af6995Smrg # 683072af6995Smrg # There doesn't appear to be a way to prevent this compiler from 683172af6995Smrg # explicitly linking system object files so we need to strip them 683272af6995Smrg # from the output so that they don't get included in the library 683372af6995Smrg # dependencies. 6834362b94d5Smrg 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"' 683572af6995Smrg ;; 683672af6995Smrg *) 683772af6995Smrg if test yes = "$GXX"; then 683872af6995Smrg _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' 683972af6995Smrg else 684072af6995Smrg # FIXME: insert proper C++ library support 684172af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 684272af6995Smrg fi 684372af6995Smrg ;; 684472af6995Smrg esac 684572af6995Smrg ;; 684672af6995Smrg 684772af6995Smrg hpux10*|hpux11*) 684872af6995Smrg if test no = "$with_gnu_ld"; then 684972af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 685072af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 685172af6995Smrg 685272af6995Smrg case $host_cpu in 685372af6995Smrg hppa*64*|ia64*) 685472af6995Smrg ;; 685572af6995Smrg *) 685672af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 685772af6995Smrg ;; 685872af6995Smrg esac 685972af6995Smrg fi 686072af6995Smrg case $host_cpu in 686172af6995Smrg hppa*64*|ia64*) 686272af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=no 686372af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 686472af6995Smrg ;; 686572af6995Smrg *) 686672af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 686772af6995Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 686872af6995Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 686972af6995Smrg # but as the default 687072af6995Smrg # location of the library. 687172af6995Smrg ;; 687272af6995Smrg esac 687372af6995Smrg 687472af6995Smrg case $cc_basename in 687572af6995Smrg CC*) 687672af6995Smrg # FIXME: insert proper C++ library support 687772af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 687872af6995Smrg ;; 687972af6995Smrg aCC*) 688072af6995Smrg case $host_cpu in 688172af6995Smrg hppa*64*) 688272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 688372af6995Smrg ;; 688472af6995Smrg ia64*) 688572af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 688672af6995Smrg ;; 688772af6995Smrg *) 688872af6995Smrg _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' 688972af6995Smrg ;; 689072af6995Smrg esac 689172af6995Smrg # Commands to make compiler produce verbose output that lists 689272af6995Smrg # what "hidden" libraries, object files and flags are used when 689372af6995Smrg # linking a shared library. 689472af6995Smrg # 689572af6995Smrg # There doesn't appear to be a way to prevent this compiler from 689672af6995Smrg # explicitly linking system object files so we need to strip them 689772af6995Smrg # from the output so that they don't get included in the library 689872af6995Smrg # dependencies. 6899362b94d5Smrg 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"' 690072af6995Smrg ;; 690172af6995Smrg *) 690272af6995Smrg if test yes = "$GXX"; then 690372af6995Smrg if test no = "$with_gnu_ld"; then 690472af6995Smrg case $host_cpu in 690572af6995Smrg hppa*64*) 690672af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 690772af6995Smrg ;; 690872af6995Smrg ia64*) 690972af6995Smrg _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' 691072af6995Smrg ;; 691172af6995Smrg *) 691272af6995Smrg _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' 691372af6995Smrg ;; 691472af6995Smrg esac 691572af6995Smrg fi 691672af6995Smrg else 691772af6995Smrg # FIXME: insert proper C++ library support 691872af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 691972af6995Smrg fi 692072af6995Smrg ;; 692172af6995Smrg esac 692272af6995Smrg ;; 692372af6995Smrg 692472af6995Smrg interix[[3-9]]*) 692572af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=no 692672af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 692772af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 692872af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 692972af6995Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 693072af6995Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 693172af6995Smrg # default) and relocated if they conflict, which is a slow very memory 693272af6995Smrg # consuming and fragmenting process. To avoid this, we pick a random, 693372af6995Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 693472af6995Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 693572af6995Smrg _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' 6936a773ec55Smrg _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' 693772af6995Smrg ;; 693872af6995Smrg irix5* | irix6*) 693972af6995Smrg case $cc_basename in 694072af6995Smrg CC*) 694172af6995Smrg # SGI C++ 694272af6995Smrg _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' 694372af6995Smrg 694472af6995Smrg # Archives containing C++ object files must be created using 694572af6995Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 694672af6995Smrg # necessary to make sure instantiated templates are included 694772af6995Smrg # in the archive. 694872af6995Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 694972af6995Smrg ;; 695072af6995Smrg *) 695172af6995Smrg if test yes = "$GXX"; then 695272af6995Smrg if test no = "$with_gnu_ld"; then 695372af6995Smrg _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' 695472af6995Smrg else 695572af6995Smrg _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' 695672af6995Smrg fi 695772af6995Smrg fi 695872af6995Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 695972af6995Smrg ;; 696072af6995Smrg esac 696172af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 696272af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 696372af6995Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 696472af6995Smrg ;; 696572af6995Smrg 696672af6995Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 696772af6995Smrg case $cc_basename in 696872af6995Smrg KCC*) 696972af6995Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 697072af6995Smrg 697172af6995Smrg # KCC will only create a shared library if the output file 697272af6995Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 697372af6995Smrg # to its proper name (with version) after linking. 697472af6995Smrg _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' 697572af6995Smrg _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' 697672af6995Smrg # Commands to make compiler produce verbose output that lists 697772af6995Smrg # what "hidden" libraries, object files and flags are used when 697872af6995Smrg # linking a shared library. 697972af6995Smrg # 698072af6995Smrg # There doesn't appear to be a way to prevent this compiler from 698172af6995Smrg # explicitly linking system object files so we need to strip them 698272af6995Smrg # from the output so that they don't get included in the library 698372af6995Smrg # dependencies. 698472af6995Smrg 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"' 698572af6995Smrg 698672af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 698772af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 698872af6995Smrg 698972af6995Smrg # Archives containing C++ object files must be created using 699072af6995Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 699172af6995Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 699272af6995Smrg ;; 699372af6995Smrg icpc* | ecpc* ) 699472af6995Smrg # Intel C++ 699572af6995Smrg with_gnu_ld=yes 699672af6995Smrg # version 8.0 and above of icpc choke on multiply defined symbols 699772af6995Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 699872af6995Smrg # earlier do not add the objects themselves. 699972af6995Smrg case `$CC -V 2>&1` in 700072af6995Smrg *"Version 7."*) 700172af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 700272af6995Smrg _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' 700372af6995Smrg ;; 700472af6995Smrg *) # Version 8.0 or newer 700572af6995Smrg tmp_idyn= 700672af6995Smrg case $host_cpu in 700772af6995Smrg ia64*) tmp_idyn=' -i_dynamic';; 700872af6995Smrg esac 700972af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 701072af6995Smrg _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' 701172af6995Smrg ;; 701272af6995Smrg esac 701372af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 701472af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 701572af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 701672af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 701772af6995Smrg ;; 701872af6995Smrg pgCC* | pgcpp*) 701972af6995Smrg # Portland Group C++ compiler 702072af6995Smrg case `$CC -V` in 702172af6995Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 702272af6995Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 702372af6995Smrg rm -rf $tpldir~ 702472af6995Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 702572af6995Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 702672af6995Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 702772af6995Smrg rm -rf $tpldir~ 702872af6995Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 702972af6995Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 703072af6995Smrg $RANLIB $oldlib' 703172af6995Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 703272af6995Smrg rm -rf $tpldir~ 703372af6995Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 703472af6995Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 703572af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 703672af6995Smrg rm -rf $tpldir~ 703772af6995Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 703872af6995Smrg $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' 703972af6995Smrg ;; 704072af6995Smrg *) # Version 6 and above use weak symbols 704172af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 704272af6995Smrg _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' 704372af6995Smrg ;; 704472af6995Smrg esac 704572af6995Smrg 704672af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 704772af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 704872af6995Smrg _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' 704972af6995Smrg ;; 705072af6995Smrg cxx*) 705172af6995Smrg # Compaq C++ 705272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 705372af6995Smrg _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' 705472af6995Smrg 705572af6995Smrg runpath_var=LD_RUN_PATH 705672af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 705772af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 705872af6995Smrg 705972af6995Smrg # Commands to make compiler produce verbose output that lists 706072af6995Smrg # what "hidden" libraries, object files and flags are used when 706172af6995Smrg # linking a shared library. 706272af6995Smrg # 706372af6995Smrg # There doesn't appear to be a way to prevent this compiler from 706472af6995Smrg # explicitly linking system object files so we need to strip them 706572af6995Smrg # from the output so that they don't get included in the library 706672af6995Smrg # dependencies. 706772af6995Smrg 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' 706872af6995Smrg ;; 706972af6995Smrg xl* | mpixl* | bgxl*) 707072af6995Smrg # IBM XL 8.0 on PPC, with GNU ld 707172af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 707272af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 707372af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 707472af6995Smrg if test yes = "$supports_anon_versioning"; then 707572af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7076a773ec55Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 707772af6995Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 707872af6995Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 707972af6995Smrg fi 708072af6995Smrg ;; 708172af6995Smrg *) 7082a773ec55Smrg case `$CC -V 2>&1 | $SED 5q` in 708372af6995Smrg *Sun\ C*) 708472af6995Smrg # Sun C++ 5.9 708572af6995Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 708672af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 708772af6995Smrg _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' 708872af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 708972af6995Smrg _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' 709072af6995Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 709172af6995Smrg 709272af6995Smrg # Not sure whether something based on 709372af6995Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 709472af6995Smrg # would be better. 709572af6995Smrg output_verbose_link_cmd='func_echo_all' 709672af6995Smrg 709772af6995Smrg # Archives containing C++ object files must be created using 709872af6995Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 709972af6995Smrg # necessary to make sure instantiated templates are included 710072af6995Smrg # in the archive. 710172af6995Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 710272af6995Smrg ;; 710372af6995Smrg esac 710472af6995Smrg ;; 710572af6995Smrg esac 710672af6995Smrg ;; 710772af6995Smrg 710872af6995Smrg lynxos*) 710972af6995Smrg # FIXME: insert proper C++ library support 711072af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 711172af6995Smrg ;; 711272af6995Smrg 711372af6995Smrg m88k*) 711472af6995Smrg # FIXME: insert proper C++ library support 711572af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 711672af6995Smrg ;; 711772af6995Smrg 711872af6995Smrg mvs*) 711972af6995Smrg case $cc_basename in 712072af6995Smrg cxx*) 712172af6995Smrg # FIXME: insert proper C++ library support 712272af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 712372af6995Smrg ;; 712472af6995Smrg *) 712572af6995Smrg # FIXME: insert proper C++ library support 712672af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 712772af6995Smrg ;; 712872af6995Smrg esac 712972af6995Smrg ;; 713072af6995Smrg 713172af6995Smrg netbsd*) 713272af6995Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 713372af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 713472af6995Smrg wlarc= 713572af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 713672af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 713772af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 713872af6995Smrg fi 713972af6995Smrg # Workaround some broken pre-1.5 toolchains 714072af6995Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 714172af6995Smrg ;; 714272af6995Smrg 714372af6995Smrg *nto* | *qnx*) 714472af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 714572af6995Smrg ;; 714672af6995Smrg 714772af6995Smrg openbsd* | bitrig*) 714872af6995Smrg if test -f /usr/libexec/ld.so; then 714972af6995Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 715072af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 715172af6995Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 715272af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 715372af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 715472af6995Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 715572af6995Smrg _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' 715672af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 715772af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 715872af6995Smrg fi 715972af6995Smrg output_verbose_link_cmd=func_echo_all 716072af6995Smrg else 716172af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 716272af6995Smrg fi 716372af6995Smrg ;; 716472af6995Smrg 716572af6995Smrg osf3* | osf4* | osf5*) 716672af6995Smrg case $cc_basename in 716772af6995Smrg KCC*) 716872af6995Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 716972af6995Smrg 717072af6995Smrg # KCC will only create a shared library if the output file 717172af6995Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 717272af6995Smrg # to its proper name (with version) after linking. 717372af6995Smrg _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' 717472af6995Smrg 717572af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 717672af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 717772af6995Smrg 717872af6995Smrg # Archives containing C++ object files must be created using 717972af6995Smrg # the KAI C++ compiler. 718072af6995Smrg case $host in 718172af6995Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 718272af6995Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 718372af6995Smrg esac 718472af6995Smrg ;; 718572af6995Smrg RCC*) 718672af6995Smrg # Rational C++ 2.4.1 718772af6995Smrg # FIXME: insert proper C++ library support 718872af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 718972af6995Smrg ;; 719072af6995Smrg cxx*) 719172af6995Smrg case $host in 719272af6995Smrg osf3*) 719372af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 719472af6995Smrg _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' 719572af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 719672af6995Smrg ;; 719772af6995Smrg *) 719872af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 719972af6995Smrg _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' 720072af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 720172af6995Smrg echo "-hidden">> $lib.exp~ 720272af6995Smrg $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~ 720372af6995Smrg $RM $lib.exp' 720472af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 720572af6995Smrg ;; 720672af6995Smrg esac 720772af6995Smrg 720872af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 720972af6995Smrg 721072af6995Smrg # Commands to make compiler produce verbose output that lists 721172af6995Smrg # what "hidden" libraries, object files and flags are used when 721272af6995Smrg # linking a shared library. 721372af6995Smrg # 721472af6995Smrg # There doesn't appear to be a way to prevent this compiler from 721572af6995Smrg # explicitly linking system object files so we need to strip them 721672af6995Smrg # from the output so that they don't get included in the library 721772af6995Smrg # dependencies. 721872af6995Smrg 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"' 721972af6995Smrg ;; 722072af6995Smrg *) 722172af6995Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 722272af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 722372af6995Smrg case $host in 722472af6995Smrg osf3*) 722572af6995Smrg _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' 722672af6995Smrg ;; 722772af6995Smrg *) 722872af6995Smrg _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' 722972af6995Smrg ;; 723072af6995Smrg esac 723172af6995Smrg 723272af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 723372af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 723472af6995Smrg 723572af6995Smrg # Commands to make compiler produce verbose output that lists 723672af6995Smrg # what "hidden" libraries, object files and flags are used when 723772af6995Smrg # linking a shared library. 7238362b94d5Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 723972af6995Smrg 724072af6995Smrg else 724172af6995Smrg # FIXME: insert proper C++ library support 724272af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 724372af6995Smrg fi 724472af6995Smrg ;; 724572af6995Smrg esac 724672af6995Smrg ;; 724772af6995Smrg 724872af6995Smrg psos*) 724972af6995Smrg # FIXME: insert proper C++ library support 725072af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 725172af6995Smrg ;; 725272af6995Smrg 725372af6995Smrg sunos4*) 725472af6995Smrg case $cc_basename in 725572af6995Smrg CC*) 725672af6995Smrg # Sun C++ 4.x 725772af6995Smrg # FIXME: insert proper C++ library support 725872af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 725972af6995Smrg ;; 726072af6995Smrg lcc*) 726172af6995Smrg # Lucid 726272af6995Smrg # FIXME: insert proper C++ library support 726372af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 726472af6995Smrg ;; 726572af6995Smrg *) 726672af6995Smrg # FIXME: insert proper C++ library support 726772af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 726872af6995Smrg ;; 726972af6995Smrg esac 727072af6995Smrg ;; 727172af6995Smrg 727272af6995Smrg solaris*) 727372af6995Smrg case $cc_basename in 727472af6995Smrg CC* | sunCC*) 727572af6995Smrg # Sun C++ 4.2, 5.x and Centerline C++ 727672af6995Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 727772af6995Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 727872af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 727972af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 728072af6995Smrg $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' 728172af6995Smrg 728272af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 728372af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 728472af6995Smrg case $host_os in 728572af6995Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 728672af6995Smrg *) 728772af6995Smrg # The compiler driver will combine and reorder linker options, 728872af6995Smrg # but understands '-z linker_flag'. 728972af6995Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 729072af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 729172af6995Smrg ;; 729272af6995Smrg esac 729372af6995Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 729472af6995Smrg 729572af6995Smrg output_verbose_link_cmd='func_echo_all' 729672af6995Smrg 729772af6995Smrg # Archives containing C++ object files must be created using 729872af6995Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 729972af6995Smrg # necessary to make sure instantiated templates are included 730072af6995Smrg # in the archive. 730172af6995Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 730272af6995Smrg ;; 730372af6995Smrg gcx*) 730472af6995Smrg # Green Hills C++ Compiler 730572af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 730672af6995Smrg 730772af6995Smrg # The C++ compiler must be used to create the archive. 730872af6995Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 730972af6995Smrg ;; 731072af6995Smrg *) 731172af6995Smrg # GNU C++ compiler with Solaris linker 731272af6995Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 731372af6995Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 731472af6995Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 731572af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 731672af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 731772af6995Smrg $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' 731872af6995Smrg 731972af6995Smrg # Commands to make compiler produce verbose output that lists 732072af6995Smrg # what "hidden" libraries, object files and flags are used when 732172af6995Smrg # linking a shared library. 7322362b94d5Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 732372af6995Smrg else 732472af6995Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 732572af6995Smrg # platform. 732672af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 732772af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 732872af6995Smrg $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' 732972af6995Smrg 733072af6995Smrg # Commands to make compiler produce verbose output that lists 733172af6995Smrg # what "hidden" libraries, object files and flags are used when 733272af6995Smrg # linking a shared library. 7333362b94d5Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 733472af6995Smrg fi 733572af6995Smrg 733672af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 733772af6995Smrg case $host_os in 733872af6995Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 733972af6995Smrg *) 734072af6995Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 734172af6995Smrg ;; 734272af6995Smrg esac 734372af6995Smrg fi 734472af6995Smrg ;; 734572af6995Smrg esac 734672af6995Smrg ;; 734772af6995Smrg 734872af6995Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 734972af6995Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 735072af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 735172af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 735272af6995Smrg runpath_var='LD_RUN_PATH' 735372af6995Smrg 735472af6995Smrg case $cc_basename in 735572af6995Smrg CC*) 735672af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 735772af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 735872af6995Smrg ;; 735972af6995Smrg *) 736072af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 736172af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 736272af6995Smrg ;; 736372af6995Smrg esac 736472af6995Smrg ;; 736572af6995Smrg 736672af6995Smrg sysv5* | sco3.2v5* | sco5v6*) 736772af6995Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 736872af6995Smrg # link with -lc, and that would cause any symbols used from libc to 736972af6995Smrg # always be unresolved, which means just about no library would 737072af6995Smrg # ever link correctly. If we're not using GNU ld we use -z text 737172af6995Smrg # though, which does catch some bad symbols but isn't as heavy-handed 737272af6995Smrg # as -z defs. 737372af6995Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 737472af6995Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 737572af6995Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 737672af6995Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 737772af6995Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 737872af6995Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 737972af6995Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 738072af6995Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 738172af6995Smrg runpath_var='LD_RUN_PATH' 738272af6995Smrg 738372af6995Smrg case $cc_basename in 738472af6995Smrg CC*) 738572af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 738672af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 738772af6995Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 738872af6995Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 738972af6995Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 739072af6995Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 739172af6995Smrg ;; 739272af6995Smrg *) 739372af6995Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 739472af6995Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 739572af6995Smrg ;; 739672af6995Smrg esac 739772af6995Smrg ;; 739872af6995Smrg 739972af6995Smrg tandem*) 740072af6995Smrg case $cc_basename in 740172af6995Smrg NCC*) 740272af6995Smrg # NonStop-UX NCC 3.20 740372af6995Smrg # FIXME: insert proper C++ library support 740472af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 740572af6995Smrg ;; 740672af6995Smrg *) 740772af6995Smrg # FIXME: insert proper C++ library support 740872af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 740972af6995Smrg ;; 741072af6995Smrg esac 741172af6995Smrg ;; 741272af6995Smrg 741372af6995Smrg vxworks*) 741472af6995Smrg # FIXME: insert proper C++ library support 741572af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 741672af6995Smrg ;; 741772af6995Smrg 741872af6995Smrg *) 741972af6995Smrg # FIXME: insert proper C++ library support 742072af6995Smrg _LT_TAGVAR(ld_shlibs, $1)=no 742172af6995Smrg ;; 742272af6995Smrg esac 742372af6995Smrg 742472af6995Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 742572af6995Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 742672af6995Smrg 742772af6995Smrg _LT_TAGVAR(GCC, $1)=$GXX 742872af6995Smrg _LT_TAGVAR(LD, $1)=$LD 742972af6995Smrg 743072af6995Smrg ## CAVEAT EMPTOR: 743172af6995Smrg ## There is no encapsulation within the following macros, do not change 743272af6995Smrg ## the running order or otherwise move them around unless you know exactly 743372af6995Smrg ## what you are doing... 743472af6995Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 743572af6995Smrg _LT_COMPILER_PIC($1) 743672af6995Smrg _LT_COMPILER_C_O($1) 743772af6995Smrg _LT_COMPILER_FILE_LOCKS($1) 743872af6995Smrg _LT_LINKER_SHLIBS($1) 743972af6995Smrg _LT_SYS_DYNAMIC_LINKER($1) 744072af6995Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 744172af6995Smrg 744272af6995Smrg _LT_CONFIG($1) 744372af6995Smrg fi # test -n "$compiler" 744472af6995Smrg 744572af6995Smrg CC=$lt_save_CC 744672af6995Smrg CFLAGS=$lt_save_CFLAGS 744772af6995Smrg LDCXX=$LD 744872af6995Smrg LD=$lt_save_LD 744972af6995Smrg GCC=$lt_save_GCC 745072af6995Smrg with_gnu_ld=$lt_save_with_gnu_ld 745172af6995Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 745272af6995Smrg lt_cv_path_LD=$lt_save_path_LD 745372af6995Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 745472af6995Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 745572af6995Smrgfi # test yes != "$_lt_caught_CXX_error" 745672af6995Smrg 745772af6995SmrgAC_LANG_POP 745872af6995Smrg])# _LT_LANG_CXX_CONFIG 745972af6995Smrg 746072af6995Smrg 746172af6995Smrg# _LT_FUNC_STRIPNAME_CNF 746272af6995Smrg# ---------------------- 746372af6995Smrg# func_stripname_cnf prefix suffix name 746472af6995Smrg# strip PREFIX and SUFFIX off of NAME. 746572af6995Smrg# PREFIX and SUFFIX must not contain globbing or regex special 746672af6995Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 746772af6995Smrg# dot (in which case that matches only a dot). 746872af6995Smrg# 746972af6995Smrg# This function is identical to the (non-XSI) version of func_stripname, 747072af6995Smrg# except this one can be used by m4 code that may be executed by configure, 747172af6995Smrg# rather than the libtool script. 747272af6995Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 747372af6995SmrgAC_REQUIRE([_LT_DECL_SED]) 747472af6995SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 747572af6995Smrgfunc_stripname_cnf () 747672af6995Smrg{ 747772af6995Smrg case @S|@2 in 747872af6995Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 747972af6995Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 748072af6995Smrg esac 748172af6995Smrg} # func_stripname_cnf 748272af6995Smrg])# _LT_FUNC_STRIPNAME_CNF 748372af6995Smrg 748472af6995Smrg 748572af6995Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 748672af6995Smrg# --------------------------------- 748772af6995Smrg# Figure out "hidden" library dependencies from verbose 748872af6995Smrg# compiler output when linking a shared library. 748972af6995Smrg# Parse the compiler output and extract the necessary 749072af6995Smrg# objects, libraries and library flags. 749172af6995Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 749272af6995Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 749372af6995SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 749472af6995Smrg# Dependencies to place before and after the object being linked: 749572af6995Smrg_LT_TAGVAR(predep_objects, $1)= 749672af6995Smrg_LT_TAGVAR(postdep_objects, $1)= 749772af6995Smrg_LT_TAGVAR(predeps, $1)= 749872af6995Smrg_LT_TAGVAR(postdeps, $1)= 749972af6995Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 750072af6995Smrg 750172af6995Smrgdnl we can't use the lt_simple_compile_test_code here, 750272af6995Smrgdnl because it contains code intended for an executable, 750372af6995Smrgdnl not a library. It's possible we should let each 750472af6995Smrgdnl tag define a new lt_????_link_test_code variable, 750572af6995Smrgdnl but it's only used here... 750672af6995Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 750772af6995Smrgint a; 750872af6995Smrgvoid foo (void) { a = 0; } 750972af6995Smrg_LT_EOF 751072af6995Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 751172af6995Smrgclass Foo 751272af6995Smrg{ 751372af6995Smrgpublic: 751472af6995Smrg Foo (void) { a = 0; } 751572af6995Smrgprivate: 751672af6995Smrg int a; 751772af6995Smrg}; 751872af6995Smrg_LT_EOF 751972af6995Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 752072af6995Smrg subroutine foo 752172af6995Smrg implicit none 752272af6995Smrg integer*4 a 752372af6995Smrg a=0 752472af6995Smrg return 752572af6995Smrg end 752672af6995Smrg_LT_EOF 752772af6995Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 752872af6995Smrg subroutine foo 752972af6995Smrg implicit none 753072af6995Smrg integer a 753172af6995Smrg a=0 753272af6995Smrg return 753372af6995Smrg end 753472af6995Smrg_LT_EOF 753572af6995Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 753672af6995Smrgpublic class foo { 753772af6995Smrg private int a; 753872af6995Smrg public void bar (void) { 753972af6995Smrg a = 0; 754072af6995Smrg } 754172af6995Smrg}; 754272af6995Smrg_LT_EOF 754372af6995Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 754472af6995Smrgpackage foo 754572af6995Smrgfunc foo() { 754672af6995Smrg} 754772af6995Smrg_LT_EOF 754872af6995Smrg]) 754972af6995Smrg 755072af6995Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 755172af6995Smrgcase "$CC $CFLAGS " in #( 755272af6995Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 755372af6995Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 755472af6995Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 755572af6995Smrgesac 755672af6995Smrg 755772af6995Smrgdnl Parse the compiler output and extract the necessary 755872af6995Smrgdnl objects, libraries and library flags. 755972af6995Smrgif AC_TRY_EVAL(ac_compile); then 756072af6995Smrg # Parse the compiler output and extract the necessary 756172af6995Smrg # objects, libraries and library flags. 756272af6995Smrg 756372af6995Smrg # Sentinel used to keep track of whether or not we are before 756472af6995Smrg # the conftest object file. 756572af6995Smrg pre_test_object_deps_done=no 756672af6995Smrg 756772af6995Smrg for p in `eval "$output_verbose_link_cmd"`; do 756872af6995Smrg case $prev$p in 756972af6995Smrg 757072af6995Smrg -L* | -R* | -l*) 757172af6995Smrg # Some compilers place space between "-{L,R}" and the path. 757272af6995Smrg # Remove the space. 757372af6995Smrg if test x-L = "$p" || 757472af6995Smrg test x-R = "$p"; then 757572af6995Smrg prev=$p 757672af6995Smrg continue 757772af6995Smrg fi 757872af6995Smrg 757972af6995Smrg # Expand the sysroot to ease extracting the directories later. 758072af6995Smrg if test -z "$prev"; then 758172af6995Smrg case $p in 758272af6995Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 758372af6995Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 758472af6995Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 758572af6995Smrg esac 758672af6995Smrg fi 758772af6995Smrg case $p in 758872af6995Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 758972af6995Smrg esac 759072af6995Smrg if test no = "$pre_test_object_deps_done"; then 759172af6995Smrg case $prev in 759272af6995Smrg -L | -R) 759372af6995Smrg # Internal compiler library paths should come after those 759472af6995Smrg # provided the user. The postdeps already come after the 759572af6995Smrg # user supplied libs so there is no need to process them. 759672af6995Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 759772af6995Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 759872af6995Smrg else 759972af6995Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 760072af6995Smrg fi 760172af6995Smrg ;; 760272af6995Smrg # The "-l" case would never come before the object being 760372af6995Smrg # linked, so don't bother handling this case. 760472af6995Smrg esac 760572af6995Smrg else 760672af6995Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 760772af6995Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 760872af6995Smrg else 760972af6995Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 761072af6995Smrg fi 761172af6995Smrg fi 761272af6995Smrg prev= 761372af6995Smrg ;; 761472af6995Smrg 761572af6995Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 761672af6995Smrg *.$objext) 761772af6995Smrg # This assumes that the test object file only shows up 761872af6995Smrg # once in the compiler output. 761972af6995Smrg if test "$p" = "conftest.$objext"; then 762072af6995Smrg pre_test_object_deps_done=yes 762172af6995Smrg continue 762272af6995Smrg fi 762372af6995Smrg 762472af6995Smrg if test no = "$pre_test_object_deps_done"; then 762572af6995Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 762672af6995Smrg _LT_TAGVAR(predep_objects, $1)=$p 762772af6995Smrg else 762872af6995Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 762972af6995Smrg fi 763072af6995Smrg else 763172af6995Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 763272af6995Smrg _LT_TAGVAR(postdep_objects, $1)=$p 763372af6995Smrg else 763472af6995Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 763572af6995Smrg fi 763672af6995Smrg fi 763772af6995Smrg ;; 763872af6995Smrg 763972af6995Smrg *) ;; # Ignore the rest. 764072af6995Smrg 764172af6995Smrg esac 764272af6995Smrg done 764372af6995Smrg 764472af6995Smrg # Clean up. 764572af6995Smrg rm -f a.out a.exe 764672af6995Smrgelse 764772af6995Smrg echo "libtool.m4: error: problem compiling $1 test program" 764872af6995Smrgfi 764972af6995Smrg 765072af6995Smrg$RM -f confest.$objext 765172af6995SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 765272af6995Smrg 765372af6995Smrg# PORTME: override above test on systems where it is broken 765472af6995Smrgm4_if([$1], [CXX], 765572af6995Smrg[case $host_os in 765672af6995Smrginterix[[3-9]]*) 765772af6995Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 765872af6995Smrg # hack all around it, let's just trust "g++" to DTRT. 765972af6995Smrg _LT_TAGVAR(predep_objects,$1)= 766072af6995Smrg _LT_TAGVAR(postdep_objects,$1)= 766172af6995Smrg _LT_TAGVAR(postdeps,$1)= 766272af6995Smrg ;; 766372af6995Smrgesac 766472af6995Smrg]) 766572af6995Smrg 766672af6995Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 766772af6995Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 766872af6995Smrgesac 766972af6995Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 767072af6995Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 767172af6995Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 767272af6995Smrgfi 767372af6995Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 767472af6995Smrg [The directories searched by this compiler when creating a shared library]) 767572af6995Smrg_LT_TAGDECL([], [predep_objects], [1], 767672af6995Smrg [Dependencies to place before and after the objects being linked to 767772af6995Smrg create a shared library]) 767872af6995Smrg_LT_TAGDECL([], [postdep_objects], [1]) 767972af6995Smrg_LT_TAGDECL([], [predeps], [1]) 768072af6995Smrg_LT_TAGDECL([], [postdeps], [1]) 768172af6995Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 768272af6995Smrg [The library search path used internally by the compiler when linking 768372af6995Smrg a shared library]) 768472af6995Smrg])# _LT_SYS_HIDDEN_LIBDEPS 768572af6995Smrg 768672af6995Smrg 768772af6995Smrg# _LT_LANG_F77_CONFIG([TAG]) 768872af6995Smrg# -------------------------- 768972af6995Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 769072af6995Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 769172af6995Smrg# to write the compiler configuration to 'libtool'. 769272af6995Smrgm4_defun([_LT_LANG_F77_CONFIG], 769372af6995Smrg[AC_LANG_PUSH(Fortran 77) 769472af6995Smrgif test -z "$F77" || test no = "$F77"; then 769572af6995Smrg _lt_disable_F77=yes 769672af6995Smrgfi 769772af6995Smrg 769872af6995Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 769972af6995Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 770072af6995Smrg_LT_TAGVAR(always_export_symbols, $1)=no 770172af6995Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 770272af6995Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 770372af6995Smrg_LT_TAGVAR(hardcode_direct, $1)=no 770472af6995Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 770572af6995Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 770672af6995Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 770772af6995Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 770872af6995Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 770972af6995Smrg_LT_TAGVAR(inherit_rpath, $1)=no 771072af6995Smrg_LT_TAGVAR(module_cmds, $1)= 771172af6995Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 771272af6995Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 771372af6995Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 771472af6995Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 771572af6995Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 771672af6995Smrg_LT_TAGVAR(no_undefined_flag, $1)= 771772af6995Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 771872af6995Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 771972af6995Smrg 772072af6995Smrg# Source file extension for f77 test sources. 772172af6995Smrgac_ext=f 772272af6995Smrg 772372af6995Smrg# Object file extension for compiled f77 test sources. 772472af6995Smrgobjext=o 772572af6995Smrg_LT_TAGVAR(objext, $1)=$objext 772672af6995Smrg 772772af6995Smrg# No sense in running all these tests if we already determined that 772872af6995Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 772972af6995Smrg# are currently assumed to apply to all compilers on this platform, 773072af6995Smrg# and will be corrupted by setting them based on a non-working compiler. 773172af6995Smrgif test yes != "$_lt_disable_F77"; then 773272af6995Smrg # Code to be used in simple compile tests 773372af6995Smrg lt_simple_compile_test_code="\ 773472af6995Smrg subroutine t 773572af6995Smrg return 773672af6995Smrg end 773772af6995Smrg" 773872af6995Smrg 773972af6995Smrg # Code to be used in simple link tests 774072af6995Smrg lt_simple_link_test_code="\ 774172af6995Smrg program t 774272af6995Smrg end 774372af6995Smrg" 774472af6995Smrg 774572af6995Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 774672af6995Smrg _LT_TAG_COMPILER 774772af6995Smrg 774872af6995Smrg # save warnings/boilerplate of simple test code 774972af6995Smrg _LT_COMPILER_BOILERPLATE 775072af6995Smrg _LT_LINKER_BOILERPLATE 775172af6995Smrg 775272af6995Smrg # Allow CC to be a program name with arguments. 775372af6995Smrg lt_save_CC=$CC 775472af6995Smrg lt_save_GCC=$GCC 775572af6995Smrg lt_save_CFLAGS=$CFLAGS 775672af6995Smrg CC=${F77-"f77"} 775772af6995Smrg CFLAGS=$FFLAGS 775872af6995Smrg compiler=$CC 775972af6995Smrg _LT_TAGVAR(compiler, $1)=$CC 776072af6995Smrg _LT_CC_BASENAME([$compiler]) 776172af6995Smrg GCC=$G77 776272af6995Smrg if test -n "$compiler"; then 776372af6995Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 776472af6995Smrg AC_MSG_RESULT([$can_build_shared]) 776572af6995Smrg 776672af6995Smrg AC_MSG_CHECKING([whether to build shared libraries]) 776772af6995Smrg test no = "$can_build_shared" && enable_shared=no 776872af6995Smrg 776972af6995Smrg # On AIX, shared libraries and static libraries use the same namespace, and 777072af6995Smrg # are all built from PIC. 777172af6995Smrg case $host_os in 777272af6995Smrg aix3*) 777372af6995Smrg test yes = "$enable_shared" && enable_static=no 777472af6995Smrg if test -n "$RANLIB"; then 777572af6995Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 777672af6995Smrg postinstall_cmds='$RANLIB $lib' 777772af6995Smrg fi 777872af6995Smrg ;; 777972af6995Smrg aix[[4-9]]*) 778072af6995Smrg if test ia64 != "$host_cpu"; then 778172af6995Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 778272af6995Smrg yes,aix,yes) ;; # shared object as lib.so file only 778372af6995Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 778472af6995Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 778572af6995Smrg esac 778672af6995Smrg fi 778772af6995Smrg ;; 778872af6995Smrg esac 778972af6995Smrg AC_MSG_RESULT([$enable_shared]) 779072af6995Smrg 779172af6995Smrg AC_MSG_CHECKING([whether to build static libraries]) 779272af6995Smrg # Make sure either enable_shared or enable_static is yes. 779372af6995Smrg test yes = "$enable_shared" || enable_static=yes 779472af6995Smrg AC_MSG_RESULT([$enable_static]) 779572af6995Smrg 779672af6995Smrg _LT_TAGVAR(GCC, $1)=$G77 779772af6995Smrg _LT_TAGVAR(LD, $1)=$LD 779872af6995Smrg 779972af6995Smrg ## CAVEAT EMPTOR: 780072af6995Smrg ## There is no encapsulation within the following macros, do not change 780172af6995Smrg ## the running order or otherwise move them around unless you know exactly 780272af6995Smrg ## what you are doing... 780372af6995Smrg _LT_COMPILER_PIC($1) 780472af6995Smrg _LT_COMPILER_C_O($1) 780572af6995Smrg _LT_COMPILER_FILE_LOCKS($1) 780672af6995Smrg _LT_LINKER_SHLIBS($1) 780772af6995Smrg _LT_SYS_DYNAMIC_LINKER($1) 780872af6995Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 780972af6995Smrg 781072af6995Smrg _LT_CONFIG($1) 781172af6995Smrg fi # test -n "$compiler" 781272af6995Smrg 781372af6995Smrg GCC=$lt_save_GCC 781472af6995Smrg CC=$lt_save_CC 781572af6995Smrg CFLAGS=$lt_save_CFLAGS 781672af6995Smrgfi # test yes != "$_lt_disable_F77" 781772af6995Smrg 781872af6995SmrgAC_LANG_POP 781972af6995Smrg])# _LT_LANG_F77_CONFIG 782072af6995Smrg 782172af6995Smrg 782272af6995Smrg# _LT_LANG_FC_CONFIG([TAG]) 782372af6995Smrg# ------------------------- 782472af6995Smrg# Ensure that the configuration variables for a Fortran compiler are 782572af6995Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 782672af6995Smrg# to write the compiler configuration to 'libtool'. 782772af6995Smrgm4_defun([_LT_LANG_FC_CONFIG], 782872af6995Smrg[AC_LANG_PUSH(Fortran) 782972af6995Smrg 783072af6995Smrgif test -z "$FC" || test no = "$FC"; then 783172af6995Smrg _lt_disable_FC=yes 783272af6995Smrgfi 783372af6995Smrg 783472af6995Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 783572af6995Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 783672af6995Smrg_LT_TAGVAR(always_export_symbols, $1)=no 783772af6995Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 783872af6995Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 783972af6995Smrg_LT_TAGVAR(hardcode_direct, $1)=no 784072af6995Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 784172af6995Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 784272af6995Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 784372af6995Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 784472af6995Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 784572af6995Smrg_LT_TAGVAR(inherit_rpath, $1)=no 784672af6995Smrg_LT_TAGVAR(module_cmds, $1)= 784772af6995Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 784872af6995Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 784972af6995Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 785072af6995Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 785172af6995Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 785272af6995Smrg_LT_TAGVAR(no_undefined_flag, $1)= 785372af6995Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 785472af6995Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 785572af6995Smrg 785672af6995Smrg# Source file extension for fc test sources. 785772af6995Smrgac_ext=${ac_fc_srcext-f} 785872af6995Smrg 785972af6995Smrg# Object file extension for compiled fc test sources. 786072af6995Smrgobjext=o 786172af6995Smrg_LT_TAGVAR(objext, $1)=$objext 786272af6995Smrg 786372af6995Smrg# No sense in running all these tests if we already determined that 786472af6995Smrg# the FC compiler isn't working. Some variables (like enable_shared) 786572af6995Smrg# are currently assumed to apply to all compilers on this platform, 786672af6995Smrg# and will be corrupted by setting them based on a non-working compiler. 786772af6995Smrgif test yes != "$_lt_disable_FC"; then 786872af6995Smrg # Code to be used in simple compile tests 786972af6995Smrg lt_simple_compile_test_code="\ 787072af6995Smrg subroutine t 787172af6995Smrg return 787272af6995Smrg end 787372af6995Smrg" 787472af6995Smrg 787572af6995Smrg # Code to be used in simple link tests 787672af6995Smrg lt_simple_link_test_code="\ 787772af6995Smrg program t 787872af6995Smrg end 787972af6995Smrg" 788072af6995Smrg 788172af6995Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 788272af6995Smrg _LT_TAG_COMPILER 788372af6995Smrg 788472af6995Smrg # save warnings/boilerplate of simple test code 788572af6995Smrg _LT_COMPILER_BOILERPLATE 788672af6995Smrg _LT_LINKER_BOILERPLATE 788772af6995Smrg 788872af6995Smrg # Allow CC to be a program name with arguments. 788972af6995Smrg lt_save_CC=$CC 789072af6995Smrg lt_save_GCC=$GCC 789172af6995Smrg lt_save_CFLAGS=$CFLAGS 789272af6995Smrg CC=${FC-"f95"} 789372af6995Smrg CFLAGS=$FCFLAGS 789472af6995Smrg compiler=$CC 789572af6995Smrg GCC=$ac_cv_fc_compiler_gnu 789672af6995Smrg 789772af6995Smrg _LT_TAGVAR(compiler, $1)=$CC 789872af6995Smrg _LT_CC_BASENAME([$compiler]) 789972af6995Smrg 790072af6995Smrg if test -n "$compiler"; then 790172af6995Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 790272af6995Smrg AC_MSG_RESULT([$can_build_shared]) 790372af6995Smrg 790472af6995Smrg AC_MSG_CHECKING([whether to build shared libraries]) 790572af6995Smrg test no = "$can_build_shared" && enable_shared=no 790672af6995Smrg 790772af6995Smrg # On AIX, shared libraries and static libraries use the same namespace, and 790872af6995Smrg # are all built from PIC. 790972af6995Smrg case $host_os in 791072af6995Smrg aix3*) 791172af6995Smrg test yes = "$enable_shared" && enable_static=no 791272af6995Smrg if test -n "$RANLIB"; then 791372af6995Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 791472af6995Smrg postinstall_cmds='$RANLIB $lib' 791572af6995Smrg fi 791672af6995Smrg ;; 791772af6995Smrg aix[[4-9]]*) 791872af6995Smrg if test ia64 != "$host_cpu"; then 791972af6995Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 792072af6995Smrg yes,aix,yes) ;; # shared object as lib.so file only 792172af6995Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 792272af6995Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 792372af6995Smrg esac 792472af6995Smrg fi 792572af6995Smrg ;; 792672af6995Smrg esac 792772af6995Smrg AC_MSG_RESULT([$enable_shared]) 792872af6995Smrg 792972af6995Smrg AC_MSG_CHECKING([whether to build static libraries]) 793072af6995Smrg # Make sure either enable_shared or enable_static is yes. 793172af6995Smrg test yes = "$enable_shared" || enable_static=yes 793272af6995Smrg AC_MSG_RESULT([$enable_static]) 793372af6995Smrg 793472af6995Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 793572af6995Smrg _LT_TAGVAR(LD, $1)=$LD 793672af6995Smrg 793772af6995Smrg ## CAVEAT EMPTOR: 793872af6995Smrg ## There is no encapsulation within the following macros, do not change 793972af6995Smrg ## the running order or otherwise move them around unless you know exactly 794072af6995Smrg ## what you are doing... 794172af6995Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 794272af6995Smrg _LT_COMPILER_PIC($1) 794372af6995Smrg _LT_COMPILER_C_O($1) 794472af6995Smrg _LT_COMPILER_FILE_LOCKS($1) 794572af6995Smrg _LT_LINKER_SHLIBS($1) 794672af6995Smrg _LT_SYS_DYNAMIC_LINKER($1) 794772af6995Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 794872af6995Smrg 794972af6995Smrg _LT_CONFIG($1) 795072af6995Smrg fi # test -n "$compiler" 795172af6995Smrg 795272af6995Smrg GCC=$lt_save_GCC 795372af6995Smrg CC=$lt_save_CC 795472af6995Smrg CFLAGS=$lt_save_CFLAGS 795572af6995Smrgfi # test yes != "$_lt_disable_FC" 795672af6995Smrg 795772af6995SmrgAC_LANG_POP 795872af6995Smrg])# _LT_LANG_FC_CONFIG 795972af6995Smrg 796072af6995Smrg 796172af6995Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 796272af6995Smrg# -------------------------- 796372af6995Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 796472af6995Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 796572af6995Smrg# to write the compiler configuration to 'libtool'. 796672af6995Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 796772af6995Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 796872af6995SmrgAC_LANG_SAVE 796972af6995Smrg 797072af6995Smrg# Source file extension for Java test sources. 797172af6995Smrgac_ext=java 797272af6995Smrg 797372af6995Smrg# Object file extension for compiled Java test sources. 797472af6995Smrgobjext=o 797572af6995Smrg_LT_TAGVAR(objext, $1)=$objext 797672af6995Smrg 797772af6995Smrg# Code to be used in simple compile tests 797872af6995Smrglt_simple_compile_test_code="class foo {}" 797972af6995Smrg 798072af6995Smrg# Code to be used in simple link tests 798172af6995Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 798272af6995Smrg 798372af6995Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 798472af6995Smrg_LT_TAG_COMPILER 798572af6995Smrg 798672af6995Smrg# save warnings/boilerplate of simple test code 798772af6995Smrg_LT_COMPILER_BOILERPLATE 798872af6995Smrg_LT_LINKER_BOILERPLATE 798972af6995Smrg 799072af6995Smrg# Allow CC to be a program name with arguments. 799172af6995Smrglt_save_CC=$CC 799272af6995Smrglt_save_CFLAGS=$CFLAGS 799372af6995Smrglt_save_GCC=$GCC 799472af6995SmrgGCC=yes 799572af6995SmrgCC=${GCJ-"gcj"} 799672af6995SmrgCFLAGS=$GCJFLAGS 799772af6995Smrgcompiler=$CC 799872af6995Smrg_LT_TAGVAR(compiler, $1)=$CC 799972af6995Smrg_LT_TAGVAR(LD, $1)=$LD 800072af6995Smrg_LT_CC_BASENAME([$compiler]) 800172af6995Smrg 800272af6995Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 800372af6995Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 800472af6995Smrg 800572af6995Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 800672af6995Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 800772af6995Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 800872af6995Smrg 800972af6995Smrg## CAVEAT EMPTOR: 801072af6995Smrg## There is no encapsulation within the following macros, do not change 801172af6995Smrg## the running order or otherwise move them around unless you know exactly 801272af6995Smrg## what you are doing... 801372af6995Smrgif test -n "$compiler"; then 801472af6995Smrg _LT_COMPILER_NO_RTTI($1) 801572af6995Smrg _LT_COMPILER_PIC($1) 801672af6995Smrg _LT_COMPILER_C_O($1) 801772af6995Smrg _LT_COMPILER_FILE_LOCKS($1) 801872af6995Smrg _LT_LINKER_SHLIBS($1) 801972af6995Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 802072af6995Smrg 802172af6995Smrg _LT_CONFIG($1) 802272af6995Smrgfi 802372af6995Smrg 802472af6995SmrgAC_LANG_RESTORE 802572af6995Smrg 802672af6995SmrgGCC=$lt_save_GCC 802772af6995SmrgCC=$lt_save_CC 802872af6995SmrgCFLAGS=$lt_save_CFLAGS 802972af6995Smrg])# _LT_LANG_GCJ_CONFIG 803072af6995Smrg 803172af6995Smrg 803272af6995Smrg# _LT_LANG_GO_CONFIG([TAG]) 803372af6995Smrg# -------------------------- 803472af6995Smrg# Ensure that the configuration variables for the GNU Go compiler 803572af6995Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 803672af6995Smrg# to write the compiler configuration to 'libtool'. 803772af6995Smrgm4_defun([_LT_LANG_GO_CONFIG], 803872af6995Smrg[AC_REQUIRE([LT_PROG_GO])dnl 803972af6995SmrgAC_LANG_SAVE 804072af6995Smrg 804172af6995Smrg# Source file extension for Go test sources. 804272af6995Smrgac_ext=go 804372af6995Smrg 804472af6995Smrg# Object file extension for compiled Go test sources. 804572af6995Smrgobjext=o 804672af6995Smrg_LT_TAGVAR(objext, $1)=$objext 804772af6995Smrg 804872af6995Smrg# Code to be used in simple compile tests 804972af6995Smrglt_simple_compile_test_code="package main; func main() { }" 805072af6995Smrg 805172af6995Smrg# Code to be used in simple link tests 805272af6995Smrglt_simple_link_test_code='package main; func main() { }' 805372af6995Smrg 805472af6995Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 805572af6995Smrg_LT_TAG_COMPILER 805672af6995Smrg 805772af6995Smrg# save warnings/boilerplate of simple test code 805872af6995Smrg_LT_COMPILER_BOILERPLATE 805972af6995Smrg_LT_LINKER_BOILERPLATE 806072af6995Smrg 806172af6995Smrg# Allow CC to be a program name with arguments. 806272af6995Smrglt_save_CC=$CC 806372af6995Smrglt_save_CFLAGS=$CFLAGS 806472af6995Smrglt_save_GCC=$GCC 806572af6995SmrgGCC=yes 806672af6995SmrgCC=${GOC-"gccgo"} 806772af6995SmrgCFLAGS=$GOFLAGS 806872af6995Smrgcompiler=$CC 806972af6995Smrg_LT_TAGVAR(compiler, $1)=$CC 807072af6995Smrg_LT_TAGVAR(LD, $1)=$LD 807172af6995Smrg_LT_CC_BASENAME([$compiler]) 807272af6995Smrg 807372af6995Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 807472af6995Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 807572af6995Smrg 807672af6995Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 807772af6995Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 807872af6995Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 807972af6995Smrg 808072af6995Smrg## CAVEAT EMPTOR: 808172af6995Smrg## There is no encapsulation within the following macros, do not change 808272af6995Smrg## the running order or otherwise move them around unless you know exactly 808372af6995Smrg## what you are doing... 808472af6995Smrgif test -n "$compiler"; then 808572af6995Smrg _LT_COMPILER_NO_RTTI($1) 808672af6995Smrg _LT_COMPILER_PIC($1) 808772af6995Smrg _LT_COMPILER_C_O($1) 808872af6995Smrg _LT_COMPILER_FILE_LOCKS($1) 808972af6995Smrg _LT_LINKER_SHLIBS($1) 809072af6995Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 809172af6995Smrg 809272af6995Smrg _LT_CONFIG($1) 809372af6995Smrgfi 809472af6995Smrg 809572af6995SmrgAC_LANG_RESTORE 809672af6995Smrg 809772af6995SmrgGCC=$lt_save_GCC 809872af6995SmrgCC=$lt_save_CC 809972af6995SmrgCFLAGS=$lt_save_CFLAGS 810072af6995Smrg])# _LT_LANG_GO_CONFIG 810172af6995Smrg 810272af6995Smrg 810372af6995Smrg# _LT_LANG_RC_CONFIG([TAG]) 810472af6995Smrg# ------------------------- 810572af6995Smrg# Ensure that the configuration variables for the Windows resource compiler 810672af6995Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 810772af6995Smrg# to write the compiler configuration to 'libtool'. 810872af6995Smrgm4_defun([_LT_LANG_RC_CONFIG], 810972af6995Smrg[AC_REQUIRE([LT_PROG_RC])dnl 811072af6995SmrgAC_LANG_SAVE 811172af6995Smrg 811272af6995Smrg# Source file extension for RC test sources. 811372af6995Smrgac_ext=rc 811472af6995Smrg 811572af6995Smrg# Object file extension for compiled RC test sources. 811672af6995Smrgobjext=o 811772af6995Smrg_LT_TAGVAR(objext, $1)=$objext 811872af6995Smrg 811972af6995Smrg# Code to be used in simple compile tests 812072af6995Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 812172af6995Smrg 812272af6995Smrg# Code to be used in simple link tests 812372af6995Smrglt_simple_link_test_code=$lt_simple_compile_test_code 812472af6995Smrg 812572af6995Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 812672af6995Smrg_LT_TAG_COMPILER 812772af6995Smrg 812872af6995Smrg# save warnings/boilerplate of simple test code 812972af6995Smrg_LT_COMPILER_BOILERPLATE 813072af6995Smrg_LT_LINKER_BOILERPLATE 813172af6995Smrg 813272af6995Smrg# Allow CC to be a program name with arguments. 813372af6995Smrglt_save_CC=$CC 813472af6995Smrglt_save_CFLAGS=$CFLAGS 813572af6995Smrglt_save_GCC=$GCC 813672af6995SmrgGCC= 813772af6995SmrgCC=${RC-"windres"} 813872af6995SmrgCFLAGS= 813972af6995Smrgcompiler=$CC 814072af6995Smrg_LT_TAGVAR(compiler, $1)=$CC 814172af6995Smrg_LT_CC_BASENAME([$compiler]) 814272af6995Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 814372af6995Smrg 814472af6995Smrgif test -n "$compiler"; then 814572af6995Smrg : 814672af6995Smrg _LT_CONFIG($1) 814772af6995Smrgfi 814872af6995Smrg 814972af6995SmrgGCC=$lt_save_GCC 815072af6995SmrgAC_LANG_RESTORE 815172af6995SmrgCC=$lt_save_CC 815272af6995SmrgCFLAGS=$lt_save_CFLAGS 815372af6995Smrg])# _LT_LANG_RC_CONFIG 815472af6995Smrg 815572af6995Smrg 815672af6995Smrg# LT_PROG_GCJ 815772af6995Smrg# ----------- 815872af6995SmrgAC_DEFUN([LT_PROG_GCJ], 815972af6995Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 816072af6995Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 816172af6995Smrg [AC_CHECK_TOOL(GCJ, gcj,) 816272af6995Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 816372af6995Smrg AC_SUBST(GCJFLAGS)])])[]dnl 816472af6995Smrg]) 816572af6995Smrg 816672af6995Smrg# Old name: 816772af6995SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 816872af6995Smrgdnl aclocal-1.4 backwards compatibility: 816972af6995Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 817072af6995Smrg 817172af6995Smrg 817272af6995Smrg# LT_PROG_GO 817372af6995Smrg# ---------- 817472af6995SmrgAC_DEFUN([LT_PROG_GO], 817572af6995Smrg[AC_CHECK_TOOL(GOC, gccgo,) 817672af6995Smrg]) 817772af6995Smrg 817872af6995Smrg 817972af6995Smrg# LT_PROG_RC 818072af6995Smrg# ---------- 818172af6995SmrgAC_DEFUN([LT_PROG_RC], 818272af6995Smrg[AC_CHECK_TOOL(RC, windres,) 818372af6995Smrg]) 818472af6995Smrg 818572af6995Smrg# Old name: 818672af6995SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 818772af6995Smrgdnl aclocal-1.4 backwards compatibility: 818872af6995Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 818972af6995Smrg 819072af6995Smrg 819172af6995Smrg# _LT_DECL_EGREP 819272af6995Smrg# -------------- 819372af6995Smrg# If we don't have a new enough Autoconf to choose the best grep 819472af6995Smrg# available, choose the one first in the user's PATH. 819572af6995Smrgm4_defun([_LT_DECL_EGREP], 819672af6995Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 819772af6995SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 819872af6995Smrgtest -z "$GREP" && GREP=grep 819972af6995Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 820072af6995Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 820172af6995Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 820272af6995Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 820372af6995SmrgAC_SUBST([GREP]) 820472af6995Smrg]) 820572af6995Smrg 820672af6995Smrg 820772af6995Smrg# _LT_DECL_OBJDUMP 820872af6995Smrg# -------------- 820972af6995Smrg# If we don't have a new enough Autoconf to choose the best objdump 821072af6995Smrg# available, choose the one first in the user's PATH. 821172af6995Smrgm4_defun([_LT_DECL_OBJDUMP], 821272af6995Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 821372af6995Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 821472af6995Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 821572af6995SmrgAC_SUBST([OBJDUMP]) 821672af6995Smrg]) 821772af6995Smrg 821872af6995Smrg# _LT_DECL_DLLTOOL 821972af6995Smrg# ---------------- 822072af6995Smrg# Ensure DLLTOOL variable is set. 822172af6995Smrgm4_defun([_LT_DECL_DLLTOOL], 822272af6995Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 822372af6995Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 822472af6995Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 822572af6995SmrgAC_SUBST([DLLTOOL]) 822672af6995Smrg]) 822772af6995Smrg 8228a773ec55Smrg# _LT_DECL_FILECMD 8229a773ec55Smrg# ---------------- 8230a773ec55Smrg# Check for a file(cmd) program that can be used to detect file type and magic 8231a773ec55Smrgm4_defun([_LT_DECL_FILECMD], 8232a773ec55Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 8233a773ec55Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 8234a773ec55Smrg])# _LD_DECL_FILECMD 8235a773ec55Smrg 823672af6995Smrg# _LT_DECL_SED 823772af6995Smrg# ------------ 823872af6995Smrg# Check for a fully-functional sed program, that truncates 823972af6995Smrg# as few characters as possible. Prefer GNU sed if found. 824072af6995Smrgm4_defun([_LT_DECL_SED], 824172af6995Smrg[AC_PROG_SED 824272af6995Smrgtest -z "$SED" && SED=sed 824372af6995SmrgXsed="$SED -e 1s/^X//" 824472af6995Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 824572af6995Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 824672af6995Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 824772af6995Smrg])# _LT_DECL_SED 824872af6995Smrg 824972af6995Smrgm4_ifndef([AC_PROG_SED], [ 825072af6995Smrg############################################################ 825172af6995Smrg# NOTE: This macro has been submitted for inclusion into # 825272af6995Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 825372af6995Smrg# a released version of Autoconf we should remove this # 825472af6995Smrg# macro and use it instead. # 825572af6995Smrg############################################################ 825672af6995Smrg 825772af6995Smrgm4_defun([AC_PROG_SED], 825872af6995Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 825972af6995SmrgAC_CACHE_VAL(lt_cv_path_SED, 826072af6995Smrg[# Loop through the user's path and test for sed and gsed. 826172af6995Smrg# Then use that list of sed's as ones to test for truncation. 826272af6995Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 826372af6995Smrgfor as_dir in $PATH 826472af6995Smrgdo 826572af6995Smrg IFS=$as_save_IFS 826672af6995Smrg test -z "$as_dir" && as_dir=. 826772af6995Smrg for lt_ac_prog in sed gsed; do 826872af6995Smrg for ac_exec_ext in '' $ac_executable_extensions; do 826972af6995Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 827072af6995Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 827172af6995Smrg fi 827272af6995Smrg done 827372af6995Smrg done 827472af6995Smrgdone 827572af6995SmrgIFS=$as_save_IFS 827672af6995Smrglt_ac_max=0 827772af6995Smrglt_ac_count=0 827872af6995Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 827972af6995Smrg# along with /bin/sed that truncates output. 828072af6995Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 828172af6995Smrg test ! -f "$lt_ac_sed" && continue 828272af6995Smrg cat /dev/null > conftest.in 828372af6995Smrg lt_ac_count=0 828472af6995Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 828572af6995Smrg # Check for GNU sed and select it if it is found. 828672af6995Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 828772af6995Smrg lt_cv_path_SED=$lt_ac_sed 828872af6995Smrg break 828972af6995Smrg fi 829072af6995Smrg while true; do 829172af6995Smrg cat conftest.in conftest.in >conftest.tmp 829272af6995Smrg mv conftest.tmp conftest.in 829372af6995Smrg cp conftest.in conftest.nl 829472af6995Smrg echo >>conftest.nl 829572af6995Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 829672af6995Smrg cmp -s conftest.out conftest.nl || break 829772af6995Smrg # 10000 chars as input seems more than enough 829872af6995Smrg test 10 -lt "$lt_ac_count" && break 829972af6995Smrg lt_ac_count=`expr $lt_ac_count + 1` 830072af6995Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 830172af6995Smrg lt_ac_max=$lt_ac_count 830272af6995Smrg lt_cv_path_SED=$lt_ac_sed 830372af6995Smrg fi 830472af6995Smrg done 830572af6995Smrgdone 830672af6995Smrg]) 830772af6995SmrgSED=$lt_cv_path_SED 830872af6995SmrgAC_SUBST([SED]) 830972af6995SmrgAC_MSG_RESULT([$SED]) 831072af6995Smrg])#AC_PROG_SED 831172af6995Smrg])#m4_ifndef 831272af6995Smrg 831372af6995Smrg# Old name: 831472af6995SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 831572af6995Smrgdnl aclocal-1.4 backwards compatibility: 831672af6995Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 831772af6995Smrg 831872af6995Smrg 831972af6995Smrg# _LT_CHECK_SHELL_FEATURES 832072af6995Smrg# ------------------------ 832172af6995Smrg# Find out whether the shell is Bourne or XSI compatible, 832272af6995Smrg# or has some other useful features. 832372af6995Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 832472af6995Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 832572af6995Smrg lt_unset=unset 832672af6995Smrgelse 832772af6995Smrg lt_unset=false 832872af6995Smrgfi 832972af6995Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 833072af6995Smrg 833172af6995Smrg# test EBCDIC or ASCII 833272af6995Smrgcase `echo X|tr X '\101'` in 833372af6995Smrg A) # ASCII based system 833472af6995Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 833572af6995Smrg lt_SP2NL='tr \040 \012' 833672af6995Smrg lt_NL2SP='tr \015\012 \040\040' 833772af6995Smrg ;; 833872af6995Smrg *) # EBCDIC based system 833972af6995Smrg lt_SP2NL='tr \100 \n' 834072af6995Smrg lt_NL2SP='tr \r\n \100\100' 834172af6995Smrg ;; 834272af6995Smrgesac 834372af6995Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 834472af6995Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 834572af6995Smrg])# _LT_CHECK_SHELL_FEATURES 834672af6995Smrg 834772af6995Smrg 834872af6995Smrg# _LT_PATH_CONVERSION_FUNCTIONS 834972af6995Smrg# ----------------------------- 835072af6995Smrg# Determine what file name conversion functions should be used by 835172af6995Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 835272af6995Smrg# for certain cross-compile configurations and native mingw. 835372af6995Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 835472af6995Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 835572af6995SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 835672af6995SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 835772af6995SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 835872af6995Smrg[case $host in 835972af6995Smrg *-*-mingw* ) 836072af6995Smrg case $build in 836172af6995Smrg *-*-mingw* ) # actually msys 836272af6995Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 836372af6995Smrg ;; 836472af6995Smrg *-*-cygwin* ) 836572af6995Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 836672af6995Smrg ;; 836772af6995Smrg * ) # otherwise, assume *nix 836872af6995Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 836972af6995Smrg ;; 837072af6995Smrg esac 837172af6995Smrg ;; 837272af6995Smrg *-*-cygwin* ) 837372af6995Smrg case $build in 837472af6995Smrg *-*-mingw* ) # actually msys 837572af6995Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 837672af6995Smrg ;; 837772af6995Smrg *-*-cygwin* ) 837872af6995Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 837972af6995Smrg ;; 838072af6995Smrg * ) # otherwise, assume *nix 838172af6995Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 838272af6995Smrg ;; 838372af6995Smrg esac 838472af6995Smrg ;; 838572af6995Smrg * ) # unhandled hosts (and "normal" native builds) 838672af6995Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 838772af6995Smrg ;; 838872af6995Smrgesac 838972af6995Smrg]) 839072af6995Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 839172af6995SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 839272af6995Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 839372af6995Smrg [0], [convert $build file names to $host format])dnl 839472af6995Smrg 839572af6995SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 839672af6995SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 839772af6995Smrg[#assume ordinary cross tools, or native build. 839872af6995Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 839972af6995Smrgcase $host in 840072af6995Smrg *-*-mingw* ) 840172af6995Smrg case $build in 840272af6995Smrg *-*-mingw* ) # actually msys 840372af6995Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 840472af6995Smrg ;; 840572af6995Smrg esac 840672af6995Smrg ;; 840772af6995Smrgesac 840872af6995Smrg]) 840972af6995Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 841072af6995SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 841172af6995Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 841272af6995Smrg [0], [convert $build files to toolchain format])dnl 841372af6995Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8414