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