16ee7d557Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 26ee7d557Smrg# 36ee7d557Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software 46ee7d557Smrg# Foundation, Inc. 56ee7d557Smrg# Written by Gordon Matzigkeit, 1996 66ee7d557Smrg# 76ee7d557Smrg# This file is free software; the Free Software Foundation gives 86ee7d557Smrg# unlimited permission to copy and/or distribute it, with or without 96ee7d557Smrg# modifications, as long as this notice is preserved. 106ee7d557Smrg 116ee7d557Smrgm4_define([_LT_COPYING], [dnl 126ee7d557Smrg# Copyright (C) 2024 Free Software Foundation, Inc. 136ee7d557Smrg# This is free software; see the source for copying conditions. There is NO 146ee7d557Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 156ee7d557Smrg 166ee7d557Smrg# GNU Libtool is free software; you can redistribute it and/or modify 176ee7d557Smrg# it under the terms of the GNU General Public License as published by 186ee7d557Smrg# the Free Software Foundation; either version 2 of the License, or 196ee7d557Smrg# (at your option) any later version. 206ee7d557Smrg# 216ee7d557Smrg# As a special exception to the GNU General Public License, if you 226ee7d557Smrg# distribute this file as part of a program or library that is built 236ee7d557Smrg# using GNU Libtool, you may include this file under the same 246ee7d557Smrg# distribution terms that you use for the rest of that program. 256ee7d557Smrg# 266ee7d557Smrg# GNU Libtool is distributed in the hope that it will be useful, but 276ee7d557Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 286ee7d557Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 296ee7d557Smrg# GNU General Public License for more details. 306ee7d557Smrg# 316ee7d557Smrg# You should have received a copy of the GNU General Public License 326ee7d557Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 336ee7d557Smrg]) 346ee7d557Smrg 356ee7d557Smrg# serial 63 LT_INIT 366ee7d557Smrg 376ee7d557Smrg 386ee7d557Smrg# LT_PREREQ(VERSION) 396ee7d557Smrg# ------------------ 406ee7d557Smrg# Complain and exit if this libtool version is less that VERSION. 416ee7d557Smrgm4_defun([LT_PREREQ], 426ee7d557Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 436ee7d557Smrg [m4_default([$3], 446ee7d557Smrg [m4_fatal([Libtool version $1 or higher is required], 456ee7d557Smrg 63)])], 466ee7d557Smrg [$2])]) 476ee7d557Smrg 486ee7d557Smrg 496ee7d557Smrg# _LT_CHECK_BUILDDIR 506ee7d557Smrg# ------------------ 516ee7d557Smrg# Complain if the absolute build directory name contains unusual characters 526ee7d557Smrgm4_defun([_LT_CHECK_BUILDDIR], 536ee7d557Smrg[case `pwd` in 546ee7d557Smrg *\ * | *\ *) 556ee7d557Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 566ee7d557Smrgesac 576ee7d557Smrg]) 586ee7d557Smrg 596ee7d557Smrg 606ee7d557Smrg# LT_INIT([OPTIONS]) 616ee7d557Smrg# ------------------ 626ee7d557SmrgAC_DEFUN([LT_INIT], 636ee7d557Smrg[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK 646ee7d557SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 656ee7d557SmrgAC_BEFORE([$0], [LT_LANG])dnl 666ee7d557SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 676ee7d557SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 686ee7d557Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 696ee7d557Smrg 706ee7d557Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 716ee7d557Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 726ee7d557Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 736ee7d557Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 746ee7d557Smrgdnl unless we require an AC_DEFUNed macro: 756ee7d557SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 766ee7d557SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 776ee7d557SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 786ee7d557SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 796ee7d557Smrgm4_require([_LT_PROG_LTMAIN])dnl 806ee7d557Smrg 816ee7d557Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 826ee7d557Smrg 836ee7d557Smrgdnl Parse OPTIONS 846ee7d557Smrg_LT_SET_OPTIONS([$0], [$1]) 856ee7d557Smrg 866ee7d557Smrg# This can be used to rebuild libtool when needed 876ee7d557SmrgLIBTOOL_DEPS=$ltmain 886ee7d557Smrg 896ee7d557Smrg# Always use our own libtool. 906ee7d557SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 916ee7d557SmrgAC_SUBST(LIBTOOL)dnl 926ee7d557Smrg 936ee7d557Smrg_LT_SETUP 946ee7d557Smrg 956ee7d557Smrg# Only expand once: 966ee7d557Smrgm4_define([LT_INIT]) 976ee7d557Smrg])# LT_INIT 986ee7d557Smrg 996ee7d557Smrg# Old names: 1006ee7d557SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1016ee7d557SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1026ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 1036ee7d557Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1046ee7d557Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1056ee7d557Smrg 1066ee7d557Smrg 1076ee7d557Smrg# _LT_PREPARE_CC_BASENAME 1086ee7d557Smrg# ----------------------- 1096ee7d557Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 1106ee7d557Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1116ee7d557Smrgfunc_cc_basename () 1126ee7d557Smrg{ 1136ee7d557Smrg for cc_temp in @S|@*""; do 1146ee7d557Smrg case $cc_temp in 1156ee7d557Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1166ee7d557Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1176ee7d557Smrg \-*) ;; 1186ee7d557Smrg *) break;; 1196ee7d557Smrg esac 1206ee7d557Smrg done 1216ee7d557Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1226ee7d557Smrg} 1236ee7d557Smrg])# _LT_PREPARE_CC_BASENAME 1246ee7d557Smrg 1256ee7d557Smrg 1266ee7d557Smrg# _LT_CC_BASENAME(CC) 1276ee7d557Smrg# ------------------- 1286ee7d557Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 1296ee7d557Smrg# but that macro is also expanded into generated libtool script, which 1306ee7d557Smrg# arranges for $SED and $ECHO to be set by different means. 1316ee7d557Smrgm4_defun([_LT_CC_BASENAME], 1326ee7d557Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 1336ee7d557SmrgAC_REQUIRE([_LT_DECL_SED])dnl 1346ee7d557SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1356ee7d557Smrgfunc_cc_basename $1 1366ee7d557Smrgcc_basename=$func_cc_basename_result 1376ee7d557Smrg]) 1386ee7d557Smrg 1396ee7d557Smrg 1406ee7d557Smrg# _LT_FILEUTILS_DEFAULTS 1416ee7d557Smrg# ---------------------- 1426ee7d557Smrg# It is okay to use these file commands and assume they have been set 1436ee7d557Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1446ee7d557Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1456ee7d557Smrg[: ${CP="cp -f"} 1466ee7d557Smrg: ${MV="mv -f"} 1476ee7d557Smrg: ${RM="rm -f"} 1486ee7d557Smrg])# _LT_FILEUTILS_DEFAULTS 1496ee7d557Smrg 1506ee7d557Smrg 1516ee7d557Smrg# _LT_SETUP 1526ee7d557Smrg# --------- 1536ee7d557Smrgm4_defun([_LT_SETUP], 1546ee7d557Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1556ee7d557SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1566ee7d557SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1576ee7d557SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1586ee7d557Smrg 1596ee7d557Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1606ee7d557Smrgdnl 1616ee7d557Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1626ee7d557Smrg_LT_DECL([], [host], [0])dnl 1636ee7d557Smrg_LT_DECL([], [host_os], [0])dnl 1646ee7d557Smrgdnl 1656ee7d557Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1666ee7d557Smrg_LT_DECL([], [build], [0])dnl 1676ee7d557Smrg_LT_DECL([], [build_os], [0])dnl 1686ee7d557Smrgdnl 1696ee7d557SmrgAC_REQUIRE([AC_PROG_CC])dnl 1706ee7d557SmrgAC_REQUIRE([LT_PATH_LD])dnl 1716ee7d557SmrgAC_REQUIRE([LT_PATH_NM])dnl 1726ee7d557Smrgdnl 1736ee7d557SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1746ee7d557Smrgtest -z "$LN_S" && LN_S="ln -s" 1756ee7d557Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1766ee7d557Smrgdnl 1776ee7d557SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1786ee7d557Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1796ee7d557Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1806ee7d557Smrgdnl 1816ee7d557Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1826ee7d557Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1836ee7d557Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1846ee7d557Smrgm4_require([_LT_CMD_RELOAD])dnl 1856ee7d557Smrgm4_require([_LT_DECL_FILECMD])dnl 1866ee7d557Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1876ee7d557Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1886ee7d557Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1896ee7d557Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1906ee7d557Smrgm4_require([_LT_WITH_SYSROOT])dnl 1916ee7d557Smrgm4_require([_LT_CMD_TRUNCATE])dnl 1926ee7d557Smrg 1936ee7d557Smrg_LT_CONFIG_LIBTOOL_INIT([ 1946ee7d557Smrg# See if we are running on zsh, and set the options that allow our 1956ee7d557Smrg# commands through without removal of \ escapes INIT. 1966ee7d557Smrgif test -n "\${ZSH_VERSION+set}"; then 1976ee7d557Smrg setopt NO_GLOB_SUBST 1986ee7d557Smrgfi 1996ee7d557Smrg]) 2006ee7d557Smrgif test -n "${ZSH_VERSION+set}"; then 2016ee7d557Smrg setopt NO_GLOB_SUBST 2026ee7d557Smrgfi 2036ee7d557Smrg 2046ee7d557Smrg_LT_CHECK_OBJDIR 2056ee7d557Smrg 2066ee7d557Smrgm4_require([_LT_TAG_COMPILER])dnl 2076ee7d557Smrg 2086ee7d557Smrgcase $host_os in 2096ee7d557Smrgaix3*) 2106ee7d557Smrg # AIX sometimes has problems with the GCC collect2 program. For some 2116ee7d557Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2126ee7d557Smrg # vanish in a puff of smoke. 2136ee7d557Smrg if test set != "${COLLECT_NAMES+set}"; then 2146ee7d557Smrg COLLECT_NAMES= 2156ee7d557Smrg export COLLECT_NAMES 2166ee7d557Smrg fi 2176ee7d557Smrg ;; 2186ee7d557Smrgesac 2196ee7d557Smrg 2206ee7d557Smrg# Global variables: 2216ee7d557Smrgofile=libtool 2226ee7d557Smrgcan_build_shared=yes 2236ee7d557Smrg 2246ee7d557Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 2256ee7d557Smrg# ICC, which need '.lib'). 2266ee7d557Smrglibext=a 2276ee7d557Smrg 2286ee7d557Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2296ee7d557Smrg 2306ee7d557Smrgold_CC=$CC 2316ee7d557Smrgold_CFLAGS=$CFLAGS 2326ee7d557Smrg 2336ee7d557Smrg# Set sane defaults for various variables 2346ee7d557Smrgtest -z "$CC" && CC=cc 2356ee7d557Smrgtest -z "$LTCC" && LTCC=$CC 2366ee7d557Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2376ee7d557Smrgtest -z "$LD" && LD=ld 2386ee7d557Smrgtest -z "$ac_objext" && ac_objext=o 2396ee7d557Smrg 2406ee7d557Smrg_LT_CC_BASENAME([$compiler]) 2416ee7d557Smrg 2426ee7d557Smrg# Only perform the check for file, if the check method requires it 2436ee7d557Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2446ee7d557Smrgcase $deplibs_check_method in 2456ee7d557Smrgfile_magic*) 2466ee7d557Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2476ee7d557Smrg _LT_PATH_MAGIC 2486ee7d557Smrg fi 2496ee7d557Smrg ;; 2506ee7d557Smrgesac 2516ee7d557Smrg 2526ee7d557Smrg# Use C for the default configuration in the libtool script 2536ee7d557SmrgLT_SUPPORTED_TAG([CC]) 2546ee7d557Smrg_LT_LANG_C_CONFIG 2556ee7d557Smrg_LT_LANG_DEFAULT_CONFIG 2566ee7d557Smrg_LT_CONFIG_COMMANDS 2576ee7d557Smrg])# _LT_SETUP 2586ee7d557Smrg 2596ee7d557Smrg 2606ee7d557Smrg# _LT_PREPARE_SED_QUOTE_VARS 2616ee7d557Smrg# -------------------------- 2626ee7d557Smrg# Define a few sed substitution that help us do robust quoting. 2636ee7d557Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2646ee7d557Smrg[# Backslashify metacharacters that are still active within 2656ee7d557Smrg# double-quoted strings. 2666ee7d557Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2676ee7d557Smrg 2686ee7d557Smrg# Same as above, but do not quote variable references. 2696ee7d557Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2706ee7d557Smrg 2716ee7d557Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2726ee7d557Smrg# double_quote_subst'ed string. 2736ee7d557Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2746ee7d557Smrg 2756ee7d557Smrg# Sed substitution to delay expansion of an escaped single quote. 2766ee7d557Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2776ee7d557Smrg 2786ee7d557Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2796ee7d557Smrgno_glob_subst='s/\*/\\\*/g' 2806ee7d557Smrg]) 2816ee7d557Smrg 2826ee7d557Smrg# _LT_PROG_LTMAIN 2836ee7d557Smrg# --------------- 2846ee7d557Smrg# Note that this code is called both from 'configure', and 'config.status' 2856ee7d557Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2866ee7d557Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 2876ee7d557Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2886ee7d557Smrgm4_defun([_LT_PROG_LTMAIN], 2896ee7d557Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2906ee7d557Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2916ee7d557Smrgltmain=$ac_aux_dir/ltmain.sh 2926ee7d557Smrg])# _LT_PROG_LTMAIN 2936ee7d557Smrg 2946ee7d557Smrg 2956ee7d557Smrg## ------------------------------------- ## 2966ee7d557Smrg## Accumulate code for creating libtool. ## 2976ee7d557Smrg## ------------------------------------- ## 2986ee7d557Smrg 2996ee7d557Smrg# So that we can recreate a full libtool script including additional 3006ee7d557Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3016ee7d557Smrg# in macros and then make a single call at the end using the 'libtool' 3026ee7d557Smrg# label. 3036ee7d557Smrg 3046ee7d557Smrg 3056ee7d557Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3066ee7d557Smrg# ---------------------------------------- 3076ee7d557Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3086ee7d557Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3096ee7d557Smrg[m4_ifval([$1], 3106ee7d557Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3116ee7d557Smrg [$1 3126ee7d557Smrg])])]) 3136ee7d557Smrg 3146ee7d557Smrg# Initialize. 3156ee7d557Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3166ee7d557Smrg 3176ee7d557Smrg 3186ee7d557Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3196ee7d557Smrg# ------------------------------ 3206ee7d557Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3216ee7d557Smrgm4_define([_LT_CONFIG_LIBTOOL], 3226ee7d557Smrg[m4_ifval([$1], 3236ee7d557Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3246ee7d557Smrg [$1 3256ee7d557Smrg])])]) 3266ee7d557Smrg 3276ee7d557Smrg# Initialize. 3286ee7d557Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3296ee7d557Smrg 3306ee7d557Smrg 3316ee7d557Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3326ee7d557Smrg# ----------------------------------------------------- 3336ee7d557Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3346ee7d557Smrg[_LT_CONFIG_LIBTOOL([$1]) 3356ee7d557Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3366ee7d557Smrg]) 3376ee7d557Smrg 3386ee7d557Smrg 3396ee7d557Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3406ee7d557Smrg# ----------------------------- 3416ee7d557Smrg# Add leading comment marks to the start of each line, and a trailing 3426ee7d557Smrg# full-stop to the whole comment if one is not present already. 3436ee7d557Smrgm4_define([_LT_FORMAT_COMMENT], 3446ee7d557Smrg[m4_ifval([$1], [ 3456ee7d557Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3466ee7d557Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3476ee7d557Smrg)]) 3486ee7d557Smrg 3496ee7d557Smrg 3506ee7d557Smrg 3516ee7d557Smrg## ------------------------ ## 3526ee7d557Smrg## FIXME: Eliminate VARNAME ## 3536ee7d557Smrg## ------------------------ ## 3546ee7d557Smrg 3556ee7d557Smrg 3566ee7d557Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3576ee7d557Smrg# ------------------------------------------------------------------- 3586ee7d557Smrg# CONFIGNAME is the name given to the value in the libtool script. 3596ee7d557Smrg# VARNAME is the (base) name used in the configure script. 3606ee7d557Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3616ee7d557Smrg# VARNAME. Any other value will be used directly. 3626ee7d557Smrgm4_define([_LT_DECL], 3636ee7d557Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3646ee7d557Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3656ee7d557Smrg [m4_ifval([$1], [$1], [$2])]) 3666ee7d557Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3676ee7d557Smrg m4_ifval([$4], 3686ee7d557Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3696ee7d557Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3706ee7d557Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3716ee7d557Smrg]) 3726ee7d557Smrg 3736ee7d557Smrg 3746ee7d557Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3756ee7d557Smrg# -------------------------------------------------------- 3766ee7d557Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3776ee7d557Smrg 3786ee7d557Smrg 3796ee7d557Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3806ee7d557Smrg# ------------------------------------------------ 3816ee7d557Smrgm4_define([lt_decl_tag_varnames], 3826ee7d557Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3836ee7d557Smrg 3846ee7d557Smrg 3856ee7d557Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3866ee7d557Smrg# --------------------------------------------------------- 3876ee7d557Smrgm4_define([_lt_decl_filter], 3886ee7d557Smrg[m4_case([$#], 3896ee7d557Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3906ee7d557Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3916ee7d557Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3926ee7d557Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3936ee7d557Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3946ee7d557Smrg]) 3956ee7d557Smrg 3966ee7d557Smrg 3976ee7d557Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3986ee7d557Smrg# -------------------------------------------------- 3996ee7d557Smrgm4_define([lt_decl_quote_varnames], 4006ee7d557Smrg[_lt_decl_filter([value], [1], $@)]) 4016ee7d557Smrg 4026ee7d557Smrg 4036ee7d557Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4046ee7d557Smrg# --------------------------------------------------- 4056ee7d557Smrgm4_define([lt_decl_dquote_varnames], 4066ee7d557Smrg[_lt_decl_filter([value], [2], $@)]) 4076ee7d557Smrg 4086ee7d557Smrg 4096ee7d557Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4106ee7d557Smrg# --------------------------------------------------- 4116ee7d557Smrgm4_define([lt_decl_varnames_tagged], 4126ee7d557Smrg[m4_assert([$# <= 2])dnl 4136ee7d557Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4146ee7d557Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4156ee7d557Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4166ee7d557Smrgm4_define([_lt_decl_varnames_tagged], 4176ee7d557Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4186ee7d557Smrg 4196ee7d557Smrg 4206ee7d557Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4216ee7d557Smrg# ------------------------------------------------ 4226ee7d557Smrgm4_define([lt_decl_all_varnames], 4236ee7d557Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4246ee7d557Smrg m4_if([$2], [], 4256ee7d557Smrg m4_quote(lt_decl_varnames), 4266ee7d557Smrg m4_quote(m4_shift($@))))[]dnl 4276ee7d557Smrg]) 4286ee7d557Smrgm4_define([_lt_decl_all_varnames], 4296ee7d557Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4306ee7d557Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4316ee7d557Smrg]) 4326ee7d557Smrg 4336ee7d557Smrg 4346ee7d557Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4356ee7d557Smrg# ------------------------------------ 4366ee7d557Smrg# Quote a variable value, and forward it to 'config.status' so that its 4376ee7d557Smrg# declaration there will have the same value as in 'configure'. VARNAME 4386ee7d557Smrg# must have a single quote delimited value for this to work. 4396ee7d557Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4406ee7d557Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4416ee7d557Smrg 4426ee7d557Smrg 4436ee7d557Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4446ee7d557Smrg# ------------------------------ 4456ee7d557Smrg# We delimit libtool config variables with single quotes, so when 4466ee7d557Smrg# we write them to config.status, we have to be sure to quote all 4476ee7d557Smrg# embedded single quotes properly. In configure, this macro expands 4486ee7d557Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4496ee7d557Smrg# 4506ee7d557Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4516ee7d557Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4526ee7d557Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4536ee7d557Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4546ee7d557Smrg 4556ee7d557Smrg 4566ee7d557Smrg# _LT_LIBTOOL_TAGS 4576ee7d557Smrg# ---------------- 4586ee7d557Smrg# Output comment and list of tags supported by the script 4596ee7d557Smrgm4_defun([_LT_LIBTOOL_TAGS], 4606ee7d557Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4616ee7d557Smrgavailable_tags='_LT_TAGS'dnl 4626ee7d557Smrg]) 4636ee7d557Smrg 4646ee7d557Smrg 4656ee7d557Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4666ee7d557Smrg# ----------------------------------- 4676ee7d557Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4686ee7d557Smrg# expand to a commented shell variable setting: 4696ee7d557Smrg# 4706ee7d557Smrg# # Some comment about what VAR is for. 4716ee7d557Smrg# visible_name=$lt_internal_name 4726ee7d557Smrgm4_define([_LT_LIBTOOL_DECLARE], 4736ee7d557Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4746ee7d557Smrg [description])))[]dnl 4756ee7d557Smrgm4_pushdef([_libtool_name], 4766ee7d557Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4776ee7d557Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4786ee7d557Smrg [0], [_libtool_name=[$]$1], 4796ee7d557Smrg [1], [_libtool_name=$lt_[]$1], 4806ee7d557Smrg [2], [_libtool_name=$lt_[]$1], 4816ee7d557Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4826ee7d557Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4836ee7d557Smrg]) 4846ee7d557Smrg 4856ee7d557Smrg 4866ee7d557Smrg# _LT_LIBTOOL_CONFIG_VARS 4876ee7d557Smrg# ----------------------- 4886ee7d557Smrg# Produce commented declarations of non-tagged libtool config variables 4896ee7d557Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 4906ee7d557Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4916ee7d557Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4926ee7d557Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4936ee7d557Smrg[m4_foreach([_lt_var], 4946ee7d557Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4956ee7d557Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4966ee7d557Smrg 4976ee7d557Smrg 4986ee7d557Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 4996ee7d557Smrg# ------------------------- 5006ee7d557Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5016ee7d557Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5026ee7d557Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5036ee7d557Smrg 5046ee7d557Smrg 5056ee7d557Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5066ee7d557Smrg# ------------------------------ 5076ee7d557Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5086ee7d557Smrg 5096ee7d557Smrg 5106ee7d557Smrg# _LT_CONFIG_COMMANDS 5116ee7d557Smrg# ------------------- 5126ee7d557Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5136ee7d557Smrg# variables for single and double quote escaping we saved from calls 5146ee7d557Smrg# to _LT_DECL, we can put quote escaped variables declarations 5156ee7d557Smrg# into 'config.status', and then the shell code to quote escape them in 5166ee7d557Smrg# for loops in 'config.status'. Finally, any additional code accumulated 5176ee7d557Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5186ee7d557Smrgm4_defun([_LT_CONFIG_COMMANDS], 5196ee7d557Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5206ee7d557Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5216ee7d557Smrg dnl instead of duplicating it all over again into config.status, 5226ee7d557Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5236ee7d557Smrg dnl needs to know what name is stored there: 5246ee7d557Smrg [AC_CONFIG_COMMANDS([libtool], 5256ee7d557Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5266ee7d557Smrg dnl If the libtool generation code is destined for config.status, 5276ee7d557Smrg dnl expand the accumulated commands and init code now: 5286ee7d557Smrg [AC_CONFIG_COMMANDS([libtool], 5296ee7d557Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5306ee7d557Smrg])#_LT_CONFIG_COMMANDS 5316ee7d557Smrg 5326ee7d557Smrg 5336ee7d557Smrg# Initialize. 5346ee7d557Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5356ee7d557Smrg[ 5366ee7d557Smrg 5376ee7d557Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5386ee7d557Smrg# if CDPATH is set. 5396ee7d557Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5406ee7d557Smrg 5416ee7d557Smrgsed_quote_subst='$sed_quote_subst' 5426ee7d557Smrgdouble_quote_subst='$double_quote_subst' 5436ee7d557Smrgdelay_variable_subst='$delay_variable_subst' 5446ee7d557Smrg_LT_CONFIG_STATUS_DECLARATIONS 5456ee7d557SmrgLTCC='$LTCC' 5466ee7d557SmrgLTCFLAGS='$LTCFLAGS' 5476ee7d557Smrgcompiler='$compiler_DEFAULT' 5486ee7d557Smrg 5496ee7d557Smrg# A function that is used when there is no print builtin or printf. 5506ee7d557Smrgfunc_fallback_echo () 5516ee7d557Smrg{ 5526ee7d557Smrg eval 'cat <<_LTECHO_EOF 5536ee7d557Smrg\$[]1 5546ee7d557Smrg_LTECHO_EOF' 5556ee7d557Smrg} 5566ee7d557Smrg 5576ee7d557Smrg# Quote evaled strings. 5586ee7d557Smrgfor var in lt_decl_all_varnames([[ \ 5596ee7d557Smrg]], lt_decl_quote_varnames); do 5606ee7d557Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5616ee7d557Smrg *[[\\\\\\\`\\"\\\$]]*) 5626ee7d557Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5636ee7d557Smrg ;; 5646ee7d557Smrg *) 5656ee7d557Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5666ee7d557Smrg ;; 5676ee7d557Smrg esac 5686ee7d557Smrgdone 5696ee7d557Smrg 5706ee7d557Smrg# Double-quote double-evaled strings. 5716ee7d557Smrgfor var in lt_decl_all_varnames([[ \ 5726ee7d557Smrg]], lt_decl_dquote_varnames); do 5736ee7d557Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5746ee7d557Smrg *[[\\\\\\\`\\"\\\$]]*) 5756ee7d557Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5766ee7d557Smrg ;; 5776ee7d557Smrg *) 5786ee7d557Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5796ee7d557Smrg ;; 5806ee7d557Smrg esac 5816ee7d557Smrgdone 5826ee7d557Smrg 5836ee7d557Smrg_LT_OUTPUT_LIBTOOL_INIT 5846ee7d557Smrg]) 5856ee7d557Smrg 5866ee7d557Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 5876ee7d557Smrg# ------------------------------------ 5886ee7d557Smrg# Generate a child script FILE with all initialization necessary to 5896ee7d557Smrg# reuse the environment learned by the parent script, and make the 5906ee7d557Smrg# file executable. If COMMENT is supplied, it is inserted after the 5916ee7d557Smrg# '#!' sequence but before initialization text begins. After this 5926ee7d557Smrg# macro, additional text can be appended to FILE to form the body of 5936ee7d557Smrg# the child script. The macro ends with non-zero status if the 5946ee7d557Smrg# file could not be fully written (such as if the disk is full). 5956ee7d557Smrgm4_ifdef([AS_INIT_GENERATED], 5966ee7d557Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 5976ee7d557Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 5986ee7d557Smrg[m4_require([AS_PREPARE])]dnl 5996ee7d557Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6006ee7d557Smrg[lt_write_fail=0 6016ee7d557Smrgcat >$1 <<_ASEOF || lt_write_fail=1 6026ee7d557Smrg#! $SHELL 6036ee7d557Smrg# Generated by $as_me. 6046ee7d557Smrg$2 6056ee7d557SmrgSHELL=\${CONFIG_SHELL-$SHELL} 6066ee7d557Smrgexport SHELL 6076ee7d557Smrg_ASEOF 6086ee7d557Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6096ee7d557SmrgAS_SHELL_SANITIZE 6106ee7d557Smrg_AS_PREPARE 6116ee7d557Smrgexec AS_MESSAGE_FD>&1 6126ee7d557Smrg_ASEOF 6136ee7d557Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 6146ee7d557Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6156ee7d557Smrg 6166ee7d557Smrg# LT_OUTPUT 6176ee7d557Smrg# --------- 6186ee7d557Smrg# This macro allows early generation of the libtool script (before 6196ee7d557Smrg# AC_OUTPUT is called), in case it is used in configure for compilation 6206ee7d557Smrg# tests. 6216ee7d557SmrgAC_DEFUN([LT_OUTPUT], 6226ee7d557Smrg[: ${CONFIG_LT=./config.lt} 6236ee7d557SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6246ee7d557Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6256ee7d557Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6266ee7d557Smrg 6276ee7d557Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6286ee7d557Smrglt_cl_silent=false 6296ee7d557Smrgexec AS_MESSAGE_LOG_FD>>config.log 6306ee7d557Smrg{ 6316ee7d557Smrg echo 6326ee7d557Smrg AS_BOX([Running $as_me.]) 6336ee7d557Smrg} >&AS_MESSAGE_LOG_FD 6346ee7d557Smrg 6356ee7d557Smrglt_cl_help="\ 6366ee7d557Smrg'$as_me' creates a local libtool stub from the current configuration, 6376ee7d557Smrgfor use in further configure time tests before the real libtool is 6386ee7d557Smrggenerated. 6396ee7d557Smrg 6406ee7d557SmrgUsage: $[0] [[OPTIONS]] 6416ee7d557Smrg 6426ee7d557Smrg -h, --help print this help, then exit 6436ee7d557Smrg -V, --version print version number, then exit 6446ee7d557Smrg -q, --quiet do not print progress messages 6456ee7d557Smrg -d, --debug don't remove temporary files 6466ee7d557Smrg 6476ee7d557SmrgReport bugs to <bug-libtool@gnu.org>." 6486ee7d557Smrg 6496ee7d557Smrglt_cl_version="\ 6506ee7d557Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6516ee7d557Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6526ee7d557Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6536ee7d557Smrg 6546ee7d557SmrgCopyright (C) 2024 Free Software Foundation, Inc. 6556ee7d557SmrgThis config.lt script is free software; the Free Software Foundation 6566ee7d557Smrggives unlimited permission to copy, distribute and modify it." 6576ee7d557Smrg 6586ee7d557Smrgwhile test 0 != $[#] 6596ee7d557Smrgdo 6606ee7d557Smrg case $[1] in 6616ee7d557Smrg --version | --v* | -V ) 6626ee7d557Smrg echo "$lt_cl_version"; exit 0 ;; 6636ee7d557Smrg --help | --h* | -h ) 6646ee7d557Smrg echo "$lt_cl_help"; exit 0 ;; 6656ee7d557Smrg --debug | --d* | -d ) 6666ee7d557Smrg debug=: ;; 6676ee7d557Smrg --quiet | --q* | --silent | --s* | -q ) 6686ee7d557Smrg lt_cl_silent=: ;; 6696ee7d557Smrg 6706ee7d557Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6716ee7d557SmrgTry '$[0] --help' for more information.]) ;; 6726ee7d557Smrg 6736ee7d557Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6746ee7d557SmrgTry '$[0] --help' for more information.]) ;; 6756ee7d557Smrg esac 6766ee7d557Smrg shift 6776ee7d557Smrgdone 6786ee7d557Smrg 6796ee7d557Smrgif $lt_cl_silent; then 6806ee7d557Smrg exec AS_MESSAGE_FD>/dev/null 6816ee7d557Smrgfi 6826ee7d557Smrg_LTEOF 6836ee7d557Smrg 6846ee7d557Smrgcat >>"$CONFIG_LT" <<_LTEOF 6856ee7d557Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6866ee7d557Smrg_LTEOF 6876ee7d557Smrg 6886ee7d557Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6896ee7d557SmrgAC_MSG_NOTICE([creating $ofile]) 6906ee7d557Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6916ee7d557SmrgAS_EXIT(0) 6926ee7d557Smrg_LTEOF 6936ee7d557Smrgchmod +x "$CONFIG_LT" 6946ee7d557Smrg 6956ee7d557Smrg# configure is writing to config.log, but config.lt does its own redirection, 6966ee7d557Smrg# appending to config.log, which fails on DOS, as config.log is still kept 6976ee7d557Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 6986ee7d557Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 6996ee7d557Smrglt_cl_success=: 7006ee7d557Smrgtest yes = "$silent" && 7016ee7d557Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 7026ee7d557Smrgexec AS_MESSAGE_LOG_FD>/dev/null 7036ee7d557Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7046ee7d557Smrgexec AS_MESSAGE_LOG_FD>>config.log 7056ee7d557Smrg$lt_cl_success || AS_EXIT(1) 7066ee7d557Smrg])# LT_OUTPUT 7076ee7d557Smrg 7086ee7d557Smrg 7096ee7d557Smrg# _LT_CONFIG(TAG) 7106ee7d557Smrg# --------------- 7116ee7d557Smrg# If TAG is the built-in tag, create an initial libtool script with a 7126ee7d557Smrg# default configuration from the untagged config vars. Otherwise add code 7136ee7d557Smrg# to config.status for appending the configuration named by TAG from the 7146ee7d557Smrg# matching tagged config vars. 7156ee7d557Smrgm4_defun([_LT_CONFIG], 7166ee7d557Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7176ee7d557Smrg_LT_CONFIG_SAVE_COMMANDS([ 7186ee7d557Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7196ee7d557Smrg m4_if(_LT_TAG, [C], [ 7206ee7d557Smrg # See if we are running on zsh, and set the options that allow our 7216ee7d557Smrg # commands through without removal of \ escapes. 7226ee7d557Smrg if test -n "${ZSH_VERSION+set}"; then 7236ee7d557Smrg setopt NO_GLOB_SUBST 7246ee7d557Smrg fi 7256ee7d557Smrg 7266ee7d557Smrg cfgfile=${ofile}T 7276ee7d557Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7286ee7d557Smrg $RM "$cfgfile" 7296ee7d557Smrg 7306ee7d557Smrg cat <<_LT_EOF >> "$cfgfile" 7316ee7d557Smrg#! $SHELL 7326ee7d557Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 7336ee7d557Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7346ee7d557Smrg 7356ee7d557Smrg# Provide generalized library-building support services. 7366ee7d557Smrg# Written by Gordon Matzigkeit, 1996 7376ee7d557Smrg 7386ee7d557Smrg_LT_COPYING 7396ee7d557Smrg_LT_LIBTOOL_TAGS 7406ee7d557Smrg 7416ee7d557Smrg# Configured defaults for sys_lib_dlsearch_path munging. 7426ee7d557Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 7436ee7d557Smrg 7446ee7d557Smrg# ### BEGIN LIBTOOL CONFIG 7456ee7d557Smrg_LT_LIBTOOL_CONFIG_VARS 7466ee7d557Smrg_LT_LIBTOOL_TAG_VARS 7476ee7d557Smrg# ### END LIBTOOL CONFIG 7486ee7d557Smrg 7496ee7d557Smrg_LT_EOF 7506ee7d557Smrg 7516ee7d557Smrg cat <<'_LT_EOF' >> "$cfgfile" 7526ee7d557Smrg 7536ee7d557Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 7546ee7d557Smrg 7556ee7d557Smrg_LT_PREPARE_MUNGE_PATH_LIST 7566ee7d557Smrg_LT_PREPARE_CC_BASENAME 7576ee7d557Smrg 7586ee7d557Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 7596ee7d557Smrg 7606ee7d557Smrg_LT_EOF 7616ee7d557Smrg 7626ee7d557Smrg case $host_os in 7636ee7d557Smrg aix3*) 7646ee7d557Smrg cat <<\_LT_EOF >> "$cfgfile" 7656ee7d557Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7666ee7d557Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7676ee7d557Smrg# vanish in a puff of smoke. 7686ee7d557Smrgif test set != "${COLLECT_NAMES+set}"; then 7696ee7d557Smrg COLLECT_NAMES= 7706ee7d557Smrg export COLLECT_NAMES 7716ee7d557Smrgfi 7726ee7d557Smrg_LT_EOF 7736ee7d557Smrg ;; 7746ee7d557Smrg esac 7756ee7d557Smrg 7766ee7d557Smrg _LT_PROG_LTMAIN 7776ee7d557Smrg 7786ee7d557Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7796ee7d557Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7806ee7d557Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7816ee7d557Smrg # is reportedly fixed, but why not run on old versions too? 7826ee7d557Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 7836ee7d557Smrg || (rm -f "$cfgfile"; exit 1) 7846ee7d557Smrg 7856ee7d557Smrg mv -f "$cfgfile" "$ofile" || 7866ee7d557Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7876ee7d557Smrg chmod +x "$ofile" 7886ee7d557Smrg], 7896ee7d557Smrg[cat <<_LT_EOF >> "$ofile" 7906ee7d557Smrg 7916ee7d557Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7926ee7d557Smrgdnl in a comment (ie after a #). 7936ee7d557Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7946ee7d557Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7956ee7d557Smrg# ### END LIBTOOL TAG CONFIG: $1 7966ee7d557Smrg_LT_EOF 7976ee7d557Smrg])dnl /m4_if 7986ee7d557Smrg], 7996ee7d557Smrg[m4_if([$1], [], [ 8006ee7d557Smrg PACKAGE='$PACKAGE' 8016ee7d557Smrg VERSION='$VERSION' 8026ee7d557Smrg RM='$RM' 8036ee7d557Smrg ofile='$ofile'], []) 8046ee7d557Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 8056ee7d557Smrg])# _LT_CONFIG 8066ee7d557Smrg 8076ee7d557Smrg 8086ee7d557Smrg# LT_SUPPORTED_TAG(TAG) 8096ee7d557Smrg# --------------------- 8106ee7d557Smrg# Trace this macro to discover what tags are supported by the libtool 8116ee7d557Smrg# --tag option, using: 8126ee7d557Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8136ee7d557SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8146ee7d557Smrg 8156ee7d557Smrg 8166ee7d557Smrg# C support is built-in for now 8176ee7d557Smrgm4_define([_LT_LANG_C_enabled], []) 8186ee7d557Smrgm4_define([_LT_TAGS], []) 8196ee7d557Smrg 8206ee7d557Smrg 8216ee7d557Smrg# LT_LANG(LANG) 8226ee7d557Smrg# ------------- 8236ee7d557Smrg# Enable libtool support for the given language if not already enabled. 8246ee7d557SmrgAC_DEFUN([LT_LANG], 8256ee7d557Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8266ee7d557Smrgm4_case([$1], 8276ee7d557Smrg [C], [_LT_LANG(C)], 8286ee7d557Smrg [C++], [_LT_LANG(CXX)], 8296ee7d557Smrg [Go], [_LT_LANG(GO)], 8306ee7d557Smrg [Java], [_LT_LANG(GCJ)], 8316ee7d557Smrg [Fortran 77], [_LT_LANG(F77)], 8326ee7d557Smrg [Fortran], [_LT_LANG(FC)], 8336ee7d557Smrg [Windows Resource], [_LT_LANG(RC)], 8346ee7d557Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8356ee7d557Smrg [_LT_LANG($1)], 8366ee7d557Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8376ee7d557Smrg])# LT_LANG 8386ee7d557Smrg 8396ee7d557Smrg 8406ee7d557Smrg# _LT_LANG(LANGNAME) 8416ee7d557Smrg# ------------------ 8426ee7d557Smrgm4_defun([_LT_LANG], 8436ee7d557Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8446ee7d557Smrg [LT_SUPPORTED_TAG([$1])dnl 8456ee7d557Smrg m4_append([_LT_TAGS], [$1 ])dnl 8466ee7d557Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8476ee7d557Smrg _LT_LANG_$1_CONFIG($1)])dnl 8486ee7d557Smrg])# _LT_LANG 8496ee7d557Smrg 8506ee7d557Smrg 8516ee7d557Smrgm4_ifndef([AC_PROG_GO], [ 8526ee7d557Smrg############################################################ 8536ee7d557Smrg# NOTE: This macro has been submitted for inclusion into # 8546ee7d557Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8556ee7d557Smrg# a released version of Autoconf we should remove this # 8566ee7d557Smrg# macro and use it instead. # 8576ee7d557Smrg############################################################ 8586ee7d557Smrgm4_defun([AC_PROG_GO], 8596ee7d557Smrg[AC_LANG_PUSH(Go)dnl 8606ee7d557SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8616ee7d557SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8626ee7d557Smrg_AC_ARG_VAR_LDFLAGS()dnl 8636ee7d557SmrgAC_CHECK_TOOL(GOC, gccgo) 8646ee7d557Smrgif test -z "$GOC"; then 8656ee7d557Smrg if test -n "$ac_tool_prefix"; then 8666ee7d557Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8676ee7d557Smrg fi 8686ee7d557Smrgfi 8696ee7d557Smrgif test -z "$GOC"; then 8706ee7d557Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8716ee7d557Smrgfi 8726ee7d557Smrg])#m4_defun 8736ee7d557Smrg])#m4_ifndef 8746ee7d557Smrg 8756ee7d557Smrg 8766ee7d557Smrg# _LT_LANG_DEFAULT_CONFIG 8776ee7d557Smrg# ----------------------- 8786ee7d557Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8796ee7d557Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8806ee7d557Smrg [LT_LANG(CXX)], 8816ee7d557Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8826ee7d557Smrg 8836ee7d557SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8846ee7d557Smrg [LT_LANG(F77)], 8856ee7d557Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8866ee7d557Smrg 8876ee7d557SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8886ee7d557Smrg [LT_LANG(FC)], 8896ee7d557Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8906ee7d557Smrg 8916ee7d557Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8926ee7d557Smrgdnl pulling things in needlessly. 8936ee7d557SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8946ee7d557Smrg [LT_LANG(GCJ)], 8956ee7d557Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8966ee7d557Smrg [LT_LANG(GCJ)], 8976ee7d557Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8986ee7d557Smrg [LT_LANG(GCJ)], 8996ee7d557Smrg [m4_ifdef([AC_PROG_GCJ], 9006ee7d557Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9016ee7d557Smrg m4_ifdef([A][M_PROG_GCJ], 9026ee7d557Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9036ee7d557Smrg m4_ifdef([LT_PROG_GCJ], 9046ee7d557Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 9056ee7d557Smrg 9066ee7d557SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 9076ee7d557Smrg [LT_LANG(GO)], 9086ee7d557Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 9096ee7d557Smrg 9106ee7d557SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9116ee7d557Smrg [LT_LANG(RC)], 9126ee7d557Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9136ee7d557Smrg])# _LT_LANG_DEFAULT_CONFIG 9146ee7d557Smrg 9156ee7d557Smrg# Obsolete macros: 9166ee7d557SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9176ee7d557SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9186ee7d557SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9196ee7d557SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9206ee7d557SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9216ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 9226ee7d557Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9236ee7d557Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9246ee7d557Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9256ee7d557Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9266ee7d557Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9276ee7d557Smrg 9286ee7d557Smrg 9296ee7d557Smrg# _LT_TAG_COMPILER 9306ee7d557Smrg# ---------------- 9316ee7d557Smrgm4_defun([_LT_TAG_COMPILER], 9326ee7d557Smrg[AC_REQUIRE([AC_PROG_CC])dnl 9336ee7d557Smrg 9346ee7d557Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9356ee7d557Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9366ee7d557Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9376ee7d557Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9386ee7d557Smrg 9396ee7d557Smrg# If no C compiler was specified, use CC. 9406ee7d557SmrgLTCC=${LTCC-"$CC"} 9416ee7d557Smrg 9426ee7d557Smrg# If no C compiler flags were specified, use CFLAGS. 9436ee7d557SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9446ee7d557Smrg 9456ee7d557Smrg# Allow CC to be a program name with arguments. 9466ee7d557Smrgcompiler=$CC 9476ee7d557Smrg])# _LT_TAG_COMPILER 9486ee7d557Smrg 9496ee7d557Smrg 9506ee7d557Smrg# _LT_COMPILER_BOILERPLATE 9516ee7d557Smrg# ------------------------ 9526ee7d557Smrg# Check for compiler boilerplate output or warnings with 9536ee7d557Smrg# the simple compiler test code. 9546ee7d557Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9556ee7d557Smrg[m4_require([_LT_DECL_SED])dnl 9566ee7d557Smrgac_outfile=conftest.$ac_objext 9576ee7d557Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9586ee7d557Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9596ee7d557Smrg_lt_compiler_boilerplate=`cat conftest.err` 9606ee7d557Smrg$RM conftest* 9616ee7d557Smrg])# _LT_COMPILER_BOILERPLATE 9626ee7d557Smrg 9636ee7d557Smrg 9646ee7d557Smrg# _LT_LINKER_BOILERPLATE 9656ee7d557Smrg# ---------------------- 9666ee7d557Smrg# Check for linker boilerplate output or warnings with 9676ee7d557Smrg# the simple link test code. 9686ee7d557Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9696ee7d557Smrg[m4_require([_LT_DECL_SED])dnl 9706ee7d557Smrgac_outfile=conftest.$ac_objext 9716ee7d557Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9726ee7d557Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9736ee7d557Smrg_lt_linker_boilerplate=`cat conftest.err` 9746ee7d557Smrg$RM -r conftest* 9756ee7d557Smrg])# _LT_LINKER_BOILERPLATE 9766ee7d557Smrg 9776ee7d557Smrg 9786ee7d557Smrg# _LT_REQUIRED_DARWIN_CHECKS 9796ee7d557Smrg# ------------------------- 9806ee7d557Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9816ee7d557Smrg case $host_os in 9826ee7d557Smrg rhapsody* | darwin*) 9836ee7d557Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9846ee7d557Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9856ee7d557Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9866ee7d557Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9876ee7d557Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9886ee7d557Smrg _LT_DECL([], [DSYMUTIL], [1], 9896ee7d557Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9906ee7d557Smrg _LT_DECL([], [NMEDIT], [1], 9916ee7d557Smrg [Tool to change global to local symbols on Mac OS X]) 9926ee7d557Smrg _LT_DECL([], [LIPO], [1], 9936ee7d557Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9946ee7d557Smrg _LT_DECL([], [OTOOL], [1], 9956ee7d557Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9966ee7d557Smrg _LT_DECL([], [OTOOL64], [1], 9976ee7d557Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9986ee7d557Smrg 9996ee7d557Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 10006ee7d557Smrg [lt_cv_apple_cc_single_mod=no 10016ee7d557Smrg if test -z "$LT_MULTI_MODULE"; then 10026ee7d557Smrg # By default we will add the -single_module flag. You can override 10036ee7d557Smrg # by either setting the environment variable LT_MULTI_MODULE 10046ee7d557Smrg # non-empty at configure time, or by adding -multi_module to the 10056ee7d557Smrg # link flags. 10066ee7d557Smrg rm -rf libconftest.dylib* 10076ee7d557Smrg echo "int foo(void){return 1;}" > conftest.c 10086ee7d557Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10096ee7d557Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10106ee7d557Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10116ee7d557Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10126ee7d557Smrg _lt_result=$? 10136ee7d557Smrg # If there is a non-empty error log, and "single_module" 10146ee7d557Smrg # appears in it, assume the flag caused a linker warning 10156ee7d557Smrg if test -s conftest.err && $GREP single_module conftest.err; then 10166ee7d557Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10176ee7d557Smrg # Otherwise, if the output was created with a 0 exit code from 10186ee7d557Smrg # the compiler, it worked. 10196ee7d557Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10206ee7d557Smrg lt_cv_apple_cc_single_mod=yes 10216ee7d557Smrg else 10226ee7d557Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10236ee7d557Smrg fi 10246ee7d557Smrg rm -rf libconftest.dylib* 10256ee7d557Smrg rm -f conftest.* 10266ee7d557Smrg fi]) 10276ee7d557Smrg 10286ee7d557Smrg # Feature test to disable chained fixups since it is not 10296ee7d557Smrg # compatible with '-undefined dynamic_lookup' 10306ee7d557Smrg AC_CACHE_CHECK([for -no_fixup_chains linker flag], 10316ee7d557Smrg [lt_cv_support_no_fixup_chains], 10326ee7d557Smrg [ save_LDFLAGS=$LDFLAGS 10336ee7d557Smrg LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" 10346ee7d557Smrg AC_LINK_IFELSE( 10356ee7d557Smrg [AC_LANG_PROGRAM([],[])], 10366ee7d557Smrg lt_cv_support_no_fixup_chains=yes, 10376ee7d557Smrg lt_cv_support_no_fixup_chains=no 10386ee7d557Smrg ) 10396ee7d557Smrg LDFLAGS=$save_LDFLAGS 10406ee7d557Smrg ] 10416ee7d557Smrg ) 10426ee7d557Smrg 10436ee7d557Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10446ee7d557Smrg [lt_cv_ld_exported_symbols_list], 10456ee7d557Smrg [lt_cv_ld_exported_symbols_list=no 10466ee7d557Smrg save_LDFLAGS=$LDFLAGS 10476ee7d557Smrg echo "_main" > conftest.sym 10486ee7d557Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10496ee7d557Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10506ee7d557Smrg [lt_cv_ld_exported_symbols_list=yes], 10516ee7d557Smrg [lt_cv_ld_exported_symbols_list=no]) 10526ee7d557Smrg LDFLAGS=$save_LDFLAGS 10536ee7d557Smrg ]) 10546ee7d557Smrg 10556ee7d557Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10566ee7d557Smrg [lt_cv_ld_force_load=no 10576ee7d557Smrg cat > conftest.c << _LT_EOF 10586ee7d557Smrgint forced_loaded() { return 2;} 10596ee7d557Smrg_LT_EOF 10606ee7d557Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10616ee7d557Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10626ee7d557Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10636ee7d557Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10646ee7d557Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10656ee7d557Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10666ee7d557Smrg cat > conftest.c << _LT_EOF 10676ee7d557Smrgint main(void) { return 0;} 10686ee7d557Smrg_LT_EOF 10696ee7d557Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10706ee7d557Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10716ee7d557Smrg _lt_result=$? 10726ee7d557Smrg if test -s conftest.err && $GREP force_load conftest.err; then 10736ee7d557Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10746ee7d557Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 10756ee7d557Smrg lt_cv_ld_force_load=yes 10766ee7d557Smrg else 10776ee7d557Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10786ee7d557Smrg fi 10796ee7d557Smrg rm -f conftest.err libconftest.a conftest conftest.c 10806ee7d557Smrg rm -rf conftest.dSYM 10816ee7d557Smrg ]) 10826ee7d557Smrg case $host_os in 10836ee7d557Smrg rhapsody* | darwin1.[[012]]) 10846ee7d557Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 10856ee7d557Smrg darwin1.*) 10866ee7d557Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10876ee7d557Smrg darwin*) 10886ee7d557Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 10896ee7d557Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 10906ee7d557Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10916ee7d557Smrg *) 10926ee7d557Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' 10936ee7d557Smrg if test yes = "$lt_cv_support_no_fixup_chains"; then 10946ee7d557Smrg AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains']) 10956ee7d557Smrg fi 10966ee7d557Smrg ;; 10976ee7d557Smrg esac 10986ee7d557Smrg ;; 10996ee7d557Smrg esac 11006ee7d557Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 11016ee7d557Smrg _lt_dar_single_mod='$single_module' 11026ee7d557Smrg fi 11036ee7d557Smrg _lt_dar_needs_single_mod=no 11046ee7d557Smrg case $host_os in 11056ee7d557Smrg rhapsody* | darwin1.*) 11066ee7d557Smrg _lt_dar_needs_single_mod=yes ;; 11076ee7d557Smrg darwin*) 11086ee7d557Smrg # When targeting Mac OS X 10.4 (darwin 8) or later, 11096ee7d557Smrg # -single_module is the default and -multi_module is unsupported. 11106ee7d557Smrg # The toolchain on macOS 10.14 (darwin 18) and later cannot 11116ee7d557Smrg # target any OS version that needs -single_module. 11126ee7d557Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 11136ee7d557Smrg 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*) 11146ee7d557Smrg _lt_dar_needs_single_mod=yes ;; 11156ee7d557Smrg esac 11166ee7d557Smrg ;; 11176ee7d557Smrg esac 11186ee7d557Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 11196ee7d557Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 11206ee7d557Smrg else 11216ee7d557Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 11226ee7d557Smrg fi 11236ee7d557Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 11246ee7d557Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 11256ee7d557Smrg else 11266ee7d557Smrg _lt_dsymutil= 11276ee7d557Smrg fi 11286ee7d557Smrg ;; 11296ee7d557Smrg esac 11306ee7d557Smrg]) 11316ee7d557Smrg 11326ee7d557Smrg 11336ee7d557Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 11346ee7d557Smrg# --------------------------------- 11356ee7d557Smrg# Checks for linker and compiler features on darwin 11366ee7d557Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 11376ee7d557Smrg[ 11386ee7d557Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11396ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11406ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11416ee7d557Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11426ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 11436ee7d557Smrg if test yes = "$lt_cv_ld_force_load"; then 11446ee7d557Smrg _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\"`' 11456ee7d557Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11466ee7d557Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11476ee7d557Smrg else 11486ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11496ee7d557Smrg fi 11506ee7d557Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11516ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11526ee7d557Smrg case $cc_basename in 11536ee7d557Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11546ee7d557Smrg *) _lt_dar_can_shared=$GCC ;; 11556ee7d557Smrg esac 11566ee7d557Smrg if test yes = "$_lt_dar_can_shared"; then 11576ee7d557Smrg output_verbose_link_cmd=func_echo_all 11586ee7d557Smrg _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" 11596ee7d557Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 11606ee7d557Smrg _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" 11616ee7d557Smrg _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" 11626ee7d557Smrg m4_if([$1], [CXX], 11636ee7d557Smrg[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then 11646ee7d557Smrg _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" 11656ee7d557Smrg _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" 11666ee7d557Smrg fi 11676ee7d557Smrg],[]) 11686ee7d557Smrg else 11696ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11706ee7d557Smrg fi 11716ee7d557Smrg]) 11726ee7d557Smrg 11736ee7d557Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11746ee7d557Smrg# ---------------------------------- 11756ee7d557Smrg# Links a minimal program and checks the executable 11766ee7d557Smrg# for the system default hardcoded library path. In most cases, 11776ee7d557Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11786ee7d557Smrg# the location of the communication and MPI libs are included too. 11796ee7d557Smrg# If we don't find anything, use the default library path according 11806ee7d557Smrg# to the aix ld manual. 11816ee7d557Smrg# Store the results from the different compilers for each TAGNAME. 11826ee7d557Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11836ee7d557Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11846ee7d557Smrg[m4_require([_LT_DECL_SED])dnl 11856ee7d557Smrgif test set = "${lt_cv_aix_libpath+set}"; then 11866ee7d557Smrg aix_libpath=$lt_cv_aix_libpath 11876ee7d557Smrgelse 11886ee7d557Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11896ee7d557Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11906ee7d557Smrg lt_aix_libpath_sed='[ 11916ee7d557Smrg /Import File Strings/,/^$/ { 11926ee7d557Smrg /^0/ { 11936ee7d557Smrg s/^0 *\([^ ]*\) *$/\1/ 11946ee7d557Smrg p 11956ee7d557Smrg } 11966ee7d557Smrg }]' 11976ee7d557Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11986ee7d557Smrg # Check for a 64-bit object if we didn't find anything. 11996ee7d557Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 12006ee7d557Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 12016ee7d557Smrg fi],[]) 12026ee7d557Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 12036ee7d557Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 12046ee7d557Smrg fi 12056ee7d557Smrg ]) 12066ee7d557Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 12076ee7d557Smrgfi 12086ee7d557Smrg])# _LT_SYS_MODULE_PATH_AIX 12096ee7d557Smrg 12106ee7d557Smrg 12116ee7d557Smrg# _LT_SHELL_INIT(ARG) 12126ee7d557Smrg# ------------------- 12136ee7d557Smrgm4_define([_LT_SHELL_INIT], 12146ee7d557Smrg[m4_divert_text([M4SH-INIT], [$1 12156ee7d557Smrg])])# _LT_SHELL_INIT 12166ee7d557Smrg 12176ee7d557Smrg 12186ee7d557Smrg 12196ee7d557Smrg# _LT_PROG_ECHO_BACKSLASH 12206ee7d557Smrg# ----------------------- 12216ee7d557Smrg# Find how we can fake an echo command that does not interpret backslash. 12226ee7d557Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 12236ee7d557Smrg# of the generated configure script that will find a shell with a builtin 12246ee7d557Smrg# printf (that we can use as an echo command). 12256ee7d557Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 12266ee7d557Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12276ee7d557SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12286ee7d557SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12296ee7d557Smrg 12306ee7d557SmrgAC_MSG_CHECKING([how to print strings]) 12316ee7d557Smrg# Test print first, because it will be a builtin if present. 12326ee7d557Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 12336ee7d557Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 12346ee7d557Smrg ECHO='print -r --' 12356ee7d557Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 12366ee7d557Smrg ECHO='printf %s\n' 12376ee7d557Smrgelse 12386ee7d557Smrg # Use this function as a fallback that always works. 12396ee7d557Smrg func_fallback_echo () 12406ee7d557Smrg { 12416ee7d557Smrg eval 'cat <<_LTECHO_EOF 12426ee7d557Smrg$[]1 12436ee7d557Smrg_LTECHO_EOF' 12446ee7d557Smrg } 12456ee7d557Smrg ECHO='func_fallback_echo' 12466ee7d557Smrgfi 12476ee7d557Smrg 12486ee7d557Smrg# func_echo_all arg... 12496ee7d557Smrg# Invoke $ECHO with all args, space-separated. 12506ee7d557Smrgfunc_echo_all () 12516ee7d557Smrg{ 12526ee7d557Smrg $ECHO "$*" 12536ee7d557Smrg} 12546ee7d557Smrg 12556ee7d557Smrgcase $ECHO in 12566ee7d557Smrg printf*) AC_MSG_RESULT([printf]) ;; 12576ee7d557Smrg print*) AC_MSG_RESULT([print -r]) ;; 12586ee7d557Smrg *) AC_MSG_RESULT([cat]) ;; 12596ee7d557Smrgesac 12606ee7d557Smrg 12616ee7d557Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 12626ee7d557Smrg[_AS_DETECT_SUGGESTED([ 12636ee7d557Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12646ee7d557Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12656ee7d557Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12666ee7d557Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12676ee7d557Smrg PATH=/empty FPATH=/empty; export PATH FPATH 12686ee7d557Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12696ee7d557Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12706ee7d557Smrg 12716ee7d557Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12726ee7d557Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12736ee7d557Smrg])# _LT_PROG_ECHO_BACKSLASH 12746ee7d557Smrg 12756ee7d557Smrg 12766ee7d557Smrg# _LT_WITH_SYSROOT 12776ee7d557Smrg# ---------------- 12786ee7d557SmrgAC_DEFUN([_LT_WITH_SYSROOT], 12796ee7d557Smrg[m4_require([_LT_DECL_SED])dnl 12806ee7d557SmrgAC_MSG_CHECKING([for sysroot]) 12816ee7d557SmrgAC_ARG_WITH([sysroot], 12826ee7d557Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 12836ee7d557Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 12846ee7d557Smrg if not specified).])], 12856ee7d557Smrg[], [with_sysroot=no]) 12866ee7d557Smrg 12876ee7d557Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 12886ee7d557Smrgdnl in case the user passed a directory name. 12896ee7d557Smrglt_sysroot= 12906ee7d557Smrgcase $with_sysroot in #( 12916ee7d557Smrg yes) 12926ee7d557Smrg if test yes = "$GCC"; then 12936ee7d557Smrg # Trim trailing / since we'll always append absolute paths and we want 12946ee7d557Smrg # to avoid //, if only for less confusing output for the user. 12956ee7d557Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` 12966ee7d557Smrg fi 12976ee7d557Smrg ;; #( 12986ee7d557Smrg /*) 12996ee7d557Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 13006ee7d557Smrg ;; #( 13016ee7d557Smrg no|'') 13026ee7d557Smrg ;; #( 13036ee7d557Smrg *) 13046ee7d557Smrg AC_MSG_RESULT([$with_sysroot]) 13056ee7d557Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 13066ee7d557Smrg ;; 13076ee7d557Smrgesac 13086ee7d557Smrg 13096ee7d557Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 13106ee7d557Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 13116ee7d557Smrg[dependent libraries, and where our libraries should be installed.])]) 13126ee7d557Smrg 13136ee7d557Smrg# _LT_ENABLE_LOCK 13146ee7d557Smrg# --------------- 13156ee7d557Smrgm4_defun([_LT_ENABLE_LOCK], 13166ee7d557Smrg[AC_ARG_ENABLE([libtool-lock], 13176ee7d557Smrg [AS_HELP_STRING([--disable-libtool-lock], 13186ee7d557Smrg [avoid locking (might break parallel builds)])]) 13196ee7d557Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 13206ee7d557Smrg 13216ee7d557Smrg# Some flags need to be propagated to the compiler or linker for good 13226ee7d557Smrg# libtool support. 13236ee7d557Smrgcase $host in 13246ee7d557Smrgia64-*-hpux*) 13256ee7d557Smrg # Find out what ABI is being produced by ac_compile, and set mode 13266ee7d557Smrg # options accordingly. 13276ee7d557Smrg echo 'int i;' > conftest.$ac_ext 13286ee7d557Smrg if AC_TRY_EVAL(ac_compile); then 13296ee7d557Smrg case `$FILECMD conftest.$ac_objext` in 13306ee7d557Smrg *ELF-32*) 13316ee7d557Smrg HPUX_IA64_MODE=32 13326ee7d557Smrg ;; 13336ee7d557Smrg *ELF-64*) 13346ee7d557Smrg HPUX_IA64_MODE=64 13356ee7d557Smrg ;; 13366ee7d557Smrg esac 13376ee7d557Smrg fi 13386ee7d557Smrg rm -rf conftest* 13396ee7d557Smrg ;; 13406ee7d557Smrg*-*-irix6*) 13416ee7d557Smrg # Find out what ABI is being produced by ac_compile, and set linker 13426ee7d557Smrg # options accordingly. 13436ee7d557Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13446ee7d557Smrg if AC_TRY_EVAL(ac_compile); then 13456ee7d557Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 13466ee7d557Smrg case `$FILECMD conftest.$ac_objext` in 13476ee7d557Smrg *32-bit*) 13486ee7d557Smrg LD="${LD-ld} -melf32bsmip" 13496ee7d557Smrg ;; 13506ee7d557Smrg *N32*) 13516ee7d557Smrg LD="${LD-ld} -melf32bmipn32" 13526ee7d557Smrg ;; 13536ee7d557Smrg *64-bit*) 13546ee7d557Smrg LD="${LD-ld} -melf64bmip" 13556ee7d557Smrg ;; 13566ee7d557Smrg esac 13576ee7d557Smrg else 13586ee7d557Smrg case `$FILECMD conftest.$ac_objext` in 13596ee7d557Smrg *32-bit*) 13606ee7d557Smrg LD="${LD-ld} -32" 13616ee7d557Smrg ;; 13626ee7d557Smrg *N32*) 13636ee7d557Smrg LD="${LD-ld} -n32" 13646ee7d557Smrg ;; 13656ee7d557Smrg *64-bit*) 13666ee7d557Smrg LD="${LD-ld} -64" 13676ee7d557Smrg ;; 13686ee7d557Smrg esac 13696ee7d557Smrg fi 13706ee7d557Smrg fi 13716ee7d557Smrg rm -rf conftest* 13726ee7d557Smrg ;; 13736ee7d557Smrg 13746ee7d557Smrgmips64*-*linux*) 13756ee7d557Smrg # Find out what ABI is being produced by ac_compile, and set linker 13766ee7d557Smrg # options accordingly. 13776ee7d557Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13786ee7d557Smrg if AC_TRY_EVAL(ac_compile); then 13796ee7d557Smrg emul=elf 13806ee7d557Smrg case `$FILECMD conftest.$ac_objext` in 13816ee7d557Smrg *32-bit*) 13826ee7d557Smrg emul="${emul}32" 13836ee7d557Smrg ;; 13846ee7d557Smrg *64-bit*) 13856ee7d557Smrg emul="${emul}64" 13866ee7d557Smrg ;; 13876ee7d557Smrg esac 13886ee7d557Smrg case `$FILECMD conftest.$ac_objext` in 13896ee7d557Smrg *MSB*) 13906ee7d557Smrg emul="${emul}btsmip" 13916ee7d557Smrg ;; 13926ee7d557Smrg *LSB*) 13936ee7d557Smrg emul="${emul}ltsmip" 13946ee7d557Smrg ;; 13956ee7d557Smrg esac 13966ee7d557Smrg case `$FILECMD conftest.$ac_objext` in 13976ee7d557Smrg *N32*) 13986ee7d557Smrg emul="${emul}n32" 13996ee7d557Smrg ;; 14006ee7d557Smrg esac 14016ee7d557Smrg LD="${LD-ld} -m $emul" 14026ee7d557Smrg fi 14036ee7d557Smrg rm -rf conftest* 14046ee7d557Smrg ;; 14056ee7d557Smrg 14066ee7d557Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 14076ee7d557Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) 14086ee7d557Smrg # Find out what ABI is being produced by ac_compile, and set linker 14096ee7d557Smrg # options accordingly. Note that the listed cases only cover the 14106ee7d557Smrg # situations where additional linker options are needed (such as when 14116ee7d557Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 14126ee7d557Smrg # vice versa); the common cases where no linker options are needed do 14136ee7d557Smrg # not appear in the list. 14146ee7d557Smrg echo 'int i;' > conftest.$ac_ext 14156ee7d557Smrg if AC_TRY_EVAL(ac_compile); then 14166ee7d557Smrg case `$FILECMD conftest.o` in 14176ee7d557Smrg *32-bit*) 14186ee7d557Smrg case $host in 14196ee7d557Smrg x86_64-*kfreebsd*-gnu) 14206ee7d557Smrg LD="${LD-ld} -m elf_i386_fbsd" 14216ee7d557Smrg ;; 14226ee7d557Smrg x86_64-*linux*|x86_64-gnu*) 14236ee7d557Smrg case `$FILECMD conftest.o` in 14246ee7d557Smrg *x86-64*) 14256ee7d557Smrg LD="${LD-ld} -m elf32_x86_64" 14266ee7d557Smrg ;; 14276ee7d557Smrg *) 14286ee7d557Smrg LD="${LD-ld} -m elf_i386" 14296ee7d557Smrg ;; 14306ee7d557Smrg esac 14316ee7d557Smrg ;; 14326ee7d557Smrg powerpc64le-*linux*) 14336ee7d557Smrg LD="${LD-ld} -m elf32lppclinux" 14346ee7d557Smrg ;; 14356ee7d557Smrg powerpc64-*linux*) 14366ee7d557Smrg LD="${LD-ld} -m elf32ppclinux" 14376ee7d557Smrg ;; 14386ee7d557Smrg s390x-*linux*) 14396ee7d557Smrg LD="${LD-ld} -m elf_s390" 14406ee7d557Smrg ;; 14416ee7d557Smrg sparc64-*linux*) 14426ee7d557Smrg LD="${LD-ld} -m elf32_sparc" 14436ee7d557Smrg ;; 14446ee7d557Smrg esac 14456ee7d557Smrg ;; 14466ee7d557Smrg *64-bit*) 14476ee7d557Smrg case $host in 14486ee7d557Smrg x86_64-*kfreebsd*-gnu) 14496ee7d557Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 14506ee7d557Smrg ;; 14516ee7d557Smrg x86_64-*linux*|x86_64-gnu*) 14526ee7d557Smrg LD="${LD-ld} -m elf_x86_64" 14536ee7d557Smrg ;; 14546ee7d557Smrg powerpcle-*linux*) 14556ee7d557Smrg LD="${LD-ld} -m elf64lppc" 14566ee7d557Smrg ;; 14576ee7d557Smrg powerpc-*linux*) 14586ee7d557Smrg LD="${LD-ld} -m elf64ppc" 14596ee7d557Smrg ;; 14606ee7d557Smrg s390*-*linux*|s390*-*tpf*) 14616ee7d557Smrg LD="${LD-ld} -m elf64_s390" 14626ee7d557Smrg ;; 14636ee7d557Smrg sparc*-*linux*) 14646ee7d557Smrg LD="${LD-ld} -m elf64_sparc" 14656ee7d557Smrg ;; 14666ee7d557Smrg esac 14676ee7d557Smrg ;; 14686ee7d557Smrg esac 14696ee7d557Smrg fi 14706ee7d557Smrg rm -rf conftest* 14716ee7d557Smrg ;; 14726ee7d557Smrg 14736ee7d557Smrg*-*-sco3.2v5*) 14746ee7d557Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 14756ee7d557Smrg SAVE_CFLAGS=$CFLAGS 14766ee7d557Smrg CFLAGS="$CFLAGS -belf" 14776ee7d557Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 14786ee7d557Smrg [AC_LANG_PUSH(C) 14796ee7d557Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 14806ee7d557Smrg AC_LANG_POP]) 14816ee7d557Smrg if test yes != "$lt_cv_cc_needs_belf"; then 14826ee7d557Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 14836ee7d557Smrg CFLAGS=$SAVE_CFLAGS 14846ee7d557Smrg fi 14856ee7d557Smrg ;; 14866ee7d557Smrg*-*solaris*) 14876ee7d557Smrg # Find out what ABI is being produced by ac_compile, and set linker 14886ee7d557Smrg # options accordingly. 14896ee7d557Smrg echo 'int i;' > conftest.$ac_ext 14906ee7d557Smrg if AC_TRY_EVAL(ac_compile); then 14916ee7d557Smrg case `$FILECMD conftest.o` in 14926ee7d557Smrg *64-bit*) 14936ee7d557Smrg case $lt_cv_prog_gnu_ld in 14946ee7d557Smrg yes*) 14956ee7d557Smrg case $host in 14966ee7d557Smrg i?86-*-solaris*|x86_64-*-solaris*) 14976ee7d557Smrg LD="${LD-ld} -m elf_x86_64" 14986ee7d557Smrg ;; 14996ee7d557Smrg sparc*-*-solaris*) 15006ee7d557Smrg LD="${LD-ld} -m elf64_sparc" 15016ee7d557Smrg ;; 15026ee7d557Smrg esac 15036ee7d557Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 15046ee7d557Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 15056ee7d557Smrg LD=${LD-ld}_sol2 15066ee7d557Smrg fi 15076ee7d557Smrg ;; 15086ee7d557Smrg *) 15096ee7d557Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 15106ee7d557Smrg LD="${LD-ld} -64" 15116ee7d557Smrg fi 15126ee7d557Smrg ;; 15136ee7d557Smrg esac 15146ee7d557Smrg ;; 15156ee7d557Smrg esac 15166ee7d557Smrg fi 15176ee7d557Smrg rm -rf conftest* 15186ee7d557Smrg ;; 15196ee7d557Smrgesac 15206ee7d557Smrg 15216ee7d557Smrgneed_locks=$enable_libtool_lock 15226ee7d557Smrg])# _LT_ENABLE_LOCK 15236ee7d557Smrg 15246ee7d557Smrg 15256ee7d557Smrg# _LT_PROG_AR 15266ee7d557Smrg# ----------- 15276ee7d557Smrgm4_defun([_LT_PROG_AR], 15286ee7d557Smrg[AC_CHECK_TOOLS(AR, [ar], false) 15296ee7d557Smrg: ${AR=ar} 15306ee7d557Smrg_LT_DECL([], [AR], [1], [The archiver]) 15316ee7d557Smrg 15326ee7d557Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 15336ee7d557Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 15346ee7d557Smrg# higher priority because that's what people were doing historically (setting 15356ee7d557Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 15366ee7d557Smrg# variable obsoleted/removed. 15376ee7d557Smrg 15386ee7d557Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 15396ee7d557Smrglt_ar_flags=$AR_FLAGS 15406ee7d557Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 15416ee7d557Smrg 15426ee7d557Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 15436ee7d557Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 15446ee7d557Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 15456ee7d557Smrg [Flags to create an archive]) 15466ee7d557Smrg 15476ee7d557SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 15486ee7d557Smrg [lt_cv_ar_at_file=no 15496ee7d557Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 15506ee7d557Smrg [echo conftest.$ac_objext > conftest.lst 15516ee7d557Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 15526ee7d557Smrg AC_TRY_EVAL([lt_ar_try]) 15536ee7d557Smrg if test 0 -eq "$ac_status"; then 15546ee7d557Smrg # Ensure the archiver fails upon bogus file names. 15556ee7d557Smrg rm -f conftest.$ac_objext libconftest.a 15566ee7d557Smrg AC_TRY_EVAL([lt_ar_try]) 15576ee7d557Smrg if test 0 -ne "$ac_status"; then 15586ee7d557Smrg lt_cv_ar_at_file=@ 15596ee7d557Smrg fi 15606ee7d557Smrg fi 15616ee7d557Smrg rm -f conftest.* libconftest.a 15626ee7d557Smrg ]) 15636ee7d557Smrg ]) 15646ee7d557Smrg 15656ee7d557Smrgif test no = "$lt_cv_ar_at_file"; then 15666ee7d557Smrg archiver_list_spec= 15676ee7d557Smrgelse 15686ee7d557Smrg archiver_list_spec=$lt_cv_ar_at_file 15696ee7d557Smrgfi 15706ee7d557Smrg_LT_DECL([], [archiver_list_spec], [1], 15716ee7d557Smrg [How to feed a file listing to the archiver]) 15726ee7d557Smrg])# _LT_PROG_AR 15736ee7d557Smrg 15746ee7d557Smrg 15756ee7d557Smrg# _LT_CMD_OLD_ARCHIVE 15766ee7d557Smrg# ------------------- 15776ee7d557Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 15786ee7d557Smrg[_LT_PROG_AR 15796ee7d557Smrg 15806ee7d557SmrgAC_CHECK_TOOL(STRIP, strip, :) 15816ee7d557Smrgtest -z "$STRIP" && STRIP=: 15826ee7d557Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 15836ee7d557Smrg 15846ee7d557SmrgAC_REQUIRE([AC_PROG_RANLIB]) 15856ee7d557Smrgtest -z "$RANLIB" && RANLIB=: 15866ee7d557Smrg_LT_DECL([], [RANLIB], [1], 15876ee7d557Smrg [Commands used to install an old-style archive]) 15886ee7d557Smrg 15896ee7d557Smrg# Determine commands to create old-style static archives. 15906ee7d557Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15916ee7d557Smrgold_postinstall_cmds='chmod 644 $oldlib' 15926ee7d557Smrgold_postuninstall_cmds= 15936ee7d557Smrg 15946ee7d557Smrgif test -n "$RANLIB"; then 15956ee7d557Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15966ee7d557Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15976ee7d557Smrgfi 15986ee7d557Smrg 15996ee7d557Smrgcase $host_os in 16006ee7d557Smrg darwin*) 16016ee7d557Smrg lock_old_archive_extraction=yes ;; 16026ee7d557Smrg *) 16036ee7d557Smrg lock_old_archive_extraction=no ;; 16046ee7d557Smrgesac 16056ee7d557Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 16066ee7d557Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 16076ee7d557Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 16086ee7d557Smrg [Commands used to build an old-style archive]) 16096ee7d557Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 16106ee7d557Smrg [Whether to use a lock for old archive extraction]) 16116ee7d557Smrg])# _LT_CMD_OLD_ARCHIVE 16126ee7d557Smrg 16136ee7d557Smrg 16146ee7d557Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16156ee7d557Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 16166ee7d557Smrg# ---------------------------------------------------------------- 16176ee7d557Smrg# Check whether the given compiler option works 16186ee7d557SmrgAC_DEFUN([_LT_COMPILER_OPTION], 16196ee7d557Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16206ee7d557Smrgm4_require([_LT_DECL_SED])dnl 16216ee7d557SmrgAC_CACHE_CHECK([$1], [$2], 16226ee7d557Smrg [$2=no 16236ee7d557Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 16246ee7d557Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 16256ee7d557Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 16266ee7d557Smrg # Insert the option either (1) after the last *FLAGS variable, or 16276ee7d557Smrg # (2) before a word containing "conftest.", or (3) at the end. 16286ee7d557Smrg # Note that $ac_compile itself does not contain backslashes and begins 16296ee7d557Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 16306ee7d557Smrg # The option is referenced via a variable to avoid confusing sed. 16316ee7d557Smrg lt_compile=`echo "$ac_compile" | $SED \ 16326ee7d557Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16336ee7d557Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 16346ee7d557Smrg -e 's:$: $lt_compiler_flag:'` 16356ee7d557Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 16366ee7d557Smrg (eval "$lt_compile" 2>conftest.err) 16376ee7d557Smrg ac_status=$? 16386ee7d557Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 16396ee7d557Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 16406ee7d557Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 16416ee7d557Smrg # The compiler can only warn and ignore the option if not recognized 16426ee7d557Smrg # So say no if there are warnings other than the usual output. 16436ee7d557Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 16446ee7d557Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16456ee7d557Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 16466ee7d557Smrg $2=yes 16476ee7d557Smrg fi 16486ee7d557Smrg fi 16496ee7d557Smrg $RM conftest* 16506ee7d557Smrg]) 16516ee7d557Smrg 16526ee7d557Smrgif test yes = "[$]$2"; then 16536ee7d557Smrg m4_if([$5], , :, [$5]) 16546ee7d557Smrgelse 16556ee7d557Smrg m4_if([$6], , :, [$6]) 16566ee7d557Smrgfi 16576ee7d557Smrg])# _LT_COMPILER_OPTION 16586ee7d557Smrg 16596ee7d557Smrg# Old name: 16606ee7d557SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16616ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 16626ee7d557Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 16636ee7d557Smrg 16646ee7d557Smrg 16656ee7d557Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16666ee7d557Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16676ee7d557Smrg# ---------------------------------------------------- 16686ee7d557Smrg# Check whether the given linker option works 16696ee7d557SmrgAC_DEFUN([_LT_LINKER_OPTION], 16706ee7d557Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16716ee7d557Smrgm4_require([_LT_DECL_SED])dnl 16726ee7d557SmrgAC_CACHE_CHECK([$1], [$2], 16736ee7d557Smrg [$2=no 16746ee7d557Smrg save_LDFLAGS=$LDFLAGS 16756ee7d557Smrg LDFLAGS="$LDFLAGS $3" 16766ee7d557Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 16776ee7d557Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 16786ee7d557Smrg # The linker can only warn and ignore the option if not recognized 16796ee7d557Smrg # So say no if there are warnings 16806ee7d557Smrg if test -s conftest.err; then 16816ee7d557Smrg # Append any errors to the config.log. 16826ee7d557Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 16836ee7d557Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 16846ee7d557Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16856ee7d557Smrg if diff conftest.exp conftest.er2 >/dev/null; then 16866ee7d557Smrg $2=yes 16876ee7d557Smrg fi 16886ee7d557Smrg else 16896ee7d557Smrg $2=yes 16906ee7d557Smrg fi 16916ee7d557Smrg fi 16926ee7d557Smrg $RM -r conftest* 16936ee7d557Smrg LDFLAGS=$save_LDFLAGS 16946ee7d557Smrg]) 16956ee7d557Smrg 16966ee7d557Smrgif test yes = "[$]$2"; then 16976ee7d557Smrg m4_if([$4], , :, [$4]) 16986ee7d557Smrgelse 16996ee7d557Smrg m4_if([$5], , :, [$5]) 17006ee7d557Smrgfi 17016ee7d557Smrg])# _LT_LINKER_OPTION 17026ee7d557Smrg 17036ee7d557Smrg# Old name: 17046ee7d557SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 17056ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 17066ee7d557Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 17076ee7d557Smrg 17086ee7d557Smrg 17096ee7d557Smrg# LT_CMD_MAX_LEN 17106ee7d557Smrg#--------------- 17116ee7d557SmrgAC_DEFUN([LT_CMD_MAX_LEN], 17126ee7d557Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 17136ee7d557Smrg# find the maximum length of command line arguments 17146ee7d557SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 17156ee7d557SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 17166ee7d557Smrg i=0 17176ee7d557Smrg teststring=ABCD 17186ee7d557Smrg 17196ee7d557Smrg case $build_os in 17206ee7d557Smrg msdosdjgpp*) 17216ee7d557Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 17226ee7d557Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 17236ee7d557Smrg # during glob expansion). Even if it were fixed, the result of this 17246ee7d557Smrg # check would be larger than it should be. 17256ee7d557Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 17266ee7d557Smrg ;; 17276ee7d557Smrg 17286ee7d557Smrg gnu* | ironclad*) 17296ee7d557Smrg # Under GNU Hurd and Ironclad, this test is not required because there 17306ee7d557Smrg # is no limit to the length of command line arguments. 17316ee7d557Smrg # Libtool will interpret -1 as no limit whatsoever 17326ee7d557Smrg lt_cv_sys_max_cmd_len=-1; 17336ee7d557Smrg ;; 17346ee7d557Smrg 17356ee7d557Smrg cygwin* | mingw* | windows* | cegcc*) 17366ee7d557Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 17376ee7d557Smrg # about 5 minutes as the teststring grows exponentially. 17386ee7d557Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 17396ee7d557Smrg # you end up with a "frozen" computer, even though with patience 17406ee7d557Smrg # the test eventually succeeds (with a max line length of 256k). 17416ee7d557Smrg # Instead, let's just punt: use the minimum linelength reported by 17426ee7d557Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 17436ee7d557Smrg lt_cv_sys_max_cmd_len=8192; 17446ee7d557Smrg ;; 17456ee7d557Smrg 17466ee7d557Smrg mint*) 17476ee7d557Smrg # On MiNT this can take a long time and run out of memory. 17486ee7d557Smrg lt_cv_sys_max_cmd_len=8192; 17496ee7d557Smrg ;; 17506ee7d557Smrg 17516ee7d557Smrg amigaos*) 17526ee7d557Smrg # On AmigaOS with pdksh, this test takes hours, literally. 17536ee7d557Smrg # So we just punt and use a minimum line length of 8192. 17546ee7d557Smrg lt_cv_sys_max_cmd_len=8192; 17556ee7d557Smrg ;; 17566ee7d557Smrg 17576ee7d557Smrg darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 17586ee7d557Smrg # This has been around since 386BSD, at least. Likely further. 17596ee7d557Smrg if test -x /sbin/sysctl; then 17606ee7d557Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 17616ee7d557Smrg elif test -x /usr/sbin/sysctl; then 17626ee7d557Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 17636ee7d557Smrg else 17646ee7d557Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 17656ee7d557Smrg fi 17666ee7d557Smrg # And add a safety zone 17676ee7d557Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17686ee7d557Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17696ee7d557Smrg ;; 17706ee7d557Smrg 17716ee7d557Smrg interix*) 17726ee7d557Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 17736ee7d557Smrg lt_cv_sys_max_cmd_len=196608 17746ee7d557Smrg ;; 17756ee7d557Smrg 17766ee7d557Smrg os2*) 17776ee7d557Smrg # The test takes a long time on OS/2. 17786ee7d557Smrg lt_cv_sys_max_cmd_len=8192 17796ee7d557Smrg ;; 17806ee7d557Smrg 17816ee7d557Smrg osf*) 17826ee7d557Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 17836ee7d557Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 17846ee7d557Smrg # nice to cause kernel panics so lets avoid the loop below. 17856ee7d557Smrg # First set a reasonable default. 17866ee7d557Smrg lt_cv_sys_max_cmd_len=16384 17876ee7d557Smrg # 17886ee7d557Smrg if test -x /sbin/sysconfig; then 17896ee7d557Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17906ee7d557Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17916ee7d557Smrg esac 17926ee7d557Smrg fi 17936ee7d557Smrg ;; 17946ee7d557Smrg sco3.2v5*) 17956ee7d557Smrg lt_cv_sys_max_cmd_len=102400 17966ee7d557Smrg ;; 17976ee7d557Smrg sysv5* | sco5v6* | sysv4.2uw2*) 17986ee7d557Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17996ee7d557Smrg if test -n "$kargmax"; then 18006ee7d557Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 18016ee7d557Smrg else 18026ee7d557Smrg lt_cv_sys_max_cmd_len=32768 18036ee7d557Smrg fi 18046ee7d557Smrg ;; 18056ee7d557Smrg *) 18066ee7d557Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 18076ee7d557Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 18086ee7d557Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 18096ee7d557Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 18106ee7d557Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 18116ee7d557Smrg else 18126ee7d557Smrg # Make teststring a little bigger before we do anything with it. 18136ee7d557Smrg # a 1K string should be a reasonable start. 18146ee7d557Smrg for i in 1 2 3 4 5 6 7 8; do 18156ee7d557Smrg teststring=$teststring$teststring 18166ee7d557Smrg done 18176ee7d557Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 18186ee7d557Smrg # If test is not a shell built-in, we'll probably end up computing a 18196ee7d557Smrg # maximum length that is only half of the actual maximum length, but 18206ee7d557Smrg # we can't tell. 18216ee7d557Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 18226ee7d557Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 18236ee7d557Smrg test 17 != "$i" # 1/2 MB should be enough 18246ee7d557Smrg do 18256ee7d557Smrg i=`expr $i + 1` 18266ee7d557Smrg teststring=$teststring$teststring 18276ee7d557Smrg done 18286ee7d557Smrg # Only check the string length outside the loop. 18296ee7d557Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18306ee7d557Smrg teststring= 18316ee7d557Smrg # Add a significant safety factor because C++ compilers can tack on 18326ee7d557Smrg # massive amounts of additional arguments before passing them to the 18336ee7d557Smrg # linker. It appears as though 1/2 is a usable value. 18346ee7d557Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18356ee7d557Smrg fi 18366ee7d557Smrg ;; 18376ee7d557Smrg esac 18386ee7d557Smrg]) 18396ee7d557Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 18406ee7d557Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 18416ee7d557Smrgelse 18426ee7d557Smrg AC_MSG_RESULT(none) 18436ee7d557Smrgfi 18446ee7d557Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18456ee7d557Smrg_LT_DECL([], [max_cmd_len], [0], 18466ee7d557Smrg [What is the maximum length of a command?]) 18476ee7d557Smrg])# LT_CMD_MAX_LEN 18486ee7d557Smrg 18496ee7d557Smrg# Old name: 18506ee7d557SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18516ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 18526ee7d557Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 18536ee7d557Smrg 18546ee7d557Smrg 18556ee7d557Smrg# _LT_HEADER_DLFCN 18566ee7d557Smrg# ---------------- 18576ee7d557Smrgm4_defun([_LT_HEADER_DLFCN], 18586ee7d557Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18596ee7d557Smrg])# _LT_HEADER_DLFCN 18606ee7d557Smrg 18616ee7d557Smrg 18626ee7d557Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18636ee7d557Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18646ee7d557Smrg# ---------------------------------------------------------------- 18656ee7d557Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 18666ee7d557Smrg[m4_require([_LT_HEADER_DLFCN])dnl 18676ee7d557Smrgif test yes = "$cross_compiling"; then : 18686ee7d557Smrg [$4] 18696ee7d557Smrgelse 18706ee7d557Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 18716ee7d557Smrg lt_status=$lt_dlunknown 18726ee7d557Smrg cat > conftest.$ac_ext <<_LT_EOF 18736ee7d557Smrg[#line $LINENO "configure" 18746ee7d557Smrg#include "confdefs.h" 18756ee7d557Smrg 18766ee7d557Smrg#if HAVE_DLFCN_H 18776ee7d557Smrg#include <dlfcn.h> 18786ee7d557Smrg#endif 18796ee7d557Smrg 18806ee7d557Smrg#include <stdio.h> 18816ee7d557Smrg 18826ee7d557Smrg#ifdef RTLD_GLOBAL 18836ee7d557Smrg# define LT_DLGLOBAL RTLD_GLOBAL 18846ee7d557Smrg#else 18856ee7d557Smrg# ifdef DL_GLOBAL 18866ee7d557Smrg# define LT_DLGLOBAL DL_GLOBAL 18876ee7d557Smrg# else 18886ee7d557Smrg# define LT_DLGLOBAL 0 18896ee7d557Smrg# endif 18906ee7d557Smrg#endif 18916ee7d557Smrg 18926ee7d557Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18936ee7d557Smrg find out it does not work in some platform. */ 18946ee7d557Smrg#ifndef LT_DLLAZY_OR_NOW 18956ee7d557Smrg# ifdef RTLD_LAZY 18966ee7d557Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18976ee7d557Smrg# else 18986ee7d557Smrg# ifdef DL_LAZY 18996ee7d557Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 19006ee7d557Smrg# else 19016ee7d557Smrg# ifdef RTLD_NOW 19026ee7d557Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 19036ee7d557Smrg# else 19046ee7d557Smrg# ifdef DL_NOW 19056ee7d557Smrg# define LT_DLLAZY_OR_NOW DL_NOW 19066ee7d557Smrg# else 19076ee7d557Smrg# define LT_DLLAZY_OR_NOW 0 19086ee7d557Smrg# endif 19096ee7d557Smrg# endif 19106ee7d557Smrg# endif 19116ee7d557Smrg# endif 19126ee7d557Smrg#endif 19136ee7d557Smrg 19146ee7d557Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 19156ee7d557Smrg correspondingly for the symbols needed. */ 19166ee7d557Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 19176ee7d557Smrgint fnord (void) __attribute__((visibility("default"))); 19186ee7d557Smrg#endif 19196ee7d557Smrg 19206ee7d557Smrgint fnord (void) { return 42; } 19216ee7d557Smrgint main (void) 19226ee7d557Smrg{ 19236ee7d557Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 19246ee7d557Smrg int status = $lt_dlunknown; 19256ee7d557Smrg 19266ee7d557Smrg if (self) 19276ee7d557Smrg { 19286ee7d557Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 19296ee7d557Smrg else 19306ee7d557Smrg { 19316ee7d557Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 19326ee7d557Smrg else puts (dlerror ()); 19336ee7d557Smrg } 19346ee7d557Smrg /* dlclose (self); */ 19356ee7d557Smrg } 19366ee7d557Smrg else 19376ee7d557Smrg puts (dlerror ()); 19386ee7d557Smrg 19396ee7d557Smrg return status; 19406ee7d557Smrg}] 19416ee7d557Smrg_LT_EOF 19426ee7d557Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 19436ee7d557Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 19446ee7d557Smrg lt_status=$? 19456ee7d557Smrg case x$lt_status in 19466ee7d557Smrg x$lt_dlno_uscore) $1 ;; 19476ee7d557Smrg x$lt_dlneed_uscore) $2 ;; 19486ee7d557Smrg x$lt_dlunknown|x*) $3 ;; 19496ee7d557Smrg esac 19506ee7d557Smrg else : 19516ee7d557Smrg # compilation failed 19526ee7d557Smrg $3 19536ee7d557Smrg fi 19546ee7d557Smrgfi 19556ee7d557Smrgrm -fr conftest* 19566ee7d557Smrg])# _LT_TRY_DLOPEN_SELF 19576ee7d557Smrg 19586ee7d557Smrg 19596ee7d557Smrg# LT_SYS_DLOPEN_SELF 19606ee7d557Smrg# ------------------ 19616ee7d557SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19626ee7d557Smrg[m4_require([_LT_HEADER_DLFCN])dnl 19636ee7d557Smrgif test yes != "$enable_dlopen"; then 19646ee7d557Smrg enable_dlopen=unknown 19656ee7d557Smrg enable_dlopen_self=unknown 19666ee7d557Smrg enable_dlopen_self_static=unknown 19676ee7d557Smrgelse 19686ee7d557Smrg lt_cv_dlopen=no 19696ee7d557Smrg lt_cv_dlopen_libs= 19706ee7d557Smrg 19716ee7d557Smrg case $host_os in 19726ee7d557Smrg beos*) 19736ee7d557Smrg lt_cv_dlopen=load_add_on 19746ee7d557Smrg lt_cv_dlopen_libs= 19756ee7d557Smrg lt_cv_dlopen_self=yes 19766ee7d557Smrg ;; 19776ee7d557Smrg 19786ee7d557Smrg mingw* | windows* | pw32* | cegcc*) 19796ee7d557Smrg lt_cv_dlopen=LoadLibrary 19806ee7d557Smrg lt_cv_dlopen_libs= 19816ee7d557Smrg ;; 19826ee7d557Smrg 19836ee7d557Smrg cygwin*) 19846ee7d557Smrg lt_cv_dlopen=dlopen 19856ee7d557Smrg lt_cv_dlopen_libs= 19866ee7d557Smrg ;; 19876ee7d557Smrg 19886ee7d557Smrg darwin*) 19896ee7d557Smrg # if libdl is installed we need to link against it 19906ee7d557Smrg AC_CHECK_LIB([dl], [dlopen], 19916ee7d557Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 19926ee7d557Smrg lt_cv_dlopen=dyld 19936ee7d557Smrg lt_cv_dlopen_libs= 19946ee7d557Smrg lt_cv_dlopen_self=yes 19956ee7d557Smrg ]) 19966ee7d557Smrg ;; 19976ee7d557Smrg 19986ee7d557Smrg tpf*) 19996ee7d557Smrg # Don't try to run any link tests for TPF. We know it's impossible 20006ee7d557Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 20016ee7d557Smrg lt_cv_dlopen=dlopen 20026ee7d557Smrg lt_cv_dlopen_libs= 20036ee7d557Smrg lt_cv_dlopen_self=no 20046ee7d557Smrg ;; 20056ee7d557Smrg 20066ee7d557Smrg *) 20076ee7d557Smrg AC_CHECK_FUNC([shl_load], 20086ee7d557Smrg [lt_cv_dlopen=shl_load], 20096ee7d557Smrg [AC_CHECK_LIB([dld], [shl_load], 20106ee7d557Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 20116ee7d557Smrg [AC_CHECK_FUNC([dlopen], 20126ee7d557Smrg [lt_cv_dlopen=dlopen], 20136ee7d557Smrg [AC_CHECK_LIB([dl], [dlopen], 20146ee7d557Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 20156ee7d557Smrg [AC_CHECK_LIB([svld], [dlopen], 20166ee7d557Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 20176ee7d557Smrg [AC_CHECK_LIB([dld], [dld_link], 20186ee7d557Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 20196ee7d557Smrg ]) 20206ee7d557Smrg ]) 20216ee7d557Smrg ]) 20226ee7d557Smrg ]) 20236ee7d557Smrg ]) 20246ee7d557Smrg ;; 20256ee7d557Smrg esac 20266ee7d557Smrg 20276ee7d557Smrg if test no = "$lt_cv_dlopen"; then 20286ee7d557Smrg enable_dlopen=no 20296ee7d557Smrg else 20306ee7d557Smrg enable_dlopen=yes 20316ee7d557Smrg fi 20326ee7d557Smrg 20336ee7d557Smrg case $lt_cv_dlopen in 20346ee7d557Smrg dlopen) 20356ee7d557Smrg save_CPPFLAGS=$CPPFLAGS 20366ee7d557Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 20376ee7d557Smrg 20386ee7d557Smrg save_LDFLAGS=$LDFLAGS 20396ee7d557Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 20406ee7d557Smrg 20416ee7d557Smrg save_LIBS=$LIBS 20426ee7d557Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 20436ee7d557Smrg 20446ee7d557Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 20456ee7d557Smrg lt_cv_dlopen_self, [dnl 20466ee7d557Smrg _LT_TRY_DLOPEN_SELF( 20476ee7d557Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 20486ee7d557Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20496ee7d557Smrg ]) 20506ee7d557Smrg 20516ee7d557Smrg if test yes = "$lt_cv_dlopen_self"; then 20526ee7d557Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 20536ee7d557Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20546ee7d557Smrg lt_cv_dlopen_self_static, [dnl 20556ee7d557Smrg _LT_TRY_DLOPEN_SELF( 20566ee7d557Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 20576ee7d557Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 20586ee7d557Smrg ]) 20596ee7d557Smrg fi 20606ee7d557Smrg 20616ee7d557Smrg CPPFLAGS=$save_CPPFLAGS 20626ee7d557Smrg LDFLAGS=$save_LDFLAGS 20636ee7d557Smrg LIBS=$save_LIBS 20646ee7d557Smrg ;; 20656ee7d557Smrg esac 20666ee7d557Smrg 20676ee7d557Smrg case $lt_cv_dlopen_self in 20686ee7d557Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 20696ee7d557Smrg *) enable_dlopen_self=unknown ;; 20706ee7d557Smrg esac 20716ee7d557Smrg 20726ee7d557Smrg case $lt_cv_dlopen_self_static in 20736ee7d557Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 20746ee7d557Smrg *) enable_dlopen_self_static=unknown ;; 20756ee7d557Smrg esac 20766ee7d557Smrgfi 20776ee7d557Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20786ee7d557Smrg [Whether dlopen is supported]) 20796ee7d557Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20806ee7d557Smrg [Whether dlopen of programs is supported]) 20816ee7d557Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20826ee7d557Smrg [Whether dlopen of statically linked programs is supported]) 20836ee7d557Smrg])# LT_SYS_DLOPEN_SELF 20846ee7d557Smrg 20856ee7d557Smrg# Old name: 20866ee7d557SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20876ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 20886ee7d557Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 20896ee7d557Smrg 20906ee7d557Smrg 20916ee7d557Smrg# _LT_COMPILER_C_O([TAGNAME]) 20926ee7d557Smrg# --------------------------- 20936ee7d557Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 20946ee7d557Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20956ee7d557Smrgm4_defun([_LT_COMPILER_C_O], 20966ee7d557Smrg[m4_require([_LT_DECL_SED])dnl 20976ee7d557Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20986ee7d557Smrgm4_require([_LT_TAG_COMPILER])dnl 20996ee7d557SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 21006ee7d557Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 21016ee7d557Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 21026ee7d557Smrg $RM -r conftest 2>/dev/null 21036ee7d557Smrg mkdir conftest 21046ee7d557Smrg cd conftest 21056ee7d557Smrg mkdir out 21066ee7d557Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 21076ee7d557Smrg 21086ee7d557Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 21096ee7d557Smrg # Insert the option either (1) after the last *FLAGS variable, or 21106ee7d557Smrg # (2) before a word containing "conftest.", or (3) at the end. 21116ee7d557Smrg # Note that $ac_compile itself does not contain backslashes and begins 21126ee7d557Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 21136ee7d557Smrg lt_compile=`echo "$ac_compile" | $SED \ 21146ee7d557Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 21156ee7d557Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 21166ee7d557Smrg -e 's:$: $lt_compiler_flag:'` 21176ee7d557Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 21186ee7d557Smrg (eval "$lt_compile" 2>out/conftest.err) 21196ee7d557Smrg ac_status=$? 21206ee7d557Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 21216ee7d557Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 21226ee7d557Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 21236ee7d557Smrg then 21246ee7d557Smrg # The compiler can only warn and ignore the option if not recognized 21256ee7d557Smrg # So say no if there are warnings 21266ee7d557Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 21276ee7d557Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 21286ee7d557Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 21296ee7d557Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 21306ee7d557Smrg fi 21316ee7d557Smrg fi 21326ee7d557Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21336ee7d557Smrg $RM conftest* 21346ee7d557Smrg # SGI C++ compiler will create directory out/ii_files/ for 21356ee7d557Smrg # template instantiation 21366ee7d557Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21376ee7d557Smrg $RM out/* && rmdir out 21386ee7d557Smrg cd .. 21396ee7d557Smrg $RM -r conftest 21406ee7d557Smrg $RM conftest* 21416ee7d557Smrg]) 21426ee7d557Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21436ee7d557Smrg [Does compiler simultaneously support -c and -o options?]) 21446ee7d557Smrg])# _LT_COMPILER_C_O 21456ee7d557Smrg 21466ee7d557Smrg 21476ee7d557Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21486ee7d557Smrg# ---------------------------------- 21496ee7d557Smrg# Check to see if we can do hard links to lock some files if needed 21506ee7d557Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21516ee7d557Smrg[m4_require([_LT_ENABLE_LOCK])dnl 21526ee7d557Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21536ee7d557Smrg_LT_COMPILER_C_O([$1]) 21546ee7d557Smrg 21556ee7d557Smrghard_links=nottested 21566ee7d557Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 21576ee7d557Smrg # do not overwrite the value of need_locks provided by the user 21586ee7d557Smrg AC_MSG_CHECKING([if we can lock with hard links]) 21596ee7d557Smrg hard_links=yes 21606ee7d557Smrg $RM conftest* 21616ee7d557Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21626ee7d557Smrg touch conftest.a 21636ee7d557Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 21646ee7d557Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21656ee7d557Smrg AC_MSG_RESULT([$hard_links]) 21666ee7d557Smrg if test no = "$hard_links"; then 21676ee7d557Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 21686ee7d557Smrg need_locks=warn 21696ee7d557Smrg fi 21706ee7d557Smrgelse 21716ee7d557Smrg need_locks=no 21726ee7d557Smrgfi 21736ee7d557Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21746ee7d557Smrg])# _LT_COMPILER_FILE_LOCKS 21756ee7d557Smrg 21766ee7d557Smrg 21776ee7d557Smrg# _LT_CHECK_OBJDIR 21786ee7d557Smrg# ---------------- 21796ee7d557Smrgm4_defun([_LT_CHECK_OBJDIR], 21806ee7d557Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 21816ee7d557Smrg[rm -f .libs 2>/dev/null 21826ee7d557Smrgmkdir .libs 2>/dev/null 21836ee7d557Smrgif test -d .libs; then 21846ee7d557Smrg lt_cv_objdir=.libs 21856ee7d557Smrgelse 21866ee7d557Smrg # MS-DOS does not allow filenames that begin with a dot. 21876ee7d557Smrg lt_cv_objdir=_libs 21886ee7d557Smrgfi 21896ee7d557Smrgrmdir .libs 2>/dev/null]) 21906ee7d557Smrgobjdir=$lt_cv_objdir 21916ee7d557Smrg_LT_DECL([], [objdir], [0], 21926ee7d557Smrg [The name of the directory that contains temporary libtool files])dnl 21936ee7d557Smrgm4_pattern_allow([LT_OBJDIR])dnl 21946ee7d557SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 21956ee7d557Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21966ee7d557Smrg])# _LT_CHECK_OBJDIR 21976ee7d557Smrg 21986ee7d557Smrg 21996ee7d557Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 22006ee7d557Smrg# -------------------------------------- 22016ee7d557Smrg# Check hardcoding attributes. 22026ee7d557Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 22036ee7d557Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 22046ee7d557Smrg_LT_TAGVAR(hardcode_action, $1)= 22056ee7d557Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 22066ee7d557Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 22076ee7d557Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 22086ee7d557Smrg 22096ee7d557Smrg # We can hardcode non-existent directories. 22106ee7d557Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 22116ee7d557Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 22126ee7d557Smrg # have to relink, otherwise we might link with an installed library 22136ee7d557Smrg # when we should be linking with a yet-to-be-installed one 22146ee7d557Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 22156ee7d557Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 22166ee7d557Smrg # Linking always hardcodes the temporary library directory. 22176ee7d557Smrg _LT_TAGVAR(hardcode_action, $1)=relink 22186ee7d557Smrg else 22196ee7d557Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 22206ee7d557Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 22216ee7d557Smrg fi 22226ee7d557Smrgelse 22236ee7d557Smrg # We cannot hardcode anything, or else we can only hardcode existing 22246ee7d557Smrg # directories. 22256ee7d557Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 22266ee7d557Smrgfi 22276ee7d557SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 22286ee7d557Smrg 22296ee7d557Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 22306ee7d557Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 22316ee7d557Smrg # Fast installation is not supported 22326ee7d557Smrg enable_fast_install=no 22336ee7d557Smrgelif test yes = "$shlibpath_overrides_runpath" || 22346ee7d557Smrg test no = "$enable_shared"; then 22356ee7d557Smrg # Fast installation is not necessary 22366ee7d557Smrg enable_fast_install=needless 22376ee7d557Smrgfi 22386ee7d557Smrg_LT_TAGDECL([], [hardcode_action], [0], 22396ee7d557Smrg [How to hardcode a shared library path into an executable]) 22406ee7d557Smrg])# _LT_LINKER_HARDCODE_LIBPATH 22416ee7d557Smrg 22426ee7d557Smrg 22436ee7d557Smrg# _LT_CMD_STRIPLIB 22446ee7d557Smrg# ---------------- 22456ee7d557Smrgm4_defun([_LT_CMD_STRIPLIB], 22466ee7d557Smrg[m4_require([_LT_DECL_EGREP]) 22476ee7d557Smrgstriplib= 22486ee7d557Smrgold_striplib= 22496ee7d557SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 22506ee7d557Smrgif test -z "$STRIP"; then 22516ee7d557Smrg AC_MSG_RESULT([no]) 22526ee7d557Smrgelse 22536ee7d557Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 22546ee7d557Smrg old_striplib="$STRIP --strip-debug" 22556ee7d557Smrg striplib="$STRIP --strip-unneeded" 22566ee7d557Smrg AC_MSG_RESULT([yes]) 22576ee7d557Smrg else 22586ee7d557Smrg case $host_os in 22596ee7d557Smrg darwin*) 22606ee7d557Smrg # FIXME - insert some real tests, host_os isn't really good enough 22616ee7d557Smrg striplib="$STRIP -x" 22626ee7d557Smrg old_striplib="$STRIP -S" 22636ee7d557Smrg AC_MSG_RESULT([yes]) 22646ee7d557Smrg ;; 22656ee7d557Smrg freebsd*) 22666ee7d557Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 22676ee7d557Smrg old_striplib="$STRIP --strip-debug" 22686ee7d557Smrg striplib="$STRIP --strip-unneeded" 22696ee7d557Smrg AC_MSG_RESULT([yes]) 22706ee7d557Smrg else 22716ee7d557Smrg AC_MSG_RESULT([no]) 22726ee7d557Smrg fi 22736ee7d557Smrg ;; 22746ee7d557Smrg *) 22756ee7d557Smrg AC_MSG_RESULT([no]) 22766ee7d557Smrg ;; 22776ee7d557Smrg esac 22786ee7d557Smrg fi 22796ee7d557Smrgfi 22806ee7d557Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22816ee7d557Smrg_LT_DECL([], [striplib], [1]) 22826ee7d557Smrg])# _LT_CMD_STRIPLIB 22836ee7d557Smrg 22846ee7d557Smrg 22856ee7d557Smrg# _LT_PREPARE_MUNGE_PATH_LIST 22866ee7d557Smrg# --------------------------- 22876ee7d557Smrg# Make sure func_munge_path_list() is defined correctly. 22886ee7d557Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 22896ee7d557Smrg[[# func_munge_path_list VARIABLE PATH 22906ee7d557Smrg# ----------------------------------- 22916ee7d557Smrg# VARIABLE is name of variable containing _space_ separated list of 22926ee7d557Smrg# directories to be munged by the contents of PATH, which is string 22936ee7d557Smrg# having a format: 22946ee7d557Smrg# "DIR[:DIR]:" 22956ee7d557Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 22966ee7d557Smrg# ":DIR[:DIR]" 22976ee7d557Smrg# string "DIR[ DIR]" will be appended to VARIABLE 22986ee7d557Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 22996ee7d557Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 23006ee7d557Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 23016ee7d557Smrg# "DIR[:DIR]" 23026ee7d557Smrg# VARIABLE will be replaced by "DIR[ DIR]" 23036ee7d557Smrgfunc_munge_path_list () 23046ee7d557Smrg{ 23056ee7d557Smrg case x@S|@2 in 23066ee7d557Smrg x) 23076ee7d557Smrg ;; 23086ee7d557Smrg *:) 23096ee7d557Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 23106ee7d557Smrg ;; 23116ee7d557Smrg x:*) 23126ee7d557Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 23136ee7d557Smrg ;; 23146ee7d557Smrg *::*) 23156ee7d557Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 23166ee7d557Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 23176ee7d557Smrg ;; 23186ee7d557Smrg *) 23196ee7d557Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 23206ee7d557Smrg ;; 23216ee7d557Smrg esac 23226ee7d557Smrg} 23236ee7d557Smrg]])# _LT_PREPARE_PATH_LIST 23246ee7d557Smrg 23256ee7d557Smrg 23266ee7d557Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 23276ee7d557Smrg# ----------------------------- 23286ee7d557Smrg# PORTME Fill in your ld.so characteristics 23296ee7d557Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 23306ee7d557Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 23316ee7d557Smrgm4_require([_LT_DECL_EGREP])dnl 23326ee7d557Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 23336ee7d557Smrgm4_require([_LT_DECL_OBJDUMP])dnl 23346ee7d557Smrgm4_require([_LT_DECL_SED])dnl 23356ee7d557Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 23366ee7d557Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23376ee7d557SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23386ee7d557Smrgm4_if([$1], 23396ee7d557Smrg [], [ 23406ee7d557Smrgif test yes = "$GCC"; then 23416ee7d557Smrg case $host_os in 23426ee7d557Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 23436ee7d557Smrg *) lt_awk_arg='/^libraries:/' ;; 23446ee7d557Smrg esac 23456ee7d557Smrg case $host_os in 23466ee7d557Smrg mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 23476ee7d557Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 23486ee7d557Smrg esac 23496ee7d557Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23506ee7d557Smrg case $lt_search_path_spec in 23516ee7d557Smrg *\;*) 23526ee7d557Smrg # if the path contains ";" then we assume it to be the separator 23536ee7d557Smrg # otherwise default to the standard path separator (i.e. ":") - it is 23546ee7d557Smrg # assumed that no part of a normal pathname contains ";" but that should 23556ee7d557Smrg # okay in the real world where ";" in dirpaths is itself problematic. 23566ee7d557Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23576ee7d557Smrg ;; 23586ee7d557Smrg *) 23596ee7d557Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23606ee7d557Smrg ;; 23616ee7d557Smrg esac 23626ee7d557Smrg # Ok, now we have the path, separated by spaces, we can step through it 23636ee7d557Smrg # and add multilib dir if necessary... 23646ee7d557Smrg lt_tmp_lt_search_path_spec= 23656ee7d557Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 23666ee7d557Smrg # ...but if some path component already ends with the multilib dir we assume 23676ee7d557Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 23686ee7d557Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 23696ee7d557Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 23706ee7d557Smrg lt_multi_os_dir= 23716ee7d557Smrg ;; 23726ee7d557Smrg esac 23736ee7d557Smrg for lt_sys_path in $lt_search_path_spec; do 23746ee7d557Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 23756ee7d557Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 23766ee7d557Smrg elif test -n "$lt_multi_os_dir"; then 23776ee7d557Smrg test -d "$lt_sys_path" && \ 23786ee7d557Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23796ee7d557Smrg fi 23806ee7d557Smrg done 23816ee7d557Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 23826ee7d557SmrgBEGIN {RS = " "; FS = "/|\n";} { 23836ee7d557Smrg lt_foo = ""; 23846ee7d557Smrg lt_count = 0; 23856ee7d557Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 23866ee7d557Smrg if ($lt_i != "" && $lt_i != ".") { 23876ee7d557Smrg if ($lt_i == "..") { 23886ee7d557Smrg lt_count++; 23896ee7d557Smrg } else { 23906ee7d557Smrg if (lt_count == 0) { 23916ee7d557Smrg lt_foo = "/" $lt_i lt_foo; 23926ee7d557Smrg } else { 23936ee7d557Smrg lt_count--; 23946ee7d557Smrg } 23956ee7d557Smrg } 23966ee7d557Smrg } 23976ee7d557Smrg } 23986ee7d557Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23996ee7d557Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 24006ee7d557Smrg}'` 24016ee7d557Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 24026ee7d557Smrg # for these hosts. 24036ee7d557Smrg case $host_os in 24046ee7d557Smrg mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 24056ee7d557Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 24066ee7d557Smrg esac 24076ee7d557Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 24086ee7d557Smrgelse 24096ee7d557Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 24106ee7d557Smrgfi]) 24116ee7d557Smrglibrary_names_spec= 24126ee7d557Smrglibname_spec='lib$name' 24136ee7d557Smrgsoname_spec= 24146ee7d557Smrgshrext_cmds=.so 24156ee7d557Smrgpostinstall_cmds= 24166ee7d557Smrgpostuninstall_cmds= 24176ee7d557Smrgfinish_cmds= 24186ee7d557Smrgfinish_eval= 24196ee7d557Smrgshlibpath_var= 24206ee7d557Smrgshlibpath_overrides_runpath=unknown 24216ee7d557Smrgversion_type=none 24226ee7d557Smrgdynamic_linker="$host_os ld.so" 24236ee7d557Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 24246ee7d557Smrgneed_lib_prefix=unknown 24256ee7d557Smrghardcode_into_libs=no 24266ee7d557Smrg 24276ee7d557Smrg# when you set need_version to no, make sure it does not cause -set_version 24286ee7d557Smrg# flags to be left without arguments 24296ee7d557Smrgneed_version=unknown 24306ee7d557Smrg 24316ee7d557SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 24326ee7d557Smrg[User-defined run-time library search path.]) 24336ee7d557Smrg 24346ee7d557Smrgcase $host_os in 24356ee7d557Smrgaix3*) 24366ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 24376ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 24386ee7d557Smrg shlibpath_var=LIBPATH 24396ee7d557Smrg 24406ee7d557Smrg # AIX 3 has no versioning support, so we append a major version to the name. 24416ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 24426ee7d557Smrg ;; 24436ee7d557Smrg 24446ee7d557Smrgaix[[4-9]]*) 24456ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 24466ee7d557Smrg need_lib_prefix=no 24476ee7d557Smrg need_version=no 24486ee7d557Smrg hardcode_into_libs=yes 24496ee7d557Smrg if test ia64 = "$host_cpu"; then 24506ee7d557Smrg # AIX 5 supports IA64 24516ee7d557Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 24526ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 24536ee7d557Smrg else 24546ee7d557Smrg # With GCC up to 2.95.x, collect2 would create an import file 24556ee7d557Smrg # for dependence libraries. The import file would start with 24566ee7d557Smrg # the line '#! .'. This would cause the generated library to 24576ee7d557Smrg # depend on '.', always an invalid library. This was fixed in 24586ee7d557Smrg # development snapshots of GCC prior to 3.0. 24596ee7d557Smrg case $host_os in 24606ee7d557Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 24616ee7d557Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 24626ee7d557Smrg echo ' yes ' 24636ee7d557Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 24646ee7d557Smrg : 24656ee7d557Smrg else 24666ee7d557Smrg can_build_shared=no 24676ee7d557Smrg fi 24686ee7d557Smrg ;; 24696ee7d557Smrg esac 24706ee7d557Smrg # Using Import Files as archive members, it is possible to support 24716ee7d557Smrg # filename-based versioning of shared library archives on AIX. While 24726ee7d557Smrg # this would work for both with and without runtime linking, it will 24736ee7d557Smrg # prevent static linking of such archives. So we do filename-based 24746ee7d557Smrg # shared library versioning with .so extension only, which is used 24756ee7d557Smrg # when both runtime linking and shared linking is enabled. 24766ee7d557Smrg # Unfortunately, runtime linking may impact performance, so we do 24776ee7d557Smrg # not want this to be the default eventually. Also, we use the 24786ee7d557Smrg # versioned .so libs for executables only if there is the -brtl 24796ee7d557Smrg # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. 24806ee7d557Smrg # To allow for filename-based versioning support, we need to create 24816ee7d557Smrg # libNAME.so.V as an archive file, containing: 24826ee7d557Smrg # *) an Import File, referring to the versioned filename of the 24836ee7d557Smrg # archive as well as the shared archive member, telling the 24846ee7d557Smrg # bitwidth (32 or 64) of that shared object, and providing the 24856ee7d557Smrg # list of exported symbols of that shared object, eventually 24866ee7d557Smrg # decorated with the 'weak' keyword 24876ee7d557Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 24886ee7d557Smrg # it being seen by the linker. 24896ee7d557Smrg # At run time we better use the real file rather than another symlink, 24906ee7d557Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 24916ee7d557Smrg 24926ee7d557Smrg case $with_aix_soname,$aix_use_runtimelinking in 24936ee7d557Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 24946ee7d557Smrg # soname into executable. Probably we can add versioning support to 24956ee7d557Smrg # collect2, so additional links can be useful in future. 24966ee7d557Smrg aix,yes) # traditional libtool 24976ee7d557Smrg dynamic_linker='AIX unversionable lib.so' 24986ee7d557Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 24996ee7d557Smrg # instead of lib<name>.a to let people know that these are not 25006ee7d557Smrg # typical AIX shared libraries. 25016ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25026ee7d557Smrg ;; 25036ee7d557Smrg aix,no) # traditional AIX only 25046ee7d557Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 25056ee7d557Smrg # We preserve .a as extension for shared libraries through AIX4.2 25066ee7d557Smrg # and later when we are not doing run time linking. 25076ee7d557Smrg library_names_spec='$libname$release.a $libname.a' 25086ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 25096ee7d557Smrg ;; 25106ee7d557Smrg svr4,*) # full svr4 only 25116ee7d557Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 25126ee7d557Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 25136ee7d557Smrg # We do not specify a path in Import Files, so LIBPATH fires. 25146ee7d557Smrg shlibpath_overrides_runpath=yes 25156ee7d557Smrg ;; 25166ee7d557Smrg *,yes) # both, prefer svr4 25176ee7d557Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 25186ee7d557Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 25196ee7d557Smrg # unpreferred sharedlib libNAME.a needs extra handling 25206ee7d557Smrg 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"' 25216ee7d557Smrg 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"' 25226ee7d557Smrg # We do not specify a path in Import Files, so LIBPATH fires. 25236ee7d557Smrg shlibpath_overrides_runpath=yes 25246ee7d557Smrg ;; 25256ee7d557Smrg *,no) # both, prefer aix 25266ee7d557Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 25276ee7d557Smrg library_names_spec='$libname$release.a $libname.a' 25286ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 25296ee7d557Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 25306ee7d557Smrg 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)' 25316ee7d557Smrg 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"' 25326ee7d557Smrg ;; 25336ee7d557Smrg esac 25346ee7d557Smrg shlibpath_var=LIBPATH 25356ee7d557Smrg fi 25366ee7d557Smrg ;; 25376ee7d557Smrg 25386ee7d557Smrgamigaos*) 25396ee7d557Smrg case $host_cpu in 25406ee7d557Smrg powerpc) 25416ee7d557Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25426ee7d557Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 25436ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25446ee7d557Smrg ;; 25456ee7d557Smrg m68k) 25466ee7d557Smrg library_names_spec='$libname.ixlibrary $libname.a' 25476ee7d557Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 25486ee7d557Smrg 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' 25496ee7d557Smrg ;; 25506ee7d557Smrg esac 25516ee7d557Smrg ;; 25526ee7d557Smrg 25536ee7d557Smrgbeos*) 25546ee7d557Smrg library_names_spec='$libname$shared_ext' 25556ee7d557Smrg dynamic_linker="$host_os ld.so" 25566ee7d557Smrg shlibpath_var=LIBRARY_PATH 25576ee7d557Smrg ;; 25586ee7d557Smrg 25596ee7d557Smrgbsdi[[45]]*) 25606ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 25616ee7d557Smrg need_version=no 25626ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25636ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 25646ee7d557Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 25656ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 25666ee7d557Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 25676ee7d557Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 25686ee7d557Smrg # the default ld.so.conf also contains /usr/contrib/lib and 25696ee7d557Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 25706ee7d557Smrg # libtool to hard-code these into programs 25716ee7d557Smrg ;; 25726ee7d557Smrg 25736ee7d557Smrgcygwin* | mingw* | windows* | pw32* | cegcc*) 25746ee7d557Smrg version_type=windows 25756ee7d557Smrg shrext_cmds=.dll 25766ee7d557Smrg need_version=no 25776ee7d557Smrg need_lib_prefix=no 25786ee7d557Smrg 25796ee7d557Smrg case $GCC,$cc_basename in 25806ee7d557Smrg yes,*) 25816ee7d557Smrg # gcc 25826ee7d557Smrg library_names_spec='$libname.dll.a' 25836ee7d557Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 25846ee7d557Smrg # If user builds GCC with multilib enabled, 25856ee7d557Smrg # it should just install on $(libdir) 25866ee7d557Smrg # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. 25876ee7d557Smrg if test xyes = x"$multilib"; then 25886ee7d557Smrg postinstall_cmds='base_file=`basename \$file`~ 25896ee7d557Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25906ee7d557Smrg dldir=$destdir/`dirname \$dlpath`~ 25916ee7d557Smrg $install_prog $dir/$dlname $destdir/$dlname~ 25926ee7d557Smrg chmod a+x $destdir/$dlname~ 25936ee7d557Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25946ee7d557Smrg eval '\''$striplib $destdir/$dlname'\'' || exit \$?; 25956ee7d557Smrg fi' 25966ee7d557Smrg else 25976ee7d557Smrg postinstall_cmds='base_file=`basename \$file`~ 25986ee7d557Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25996ee7d557Smrg dldir=$destdir/`dirname \$dlpath`~ 26006ee7d557Smrg test -d \$dldir || mkdir -p \$dldir~ 26016ee7d557Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 26026ee7d557Smrg chmod a+x \$dldir/$dlname~ 26036ee7d557Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 26046ee7d557Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 26056ee7d557Smrg fi' 26066ee7d557Smrg fi 26076ee7d557Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26086ee7d557Smrg dlpath=$dir/\$dldll~ 26096ee7d557Smrg $RM \$dlpath' 26106ee7d557Smrg shlibpath_overrides_runpath=yes 26116ee7d557Smrg 26126ee7d557Smrg case $host_os in 26136ee7d557Smrg cygwin*) 26146ee7d557Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 26156ee7d557Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 26166ee7d557Smrgm4_if([$1], [],[ 26176ee7d557Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 26186ee7d557Smrg ;; 26196ee7d557Smrg mingw* | windows* | cegcc*) 26206ee7d557Smrg # MinGW DLLs use traditional 'lib' prefix 26216ee7d557Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 26226ee7d557Smrg ;; 26236ee7d557Smrg pw32*) 26246ee7d557Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 26256ee7d557Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 26266ee7d557Smrg ;; 26276ee7d557Smrg esac 26286ee7d557Smrg dynamic_linker='Win32 ld.exe' 26296ee7d557Smrg ;; 26306ee7d557Smrg 26316ee7d557Smrg *,cl* | *,icl*) 26326ee7d557Smrg # Native MSVC or ICC 26336ee7d557Smrg libname_spec='$name' 26346ee7d557Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 26356ee7d557Smrg library_names_spec='$libname.dll.lib' 26366ee7d557Smrg 26376ee7d557Smrg case $build_os in 26386ee7d557Smrg mingw* | windows*) 26396ee7d557Smrg sys_lib_search_path_spec= 26406ee7d557Smrg lt_save_ifs=$IFS 26416ee7d557Smrg IFS=';' 26426ee7d557Smrg for lt_path in $LIB 26436ee7d557Smrg do 26446ee7d557Smrg IFS=$lt_save_ifs 26456ee7d557Smrg # Let DOS variable expansion print the short 8.3 style file name. 26466ee7d557Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 26476ee7d557Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 26486ee7d557Smrg done 26496ee7d557Smrg IFS=$lt_save_ifs 26506ee7d557Smrg # Convert to MSYS style. 26516ee7d557Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 26526ee7d557Smrg ;; 26536ee7d557Smrg cygwin*) 26546ee7d557Smrg # Convert to unix form, then to dos form, then back to unix form 26556ee7d557Smrg # but this time dos style (no spaces!) so that the unix form looks 26566ee7d557Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 26576ee7d557Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 26586ee7d557Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 26596ee7d557Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26606ee7d557Smrg ;; 26616ee7d557Smrg *) 26626ee7d557Smrg sys_lib_search_path_spec=$LIB 26636ee7d557Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 26646ee7d557Smrg # It is most probably a Windows format PATH. 26656ee7d557Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26666ee7d557Smrg else 26676ee7d557Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26686ee7d557Smrg fi 26696ee7d557Smrg # FIXME: find the short name or the path components, as spaces are 26706ee7d557Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 26716ee7d557Smrg ;; 26726ee7d557Smrg esac 26736ee7d557Smrg 26746ee7d557Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 26756ee7d557Smrg postinstall_cmds='base_file=`basename \$file`~ 26766ee7d557Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 26776ee7d557Smrg dldir=$destdir/`dirname \$dlpath`~ 26786ee7d557Smrg test -d \$dldir || mkdir -p \$dldir~ 26796ee7d557Smrg $install_prog $dir/$dlname \$dldir/$dlname' 26806ee7d557Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26816ee7d557Smrg dlpath=$dir/\$dldll~ 26826ee7d557Smrg $RM \$dlpath' 26836ee7d557Smrg shlibpath_overrides_runpath=yes 26846ee7d557Smrg dynamic_linker='Win32 link.exe' 26856ee7d557Smrg ;; 26866ee7d557Smrg 26876ee7d557Smrg *) 26886ee7d557Smrg # Assume MSVC and ICC wrapper 26896ee7d557Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 26906ee7d557Smrg dynamic_linker='Win32 ld.exe' 26916ee7d557Smrg ;; 26926ee7d557Smrg esac 26936ee7d557Smrg # FIXME: first we should search . and the directory the executable is in 26946ee7d557Smrg shlibpath_var=PATH 26956ee7d557Smrg ;; 26966ee7d557Smrg 26976ee7d557Smrgdarwin* | rhapsody*) 26986ee7d557Smrg dynamic_linker="$host_os dyld" 26996ee7d557Smrg version_type=darwin 27006ee7d557Smrg need_lib_prefix=no 27016ee7d557Smrg need_version=no 27026ee7d557Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 27036ee7d557Smrg soname_spec='$libname$release$major$shared_ext' 27046ee7d557Smrg shlibpath_overrides_runpath=yes 27056ee7d557Smrg shlibpath_var=DYLD_LIBRARY_PATH 27066ee7d557Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 27076ee7d557Smrgm4_if([$1], [],[ 27086ee7d557Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 27096ee7d557Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 27106ee7d557Smrg ;; 27116ee7d557Smrg 27126ee7d557Smrgdgux*) 27136ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 27146ee7d557Smrg need_lib_prefix=no 27156ee7d557Smrg need_version=no 27166ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27176ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 27186ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 27196ee7d557Smrg ;; 27206ee7d557Smrg 27216ee7d557Smrgfreebsd* | dragonfly* | midnightbsd*) 27226ee7d557Smrg # DragonFly does not have aout. When/if they implement a new 27236ee7d557Smrg # versioning mechanism, adjust this. 27246ee7d557Smrg if test -x /usr/bin/objformat; then 27256ee7d557Smrg objformat=`/usr/bin/objformat` 27266ee7d557Smrg else 27276ee7d557Smrg case $host_os in 27286ee7d557Smrg freebsd[[23]].*) objformat=aout ;; 27296ee7d557Smrg *) objformat=elf ;; 27306ee7d557Smrg esac 27316ee7d557Smrg fi 27326ee7d557Smrg version_type=freebsd-$objformat 27336ee7d557Smrg case $version_type in 27346ee7d557Smrg freebsd-elf*) 27356ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27366ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 27376ee7d557Smrg need_version=no 27386ee7d557Smrg need_lib_prefix=no 27396ee7d557Smrg ;; 27406ee7d557Smrg freebsd-*) 27416ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 27426ee7d557Smrg need_version=yes 27436ee7d557Smrg ;; 27446ee7d557Smrg esac 27456ee7d557Smrg case $host_cpu in 27466ee7d557Smrg powerpc64) 27476ee7d557Smrg # On FreeBSD bi-arch platforms, a different variable is used for 32-bit 27486ee7d557Smrg # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>. 27496ee7d557Smrg AC_COMPILE_IFELSE( 27506ee7d557Smrg [AC_LANG_SOURCE( 27516ee7d557Smrg [[int test_pointer_size[sizeof (void *) - 5]; 27526ee7d557Smrg ]])], 27536ee7d557Smrg [shlibpath_var=LD_LIBRARY_PATH], 27546ee7d557Smrg [shlibpath_var=LD_32_LIBRARY_PATH]) 27556ee7d557Smrg ;; 27566ee7d557Smrg *) 27576ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 27586ee7d557Smrg ;; 27596ee7d557Smrg esac 27606ee7d557Smrg case $host_os in 27616ee7d557Smrg freebsd2.*) 27626ee7d557Smrg shlibpath_overrides_runpath=yes 27636ee7d557Smrg ;; 27646ee7d557Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 27656ee7d557Smrg shlibpath_overrides_runpath=yes 27666ee7d557Smrg hardcode_into_libs=yes 27676ee7d557Smrg ;; 27686ee7d557Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 27696ee7d557Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 27706ee7d557Smrg shlibpath_overrides_runpath=no 27716ee7d557Smrg hardcode_into_libs=yes 27726ee7d557Smrg ;; 27736ee7d557Smrg *) # from 4.6 on, and DragonFly 27746ee7d557Smrg shlibpath_overrides_runpath=yes 27756ee7d557Smrg hardcode_into_libs=yes 27766ee7d557Smrg ;; 27776ee7d557Smrg esac 27786ee7d557Smrg ;; 27796ee7d557Smrg 27806ee7d557Smrghaiku*) 27816ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 27826ee7d557Smrg need_lib_prefix=no 27836ee7d557Smrg need_version=no 27846ee7d557Smrg dynamic_linker="$host_os runtime_loader" 27856ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27866ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 27876ee7d557Smrg shlibpath_var=LIBRARY_PATH 27886ee7d557Smrg shlibpath_overrides_runpath=no 27896ee7d557Smrg sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' 27906ee7d557Smrg sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' 27916ee7d557Smrg hardcode_into_libs=no 27926ee7d557Smrg ;; 27936ee7d557Smrg 27946ee7d557Smrghpux9* | hpux10* | hpux11*) 27956ee7d557Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 27966ee7d557Smrg # link against other versions. 27976ee7d557Smrg version_type=sunos 27986ee7d557Smrg need_lib_prefix=no 27996ee7d557Smrg need_version=no 28006ee7d557Smrg case $host_cpu in 28016ee7d557Smrg ia64*) 28026ee7d557Smrg shrext_cmds='.so' 28036ee7d557Smrg hardcode_into_libs=yes 28046ee7d557Smrg dynamic_linker="$host_os dld.so" 28056ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 28066ee7d557Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 28076ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28086ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 28096ee7d557Smrg if test 32 = "$HPUX_IA64_MODE"; then 28106ee7d557Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 28116ee7d557Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 28126ee7d557Smrg else 28136ee7d557Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 28146ee7d557Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 28156ee7d557Smrg fi 28166ee7d557Smrg ;; 28176ee7d557Smrg hppa*64*) 28186ee7d557Smrg shrext_cmds='.sl' 28196ee7d557Smrg hardcode_into_libs=yes 28206ee7d557Smrg dynamic_linker="$host_os dld.sl" 28216ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 28226ee7d557Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 28236ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28246ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 28256ee7d557Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 28266ee7d557Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 28276ee7d557Smrg ;; 28286ee7d557Smrg *) 28296ee7d557Smrg shrext_cmds='.sl' 28306ee7d557Smrg dynamic_linker="$host_os dld.sl" 28316ee7d557Smrg shlibpath_var=SHLIB_PATH 28326ee7d557Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 28336ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28346ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 28356ee7d557Smrg ;; 28366ee7d557Smrg esac 28376ee7d557Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 28386ee7d557Smrg postinstall_cmds='chmod 555 $lib' 28396ee7d557Smrg # or fails outright, so override atomically: 28406ee7d557Smrg install_override_mode=555 28416ee7d557Smrg ;; 28426ee7d557Smrg 28436ee7d557Smrginterix[[3-9]]*) 28446ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 28456ee7d557Smrg need_lib_prefix=no 28466ee7d557Smrg need_version=no 28476ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28486ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 28496ee7d557Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 28506ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 28516ee7d557Smrg shlibpath_overrides_runpath=no 28526ee7d557Smrg hardcode_into_libs=yes 28536ee7d557Smrg ;; 28546ee7d557Smrg 28556ee7d557Smrgirix5* | irix6* | nonstopux*) 28566ee7d557Smrg case $host_os in 28576ee7d557Smrg nonstopux*) version_type=nonstopux ;; 28586ee7d557Smrg *) 28596ee7d557Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 28606ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 28616ee7d557Smrg else 28626ee7d557Smrg version_type=irix 28636ee7d557Smrg fi ;; 28646ee7d557Smrg esac 28656ee7d557Smrg need_lib_prefix=no 28666ee7d557Smrg need_version=no 28676ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 28686ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 28696ee7d557Smrg case $host_os in 28706ee7d557Smrg irix5* | nonstopux*) 28716ee7d557Smrg libsuff= shlibsuff= 28726ee7d557Smrg ;; 28736ee7d557Smrg *) 28746ee7d557Smrg case $LD in # libtool.m4 will add one of these switches to LD 28756ee7d557Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 28766ee7d557Smrg libsuff= shlibsuff= libmagic=32-bit;; 28776ee7d557Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28786ee7d557Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 28796ee7d557Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28806ee7d557Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 28816ee7d557Smrg *) libsuff= shlibsuff= libmagic=never-match;; 28826ee7d557Smrg esac 28836ee7d557Smrg ;; 28846ee7d557Smrg esac 28856ee7d557Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28866ee7d557Smrg shlibpath_overrides_runpath=no 28876ee7d557Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 28886ee7d557Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28896ee7d557Smrg hardcode_into_libs=yes 28906ee7d557Smrg ;; 28916ee7d557Smrg 28926ee7d557Smrg# No shared lib support for Linux oldld, aout, or coff. 28936ee7d557Smrglinux*oldld* | linux*aout* | linux*coff*) 28946ee7d557Smrg dynamic_linker=no 28956ee7d557Smrg ;; 28966ee7d557Smrg 28976ee7d557Smrglinux*android*) 28986ee7d557Smrg version_type=none # Android doesn't support versioned libraries. 28996ee7d557Smrg need_lib_prefix=no 29006ee7d557Smrg need_version=no 29016ee7d557Smrg library_names_spec='$libname$release$shared_ext $libname$shared_ext' 29026ee7d557Smrg soname_spec='$libname$release$shared_ext' 29036ee7d557Smrg finish_cmds= 29046ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 29056ee7d557Smrg shlibpath_overrides_runpath=yes 29066ee7d557Smrg 29076ee7d557Smrg # This implies no fast_install, which is unacceptable. 29086ee7d557Smrg # Some rework will be needed to allow for fast_install 29096ee7d557Smrg # before this can be enabled. 29106ee7d557Smrg hardcode_into_libs=yes 29116ee7d557Smrg 29126ee7d557Smrg dynamic_linker='Android linker' 29136ee7d557Smrg # -rpath works at least for libraries that are not overridden by 29146ee7d557Smrg # libraries installed in system locations. 29156ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 29166ee7d557Smrg ;; 29176ee7d557Smrg 29186ee7d557Smrg# This must be glibc/ELF. 29196ee7d557Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 29206ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 29216ee7d557Smrg need_lib_prefix=no 29226ee7d557Smrg need_version=no 29236ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29246ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 29256ee7d557Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 29266ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 29276ee7d557Smrg shlibpath_overrides_runpath=no 29286ee7d557Smrg 29296ee7d557Smrg # Some binutils ld are patched to set DT_RUNPATH 29306ee7d557Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 29316ee7d557Smrg [lt_cv_shlibpath_overrides_runpath=no 29326ee7d557Smrg save_LDFLAGS=$LDFLAGS 29336ee7d557Smrg save_libdir=$libdir 29346ee7d557Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 29356ee7d557Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 29366ee7d557Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 29376ee7d557Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 29386ee7d557Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 29396ee7d557Smrg LDFLAGS=$save_LDFLAGS 29406ee7d557Smrg libdir=$save_libdir 29416ee7d557Smrg ]) 29426ee7d557Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 29436ee7d557Smrg 29446ee7d557Smrg # This implies no fast_install, which is unacceptable. 29456ee7d557Smrg # Some rework will be needed to allow for fast_install 29466ee7d557Smrg # before this can be enabled. 29476ee7d557Smrg hardcode_into_libs=yes 29486ee7d557Smrg 29496ee7d557Smrg # Ideally, we could use ldconfig to report *all* directories which are 29506ee7d557Smrg # searched for libraries, however this is still not possible. Aside from not 29516ee7d557Smrg # being certain /sbin/ldconfig is available, command 29526ee7d557Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 29536ee7d557Smrg # even though it is searched at run-time. Try to do the best guess by 29546ee7d557Smrg # appending ld.so.conf contents (and includes) to the search path. 29556ee7d557Smrg if test -f /etc/ld.so.conf; then 29566ee7d557Smrg 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' ' '` 29576ee7d557Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 29586ee7d557Smrg fi 29596ee7d557Smrg 29606ee7d557Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 29616ee7d557Smrg # powerpc, because MkLinux only supported shared libraries with the 29626ee7d557Smrg # GNU dynamic linker. Since this was broken with cross compilers, 29636ee7d557Smrg # most powerpc-linux boxes support dynamic linking these days and 29646ee7d557Smrg # people can always --disable-shared, the test was removed, and we 29656ee7d557Smrg # assume the GNU/Linux dynamic linker is in use. 29666ee7d557Smrg dynamic_linker='GNU/Linux ld.so' 29676ee7d557Smrg ;; 29686ee7d557Smrg 29696ee7d557Smrgnetbsdelf*-gnu) 29706ee7d557Smrg version_type=linux 29716ee7d557Smrg need_lib_prefix=no 29726ee7d557Smrg need_version=no 29736ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29746ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 29756ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 29766ee7d557Smrg shlibpath_overrides_runpath=no 29776ee7d557Smrg hardcode_into_libs=yes 29786ee7d557Smrg dynamic_linker='NetBSD ld.elf_so' 29796ee7d557Smrg ;; 29806ee7d557Smrg 29816ee7d557Smrgnetbsd*) 29826ee7d557Smrg version_type=sunos 29836ee7d557Smrg need_lib_prefix=no 29846ee7d557Smrg need_version=no 29856ee7d557Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 29866ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29876ee7d557Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29886ee7d557Smrg dynamic_linker='NetBSD (a.out) ld.so' 29896ee7d557Smrg else 29906ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29916ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 29926ee7d557Smrg dynamic_linker='NetBSD ld.elf_so' 29936ee7d557Smrg fi 29946ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 29956ee7d557Smrg shlibpath_overrides_runpath=yes 29966ee7d557Smrg hardcode_into_libs=yes 29976ee7d557Smrg ;; 29986ee7d557Smrg 29996ee7d557Smrg*-mlibc) 30006ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 30016ee7d557Smrg need_lib_prefix=no 30026ee7d557Smrg need_version=no 30036ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30046ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 30056ee7d557Smrg dynamic_linker='mlibc ld.so' 30066ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 30076ee7d557Smrg shlibpath_overrides_runpath=no 30086ee7d557Smrg hardcode_into_libs=yes 30096ee7d557Smrg ;; 30106ee7d557Smrg 30116ee7d557Smrgnewsos6) 30126ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 30136ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30146ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 30156ee7d557Smrg shlibpath_overrides_runpath=yes 30166ee7d557Smrg ;; 30176ee7d557Smrg 30186ee7d557Smrg*nto* | *qnx*) 30196ee7d557Smrg version_type=qnx 30206ee7d557Smrg need_lib_prefix=no 30216ee7d557Smrg need_version=no 30226ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30236ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 30246ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 30256ee7d557Smrg shlibpath_overrides_runpath=no 30266ee7d557Smrg hardcode_into_libs=yes 30276ee7d557Smrg dynamic_linker='ldqnx.so' 30286ee7d557Smrg ;; 30296ee7d557Smrg 30306ee7d557Smrgopenbsd*) 30316ee7d557Smrg version_type=sunos 30326ee7d557Smrg sys_lib_dlsearch_path_spec=/usr/lib 30336ee7d557Smrg need_lib_prefix=no 30346ee7d557Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 30356ee7d557Smrg need_version=no 30366ee7d557Smrg else 30376ee7d557Smrg need_version=yes 30386ee7d557Smrg fi 30396ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30406ee7d557Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 30416ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 30426ee7d557Smrg shlibpath_overrides_runpath=yes 30436ee7d557Smrg ;; 30446ee7d557Smrg 30456ee7d557Smrgos2*) 30466ee7d557Smrg libname_spec='$name' 30476ee7d557Smrg version_type=windows 30486ee7d557Smrg shrext_cmds=.dll 30496ee7d557Smrg need_version=no 30506ee7d557Smrg need_lib_prefix=no 30516ee7d557Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 30526ee7d557Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 30536ee7d557Smrg v=$($ECHO $release$versuffix | tr -d .-); 30546ee7d557Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 30556ee7d557Smrg $ECHO $n$v`$shared_ext' 30566ee7d557Smrg library_names_spec='${libname}_dll.$libext' 30576ee7d557Smrg dynamic_linker='OS/2 ld.exe' 30586ee7d557Smrg shlibpath_var=BEGINLIBPATH 30596ee7d557Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 30606ee7d557Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30616ee7d557Smrg postinstall_cmds='base_file=`basename \$file`~ 30626ee7d557Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 30636ee7d557Smrg dldir=$destdir/`dirname \$dlpath`~ 30646ee7d557Smrg test -d \$dldir || mkdir -p \$dldir~ 30656ee7d557Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 30666ee7d557Smrg chmod a+x \$dldir/$dlname~ 30676ee7d557Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 30686ee7d557Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 30696ee7d557Smrg fi' 30706ee7d557Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 30716ee7d557Smrg dlpath=$dir/\$dldll~ 30726ee7d557Smrg $RM \$dlpath' 30736ee7d557Smrg ;; 30746ee7d557Smrg 30756ee7d557Smrgosf3* | osf4* | osf5*) 30766ee7d557Smrg version_type=osf 30776ee7d557Smrg need_lib_prefix=no 30786ee7d557Smrg need_version=no 30796ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 30806ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30816ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 30826ee7d557Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 30836ee7d557Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30846ee7d557Smrg ;; 30856ee7d557Smrg 30866ee7d557Smrgrdos*) 30876ee7d557Smrg dynamic_linker=no 30886ee7d557Smrg ;; 30896ee7d557Smrg 30906ee7d557Smrgserenity*) 30916ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 30926ee7d557Smrg need_lib_prefix=no 30936ee7d557Smrg need_version=no 30946ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30956ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 30966ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 30976ee7d557Smrg shlibpath_overrides_runpath=no 30986ee7d557Smrg dynamic_linker='SerenityOS LibELF' 30996ee7d557Smrg ;; 31006ee7d557Smrg 31016ee7d557Smrgsolaris*) 31026ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 31036ee7d557Smrg need_lib_prefix=no 31046ee7d557Smrg need_version=no 31056ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31066ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 31076ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 31086ee7d557Smrg shlibpath_overrides_runpath=yes 31096ee7d557Smrg hardcode_into_libs=yes 31106ee7d557Smrg # ldd complains unless libraries are executable 31116ee7d557Smrg postinstall_cmds='chmod +x $lib' 31126ee7d557Smrg ;; 31136ee7d557Smrg 31146ee7d557Smrgsunos4*) 31156ee7d557Smrg version_type=sunos 31166ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 31176ee7d557Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 31186ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 31196ee7d557Smrg shlibpath_overrides_runpath=yes 31206ee7d557Smrg if test yes = "$with_gnu_ld"; then 31216ee7d557Smrg need_lib_prefix=no 31226ee7d557Smrg fi 31236ee7d557Smrg need_version=yes 31246ee7d557Smrg ;; 31256ee7d557Smrg 31266ee7d557Smrgsysv4 | sysv4.3*) 31276ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 31286ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31296ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 31306ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 31316ee7d557Smrg case $host_vendor in 31326ee7d557Smrg sni) 31336ee7d557Smrg shlibpath_overrides_runpath=no 31346ee7d557Smrg need_lib_prefix=no 31356ee7d557Smrg runpath_var=LD_RUN_PATH 31366ee7d557Smrg ;; 31376ee7d557Smrg siemens) 31386ee7d557Smrg need_lib_prefix=no 31396ee7d557Smrg ;; 31406ee7d557Smrg motorola) 31416ee7d557Smrg need_lib_prefix=no 31426ee7d557Smrg need_version=no 31436ee7d557Smrg shlibpath_overrides_runpath=no 31446ee7d557Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 31456ee7d557Smrg ;; 31466ee7d557Smrg esac 31476ee7d557Smrg ;; 31486ee7d557Smrg 31496ee7d557Smrgsysv4*MP*) 31506ee7d557Smrg if test -d /usr/nec; then 31516ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 31526ee7d557Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 31536ee7d557Smrg soname_spec='$libname$shared_ext.$major' 31546ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 31556ee7d557Smrg fi 31566ee7d557Smrg ;; 31576ee7d557Smrg 31586ee7d557Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 31596ee7d557Smrg version_type=sco 31606ee7d557Smrg need_lib_prefix=no 31616ee7d557Smrg need_version=no 31626ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 31636ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 31646ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 31656ee7d557Smrg shlibpath_overrides_runpath=yes 31666ee7d557Smrg hardcode_into_libs=yes 31676ee7d557Smrg if test yes = "$with_gnu_ld"; then 31686ee7d557Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 31696ee7d557Smrg else 31706ee7d557Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 31716ee7d557Smrg case $host_os in 31726ee7d557Smrg sco3.2v5*) 31736ee7d557Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 31746ee7d557Smrg ;; 31756ee7d557Smrg esac 31766ee7d557Smrg fi 31776ee7d557Smrg sys_lib_dlsearch_path_spec='/usr/lib' 31786ee7d557Smrg ;; 31796ee7d557Smrg 31806ee7d557Smrgtpf*) 31816ee7d557Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 31826ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 31836ee7d557Smrg need_lib_prefix=no 31846ee7d557Smrg need_version=no 31856ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31866ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 31876ee7d557Smrg shlibpath_overrides_runpath=no 31886ee7d557Smrg hardcode_into_libs=yes 31896ee7d557Smrg ;; 31906ee7d557Smrg 31916ee7d557Smrguts4*) 31926ee7d557Smrg version_type=linux # correct to gnu/linux during the next big refactor 31936ee7d557Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31946ee7d557Smrg soname_spec='$libname$release$shared_ext$major' 31956ee7d557Smrg shlibpath_var=LD_LIBRARY_PATH 31966ee7d557Smrg ;; 31976ee7d557Smrg 31986ee7d557Smrgemscripten*) 31996ee7d557Smrg version_type=none 32006ee7d557Smrg need_lib_prefix=no 32016ee7d557Smrg need_version=no 32026ee7d557Smrg library_names_spec='$libname$release$shared_ext' 32036ee7d557Smrg soname_spec='$libname$release$shared_ext' 32046ee7d557Smrg finish_cmds= 32056ee7d557Smrg dynamic_linker="Emscripten linker" 32066ee7d557Smrg _LT_COMPILER_PIC($1)='-fPIC' 32076ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' 32086ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' 32096ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 32106ee7d557Smrg _LT_TAGVAR(no_undefined_flag, $1)= 32116ee7d557Smrg ;; 32126ee7d557Smrg 32136ee7d557Smrg*) 32146ee7d557Smrg dynamic_linker=no 32156ee7d557Smrg ;; 32166ee7d557Smrgesac 32176ee7d557SmrgAC_MSG_RESULT([$dynamic_linker]) 32186ee7d557Smrgtest no = "$dynamic_linker" && can_build_shared=no 32196ee7d557Smrg 32206ee7d557Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 32216ee7d557Smrgif test yes = "$GCC"; then 32226ee7d557Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 32236ee7d557Smrgfi 32246ee7d557Smrg 32256ee7d557Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 32266ee7d557Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 32276ee7d557Smrgfi 32286ee7d557Smrg 32296ee7d557Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 32306ee7d557Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 32316ee7d557Smrgfi 32326ee7d557Smrg 32336ee7d557Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 32346ee7d557Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 32356ee7d557Smrg 32366ee7d557Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 32376ee7d557Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 32386ee7d557Smrg 32396ee7d557Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 32406ee7d557Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 32416ee7d557Smrg 32426ee7d557Smrg_LT_DECL([], [variables_saved_for_relink], [1], 32436ee7d557Smrg [Variables whose values should be saved in libtool wrapper scripts and 32446ee7d557Smrg restored at link time]) 32456ee7d557Smrg_LT_DECL([], [need_lib_prefix], [0], 32466ee7d557Smrg [Do we need the "lib" prefix for modules?]) 32476ee7d557Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 32486ee7d557Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 32496ee7d557Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 32506ee7d557Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 32516ee7d557Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 32526ee7d557Smrg [Is shlibpath searched before the hard-coded library search path?]) 32536ee7d557Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 32546ee7d557Smrg_LT_DECL([], [library_names_spec], [1], 32556ee7d557Smrg [[List of archive names. First name is the real one, the rest are links. 32566ee7d557Smrg The last name is the one that the linker finds with -lNAME]]) 32576ee7d557Smrg_LT_DECL([], [soname_spec], [1], 32586ee7d557Smrg [[The coded name of the library, if different from the real name]]) 32596ee7d557Smrg_LT_DECL([], [install_override_mode], [1], 32606ee7d557Smrg [Permission mode override for installation of shared libraries]) 32616ee7d557Smrg_LT_DECL([], [postinstall_cmds], [2], 32626ee7d557Smrg [Command to use after installation of a shared archive]) 32636ee7d557Smrg_LT_DECL([], [postuninstall_cmds], [2], 32646ee7d557Smrg [Command to use after uninstallation of a shared archive]) 32656ee7d557Smrg_LT_DECL([], [finish_cmds], [2], 32666ee7d557Smrg [Commands used to finish a libtool library installation in a directory]) 32676ee7d557Smrg_LT_DECL([], [finish_eval], [1], 32686ee7d557Smrg [[As "finish_cmds", except a single script fragment to be evaled but 32696ee7d557Smrg not shown]]) 32706ee7d557Smrg_LT_DECL([], [hardcode_into_libs], [0], 32716ee7d557Smrg [Whether we should hardcode library paths into libraries]) 32726ee7d557Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 32736ee7d557Smrg [Compile-time system search path for libraries]) 32746ee7d557Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 32756ee7d557Smrg [Detected run-time system search path for libraries]) 32766ee7d557Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 32776ee7d557Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 32786ee7d557Smrg])# _LT_SYS_DYNAMIC_LINKER 32796ee7d557Smrg 32806ee7d557Smrg 32816ee7d557Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 32826ee7d557Smrg# -------------------------- 32836ee7d557Smrg# find a file program that can recognize shared library 32846ee7d557SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 32856ee7d557Smrg[m4_require([_LT_DECL_EGREP])dnl 32866ee7d557SmrgAC_MSG_CHECKING([for $1]) 32876ee7d557SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 32886ee7d557Smrg[case $MAGIC_CMD in 32896ee7d557Smrg[[\\/*] | ?:[\\/]*]) 32906ee7d557Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 32916ee7d557Smrg ;; 32926ee7d557Smrg*) 32936ee7d557Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 32946ee7d557Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 32956ee7d557Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 32966ee7d557Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 32976ee7d557Smrgdnl not every word. This closes a longstanding sh security hole. 32986ee7d557Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 32996ee7d557Smrg for ac_dir in $ac_dummy; do 33006ee7d557Smrg IFS=$lt_save_ifs 33016ee7d557Smrg test -z "$ac_dir" && ac_dir=. 33026ee7d557Smrg if test -f "$ac_dir/$1"; then 33036ee7d557Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 33046ee7d557Smrg if test -n "$file_magic_test_file"; then 33056ee7d557Smrg case $deplibs_check_method in 33066ee7d557Smrg "file_magic "*) 33076ee7d557Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 33086ee7d557Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 33096ee7d557Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 33106ee7d557Smrg $EGREP "$file_magic_regex" > /dev/null; then 33116ee7d557Smrg : 33126ee7d557Smrg else 33136ee7d557Smrg cat <<_LT_EOF 1>&2 33146ee7d557Smrg 33156ee7d557Smrg*** Warning: the command libtool uses to detect shared libraries, 33166ee7d557Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 33176ee7d557Smrg*** The result is that libtool may fail to recognize shared libraries 33186ee7d557Smrg*** as such. This will affect the creation of libtool libraries that 33196ee7d557Smrg*** depend on shared libraries, but programs linked with such libtool 33206ee7d557Smrg*** libraries will work regardless of this problem. Nevertheless, you 33216ee7d557Smrg*** may want to report the problem to your system manager and/or to 33226ee7d557Smrg*** bug-libtool@gnu.org 33236ee7d557Smrg 33246ee7d557Smrg_LT_EOF 33256ee7d557Smrg fi ;; 33266ee7d557Smrg esac 33276ee7d557Smrg fi 33286ee7d557Smrg break 33296ee7d557Smrg fi 33306ee7d557Smrg done 33316ee7d557Smrg IFS=$lt_save_ifs 33326ee7d557Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 33336ee7d557Smrg ;; 33346ee7d557Smrgesac]) 33356ee7d557SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 33366ee7d557Smrgif test -n "$MAGIC_CMD"; then 33376ee7d557Smrg AC_MSG_RESULT($MAGIC_CMD) 33386ee7d557Smrgelse 33396ee7d557Smrg AC_MSG_RESULT(no) 33406ee7d557Smrgfi 33416ee7d557Smrg_LT_DECL([], [MAGIC_CMD], [0], 33426ee7d557Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 33436ee7d557Smrg])# _LT_PATH_TOOL_PREFIX 33446ee7d557Smrg 33456ee7d557Smrg# Old name: 33466ee7d557SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 33476ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 33486ee7d557Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 33496ee7d557Smrg 33506ee7d557Smrg 33516ee7d557Smrg# _LT_PATH_MAGIC 33526ee7d557Smrg# -------------- 33536ee7d557Smrg# find a file program that can recognize a shared library 33546ee7d557Smrgm4_defun([_LT_PATH_MAGIC], 33556ee7d557Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 33566ee7d557Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 33576ee7d557Smrg if test -n "$ac_tool_prefix"; then 33586ee7d557Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 33596ee7d557Smrg else 33606ee7d557Smrg MAGIC_CMD=: 33616ee7d557Smrg fi 33626ee7d557Smrgfi 33636ee7d557Smrg])# _LT_PATH_MAGIC 33646ee7d557Smrg 33656ee7d557Smrg 33666ee7d557Smrg# LT_PATH_LD 33676ee7d557Smrg# ---------- 33686ee7d557Smrg# find the pathname to the GNU or non-GNU linker 33696ee7d557SmrgAC_DEFUN([LT_PATH_LD], 33706ee7d557Smrg[AC_REQUIRE([AC_PROG_CC])dnl 33716ee7d557SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 33726ee7d557SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 33736ee7d557Smrgm4_require([_LT_DECL_SED])dnl 33746ee7d557Smrgm4_require([_LT_DECL_EGREP])dnl 33756ee7d557Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 33766ee7d557Smrg 33776ee7d557SmrgAC_ARG_WITH([gnu-ld], 33786ee7d557Smrg [AS_HELP_STRING([--with-gnu-ld], 33796ee7d557Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 33806ee7d557Smrg [test no = "$withval" || with_gnu_ld=yes], 33816ee7d557Smrg [with_gnu_ld=no])dnl 33826ee7d557Smrg 33836ee7d557Smrgac_prog=ld 33846ee7d557Smrgif test yes = "$GCC"; then 33856ee7d557Smrg # Check if gcc -print-prog-name=ld gives a path. 33866ee7d557Smrg AC_MSG_CHECKING([for ld used by $CC]) 33876ee7d557Smrg case $host in 33886ee7d557Smrg *-*-mingw* | *-*-windows*) 33896ee7d557Smrg # gcc leaves a trailing carriage return, which upsets mingw 33906ee7d557Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 33916ee7d557Smrg *) 33926ee7d557Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 33936ee7d557Smrg esac 33946ee7d557Smrg case $ac_prog in 33956ee7d557Smrg # Accept absolute paths. 33966ee7d557Smrg [[\\/]]* | ?:[[\\/]]*) 33976ee7d557Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 33986ee7d557Smrg # Canonicalize the pathname of ld 33996ee7d557Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 34006ee7d557Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 34016ee7d557Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 34026ee7d557Smrg done 34036ee7d557Smrg test -z "$LD" && LD=$ac_prog 34046ee7d557Smrg ;; 34056ee7d557Smrg "") 34066ee7d557Smrg # If it fails, then pretend we aren't using GCC. 34076ee7d557Smrg ac_prog=ld 34086ee7d557Smrg ;; 34096ee7d557Smrg *) 34106ee7d557Smrg # If it is relative, then search for the first ld in PATH. 34116ee7d557Smrg with_gnu_ld=unknown 34126ee7d557Smrg ;; 34136ee7d557Smrg esac 34146ee7d557Smrgelif test yes = "$with_gnu_ld"; then 34156ee7d557Smrg AC_MSG_CHECKING([for GNU ld]) 34166ee7d557Smrgelse 34176ee7d557Smrg AC_MSG_CHECKING([for non-GNU ld]) 34186ee7d557Smrgfi 34196ee7d557SmrgAC_CACHE_VAL(lt_cv_path_LD, 34206ee7d557Smrg[if test -z "$LD"; then 34216ee7d557Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 34226ee7d557Smrg for ac_dir in $PATH; do 34236ee7d557Smrg IFS=$lt_save_ifs 34246ee7d557Smrg test -z "$ac_dir" && ac_dir=. 34256ee7d557Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 34266ee7d557Smrg lt_cv_path_LD=$ac_dir/$ac_prog 34276ee7d557Smrg # Check to see if the program is GNU ld. I'd rather use --version, 34286ee7d557Smrg # but apparently some variants of GNU ld only accept -v. 34296ee7d557Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 34306ee7d557Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 34316ee7d557Smrg *GNU* | *'with BFD'*) 34326ee7d557Smrg test no != "$with_gnu_ld" && break 34336ee7d557Smrg ;; 34346ee7d557Smrg *) 34356ee7d557Smrg test yes != "$with_gnu_ld" && break 34366ee7d557Smrg ;; 34376ee7d557Smrg esac 34386ee7d557Smrg fi 34396ee7d557Smrg done 34406ee7d557Smrg IFS=$lt_save_ifs 34416ee7d557Smrgelse 34426ee7d557Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 34436ee7d557Smrgfi]) 34446ee7d557SmrgLD=$lt_cv_path_LD 34456ee7d557Smrgif test -n "$LD"; then 34466ee7d557Smrg AC_MSG_RESULT($LD) 34476ee7d557Smrgelse 34486ee7d557Smrg AC_MSG_RESULT(no) 34496ee7d557Smrgfi 34506ee7d557Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 34516ee7d557Smrg_LT_PATH_LD_GNU 34526ee7d557SmrgAC_SUBST([LD]) 34536ee7d557Smrg 34546ee7d557Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 34556ee7d557Smrg])# LT_PATH_LD 34566ee7d557Smrg 34576ee7d557Smrg# Old names: 34586ee7d557SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 34596ee7d557SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 34606ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 34616ee7d557Smrgdnl AC_DEFUN([AM_PROG_LD], []) 34626ee7d557Smrgdnl AC_DEFUN([AC_PROG_LD], []) 34636ee7d557Smrg 34646ee7d557Smrg 34656ee7d557Smrg# _LT_PATH_LD_GNU 34666ee7d557Smrg#- -------------- 34676ee7d557Smrgm4_defun([_LT_PATH_LD_GNU], 34686ee7d557Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 34696ee7d557Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 34706ee7d557Smrgcase `$LD -v 2>&1 </dev/null` in 34716ee7d557Smrg*GNU* | *'with BFD'*) 34726ee7d557Smrg lt_cv_prog_gnu_ld=yes 34736ee7d557Smrg ;; 34746ee7d557Smrg*) 34756ee7d557Smrg lt_cv_prog_gnu_ld=no 34766ee7d557Smrg ;; 34776ee7d557Smrgesac]) 34786ee7d557Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 34796ee7d557Smrg])# _LT_PATH_LD_GNU 34806ee7d557Smrg 34816ee7d557Smrg 34826ee7d557Smrg# _LT_CMD_RELOAD 34836ee7d557Smrg# -------------- 34846ee7d557Smrg# find reload flag for linker 34856ee7d557Smrg# -- PORTME Some linkers may need a different reload flag. 34866ee7d557Smrgm4_defun([_LT_CMD_RELOAD], 34876ee7d557Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 34886ee7d557Smrg lt_cv_ld_reload_flag, 34896ee7d557Smrg [lt_cv_ld_reload_flag='-r']) 34906ee7d557Smrgreload_flag=$lt_cv_ld_reload_flag 34916ee7d557Smrgcase $reload_flag in 34926ee7d557Smrg"" | " "*) ;; 34936ee7d557Smrg*) reload_flag=" $reload_flag" ;; 34946ee7d557Smrgesac 34956ee7d557Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 34966ee7d557Smrgcase $host_os in 34976ee7d557Smrg cygwin* | mingw* | windows* | pw32* | cegcc*) 34986ee7d557Smrg if test yes != "$GCC"; then 34996ee7d557Smrg reload_cmds=false 35006ee7d557Smrg fi 35016ee7d557Smrg ;; 35026ee7d557Smrg darwin*) 35036ee7d557Smrg if test yes = "$GCC"; then 35046ee7d557Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 35056ee7d557Smrg else 35066ee7d557Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 35076ee7d557Smrg fi 35086ee7d557Smrg ;; 35096ee7d557Smrgesac 35106ee7d557Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 35116ee7d557Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 35126ee7d557Smrg])# _LT_CMD_RELOAD 35136ee7d557Smrg 35146ee7d557Smrg 35156ee7d557Smrg# _LT_PATH_DD 35166ee7d557Smrg# ----------- 35176ee7d557Smrg# find a working dd 35186ee7d557Smrgm4_defun([_LT_PATH_DD], 35196ee7d557Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 35206ee7d557Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 35216ee7d557Smrgcat conftest.i conftest.i >conftest2.i 35226ee7d557Smrg: ${lt_DD:=$DD} 35236ee7d557SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 35246ee7d557Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 35256ee7d557Smrg cmp -s conftest.i conftest.out \ 35266ee7d557Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 35276ee7d557Smrgfi]) 35286ee7d557Smrgrm -f conftest.i conftest2.i conftest.out]) 35296ee7d557Smrg])# _LT_PATH_DD 35306ee7d557Smrg 35316ee7d557Smrg 35326ee7d557Smrg# _LT_CMD_TRUNCATE 35336ee7d557Smrg# ---------------- 35346ee7d557Smrg# find command to truncate a binary pipe 35356ee7d557Smrgm4_defun([_LT_CMD_TRUNCATE], 35366ee7d557Smrg[m4_require([_LT_PATH_DD]) 35376ee7d557SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 35386ee7d557Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 35396ee7d557Smrgcat conftest.i conftest.i >conftest2.i 35406ee7d557Smrglt_cv_truncate_bin= 35416ee7d557Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 35426ee7d557Smrg cmp -s conftest.i conftest.out \ 35436ee7d557Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 35446ee7d557Smrgfi 35456ee7d557Smrgrm -f conftest.i conftest2.i conftest.out 35466ee7d557Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 35476ee7d557Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 35486ee7d557Smrg [Command to truncate a binary pipe]) 35496ee7d557Smrg])# _LT_CMD_TRUNCATE 35506ee7d557Smrg 35516ee7d557Smrg 35526ee7d557Smrg# _LT_CHECK_MAGIC_METHOD 35536ee7d557Smrg# ---------------------- 35546ee7d557Smrg# how to check for library dependencies 35556ee7d557Smrg# -- PORTME fill in with the dynamic library characteristics 35566ee7d557Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 35576ee7d557Smrg[m4_require([_LT_DECL_EGREP]) 35586ee7d557Smrgm4_require([_LT_DECL_OBJDUMP]) 35596ee7d557SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 35606ee7d557Smrglt_cv_deplibs_check_method, 35616ee7d557Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 35626ee7d557Smrglt_cv_file_magic_test_file= 35636ee7d557Smrglt_cv_deplibs_check_method='unknown' 35646ee7d557Smrg# Need to set the preceding variable on all platforms that support 35656ee7d557Smrg# interlibrary dependencies. 35666ee7d557Smrg# 'none' -- dependencies not supported. 35676ee7d557Smrg# 'unknown' -- same as none, but documents that we really don't know. 35686ee7d557Smrg# 'pass_all' -- all dependencies passed with no checks. 35696ee7d557Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 35706ee7d557Smrg# that responds to the $file_magic_cmd with a given extended regex. 35716ee7d557Smrg# If you have 'file' or equivalent on your system and you're not sure 35726ee7d557Smrg# whether 'pass_all' will *always* work, you probably want this one. 35736ee7d557Smrg 35746ee7d557Smrgcase $host_os in 35756ee7d557Smrgaix[[4-9]]*) 35766ee7d557Smrg lt_cv_deplibs_check_method=pass_all 35776ee7d557Smrg ;; 35786ee7d557Smrg 35796ee7d557Smrgbeos*) 35806ee7d557Smrg lt_cv_deplibs_check_method=pass_all 35816ee7d557Smrg ;; 35826ee7d557Smrg 35836ee7d557Smrgbsdi[[45]]*) 35846ee7d557Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 35856ee7d557Smrg lt_cv_file_magic_cmd='$FILECMD -L' 35866ee7d557Smrg lt_cv_file_magic_test_file=/shlib/libc.so 35876ee7d557Smrg ;; 35886ee7d557Smrg 35896ee7d557Smrgcygwin*) 35906ee7d557Smrg # func_win32_libid is a shell function defined in ltmain.sh 35916ee7d557Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 35926ee7d557Smrg lt_cv_file_magic_cmd='func_win32_libid' 35936ee7d557Smrg ;; 35946ee7d557Smrg 35956ee7d557Smrgmingw* | windows* | pw32*) 35966ee7d557Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 35976ee7d557Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 35986ee7d557Smrg # unless we find 'file', for example because we are cross-compiling. 35996ee7d557Smrg if ( file / ) >/dev/null 2>&1; then 36006ee7d557Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 36016ee7d557Smrg lt_cv_file_magic_cmd='func_win32_libid' 36026ee7d557Smrg else 36036ee7d557Smrg # Keep this pattern in sync with the one in func_win32_libid. 36046ee7d557Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' 36056ee7d557Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 36066ee7d557Smrg fi 36076ee7d557Smrg ;; 36086ee7d557Smrg 36096ee7d557Smrgcegcc*) 36106ee7d557Smrg # use the weaker test based on 'objdump'. See mingw*. 36116ee7d557Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 36126ee7d557Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 36136ee7d557Smrg ;; 36146ee7d557Smrg 36156ee7d557Smrgdarwin* | rhapsody*) 36166ee7d557Smrg lt_cv_deplibs_check_method=pass_all 36176ee7d557Smrg ;; 36186ee7d557Smrg 36196ee7d557Smrgfreebsd* | dragonfly* | midnightbsd*) 36206ee7d557Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 36216ee7d557Smrg case $host_cpu in 36226ee7d557Smrg i*86 ) 36236ee7d557Smrg # Not sure whether the presence of OpenBSD here was a mistake. 36246ee7d557Smrg # Let's accept both of them until this is cleared up. 36256ee7d557Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 36266ee7d557Smrg lt_cv_file_magic_cmd=$FILECMD 36276ee7d557Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 36286ee7d557Smrg ;; 36296ee7d557Smrg esac 36306ee7d557Smrg else 36316ee7d557Smrg lt_cv_deplibs_check_method=pass_all 36326ee7d557Smrg fi 36336ee7d557Smrg ;; 36346ee7d557Smrg 36356ee7d557Smrghaiku*) 36366ee7d557Smrg lt_cv_deplibs_check_method=pass_all 36376ee7d557Smrg ;; 36386ee7d557Smrg 36396ee7d557Smrghpux10.20* | hpux11*) 36406ee7d557Smrg lt_cv_file_magic_cmd=$FILECMD 36416ee7d557Smrg case $host_cpu in 36426ee7d557Smrg ia64*) 36436ee7d557Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 36446ee7d557Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 36456ee7d557Smrg ;; 36466ee7d557Smrg hppa*64*) 36476ee7d557Smrg [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]'] 36486ee7d557Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 36496ee7d557Smrg ;; 36506ee7d557Smrg *) 36516ee7d557Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 36526ee7d557Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 36536ee7d557Smrg ;; 36546ee7d557Smrg esac 36556ee7d557Smrg ;; 36566ee7d557Smrg 36576ee7d557Smrginterix[[3-9]]*) 36586ee7d557Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 36596ee7d557Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 36606ee7d557Smrg ;; 36616ee7d557Smrg 36626ee7d557Smrgirix5* | irix6* | nonstopux*) 36636ee7d557Smrg case $LD in 36646ee7d557Smrg *-32|*"-32 ") libmagic=32-bit;; 36656ee7d557Smrg *-n32|*"-n32 ") libmagic=N32;; 36666ee7d557Smrg *-64|*"-64 ") libmagic=64-bit;; 36676ee7d557Smrg *) libmagic=never-match;; 36686ee7d557Smrg esac 36696ee7d557Smrg lt_cv_deplibs_check_method=pass_all 36706ee7d557Smrg ;; 36716ee7d557Smrg 36726ee7d557Smrg# This must be glibc/ELF. 36736ee7d557Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 36746ee7d557Smrg lt_cv_deplibs_check_method=pass_all 36756ee7d557Smrg ;; 36766ee7d557Smrg 36776ee7d557Smrg*-mlibc) 36786ee7d557Smrg lt_cv_deplibs_check_method=pass_all 36796ee7d557Smrg ;; 36806ee7d557Smrg 36816ee7d557Smrgnetbsd* | netbsdelf*-gnu) 36826ee7d557Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 36836ee7d557Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 36846ee7d557Smrg else 36856ee7d557Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 36866ee7d557Smrg fi 36876ee7d557Smrg ;; 36886ee7d557Smrg 36896ee7d557Smrgnewos6*) 36906ee7d557Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 36916ee7d557Smrg lt_cv_file_magic_cmd=$FILECMD 36926ee7d557Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 36936ee7d557Smrg ;; 36946ee7d557Smrg 36956ee7d557Smrg*nto* | *qnx*) 36966ee7d557Smrg lt_cv_deplibs_check_method=pass_all 36976ee7d557Smrg ;; 36986ee7d557Smrg 36996ee7d557Smrgopenbsd*) 37006ee7d557Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 37016ee7d557Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 37026ee7d557Smrg else 37036ee7d557Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 37046ee7d557Smrg fi 37056ee7d557Smrg ;; 37066ee7d557Smrg 37076ee7d557Smrgosf3* | osf4* | osf5*) 37086ee7d557Smrg lt_cv_deplibs_check_method=pass_all 37096ee7d557Smrg ;; 37106ee7d557Smrg 37116ee7d557Smrgrdos*) 37126ee7d557Smrg lt_cv_deplibs_check_method=pass_all 37136ee7d557Smrg ;; 37146ee7d557Smrg 37156ee7d557Smrgserenity*) 37166ee7d557Smrg lt_cv_deplibs_check_method=pass_all 37176ee7d557Smrg ;; 37186ee7d557Smrg 37196ee7d557Smrgsolaris*) 37206ee7d557Smrg lt_cv_deplibs_check_method=pass_all 37216ee7d557Smrg ;; 37226ee7d557Smrg 37236ee7d557Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 37246ee7d557Smrg lt_cv_deplibs_check_method=pass_all 37256ee7d557Smrg ;; 37266ee7d557Smrg 37276ee7d557Smrgsysv4 | sysv4.3*) 37286ee7d557Smrg case $host_vendor in 37296ee7d557Smrg motorola) 37306ee7d557Smrg 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]]' 37316ee7d557Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 37326ee7d557Smrg ;; 37336ee7d557Smrg ncr) 37346ee7d557Smrg lt_cv_deplibs_check_method=pass_all 37356ee7d557Smrg ;; 37366ee7d557Smrg sequent) 37376ee7d557Smrg lt_cv_file_magic_cmd='/bin/file' 37386ee7d557Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 37396ee7d557Smrg ;; 37406ee7d557Smrg sni) 37416ee7d557Smrg lt_cv_file_magic_cmd='/bin/file' 37426ee7d557Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 37436ee7d557Smrg lt_cv_file_magic_test_file=/lib/libc.so 37446ee7d557Smrg ;; 37456ee7d557Smrg siemens) 37466ee7d557Smrg lt_cv_deplibs_check_method=pass_all 37476ee7d557Smrg ;; 37486ee7d557Smrg pc) 37496ee7d557Smrg lt_cv_deplibs_check_method=pass_all 37506ee7d557Smrg ;; 37516ee7d557Smrg esac 37526ee7d557Smrg ;; 37536ee7d557Smrg 37546ee7d557Smrgtpf*) 37556ee7d557Smrg lt_cv_deplibs_check_method=pass_all 37566ee7d557Smrg ;; 37576ee7d557Smrgos2*) 37586ee7d557Smrg lt_cv_deplibs_check_method=pass_all 37596ee7d557Smrg ;; 37606ee7d557Smrgesac 37616ee7d557Smrg]) 37626ee7d557Smrg 37636ee7d557Smrgfile_magic_glob= 37646ee7d557Smrgwant_nocaseglob=no 37656ee7d557Smrgif test "$build" = "$host"; then 37666ee7d557Smrg case $host_os in 37676ee7d557Smrg mingw* | windows* | pw32*) 37686ee7d557Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 37696ee7d557Smrg want_nocaseglob=yes 37706ee7d557Smrg else 37716ee7d557Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 37726ee7d557Smrg fi 37736ee7d557Smrg ;; 37746ee7d557Smrg esac 37756ee7d557Smrgfi 37766ee7d557Smrg 37776ee7d557Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 37786ee7d557Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 37796ee7d557Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 37806ee7d557Smrg 37816ee7d557Smrg_LT_DECL([], [deplibs_check_method], [1], 37826ee7d557Smrg [Method to check whether dependent libraries are shared objects]) 37836ee7d557Smrg_LT_DECL([], [file_magic_cmd], [1], 37846ee7d557Smrg [Command to use when deplibs_check_method = "file_magic"]) 37856ee7d557Smrg_LT_DECL([], [file_magic_glob], [1], 37866ee7d557Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 37876ee7d557Smrg_LT_DECL([], [want_nocaseglob], [1], 37886ee7d557Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 37896ee7d557Smrg])# _LT_CHECK_MAGIC_METHOD 37906ee7d557Smrg 37916ee7d557Smrg 37926ee7d557Smrg# LT_PATH_NM 37936ee7d557Smrg# ---------- 37946ee7d557Smrg# find the pathname to a BSD- or MS-compatible name lister 37956ee7d557SmrgAC_DEFUN([LT_PATH_NM], 37966ee7d557Smrg[AC_REQUIRE([AC_PROG_CC])dnl 37976ee7d557SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 37986ee7d557Smrg[if test -n "$NM"; then 37996ee7d557Smrg # Let the user override the test. 38006ee7d557Smrg lt_cv_path_NM=$NM 38016ee7d557Smrgelse 38026ee7d557Smrg lt_nm_to_check=${ac_tool_prefix}nm 38036ee7d557Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 38046ee7d557Smrg lt_nm_to_check="$lt_nm_to_check nm" 38056ee7d557Smrg fi 38066ee7d557Smrg for lt_tmp_nm in $lt_nm_to_check; do 38076ee7d557Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 38086ee7d557Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 38096ee7d557Smrg IFS=$lt_save_ifs 38106ee7d557Smrg test -z "$ac_dir" && ac_dir=. 38116ee7d557Smrg tmp_nm=$ac_dir/$lt_tmp_nm 38126ee7d557Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 38136ee7d557Smrg # Check to see if the nm accepts a BSD-compat flag. 38146ee7d557Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 38156ee7d557Smrg # nm: unknown option "B" ignored 38166ee7d557Smrg # Tru64's nm complains that /dev/null is an invalid object file 38176ee7d557Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 38186ee7d557Smrg case $build_os in 38196ee7d557Smrg mingw* | windows*) lt_bad_file=conftest.nm/nofile ;; 38206ee7d557Smrg *) lt_bad_file=/dev/null ;; 38216ee7d557Smrg esac 38226ee7d557Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 38236ee7d557Smrg *$lt_bad_file* | *'Invalid file or object type'*) 38246ee7d557Smrg lt_cv_path_NM="$tmp_nm -B" 38256ee7d557Smrg break 2 38266ee7d557Smrg ;; 38276ee7d557Smrg *) 38286ee7d557Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 38296ee7d557Smrg */dev/null*) 38306ee7d557Smrg lt_cv_path_NM="$tmp_nm -p" 38316ee7d557Smrg break 2 38326ee7d557Smrg ;; 38336ee7d557Smrg *) 38346ee7d557Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 38356ee7d557Smrg continue # so that we can try to find one that supports BSD flags 38366ee7d557Smrg ;; 38376ee7d557Smrg esac 38386ee7d557Smrg ;; 38396ee7d557Smrg esac 38406ee7d557Smrg fi 38416ee7d557Smrg done 38426ee7d557Smrg IFS=$lt_save_ifs 38436ee7d557Smrg done 38446ee7d557Smrg : ${lt_cv_path_NM=no} 38456ee7d557Smrgfi]) 38466ee7d557Smrgif test no != "$lt_cv_path_NM"; then 38476ee7d557Smrg NM=$lt_cv_path_NM 38486ee7d557Smrgelse 38496ee7d557Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 38506ee7d557Smrg if test -n "$DUMPBIN"; then : 38516ee7d557Smrg # Let the user override the test. 38526ee7d557Smrg else 38536ee7d557Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 38546ee7d557Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 38556ee7d557Smrg *COFF*) 38566ee7d557Smrg DUMPBIN="$DUMPBIN -symbols -headers" 38576ee7d557Smrg ;; 38586ee7d557Smrg *) 38596ee7d557Smrg DUMPBIN=: 38606ee7d557Smrg ;; 38616ee7d557Smrg esac 38626ee7d557Smrg fi 38636ee7d557Smrg AC_SUBST([DUMPBIN]) 38646ee7d557Smrg if test : != "$DUMPBIN"; then 38656ee7d557Smrg NM=$DUMPBIN 38666ee7d557Smrg fi 38676ee7d557Smrgfi 38686ee7d557Smrgtest -z "$NM" && NM=nm 38696ee7d557SmrgAC_SUBST([NM]) 38706ee7d557Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 38716ee7d557Smrg 38726ee7d557SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 38736ee7d557Smrg [lt_cv_nm_interface="BSD nm" 38746ee7d557Smrg echo "int some_variable = 0;" > conftest.$ac_ext 38756ee7d557Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 38766ee7d557Smrg (eval "$ac_compile" 2>conftest.err) 38776ee7d557Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 38786ee7d557Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 38796ee7d557Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 38806ee7d557Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 38816ee7d557Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 38826ee7d557Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 38836ee7d557Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 38846ee7d557Smrg lt_cv_nm_interface="MS dumpbin" 38856ee7d557Smrg fi 38866ee7d557Smrg rm -f conftest*]) 38876ee7d557Smrg])# LT_PATH_NM 38886ee7d557Smrg 38896ee7d557Smrg# Old names: 38906ee7d557SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 38916ee7d557SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 38926ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 38936ee7d557Smrgdnl AC_DEFUN([AM_PROG_NM], []) 38946ee7d557Smrgdnl AC_DEFUN([AC_PROG_NM], []) 38956ee7d557Smrg 38966ee7d557Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38976ee7d557Smrg# -------------------------------- 38986ee7d557Smrg# how to determine the name of the shared library 38996ee7d557Smrg# associated with a specific link library. 39006ee7d557Smrg# -- PORTME fill in with the dynamic library characteristics 39016ee7d557Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 39026ee7d557Smrg[m4_require([_LT_DECL_EGREP]) 39036ee7d557Smrgm4_require([_LT_DECL_OBJDUMP]) 39046ee7d557Smrgm4_require([_LT_DECL_DLLTOOL]) 39056ee7d557SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 39066ee7d557Smrglt_cv_sharedlib_from_linklib_cmd, 39076ee7d557Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 39086ee7d557Smrg 39096ee7d557Smrgcase $host_os in 39106ee7d557Smrgcygwin* | mingw* | windows* | pw32* | cegcc*) 39116ee7d557Smrg # two different shell functions defined in ltmain.sh; 39126ee7d557Smrg # decide which one to use based on capabilities of $DLLTOOL 39136ee7d557Smrg case `$DLLTOOL --help 2>&1` in 39146ee7d557Smrg *--identify-strict*) 39156ee7d557Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 39166ee7d557Smrg ;; 39176ee7d557Smrg *) 39186ee7d557Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 39196ee7d557Smrg ;; 39206ee7d557Smrg esac 39216ee7d557Smrg ;; 39226ee7d557Smrg*) 39236ee7d557Smrg # fallback: assume linklib IS sharedlib 39246ee7d557Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 39256ee7d557Smrg ;; 39266ee7d557Smrgesac 39276ee7d557Smrg]) 39286ee7d557Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 39296ee7d557Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 39306ee7d557Smrg 39316ee7d557Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 39326ee7d557Smrg [Command to associate shared and link libraries]) 39336ee7d557Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 39346ee7d557Smrg 39356ee7d557Smrg 39366ee7d557Smrg# _LT_PATH_MANIFEST_TOOL 39376ee7d557Smrg# ---------------------- 39386ee7d557Smrg# locate the manifest tool 39396ee7d557Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 39406ee7d557Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 39416ee7d557Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 39426ee7d557SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_manifest_tool], 39436ee7d557Smrg [lt_cv_path_manifest_tool=no 39446ee7d557Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 39456ee7d557Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 39466ee7d557Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 39476ee7d557Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 39486ee7d557Smrg lt_cv_path_manifest_tool=yes 39496ee7d557Smrg fi 39506ee7d557Smrg rm -f conftest*]) 39516ee7d557Smrgif test yes != "$lt_cv_path_manifest_tool"; then 39526ee7d557Smrg MANIFEST_TOOL=: 39536ee7d557Smrgfi 39546ee7d557Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 39556ee7d557Smrg])# _LT_PATH_MANIFEST_TOOL 39566ee7d557Smrg 39576ee7d557Smrg 39586ee7d557Smrg# _LT_DLL_DEF_P([FILE]) 39596ee7d557Smrg# --------------------- 39606ee7d557Smrg# True iff FILE is a Windows DLL '.def' file. 39616ee7d557Smrg# Keep in sync with func_dll_def_p in the libtool script 39626ee7d557SmrgAC_DEFUN([_LT_DLL_DEF_P], 39636ee7d557Smrg[dnl 39646ee7d557Smrg test DEF = "`$SED -n dnl 39656ee7d557Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 39666ee7d557Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 39676ee7d557Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 39686ee7d557Smrg -e q dnl Only consider the first "real" line 39696ee7d557Smrg $1`" dnl 39706ee7d557Smrg])# _LT_DLL_DEF_P 39716ee7d557Smrg 39726ee7d557Smrg 39736ee7d557Smrg# LT_LIB_M 39746ee7d557Smrg# -------- 39756ee7d557Smrg# check for math library 39766ee7d557SmrgAC_DEFUN([LT_LIB_M], 39776ee7d557Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39786ee7d557SmrgLIBM= 39796ee7d557Smrgcase $host in 39806ee7d557Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-mingw* | *-*-pw32* | *-*-darwin*) 39816ee7d557Smrg # These system don't have libm, or don't need it 39826ee7d557Smrg ;; 39836ee7d557Smrg*-ncr-sysv4.3*) 39846ee7d557Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 39856ee7d557Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 39866ee7d557Smrg ;; 39876ee7d557Smrg*) 39886ee7d557Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 39896ee7d557Smrg ;; 39906ee7d557Smrgesac 39916ee7d557SmrgAC_SUBST([LIBM]) 39926ee7d557Smrg])# LT_LIB_M 39936ee7d557Smrg 39946ee7d557Smrg# Old name: 39956ee7d557SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 39966ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 39976ee7d557Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 39986ee7d557Smrg 39996ee7d557Smrg 40006ee7d557Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 40016ee7d557Smrg# ------------------------------- 40026ee7d557Smrgm4_defun([_LT_COMPILER_NO_RTTI], 40036ee7d557Smrg[m4_require([_LT_TAG_COMPILER])dnl 40046ee7d557Smrg 40056ee7d557Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 40066ee7d557Smrg 40076ee7d557Smrgif test yes = "$GCC"; then 40086ee7d557Smrg case $cc_basename in 40096ee7d557Smrg nvcc*) 40106ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 40116ee7d557Smrg *) 40126ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 40136ee7d557Smrg esac 40146ee7d557Smrg 40156ee7d557Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 40166ee7d557Smrg lt_cv_prog_compiler_rtti_exceptions, 40176ee7d557Smrg [-fno-rtti -fno-exceptions], [], 40186ee7d557Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 40196ee7d557Smrgfi 40206ee7d557Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 40216ee7d557Smrg [Compiler flag to turn off builtin functions]) 40226ee7d557Smrg])# _LT_COMPILER_NO_RTTI 40236ee7d557Smrg 40246ee7d557Smrg 40256ee7d557Smrg# _LT_CMD_GLOBAL_SYMBOLS 40266ee7d557Smrg# ---------------------- 40276ee7d557Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 40286ee7d557Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 40296ee7d557SmrgAC_REQUIRE([AC_PROG_CC])dnl 40306ee7d557SmrgAC_REQUIRE([AC_PROG_AWK])dnl 40316ee7d557SmrgAC_REQUIRE([LT_PATH_NM])dnl 40326ee7d557SmrgAC_REQUIRE([LT_PATH_LD])dnl 40336ee7d557Smrgm4_require([_LT_DECL_SED])dnl 40346ee7d557Smrgm4_require([_LT_DECL_EGREP])dnl 40356ee7d557Smrgm4_require([_LT_TAG_COMPILER])dnl 40366ee7d557Smrg 40376ee7d557Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 40386ee7d557SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 40396ee7d557SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 40406ee7d557Smrg[ 40416ee7d557Smrg# These are sane defaults that work on at least a few old systems. 40426ee7d557Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 40436ee7d557Smrg 40446ee7d557Smrg# Character class describing NM global symbol codes. 40456ee7d557Smrgsymcode='[[BCDEGRST]]' 40466ee7d557Smrg 40476ee7d557Smrg# Regexp to match symbols that can be accessed directly from C. 40486ee7d557Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 40496ee7d557Smrg 40506ee7d557Smrg# Define system-specific variables. 40516ee7d557Smrgcase $host_os in 40526ee7d557Smrgaix*) 40536ee7d557Smrg symcode='[[BCDT]]' 40546ee7d557Smrg ;; 40556ee7d557Smrgcygwin* | mingw* | windows* | pw32* | cegcc*) 40566ee7d557Smrg symcode='[[ABCDGISTW]]' 40576ee7d557Smrg ;; 40586ee7d557Smrghpux*) 40596ee7d557Smrg if test ia64 = "$host_cpu"; then 40606ee7d557Smrg symcode='[[ABCDEGRST]]' 40616ee7d557Smrg fi 40626ee7d557Smrg ;; 40636ee7d557Smrgirix* | nonstopux*) 40646ee7d557Smrg symcode='[[BCDEGRST]]' 40656ee7d557Smrg ;; 40666ee7d557Smrgosf*) 40676ee7d557Smrg symcode='[[BCDEGQRST]]' 40686ee7d557Smrg ;; 40696ee7d557Smrgsolaris*) 40706ee7d557Smrg symcode='[[BCDRT]]' 40716ee7d557Smrg ;; 40726ee7d557Smrgsco3.2v5*) 40736ee7d557Smrg symcode='[[DT]]' 40746ee7d557Smrg ;; 40756ee7d557Smrgsysv4.2uw2*) 40766ee7d557Smrg symcode='[[DT]]' 40776ee7d557Smrg ;; 40786ee7d557Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 40796ee7d557Smrg symcode='[[ABDT]]' 40806ee7d557Smrg ;; 40816ee7d557Smrgsysv4) 40826ee7d557Smrg symcode='[[DFNSTU]]' 40836ee7d557Smrg ;; 40846ee7d557Smrgesac 40856ee7d557Smrg 40866ee7d557Smrg# If we're using GNU nm, then use its standard symbol codes. 40876ee7d557Smrgcase `$NM -V 2>&1` in 40886ee7d557Smrg*GNU* | *'with BFD'*) 40896ee7d557Smrg symcode='[[ABCDGIRSTW]]' ;; 40906ee7d557Smrgesac 40916ee7d557Smrg 40926ee7d557Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 40936ee7d557Smrg # Gets list of data symbols to import. 40946ee7d557Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 40956ee7d557Smrg # Adjust the below global symbol transforms to fixup imported variables. 40966ee7d557Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 40976ee7d557Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 40986ee7d557Smrg lt_c_name_lib_hook="\ 40996ee7d557Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 41006ee7d557Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 41016ee7d557Smrgelse 41026ee7d557Smrg # Disable hooks by default. 41036ee7d557Smrg lt_cv_sys_global_symbol_to_import= 41046ee7d557Smrg lt_cdecl_hook= 41056ee7d557Smrg lt_c_name_hook= 41066ee7d557Smrg lt_c_name_lib_hook= 41076ee7d557Smrgfi 41086ee7d557Smrg 41096ee7d557Smrg# Transform an extracted symbol line into a proper C declaration. 41106ee7d557Smrg# Some systems (esp. on ia64) link data and code symbols differently, 41116ee7d557Smrg# so use this general approach. 41126ee7d557Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 41136ee7d557Smrg$lt_cdecl_hook\ 41146ee7d557Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 41156ee7d557Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 41166ee7d557Smrg 41176ee7d557Smrg# Transform an extracted symbol line into symbol name and symbol address 41186ee7d557Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 41196ee7d557Smrg$lt_c_name_hook\ 41206ee7d557Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 41216ee7d557Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 41226ee7d557Smrg 41236ee7d557Smrg# Transform an extracted symbol line into symbol name with lib prefix and 41246ee7d557Smrg# symbol address. 41256ee7d557Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 41266ee7d557Smrg$lt_c_name_lib_hook\ 41276ee7d557Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 41286ee7d557Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 41296ee7d557Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 41306ee7d557Smrg 41316ee7d557Smrg# Handle CRLF in mingw tool chain 41326ee7d557Smrgopt_cr= 41336ee7d557Smrgcase $build_os in 41346ee7d557Smrgmingw* | windows*) 41356ee7d557Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 41366ee7d557Smrg ;; 41376ee7d557Smrgesac 41386ee7d557Smrg 41396ee7d557Smrg# Try without a prefix underscore, then with it. 41406ee7d557Smrgfor ac_symprfx in "" "_"; do 41416ee7d557Smrg 41426ee7d557Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 41436ee7d557Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 41446ee7d557Smrg 41456ee7d557Smrg # Write the raw and C identifiers. 41466ee7d557Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 41476ee7d557Smrg # Fake it for dumpbin and say T for any non-static function, 41486ee7d557Smrg # D for any global variable and I for any imported variable. 41496ee7d557Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 41506ee7d557Smrg # which start with @ or ?. 41516ee7d557Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 41526ee7d557Smrg" {last_section=section; section=\$ 3};"\ 41536ee7d557Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 41546ee7d557Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 41556ee7d557Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 41566ee7d557Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 41576ee7d557Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 41586ee7d557Smrg" \$ 0!~/External *\|/{next};"\ 41596ee7d557Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 41606ee7d557Smrg" {if(hide[section]) next};"\ 41616ee7d557Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 41626ee7d557Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 41636ee7d557Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 41646ee7d557Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 41656ee7d557Smrg" ' prfx=^$ac_symprfx]" 41666ee7d557Smrg else 41676ee7d557Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 41686ee7d557Smrg fi 41696ee7d557Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 41706ee7d557Smrg 41716ee7d557Smrg # Check to see that the pipe works correctly. 41726ee7d557Smrg pipe_works=no 41736ee7d557Smrg 41746ee7d557Smrg rm -f conftest* 41756ee7d557Smrg cat > conftest.$ac_ext <<_LT_EOF 41766ee7d557Smrg#ifdef __cplusplus 41776ee7d557Smrgextern "C" { 41786ee7d557Smrg#endif 41796ee7d557Smrgchar nm_test_var; 41806ee7d557Smrgvoid nm_test_func(void); 41816ee7d557Smrgvoid nm_test_func(void){} 41826ee7d557Smrg#ifdef __cplusplus 41836ee7d557Smrg} 41846ee7d557Smrg#endif 41856ee7d557Smrgint main(void){nm_test_var='a';nm_test_func();return(0);} 41866ee7d557Smrg_LT_EOF 41876ee7d557Smrg 41886ee7d557Smrg if AC_TRY_EVAL(ac_compile); then 41896ee7d557Smrg # Now try to grab the symbols. 41906ee7d557Smrg nlist=conftest.nm 41916ee7d557Smrg $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD 41926ee7d557Smrg if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then 41936ee7d557Smrg # Try sorting and uniquifying the output. 41946ee7d557Smrg if sort "$nlist" | uniq > "$nlist"T; then 41956ee7d557Smrg mv -f "$nlist"T "$nlist" 41966ee7d557Smrg else 41976ee7d557Smrg rm -f "$nlist"T 41986ee7d557Smrg fi 41996ee7d557Smrg 42006ee7d557Smrg # Make sure that we snagged all the symbols we need. 42016ee7d557Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 42026ee7d557Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 42036ee7d557Smrg cat <<_LT_EOF > conftest.$ac_ext 42046ee7d557Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 42056ee7d557Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 42066ee7d557Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 42076ee7d557Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 42086ee7d557Smrg# define LT@&t@_DLSYM_CONST 42096ee7d557Smrg#elif defined __osf__ 42106ee7d557Smrg/* This system does not cope well with relocations in const data. */ 42116ee7d557Smrg# define LT@&t@_DLSYM_CONST 42126ee7d557Smrg#else 42136ee7d557Smrg# define LT@&t@_DLSYM_CONST const 42146ee7d557Smrg#endif 42156ee7d557Smrg 42166ee7d557Smrg#ifdef __cplusplus 42176ee7d557Smrgextern "C" { 42186ee7d557Smrg#endif 42196ee7d557Smrg 42206ee7d557Smrg_LT_EOF 42216ee7d557Smrg # Now generate the symbol file. 42226ee7d557Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 42236ee7d557Smrg 42246ee7d557Smrg cat <<_LT_EOF >> conftest.$ac_ext 42256ee7d557Smrg 42266ee7d557Smrg/* The mapping between symbol names and symbols. */ 42276ee7d557SmrgLT@&t@_DLSYM_CONST struct { 42286ee7d557Smrg const char *name; 42296ee7d557Smrg void *address; 42306ee7d557Smrg} 42316ee7d557Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 42326ee7d557Smrg{ 42336ee7d557Smrg { "@PROGRAM@", (void *) 0 }, 42346ee7d557Smrg_LT_EOF 42356ee7d557Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 42366ee7d557Smrg cat <<\_LT_EOF >> conftest.$ac_ext 42376ee7d557Smrg {0, (void *) 0} 42386ee7d557Smrg}; 42396ee7d557Smrg 42406ee7d557Smrg/* This works around a problem in FreeBSD linker */ 42416ee7d557Smrg#ifdef FREEBSD_WORKAROUND 42426ee7d557Smrgstatic const void *lt_preloaded_setup() { 42436ee7d557Smrg return lt__PROGRAM__LTX_preloaded_symbols; 42446ee7d557Smrg} 42456ee7d557Smrg#endif 42466ee7d557Smrg 42476ee7d557Smrg#ifdef __cplusplus 42486ee7d557Smrg} 42496ee7d557Smrg#endif 42506ee7d557Smrg_LT_EOF 42516ee7d557Smrg # Now try linking the two files. 42526ee7d557Smrg mv conftest.$ac_objext conftstm.$ac_objext 42536ee7d557Smrg lt_globsym_save_LIBS=$LIBS 42546ee7d557Smrg lt_globsym_save_CFLAGS=$CFLAGS 42556ee7d557Smrg LIBS=conftstm.$ac_objext 42566ee7d557Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 42576ee7d557Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 42586ee7d557Smrg pipe_works=yes 42596ee7d557Smrg fi 42606ee7d557Smrg LIBS=$lt_globsym_save_LIBS 42616ee7d557Smrg CFLAGS=$lt_globsym_save_CFLAGS 42626ee7d557Smrg else 42636ee7d557Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 42646ee7d557Smrg fi 42656ee7d557Smrg else 42666ee7d557Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 42676ee7d557Smrg fi 42686ee7d557Smrg else 42696ee7d557Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 42706ee7d557Smrg fi 42716ee7d557Smrg else 42726ee7d557Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 42736ee7d557Smrg cat conftest.$ac_ext >&5 42746ee7d557Smrg fi 42756ee7d557Smrg rm -rf conftest* conftst* 42766ee7d557Smrg 42776ee7d557Smrg # Do not use the global_symbol_pipe unless it works. 42786ee7d557Smrg if test yes = "$pipe_works"; then 42796ee7d557Smrg break 42806ee7d557Smrg else 42816ee7d557Smrg lt_cv_sys_global_symbol_pipe= 42826ee7d557Smrg fi 42836ee7d557Smrgdone 42846ee7d557Smrg]) 42856ee7d557Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 42866ee7d557Smrg lt_cv_sys_global_symbol_to_cdecl= 42876ee7d557Smrgfi 42886ee7d557Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 42896ee7d557Smrg AC_MSG_RESULT(failed) 42906ee7d557Smrgelse 42916ee7d557Smrg AC_MSG_RESULT(ok) 42926ee7d557Smrgfi 42936ee7d557Smrg 42946ee7d557Smrg# Response file support. 42956ee7d557Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 42966ee7d557Smrg nm_file_list_spec='@' 42976ee7d557Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 42986ee7d557Smrg nm_file_list_spec='@' 42996ee7d557Smrgfi 43006ee7d557Smrg 43016ee7d557Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 43026ee7d557Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 43036ee7d557Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 43046ee7d557Smrg [Transform the output of nm in a proper C declaration]) 43056ee7d557Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 43066ee7d557Smrg [Transform the output of nm into a list of symbols to manually relocate]) 43076ee7d557Smrg_LT_DECL([global_symbol_to_c_name_address], 43086ee7d557Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 43096ee7d557Smrg [Transform the output of nm in a C name address pair]) 43106ee7d557Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 43116ee7d557Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 43126ee7d557Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 43136ee7d557Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 43146ee7d557Smrg [The name lister interface]) 43156ee7d557Smrg_LT_DECL([], [nm_file_list_spec], [1], 43166ee7d557Smrg [Specify filename containing input files for $NM]) 43176ee7d557Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 43186ee7d557Smrg 43196ee7d557Smrg 43206ee7d557Smrg# _LT_COMPILER_PIC([TAGNAME]) 43216ee7d557Smrg# --------------------------- 43226ee7d557Smrgm4_defun([_LT_COMPILER_PIC], 43236ee7d557Smrg[m4_require([_LT_TAG_COMPILER])dnl 43246ee7d557Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 43256ee7d557Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 43266ee7d557Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 43276ee7d557Smrg 43286ee7d557Smrgm4_if([$1], [CXX], [ 43296ee7d557Smrg # C++ specific cases for pic, static, wl, etc. 43306ee7d557Smrg if test yes = "$GXX"; then 43316ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43326ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43336ee7d557Smrg 43346ee7d557Smrg case $host_os in 43356ee7d557Smrg aix*) 43366ee7d557Smrg # All AIX code is PIC. 43376ee7d557Smrg if test ia64 = "$host_cpu"; then 43386ee7d557Smrg # AIX 5 now supports IA64 processor 43396ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43406ee7d557Smrg fi 43416ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43426ee7d557Smrg ;; 43436ee7d557Smrg 43446ee7d557Smrg amigaos*) 43456ee7d557Smrg case $host_cpu in 43466ee7d557Smrg powerpc) 43476ee7d557Smrg # see comment about AmigaOS4 .so support 43486ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43496ee7d557Smrg ;; 43506ee7d557Smrg m68k) 43516ee7d557Smrg # FIXME: we need at least 68020 code to build shared libraries, but 43526ee7d557Smrg # adding the '-m68020' flag to GCC prevents building anything better, 43536ee7d557Smrg # like '-m68040'. 43546ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 43556ee7d557Smrg ;; 43566ee7d557Smrg esac 43576ee7d557Smrg ;; 43586ee7d557Smrg 43596ee7d557Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 43606ee7d557Smrg # PIC is the default for these OSes. 43616ee7d557Smrg ;; 43626ee7d557Smrg mingw* | windows* | cygwin* | os2* | pw32* | cegcc*) 43636ee7d557Smrg # This hack is so that the source file can tell whether it is being 43646ee7d557Smrg # built for inclusion in a dll (and should export symbols for example). 43656ee7d557Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 43666ee7d557Smrg # (--disable-auto-import) libraries 43676ee7d557Smrg m4_if([$1], [GCJ], [], 43686ee7d557Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43696ee7d557Smrg case $host_os in 43706ee7d557Smrg os2*) 43716ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 43726ee7d557Smrg ;; 43736ee7d557Smrg esac 43746ee7d557Smrg ;; 43756ee7d557Smrg darwin* | rhapsody*) 43766ee7d557Smrg # PIC is the default on this platform 43776ee7d557Smrg # Common symbols not allowed in MH_DYLIB files 43786ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 43796ee7d557Smrg ;; 43806ee7d557Smrg *djgpp*) 43816ee7d557Smrg # DJGPP does not support shared libraries at all 43826ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 43836ee7d557Smrg ;; 43846ee7d557Smrg haiku*) 43856ee7d557Smrg # PIC is the default for Haiku. 43866ee7d557Smrg # The "-static" flag exists, but is broken. 43876ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 43886ee7d557Smrg ;; 43896ee7d557Smrg interix[[3-9]]*) 43906ee7d557Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 43916ee7d557Smrg # Instead, we relocate shared libraries at runtime. 43926ee7d557Smrg ;; 43936ee7d557Smrg sysv4*MP*) 43946ee7d557Smrg if test -d /usr/nec; then 43956ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 43966ee7d557Smrg fi 43976ee7d557Smrg ;; 43986ee7d557Smrg hpux*) 43996ee7d557Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 44006ee7d557Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 44016ee7d557Smrg # sets the default TLS model and affects inlining. 44026ee7d557Smrg case $host_cpu in 44036ee7d557Smrg hppa*64*) 44046ee7d557Smrg ;; 44056ee7d557Smrg *) 44066ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44076ee7d557Smrg ;; 44086ee7d557Smrg esac 44096ee7d557Smrg ;; 44106ee7d557Smrg *qnx* | *nto*) 44116ee7d557Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44126ee7d557Smrg # it will coredump. 44136ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44146ee7d557Smrg ;; 44156ee7d557Smrg *) 44166ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44176ee7d557Smrg ;; 44186ee7d557Smrg esac 44196ee7d557Smrg else 44206ee7d557Smrg case $host_os in 44216ee7d557Smrg aix[[4-9]]*) 44226ee7d557Smrg # All AIX code is PIC. 44236ee7d557Smrg if test ia64 = "$host_cpu"; then 44246ee7d557Smrg # AIX 5 now supports IA64 processor 44256ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44266ee7d557Smrg else 44276ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 44286ee7d557Smrg fi 44296ee7d557Smrg ;; 44306ee7d557Smrg chorus*) 44316ee7d557Smrg case $cc_basename in 44326ee7d557Smrg cxch68*) 44336ee7d557Smrg # Green Hills C++ Compiler 44346ee7d557Smrg # _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" 44356ee7d557Smrg ;; 44366ee7d557Smrg esac 44376ee7d557Smrg ;; 44386ee7d557Smrg mingw* | windows* | cygwin* | os2* | pw32* | cegcc*) 44396ee7d557Smrg # This hack is so that the source file can tell whether it is being 44406ee7d557Smrg # built for inclusion in a dll (and should export symbols for example). 44416ee7d557Smrg m4_if([$1], [GCJ], [], 44426ee7d557Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 44436ee7d557Smrg ;; 44446ee7d557Smrg dgux*) 44456ee7d557Smrg case $cc_basename in 44466ee7d557Smrg ec++*) 44476ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44486ee7d557Smrg ;; 44496ee7d557Smrg ghcx*) 44506ee7d557Smrg # Green Hills C++ Compiler 44516ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44526ee7d557Smrg ;; 44536ee7d557Smrg *) 44546ee7d557Smrg ;; 44556ee7d557Smrg esac 44566ee7d557Smrg ;; 44576ee7d557Smrg freebsd* | dragonfly* | midnightbsd*) 44586ee7d557Smrg # FreeBSD uses GNU C++ 44596ee7d557Smrg ;; 44606ee7d557Smrg hpux9* | hpux10* | hpux11*) 44616ee7d557Smrg case $cc_basename in 44626ee7d557Smrg CC*) 44636ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44646ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 44656ee7d557Smrg if test ia64 != "$host_cpu"; then 44666ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 44676ee7d557Smrg fi 44686ee7d557Smrg ;; 44696ee7d557Smrg aCC*) 44706ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44716ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 44726ee7d557Smrg case $host_cpu in 44736ee7d557Smrg hppa*64*|ia64*) 44746ee7d557Smrg # +Z the default 44756ee7d557Smrg ;; 44766ee7d557Smrg *) 44776ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 44786ee7d557Smrg ;; 44796ee7d557Smrg esac 44806ee7d557Smrg ;; 44816ee7d557Smrg *) 44826ee7d557Smrg ;; 44836ee7d557Smrg esac 44846ee7d557Smrg ;; 44856ee7d557Smrg interix*) 44866ee7d557Smrg # This is c89, which is MS Visual C++ (no shared libs) 44876ee7d557Smrg # Anyone wants to do a port? 44886ee7d557Smrg ;; 44896ee7d557Smrg irix5* | irix6* | nonstopux*) 44906ee7d557Smrg case $cc_basename in 44916ee7d557Smrg CC*) 44926ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44936ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44946ee7d557Smrg # CC pic flag -KPIC is the default. 44956ee7d557Smrg ;; 44966ee7d557Smrg *) 44976ee7d557Smrg ;; 44986ee7d557Smrg esac 44996ee7d557Smrg ;; 45006ee7d557Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 45016ee7d557Smrg case $cc_basename in 45026ee7d557Smrg KCC*) 45036ee7d557Smrg # KAI C++ Compiler 45046ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 45056ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45066ee7d557Smrg ;; 45076ee7d557Smrg ecpc* ) 45086ee7d557Smrg # old Intel C++ for x86_64, which still supported -KPIC. 45096ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45106ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45116ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45126ee7d557Smrg ;; 45136ee7d557Smrg icpc* ) 45146ee7d557Smrg # Intel C++, used to be incompatible with GCC. 45156ee7d557Smrg # ICC 10 doesn't accept -KPIC any more. 45166ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45176ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45186ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45196ee7d557Smrg ;; 45206ee7d557Smrg pgCC* | pgcpp*) 45216ee7d557Smrg # Portland Group C++ compiler 45226ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45236ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 45246ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45256ee7d557Smrg ;; 45266ee7d557Smrg cxx*) 45276ee7d557Smrg # Compaq C++ 45286ee7d557Smrg # Make sure the PIC flag is empty. It appears that all Alpha 45296ee7d557Smrg # Linux and Compaq Tru64 Unix objects are PIC. 45306ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45316ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 45326ee7d557Smrg ;; 45336ee7d557Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 45346ee7d557Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 45356ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45366ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 45376ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 45386ee7d557Smrg ;; 45396ee7d557Smrg *) 45406ee7d557Smrg case `$CC -V 2>&1 | $SED 5q` in 45416ee7d557Smrg *Sun\ C*) 45426ee7d557Smrg # Sun C++ 5.9 45436ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45446ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45456ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 45466ee7d557Smrg ;; 45476ee7d557Smrg esac 45486ee7d557Smrg ;; 45496ee7d557Smrg esac 45506ee7d557Smrg ;; 45516ee7d557Smrg lynxos*) 45526ee7d557Smrg ;; 45536ee7d557Smrg m88k*) 45546ee7d557Smrg ;; 45556ee7d557Smrg mvs*) 45566ee7d557Smrg case $cc_basename in 45576ee7d557Smrg cxx*) 45586ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 45596ee7d557Smrg ;; 45606ee7d557Smrg *) 45616ee7d557Smrg ;; 45626ee7d557Smrg esac 45636ee7d557Smrg ;; 45646ee7d557Smrg netbsd* | netbsdelf*-gnu) 45656ee7d557Smrg ;; 45666ee7d557Smrg *-mlibc) 45676ee7d557Smrg ;; 45686ee7d557Smrg *qnx* | *nto*) 45696ee7d557Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 45706ee7d557Smrg # it will coredump. 45716ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 45726ee7d557Smrg ;; 45736ee7d557Smrg osf3* | osf4* | osf5*) 45746ee7d557Smrg case $cc_basename in 45756ee7d557Smrg KCC*) 45766ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 45776ee7d557Smrg ;; 45786ee7d557Smrg RCC*) 45796ee7d557Smrg # Rational C++ 2.4.1 45806ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45816ee7d557Smrg ;; 45826ee7d557Smrg cxx*) 45836ee7d557Smrg # Digital/Compaq C++ 45846ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45856ee7d557Smrg # Make sure the PIC flag is empty. It appears that all Alpha 45866ee7d557Smrg # Linux and Compaq Tru64 Unix objects are PIC. 45876ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45886ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 45896ee7d557Smrg ;; 45906ee7d557Smrg *) 45916ee7d557Smrg ;; 45926ee7d557Smrg esac 45936ee7d557Smrg ;; 45946ee7d557Smrg psos*) 45956ee7d557Smrg ;; 45966ee7d557Smrg serenity*) 45976ee7d557Smrg ;; 45986ee7d557Smrg solaris*) 45996ee7d557Smrg case $cc_basename in 46006ee7d557Smrg CC* | sunCC*) 46016ee7d557Smrg # Sun C++ 4.2, 5.x and Centerline C++ 46026ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 46036ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46046ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 46056ee7d557Smrg ;; 46066ee7d557Smrg gcx*) 46076ee7d557Smrg # Green Hills C++ Compiler 46086ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 46096ee7d557Smrg ;; 46106ee7d557Smrg *) 46116ee7d557Smrg ;; 46126ee7d557Smrg esac 46136ee7d557Smrg ;; 46146ee7d557Smrg sunos4*) 46156ee7d557Smrg case $cc_basename in 46166ee7d557Smrg CC*) 46176ee7d557Smrg # Sun C++ 4.x 46186ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 46196ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46206ee7d557Smrg ;; 46216ee7d557Smrg lcc*) 46226ee7d557Smrg # Lucid 46236ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 46246ee7d557Smrg ;; 46256ee7d557Smrg *) 46266ee7d557Smrg ;; 46276ee7d557Smrg esac 46286ee7d557Smrg ;; 46296ee7d557Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 46306ee7d557Smrg case $cc_basename in 46316ee7d557Smrg CC*) 46326ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46336ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 46346ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46356ee7d557Smrg ;; 46366ee7d557Smrg esac 46376ee7d557Smrg ;; 46386ee7d557Smrg tandem*) 46396ee7d557Smrg case $cc_basename in 46406ee7d557Smrg NCC*) 46416ee7d557Smrg # NonStop-UX NCC 3.20 46426ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 46436ee7d557Smrg ;; 46446ee7d557Smrg *) 46456ee7d557Smrg ;; 46466ee7d557Smrg esac 46476ee7d557Smrg ;; 46486ee7d557Smrg vxworks*) 46496ee7d557Smrg ;; 46506ee7d557Smrg *) 46516ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46526ee7d557Smrg ;; 46536ee7d557Smrg esac 46546ee7d557Smrg fi 46556ee7d557Smrg], 46566ee7d557Smrg[ 46576ee7d557Smrg if test yes = "$GCC"; then 46586ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46596ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 46606ee7d557Smrg 46616ee7d557Smrg case $host_os in 46626ee7d557Smrg aix*) 46636ee7d557Smrg # All AIX code is PIC. 46646ee7d557Smrg if test ia64 = "$host_cpu"; then 46656ee7d557Smrg # AIX 5 now supports IA64 processor 46666ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46676ee7d557Smrg fi 46686ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46696ee7d557Smrg ;; 46706ee7d557Smrg 46716ee7d557Smrg amigaos*) 46726ee7d557Smrg case $host_cpu in 46736ee7d557Smrg powerpc) 46746ee7d557Smrg # see comment about AmigaOS4 .so support 46756ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46766ee7d557Smrg ;; 46776ee7d557Smrg m68k) 46786ee7d557Smrg # FIXME: we need at least 68020 code to build shared libraries, but 46796ee7d557Smrg # adding the '-m68020' flag to GCC prevents building anything better, 46806ee7d557Smrg # like '-m68040'. 46816ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 46826ee7d557Smrg ;; 46836ee7d557Smrg esac 46846ee7d557Smrg ;; 46856ee7d557Smrg 46866ee7d557Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 46876ee7d557Smrg # PIC is the default for these OSes. 46886ee7d557Smrg ;; 46896ee7d557Smrg 46906ee7d557Smrg mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) 46916ee7d557Smrg # This hack is so that the source file can tell whether it is being 46926ee7d557Smrg # built for inclusion in a dll (and should export symbols for example). 46936ee7d557Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 46946ee7d557Smrg # (--disable-auto-import) libraries 46956ee7d557Smrg m4_if([$1], [GCJ], [], 46966ee7d557Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 46976ee7d557Smrg case $host_os in 46986ee7d557Smrg os2*) 46996ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 47006ee7d557Smrg ;; 47016ee7d557Smrg esac 47026ee7d557Smrg ;; 47036ee7d557Smrg 47046ee7d557Smrg darwin* | rhapsody*) 47056ee7d557Smrg # PIC is the default on this platform 47066ee7d557Smrg # Common symbols not allowed in MH_DYLIB files 47076ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 47086ee7d557Smrg ;; 47096ee7d557Smrg 47106ee7d557Smrg haiku*) 47116ee7d557Smrg # PIC is the default for Haiku. 47126ee7d557Smrg # The "-static" flag exists, but is broken. 47136ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 47146ee7d557Smrg ;; 47156ee7d557Smrg 47166ee7d557Smrg hpux*) 47176ee7d557Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 47186ee7d557Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 47196ee7d557Smrg # sets the default TLS model and affects inlining. 47206ee7d557Smrg case $host_cpu in 47216ee7d557Smrg hppa*64*) 47226ee7d557Smrg # +Z the default 47236ee7d557Smrg ;; 47246ee7d557Smrg *) 47256ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47266ee7d557Smrg ;; 47276ee7d557Smrg esac 47286ee7d557Smrg ;; 47296ee7d557Smrg 47306ee7d557Smrg interix[[3-9]]*) 47316ee7d557Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 47326ee7d557Smrg # Instead, we relocate shared libraries at runtime. 47336ee7d557Smrg ;; 47346ee7d557Smrg 47356ee7d557Smrg msdosdjgpp*) 47366ee7d557Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 47376ee7d557Smrg # on systems that don't support them. 47386ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 47396ee7d557Smrg enable_shared=no 47406ee7d557Smrg ;; 47416ee7d557Smrg 47426ee7d557Smrg *nto* | *qnx*) 47436ee7d557Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 47446ee7d557Smrg # it will coredump. 47456ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 47466ee7d557Smrg ;; 47476ee7d557Smrg 47486ee7d557Smrg sysv4*MP*) 47496ee7d557Smrg if test -d /usr/nec; then 47506ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 47516ee7d557Smrg fi 47526ee7d557Smrg ;; 47536ee7d557Smrg 47546ee7d557Smrg *) 47556ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47566ee7d557Smrg ;; 47576ee7d557Smrg esac 47586ee7d557Smrg 47596ee7d557Smrg case $cc_basename in 47606ee7d557Smrg nvcc*) # Cuda Compiler Driver 2.2 47616ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 47626ee7d557Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 47636ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 47646ee7d557Smrg fi 47656ee7d557Smrg ;; 47666ee7d557Smrg esac 47676ee7d557Smrg else 47686ee7d557Smrg # PORTME Check for flag to pass linker flags through the system compiler. 47696ee7d557Smrg case $host_os in 47706ee7d557Smrg aix*) 47716ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47726ee7d557Smrg if test ia64 = "$host_cpu"; then 47736ee7d557Smrg # AIX 5 now supports IA64 processor 47746ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47756ee7d557Smrg else 47766ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 47776ee7d557Smrg fi 47786ee7d557Smrg ;; 47796ee7d557Smrg 47806ee7d557Smrg darwin* | rhapsody*) 47816ee7d557Smrg # PIC is the default on this platform 47826ee7d557Smrg # Common symbols not allowed in MH_DYLIB files 47836ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 47846ee7d557Smrg case $cc_basename in 47856ee7d557Smrg nagfor*) 47866ee7d557Smrg # NAG Fortran compiler 47876ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47886ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47896ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47906ee7d557Smrg ;; 47916ee7d557Smrg esac 47926ee7d557Smrg ;; 47936ee7d557Smrg 47946ee7d557Smrg mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) 47956ee7d557Smrg # This hack is so that the source file can tell whether it is being 47966ee7d557Smrg # built for inclusion in a dll (and should export symbols for example). 47976ee7d557Smrg m4_if([$1], [GCJ], [], 47986ee7d557Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 47996ee7d557Smrg case $host_os in 48006ee7d557Smrg os2*) 48016ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 48026ee7d557Smrg ;; 48036ee7d557Smrg esac 48046ee7d557Smrg ;; 48056ee7d557Smrg 48066ee7d557Smrg hpux9* | hpux10* | hpux11*) 48076ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48086ee7d557Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 48096ee7d557Smrg # not for PA HP-UX. 48106ee7d557Smrg case $host_cpu in 48116ee7d557Smrg hppa*64*|ia64*) 48126ee7d557Smrg # +Z the default 48136ee7d557Smrg ;; 48146ee7d557Smrg *) 48156ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 48166ee7d557Smrg ;; 48176ee7d557Smrg esac 48186ee7d557Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 48196ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 48206ee7d557Smrg ;; 48216ee7d557Smrg 48226ee7d557Smrg irix5* | irix6* | nonstopux*) 48236ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48246ee7d557Smrg # PIC (with -KPIC) is the default. 48256ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48266ee7d557Smrg ;; 48276ee7d557Smrg 48286ee7d557Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 48296ee7d557Smrg case $cc_basename in 48306ee7d557Smrg # old Intel for x86_64, which still supported -KPIC. 48316ee7d557Smrg ecc*) 48326ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48336ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48346ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 48356ee7d557Smrg ;; 48366ee7d557Smrg *flang* | ftn | f18* | f95*) 48376ee7d557Smrg # Flang compiler. 48386ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48396ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 48406ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 48416ee7d557Smrg ;; 48426ee7d557Smrg # icc used to be incompatible with GCC. 48436ee7d557Smrg # ICC 10 doesn't accept -KPIC any more. 48446ee7d557Smrg icc* | ifort*) 48456ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48466ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 48476ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 48486ee7d557Smrg ;; 48496ee7d557Smrg # Lahey Fortran 8.1. 48506ee7d557Smrg lf95*) 48516ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48526ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 48536ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 48546ee7d557Smrg ;; 48556ee7d557Smrg nagfor*) 48566ee7d557Smrg # NAG Fortran compiler 48576ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 48586ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48596ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48606ee7d557Smrg ;; 48616ee7d557Smrg tcc*) 48626ee7d557Smrg # Fabrice Bellard et al's Tiny C Compiler 48636ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48646ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 48656ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 48666ee7d557Smrg ;; 48676ee7d557Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 48686ee7d557Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 48696ee7d557Smrg # which looks to be a dead project) 48706ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48716ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 48726ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48736ee7d557Smrg ;; 48746ee7d557Smrg ccc*) 48756ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48766ee7d557Smrg # All Alpha code is PIC. 48776ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48786ee7d557Smrg ;; 48796ee7d557Smrg xl* | bgxl* | bgf* | mpixl*) 48806ee7d557Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 48816ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48826ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 48836ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 48846ee7d557Smrg ;; 48856ee7d557Smrg *) 48866ee7d557Smrg case `$CC -V 2>&1 | $SED 5q` in 48876ee7d557Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 48886ee7d557Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 48896ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48906ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48916ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 48926ee7d557Smrg ;; 48936ee7d557Smrg *Sun\ F* | *Sun*Fortran*) 48946ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48956ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48966ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48976ee7d557Smrg ;; 48986ee7d557Smrg *Sun\ C*) 48996ee7d557Smrg # Sun C 5.9 49006ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 49016ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49026ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49036ee7d557Smrg ;; 49046ee7d557Smrg *Intel*\ [[CF]]*Compiler*) 49056ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49066ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 49076ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 49086ee7d557Smrg ;; 49096ee7d557Smrg *Portland\ Group*) 49106ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49116ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 49126ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49136ee7d557Smrg ;; 49146ee7d557Smrg esac 49156ee7d557Smrg ;; 49166ee7d557Smrg esac 49176ee7d557Smrg ;; 49186ee7d557Smrg 49196ee7d557Smrg newsos6) 49206ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 49216ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49226ee7d557Smrg ;; 49236ee7d557Smrg 49246ee7d557Smrg *-mlibc) 49256ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49266ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 49276ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 49286ee7d557Smrg ;; 49296ee7d557Smrg 49306ee7d557Smrg *nto* | *qnx*) 49316ee7d557Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 49326ee7d557Smrg # it will coredump. 49336ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 49346ee7d557Smrg ;; 49356ee7d557Smrg 49366ee7d557Smrg osf3* | osf4* | osf5*) 49376ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49386ee7d557Smrg # All OSF/1 code is PIC. 49396ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 49406ee7d557Smrg ;; 49416ee7d557Smrg 49426ee7d557Smrg rdos*) 49436ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 49446ee7d557Smrg ;; 49456ee7d557Smrg 49466ee7d557Smrg serenity*) 49476ee7d557Smrg ;; 49486ee7d557Smrg 49496ee7d557Smrg solaris*) 49506ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 49516ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49526ee7d557Smrg case $cc_basename in 49536ee7d557Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 49546ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 49556ee7d557Smrg *) 49566ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 49576ee7d557Smrg esac 49586ee7d557Smrg ;; 49596ee7d557Smrg 49606ee7d557Smrg sunos4*) 49616ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 49626ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 49636ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49646ee7d557Smrg ;; 49656ee7d557Smrg 49666ee7d557Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 49676ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49686ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 49696ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49706ee7d557Smrg ;; 49716ee7d557Smrg 49726ee7d557Smrg sysv4*MP*) 49736ee7d557Smrg if test -d /usr/nec; then 49746ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 49756ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49766ee7d557Smrg fi 49776ee7d557Smrg ;; 49786ee7d557Smrg 49796ee7d557Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 49806ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49816ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 49826ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49836ee7d557Smrg ;; 49846ee7d557Smrg 49856ee7d557Smrg unicos*) 49866ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 49876ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 49886ee7d557Smrg ;; 49896ee7d557Smrg 49906ee7d557Smrg uts4*) 49916ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 49926ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 49936ee7d557Smrg ;; 49946ee7d557Smrg 49956ee7d557Smrg *) 49966ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 49976ee7d557Smrg ;; 49986ee7d557Smrg esac 49996ee7d557Smrg fi 50006ee7d557Smrg]) 50016ee7d557Smrgcase $host_os in 50026ee7d557Smrg # For platforms that do not support PIC, -DPIC is meaningless: 50036ee7d557Smrg *djgpp*) 50046ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 50056ee7d557Smrg ;; 50066ee7d557Smrg *) 50076ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 50086ee7d557Smrg ;; 50096ee7d557Smrgesac 50106ee7d557Smrg 50116ee7d557SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 50126ee7d557Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 50136ee7d557Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 50146ee7d557Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 50156ee7d557Smrg 50166ee7d557Smrg# 50176ee7d557Smrg# Check to make sure the PIC flag actually works. 50186ee7d557Smrg# 50196ee7d557Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 50206ee7d557Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 50216ee7d557Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 50226ee7d557Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 50236ee7d557Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 50246ee7d557Smrg "" | " "*) ;; 50256ee7d557Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 50266ee7d557Smrg esac], 50276ee7d557Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 50286ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 50296ee7d557Smrgfi 50306ee7d557Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 50316ee7d557Smrg [Additional compiler flags for building library objects]) 50326ee7d557Smrg 50336ee7d557Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 50346ee7d557Smrg [How to pass a linker flag through the compiler]) 50356ee7d557Smrg# 50366ee7d557Smrg# Check to make sure the static flag actually works. 50376ee7d557Smrg# 50386ee7d557Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 50396ee7d557Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 50406ee7d557Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 50416ee7d557Smrg $lt_tmp_static_flag, 50426ee7d557Smrg [], 50436ee7d557Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 50446ee7d557Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 50456ee7d557Smrg [Compiler flag to prevent dynamic linking]) 50466ee7d557Smrg])# _LT_COMPILER_PIC 50476ee7d557Smrg 50486ee7d557Smrg 50496ee7d557Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 50506ee7d557Smrg# ---------------------------- 50516ee7d557Smrg# See if the linker supports building shared libraries. 50526ee7d557Smrgm4_defun([_LT_LINKER_SHLIBS], 50536ee7d557Smrg[AC_REQUIRE([LT_PATH_LD])dnl 50546ee7d557SmrgAC_REQUIRE([LT_PATH_NM])dnl 50556ee7d557Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 50566ee7d557Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 50576ee7d557Smrgm4_require([_LT_DECL_EGREP])dnl 50586ee7d557Smrgm4_require([_LT_DECL_SED])dnl 50596ee7d557Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 50606ee7d557Smrgm4_require([_LT_TAG_COMPILER])dnl 50616ee7d557SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 50626ee7d557Smrgm4_if([$1], [CXX], [ 50636ee7d557Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 50646ee7d557Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 50656ee7d557Smrg case $host_os in 50666ee7d557Smrg aix[[4-9]]*) 50676ee7d557Smrg # If we're using GNU nm, then we don't want the "-C" option. 50686ee7d557Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 50696ee7d557Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 50706ee7d557Smrg # weak defined symbols like other global defined symbols, whereas 50716ee7d557Smrg # GNU nm marks them as "W". 50726ee7d557Smrg # While the 'weak' keyword is ignored in the Export File, we need 50736ee7d557Smrg # it in the Import File for the 'aix-soname' feature, so we have 50746ee7d557Smrg # to replace the "-B" option with "-P" for AIX nm. 50756ee7d557Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 50766ee7d557Smrg _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' 50776ee7d557Smrg else 50786ee7d557Smrg _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' 50796ee7d557Smrg fi 50806ee7d557Smrg ;; 50816ee7d557Smrg pw32*) 50826ee7d557Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 50836ee7d557Smrg ;; 50846ee7d557Smrg cygwin* | mingw* | windows* | cegcc*) 50856ee7d557Smrg case $cc_basename in 50866ee7d557Smrg cl* | icl*) 50876ee7d557Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 50886ee7d557Smrg ;; 50896ee7d557Smrg *) 50906ee7d557Smrg _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' 50916ee7d557Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 50926ee7d557Smrg ;; 50936ee7d557Smrg esac 50946ee7d557Smrg ;; 50956ee7d557Smrg *) 50966ee7d557Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 50976ee7d557Smrg ;; 50986ee7d557Smrg esac 50996ee7d557Smrg], [ 51006ee7d557Smrg runpath_var= 51016ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 51026ee7d557Smrg _LT_TAGVAR(always_export_symbols, $1)=no 51036ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)= 51046ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 51056ee7d557Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 51066ee7d557Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 51076ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 51086ee7d557Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 51096ee7d557Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 51106ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=no 51116ee7d557Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 51126ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 51136ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 51146ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 51156ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 51166ee7d557Smrg _LT_TAGVAR(inherit_rpath, $1)=no 51176ee7d557Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 51186ee7d557Smrg _LT_TAGVAR(module_cmds, $1)= 51196ee7d557Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 51206ee7d557Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 51216ee7d557Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 51226ee7d557Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 51236ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 51246ee7d557Smrg # include_expsyms should be a list of space-separated symbols to be *always* 51256ee7d557Smrg # included in the symbol list 51266ee7d557Smrg _LT_TAGVAR(include_expsyms, $1)= 51276ee7d557Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 51286ee7d557Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 51296ee7d557Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 51306ee7d557Smrg # as well as any symbol that contains 'd'. 51316ee7d557Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 51326ee7d557Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 51336ee7d557Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 51346ee7d557Smrg # the symbol is explicitly referenced. Since portable code cannot 51356ee7d557Smrg # rely on this symbol name, it's probably fine to never include it in 51366ee7d557Smrg # preloaded symbol tables. 51376ee7d557Smrg # Exclude shared library initialization/finalization symbols. 51386ee7d557Smrgdnl Note also adjust exclude_expsyms for C++ above. 51396ee7d557Smrg extract_expsyms_cmds= 51406ee7d557Smrg 51416ee7d557Smrg case $host_os in 51426ee7d557Smrg cygwin* | mingw* | windows* | pw32* | cegcc*) 51436ee7d557Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 51446ee7d557Smrg # When not using gcc, we currently assume that we are using 51456ee7d557Smrg # Microsoft Visual C++ or Intel C++ Compiler. 51466ee7d557Smrg if test yes != "$GCC"; then 51476ee7d557Smrg with_gnu_ld=no 51486ee7d557Smrg fi 51496ee7d557Smrg ;; 51506ee7d557Smrg interix*) 51516ee7d557Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 51526ee7d557Smrg with_gnu_ld=yes 51536ee7d557Smrg ;; 51546ee7d557Smrg esac 51556ee7d557Smrg 51566ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 51576ee7d557Smrg 51586ee7d557Smrg # On some targets, GNU ld is compatible enough with the native linker 51596ee7d557Smrg # that we're better off using the native interface for both. 51606ee7d557Smrg lt_use_gnu_ld_interface=no 51616ee7d557Smrg if test yes = "$with_gnu_ld"; then 51626ee7d557Smrg case $host_os in 51636ee7d557Smrg aix*) 51646ee7d557Smrg # The AIX port of GNU ld has always aspired to compatibility 51656ee7d557Smrg # with the native linker. However, as the warning in the GNU ld 51666ee7d557Smrg # block says, versions before 2.19.5* couldn't really create working 51676ee7d557Smrg # shared libraries, regardless of the interface used. 51686ee7d557Smrg case `$LD -v 2>&1` in 51696ee7d557Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 51706ee7d557Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 51716ee7d557Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 51726ee7d557Smrg *) 51736ee7d557Smrg lt_use_gnu_ld_interface=yes 51746ee7d557Smrg ;; 51756ee7d557Smrg esac 51766ee7d557Smrg ;; 51776ee7d557Smrg *) 51786ee7d557Smrg lt_use_gnu_ld_interface=yes 51796ee7d557Smrg ;; 51806ee7d557Smrg esac 51816ee7d557Smrg fi 51826ee7d557Smrg 51836ee7d557Smrg if test yes = "$lt_use_gnu_ld_interface"; then 51846ee7d557Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 51856ee7d557Smrg wlarc='$wl' 51866ee7d557Smrg 51876ee7d557Smrg # Set some defaults for GNU ld with shared library support. These 51886ee7d557Smrg # are reset later if shared libraries are not supported. Putting them 51896ee7d557Smrg # here allows them to be overridden if necessary. 51906ee7d557Smrg runpath_var=LD_RUN_PATH 51916ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 51926ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 51936ee7d557Smrg # ancient GNU ld didn't support --whole-archive et. al. 51946ee7d557Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 51956ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 51966ee7d557Smrg else 51976ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 51986ee7d557Smrg fi 51996ee7d557Smrg supports_anon_versioning=no 52006ee7d557Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 52016ee7d557Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 52026ee7d557Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 52036ee7d557Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 52046ee7d557Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 52056ee7d557Smrg *\ 2.11.*) ;; # other 2.11 versions 52066ee7d557Smrg *) supports_anon_versioning=yes ;; 52076ee7d557Smrg esac 52086ee7d557Smrg 52096ee7d557Smrg # See if GNU ld supports shared libraries. 52106ee7d557Smrg case $host_os in 52116ee7d557Smrg aix[[3-9]]*) 52126ee7d557Smrg # On AIX/PPC, the GNU linker is very broken 52136ee7d557Smrg if test ia64 != "$host_cpu"; then 52146ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52156ee7d557Smrg cat <<_LT_EOF 1>&2 52166ee7d557Smrg 52176ee7d557Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 52186ee7d557Smrg*** to be unable to reliably create shared libraries on AIX. 52196ee7d557Smrg*** Therefore, libtool is disabling shared libraries support. If you 52206ee7d557Smrg*** really care for shared libraries, you may want to install binutils 52216ee7d557Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 52226ee7d557Smrg*** You will then need to restart the configuration process. 52236ee7d557Smrg 52246ee7d557Smrg_LT_EOF 52256ee7d557Smrg fi 52266ee7d557Smrg ;; 52276ee7d557Smrg 52286ee7d557Smrg amigaos*) 52296ee7d557Smrg case $host_cpu in 52306ee7d557Smrg powerpc) 52316ee7d557Smrg # see comment about AmigaOS4 .so support 52326ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52336ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 52346ee7d557Smrg ;; 52356ee7d557Smrg m68k) 52366ee7d557Smrg _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)' 52376ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52386ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52396ee7d557Smrg ;; 52406ee7d557Smrg esac 52416ee7d557Smrg ;; 52426ee7d557Smrg 52436ee7d557Smrg beos*) 52446ee7d557Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 52456ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 52466ee7d557Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 52476ee7d557Smrg # support --undefined. This deserves some investigation. FIXME 52486ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52496ee7d557Smrg else 52506ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52516ee7d557Smrg fi 52526ee7d557Smrg ;; 52536ee7d557Smrg 52546ee7d557Smrg cygwin* | mingw* | windows* | pw32* | cegcc*) 52556ee7d557Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 52566ee7d557Smrg # as there is no search path for DLLs. 52576ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52586ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 52596ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 52606ee7d557Smrg _LT_TAGVAR(always_export_symbols, $1)=no 52616ee7d557Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 52626ee7d557Smrg _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' 52636ee7d557Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 52646ee7d557Smrg _LT_TAGVAR(file_list_spec, $1)='@' 52656ee7d557Smrg 52666ee7d557Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 52676ee7d557Smrg _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' 52686ee7d557Smrg # If the export-symbols file already is a .def file, use it as 52696ee7d557Smrg # is; otherwise, prepend EXPORTS... 52706ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 52716ee7d557Smrg cp $export_symbols $output_objdir/$soname.def; 52726ee7d557Smrg else 52736ee7d557Smrg echo EXPORTS > $output_objdir/$soname.def; 52746ee7d557Smrg cat $export_symbols >> $output_objdir/$soname.def; 52756ee7d557Smrg fi~ 52766ee7d557Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 52776ee7d557Smrg else 52786ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52796ee7d557Smrg fi 52806ee7d557Smrg ;; 52816ee7d557Smrg 52826ee7d557Smrg haiku*) 52836ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52846ee7d557Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 52856ee7d557Smrg ;; 52866ee7d557Smrg 52876ee7d557Smrg os2*) 52886ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52896ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52906ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 52916ee7d557Smrg shrext_cmds=.dll 52926ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 52936ee7d557Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 52946ee7d557Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 52956ee7d557Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 52966ee7d557Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 52976ee7d557Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 52986ee7d557Smrg emximp -o $lib $output_objdir/$libname.def' 52996ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 53006ee7d557Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 53016ee7d557Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 53026ee7d557Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 53036ee7d557Smrg prefix_cmds="$SED"~ 53046ee7d557Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 53056ee7d557Smrg prefix_cmds="$prefix_cmds -e 1d"; 53066ee7d557Smrg fi~ 53076ee7d557Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 53086ee7d557Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 53096ee7d557Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 53106ee7d557Smrg emximp -o $lib $output_objdir/$libname.def' 53116ee7d557Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 53126ee7d557Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 53136ee7d557Smrg _LT_TAGVAR(file_list_spec, $1)='@' 53146ee7d557Smrg ;; 53156ee7d557Smrg 53166ee7d557Smrg interix[[3-9]]*) 53176ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=no 53186ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53196ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 53206ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 53216ee7d557Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 53226ee7d557Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 53236ee7d557Smrg # default) and relocated if they conflict, which is a slow very memory 53246ee7d557Smrg # consuming and fragmenting process. To avoid this, we pick a random, 53256ee7d557Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 53266ee7d557Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 53276ee7d557Smrg _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' 53286ee7d557Smrg _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' 53296ee7d557Smrg ;; 53306ee7d557Smrg 53316ee7d557Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 53326ee7d557Smrg tmp_diet=no 53336ee7d557Smrg if test linux-dietlibc = "$host_os"; then 53346ee7d557Smrg case $cc_basename in 53356ee7d557Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 53366ee7d557Smrg esac 53376ee7d557Smrg fi 53386ee7d557Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 53396ee7d557Smrg && test no = "$tmp_diet" 53406ee7d557Smrg then 53416ee7d557Smrg tmp_addflag=' $pic_flag' 53426ee7d557Smrg tmp_sharedflag='-shared' 53436ee7d557Smrg case $cc_basename,$host_cpu in 53446ee7d557Smrg pgcc*) # Portland Group C compiler 53456ee7d557Smrg _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' 53466ee7d557Smrg tmp_addflag=' $pic_flag' 53476ee7d557Smrg ;; 53486ee7d557Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 53496ee7d557Smrg # Portland Group f77 and f90 compilers 53506ee7d557Smrg _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' 53516ee7d557Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 53526ee7d557Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 53536ee7d557Smrg tmp_addflag=' -i_dynamic' ;; 53546ee7d557Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 53556ee7d557Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 53566ee7d557Smrg ifc* | ifort*) # Intel Fortran compiler 53576ee7d557Smrg tmp_addflag=' -nofor_main' ;; 53586ee7d557Smrg lf95*) # Lahey Fortran 8.1 53596ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53606ee7d557Smrg tmp_sharedflag='--shared' ;; 53616ee7d557Smrg nagfor*) # NAGFOR 5.3 53626ee7d557Smrg tmp_sharedflag='-Wl,-shared' ;; 53636ee7d557Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 53646ee7d557Smrg tmp_sharedflag='-qmkshrobj' 53656ee7d557Smrg tmp_addflag= ;; 53666ee7d557Smrg nvcc*) # Cuda Compiler Driver 2.2 53676ee7d557Smrg _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' 53686ee7d557Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 53696ee7d557Smrg ;; 53706ee7d557Smrg esac 53716ee7d557Smrg case `$CC -V 2>&1 | $SED 5q` in 53726ee7d557Smrg *Sun\ C*) # Sun C 5.9 53736ee7d557Smrg _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' 53746ee7d557Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 53756ee7d557Smrg tmp_sharedflag='-G' ;; 53766ee7d557Smrg *Sun\ F*) # Sun Fortran 8.3 53776ee7d557Smrg tmp_sharedflag='-G' ;; 53786ee7d557Smrg esac 53796ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53806ee7d557Smrg 53816ee7d557Smrg if test yes = "$supports_anon_versioning"; then 53826ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 53836ee7d557Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 53846ee7d557Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 53856ee7d557Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 53866ee7d557Smrg fi 53876ee7d557Smrg 53886ee7d557Smrg case $cc_basename in 53896ee7d557Smrg tcc*) 53906ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 53916ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 53926ee7d557Smrg ;; 53936ee7d557Smrg xlf* | bgf* | bgxlf* | mpixlf*) 53946ee7d557Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 53956ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 53966ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 53976ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 53986ee7d557Smrg if test yes = "$supports_anon_versioning"; then 53996ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 54006ee7d557Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 54016ee7d557Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 54026ee7d557Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 54036ee7d557Smrg fi 54046ee7d557Smrg ;; 54056ee7d557Smrg esac 54066ee7d557Smrg else 54076ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54086ee7d557Smrg fi 54096ee7d557Smrg ;; 54106ee7d557Smrg 54116ee7d557Smrg *-mlibc) 54126ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 54136ee7d557Smrg _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' 54146ee7d557Smrg ;; 54156ee7d557Smrg 54166ee7d557Smrg netbsd* | netbsdelf*-gnu) 54176ee7d557Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 54186ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 54196ee7d557Smrg wlarc= 54206ee7d557Smrg else 54216ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 54226ee7d557Smrg _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' 54236ee7d557Smrg fi 54246ee7d557Smrg ;; 54256ee7d557Smrg 54266ee7d557Smrg solaris*) 54276ee7d557Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 54286ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54296ee7d557Smrg cat <<_LT_EOF 1>&2 54306ee7d557Smrg 54316ee7d557Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 54326ee7d557Smrg*** create shared libraries on Solaris systems. Therefore, libtool 54336ee7d557Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 54346ee7d557Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 54356ee7d557Smrg*** your PATH or compiler configuration so that the native linker is 54366ee7d557Smrg*** used, and then restart. 54376ee7d557Smrg 54386ee7d557Smrg_LT_EOF 54396ee7d557Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 54406ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 54416ee7d557Smrg _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' 54426ee7d557Smrg else 54436ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54446ee7d557Smrg fi 54456ee7d557Smrg ;; 54466ee7d557Smrg 54476ee7d557Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 54486ee7d557Smrg case `$LD -v 2>&1` in 54496ee7d557Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 54506ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54516ee7d557Smrg cat <<_LT_EOF 1>&2 54526ee7d557Smrg 54536ee7d557Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 54546ee7d557Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 54556ee7d557Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 54566ee7d557Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 54576ee7d557Smrg*** your PATH or compiler configuration so that the native linker is 54586ee7d557Smrg*** used, and then restart. 54596ee7d557Smrg 54606ee7d557Smrg_LT_EOF 54616ee7d557Smrg ;; 54626ee7d557Smrg *) 54636ee7d557Smrg # For security reasons, it is highly recommended that you always 54646ee7d557Smrg # use absolute paths for naming shared libraries, and exclude the 54656ee7d557Smrg # DT_RUNPATH tag from executables and libraries. But doing so 54666ee7d557Smrg # requires that you compile everything twice, which is a pain. 54676ee7d557Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 54686ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 54696ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 54706ee7d557Smrg _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' 54716ee7d557Smrg else 54726ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54736ee7d557Smrg fi 54746ee7d557Smrg ;; 54756ee7d557Smrg esac 54766ee7d557Smrg ;; 54776ee7d557Smrg 54786ee7d557Smrg sunos4*) 54796ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 54806ee7d557Smrg wlarc= 54816ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 54826ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54836ee7d557Smrg ;; 54846ee7d557Smrg 54856ee7d557Smrg *) 54866ee7d557Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 54876ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 54886ee7d557Smrg _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' 54896ee7d557Smrg else 54906ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54916ee7d557Smrg fi 54926ee7d557Smrg ;; 54936ee7d557Smrg esac 54946ee7d557Smrg 54956ee7d557Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 54966ee7d557Smrg runpath_var= 54976ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 54986ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 54996ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 55006ee7d557Smrg fi 55016ee7d557Smrg else 55026ee7d557Smrg # PORTME fill in a description of your system's linker (not GNU ld) 55036ee7d557Smrg case $host_os in 55046ee7d557Smrg aix3*) 55056ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 55066ee7d557Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55076ee7d557Smrg _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' 55086ee7d557Smrg # Note: this linker hardcodes the directories in LIBPATH if there 55096ee7d557Smrg # are no directories specified by -L. 55106ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55116ee7d557Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 55126ee7d557Smrg # Neither direct hardcoding nor static linking is supported with a 55136ee7d557Smrg # broken collect2. 55146ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 55156ee7d557Smrg fi 55166ee7d557Smrg ;; 55176ee7d557Smrg 55186ee7d557Smrg aix[[4-9]]*) 55196ee7d557Smrg if test ia64 = "$host_cpu"; then 55206ee7d557Smrg # On IA64, the linker does run time linking by default, so we don't 55216ee7d557Smrg # have to do anything special. 55226ee7d557Smrg aix_use_runtimelinking=no 55236ee7d557Smrg exp_sym_flag='-Bexport' 55246ee7d557Smrg no_entry_flag= 55256ee7d557Smrg else 55266ee7d557Smrg # If we're using GNU nm, then we don't want the "-C" option. 55276ee7d557Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 55286ee7d557Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 55296ee7d557Smrg # weak defined symbols like other global defined symbols, whereas 55306ee7d557Smrg # GNU nm marks them as "W". 55316ee7d557Smrg # While the 'weak' keyword is ignored in the Export File, we need 55326ee7d557Smrg # it in the Import File for the 'aix-soname' feature, so we have 55336ee7d557Smrg # to replace the "-B" option with "-P" for AIX nm. 55346ee7d557Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 55356ee7d557Smrg _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' 55366ee7d557Smrg else 55376ee7d557Smrg _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' 55386ee7d557Smrg fi 55396ee7d557Smrg aix_use_runtimelinking=no 55406ee7d557Smrg 55416ee7d557Smrg # Test if we are trying to use run time linking or normal 55426ee7d557Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 55436ee7d557Smrg # have runtime linking enabled, and use it for executables. 55446ee7d557Smrg # For shared libraries, we enable/disable runtime linking 55456ee7d557Smrg # depending on the kind of the shared library created - 55466ee7d557Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 55476ee7d557Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 55486ee7d557Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 55496ee7d557Smrg # lib.a static archive 55506ee7d557Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 55516ee7d557Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 55526ee7d557Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 55536ee7d557Smrg # lib.a(lib.so.V) shared, rtl:no 55546ee7d557Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 55556ee7d557Smrg # lib.a static archive 55566ee7d557Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 55576ee7d557Smrg for ld_flag in $LDFLAGS; do 55586ee7d557Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 55596ee7d557Smrg aix_use_runtimelinking=yes 55606ee7d557Smrg break 55616ee7d557Smrg fi 55626ee7d557Smrg done 55636ee7d557Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 55646ee7d557Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 55656ee7d557Smrg # so we don't have lib.a shared libs to link our executables. 55666ee7d557Smrg # We have to force runtime linking in this case. 55676ee7d557Smrg aix_use_runtimelinking=yes 55686ee7d557Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 55696ee7d557Smrg fi 55706ee7d557Smrg ;; 55716ee7d557Smrg esac 55726ee7d557Smrg 55736ee7d557Smrg exp_sym_flag='-bexport' 55746ee7d557Smrg no_entry_flag='-bnoentry' 55756ee7d557Smrg fi 55766ee7d557Smrg 55776ee7d557Smrg # When large executables or shared objects are built, AIX ld can 55786ee7d557Smrg # have problems creating the table of contents. If linking a library 55796ee7d557Smrg # or program results in "error TOC overflow" add -mminimal-toc to 55806ee7d557Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 55816ee7d557Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 55826ee7d557Smrg 55836ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='' 55846ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 55856ee7d557Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 55866ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55876ee7d557Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55886ee7d557Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 55896ee7d557Smrg case $with_aix_soname,$aix_use_runtimelinking in 55906ee7d557Smrg aix,*) ;; # traditional, no import file 55916ee7d557Smrg svr4,* | *,yes) # use import file 55926ee7d557Smrg # The Import File defines what to hardcode. 55936ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=no 55946ee7d557Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 55956ee7d557Smrg ;; 55966ee7d557Smrg esac 55976ee7d557Smrg 55986ee7d557Smrg if test yes = "$GCC"; then 55996ee7d557Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 56006ee7d557Smrg # We only want to do this on AIX 4.2 and lower, the check 56016ee7d557Smrg # below for broken collect2 doesn't work under 4.3+ 56026ee7d557Smrg collect2name=`$CC -print-prog-name=collect2` 56036ee7d557Smrg if test -f "$collect2name" && 56046ee7d557Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 56056ee7d557Smrg then 56066ee7d557Smrg # We have reworked collect2 56076ee7d557Smrg : 56086ee7d557Smrg else 56096ee7d557Smrg # We have old collect2 56106ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 56116ee7d557Smrg # It fails to find uninstalled libraries when the uninstalled 56126ee7d557Smrg # path is not listed in the libpath. Setting hardcode_minus_L 56136ee7d557Smrg # to unsupported forces relinking 56146ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56156ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56166ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 56176ee7d557Smrg fi 56186ee7d557Smrg ;; 56196ee7d557Smrg esac 56206ee7d557Smrg shared_flag='-shared' 56216ee7d557Smrg if test yes = "$aix_use_runtimelinking"; then 56226ee7d557Smrg shared_flag="$shared_flag "'$wl-G' 56236ee7d557Smrg fi 56246ee7d557Smrg # Need to ensure runtime linking is disabled for the traditional 56256ee7d557Smrg # shared library, or the linker may eventually find shared libraries 56266ee7d557Smrg # /with/ Import File - we do not want to mix them. 56276ee7d557Smrg shared_flag_aix='-shared' 56286ee7d557Smrg shared_flag_svr4='-shared $wl-G' 56296ee7d557Smrg else 56306ee7d557Smrg # not using gcc 56316ee7d557Smrg if test ia64 = "$host_cpu"; then 56326ee7d557Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 56336ee7d557Smrg # chokes on -Wl,-G. The following line is correct: 56346ee7d557Smrg shared_flag='-G' 56356ee7d557Smrg else 56366ee7d557Smrg if test yes = "$aix_use_runtimelinking"; then 56376ee7d557Smrg shared_flag='$wl-G' 56386ee7d557Smrg else 56396ee7d557Smrg shared_flag='$wl-bM:SRE' 56406ee7d557Smrg fi 56416ee7d557Smrg shared_flag_aix='$wl-bM:SRE' 56426ee7d557Smrg shared_flag_svr4='$wl-G' 56436ee7d557Smrg fi 56446ee7d557Smrg fi 56456ee7d557Smrg 56466ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 56476ee7d557Smrg # It seems that -bexpall does not export symbols beginning with 56486ee7d557Smrg # underscore (_), so it is better to generate a list of symbols to export. 56496ee7d557Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 56506ee7d557Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 56516ee7d557Smrg # Warning - without using the other runtime loading flags (-brtl), 56526ee7d557Smrg # -berok will link without error, but may produce a broken library. 56536ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 56546ee7d557Smrg # Determine the default libpath from the value encoded in an 56556ee7d557Smrg # empty executable. 56566ee7d557Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 56576ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 56586ee7d557Smrg _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 56596ee7d557Smrg else 56606ee7d557Smrg if test ia64 = "$host_cpu"; then 56616ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 56626ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 56636ee7d557Smrg _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" 56646ee7d557Smrg else 56656ee7d557Smrg # Determine the default libpath from the value encoded in an 56666ee7d557Smrg # empty executable. 56676ee7d557Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 56686ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 56696ee7d557Smrg # Warning - without using the other run time loading flags, 56706ee7d557Smrg # -berok will link without error, but may produce a broken library. 56716ee7d557Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 56726ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 56736ee7d557Smrg if test yes = "$with_gnu_ld"; then 56746ee7d557Smrg # We only use this code for GNU lds that support --whole-archive. 56756ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 56766ee7d557Smrg else 56776ee7d557Smrg # Exported symbols can be pulled into shared objects from archives 56786ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 56796ee7d557Smrg fi 56806ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56816ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 56826ee7d557Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 56836ee7d557Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 56846ee7d557Smrg if test svr4 != "$with_aix_soname"; then 56856ee7d557Smrg # This is similar to how AIX traditionally builds its shared libraries. 56866ee7d557Smrg _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' 56876ee7d557Smrg fi 56886ee7d557Smrg if test aix != "$with_aix_soname"; then 56896ee7d557Smrg _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' 56906ee7d557Smrg else 56916ee7d557Smrg # used by -dlpreopen to get the symbols 56926ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 56936ee7d557Smrg fi 56946ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 56956ee7d557Smrg fi 56966ee7d557Smrg fi 56976ee7d557Smrg ;; 56986ee7d557Smrg 56996ee7d557Smrg amigaos*) 57006ee7d557Smrg case $host_cpu in 57016ee7d557Smrg powerpc) 57026ee7d557Smrg # see comment about AmigaOS4 .so support 57036ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 57046ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 57056ee7d557Smrg ;; 57066ee7d557Smrg m68k) 57076ee7d557Smrg _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)' 57086ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57096ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57106ee7d557Smrg ;; 57116ee7d557Smrg esac 57126ee7d557Smrg ;; 57136ee7d557Smrg 57146ee7d557Smrg bsdi[[45]]*) 57156ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 57166ee7d557Smrg ;; 57176ee7d557Smrg 57186ee7d557Smrg cygwin* | mingw* | windows* | pw32* | cegcc*) 57196ee7d557Smrg # When not using gcc, we currently assume that we are using 57206ee7d557Smrg # Microsoft Visual C++ or Intel C++ Compiler. 57216ee7d557Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 57226ee7d557Smrg # no search path for DLLs. 57236ee7d557Smrg case $cc_basename in 57246ee7d557Smrg cl* | icl*) 57256ee7d557Smrg # Native MSVC or ICC 57266ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 57276ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 57286ee7d557Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 57296ee7d557Smrg _LT_TAGVAR(file_list_spec, $1)='@' 57306ee7d557Smrg # Tell ltmain to make .lib files, not .a files. 57316ee7d557Smrg libext=lib 57326ee7d557Smrg # Tell ltmain to make .dll files, not .so files. 57336ee7d557Smrg shrext_cmds=.dll 57346ee7d557Smrg # FIXME: Setting linknames here is a bad hack. 57356ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 57366ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 57376ee7d557Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 57386ee7d557Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 57396ee7d557Smrg else 57406ee7d557Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 57416ee7d557Smrg fi~ 57426ee7d557Smrg $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 57436ee7d557Smrg linknames=' 57446ee7d557Smrg # The linker will not automatically build a static lib if we build a DLL. 57456ee7d557Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 57466ee7d557Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 57476ee7d557Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 57486ee7d557Smrg _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' 57496ee7d557Smrg # Don't use ranlib 57506ee7d557Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 57516ee7d557Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 57526ee7d557Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 57536ee7d557Smrg case $lt_outputfile in 57546ee7d557Smrg *.exe|*.EXE) ;; 57556ee7d557Smrg *) 57566ee7d557Smrg lt_outputfile=$lt_outputfile.exe 57576ee7d557Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 57586ee7d557Smrg ;; 57596ee7d557Smrg esac~ 57606ee7d557Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 57616ee7d557Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 57626ee7d557Smrg $RM "$lt_outputfile.manifest"; 57636ee7d557Smrg fi' 57646ee7d557Smrg ;; 57656ee7d557Smrg *) 57666ee7d557Smrg # Assume MSVC and ICC wrapper 57676ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 57686ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 57696ee7d557Smrg # Tell ltmain to make .lib files, not .a files. 57706ee7d557Smrg libext=lib 57716ee7d557Smrg # Tell ltmain to make .dll files, not .so files. 57726ee7d557Smrg shrext_cmds=.dll 57736ee7d557Smrg # FIXME: Setting linknames here is a bad hack. 57746ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 57756ee7d557Smrg # The linker will automatically build a .lib file if we build a DLL. 57766ee7d557Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 57776ee7d557Smrg # FIXME: Should let the user specify the lib program. 57786ee7d557Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 57796ee7d557Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 57806ee7d557Smrg ;; 57816ee7d557Smrg esac 57826ee7d557Smrg ;; 57836ee7d557Smrg 57846ee7d557Smrg darwin* | rhapsody*) 57856ee7d557Smrg _LT_DARWIN_LINKER_FEATURES($1) 57866ee7d557Smrg ;; 57876ee7d557Smrg 57886ee7d557Smrg dgux*) 57896ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 57906ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 57916ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57926ee7d557Smrg ;; 57936ee7d557Smrg 57946ee7d557Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 57956ee7d557Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 57966ee7d557Smrg # does not break anything, and helps significantly (at the cost of a little 57976ee7d557Smrg # extra space). 57986ee7d557Smrg freebsd2.2*) 57996ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 58006ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58016ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58026ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58036ee7d557Smrg ;; 58046ee7d557Smrg 58056ee7d557Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 58066ee7d557Smrg freebsd2.*) 58076ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 58086ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58096ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58106ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58116ee7d557Smrg ;; 58126ee7d557Smrg 58136ee7d557Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 58146ee7d557Smrg freebsd* | dragonfly* | midnightbsd*) 58156ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58166ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58176ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58186ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58196ee7d557Smrg ;; 58206ee7d557Smrg 58216ee7d557Smrg hpux9*) 58226ee7d557Smrg if test yes = "$GCC"; then 58236ee7d557Smrg _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' 58246ee7d557Smrg else 58256ee7d557Smrg _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' 58266ee7d557Smrg fi 58276ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 58286ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58296ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58306ee7d557Smrg 58316ee7d557Smrg # hardcode_minus_L: Not really in the search PATH, 58326ee7d557Smrg # but as the default location of the library. 58336ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58346ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58356ee7d557Smrg ;; 58366ee7d557Smrg 58376ee7d557Smrg hpux10*) 58386ee7d557Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 58396ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 58406ee7d557Smrg else 58416ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 58426ee7d557Smrg fi 58436ee7d557Smrg if test no = "$with_gnu_ld"; then 58446ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 58456ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58466ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58476ee7d557Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 58486ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58496ee7d557Smrg # hardcode_minus_L: Not really in the search PATH, 58506ee7d557Smrg # but as the default location of the library. 58516ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58526ee7d557Smrg fi 58536ee7d557Smrg ;; 58546ee7d557Smrg 58556ee7d557Smrg hpux11*) 58566ee7d557Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 58576ee7d557Smrg case $host_cpu in 58586ee7d557Smrg hppa*64*) 58596ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 58606ee7d557Smrg ;; 58616ee7d557Smrg ia64*) 58626ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 58636ee7d557Smrg ;; 58646ee7d557Smrg *) 58656ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 58666ee7d557Smrg ;; 58676ee7d557Smrg esac 58686ee7d557Smrg else 58696ee7d557Smrg case $host_cpu in 58706ee7d557Smrg hppa*64*) 58716ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 58726ee7d557Smrg ;; 58736ee7d557Smrg ia64*) 58746ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 58756ee7d557Smrg ;; 58766ee7d557Smrg *) 58776ee7d557Smrg m4_if($1, [], [ 58786ee7d557Smrg # Older versions of the 11.00 compiler do not understand -b yet 58796ee7d557Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 58806ee7d557Smrg _LT_LINKER_OPTION([if $CC understands -b], 58816ee7d557Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 58826ee7d557Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 58836ee7d557Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 58846ee7d557Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 58856ee7d557Smrg ;; 58866ee7d557Smrg esac 58876ee7d557Smrg fi 58886ee7d557Smrg if test no = "$with_gnu_ld"; then 58896ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 58906ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58916ee7d557Smrg 58926ee7d557Smrg case $host_cpu in 58936ee7d557Smrg hppa*64*|ia64*) 58946ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=no 58956ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58966ee7d557Smrg ;; 58976ee7d557Smrg *) 58986ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58996ee7d557Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 59006ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 59016ee7d557Smrg 59026ee7d557Smrg # hardcode_minus_L: Not really in the search PATH, 59036ee7d557Smrg # but as the default location of the library. 59046ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59056ee7d557Smrg ;; 59066ee7d557Smrg esac 59076ee7d557Smrg fi 59086ee7d557Smrg ;; 59096ee7d557Smrg 59106ee7d557Smrg irix5* | irix6* | nonstopux*) 59116ee7d557Smrg if test yes = "$GCC"; then 59126ee7d557Smrg _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' 59136ee7d557Smrg # Try to use the -exported_symbol ld option, if it does not 59146ee7d557Smrg # work, assume that -exports_file does not work either and 59156ee7d557Smrg # implicitly export all symbols. 59166ee7d557Smrg # This should be the same for all languages, so no per-tag cache variable. 59176ee7d557Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 59186ee7d557Smrg [lt_cv_irix_exported_symbol], 59196ee7d557Smrg [save_LDFLAGS=$LDFLAGS 59206ee7d557Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 59216ee7d557Smrg AC_LINK_IFELSE( 59226ee7d557Smrg [AC_LANG_SOURCE( 59236ee7d557Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 59246ee7d557Smrg [C++], [[int foo (void) { return 0; }]], 59256ee7d557Smrg [Fortran 77], [[ 59266ee7d557Smrg subroutine foo 59276ee7d557Smrg end]], 59286ee7d557Smrg [Fortran], [[ 59296ee7d557Smrg subroutine foo 59306ee7d557Smrg end]])])], 59316ee7d557Smrg [lt_cv_irix_exported_symbol=yes], 59326ee7d557Smrg [lt_cv_irix_exported_symbol=no]) 59336ee7d557Smrg LDFLAGS=$save_LDFLAGS]) 59346ee7d557Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 59356ee7d557Smrg _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' 59366ee7d557Smrg fi 59376ee7d557Smrg else 59386ee7d557Smrg _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' 59396ee7d557Smrg _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' 59406ee7d557Smrg fi 59416ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59426ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59436ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59446ee7d557Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 59456ee7d557Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59466ee7d557Smrg ;; 59476ee7d557Smrg 59486ee7d557Smrg linux*) 59496ee7d557Smrg case $cc_basename in 59506ee7d557Smrg tcc*) 59516ee7d557Smrg # Fabrice Bellard et al's Tiny C Compiler 59526ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 59536ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 59546ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59556ee7d557Smrg ;; 59566ee7d557Smrg esac 59576ee7d557Smrg ;; 59586ee7d557Smrg 59596ee7d557Smrg *-mlibc) 59606ee7d557Smrg ;; 59616ee7d557Smrg 59626ee7d557Smrg netbsd* | netbsdelf*-gnu) 59636ee7d557Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 59646ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 59656ee7d557Smrg else 59666ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 59676ee7d557Smrg fi 59686ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59696ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 59706ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59716ee7d557Smrg ;; 59726ee7d557Smrg 59736ee7d557Smrg newsos6) 59746ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59756ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 59766ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59776ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59786ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59796ee7d557Smrg ;; 59806ee7d557Smrg 59816ee7d557Smrg *nto* | *qnx*) 59826ee7d557Smrg ;; 59836ee7d557Smrg 59846ee7d557Smrg openbsd*) 59856ee7d557Smrg if test -f /usr/libexec/ld.so; then 59866ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 59876ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59886ee7d557Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 59896ee7d557Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 59906ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 59916ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 59926ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 59936ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 59946ee7d557Smrg else 59956ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 59966ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 59976ee7d557Smrg fi 59986ee7d557Smrg else 59996ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60006ee7d557Smrg fi 60016ee7d557Smrg ;; 60026ee7d557Smrg 60036ee7d557Smrg os2*) 60046ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60056ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60066ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 60076ee7d557Smrg shrext_cmds=.dll 60086ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 60096ee7d557Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 60106ee7d557Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 60116ee7d557Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 60126ee7d557Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 60136ee7d557Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 60146ee7d557Smrg emximp -o $lib $output_objdir/$libname.def' 60156ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 60166ee7d557Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 60176ee7d557Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 60186ee7d557Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 60196ee7d557Smrg prefix_cmds="$SED"~ 60206ee7d557Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 60216ee7d557Smrg prefix_cmds="$prefix_cmds -e 1d"; 60226ee7d557Smrg fi~ 60236ee7d557Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 60246ee7d557Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 60256ee7d557Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 60266ee7d557Smrg emximp -o $lib $output_objdir/$libname.def' 60276ee7d557Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 60286ee7d557Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 60296ee7d557Smrg _LT_TAGVAR(file_list_spec, $1)='@' 60306ee7d557Smrg ;; 60316ee7d557Smrg 60326ee7d557Smrg osf3*) 60336ee7d557Smrg if test yes = "$GCC"; then 60346ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 60356ee7d557Smrg _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' 60366ee7d557Smrg else 60376ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 60386ee7d557Smrg _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' 60396ee7d557Smrg fi 60406ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 60416ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 60426ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 60436ee7d557Smrg ;; 60446ee7d557Smrg 60456ee7d557Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 60466ee7d557Smrg if test yes = "$GCC"; then 60476ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 60486ee7d557Smrg _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' 60496ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 60506ee7d557Smrg else 60516ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 60526ee7d557Smrg _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' 60536ee7d557Smrg _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~ 60546ee7d557Smrg $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' 60556ee7d557Smrg 60566ee7d557Smrg # Both c and cxx compiler support -rpath directly 60576ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 60586ee7d557Smrg fi 60596ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 60606ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 60616ee7d557Smrg ;; 60626ee7d557Smrg 60636ee7d557Smrg serenity*) 60646ee7d557Smrg ;; 60656ee7d557Smrg 60666ee7d557Smrg solaris*) 60676ee7d557Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 60686ee7d557Smrg if test yes = "$GCC"; then 60696ee7d557Smrg wlarc='$wl' 60706ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 60716ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 60726ee7d557Smrg $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' 60736ee7d557Smrg else 60746ee7d557Smrg case `$CC -V 2>&1` in 60756ee7d557Smrg *"Compilers 5.0"*) 60766ee7d557Smrg wlarc='' 60776ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 60786ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 60796ee7d557Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 60806ee7d557Smrg ;; 60816ee7d557Smrg *) 60826ee7d557Smrg wlarc='$wl' 60836ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 60846ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 60856ee7d557Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 60866ee7d557Smrg ;; 60876ee7d557Smrg esac 60886ee7d557Smrg fi 60896ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 60906ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60916ee7d557Smrg case $host_os in 60926ee7d557Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 60936ee7d557Smrg *) 60946ee7d557Smrg # The compiler driver will combine and reorder linker options, 60956ee7d557Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 60966ee7d557Smrg # but is careful enough not to reorder. 60976ee7d557Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 60986ee7d557Smrg if test yes = "$GCC"; then 60996ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 61006ee7d557Smrg else 61016ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 61026ee7d557Smrg fi 61036ee7d557Smrg ;; 61046ee7d557Smrg esac 61056ee7d557Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 61066ee7d557Smrg ;; 61076ee7d557Smrg 61086ee7d557Smrg sunos4*) 61096ee7d557Smrg if test sequent = "$host_vendor"; then 61106ee7d557Smrg # Use $CC to link under sequent, because it throws in some extra .o 61116ee7d557Smrg # files that make .init and .fini sections work. 61126ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 61136ee7d557Smrg else 61146ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 61156ee7d557Smrg fi 61166ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 61176ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 61186ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 61196ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 61206ee7d557Smrg ;; 61216ee7d557Smrg 61226ee7d557Smrg sysv4) 61236ee7d557Smrg case $host_vendor in 61246ee7d557Smrg sni) 61256ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 61266ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 61276ee7d557Smrg ;; 61286ee7d557Smrg siemens) 61296ee7d557Smrg ## LD is ld it makes a PLAMLIB 61306ee7d557Smrg ## CC just makes a GrossModule. 61316ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 61326ee7d557Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 61336ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=no 61346ee7d557Smrg ;; 61356ee7d557Smrg motorola) 61366ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 61376ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 61386ee7d557Smrg ;; 61396ee7d557Smrg esac 61406ee7d557Smrg runpath_var='LD_RUN_PATH' 61416ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 61426ee7d557Smrg ;; 61436ee7d557Smrg 61446ee7d557Smrg sysv4.3*) 61456ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 61466ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 61476ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 61486ee7d557Smrg ;; 61496ee7d557Smrg 61506ee7d557Smrg sysv4*MP*) 61516ee7d557Smrg if test -d /usr/nec; then 61526ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 61536ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 61546ee7d557Smrg runpath_var=LD_RUN_PATH 61556ee7d557Smrg hardcode_runpath_var=yes 61566ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 61576ee7d557Smrg fi 61586ee7d557Smrg ;; 61596ee7d557Smrg 61606ee7d557Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 61616ee7d557Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 61626ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 61636ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 61646ee7d557Smrg runpath_var='LD_RUN_PATH' 61656ee7d557Smrg 61666ee7d557Smrg if test yes = "$GCC"; then 61676ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 61686ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 61696ee7d557Smrg else 61706ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 61716ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 61726ee7d557Smrg fi 61736ee7d557Smrg ;; 61746ee7d557Smrg 61756ee7d557Smrg sysv5* | sco3.2v5* | sco5v6*) 61766ee7d557Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 61776ee7d557Smrg # link with -lc, and that would cause any symbols used from libc to 61786ee7d557Smrg # always be unresolved, which means just about no library would 61796ee7d557Smrg # ever link correctly. If we're not using GNU ld we use -z text 61806ee7d557Smrg # though, which does catch some bad symbols but isn't as heavy-handed 61816ee7d557Smrg # as -z defs. 61826ee7d557Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 61836ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 61846ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 61856ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 61866ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 61876ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 61886ee7d557Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 61896ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 61906ee7d557Smrg runpath_var='LD_RUN_PATH' 61916ee7d557Smrg 61926ee7d557Smrg if test yes = "$GCC"; then 61936ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 61946ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 61956ee7d557Smrg else 61966ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 61976ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 61986ee7d557Smrg fi 61996ee7d557Smrg ;; 62006ee7d557Smrg 62016ee7d557Smrg uts4*) 62026ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 62036ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 62046ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62056ee7d557Smrg ;; 62066ee7d557Smrg 62076ee7d557Smrg *) 62086ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62096ee7d557Smrg ;; 62106ee7d557Smrg esac 62116ee7d557Smrg 62126ee7d557Smrg if test sni = "$host_vendor"; then 62136ee7d557Smrg case $host in 62146ee7d557Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 62156ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 62166ee7d557Smrg ;; 62176ee7d557Smrg esac 62186ee7d557Smrg fi 62196ee7d557Smrg fi 62206ee7d557Smrg]) 62216ee7d557SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 62226ee7d557Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 62236ee7d557Smrg 62246ee7d557Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 62256ee7d557Smrg 62266ee7d557Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 62276ee7d557Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 62286ee7d557Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 62296ee7d557Smrg [The commands to extract the exported symbol list from a shared archive]) 62306ee7d557Smrg 62316ee7d557Smrg# 62326ee7d557Smrg# Do we need to explicitly link libc? 62336ee7d557Smrg# 62346ee7d557Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 62356ee7d557Smrgx|xyes) 62366ee7d557Smrg # Assume -lc should be added 62376ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 62386ee7d557Smrg 62396ee7d557Smrg if test yes,yes = "$GCC,$enable_shared"; then 62406ee7d557Smrg case $_LT_TAGVAR(archive_cmds, $1) in 62416ee7d557Smrg *'~'*) 62426ee7d557Smrg # FIXME: we may have to deal with multi-command sequences. 62436ee7d557Smrg ;; 62446ee7d557Smrg '$CC '*) 62456ee7d557Smrg # Test whether the compiler implicitly links with -lc since on some 62466ee7d557Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 62476ee7d557Smrg # to ld, don't add -lc before -lgcc. 62486ee7d557Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 62496ee7d557Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 62506ee7d557Smrg [$RM conftest* 62516ee7d557Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 62526ee7d557Smrg 62536ee7d557Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 62546ee7d557Smrg soname=conftest 62556ee7d557Smrg lib=conftest 62566ee7d557Smrg libobjs=conftest.$ac_objext 62576ee7d557Smrg deplibs= 62586ee7d557Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 62596ee7d557Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 62606ee7d557Smrg compiler_flags=-v 62616ee7d557Smrg linker_flags=-v 62626ee7d557Smrg verstring= 62636ee7d557Smrg output_objdir=. 62646ee7d557Smrg libname=conftest 62656ee7d557Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 62666ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 62676ee7d557Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 62686ee7d557Smrg then 62696ee7d557Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 62706ee7d557Smrg else 62716ee7d557Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 62726ee7d557Smrg fi 62736ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 62746ee7d557Smrg else 62756ee7d557Smrg cat conftest.err 1>&5 62766ee7d557Smrg fi 62776ee7d557Smrg $RM conftest* 62786ee7d557Smrg ]) 62796ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 62806ee7d557Smrg ;; 62816ee7d557Smrg esac 62826ee7d557Smrg fi 62836ee7d557Smrg ;; 62846ee7d557Smrgesac 62856ee7d557Smrg 62866ee7d557Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 62876ee7d557Smrg [Whether or not to add -lc for building shared libraries]) 62886ee7d557Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 62896ee7d557Smrg [enable_shared_with_static_runtimes], [0], 62906ee7d557Smrg [Whether or not to disallow shared libs when runtime libs are static]) 62916ee7d557Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 62926ee7d557Smrg [Compiler flag to allow reflexive dlopens]) 62936ee7d557Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 62946ee7d557Smrg [Compiler flag to generate shared objects directly from archives]) 62956ee7d557Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 62966ee7d557Smrg [Whether the compiler copes with passing no objects directly]) 62976ee7d557Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 62986ee7d557Smrg [Create an old-style archive from a shared archive]) 62996ee7d557Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 63006ee7d557Smrg [Create a temporary old-style archive to link instead of a shared archive]) 63016ee7d557Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 63026ee7d557Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 63036ee7d557Smrg_LT_TAGDECL([], [module_cmds], [2], 63046ee7d557Smrg [Commands used to build a loadable module if different from building 63056ee7d557Smrg a shared archive.]) 63066ee7d557Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 63076ee7d557Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 63086ee7d557Smrg [Whether we are building with GNU ld or not]) 63096ee7d557Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 63106ee7d557Smrg [Flag that allows shared libraries with undefined symbols to be built]) 63116ee7d557Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 63126ee7d557Smrg [Flag that enforces no undefined symbols]) 63136ee7d557Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 63146ee7d557Smrg [Flag to hardcode $libdir into a binary during linking. 63156ee7d557Smrg This must work even if $libdir does not exist]) 63166ee7d557Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 63176ee7d557Smrg [Whether we need a single "-rpath" flag with a separated argument]) 63186ee7d557Smrg_LT_TAGDECL([], [hardcode_direct], [0], 63196ee7d557Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 63206ee7d557Smrg DIR into the resulting binary]) 63216ee7d557Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 63226ee7d557Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 63236ee7d557Smrg DIR into the resulting binary and the resulting library dependency is 63246ee7d557Smrg "absolute", i.e. impossible to change by setting $shlibpath_var if the 63256ee7d557Smrg library is relocated]) 63266ee7d557Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 63276ee7d557Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 63286ee7d557Smrg into the resulting binary]) 63296ee7d557Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 63306ee7d557Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 63316ee7d557Smrg into the resulting binary]) 63326ee7d557Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 63336ee7d557Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 63346ee7d557Smrg into the library and all subsequent libraries and executables linked 63356ee7d557Smrg against it]) 63366ee7d557Smrg_LT_TAGDECL([], [inherit_rpath], [0], 63376ee7d557Smrg [Set to yes if linker adds runtime paths of dependent libraries 63386ee7d557Smrg to runtime path list]) 63396ee7d557Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 63406ee7d557Smrg [Whether libtool must link a program against all its dependency libraries]) 63416ee7d557Smrg_LT_TAGDECL([], [always_export_symbols], [0], 63426ee7d557Smrg [Set to "yes" if exported symbols are required]) 63436ee7d557Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 63446ee7d557Smrg [The commands to list exported symbols]) 63456ee7d557Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 63466ee7d557Smrg [Symbols that should not be listed in the preloaded symbols]) 63476ee7d557Smrg_LT_TAGDECL([], [include_expsyms], [1], 63486ee7d557Smrg [Symbols that must always be exported]) 63496ee7d557Smrg_LT_TAGDECL([], [prelink_cmds], [2], 63506ee7d557Smrg [Commands necessary for linking programs (against libraries) with templates]) 63516ee7d557Smrg_LT_TAGDECL([], [postlink_cmds], [2], 63526ee7d557Smrg [Commands necessary for finishing linking programs]) 63536ee7d557Smrg_LT_TAGDECL([], [file_list_spec], [1], 63546ee7d557Smrg [Specify filename containing input files]) 63556ee7d557Smrgdnl FIXME: Not yet implemented 63566ee7d557Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 63576ee7d557Smrgdnl [Compiler flag to generate thread safe objects]) 63586ee7d557Smrg])# _LT_LINKER_SHLIBS 63596ee7d557Smrg 63606ee7d557Smrg 63616ee7d557Smrg# _LT_LANG_C_CONFIG([TAG]) 63626ee7d557Smrg# ------------------------ 63636ee7d557Smrg# Ensure that the configuration variables for a C compiler are suitably 63646ee7d557Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 63656ee7d557Smrg# the compiler configuration to 'libtool'. 63666ee7d557Smrgm4_defun([_LT_LANG_C_CONFIG], 63676ee7d557Smrg[m4_require([_LT_DECL_EGREP])dnl 63686ee7d557Smrglt_save_CC=$CC 63696ee7d557SmrgAC_LANG_PUSH(C) 63706ee7d557Smrg 63716ee7d557Smrg# Source file extension for C test sources. 63726ee7d557Smrgac_ext=c 63736ee7d557Smrg 63746ee7d557Smrg# Object file extension for compiled C test sources. 63756ee7d557Smrgobjext=o 63766ee7d557Smrg_LT_TAGVAR(objext, $1)=$objext 63776ee7d557Smrg 63786ee7d557Smrg# Code to be used in simple compile tests 63796ee7d557Smrglt_simple_compile_test_code="int some_variable = 0;" 63806ee7d557Smrg 63816ee7d557Smrg# Code to be used in simple link tests 63826ee7d557Smrglt_simple_link_test_code='int main(void){return(0);}' 63836ee7d557Smrg 63846ee7d557Smrg_LT_TAG_COMPILER 63856ee7d557Smrg# Save the default compiler, since it gets overwritten when the other 63866ee7d557Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 63876ee7d557Smrgcompiler_DEFAULT=$CC 63886ee7d557Smrg 63896ee7d557Smrg# save warnings/boilerplate of simple test code 63906ee7d557Smrg_LT_COMPILER_BOILERPLATE 63916ee7d557Smrg_LT_LINKER_BOILERPLATE 63926ee7d557Smrg 63936ee7d557Smrg## CAVEAT EMPTOR: 63946ee7d557Smrg## There is no encapsulation within the following macros, do not change 63956ee7d557Smrg## the running order or otherwise move them around unless you know exactly 63966ee7d557Smrg## what you are doing... 63976ee7d557Smrgif test -n "$compiler"; then 63986ee7d557Smrg _LT_COMPILER_NO_RTTI($1) 63996ee7d557Smrg _LT_COMPILER_PIC($1) 64006ee7d557Smrg _LT_COMPILER_C_O($1) 64016ee7d557Smrg _LT_COMPILER_FILE_LOCKS($1) 64026ee7d557Smrg _LT_LINKER_SHLIBS($1) 64036ee7d557Smrg _LT_SYS_DYNAMIC_LINKER($1) 64046ee7d557Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 64056ee7d557Smrg LT_SYS_DLOPEN_SELF 64066ee7d557Smrg _LT_CMD_STRIPLIB 64076ee7d557Smrg 64086ee7d557Smrg # Report what library types will actually be built 64096ee7d557Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 64106ee7d557Smrg AC_MSG_RESULT([$can_build_shared]) 64116ee7d557Smrg 64126ee7d557Smrg AC_MSG_CHECKING([whether to build shared libraries]) 64136ee7d557Smrg test no = "$can_build_shared" && enable_shared=no 64146ee7d557Smrg 64156ee7d557Smrg # On AIX, shared libraries and static libraries use the same namespace, and 64166ee7d557Smrg # are all built from PIC. 64176ee7d557Smrg case $host_os in 64186ee7d557Smrg aix3*) 64196ee7d557Smrg test yes = "$enable_shared" && enable_static=no 64206ee7d557Smrg if test -n "$RANLIB"; then 64216ee7d557Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 64226ee7d557Smrg postinstall_cmds='$RANLIB $lib' 64236ee7d557Smrg fi 64246ee7d557Smrg ;; 64256ee7d557Smrg 64266ee7d557Smrg aix[[4-9]]*) 64276ee7d557Smrg if test ia64 != "$host_cpu"; then 64286ee7d557Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 64296ee7d557Smrg yes,aix,yes) ;; # shared object as lib.so file only 64306ee7d557Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 64316ee7d557Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 64326ee7d557Smrg esac 64336ee7d557Smrg fi 64346ee7d557Smrg ;; 64356ee7d557Smrg esac 64366ee7d557Smrg AC_MSG_RESULT([$enable_shared]) 64376ee7d557Smrg 64386ee7d557Smrg AC_MSG_CHECKING([whether to build static libraries]) 64396ee7d557Smrg # Make sure either enable_shared or enable_static is yes. 64406ee7d557Smrg test yes = "$enable_shared" || enable_static=yes 64416ee7d557Smrg AC_MSG_RESULT([$enable_static]) 64426ee7d557Smrg 64436ee7d557Smrg _LT_CONFIG($1) 64446ee7d557Smrgfi 64456ee7d557SmrgAC_LANG_POP 64466ee7d557SmrgCC=$lt_save_CC 64476ee7d557Smrg])# _LT_LANG_C_CONFIG 64486ee7d557Smrg 64496ee7d557Smrg 64506ee7d557Smrg# _LT_LANG_CXX_CONFIG([TAG]) 64516ee7d557Smrg# -------------------------- 64526ee7d557Smrg# Ensure that the configuration variables for a C++ compiler are suitably 64536ee7d557Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 64546ee7d557Smrg# the compiler configuration to 'libtool'. 64556ee7d557Smrgm4_defun([_LT_LANG_CXX_CONFIG], 64566ee7d557Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 64576ee7d557Smrgm4_require([_LT_DECL_EGREP])dnl 64586ee7d557Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 64596ee7d557Smrgif test -n "$CXX" && ( test no != "$CXX" && 64606ee7d557Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 64616ee7d557Smrg (test g++ != "$CXX"))); then 64626ee7d557Smrg AC_PROG_CXXCPP 64636ee7d557Smrgelse 64646ee7d557Smrg _lt_caught_CXX_error=yes 64656ee7d557Smrgfi 64666ee7d557Smrg 64676ee7d557SmrgAC_LANG_PUSH(C++) 64686ee7d557Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 64696ee7d557Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 64706ee7d557Smrg_LT_TAGVAR(always_export_symbols, $1)=no 64716ee7d557Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 64726ee7d557Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 64736ee7d557Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 64746ee7d557Smrg_LT_TAGVAR(hardcode_direct, $1)=no 64756ee7d557Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 64766ee7d557Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 64776ee7d557Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 64786ee7d557Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 64796ee7d557Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 64806ee7d557Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 64816ee7d557Smrg_LT_TAGVAR(inherit_rpath, $1)=no 64826ee7d557Smrg_LT_TAGVAR(module_cmds, $1)= 64836ee7d557Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 64846ee7d557Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 64856ee7d557Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 64866ee7d557Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 64876ee7d557Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 64886ee7d557Smrg_LT_TAGVAR(no_undefined_flag, $1)= 64896ee7d557Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 64906ee7d557Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 64916ee7d557Smrg 64926ee7d557Smrg# Source file extension for C++ test sources. 64936ee7d557Smrgac_ext=cpp 64946ee7d557Smrg 64956ee7d557Smrg# Object file extension for compiled C++ test sources. 64966ee7d557Smrgobjext=o 64976ee7d557Smrg_LT_TAGVAR(objext, $1)=$objext 64986ee7d557Smrg 64996ee7d557Smrg# No sense in running all these tests if we already determined that 65006ee7d557Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 65016ee7d557Smrg# are currently assumed to apply to all compilers on this platform, 65026ee7d557Smrg# and will be corrupted by setting them based on a non-working compiler. 65036ee7d557Smrgif test yes != "$_lt_caught_CXX_error"; then 65046ee7d557Smrg # Code to be used in simple compile tests 65056ee7d557Smrg lt_simple_compile_test_code="int some_variable = 0;" 65066ee7d557Smrg 65076ee7d557Smrg # Code to be used in simple link tests 65086ee7d557Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 65096ee7d557Smrg 65106ee7d557Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 65116ee7d557Smrg _LT_TAG_COMPILER 65126ee7d557Smrg 65136ee7d557Smrg # save warnings/boilerplate of simple test code 65146ee7d557Smrg _LT_COMPILER_BOILERPLATE 65156ee7d557Smrg _LT_LINKER_BOILERPLATE 65166ee7d557Smrg 65176ee7d557Smrg # Allow CC to be a program name with arguments. 65186ee7d557Smrg lt_save_CC=$CC 65196ee7d557Smrg lt_save_CFLAGS=$CFLAGS 65206ee7d557Smrg lt_save_LD=$LD 65216ee7d557Smrg lt_save_GCC=$GCC 65226ee7d557Smrg GCC=$GXX 65236ee7d557Smrg lt_save_with_gnu_ld=$with_gnu_ld 65246ee7d557Smrg lt_save_path_LD=$lt_cv_path_LD 65256ee7d557Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 65266ee7d557Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 65276ee7d557Smrg else 65286ee7d557Smrg $as_unset lt_cv_prog_gnu_ld 65296ee7d557Smrg fi 65306ee7d557Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 65316ee7d557Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 65326ee7d557Smrg else 65336ee7d557Smrg $as_unset lt_cv_path_LD 65346ee7d557Smrg fi 65356ee7d557Smrg test -z "${LDCXX+set}" || LD=$LDCXX 65366ee7d557Smrg CC=${CXX-"c++"} 65376ee7d557Smrg CFLAGS=$CXXFLAGS 65386ee7d557Smrg compiler=$CC 65396ee7d557Smrg _LT_TAGVAR(compiler, $1)=$CC 65406ee7d557Smrg _LT_CC_BASENAME([$compiler]) 65416ee7d557Smrg 65426ee7d557Smrg if test -n "$compiler"; then 65436ee7d557Smrg # We don't want -fno-exception when compiling C++ code, so set the 65446ee7d557Smrg # no_builtin_flag separately 65456ee7d557Smrg if test yes = "$GXX"; then 65466ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 65476ee7d557Smrg else 65486ee7d557Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 65496ee7d557Smrg fi 65506ee7d557Smrg 65516ee7d557Smrg if test yes = "$GXX"; then 65526ee7d557Smrg # Set up default GNU C++ configuration 65536ee7d557Smrg 65546ee7d557Smrg LT_PATH_LD 65556ee7d557Smrg 65566ee7d557Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 65576ee7d557Smrg # archiving commands below assume that GNU ld is being used. 65586ee7d557Smrg if test yes = "$with_gnu_ld"; then 65596ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 65606ee7d557Smrg _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' 65616ee7d557Smrg 65626ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 65636ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 65646ee7d557Smrg 65656ee7d557Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 65666ee7d557Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 65676ee7d557Smrg # investigate it a little bit more. (MM) 65686ee7d557Smrg wlarc='$wl' 65696ee7d557Smrg 65706ee7d557Smrg # ancient GNU ld didn't support --whole-archive et. al. 65716ee7d557Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 65726ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 65736ee7d557Smrg else 65746ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 65756ee7d557Smrg fi 65766ee7d557Smrg else 65776ee7d557Smrg with_gnu_ld=no 65786ee7d557Smrg wlarc= 65796ee7d557Smrg 65806ee7d557Smrg # A generic and very simple default shared library creation 65816ee7d557Smrg # command for GNU C++ for the case where it uses the native 65826ee7d557Smrg # linker, instead of GNU ld. If possible, this setting should 65836ee7d557Smrg # overridden to take advantage of the native linker features on 65846ee7d557Smrg # the platform it is being used on. 65856ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 65866ee7d557Smrg fi 65876ee7d557Smrg 65886ee7d557Smrg # Commands to make compiler produce verbose output that lists 65896ee7d557Smrg # what "hidden" libraries, object files and flags are used when 65906ee7d557Smrg # linking a shared library. 65916ee7d557Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' 65926ee7d557Smrg 65936ee7d557Smrg else 65946ee7d557Smrg GXX=no 65956ee7d557Smrg with_gnu_ld=no 65966ee7d557Smrg wlarc= 65976ee7d557Smrg fi 65986ee7d557Smrg 65996ee7d557Smrg # PORTME: fill in a description of your system's C++ link characteristics 66006ee7d557Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 66016ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 66026ee7d557Smrg case $host_os in 66036ee7d557Smrg aix3*) 66046ee7d557Smrg # FIXME: insert proper C++ library support 66056ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66066ee7d557Smrg ;; 66076ee7d557Smrg aix[[4-9]]*) 66086ee7d557Smrg if test ia64 = "$host_cpu"; then 66096ee7d557Smrg # On IA64, the linker does run time linking by default, so we don't 66106ee7d557Smrg # have to do anything special. 66116ee7d557Smrg aix_use_runtimelinking=no 66126ee7d557Smrg exp_sym_flag='-Bexport' 66136ee7d557Smrg no_entry_flag= 66146ee7d557Smrg else 66156ee7d557Smrg aix_use_runtimelinking=no 66166ee7d557Smrg 66176ee7d557Smrg # Test if we are trying to use run time linking or normal 66186ee7d557Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 66196ee7d557Smrg # have runtime linking enabled, and use it for executables. 66206ee7d557Smrg # For shared libraries, we enable/disable runtime linking 66216ee7d557Smrg # depending on the kind of the shared library created - 66226ee7d557Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 66236ee7d557Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 66246ee7d557Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 66256ee7d557Smrg # lib.a static archive 66266ee7d557Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 66276ee7d557Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 66286ee7d557Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 66296ee7d557Smrg # lib.a(lib.so.V) shared, rtl:no 66306ee7d557Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 66316ee7d557Smrg # lib.a static archive 66326ee7d557Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 66336ee7d557Smrg for ld_flag in $LDFLAGS; do 66346ee7d557Smrg case $ld_flag in 66356ee7d557Smrg *-brtl*) 66366ee7d557Smrg aix_use_runtimelinking=yes 66376ee7d557Smrg break 66386ee7d557Smrg ;; 66396ee7d557Smrg esac 66406ee7d557Smrg done 66416ee7d557Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 66426ee7d557Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 66436ee7d557Smrg # so we don't have lib.a shared libs to link our executables. 66446ee7d557Smrg # We have to force runtime linking in this case. 66456ee7d557Smrg aix_use_runtimelinking=yes 66466ee7d557Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 66476ee7d557Smrg fi 66486ee7d557Smrg ;; 66496ee7d557Smrg esac 66506ee7d557Smrg 66516ee7d557Smrg exp_sym_flag='-bexport' 66526ee7d557Smrg no_entry_flag='-bnoentry' 66536ee7d557Smrg fi 66546ee7d557Smrg 66556ee7d557Smrg # When large executables or shared objects are built, AIX ld can 66566ee7d557Smrg # have problems creating the table of contents. If linking a library 66576ee7d557Smrg # or program results in "error TOC overflow" add -mminimal-toc to 66586ee7d557Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 66596ee7d557Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 66606ee7d557Smrg 66616ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='' 66626ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 66636ee7d557Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 66646ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 66656ee7d557Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 66666ee7d557Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 66676ee7d557Smrg case $with_aix_soname,$aix_use_runtimelinking in 66686ee7d557Smrg aix,*) ;; # no import file 66696ee7d557Smrg svr4,* | *,yes) # use import file 66706ee7d557Smrg # The Import File defines what to hardcode. 66716ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=no 66726ee7d557Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 66736ee7d557Smrg ;; 66746ee7d557Smrg esac 66756ee7d557Smrg 66766ee7d557Smrg if test yes = "$GXX"; then 66776ee7d557Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 66786ee7d557Smrg # We only want to do this on AIX 4.2 and lower, the check 66796ee7d557Smrg # below for broken collect2 doesn't work under 4.3+ 66806ee7d557Smrg collect2name=`$CC -print-prog-name=collect2` 66816ee7d557Smrg if test -f "$collect2name" && 66826ee7d557Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 66836ee7d557Smrg then 66846ee7d557Smrg # We have reworked collect2 66856ee7d557Smrg : 66866ee7d557Smrg else 66876ee7d557Smrg # We have old collect2 66886ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 66896ee7d557Smrg # It fails to find uninstalled libraries when the uninstalled 66906ee7d557Smrg # path is not listed in the libpath. Setting hardcode_minus_L 66916ee7d557Smrg # to unsupported forces relinking 66926ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 66936ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66946ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 66956ee7d557Smrg fi 66966ee7d557Smrg esac 66976ee7d557Smrg shared_flag='-shared' 66986ee7d557Smrg if test yes = "$aix_use_runtimelinking"; then 66996ee7d557Smrg shared_flag=$shared_flag' $wl-G' 67006ee7d557Smrg fi 67016ee7d557Smrg # Need to ensure runtime linking is disabled for the traditional 67026ee7d557Smrg # shared library, or the linker may eventually find shared libraries 67036ee7d557Smrg # /with/ Import File - we do not want to mix them. 67046ee7d557Smrg shared_flag_aix='-shared' 67056ee7d557Smrg shared_flag_svr4='-shared $wl-G' 67066ee7d557Smrg else 67076ee7d557Smrg # not using gcc 67086ee7d557Smrg if test ia64 = "$host_cpu"; then 67096ee7d557Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 67106ee7d557Smrg # chokes on -Wl,-G. The following line is correct: 67116ee7d557Smrg shared_flag='-G' 67126ee7d557Smrg else 67136ee7d557Smrg if test yes = "$aix_use_runtimelinking"; then 67146ee7d557Smrg shared_flag='$wl-G' 67156ee7d557Smrg else 67166ee7d557Smrg shared_flag='$wl-bM:SRE' 67176ee7d557Smrg fi 67186ee7d557Smrg shared_flag_aix='$wl-bM:SRE' 67196ee7d557Smrg shared_flag_svr4='$wl-G' 67206ee7d557Smrg fi 67216ee7d557Smrg fi 67226ee7d557Smrg 67236ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 67246ee7d557Smrg # It seems that -bexpall does not export symbols beginning with 67256ee7d557Smrg # underscore (_), so it is better to generate a list of symbols to 67266ee7d557Smrg # export. 67276ee7d557Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 67286ee7d557Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 67296ee7d557Smrg # Warning - without using the other runtime loading flags (-brtl), 67306ee7d557Smrg # -berok will link without error, but may produce a broken library. 67316ee7d557Smrg # The "-G" linker flag allows undefined symbols. 67326ee7d557Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 67336ee7d557Smrg # Determine the default libpath from the value encoded in an empty 67346ee7d557Smrg # executable. 67356ee7d557Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 67366ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 67376ee7d557Smrg 67386ee7d557Smrg _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 67396ee7d557Smrg else 67406ee7d557Smrg if test ia64 = "$host_cpu"; then 67416ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 67426ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 67436ee7d557Smrg _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" 67446ee7d557Smrg else 67456ee7d557Smrg # Determine the default libpath from the value encoded in an 67466ee7d557Smrg # empty executable. 67476ee7d557Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 67486ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 67496ee7d557Smrg # Warning - without using the other run time loading flags, 67506ee7d557Smrg # -berok will link without error, but may produce a broken library. 67516ee7d557Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 67526ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 67536ee7d557Smrg if test yes = "$with_gnu_ld"; then 67546ee7d557Smrg # We only use this code for GNU lds that support --whole-archive. 67556ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 67566ee7d557Smrg else 67576ee7d557Smrg # Exported symbols can be pulled into shared objects from archives 67586ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 67596ee7d557Smrg fi 67606ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 67616ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 67626ee7d557Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 67636ee7d557Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 67646ee7d557Smrg if test svr4 != "$with_aix_soname"; then 67656ee7d557Smrg # This is similar to how AIX traditionally builds its shared 67666ee7d557Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 67676ee7d557Smrg _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' 67686ee7d557Smrg fi 67696ee7d557Smrg if test aix != "$with_aix_soname"; then 67706ee7d557Smrg _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' 67716ee7d557Smrg else 67726ee7d557Smrg # used by -dlpreopen to get the symbols 67736ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 67746ee7d557Smrg fi 67756ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 67766ee7d557Smrg fi 67776ee7d557Smrg fi 67786ee7d557Smrg ;; 67796ee7d557Smrg 67806ee7d557Smrg beos*) 67816ee7d557Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 67826ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67836ee7d557Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 67846ee7d557Smrg # support --undefined. This deserves some investigation. FIXME 67856ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 67866ee7d557Smrg else 67876ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67886ee7d557Smrg fi 67896ee7d557Smrg ;; 67906ee7d557Smrg 67916ee7d557Smrg chorus*) 67926ee7d557Smrg case $cc_basename in 67936ee7d557Smrg *) 67946ee7d557Smrg # FIXME: insert proper C++ library support 67956ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67966ee7d557Smrg ;; 67976ee7d557Smrg esac 67986ee7d557Smrg ;; 67996ee7d557Smrg 68006ee7d557Smrg cygwin* | mingw* | windows* | pw32* | cegcc*) 68016ee7d557Smrg case $GXX,$cc_basename in 68026ee7d557Smrg ,cl* | no,cl* | ,icl* | no,icl*) 68036ee7d557Smrg # Native MSVC or ICC 68046ee7d557Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 68056ee7d557Smrg # no search path for DLLs. 68066ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 68076ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 68086ee7d557Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 68096ee7d557Smrg _LT_TAGVAR(file_list_spec, $1)='@' 68106ee7d557Smrg # Tell ltmain to make .lib files, not .a files. 68116ee7d557Smrg libext=lib 68126ee7d557Smrg # Tell ltmain to make .dll files, not .so files. 68136ee7d557Smrg shrext_cmds=.dll 68146ee7d557Smrg # FIXME: Setting linknames here is a bad hack. 68156ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 68166ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 68176ee7d557Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 68186ee7d557Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 68196ee7d557Smrg else 68206ee7d557Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 68216ee7d557Smrg fi~ 68226ee7d557Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 68236ee7d557Smrg linknames=' 68246ee7d557Smrg # The linker will not automatically build a static lib if we build a DLL. 68256ee7d557Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 68266ee7d557Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 68276ee7d557Smrg # Don't use ranlib 68286ee7d557Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 68296ee7d557Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 68306ee7d557Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 68316ee7d557Smrg case $lt_outputfile in 68326ee7d557Smrg *.exe|*.EXE) ;; 68336ee7d557Smrg *) 68346ee7d557Smrg lt_outputfile=$lt_outputfile.exe 68356ee7d557Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 68366ee7d557Smrg ;; 68376ee7d557Smrg esac~ 68386ee7d557Smrg func_to_tool_file "$lt_outputfile"~ 68396ee7d557Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 68406ee7d557Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 68416ee7d557Smrg $RM "$lt_outputfile.manifest"; 68426ee7d557Smrg fi' 68436ee7d557Smrg ;; 68446ee7d557Smrg *) 68456ee7d557Smrg # g++ 68466ee7d557Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 68476ee7d557Smrg # as there is no search path for DLLs. 68486ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 68496ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 68506ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 68516ee7d557Smrg _LT_TAGVAR(always_export_symbols, $1)=no 68526ee7d557Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 68536ee7d557Smrg _LT_TAGVAR(file_list_spec, $1)='@' 68546ee7d557Smrg 68556ee7d557Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 68566ee7d557Smrg _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' 68576ee7d557Smrg # If the export-symbols file already is a .def file, use it as 68586ee7d557Smrg # is; otherwise, prepend EXPORTS... 68596ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 68606ee7d557Smrg cp $export_symbols $output_objdir/$soname.def; 68616ee7d557Smrg else 68626ee7d557Smrg echo EXPORTS > $output_objdir/$soname.def; 68636ee7d557Smrg cat $export_symbols >> $output_objdir/$soname.def; 68646ee7d557Smrg fi~ 68656ee7d557Smrg $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' 68666ee7d557Smrg else 68676ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68686ee7d557Smrg fi 68696ee7d557Smrg ;; 68706ee7d557Smrg esac 68716ee7d557Smrg ;; 68726ee7d557Smrg darwin* | rhapsody*) 68736ee7d557Smrg _LT_DARWIN_LINKER_FEATURES($1) 68746ee7d557Smrg ;; 68756ee7d557Smrg 68766ee7d557Smrg os2*) 68776ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 68786ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 68796ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 68806ee7d557Smrg shrext_cmds=.dll 68816ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 68826ee7d557Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 68836ee7d557Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 68846ee7d557Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 68856ee7d557Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 68866ee7d557Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 68876ee7d557Smrg emximp -o $lib $output_objdir/$libname.def' 68886ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 68896ee7d557Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 68906ee7d557Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 68916ee7d557Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 68926ee7d557Smrg prefix_cmds="$SED"~ 68936ee7d557Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 68946ee7d557Smrg prefix_cmds="$prefix_cmds -e 1d"; 68956ee7d557Smrg fi~ 68966ee7d557Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 68976ee7d557Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 68986ee7d557Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 68996ee7d557Smrg emximp -o $lib $output_objdir/$libname.def' 69006ee7d557Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 69016ee7d557Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 69026ee7d557Smrg _LT_TAGVAR(file_list_spec, $1)='@' 69036ee7d557Smrg ;; 69046ee7d557Smrg 69056ee7d557Smrg dgux*) 69066ee7d557Smrg case $cc_basename in 69076ee7d557Smrg ec++*) 69086ee7d557Smrg # FIXME: insert proper C++ library support 69096ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 69106ee7d557Smrg ;; 69116ee7d557Smrg ghcx*) 69126ee7d557Smrg # Green Hills C++ Compiler 69136ee7d557Smrg # FIXME: insert proper C++ library support 69146ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 69156ee7d557Smrg ;; 69166ee7d557Smrg *) 69176ee7d557Smrg # FIXME: insert proper C++ library support 69186ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 69196ee7d557Smrg ;; 69206ee7d557Smrg esac 69216ee7d557Smrg ;; 69226ee7d557Smrg 69236ee7d557Smrg freebsd2.*) 69246ee7d557Smrg # C++ shared libraries reported to be fairly broken before 69256ee7d557Smrg # switch to ELF 69266ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 69276ee7d557Smrg ;; 69286ee7d557Smrg 69296ee7d557Smrg freebsd-elf*) 69306ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 69316ee7d557Smrg ;; 69326ee7d557Smrg 69336ee7d557Smrg freebsd* | dragonfly* | midnightbsd*) 69346ee7d557Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 69356ee7d557Smrg # conventions 69366ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 69376ee7d557Smrg ;; 69386ee7d557Smrg 69396ee7d557Smrg haiku*) 69406ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 69416ee7d557Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 69426ee7d557Smrg ;; 69436ee7d557Smrg 69446ee7d557Smrg hpux9*) 69456ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 69466ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69476ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69486ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 69496ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 69506ee7d557Smrg # but as the default 69516ee7d557Smrg # location of the library. 69526ee7d557Smrg 69536ee7d557Smrg case $cc_basename in 69546ee7d557Smrg CC*) 69556ee7d557Smrg # FIXME: insert proper C++ library support 69566ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 69576ee7d557Smrg ;; 69586ee7d557Smrg aCC*) 69596ee7d557Smrg _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' 69606ee7d557Smrg # Commands to make compiler produce verbose output that lists 69616ee7d557Smrg # what "hidden" libraries, object files and flags are used when 69626ee7d557Smrg # linking a shared library. 69636ee7d557Smrg # 69646ee7d557Smrg # There doesn't appear to be a way to prevent this compiler from 69656ee7d557Smrg # explicitly linking system object files so we need to strip them 69666ee7d557Smrg # from the output so that they don't get included in the library 69676ee7d557Smrg # dependencies. 69686ee7d557Smrg 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"' 69696ee7d557Smrg ;; 69706ee7d557Smrg *) 69716ee7d557Smrg if test yes = "$GXX"; then 69726ee7d557Smrg _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' 69736ee7d557Smrg else 69746ee7d557Smrg # FIXME: insert proper C++ library support 69756ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 69766ee7d557Smrg fi 69776ee7d557Smrg ;; 69786ee7d557Smrg esac 69796ee7d557Smrg ;; 69806ee7d557Smrg 69816ee7d557Smrg hpux10*|hpux11*) 69826ee7d557Smrg if test no = "$with_gnu_ld"; then 69836ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 69846ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69856ee7d557Smrg 69866ee7d557Smrg case $host_cpu in 69876ee7d557Smrg hppa*64*|ia64*) 69886ee7d557Smrg ;; 69896ee7d557Smrg *) 69906ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69916ee7d557Smrg ;; 69926ee7d557Smrg esac 69936ee7d557Smrg fi 69946ee7d557Smrg case $host_cpu in 69956ee7d557Smrg hppa*64*|ia64*) 69966ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=no 69976ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 69986ee7d557Smrg ;; 69996ee7d557Smrg *) 70006ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 70016ee7d557Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 70026ee7d557Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 70036ee7d557Smrg # but as the default 70046ee7d557Smrg # location of the library. 70056ee7d557Smrg ;; 70066ee7d557Smrg esac 70076ee7d557Smrg 70086ee7d557Smrg case $cc_basename in 70096ee7d557Smrg CC*) 70106ee7d557Smrg # FIXME: insert proper C++ library support 70116ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 70126ee7d557Smrg ;; 70136ee7d557Smrg aCC*) 70146ee7d557Smrg case $host_cpu in 70156ee7d557Smrg hppa*64*) 70166ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 70176ee7d557Smrg ;; 70186ee7d557Smrg ia64*) 70196ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 70206ee7d557Smrg ;; 70216ee7d557Smrg *) 70226ee7d557Smrg _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' 70236ee7d557Smrg ;; 70246ee7d557Smrg esac 70256ee7d557Smrg # Commands to make compiler produce verbose output that lists 70266ee7d557Smrg # what "hidden" libraries, object files and flags are used when 70276ee7d557Smrg # linking a shared library. 70286ee7d557Smrg # 70296ee7d557Smrg # There doesn't appear to be a way to prevent this compiler from 70306ee7d557Smrg # explicitly linking system object files so we need to strip them 70316ee7d557Smrg # from the output so that they don't get included in the library 70326ee7d557Smrg # dependencies. 70336ee7d557Smrg 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"' 70346ee7d557Smrg ;; 70356ee7d557Smrg *) 70366ee7d557Smrg if test yes = "$GXX"; then 70376ee7d557Smrg if test no = "$with_gnu_ld"; then 70386ee7d557Smrg case $host_cpu in 70396ee7d557Smrg hppa*64*) 70406ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 70416ee7d557Smrg ;; 70426ee7d557Smrg ia64*) 70436ee7d557Smrg _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' 70446ee7d557Smrg ;; 70456ee7d557Smrg *) 70466ee7d557Smrg _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' 70476ee7d557Smrg ;; 70486ee7d557Smrg esac 70496ee7d557Smrg fi 70506ee7d557Smrg else 70516ee7d557Smrg # FIXME: insert proper C++ library support 70526ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 70536ee7d557Smrg fi 70546ee7d557Smrg ;; 70556ee7d557Smrg esac 70566ee7d557Smrg ;; 70576ee7d557Smrg 70586ee7d557Smrg interix[[3-9]]*) 70596ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=no 70606ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 70616ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 70626ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 70636ee7d557Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 70646ee7d557Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 70656ee7d557Smrg # default) and relocated if they conflict, which is a slow very memory 70666ee7d557Smrg # consuming and fragmenting process. To avoid this, we pick a random, 70676ee7d557Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 70686ee7d557Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 70696ee7d557Smrg _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' 70706ee7d557Smrg _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' 70716ee7d557Smrg ;; 70726ee7d557Smrg irix5* | irix6*) 70736ee7d557Smrg case $cc_basename in 70746ee7d557Smrg CC*) 70756ee7d557Smrg # SGI C++ 70766ee7d557Smrg _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' 70776ee7d557Smrg 70786ee7d557Smrg # Archives containing C++ object files must be created using 70796ee7d557Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 70806ee7d557Smrg # necessary to make sure instantiated templates are included 70816ee7d557Smrg # in the archive. 70826ee7d557Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 70836ee7d557Smrg ;; 70846ee7d557Smrg *) 70856ee7d557Smrg if test yes = "$GXX"; then 70866ee7d557Smrg if test no = "$with_gnu_ld"; then 70876ee7d557Smrg _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' 70886ee7d557Smrg else 70896ee7d557Smrg _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' 70906ee7d557Smrg fi 70916ee7d557Smrg fi 70926ee7d557Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 70936ee7d557Smrg ;; 70946ee7d557Smrg esac 70956ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 70966ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 70976ee7d557Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 70986ee7d557Smrg ;; 70996ee7d557Smrg 71006ee7d557Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 71016ee7d557Smrg case $cc_basename in 71026ee7d557Smrg KCC*) 71036ee7d557Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 71046ee7d557Smrg 71056ee7d557Smrg # KCC will only create a shared library if the output file 71066ee7d557Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71076ee7d557Smrg # to its proper name (with version) after linking. 71086ee7d557Smrg _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' 71096ee7d557Smrg _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' 71106ee7d557Smrg # Commands to make compiler produce verbose output that lists 71116ee7d557Smrg # what "hidden" libraries, object files and flags are used when 71126ee7d557Smrg # linking a shared library. 71136ee7d557Smrg # 71146ee7d557Smrg # There doesn't appear to be a way to prevent this compiler from 71156ee7d557Smrg # explicitly linking system object files so we need to strip them 71166ee7d557Smrg # from the output so that they don't get included in the library 71176ee7d557Smrg # dependencies. 71186ee7d557Smrg 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"' 71196ee7d557Smrg 71206ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71216ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 71226ee7d557Smrg 71236ee7d557Smrg # Archives containing C++ object files must be created using 71246ee7d557Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 71256ee7d557Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 71266ee7d557Smrg ;; 71276ee7d557Smrg icpc* | ecpc* ) 71286ee7d557Smrg # Intel C++ 71296ee7d557Smrg with_gnu_ld=yes 71306ee7d557Smrg # version 8.0 and above of icpc choke on multiply defined symbols 71316ee7d557Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 71326ee7d557Smrg # earlier do not add the objects themselves. 71336ee7d557Smrg case `$CC -V 2>&1` in 71346ee7d557Smrg *"Version 7."*) 71356ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 71366ee7d557Smrg _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' 71376ee7d557Smrg ;; 71386ee7d557Smrg *) # Version 8.0 or newer 71396ee7d557Smrg tmp_idyn= 71406ee7d557Smrg case $host_cpu in 71416ee7d557Smrg ia64*) tmp_idyn=' -i_dynamic';; 71426ee7d557Smrg esac 71436ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 71446ee7d557Smrg _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' 71456ee7d557Smrg ;; 71466ee7d557Smrg esac 71476ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 71486ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71496ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 71506ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 71516ee7d557Smrg ;; 71526ee7d557Smrg pgCC* | pgcpp*) 71536ee7d557Smrg # Portland Group C++ compiler 71546ee7d557Smrg case `$CC -V` in 71556ee7d557Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 71566ee7d557Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 71576ee7d557Smrg rm -rf $tpldir~ 71586ee7d557Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 71596ee7d557Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 71606ee7d557Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 71616ee7d557Smrg rm -rf $tpldir~ 71626ee7d557Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 71636ee7d557Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 71646ee7d557Smrg $RANLIB $oldlib' 71656ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 71666ee7d557Smrg rm -rf $tpldir~ 71676ee7d557Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 71686ee7d557Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 71696ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 71706ee7d557Smrg rm -rf $tpldir~ 71716ee7d557Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 71726ee7d557Smrg $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' 71736ee7d557Smrg ;; 71746ee7d557Smrg *) # Version 6 and above use weak symbols 71756ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 71766ee7d557Smrg _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' 71776ee7d557Smrg ;; 71786ee7d557Smrg esac 71796ee7d557Smrg 71806ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 71816ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 71826ee7d557Smrg _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' 71836ee7d557Smrg ;; 71846ee7d557Smrg cxx*) 71856ee7d557Smrg # Compaq C++ 71866ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 71876ee7d557Smrg _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' 71886ee7d557Smrg 71896ee7d557Smrg runpath_var=LD_RUN_PATH 71906ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 71916ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71926ee7d557Smrg 71936ee7d557Smrg # Commands to make compiler produce verbose output that lists 71946ee7d557Smrg # what "hidden" libraries, object files and flags are used when 71956ee7d557Smrg # linking a shared library. 71966ee7d557Smrg # 71976ee7d557Smrg # There doesn't appear to be a way to prevent this compiler from 71986ee7d557Smrg # explicitly linking system object files so we need to strip them 71996ee7d557Smrg # from the output so that they don't get included in the library 72006ee7d557Smrg # dependencies. 72016ee7d557Smrg 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' 72026ee7d557Smrg ;; 72036ee7d557Smrg xl* | mpixl* | bgxl*) 72046ee7d557Smrg # IBM XL 8.0 on PPC, with GNU ld 72056ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72066ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 72076ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 72086ee7d557Smrg if test yes = "$supports_anon_versioning"; then 72096ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 72106ee7d557Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 72116ee7d557Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 72126ee7d557Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 72136ee7d557Smrg fi 72146ee7d557Smrg ;; 72156ee7d557Smrg *) 72166ee7d557Smrg case `$CC -V 2>&1 | $SED 5q` in 72176ee7d557Smrg *Sun\ C*) 72186ee7d557Smrg # Sun C++ 5.9 72196ee7d557Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 72206ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72216ee7d557Smrg _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' 72226ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72236ee7d557Smrg _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' 72246ee7d557Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 72256ee7d557Smrg 72266ee7d557Smrg # Not sure whether something based on 72276ee7d557Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 72286ee7d557Smrg # would be better. 72296ee7d557Smrg output_verbose_link_cmd='func_echo_all' 72306ee7d557Smrg 72316ee7d557Smrg # Archives containing C++ object files must be created using 72326ee7d557Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 72336ee7d557Smrg # necessary to make sure instantiated templates are included 72346ee7d557Smrg # in the archive. 72356ee7d557Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 72366ee7d557Smrg ;; 72376ee7d557Smrg esac 72386ee7d557Smrg ;; 72396ee7d557Smrg esac 72406ee7d557Smrg ;; 72416ee7d557Smrg 72426ee7d557Smrg lynxos*) 72436ee7d557Smrg # FIXME: insert proper C++ library support 72446ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72456ee7d557Smrg ;; 72466ee7d557Smrg 72476ee7d557Smrg m88k*) 72486ee7d557Smrg # FIXME: insert proper C++ library support 72496ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72506ee7d557Smrg ;; 72516ee7d557Smrg 72526ee7d557Smrg mvs*) 72536ee7d557Smrg case $cc_basename in 72546ee7d557Smrg cxx*) 72556ee7d557Smrg # FIXME: insert proper C++ library support 72566ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72576ee7d557Smrg ;; 72586ee7d557Smrg *) 72596ee7d557Smrg # FIXME: insert proper C++ library support 72606ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72616ee7d557Smrg ;; 72626ee7d557Smrg esac 72636ee7d557Smrg ;; 72646ee7d557Smrg 72656ee7d557Smrg *-mlibc) 72666ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 72676ee7d557Smrg ;; 72686ee7d557Smrg 72696ee7d557Smrg netbsd*) 72706ee7d557Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 72716ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 72726ee7d557Smrg wlarc= 72736ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72746ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 72756ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72766ee7d557Smrg fi 72776ee7d557Smrg # Workaround some broken pre-1.5 toolchains 72786ee7d557Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 72796ee7d557Smrg ;; 72806ee7d557Smrg 72816ee7d557Smrg *nto* | *qnx*) 72826ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 72836ee7d557Smrg ;; 72846ee7d557Smrg 72856ee7d557Smrg openbsd*) 72866ee7d557Smrg if test -f /usr/libexec/ld.so; then 72876ee7d557Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 72886ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72896ee7d557Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 72906ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 72916ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 72926ee7d557Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 72936ee7d557Smrg _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' 72946ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 72956ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 72966ee7d557Smrg fi 72976ee7d557Smrg output_verbose_link_cmd=func_echo_all 72986ee7d557Smrg else 72996ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73006ee7d557Smrg fi 73016ee7d557Smrg ;; 73026ee7d557Smrg 73036ee7d557Smrg osf3* | osf4* | osf5*) 73046ee7d557Smrg case $cc_basename in 73056ee7d557Smrg KCC*) 73066ee7d557Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 73076ee7d557Smrg 73086ee7d557Smrg # KCC will only create a shared library if the output file 73096ee7d557Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 73106ee7d557Smrg # to its proper name (with version) after linking. 73116ee7d557Smrg _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' 73126ee7d557Smrg 73136ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 73146ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73156ee7d557Smrg 73166ee7d557Smrg # Archives containing C++ object files must be created using 73176ee7d557Smrg # the KAI C++ compiler. 73186ee7d557Smrg case $host in 73196ee7d557Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 73206ee7d557Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 73216ee7d557Smrg esac 73226ee7d557Smrg ;; 73236ee7d557Smrg RCC*) 73246ee7d557Smrg # Rational C++ 2.4.1 73256ee7d557Smrg # FIXME: insert proper C++ library support 73266ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73276ee7d557Smrg ;; 73286ee7d557Smrg cxx*) 73296ee7d557Smrg case $host in 73306ee7d557Smrg osf3*) 73316ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 73326ee7d557Smrg _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' 73336ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 73346ee7d557Smrg ;; 73356ee7d557Smrg *) 73366ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 73376ee7d557Smrg _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' 73386ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 73396ee7d557Smrg echo "-hidden">> $lib.exp~ 73406ee7d557Smrg $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~ 73416ee7d557Smrg $RM $lib.exp' 73426ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 73436ee7d557Smrg ;; 73446ee7d557Smrg esac 73456ee7d557Smrg 73466ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73476ee7d557Smrg 73486ee7d557Smrg # Commands to make compiler produce verbose output that lists 73496ee7d557Smrg # what "hidden" libraries, object files and flags are used when 73506ee7d557Smrg # linking a shared library. 73516ee7d557Smrg # 73526ee7d557Smrg # There doesn't appear to be a way to prevent this compiler from 73536ee7d557Smrg # explicitly linking system object files so we need to strip them 73546ee7d557Smrg # from the output so that they don't get included in the library 73556ee7d557Smrg # dependencies. 73566ee7d557Smrg 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"' 73576ee7d557Smrg ;; 73586ee7d557Smrg *) 73596ee7d557Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 73606ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 73616ee7d557Smrg case $host in 73626ee7d557Smrg osf3*) 73636ee7d557Smrg _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' 73646ee7d557Smrg ;; 73656ee7d557Smrg *) 73666ee7d557Smrg _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' 73676ee7d557Smrg ;; 73686ee7d557Smrg esac 73696ee7d557Smrg 73706ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 73716ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 73726ee7d557Smrg 73736ee7d557Smrg # Commands to make compiler produce verbose output that lists 73746ee7d557Smrg # what "hidden" libraries, object files and flags are used when 73756ee7d557Smrg # linking a shared library. 73766ee7d557Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' 73776ee7d557Smrg 73786ee7d557Smrg else 73796ee7d557Smrg # FIXME: insert proper C++ library support 73806ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73816ee7d557Smrg fi 73826ee7d557Smrg ;; 73836ee7d557Smrg esac 73846ee7d557Smrg ;; 73856ee7d557Smrg 73866ee7d557Smrg psos*) 73876ee7d557Smrg # FIXME: insert proper C++ library support 73886ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73896ee7d557Smrg ;; 73906ee7d557Smrg 73916ee7d557Smrg serenity*) 73926ee7d557Smrg ;; 73936ee7d557Smrg 73946ee7d557Smrg sunos4*) 73956ee7d557Smrg case $cc_basename in 73966ee7d557Smrg CC*) 73976ee7d557Smrg # Sun C++ 4.x 73986ee7d557Smrg # FIXME: insert proper C++ library support 73996ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74006ee7d557Smrg ;; 74016ee7d557Smrg lcc*) 74026ee7d557Smrg # Lucid 74036ee7d557Smrg # FIXME: insert proper C++ library support 74046ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74056ee7d557Smrg ;; 74066ee7d557Smrg *) 74076ee7d557Smrg # FIXME: insert proper C++ library support 74086ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74096ee7d557Smrg ;; 74106ee7d557Smrg esac 74116ee7d557Smrg ;; 74126ee7d557Smrg 74136ee7d557Smrg solaris*) 74146ee7d557Smrg case $cc_basename in 74156ee7d557Smrg CC* | sunCC*) 74166ee7d557Smrg # Sun C++ 4.2, 5.x and Centerline C++ 74176ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 74186ee7d557Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 74196ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 74206ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 74216ee7d557Smrg $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' 74226ee7d557Smrg 74236ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 74246ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74256ee7d557Smrg case $host_os in 74266ee7d557Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 74276ee7d557Smrg *) 74286ee7d557Smrg # The compiler driver will combine and reorder linker options, 74296ee7d557Smrg # but understands '-z linker_flag'. 74306ee7d557Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 74316ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 74326ee7d557Smrg ;; 74336ee7d557Smrg esac 74346ee7d557Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 74356ee7d557Smrg 74366ee7d557Smrg output_verbose_link_cmd='func_echo_all' 74376ee7d557Smrg 74386ee7d557Smrg # Archives containing C++ object files must be created using 74396ee7d557Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 74406ee7d557Smrg # necessary to make sure instantiated templates are included 74416ee7d557Smrg # in the archive. 74426ee7d557Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 74436ee7d557Smrg ;; 74446ee7d557Smrg gcx*) 74456ee7d557Smrg # Green Hills C++ Compiler 74466ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 74476ee7d557Smrg 74486ee7d557Smrg # The C++ compiler must be used to create the archive. 74496ee7d557Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 74506ee7d557Smrg ;; 74516ee7d557Smrg *) 74526ee7d557Smrg # GNU C++ compiler with Solaris linker 74536ee7d557Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 74546ee7d557Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 74556ee7d557Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 74566ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 74576ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 74586ee7d557Smrg $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' 74596ee7d557Smrg 74606ee7d557Smrg # Commands to make compiler produce verbose output that lists 74616ee7d557Smrg # what "hidden" libraries, object files and flags are used when 74626ee7d557Smrg # linking a shared library. 74636ee7d557Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' 74646ee7d557Smrg else 74656ee7d557Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 74666ee7d557Smrg # platform. 74676ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 74686ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 74696ee7d557Smrg $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' 74706ee7d557Smrg 74716ee7d557Smrg # Commands to make compiler produce verbose output that lists 74726ee7d557Smrg # what "hidden" libraries, object files and flags are used when 74736ee7d557Smrg # linking a shared library. 74746ee7d557Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"' 74756ee7d557Smrg fi 74766ee7d557Smrg 74776ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 74786ee7d557Smrg case $host_os in 74796ee7d557Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 74806ee7d557Smrg *) 74816ee7d557Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 74826ee7d557Smrg ;; 74836ee7d557Smrg esac 74846ee7d557Smrg fi 74856ee7d557Smrg ;; 74866ee7d557Smrg esac 74876ee7d557Smrg ;; 74886ee7d557Smrg 74896ee7d557Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 74906ee7d557Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 74916ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 74926ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 74936ee7d557Smrg runpath_var='LD_RUN_PATH' 74946ee7d557Smrg 74956ee7d557Smrg case $cc_basename in 74966ee7d557Smrg CC*) 74976ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74986ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74996ee7d557Smrg ;; 75006ee7d557Smrg *) 75016ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 75026ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 75036ee7d557Smrg ;; 75046ee7d557Smrg esac 75056ee7d557Smrg ;; 75066ee7d557Smrg 75076ee7d557Smrg sysv5* | sco3.2v5* | sco5v6*) 75086ee7d557Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 75096ee7d557Smrg # link with -lc, and that would cause any symbols used from libc to 75106ee7d557Smrg # always be unresolved, which means just about no library would 75116ee7d557Smrg # ever link correctly. If we're not using GNU ld we use -z text 75126ee7d557Smrg # though, which does catch some bad symbols but isn't as heavy-handed 75136ee7d557Smrg # as -z defs. 75146ee7d557Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 75156ee7d557Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 75166ee7d557Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 75176ee7d557Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 75186ee7d557Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 75196ee7d557Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 75206ee7d557Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 75216ee7d557Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 75226ee7d557Smrg runpath_var='LD_RUN_PATH' 75236ee7d557Smrg 75246ee7d557Smrg case $cc_basename in 75256ee7d557Smrg CC*) 75266ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 75276ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 75286ee7d557Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 75296ee7d557Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 75306ee7d557Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 75316ee7d557Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 75326ee7d557Smrg ;; 75336ee7d557Smrg *) 75346ee7d557Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 75356ee7d557Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 75366ee7d557Smrg ;; 75376ee7d557Smrg esac 75386ee7d557Smrg ;; 75396ee7d557Smrg 75406ee7d557Smrg tandem*) 75416ee7d557Smrg case $cc_basename in 75426ee7d557Smrg NCC*) 75436ee7d557Smrg # NonStop-UX NCC 3.20 75446ee7d557Smrg # FIXME: insert proper C++ library support 75456ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 75466ee7d557Smrg ;; 75476ee7d557Smrg *) 75486ee7d557Smrg # FIXME: insert proper C++ library support 75496ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 75506ee7d557Smrg ;; 75516ee7d557Smrg esac 75526ee7d557Smrg ;; 75536ee7d557Smrg 75546ee7d557Smrg vxworks*) 75556ee7d557Smrg # FIXME: insert proper C++ library support 75566ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 75576ee7d557Smrg ;; 75586ee7d557Smrg 75596ee7d557Smrg *) 75606ee7d557Smrg # FIXME: insert proper C++ library support 75616ee7d557Smrg _LT_TAGVAR(ld_shlibs, $1)=no 75626ee7d557Smrg ;; 75636ee7d557Smrg esac 75646ee7d557Smrg 75656ee7d557Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 75666ee7d557Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 75676ee7d557Smrg 75686ee7d557Smrg _LT_TAGVAR(GCC, $1)=$GXX 75696ee7d557Smrg _LT_TAGVAR(LD, $1)=$LD 75706ee7d557Smrg 75716ee7d557Smrg ## CAVEAT EMPTOR: 75726ee7d557Smrg ## There is no encapsulation within the following macros, do not change 75736ee7d557Smrg ## the running order or otherwise move them around unless you know exactly 75746ee7d557Smrg ## what you are doing... 75756ee7d557Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 75766ee7d557Smrg _LT_COMPILER_PIC($1) 75776ee7d557Smrg _LT_COMPILER_C_O($1) 75786ee7d557Smrg _LT_COMPILER_FILE_LOCKS($1) 75796ee7d557Smrg _LT_LINKER_SHLIBS($1) 75806ee7d557Smrg _LT_SYS_DYNAMIC_LINKER($1) 75816ee7d557Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 75826ee7d557Smrg 75836ee7d557Smrg _LT_CONFIG($1) 75846ee7d557Smrg fi # test -n "$compiler" 75856ee7d557Smrg 75866ee7d557Smrg CC=$lt_save_CC 75876ee7d557Smrg CFLAGS=$lt_save_CFLAGS 75886ee7d557Smrg LDCXX=$LD 75896ee7d557Smrg LD=$lt_save_LD 75906ee7d557Smrg GCC=$lt_save_GCC 75916ee7d557Smrg with_gnu_ld=$lt_save_with_gnu_ld 75926ee7d557Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 75936ee7d557Smrg lt_cv_path_LD=$lt_save_path_LD 75946ee7d557Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 75956ee7d557Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 75966ee7d557Smrgfi # test yes != "$_lt_caught_CXX_error" 75976ee7d557Smrg 75986ee7d557SmrgAC_LANG_POP 75996ee7d557Smrg])# _LT_LANG_CXX_CONFIG 76006ee7d557Smrg 76016ee7d557Smrg 76026ee7d557Smrg# _LT_FUNC_STRIPNAME_CNF 76036ee7d557Smrg# ---------------------- 76046ee7d557Smrg# func_stripname_cnf prefix suffix name 76056ee7d557Smrg# strip PREFIX and SUFFIX off of NAME. 76066ee7d557Smrg# PREFIX and SUFFIX must not contain globbing or regex special 76076ee7d557Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 76086ee7d557Smrg# dot (in which case that matches only a dot). 76096ee7d557Smrg# 76106ee7d557Smrg# This function is identical to the (non-XSI) version of func_stripname, 76116ee7d557Smrg# except this one can be used by m4 code that may be executed by configure, 76126ee7d557Smrg# rather than the libtool script. 76136ee7d557Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 76146ee7d557SmrgAC_REQUIRE([_LT_DECL_SED]) 76156ee7d557SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 76166ee7d557Smrgfunc_stripname_cnf () 76176ee7d557Smrg{ 76186ee7d557Smrg case @S|@2 in 76196ee7d557Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 76206ee7d557Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 76216ee7d557Smrg esac 76226ee7d557Smrg} # func_stripname_cnf 76236ee7d557Smrg])# _LT_FUNC_STRIPNAME_CNF 76246ee7d557Smrg 76256ee7d557Smrg 76266ee7d557Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 76276ee7d557Smrg# --------------------------------- 76286ee7d557Smrg# Figure out "hidden" library dependencies from verbose 76296ee7d557Smrg# compiler output when linking a shared library. 76306ee7d557Smrg# Parse the compiler output and extract the necessary 76316ee7d557Smrg# objects, libraries and library flags. 76326ee7d557Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 76336ee7d557Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 76346ee7d557SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 76356ee7d557Smrg# Dependencies to place before and after the object being linked: 76366ee7d557Smrg_LT_TAGVAR(predep_objects, $1)= 76376ee7d557Smrg_LT_TAGVAR(postdep_objects, $1)= 76386ee7d557Smrg_LT_TAGVAR(predeps, $1)= 76396ee7d557Smrg_LT_TAGVAR(postdeps, $1)= 76406ee7d557Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 76416ee7d557Smrg 76426ee7d557Smrgdnl we can't use the lt_simple_compile_test_code here, 76436ee7d557Smrgdnl because it contains code intended for an executable, 76446ee7d557Smrgdnl not a library. It's possible we should let each 76456ee7d557Smrgdnl tag define a new lt_????_link_test_code variable, 76466ee7d557Smrgdnl but it's only used here... 76476ee7d557Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 76486ee7d557Smrgint a; 76496ee7d557Smrgvoid foo (void) { a = 0; } 76506ee7d557Smrg_LT_EOF 76516ee7d557Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 76526ee7d557Smrgclass Foo 76536ee7d557Smrg{ 76546ee7d557Smrgpublic: 76556ee7d557Smrg Foo (void) { a = 0; } 76566ee7d557Smrgprivate: 76576ee7d557Smrg int a; 76586ee7d557Smrg}; 76596ee7d557Smrg_LT_EOF 76606ee7d557Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 76616ee7d557Smrg subroutine foo 76626ee7d557Smrg implicit none 76636ee7d557Smrg integer*4 a 76646ee7d557Smrg a=0 76656ee7d557Smrg return 76666ee7d557Smrg end 76676ee7d557Smrg_LT_EOF 76686ee7d557Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 76696ee7d557Smrg subroutine foo 76706ee7d557Smrg implicit none 76716ee7d557Smrg integer a 76726ee7d557Smrg a=0 76736ee7d557Smrg return 76746ee7d557Smrg end 76756ee7d557Smrg_LT_EOF 76766ee7d557Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 76776ee7d557Smrgpublic class foo { 76786ee7d557Smrg private int a; 76796ee7d557Smrg public void bar (void) { 76806ee7d557Smrg a = 0; 76816ee7d557Smrg } 76826ee7d557Smrg}; 76836ee7d557Smrg_LT_EOF 76846ee7d557Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 76856ee7d557Smrgpackage foo 76866ee7d557Smrgfunc foo() { 76876ee7d557Smrg} 76886ee7d557Smrg_LT_EOF 76896ee7d557Smrg]) 76906ee7d557Smrg 76916ee7d557Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 76926ee7d557Smrgcase "$CC $CFLAGS " in #( 76936ee7d557Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 76946ee7d557Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 76956ee7d557Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 76966ee7d557Smrgesac 76976ee7d557Smrg 76986ee7d557Smrgdnl Parse the compiler output and extract the necessary 76996ee7d557Smrgdnl objects, libraries and library flags. 77006ee7d557Smrgif AC_TRY_EVAL(ac_compile); then 77016ee7d557Smrg # Parse the compiler output and extract the necessary 77026ee7d557Smrg # objects, libraries and library flags. 77036ee7d557Smrg 77046ee7d557Smrg # Sentinel used to keep track of whether or not we are before 77056ee7d557Smrg # the conftest object file. 77066ee7d557Smrg pre_test_object_deps_done=no 77076ee7d557Smrg 77086ee7d557Smrg for p in `eval "$output_verbose_link_cmd"`; do 77096ee7d557Smrg case $prev$p in 77106ee7d557Smrg 77116ee7d557Smrg -L* | -R* | -l*) 77126ee7d557Smrg # Some compilers place space between "-{L,R,l}" and the path. 77136ee7d557Smrg # Remove the space. 77146ee7d557Smrg if test x-L = x"$p" || 77156ee7d557Smrg test x-R = x"$p" || 77166ee7d557Smrg test x-l = x"$p"; then 77176ee7d557Smrg prev=$p 77186ee7d557Smrg continue 77196ee7d557Smrg fi 77206ee7d557Smrg 77216ee7d557Smrg # Expand the sysroot to ease extracting the directories later. 77226ee7d557Smrg if test -z "$prev"; then 77236ee7d557Smrg case $p in 77246ee7d557Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 77256ee7d557Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 77266ee7d557Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 77276ee7d557Smrg esac 77286ee7d557Smrg fi 77296ee7d557Smrg case $p in 77306ee7d557Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 77316ee7d557Smrg esac 77326ee7d557Smrg if test no = "$pre_test_object_deps_done"; then 77336ee7d557Smrg case $prev in 77346ee7d557Smrg -L | -R) 77356ee7d557Smrg # Internal compiler library paths should come after those 77366ee7d557Smrg # provided the user. The postdeps already come after the 77376ee7d557Smrg # user supplied libs so there is no need to process them. 77386ee7d557Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 77396ee7d557Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 77406ee7d557Smrg else 77416ee7d557Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 77426ee7d557Smrg fi 77436ee7d557Smrg ;; 77446ee7d557Smrg # The "-l" case would never come before the object being 77456ee7d557Smrg # linked, so don't bother handling this case. 77466ee7d557Smrg esac 77476ee7d557Smrg else 77486ee7d557Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 77496ee7d557Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 77506ee7d557Smrg else 77516ee7d557Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 77526ee7d557Smrg fi 77536ee7d557Smrg fi 77546ee7d557Smrg prev= 77556ee7d557Smrg ;; 77566ee7d557Smrg 77576ee7d557Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 77586ee7d557Smrg *.$objext) 77596ee7d557Smrg # This assumes that the test object file only shows up 77606ee7d557Smrg # once in the compiler output. 77616ee7d557Smrg if test "$p" = "conftest.$objext"; then 77626ee7d557Smrg pre_test_object_deps_done=yes 77636ee7d557Smrg continue 77646ee7d557Smrg fi 77656ee7d557Smrg 77666ee7d557Smrg if test no = "$pre_test_object_deps_done"; then 77676ee7d557Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 77686ee7d557Smrg _LT_TAGVAR(predep_objects, $1)=$p 77696ee7d557Smrg else 77706ee7d557Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 77716ee7d557Smrg fi 77726ee7d557Smrg else 77736ee7d557Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 77746ee7d557Smrg _LT_TAGVAR(postdep_objects, $1)=$p 77756ee7d557Smrg else 77766ee7d557Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 77776ee7d557Smrg fi 77786ee7d557Smrg fi 77796ee7d557Smrg ;; 77806ee7d557Smrg 77816ee7d557Smrg *) ;; # Ignore the rest. 77826ee7d557Smrg 77836ee7d557Smrg esac 77846ee7d557Smrg done 77856ee7d557Smrg 77866ee7d557Smrg # Clean up. 77876ee7d557Smrg rm -f a.out a.exe 77886ee7d557Smrgelse 77896ee7d557Smrg echo "libtool.m4: error: problem compiling $1 test program" 77906ee7d557Smrgfi 77916ee7d557Smrg 77926ee7d557Smrg$RM -f confest.$objext 77936ee7d557SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 77946ee7d557Smrg 77956ee7d557Smrg# PORTME: override above test on systems where it is broken 77966ee7d557Smrgm4_if([$1], [CXX], 77976ee7d557Smrg[case $host_os in 77986ee7d557Smrginterix[[3-9]]*) 77996ee7d557Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 78006ee7d557Smrg # hack all around it, let's just trust "g++" to DTRT. 78016ee7d557Smrg _LT_TAGVAR(predep_objects,$1)= 78026ee7d557Smrg _LT_TAGVAR(postdep_objects,$1)= 78036ee7d557Smrg _LT_TAGVAR(postdeps,$1)= 78046ee7d557Smrg ;; 78056ee7d557Smrgesac 78066ee7d557Smrg]) 78076ee7d557Smrg 78086ee7d557Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 78096ee7d557Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 78106ee7d557Smrgesac 78116ee7d557Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 78126ee7d557Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 78136ee7d557Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 78146ee7d557Smrgfi 78156ee7d557Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 78166ee7d557Smrg [The directories searched by this compiler when creating a shared library]) 78176ee7d557Smrg_LT_TAGDECL([], [predep_objects], [1], 78186ee7d557Smrg [Dependencies to place before and after the objects being linked to 78196ee7d557Smrg create a shared library]) 78206ee7d557Smrg_LT_TAGDECL([], [postdep_objects], [1]) 78216ee7d557Smrg_LT_TAGDECL([], [predeps], [1]) 78226ee7d557Smrg_LT_TAGDECL([], [postdeps], [1]) 78236ee7d557Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 78246ee7d557Smrg [The library search path used internally by the compiler when linking 78256ee7d557Smrg a shared library]) 78266ee7d557Smrg])# _LT_SYS_HIDDEN_LIBDEPS 78276ee7d557Smrg 78286ee7d557Smrg 78296ee7d557Smrg# _LT_LANG_F77_CONFIG([TAG]) 78306ee7d557Smrg# -------------------------- 78316ee7d557Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 78326ee7d557Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 78336ee7d557Smrg# to write the compiler configuration to 'libtool'. 78346ee7d557Smrgm4_defun([_LT_LANG_F77_CONFIG], 78356ee7d557Smrg[AC_LANG_PUSH(Fortran 77) 78366ee7d557Smrgif test -z "$F77" || test no = "$F77"; then 78376ee7d557Smrg _lt_disable_F77=yes 78386ee7d557Smrgfi 78396ee7d557Smrg 78406ee7d557Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78416ee7d557Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 78426ee7d557Smrg_LT_TAGVAR(always_export_symbols, $1)=no 78436ee7d557Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78446ee7d557Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78456ee7d557Smrg_LT_TAGVAR(hardcode_direct, $1)=no 78466ee7d557Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78476ee7d557Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78486ee7d557Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78496ee7d557Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78506ee7d557Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 78516ee7d557Smrg_LT_TAGVAR(inherit_rpath, $1)=no 78526ee7d557Smrg_LT_TAGVAR(module_cmds, $1)= 78536ee7d557Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 78546ee7d557Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78556ee7d557Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78566ee7d557Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78576ee7d557Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78586ee7d557Smrg_LT_TAGVAR(no_undefined_flag, $1)= 78596ee7d557Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78606ee7d557Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78616ee7d557Smrg 78626ee7d557Smrg# Source file extension for f77 test sources. 78636ee7d557Smrgac_ext=f 78646ee7d557Smrg 78656ee7d557Smrg# Object file extension for compiled f77 test sources. 78666ee7d557Smrgobjext=o 78676ee7d557Smrg_LT_TAGVAR(objext, $1)=$objext 78686ee7d557Smrg 78696ee7d557Smrg# No sense in running all these tests if we already determined that 78706ee7d557Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 78716ee7d557Smrg# are currently assumed to apply to all compilers on this platform, 78726ee7d557Smrg# and will be corrupted by setting them based on a non-working compiler. 78736ee7d557Smrgif test yes != "$_lt_disable_F77"; then 78746ee7d557Smrg # Code to be used in simple compile tests 78756ee7d557Smrg lt_simple_compile_test_code="\ 78766ee7d557Smrg subroutine t 78776ee7d557Smrg return 78786ee7d557Smrg end 78796ee7d557Smrg" 78806ee7d557Smrg 78816ee7d557Smrg # Code to be used in simple link tests 78826ee7d557Smrg lt_simple_link_test_code="\ 78836ee7d557Smrg program t 78846ee7d557Smrg end 78856ee7d557Smrg" 78866ee7d557Smrg 78876ee7d557Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78886ee7d557Smrg _LT_TAG_COMPILER 78896ee7d557Smrg 78906ee7d557Smrg # save warnings/boilerplate of simple test code 78916ee7d557Smrg _LT_COMPILER_BOILERPLATE 78926ee7d557Smrg _LT_LINKER_BOILERPLATE 78936ee7d557Smrg 78946ee7d557Smrg # Allow CC to be a program name with arguments. 78956ee7d557Smrg lt_save_CC=$CC 78966ee7d557Smrg lt_save_GCC=$GCC 78976ee7d557Smrg lt_save_CFLAGS=$CFLAGS 78986ee7d557Smrg CC=${F77-"f77"} 78996ee7d557Smrg CFLAGS=$FFLAGS 79006ee7d557Smrg compiler=$CC 79016ee7d557Smrg _LT_TAGVAR(compiler, $1)=$CC 79026ee7d557Smrg _LT_CC_BASENAME([$compiler]) 79036ee7d557Smrg GCC=$G77 79046ee7d557Smrg if test -n "$compiler"; then 79056ee7d557Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 79066ee7d557Smrg AC_MSG_RESULT([$can_build_shared]) 79076ee7d557Smrg 79086ee7d557Smrg AC_MSG_CHECKING([whether to build shared libraries]) 79096ee7d557Smrg test no = "$can_build_shared" && enable_shared=no 79106ee7d557Smrg 79116ee7d557Smrg # On AIX, shared libraries and static libraries use the same namespace, and 79126ee7d557Smrg # are all built from PIC. 79136ee7d557Smrg case $host_os in 79146ee7d557Smrg aix3*) 79156ee7d557Smrg test yes = "$enable_shared" && enable_static=no 79166ee7d557Smrg if test -n "$RANLIB"; then 79176ee7d557Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 79186ee7d557Smrg postinstall_cmds='$RANLIB $lib' 79196ee7d557Smrg fi 79206ee7d557Smrg ;; 79216ee7d557Smrg aix[[4-9]]*) 79226ee7d557Smrg if test ia64 != "$host_cpu"; then 79236ee7d557Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 79246ee7d557Smrg yes,aix,yes) ;; # shared object as lib.so file only 79256ee7d557Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 79266ee7d557Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 79276ee7d557Smrg esac 79286ee7d557Smrg fi 79296ee7d557Smrg ;; 79306ee7d557Smrg esac 79316ee7d557Smrg AC_MSG_RESULT([$enable_shared]) 79326ee7d557Smrg 79336ee7d557Smrg AC_MSG_CHECKING([whether to build static libraries]) 79346ee7d557Smrg # Make sure either enable_shared or enable_static is yes. 79356ee7d557Smrg test yes = "$enable_shared" || enable_static=yes 79366ee7d557Smrg AC_MSG_RESULT([$enable_static]) 79376ee7d557Smrg 79386ee7d557Smrg _LT_TAGVAR(GCC, $1)=$G77 79396ee7d557Smrg _LT_TAGVAR(LD, $1)=$LD 79406ee7d557Smrg 79416ee7d557Smrg ## CAVEAT EMPTOR: 79426ee7d557Smrg ## There is no encapsulation within the following macros, do not change 79436ee7d557Smrg ## the running order or otherwise move them around unless you know exactly 79446ee7d557Smrg ## what you are doing... 79456ee7d557Smrg _LT_COMPILER_PIC($1) 79466ee7d557Smrg _LT_COMPILER_C_O($1) 79476ee7d557Smrg _LT_COMPILER_FILE_LOCKS($1) 79486ee7d557Smrg _LT_LINKER_SHLIBS($1) 79496ee7d557Smrg _LT_SYS_DYNAMIC_LINKER($1) 79506ee7d557Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 79516ee7d557Smrg 79526ee7d557Smrg _LT_CONFIG($1) 79536ee7d557Smrg fi # test -n "$compiler" 79546ee7d557Smrg 79556ee7d557Smrg GCC=$lt_save_GCC 79566ee7d557Smrg CC=$lt_save_CC 79576ee7d557Smrg CFLAGS=$lt_save_CFLAGS 79586ee7d557Smrgfi # test yes != "$_lt_disable_F77" 79596ee7d557Smrg 79606ee7d557SmrgAC_LANG_POP 79616ee7d557Smrg])# _LT_LANG_F77_CONFIG 79626ee7d557Smrg 79636ee7d557Smrg 79646ee7d557Smrg# _LT_LANG_FC_CONFIG([TAG]) 79656ee7d557Smrg# ------------------------- 79666ee7d557Smrg# Ensure that the configuration variables for a Fortran compiler are 79676ee7d557Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 79686ee7d557Smrg# to write the compiler configuration to 'libtool'. 79696ee7d557Smrgm4_defun([_LT_LANG_FC_CONFIG], 79706ee7d557Smrg[AC_LANG_PUSH(Fortran) 79716ee7d557Smrg 79726ee7d557Smrgif test -z "$FC" || test no = "$FC"; then 79736ee7d557Smrg _lt_disable_FC=yes 79746ee7d557Smrgfi 79756ee7d557Smrg 79766ee7d557Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 79776ee7d557Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 79786ee7d557Smrg_LT_TAGVAR(always_export_symbols, $1)=no 79796ee7d557Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 79806ee7d557Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 79816ee7d557Smrg_LT_TAGVAR(hardcode_direct, $1)=no 79826ee7d557Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 79836ee7d557Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 79846ee7d557Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 79856ee7d557Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 79866ee7d557Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 79876ee7d557Smrg_LT_TAGVAR(inherit_rpath, $1)=no 79886ee7d557Smrg_LT_TAGVAR(module_cmds, $1)= 79896ee7d557Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 79906ee7d557Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 79916ee7d557Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 79926ee7d557Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 79936ee7d557Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 79946ee7d557Smrg_LT_TAGVAR(no_undefined_flag, $1)= 79956ee7d557Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 79966ee7d557Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 79976ee7d557Smrg 79986ee7d557Smrg# Source file extension for fc test sources. 79996ee7d557Smrgac_ext=${ac_fc_srcext-f} 80006ee7d557Smrg 80016ee7d557Smrg# Object file extension for compiled fc test sources. 80026ee7d557Smrgobjext=o 80036ee7d557Smrg_LT_TAGVAR(objext, $1)=$objext 80046ee7d557Smrg 80056ee7d557Smrg# No sense in running all these tests if we already determined that 80066ee7d557Smrg# the FC compiler isn't working. Some variables (like enable_shared) 80076ee7d557Smrg# are currently assumed to apply to all compilers on this platform, 80086ee7d557Smrg# and will be corrupted by setting them based on a non-working compiler. 80096ee7d557Smrgif test yes != "$_lt_disable_FC"; then 80106ee7d557Smrg # Code to be used in simple compile tests 80116ee7d557Smrg lt_simple_compile_test_code="\ 80126ee7d557Smrg subroutine t 80136ee7d557Smrg return 80146ee7d557Smrg end 80156ee7d557Smrg" 80166ee7d557Smrg 80176ee7d557Smrg # Code to be used in simple link tests 80186ee7d557Smrg lt_simple_link_test_code="\ 80196ee7d557Smrg program t 80206ee7d557Smrg end 80216ee7d557Smrg" 80226ee7d557Smrg 80236ee7d557Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 80246ee7d557Smrg _LT_TAG_COMPILER 80256ee7d557Smrg 80266ee7d557Smrg # save warnings/boilerplate of simple test code 80276ee7d557Smrg _LT_COMPILER_BOILERPLATE 80286ee7d557Smrg _LT_LINKER_BOILERPLATE 80296ee7d557Smrg 80306ee7d557Smrg # Allow CC to be a program name with arguments. 80316ee7d557Smrg lt_save_CC=$CC 80326ee7d557Smrg lt_save_GCC=$GCC 80336ee7d557Smrg lt_save_CFLAGS=$CFLAGS 80346ee7d557Smrg CC=${FC-"f95"} 80356ee7d557Smrg CFLAGS=$FCFLAGS 80366ee7d557Smrg compiler=$CC 80376ee7d557Smrg GCC=$ac_cv_fc_compiler_gnu 80386ee7d557Smrg 80396ee7d557Smrg _LT_TAGVAR(compiler, $1)=$CC 80406ee7d557Smrg _LT_CC_BASENAME([$compiler]) 80416ee7d557Smrg 80426ee7d557Smrg if test -n "$compiler"; then 80436ee7d557Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 80446ee7d557Smrg AC_MSG_RESULT([$can_build_shared]) 80456ee7d557Smrg 80466ee7d557Smrg AC_MSG_CHECKING([whether to build shared libraries]) 80476ee7d557Smrg test no = "$can_build_shared" && enable_shared=no 80486ee7d557Smrg 80496ee7d557Smrg # On AIX, shared libraries and static libraries use the same namespace, and 80506ee7d557Smrg # are all built from PIC. 80516ee7d557Smrg case $host_os in 80526ee7d557Smrg aix3*) 80536ee7d557Smrg test yes = "$enable_shared" && enable_static=no 80546ee7d557Smrg if test -n "$RANLIB"; then 80556ee7d557Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 80566ee7d557Smrg postinstall_cmds='$RANLIB $lib' 80576ee7d557Smrg fi 80586ee7d557Smrg ;; 80596ee7d557Smrg aix[[4-9]]*) 80606ee7d557Smrg if test ia64 != "$host_cpu"; then 80616ee7d557Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 80626ee7d557Smrg yes,aix,yes) ;; # shared object as lib.so file only 80636ee7d557Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 80646ee7d557Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 80656ee7d557Smrg esac 80666ee7d557Smrg fi 80676ee7d557Smrg ;; 80686ee7d557Smrg esac 80696ee7d557Smrg AC_MSG_RESULT([$enable_shared]) 80706ee7d557Smrg 80716ee7d557Smrg AC_MSG_CHECKING([whether to build static libraries]) 80726ee7d557Smrg # Make sure either enable_shared or enable_static is yes. 80736ee7d557Smrg test yes = "$enable_shared" || enable_static=yes 80746ee7d557Smrg AC_MSG_RESULT([$enable_static]) 80756ee7d557Smrg 80766ee7d557Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 80776ee7d557Smrg _LT_TAGVAR(LD, $1)=$LD 80786ee7d557Smrg 80796ee7d557Smrg ## CAVEAT EMPTOR: 80806ee7d557Smrg ## There is no encapsulation within the following macros, do not change 80816ee7d557Smrg ## the running order or otherwise move them around unless you know exactly 80826ee7d557Smrg ## what you are doing... 80836ee7d557Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 80846ee7d557Smrg _LT_COMPILER_PIC($1) 80856ee7d557Smrg _LT_COMPILER_C_O($1) 80866ee7d557Smrg _LT_COMPILER_FILE_LOCKS($1) 80876ee7d557Smrg _LT_LINKER_SHLIBS($1) 80886ee7d557Smrg _LT_SYS_DYNAMIC_LINKER($1) 80896ee7d557Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80906ee7d557Smrg 80916ee7d557Smrg _LT_CONFIG($1) 80926ee7d557Smrg fi # test -n "$compiler" 80936ee7d557Smrg 80946ee7d557Smrg GCC=$lt_save_GCC 80956ee7d557Smrg CC=$lt_save_CC 80966ee7d557Smrg CFLAGS=$lt_save_CFLAGS 80976ee7d557Smrgfi # test yes != "$_lt_disable_FC" 80986ee7d557Smrg 80996ee7d557SmrgAC_LANG_POP 81006ee7d557Smrg])# _LT_LANG_FC_CONFIG 81016ee7d557Smrg 81026ee7d557Smrg 81036ee7d557Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 81046ee7d557Smrg# -------------------------- 81056ee7d557Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 81066ee7d557Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 81076ee7d557Smrg# to write the compiler configuration to 'libtool'. 81086ee7d557Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 81096ee7d557Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 81106ee7d557SmrgAC_LANG_SAVE 81116ee7d557Smrg 81126ee7d557Smrg# Source file extension for Java test sources. 81136ee7d557Smrgac_ext=java 81146ee7d557Smrg 81156ee7d557Smrg# Object file extension for compiled Java test sources. 81166ee7d557Smrgobjext=o 81176ee7d557Smrg_LT_TAGVAR(objext, $1)=$objext 81186ee7d557Smrg 81196ee7d557Smrg# Code to be used in simple compile tests 81206ee7d557Smrglt_simple_compile_test_code="class foo {}" 81216ee7d557Smrg 81226ee7d557Smrg# Code to be used in simple link tests 81236ee7d557Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 81246ee7d557Smrg 81256ee7d557Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 81266ee7d557Smrg_LT_TAG_COMPILER 81276ee7d557Smrg 81286ee7d557Smrg# save warnings/boilerplate of simple test code 81296ee7d557Smrg_LT_COMPILER_BOILERPLATE 81306ee7d557Smrg_LT_LINKER_BOILERPLATE 81316ee7d557Smrg 81326ee7d557Smrg# Allow CC to be a program name with arguments. 81336ee7d557Smrglt_save_CC=$CC 81346ee7d557Smrglt_save_CFLAGS=$CFLAGS 81356ee7d557Smrglt_save_GCC=$GCC 81366ee7d557SmrgGCC=yes 81376ee7d557SmrgCC=${GCJ-"gcj"} 81386ee7d557SmrgCFLAGS=$GCJFLAGS 81396ee7d557Smrgcompiler=$CC 81406ee7d557Smrg_LT_TAGVAR(compiler, $1)=$CC 81416ee7d557Smrg_LT_TAGVAR(LD, $1)=$LD 81426ee7d557Smrg_LT_CC_BASENAME([$compiler]) 81436ee7d557Smrg 81446ee7d557Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 81456ee7d557Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 81466ee7d557Smrg 81476ee7d557Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 81486ee7d557Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 81496ee7d557Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 81506ee7d557Smrg 81516ee7d557Smrg## CAVEAT EMPTOR: 81526ee7d557Smrg## There is no encapsulation within the following macros, do not change 81536ee7d557Smrg## the running order or otherwise move them around unless you know exactly 81546ee7d557Smrg## what you are doing... 81556ee7d557Smrgif test -n "$compiler"; then 81566ee7d557Smrg _LT_COMPILER_NO_RTTI($1) 81576ee7d557Smrg _LT_COMPILER_PIC($1) 81586ee7d557Smrg _LT_COMPILER_C_O($1) 81596ee7d557Smrg _LT_COMPILER_FILE_LOCKS($1) 81606ee7d557Smrg _LT_LINKER_SHLIBS($1) 81616ee7d557Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 81626ee7d557Smrg 81636ee7d557Smrg _LT_CONFIG($1) 81646ee7d557Smrgfi 81656ee7d557Smrg 81666ee7d557SmrgAC_LANG_RESTORE 81676ee7d557Smrg 81686ee7d557SmrgGCC=$lt_save_GCC 81696ee7d557SmrgCC=$lt_save_CC 81706ee7d557SmrgCFLAGS=$lt_save_CFLAGS 81716ee7d557Smrg])# _LT_LANG_GCJ_CONFIG 81726ee7d557Smrg 81736ee7d557Smrg 81746ee7d557Smrg# _LT_LANG_GO_CONFIG([TAG]) 81756ee7d557Smrg# -------------------------- 81766ee7d557Smrg# Ensure that the configuration variables for the GNU Go compiler 81776ee7d557Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 81786ee7d557Smrg# to write the compiler configuration to 'libtool'. 81796ee7d557Smrgm4_defun([_LT_LANG_GO_CONFIG], 81806ee7d557Smrg[AC_REQUIRE([LT_PROG_GO])dnl 81816ee7d557SmrgAC_LANG_SAVE 81826ee7d557Smrg 81836ee7d557Smrg# Source file extension for Go test sources. 81846ee7d557Smrgac_ext=go 81856ee7d557Smrg 81866ee7d557Smrg# Object file extension for compiled Go test sources. 81876ee7d557Smrgobjext=o 81886ee7d557Smrg_LT_TAGVAR(objext, $1)=$objext 81896ee7d557Smrg 81906ee7d557Smrg# Code to be used in simple compile tests 81916ee7d557Smrglt_simple_compile_test_code="package main; func main() { }" 81926ee7d557Smrg 81936ee7d557Smrg# Code to be used in simple link tests 81946ee7d557Smrglt_simple_link_test_code='package main; func main() { }' 81956ee7d557Smrg 81966ee7d557Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 81976ee7d557Smrg_LT_TAG_COMPILER 81986ee7d557Smrg 81996ee7d557Smrg# save warnings/boilerplate of simple test code 82006ee7d557Smrg_LT_COMPILER_BOILERPLATE 82016ee7d557Smrg_LT_LINKER_BOILERPLATE 82026ee7d557Smrg 82036ee7d557Smrg# Allow CC to be a program name with arguments. 82046ee7d557Smrglt_save_CC=$CC 82056ee7d557Smrglt_save_CFLAGS=$CFLAGS 82066ee7d557Smrglt_save_GCC=$GCC 82076ee7d557SmrgGCC=yes 82086ee7d557SmrgCC=${GOC-"gccgo"} 82096ee7d557SmrgCFLAGS=$GOFLAGS 82106ee7d557Smrgcompiler=$CC 82116ee7d557Smrg_LT_TAGVAR(compiler, $1)=$CC 82126ee7d557Smrg_LT_TAGVAR(LD, $1)=$LD 82136ee7d557Smrg_LT_CC_BASENAME([$compiler]) 82146ee7d557Smrg 82156ee7d557Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 82166ee7d557Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 82176ee7d557Smrg 82186ee7d557Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 82196ee7d557Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 82206ee7d557Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 82216ee7d557Smrg 82226ee7d557Smrg## CAVEAT EMPTOR: 82236ee7d557Smrg## There is no encapsulation within the following macros, do not change 82246ee7d557Smrg## the running order or otherwise move them around unless you know exactly 82256ee7d557Smrg## what you are doing... 82266ee7d557Smrgif test -n "$compiler"; then 82276ee7d557Smrg _LT_COMPILER_NO_RTTI($1) 82286ee7d557Smrg _LT_COMPILER_PIC($1) 82296ee7d557Smrg _LT_COMPILER_C_O($1) 82306ee7d557Smrg _LT_COMPILER_FILE_LOCKS($1) 82316ee7d557Smrg _LT_LINKER_SHLIBS($1) 82326ee7d557Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 82336ee7d557Smrg 82346ee7d557Smrg _LT_CONFIG($1) 82356ee7d557Smrgfi 82366ee7d557Smrg 82376ee7d557SmrgAC_LANG_RESTORE 82386ee7d557Smrg 82396ee7d557SmrgGCC=$lt_save_GCC 82406ee7d557SmrgCC=$lt_save_CC 82416ee7d557SmrgCFLAGS=$lt_save_CFLAGS 82426ee7d557Smrg])# _LT_LANG_GO_CONFIG 82436ee7d557Smrg 82446ee7d557Smrg 82456ee7d557Smrg# _LT_LANG_RC_CONFIG([TAG]) 82466ee7d557Smrg# ------------------------- 82476ee7d557Smrg# Ensure that the configuration variables for the Windows resource compiler 82486ee7d557Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 82496ee7d557Smrg# to write the compiler configuration to 'libtool'. 82506ee7d557Smrgm4_defun([_LT_LANG_RC_CONFIG], 82516ee7d557Smrg[AC_REQUIRE([LT_PROG_RC])dnl 82526ee7d557SmrgAC_LANG_SAVE 82536ee7d557Smrg 82546ee7d557Smrg# Source file extension for RC test sources. 82556ee7d557Smrgac_ext=rc 82566ee7d557Smrg 82576ee7d557Smrg# Object file extension for compiled RC test sources. 82586ee7d557Smrgobjext=o 82596ee7d557Smrg_LT_TAGVAR(objext, $1)=$objext 82606ee7d557Smrg 82616ee7d557Smrg# Code to be used in simple compile tests 82626ee7d557Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 82636ee7d557Smrg 82646ee7d557Smrg# Code to be used in simple link tests 82656ee7d557Smrglt_simple_link_test_code=$lt_simple_compile_test_code 82666ee7d557Smrg 82676ee7d557Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 82686ee7d557Smrg_LT_TAG_COMPILER 82696ee7d557Smrg 82706ee7d557Smrg# save warnings/boilerplate of simple test code 82716ee7d557Smrg_LT_COMPILER_BOILERPLATE 82726ee7d557Smrg_LT_LINKER_BOILERPLATE 82736ee7d557Smrg 82746ee7d557Smrg# Allow CC to be a program name with arguments. 82756ee7d557Smrglt_save_CC=$CC 82766ee7d557Smrglt_save_CFLAGS=$CFLAGS 82776ee7d557Smrglt_save_GCC=$GCC 82786ee7d557SmrgGCC= 82796ee7d557SmrgCC=${RC-"windres"} 82806ee7d557SmrgCFLAGS= 82816ee7d557Smrgcompiler=$CC 82826ee7d557Smrg_LT_TAGVAR(compiler, $1)=$CC 82836ee7d557Smrg_LT_CC_BASENAME([$compiler]) 82846ee7d557Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 82856ee7d557Smrg 82866ee7d557Smrgif test -n "$compiler"; then 82876ee7d557Smrg : 82886ee7d557Smrg _LT_CONFIG($1) 82896ee7d557Smrgfi 82906ee7d557Smrg 82916ee7d557SmrgGCC=$lt_save_GCC 82926ee7d557SmrgAC_LANG_RESTORE 82936ee7d557SmrgCC=$lt_save_CC 82946ee7d557SmrgCFLAGS=$lt_save_CFLAGS 82956ee7d557Smrg])# _LT_LANG_RC_CONFIG 82966ee7d557Smrg 82976ee7d557Smrg 82986ee7d557Smrg# LT_PROG_GCJ 82996ee7d557Smrg# ----------- 83006ee7d557SmrgAC_DEFUN([LT_PROG_GCJ], 83016ee7d557Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 83026ee7d557Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 83036ee7d557Smrg [AC_CHECK_TOOL(GCJ, gcj,) 83046ee7d557Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 83056ee7d557Smrg AC_SUBST(GCJFLAGS)])])[]dnl 83066ee7d557Smrg]) 83076ee7d557Smrg 83086ee7d557Smrg# Old name: 83096ee7d557SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 83106ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 83116ee7d557Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 83126ee7d557Smrg 83136ee7d557Smrg 83146ee7d557Smrg# LT_PROG_GO 83156ee7d557Smrg# ---------- 83166ee7d557SmrgAC_DEFUN([LT_PROG_GO], 83176ee7d557Smrg[AC_CHECK_TOOL(GOC, gccgo,) 83186ee7d557Smrg]) 83196ee7d557Smrg 83206ee7d557Smrg 83216ee7d557Smrg# LT_PROG_RC 83226ee7d557Smrg# ---------- 83236ee7d557SmrgAC_DEFUN([LT_PROG_RC], 83246ee7d557Smrg[AC_CHECK_TOOL(RC, windres,) 83256ee7d557Smrg]) 83266ee7d557Smrg 83276ee7d557Smrg# Old name: 83286ee7d557SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 83296ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 83306ee7d557Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 83316ee7d557Smrg 83326ee7d557Smrg 83336ee7d557Smrg# _LT_DECL_EGREP 83346ee7d557Smrg# -------------- 83356ee7d557Smrg# If we don't have a new enough Autoconf to choose the best grep 83366ee7d557Smrg# available, choose the one first in the user's PATH. 83376ee7d557Smrgm4_defun([_LT_DECL_EGREP], 83386ee7d557Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 83396ee7d557SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 83406ee7d557Smrgtest -z "$GREP" && GREP=grep 83416ee7d557Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 83426ee7d557Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 83436ee7d557Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 83446ee7d557Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 83456ee7d557SmrgAC_SUBST([GREP]) 83466ee7d557Smrg]) 83476ee7d557Smrg 83486ee7d557Smrg 83496ee7d557Smrg# _LT_DECL_OBJDUMP 83506ee7d557Smrg# -------------- 83516ee7d557Smrg# If we don't have a new enough Autoconf to choose the best objdump 83526ee7d557Smrg# available, choose the one first in the user's PATH. 83536ee7d557Smrgm4_defun([_LT_DECL_OBJDUMP], 83546ee7d557Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 83556ee7d557Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 83566ee7d557Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 83576ee7d557SmrgAC_SUBST([OBJDUMP]) 83586ee7d557Smrg]) 83596ee7d557Smrg 83606ee7d557Smrg# _LT_DECL_DLLTOOL 83616ee7d557Smrg# ---------------- 83626ee7d557Smrg# Ensure DLLTOOL variable is set. 83636ee7d557Smrgm4_defun([_LT_DECL_DLLTOOL], 83646ee7d557Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 83656ee7d557Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 83666ee7d557Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 83676ee7d557SmrgAC_SUBST([DLLTOOL]) 83686ee7d557Smrg]) 83696ee7d557Smrg 83706ee7d557Smrg# _LT_DECL_FILECMD 83716ee7d557Smrg# ---------------- 83726ee7d557Smrg# Check for a file(cmd) program that can be used to detect file type and magic 83736ee7d557Smrgm4_defun([_LT_DECL_FILECMD], 83746ee7d557Smrg[AC_CHECK_PROG([FILECMD], [file], [file], [:]) 83756ee7d557Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 83766ee7d557Smrg])# _LD_DECL_FILECMD 83776ee7d557Smrg 83786ee7d557Smrg# _LT_DECL_SED 83796ee7d557Smrg# ------------ 83806ee7d557Smrg# Check for a fully-functional sed program, that truncates 83816ee7d557Smrg# as few characters as possible. Prefer GNU sed if found. 83826ee7d557Smrgm4_defun([_LT_DECL_SED], 83836ee7d557Smrg[AC_PROG_SED 83846ee7d557Smrgtest -z "$SED" && SED=sed 83856ee7d557SmrgXsed="$SED -e 1s/^X//" 83866ee7d557Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 83876ee7d557Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 83886ee7d557Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 83896ee7d557Smrg])# _LT_DECL_SED 83906ee7d557Smrgdnl aclocal-1.4 backwards compatibility: 83916ee7d557Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 83926ee7d557Smrg 83936ee7d557Smrg 83946ee7d557Smrg# _LT_CHECK_SHELL_FEATURES 83956ee7d557Smrg# ------------------------ 83966ee7d557Smrg# Find out whether the shell is Bourne or XSI compatible, 83976ee7d557Smrg# or has some other useful features. 83986ee7d557Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 83996ee7d557Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 84006ee7d557Smrg lt_unset=unset 84016ee7d557Smrgelse 84026ee7d557Smrg lt_unset=false 84036ee7d557Smrgfi 84046ee7d557Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 84056ee7d557Smrg 84066ee7d557Smrg# test EBCDIC or ASCII 84076ee7d557Smrgcase `echo X|tr X '\101'` in 84086ee7d557Smrg A) # ASCII based system 84096ee7d557Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 84106ee7d557Smrg lt_SP2NL='tr \040 \012' 84116ee7d557Smrg lt_NL2SP='tr \015\012 \040\040' 84126ee7d557Smrg ;; 84136ee7d557Smrg *) # EBCDIC based system 84146ee7d557Smrg lt_SP2NL='tr \100 \n' 84156ee7d557Smrg lt_NL2SP='tr \r\n \100\100' 84166ee7d557Smrg ;; 84176ee7d557Smrgesac 84186ee7d557Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 84196ee7d557Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 84206ee7d557Smrg])# _LT_CHECK_SHELL_FEATURES 84216ee7d557Smrg 84226ee7d557Smrg 84236ee7d557Smrg# _LT_PATH_CONVERSION_FUNCTIONS 84246ee7d557Smrg# ----------------------------- 84256ee7d557Smrg# Determine what file name conversion functions should be used by 84266ee7d557Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 84276ee7d557Smrg# for certain cross-compile configurations and native mingw. 84286ee7d557Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 84296ee7d557Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 84306ee7d557SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 84316ee7d557SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 84326ee7d557SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 84336ee7d557Smrg[case $host in 84346ee7d557Smrg *-*-mingw* ) 84356ee7d557Smrg case $build in 84366ee7d557Smrg *-*-mingw* | *-*-windows* ) # actually msys 84376ee7d557Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 84386ee7d557Smrg ;; 84396ee7d557Smrg *-*-cygwin* ) 84406ee7d557Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 84416ee7d557Smrg ;; 84426ee7d557Smrg * ) # otherwise, assume *nix 84436ee7d557Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 84446ee7d557Smrg ;; 84456ee7d557Smrg esac 84466ee7d557Smrg ;; 84476ee7d557Smrg *-*-cygwin* ) 84486ee7d557Smrg case $build in 84496ee7d557Smrg *-*-mingw* | *-*-windows* ) # actually msys 84506ee7d557Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 84516ee7d557Smrg ;; 84526ee7d557Smrg *-*-cygwin* ) 84536ee7d557Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 84546ee7d557Smrg ;; 84556ee7d557Smrg * ) # otherwise, assume *nix 84566ee7d557Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 84576ee7d557Smrg ;; 84586ee7d557Smrg esac 84596ee7d557Smrg ;; 84606ee7d557Smrg * ) # unhandled hosts (and "normal" native builds) 84616ee7d557Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 84626ee7d557Smrg ;; 84636ee7d557Smrgesac 84646ee7d557Smrg]) 84656ee7d557Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 84666ee7d557SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 84676ee7d557Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 84686ee7d557Smrg [0], [convert $build file names to $host format])dnl 84696ee7d557Smrg 84706ee7d557SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 84716ee7d557SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 84726ee7d557Smrg[#assume ordinary cross tools, or native build. 84736ee7d557Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 84746ee7d557Smrgcase $host in 84756ee7d557Smrg *-*-mingw* | *-*-windows* ) 84766ee7d557Smrg case $build in 84776ee7d557Smrg *-*-mingw* | *-*-windows* ) # actually msys 84786ee7d557Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 84796ee7d557Smrg ;; 84806ee7d557Smrg esac 84816ee7d557Smrg ;; 84826ee7d557Smrgesac 84836ee7d557Smrg]) 84846ee7d557Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 84856ee7d557SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 84866ee7d557Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 84876ee7d557Smrg [0], [convert $build files to toolchain format])dnl 84886ee7d557Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8489