15b16253fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 25b16253fSmrg# 35b16253fSmrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 45b16253fSmrg# Foundation, Inc. 55b16253fSmrg# Written by Gordon Matzigkeit, 1996 65b16253fSmrg# 75b16253fSmrg# This file is free software; the Free Software Foundation gives 85b16253fSmrg# unlimited permission to copy and/or distribute it, with or without 95b16253fSmrg# modifications, as long as this notice is preserved. 105b16253fSmrg 115b16253fSmrgm4_define([_LT_COPYING], [dnl 125b16253fSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 135b16253fSmrg# This is free software; see the source for copying conditions. There is NO 145b16253fSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 155b16253fSmrg 165b16253fSmrg# GNU Libtool is free software; you can redistribute it and/or modify 175b16253fSmrg# it under the terms of the GNU General Public License as published by 185b16253fSmrg# the Free Software Foundation; either version 2 of of the License, or 195b16253fSmrg# (at your option) any later version. 205b16253fSmrg# 215b16253fSmrg# As a special exception to the GNU General Public License, if you 225b16253fSmrg# distribute this file as part of a program or library that is built 235b16253fSmrg# using GNU Libtool, you may include this file under the same 245b16253fSmrg# distribution terms that you use for the rest of that program. 255b16253fSmrg# 265b16253fSmrg# GNU Libtool is distributed in the hope that it will be useful, but 275b16253fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 285b16253fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 295b16253fSmrg# GNU General Public License for more details. 305b16253fSmrg# 315b16253fSmrg# You should have received a copy of the GNU General Public License 325b16253fSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 335b16253fSmrg]) 345b16253fSmrg 355b16253fSmrg# serial 59 LT_INIT 365b16253fSmrg 375b16253fSmrg 385b16253fSmrg# LT_PREREQ(VERSION) 395b16253fSmrg# ------------------ 405b16253fSmrg# Complain and exit if this libtool version is less that VERSION. 415b16253fSmrgm4_defun([LT_PREREQ], 425b16253fSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 435b16253fSmrg [m4_default([$3], 445b16253fSmrg [m4_fatal([Libtool version $1 or higher is required], 455b16253fSmrg 63)])], 465b16253fSmrg [$2])]) 475b16253fSmrg 485b16253fSmrg 495b16253fSmrg# _LT_CHECK_BUILDDIR 505b16253fSmrg# ------------------ 515b16253fSmrg# Complain if the absolute build directory name contains unusual characters 525b16253fSmrgm4_defun([_LT_CHECK_BUILDDIR], 535b16253fSmrg[case `pwd` in 545b16253fSmrg *\ * | *\ *) 555b16253fSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 565b16253fSmrgesac 575b16253fSmrg]) 585b16253fSmrg 595b16253fSmrg 605b16253fSmrg# LT_INIT([OPTIONS]) 615b16253fSmrg# ------------------ 625b16253fSmrgAC_DEFUN([LT_INIT], 635b16253fSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 645b16253fSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 655b16253fSmrgAC_BEFORE([$0], [LT_LANG])dnl 665b16253fSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 675b16253fSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 685b16253fSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 695b16253fSmrg 705b16253fSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 715b16253fSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 725b16253fSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 735b16253fSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 745b16253fSmrgdnl unless we require an AC_DEFUNed macro: 755b16253fSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 765b16253fSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 775b16253fSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 785b16253fSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 795b16253fSmrgm4_require([_LT_PROG_LTMAIN])dnl 805b16253fSmrg 815b16253fSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 825b16253fSmrg 835b16253fSmrgdnl Parse OPTIONS 845b16253fSmrg_LT_SET_OPTIONS([$0], [$1]) 855b16253fSmrg 865b16253fSmrg# This can be used to rebuild libtool when needed 875b16253fSmrgLIBTOOL_DEPS=$ltmain 885b16253fSmrg 895b16253fSmrg# Always use our own libtool. 905b16253fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 915b16253fSmrgAC_SUBST(LIBTOOL)dnl 925b16253fSmrg 935b16253fSmrg_LT_SETUP 945b16253fSmrg 955b16253fSmrg# Only expand once: 965b16253fSmrgm4_define([LT_INIT]) 975b16253fSmrg])# LT_INIT 985b16253fSmrg 995b16253fSmrg# Old names: 1005b16253fSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1015b16253fSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1025b16253fSmrgdnl aclocal-1.4 backwards compatibility: 1035b16253fSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1045b16253fSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1055b16253fSmrg 1065b16253fSmrg 1075b16253fSmrg# _LT_PREPARE_CC_BASENAME 1085b16253fSmrg# ----------------------- 1095b16253fSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 1105b16253fSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1115b16253fSmrgfunc_cc_basename () 1125b16253fSmrg{ 1135b16253fSmrg for cc_temp in @S|@*""; do 1145b16253fSmrg case $cc_temp in 1155b16253fSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1165b16253fSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1175b16253fSmrg \-*) ;; 1185b16253fSmrg *) break;; 1195b16253fSmrg esac 1205b16253fSmrg done 1215b16253fSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1225b16253fSmrg} 1235b16253fSmrg])# _LT_PREPARE_CC_BASENAME 1245b16253fSmrg 1255b16253fSmrg 1265b16253fSmrg# _LT_CC_BASENAME(CC) 1275b16253fSmrg# ------------------- 1285b16253fSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 1295b16253fSmrg# but that macro is also expanded into generated libtool script, which 1305b16253fSmrg# arranges for $SED and $ECHO to be set by different means. 1315b16253fSmrgm4_defun([_LT_CC_BASENAME], 1325b16253fSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 1335b16253fSmrgAC_REQUIRE([_LT_DECL_SED])dnl 1345b16253fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1355b16253fSmrgfunc_cc_basename $1 1365b16253fSmrgcc_basename=$func_cc_basename_result 1375b16253fSmrg]) 1385b16253fSmrg 1395b16253fSmrg 1405b16253fSmrg# _LT_FILEUTILS_DEFAULTS 1415b16253fSmrg# ---------------------- 1425b16253fSmrg# It is okay to use these file commands and assume they have been set 1435b16253fSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1445b16253fSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1455b16253fSmrg[: ${CP="cp -f"} 1465b16253fSmrg: ${MV="mv -f"} 1475b16253fSmrg: ${RM="rm -f"} 1485b16253fSmrg])# _LT_FILEUTILS_DEFAULTS 1495b16253fSmrg 1505b16253fSmrg 1515b16253fSmrg# _LT_SETUP 1525b16253fSmrg# --------- 1535b16253fSmrgm4_defun([_LT_SETUP], 1545b16253fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1555b16253fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1565b16253fSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1575b16253fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1585b16253fSmrg 1595b16253fSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 1605b16253fSmrgdnl 1615b16253fSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1625b16253fSmrg_LT_DECL([], [host], [0])dnl 1635b16253fSmrg_LT_DECL([], [host_os], [0])dnl 1645b16253fSmrgdnl 1655b16253fSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1665b16253fSmrg_LT_DECL([], [build], [0])dnl 1675b16253fSmrg_LT_DECL([], [build_os], [0])dnl 1685b16253fSmrgdnl 1695b16253fSmrgAC_REQUIRE([AC_PROG_CC])dnl 1705b16253fSmrgAC_REQUIRE([LT_PATH_LD])dnl 1715b16253fSmrgAC_REQUIRE([LT_PATH_NM])dnl 1725b16253fSmrgdnl 1735b16253fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1745b16253fSmrgtest -z "$LN_S" && LN_S="ln -s" 1755b16253fSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1765b16253fSmrgdnl 1775b16253fSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1785b16253fSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1795b16253fSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1805b16253fSmrgdnl 1815b16253fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1825b16253fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1835b16253fSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1845b16253fSmrgm4_require([_LT_CMD_RELOAD])dnl 1855b16253fSmrgm4_require([_LT_DECL_FILECMD])dnl 1865b16253fSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1875b16253fSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1885b16253fSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1895b16253fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1905b16253fSmrgm4_require([_LT_WITH_SYSROOT])dnl 1915b16253fSmrgm4_require([_LT_CMD_TRUNCATE])dnl 1925b16253fSmrg 1935b16253fSmrg_LT_CONFIG_LIBTOOL_INIT([ 1945b16253fSmrg# See if we are running on zsh, and set the options that allow our 1955b16253fSmrg# commands through without removal of \ escapes INIT. 1965b16253fSmrgif test -n "\${ZSH_VERSION+set}"; then 1975b16253fSmrg setopt NO_GLOB_SUBST 1985b16253fSmrgfi 1995b16253fSmrg]) 2005b16253fSmrgif test -n "${ZSH_VERSION+set}"; then 2015b16253fSmrg setopt NO_GLOB_SUBST 2025b16253fSmrgfi 2035b16253fSmrg 2045b16253fSmrg_LT_CHECK_OBJDIR 2055b16253fSmrg 2065b16253fSmrgm4_require([_LT_TAG_COMPILER])dnl 2075b16253fSmrg 2085b16253fSmrgcase $host_os in 2095b16253fSmrgaix3*) 2105b16253fSmrg # AIX sometimes has problems with the GCC collect2 program. For some 2115b16253fSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 2125b16253fSmrg # vanish in a puff of smoke. 2135b16253fSmrg if test set != "${COLLECT_NAMES+set}"; then 2145b16253fSmrg COLLECT_NAMES= 2155b16253fSmrg export COLLECT_NAMES 2165b16253fSmrg fi 2175b16253fSmrg ;; 2185b16253fSmrgesac 2195b16253fSmrg 2205b16253fSmrg# Global variables: 2215b16253fSmrgofile=libtool 2225b16253fSmrgcan_build_shared=yes 2235b16253fSmrg 2245b16253fSmrg# All known linkers require a '.a' archive for static linking (except MSVC and 2255b16253fSmrg# ICC, which need '.lib'). 2265b16253fSmrglibext=a 2275b16253fSmrg 2285b16253fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2295b16253fSmrg 2305b16253fSmrgold_CC=$CC 2315b16253fSmrgold_CFLAGS=$CFLAGS 2325b16253fSmrg 2335b16253fSmrg# Set sane defaults for various variables 2345b16253fSmrgtest -z "$CC" && CC=cc 2355b16253fSmrgtest -z "$LTCC" && LTCC=$CC 2365b16253fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2375b16253fSmrgtest -z "$LD" && LD=ld 2385b16253fSmrgtest -z "$ac_objext" && ac_objext=o 2395b16253fSmrg 2405b16253fSmrg_LT_CC_BASENAME([$compiler]) 2415b16253fSmrg 2425b16253fSmrg# Only perform the check for file, if the check method requires it 2435b16253fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2445b16253fSmrgcase $deplibs_check_method in 2455b16253fSmrgfile_magic*) 2465b16253fSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2475b16253fSmrg _LT_PATH_MAGIC 2485b16253fSmrg fi 2495b16253fSmrg ;; 2505b16253fSmrgesac 2515b16253fSmrg 2525b16253fSmrg# Use C for the default configuration in the libtool script 2535b16253fSmrgLT_SUPPORTED_TAG([CC]) 2545b16253fSmrg_LT_LANG_C_CONFIG 2555b16253fSmrg_LT_LANG_DEFAULT_CONFIG 2565b16253fSmrg_LT_CONFIG_COMMANDS 2575b16253fSmrg])# _LT_SETUP 2585b16253fSmrg 2595b16253fSmrg 2605b16253fSmrg# _LT_PREPARE_SED_QUOTE_VARS 2615b16253fSmrg# -------------------------- 2625b16253fSmrg# Define a few sed substitution that help us do robust quoting. 2635b16253fSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2645b16253fSmrg[# Backslashify metacharacters that are still active within 2655b16253fSmrg# double-quoted strings. 2665b16253fSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2675b16253fSmrg 2685b16253fSmrg# Same as above, but do not quote variable references. 2695b16253fSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2705b16253fSmrg 2715b16253fSmrg# Sed substitution to delay expansion of an escaped shell variable in a 2725b16253fSmrg# double_quote_subst'ed string. 2735b16253fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2745b16253fSmrg 2755b16253fSmrg# Sed substitution to delay expansion of an escaped single quote. 2765b16253fSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2775b16253fSmrg 2785b16253fSmrg# Sed substitution to avoid accidental globbing in evaled expressions 2795b16253fSmrgno_glob_subst='s/\*/\\\*/g' 2805b16253fSmrg]) 2815b16253fSmrg 2825b16253fSmrg# _LT_PROG_LTMAIN 2835b16253fSmrg# --------------- 2845b16253fSmrg# Note that this code is called both from 'configure', and 'config.status' 2855b16253fSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2865b16253fSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 2875b16253fSmrg# so we pass a copy along to make sure it has a sensible value anyway. 2885b16253fSmrgm4_defun([_LT_PROG_LTMAIN], 2895b16253fSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2905b16253fSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2915b16253fSmrgltmain=$ac_aux_dir/ltmain.sh 2925b16253fSmrg])# _LT_PROG_LTMAIN 2935b16253fSmrg 2945b16253fSmrg 2955b16253fSmrg## ------------------------------------- ## 2965b16253fSmrg## Accumulate code for creating libtool. ## 2975b16253fSmrg## ------------------------------------- ## 2985b16253fSmrg 2995b16253fSmrg# So that we can recreate a full libtool script including additional 3005b16253fSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3015b16253fSmrg# in macros and then make a single call at the end using the 'libtool' 3025b16253fSmrg# label. 3035b16253fSmrg 3045b16253fSmrg 3055b16253fSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3065b16253fSmrg# ---------------------------------------- 3075b16253fSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3085b16253fSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3095b16253fSmrg[m4_ifval([$1], 3105b16253fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3115b16253fSmrg [$1 3125b16253fSmrg])])]) 3135b16253fSmrg 3145b16253fSmrg# Initialize. 3155b16253fSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3165b16253fSmrg 3175b16253fSmrg 3185b16253fSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3195b16253fSmrg# ------------------------------ 3205b16253fSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3215b16253fSmrgm4_define([_LT_CONFIG_LIBTOOL], 3225b16253fSmrg[m4_ifval([$1], 3235b16253fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3245b16253fSmrg [$1 3255b16253fSmrg])])]) 3265b16253fSmrg 3275b16253fSmrg# Initialize. 3285b16253fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3295b16253fSmrg 3305b16253fSmrg 3315b16253fSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3325b16253fSmrg# ----------------------------------------------------- 3335b16253fSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3345b16253fSmrg[_LT_CONFIG_LIBTOOL([$1]) 3355b16253fSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3365b16253fSmrg]) 3375b16253fSmrg 3385b16253fSmrg 3395b16253fSmrg# _LT_FORMAT_COMMENT([COMMENT]) 3405b16253fSmrg# ----------------------------- 3415b16253fSmrg# Add leading comment marks to the start of each line, and a trailing 3425b16253fSmrg# full-stop to the whole comment if one is not present already. 3435b16253fSmrgm4_define([_LT_FORMAT_COMMENT], 3445b16253fSmrg[m4_ifval([$1], [ 3455b16253fSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3465b16253fSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3475b16253fSmrg)]) 3485b16253fSmrg 3495b16253fSmrg 3505b16253fSmrg 3515b16253fSmrg## ------------------------ ## 3525b16253fSmrg## FIXME: Eliminate VARNAME ## 3535b16253fSmrg## ------------------------ ## 3545b16253fSmrg 3555b16253fSmrg 3565b16253fSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3575b16253fSmrg# ------------------------------------------------------------------- 3585b16253fSmrg# CONFIGNAME is the name given to the value in the libtool script. 3595b16253fSmrg# VARNAME is the (base) name used in the configure script. 3605b16253fSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3615b16253fSmrg# VARNAME. Any other value will be used directly. 3625b16253fSmrgm4_define([_LT_DECL], 3635b16253fSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3645b16253fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3655b16253fSmrg [m4_ifval([$1], [$1], [$2])]) 3665b16253fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3675b16253fSmrg m4_ifval([$4], 3685b16253fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3695b16253fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 3705b16253fSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3715b16253fSmrg]) 3725b16253fSmrg 3735b16253fSmrg 3745b16253fSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3755b16253fSmrg# -------------------------------------------------------- 3765b16253fSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3775b16253fSmrg 3785b16253fSmrg 3795b16253fSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3805b16253fSmrg# ------------------------------------------------ 3815b16253fSmrgm4_define([lt_decl_tag_varnames], 3825b16253fSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 3835b16253fSmrg 3845b16253fSmrg 3855b16253fSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3865b16253fSmrg# --------------------------------------------------------- 3875b16253fSmrgm4_define([_lt_decl_filter], 3885b16253fSmrg[m4_case([$#], 3895b16253fSmrg [0], [m4_fatal([$0: too few arguments: $#])], 3905b16253fSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3915b16253fSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3925b16253fSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3935b16253fSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3945b16253fSmrg]) 3955b16253fSmrg 3965b16253fSmrg 3975b16253fSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3985b16253fSmrg# -------------------------------------------------- 3995b16253fSmrgm4_define([lt_decl_quote_varnames], 4005b16253fSmrg[_lt_decl_filter([value], [1], $@)]) 4015b16253fSmrg 4025b16253fSmrg 4035b16253fSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4045b16253fSmrg# --------------------------------------------------- 4055b16253fSmrgm4_define([lt_decl_dquote_varnames], 4065b16253fSmrg[_lt_decl_filter([value], [2], $@)]) 4075b16253fSmrg 4085b16253fSmrg 4095b16253fSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4105b16253fSmrg# --------------------------------------------------- 4115b16253fSmrgm4_define([lt_decl_varnames_tagged], 4125b16253fSmrg[m4_assert([$# <= 2])dnl 4135b16253fSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 4145b16253fSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4155b16253fSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4165b16253fSmrgm4_define([_lt_decl_varnames_tagged], 4175b16253fSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4185b16253fSmrg 4195b16253fSmrg 4205b16253fSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4215b16253fSmrg# ------------------------------------------------ 4225b16253fSmrgm4_define([lt_decl_all_varnames], 4235b16253fSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4245b16253fSmrg m4_if([$2], [], 4255b16253fSmrg m4_quote(lt_decl_varnames), 4265b16253fSmrg m4_quote(m4_shift($@))))[]dnl 4275b16253fSmrg]) 4285b16253fSmrgm4_define([_lt_decl_all_varnames], 4295b16253fSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 4305b16253fSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4315b16253fSmrg]) 4325b16253fSmrg 4335b16253fSmrg 4345b16253fSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4355b16253fSmrg# ------------------------------------ 4365b16253fSmrg# Quote a variable value, and forward it to 'config.status' so that its 4375b16253fSmrg# declaration there will have the same value as in 'configure'. VARNAME 4385b16253fSmrg# must have a single quote delimited value for this to work. 4395b16253fSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4405b16253fSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4415b16253fSmrg 4425b16253fSmrg 4435b16253fSmrg# _LT_CONFIG_STATUS_DECLARATIONS 4445b16253fSmrg# ------------------------------ 4455b16253fSmrg# We delimit libtool config variables with single quotes, so when 4465b16253fSmrg# we write them to config.status, we have to be sure to quote all 4475b16253fSmrg# embedded single quotes properly. In configure, this macro expands 4485b16253fSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4495b16253fSmrg# 4505b16253fSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4515b16253fSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4525b16253fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4535b16253fSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4545b16253fSmrg 4555b16253fSmrg 4565b16253fSmrg# _LT_LIBTOOL_TAGS 4575b16253fSmrg# ---------------- 4585b16253fSmrg# Output comment and list of tags supported by the script 4595b16253fSmrgm4_defun([_LT_LIBTOOL_TAGS], 4605b16253fSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4615b16253fSmrgavailable_tags='_LT_TAGS'dnl 4625b16253fSmrg]) 4635b16253fSmrg 4645b16253fSmrg 4655b16253fSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4665b16253fSmrg# ----------------------------------- 4675b16253fSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4685b16253fSmrg# expand to a commented shell variable setting: 4695b16253fSmrg# 4705b16253fSmrg# # Some comment about what VAR is for. 4715b16253fSmrg# visible_name=$lt_internal_name 4725b16253fSmrgm4_define([_LT_LIBTOOL_DECLARE], 4735b16253fSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4745b16253fSmrg [description])))[]dnl 4755b16253fSmrgm4_pushdef([_libtool_name], 4765b16253fSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4775b16253fSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4785b16253fSmrg [0], [_libtool_name=[$]$1], 4795b16253fSmrg [1], [_libtool_name=$lt_[]$1], 4805b16253fSmrg [2], [_libtool_name=$lt_[]$1], 4815b16253fSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4825b16253fSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4835b16253fSmrg]) 4845b16253fSmrg 4855b16253fSmrg 4865b16253fSmrg# _LT_LIBTOOL_CONFIG_VARS 4875b16253fSmrg# ----------------------- 4885b16253fSmrg# Produce commented declarations of non-tagged libtool config variables 4895b16253fSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 4905b16253fSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4915b16253fSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4925b16253fSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4935b16253fSmrg[m4_foreach([_lt_var], 4945b16253fSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4955b16253fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4965b16253fSmrg 4975b16253fSmrg 4985b16253fSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 4995b16253fSmrg# ------------------------- 5005b16253fSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 5015b16253fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5025b16253fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5035b16253fSmrg 5045b16253fSmrg 5055b16253fSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5065b16253fSmrg# ------------------------------ 5075b16253fSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5085b16253fSmrg 5095b16253fSmrg 5105b16253fSmrg# _LT_CONFIG_COMMANDS 5115b16253fSmrg# ------------------- 5125b16253fSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5135b16253fSmrg# variables for single and double quote escaping we saved from calls 5145b16253fSmrg# to _LT_DECL, we can put quote escaped variables declarations 5155b16253fSmrg# into 'config.status', and then the shell code to quote escape them in 5165b16253fSmrg# for loops in 'config.status'. Finally, any additional code accumulated 5175b16253fSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5185b16253fSmrgm4_defun([_LT_CONFIG_COMMANDS], 5195b16253fSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5205b16253fSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5215b16253fSmrg dnl instead of duplicating it all over again into config.status, 5225b16253fSmrg dnl then we will have config.status run $CONFIG_LT later, so it 5235b16253fSmrg dnl needs to know what name is stored there: 5245b16253fSmrg [AC_CONFIG_COMMANDS([libtool], 5255b16253fSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5265b16253fSmrg dnl If the libtool generation code is destined for config.status, 5275b16253fSmrg dnl expand the accumulated commands and init code now: 5285b16253fSmrg [AC_CONFIG_COMMANDS([libtool], 5295b16253fSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5305b16253fSmrg])#_LT_CONFIG_COMMANDS 5315b16253fSmrg 5325b16253fSmrg 5335b16253fSmrg# Initialize. 5345b16253fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5355b16253fSmrg[ 5365b16253fSmrg 5375b16253fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5385b16253fSmrg# if CDPATH is set. 5395b16253fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5405b16253fSmrg 5415b16253fSmrgsed_quote_subst='$sed_quote_subst' 5425b16253fSmrgdouble_quote_subst='$double_quote_subst' 5435b16253fSmrgdelay_variable_subst='$delay_variable_subst' 5445b16253fSmrg_LT_CONFIG_STATUS_DECLARATIONS 5455b16253fSmrgLTCC='$LTCC' 5465b16253fSmrgLTCFLAGS='$LTCFLAGS' 5475b16253fSmrgcompiler='$compiler_DEFAULT' 5485b16253fSmrg 5495b16253fSmrg# A function that is used when there is no print builtin or printf. 5505b16253fSmrgfunc_fallback_echo () 5515b16253fSmrg{ 5525b16253fSmrg eval 'cat <<_LTECHO_EOF 5535b16253fSmrg\$[]1 5545b16253fSmrg_LTECHO_EOF' 5555b16253fSmrg} 5565b16253fSmrg 5575b16253fSmrg# Quote evaled strings. 5585b16253fSmrgfor var in lt_decl_all_varnames([[ \ 5595b16253fSmrg]], lt_decl_quote_varnames); do 5605b16253fSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5615b16253fSmrg *[[\\\\\\\`\\"\\\$]]*) 5625b16253fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5635b16253fSmrg ;; 5645b16253fSmrg *) 5655b16253fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5665b16253fSmrg ;; 5675b16253fSmrg esac 5685b16253fSmrgdone 5695b16253fSmrg 5705b16253fSmrg# Double-quote double-evaled strings. 5715b16253fSmrgfor var in lt_decl_all_varnames([[ \ 5725b16253fSmrg]], lt_decl_dquote_varnames); do 5735b16253fSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5745b16253fSmrg *[[\\\\\\\`\\"\\\$]]*) 5755b16253fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5765b16253fSmrg ;; 5775b16253fSmrg *) 5785b16253fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5795b16253fSmrg ;; 5805b16253fSmrg esac 5815b16253fSmrgdone 5825b16253fSmrg 5835b16253fSmrg_LT_OUTPUT_LIBTOOL_INIT 5845b16253fSmrg]) 5855b16253fSmrg 5865b16253fSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 5875b16253fSmrg# ------------------------------------ 5885b16253fSmrg# Generate a child script FILE with all initialization necessary to 5895b16253fSmrg# reuse the environment learned by the parent script, and make the 5905b16253fSmrg# file executable. If COMMENT is supplied, it is inserted after the 5915b16253fSmrg# '#!' sequence but before initialization text begins. After this 5925b16253fSmrg# macro, additional text can be appended to FILE to form the body of 5935b16253fSmrg# the child script. The macro ends with non-zero status if the 5945b16253fSmrg# file could not be fully written (such as if the disk is full). 5955b16253fSmrgm4_ifdef([AS_INIT_GENERATED], 5965b16253fSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 5975b16253fSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 5985b16253fSmrg[m4_require([AS_PREPARE])]dnl 5995b16253fSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6005b16253fSmrg[lt_write_fail=0 6015b16253fSmrgcat >$1 <<_ASEOF || lt_write_fail=1 6025b16253fSmrg#! $SHELL 6035b16253fSmrg# Generated by $as_me. 6045b16253fSmrg$2 6055b16253fSmrgSHELL=\${CONFIG_SHELL-$SHELL} 6065b16253fSmrgexport SHELL 6075b16253fSmrg_ASEOF 6085b16253fSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6095b16253fSmrgAS_SHELL_SANITIZE 6105b16253fSmrg_AS_PREPARE 6115b16253fSmrgexec AS_MESSAGE_FD>&1 6125b16253fSmrg_ASEOF 6135b16253fSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 6145b16253fSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6155b16253fSmrg 6165b16253fSmrg# LT_OUTPUT 6175b16253fSmrg# --------- 6185b16253fSmrg# This macro allows early generation of the libtool script (before 6195b16253fSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 6205b16253fSmrg# tests. 6215b16253fSmrgAC_DEFUN([LT_OUTPUT], 6225b16253fSmrg[: ${CONFIG_LT=./config.lt} 6235b16253fSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6245b16253fSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6255b16253fSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 6265b16253fSmrg 6275b16253fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 6285b16253fSmrglt_cl_silent=false 6295b16253fSmrgexec AS_MESSAGE_LOG_FD>>config.log 6305b16253fSmrg{ 6315b16253fSmrg echo 6325b16253fSmrg AS_BOX([Running $as_me.]) 6335b16253fSmrg} >&AS_MESSAGE_LOG_FD 6345b16253fSmrg 6355b16253fSmrglt_cl_help="\ 6365b16253fSmrg'$as_me' creates a local libtool stub from the current configuration, 6375b16253fSmrgfor use in further configure time tests before the real libtool is 6385b16253fSmrggenerated. 6395b16253fSmrg 6405b16253fSmrgUsage: $[0] [[OPTIONS]] 6415b16253fSmrg 6425b16253fSmrg -h, --help print this help, then exit 6435b16253fSmrg -V, --version print version number, then exit 6445b16253fSmrg -q, --quiet do not print progress messages 6455b16253fSmrg -d, --debug don't remove temporary files 6465b16253fSmrg 6475b16253fSmrgReport bugs to <bug-libtool@gnu.org>." 6485b16253fSmrg 6495b16253fSmrglt_cl_version="\ 6505b16253fSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6515b16253fSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6525b16253fSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6535b16253fSmrg 6545b16253fSmrgCopyright (C) 2011 Free Software Foundation, Inc. 6555b16253fSmrgThis config.lt script is free software; the Free Software Foundation 6565b16253fSmrggives unlimited permision to copy, distribute and modify it." 6575b16253fSmrg 6585b16253fSmrgwhile test 0 != $[#] 6595b16253fSmrgdo 6605b16253fSmrg case $[1] in 6615b16253fSmrg --version | --v* | -V ) 6625b16253fSmrg echo "$lt_cl_version"; exit 0 ;; 6635b16253fSmrg --help | --h* | -h ) 6645b16253fSmrg echo "$lt_cl_help"; exit 0 ;; 6655b16253fSmrg --debug | --d* | -d ) 6665b16253fSmrg debug=: ;; 6675b16253fSmrg --quiet | --q* | --silent | --s* | -q ) 6685b16253fSmrg lt_cl_silent=: ;; 6695b16253fSmrg 6705b16253fSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6715b16253fSmrgTry '$[0] --help' for more information.]) ;; 6725b16253fSmrg 6735b16253fSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6745b16253fSmrgTry '$[0] --help' for more information.]) ;; 6755b16253fSmrg esac 6765b16253fSmrg shift 6775b16253fSmrgdone 6785b16253fSmrg 6795b16253fSmrgif $lt_cl_silent; then 6805b16253fSmrg exec AS_MESSAGE_FD>/dev/null 6815b16253fSmrgfi 6825b16253fSmrg_LTEOF 6835b16253fSmrg 6845b16253fSmrgcat >>"$CONFIG_LT" <<_LTEOF 6855b16253fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6865b16253fSmrg_LTEOF 6875b16253fSmrg 6885b16253fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 6895b16253fSmrgAC_MSG_NOTICE([creating $ofile]) 6905b16253fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 6915b16253fSmrgAS_EXIT(0) 6925b16253fSmrg_LTEOF 6935b16253fSmrgchmod +x "$CONFIG_LT" 6945b16253fSmrg 6955b16253fSmrg# configure is writing to config.log, but config.lt does its own redirection, 6965b16253fSmrg# appending to config.log, which fails on DOS, as config.log is still kept 6975b16253fSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 6985b16253fSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 6995b16253fSmrglt_cl_success=: 7005b16253fSmrgtest yes = "$silent" && 7015b16253fSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 7025b16253fSmrgexec AS_MESSAGE_LOG_FD>/dev/null 7035b16253fSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7045b16253fSmrgexec AS_MESSAGE_LOG_FD>>config.log 7055b16253fSmrg$lt_cl_success || AS_EXIT(1) 7065b16253fSmrg])# LT_OUTPUT 7075b16253fSmrg 7085b16253fSmrg 7095b16253fSmrg# _LT_CONFIG(TAG) 7105b16253fSmrg# --------------- 7115b16253fSmrg# If TAG is the built-in tag, create an initial libtool script with a 7125b16253fSmrg# default configuration from the untagged config vars. Otherwise add code 7135b16253fSmrg# to config.status for appending the configuration named by TAG from the 7145b16253fSmrg# matching tagged config vars. 7155b16253fSmrgm4_defun([_LT_CONFIG], 7165b16253fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7175b16253fSmrg_LT_CONFIG_SAVE_COMMANDS([ 7185b16253fSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7195b16253fSmrg m4_if(_LT_TAG, [C], [ 7205b16253fSmrg # See if we are running on zsh, and set the options that allow our 7215b16253fSmrg # commands through without removal of \ escapes. 7225b16253fSmrg if test -n "${ZSH_VERSION+set}"; then 7235b16253fSmrg setopt NO_GLOB_SUBST 7245b16253fSmrg fi 7255b16253fSmrg 7265b16253fSmrg cfgfile=${ofile}T 7275b16253fSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7285b16253fSmrg $RM "$cfgfile" 7295b16253fSmrg 7305b16253fSmrg cat <<_LT_EOF >> "$cfgfile" 7315b16253fSmrg#! $SHELL 7325b16253fSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 7335b16253fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7345b16253fSmrg 7355b16253fSmrg# Provide generalized library-building support services. 7365b16253fSmrg# Written by Gordon Matzigkeit, 1996 7375b16253fSmrg 7385b16253fSmrg_LT_COPYING 7395b16253fSmrg_LT_LIBTOOL_TAGS 7405b16253fSmrg 7415b16253fSmrg# Configured defaults for sys_lib_dlsearch_path munging. 7425b16253fSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 7435b16253fSmrg 7445b16253fSmrg# ### BEGIN LIBTOOL CONFIG 7455b16253fSmrg_LT_LIBTOOL_CONFIG_VARS 7465b16253fSmrg_LT_LIBTOOL_TAG_VARS 7475b16253fSmrg# ### END LIBTOOL CONFIG 7485b16253fSmrg 7495b16253fSmrg_LT_EOF 7505b16253fSmrg 7515b16253fSmrg cat <<'_LT_EOF' >> "$cfgfile" 7525b16253fSmrg 7535b16253fSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 7545b16253fSmrg 7555b16253fSmrg_LT_PREPARE_MUNGE_PATH_LIST 7565b16253fSmrg_LT_PREPARE_CC_BASENAME 7575b16253fSmrg 7585b16253fSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 7595b16253fSmrg 7605b16253fSmrg_LT_EOF 7615b16253fSmrg 7625b16253fSmrg case $host_os in 7635b16253fSmrg aix3*) 7645b16253fSmrg cat <<\_LT_EOF >> "$cfgfile" 7655b16253fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 7665b16253fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7675b16253fSmrg# vanish in a puff of smoke. 7685b16253fSmrgif test set != "${COLLECT_NAMES+set}"; then 7695b16253fSmrg COLLECT_NAMES= 7705b16253fSmrg export COLLECT_NAMES 7715b16253fSmrgfi 7725b16253fSmrg_LT_EOF 7735b16253fSmrg ;; 7745b16253fSmrg esac 7755b16253fSmrg 7765b16253fSmrg _LT_PROG_LTMAIN 7775b16253fSmrg 7785b16253fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 7795b16253fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7805b16253fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 7815b16253fSmrg # is reportedly fixed, but why not run on old versions too? 7825b16253fSmrg $SED '$q' "$ltmain" >> "$cfgfile" \ 7835b16253fSmrg || (rm -f "$cfgfile"; exit 1) 7845b16253fSmrg 7855b16253fSmrg mv -f "$cfgfile" "$ofile" || 7865b16253fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7875b16253fSmrg chmod +x "$ofile" 7885b16253fSmrg], 7895b16253fSmrg[cat <<_LT_EOF >> "$ofile" 7905b16253fSmrg 7915b16253fSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7925b16253fSmrgdnl in a comment (ie after a #). 7935b16253fSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7945b16253fSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7955b16253fSmrg# ### END LIBTOOL TAG CONFIG: $1 7965b16253fSmrg_LT_EOF 7975b16253fSmrg])dnl /m4_if 7985b16253fSmrg], 7995b16253fSmrg[m4_if([$1], [], [ 8005b16253fSmrg PACKAGE='$PACKAGE' 8015b16253fSmrg VERSION='$VERSION' 8025b16253fSmrg RM='$RM' 8035b16253fSmrg ofile='$ofile'], []) 8045b16253fSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 8055b16253fSmrg])# _LT_CONFIG 8065b16253fSmrg 8075b16253fSmrg 8085b16253fSmrg# LT_SUPPORTED_TAG(TAG) 8095b16253fSmrg# --------------------- 8105b16253fSmrg# Trace this macro to discover what tags are supported by the libtool 8115b16253fSmrg# --tag option, using: 8125b16253fSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8135b16253fSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8145b16253fSmrg 8155b16253fSmrg 8165b16253fSmrg# C support is built-in for now 8175b16253fSmrgm4_define([_LT_LANG_C_enabled], []) 8185b16253fSmrgm4_define([_LT_TAGS], []) 8195b16253fSmrg 8205b16253fSmrg 8215b16253fSmrg# LT_LANG(LANG) 8225b16253fSmrg# ------------- 8235b16253fSmrg# Enable libtool support for the given language if not already enabled. 8245b16253fSmrgAC_DEFUN([LT_LANG], 8255b16253fSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8265b16253fSmrgm4_case([$1], 8275b16253fSmrg [C], [_LT_LANG(C)], 8285b16253fSmrg [C++], [_LT_LANG(CXX)], 8295b16253fSmrg [Go], [_LT_LANG(GO)], 8305b16253fSmrg [Java], [_LT_LANG(GCJ)], 8315b16253fSmrg [Fortran 77], [_LT_LANG(F77)], 8325b16253fSmrg [Fortran], [_LT_LANG(FC)], 8335b16253fSmrg [Windows Resource], [_LT_LANG(RC)], 8345b16253fSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8355b16253fSmrg [_LT_LANG($1)], 8365b16253fSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8375b16253fSmrg])# LT_LANG 8385b16253fSmrg 8395b16253fSmrg 8405b16253fSmrg# _LT_LANG(LANGNAME) 8415b16253fSmrg# ------------------ 8425b16253fSmrgm4_defun([_LT_LANG], 8435b16253fSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8445b16253fSmrg [LT_SUPPORTED_TAG([$1])dnl 8455b16253fSmrg m4_append([_LT_TAGS], [$1 ])dnl 8465b16253fSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8475b16253fSmrg _LT_LANG_$1_CONFIG($1)])dnl 8485b16253fSmrg])# _LT_LANG 8495b16253fSmrg 8505b16253fSmrg 8515b16253fSmrgm4_ifndef([AC_PROG_GO], [ 8525b16253fSmrg############################################################ 8535b16253fSmrg# NOTE: This macro has been submitted for inclusion into # 8545b16253fSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 8555b16253fSmrg# a released version of Autoconf we should remove this # 8565b16253fSmrg# macro and use it instead. # 8575b16253fSmrg############################################################ 8585b16253fSmrgm4_defun([AC_PROG_GO], 8595b16253fSmrg[AC_LANG_PUSH(Go)dnl 8605b16253fSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 8615b16253fSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 8625b16253fSmrg_AC_ARG_VAR_LDFLAGS()dnl 8635b16253fSmrgAC_CHECK_TOOL(GOC, gccgo) 8645b16253fSmrgif test -z "$GOC"; then 8655b16253fSmrg if test -n "$ac_tool_prefix"; then 8665b16253fSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 8675b16253fSmrg fi 8685b16253fSmrgfi 8695b16253fSmrgif test -z "$GOC"; then 8705b16253fSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 8715b16253fSmrgfi 8725b16253fSmrg])#m4_defun 8735b16253fSmrg])#m4_ifndef 8745b16253fSmrg 8755b16253fSmrg 8765b16253fSmrg# _LT_LANG_DEFAULT_CONFIG 8775b16253fSmrg# ----------------------- 8785b16253fSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8795b16253fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8805b16253fSmrg [LT_LANG(CXX)], 8815b16253fSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8825b16253fSmrg 8835b16253fSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8845b16253fSmrg [LT_LANG(F77)], 8855b16253fSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8865b16253fSmrg 8875b16253fSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8885b16253fSmrg [LT_LANG(FC)], 8895b16253fSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8905b16253fSmrg 8915b16253fSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8925b16253fSmrgdnl pulling things in needlessly. 8935b16253fSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8945b16253fSmrg [LT_LANG(GCJ)], 8955b16253fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8965b16253fSmrg [LT_LANG(GCJ)], 8975b16253fSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8985b16253fSmrg [LT_LANG(GCJ)], 8995b16253fSmrg [m4_ifdef([AC_PROG_GCJ], 9005b16253fSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9015b16253fSmrg m4_ifdef([A][M_PROG_GCJ], 9025b16253fSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9035b16253fSmrg m4_ifdef([LT_PROG_GCJ], 9045b16253fSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 9055b16253fSmrg 9065b16253fSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 9075b16253fSmrg [LT_LANG(GO)], 9085b16253fSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 9095b16253fSmrg 9105b16253fSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9115b16253fSmrg [LT_LANG(RC)], 9125b16253fSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9135b16253fSmrg])# _LT_LANG_DEFAULT_CONFIG 9145b16253fSmrg 9155b16253fSmrg# Obsolete macros: 9165b16253fSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9175b16253fSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9185b16253fSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9195b16253fSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9205b16253fSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9215b16253fSmrgdnl aclocal-1.4 backwards compatibility: 9225b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9235b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9245b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9255b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9265b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9275b16253fSmrg 9285b16253fSmrg 9295b16253fSmrg# _LT_TAG_COMPILER 9305b16253fSmrg# ---------------- 9315b16253fSmrgm4_defun([_LT_TAG_COMPILER], 9325b16253fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 9335b16253fSmrg 9345b16253fSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9355b16253fSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9365b16253fSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9375b16253fSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9385b16253fSmrg 9395b16253fSmrg# If no C compiler was specified, use CC. 9405b16253fSmrgLTCC=${LTCC-"$CC"} 9415b16253fSmrg 9425b16253fSmrg# If no C compiler flags were specified, use CFLAGS. 9435b16253fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9445b16253fSmrg 9455b16253fSmrg# Allow CC to be a program name with arguments. 9465b16253fSmrgcompiler=$CC 9475b16253fSmrg])# _LT_TAG_COMPILER 9485b16253fSmrg 9495b16253fSmrg 9505b16253fSmrg# _LT_COMPILER_BOILERPLATE 9515b16253fSmrg# ------------------------ 9525b16253fSmrg# Check for compiler boilerplate output or warnings with 9535b16253fSmrg# the simple compiler test code. 9545b16253fSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 9555b16253fSmrg[m4_require([_LT_DECL_SED])dnl 9565b16253fSmrgac_outfile=conftest.$ac_objext 9575b16253fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9585b16253fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9595b16253fSmrg_lt_compiler_boilerplate=`cat conftest.err` 9605b16253fSmrg$RM conftest* 9615b16253fSmrg])# _LT_COMPILER_BOILERPLATE 9625b16253fSmrg 9635b16253fSmrg 9645b16253fSmrg# _LT_LINKER_BOILERPLATE 9655b16253fSmrg# ---------------------- 9665b16253fSmrg# Check for linker boilerplate output or warnings with 9675b16253fSmrg# the simple link test code. 9685b16253fSmrgm4_defun([_LT_LINKER_BOILERPLATE], 9695b16253fSmrg[m4_require([_LT_DECL_SED])dnl 9705b16253fSmrgac_outfile=conftest.$ac_objext 9715b16253fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9725b16253fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9735b16253fSmrg_lt_linker_boilerplate=`cat conftest.err` 9745b16253fSmrg$RM -r conftest* 9755b16253fSmrg])# _LT_LINKER_BOILERPLATE 9765b16253fSmrg 9775b16253fSmrg# _LT_REQUIRED_DARWIN_CHECKS 9785b16253fSmrg# ------------------------- 9795b16253fSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9805b16253fSmrg case $host_os in 9815b16253fSmrg rhapsody* | darwin*) 9825b16253fSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9835b16253fSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9845b16253fSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9855b16253fSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9865b16253fSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9875b16253fSmrg _LT_DECL([], [DSYMUTIL], [1], 9885b16253fSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9895b16253fSmrg _LT_DECL([], [NMEDIT], [1], 9905b16253fSmrg [Tool to change global to local symbols on Mac OS X]) 9915b16253fSmrg _LT_DECL([], [LIPO], [1], 9925b16253fSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 9935b16253fSmrg _LT_DECL([], [OTOOL], [1], 9945b16253fSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9955b16253fSmrg _LT_DECL([], [OTOOL64], [1], 9965b16253fSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9975b16253fSmrg 9985b16253fSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9995b16253fSmrg [lt_cv_apple_cc_single_mod=no 10005b16253fSmrg if test -z "$LT_MULTI_MODULE"; then 10015b16253fSmrg # By default we will add the -single_module flag. You can override 10025b16253fSmrg # by either setting the environment variable LT_MULTI_MODULE 10035b16253fSmrg # non-empty at configure time, or by adding -multi_module to the 10045b16253fSmrg # link flags. 10055b16253fSmrg rm -rf libconftest.dylib* 10065b16253fSmrg echo "int foo(void){return 1;}" > conftest.c 10075b16253fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10085b16253fSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10095b16253fSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10105b16253fSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10115b16253fSmrg _lt_result=$? 10125b16253fSmrg # If there is a non-empty error log, and "single_module" 10135b16253fSmrg # appears in it, assume the flag caused a linker warning 10145b16253fSmrg if test -s conftest.err && $GREP single_module conftest.err; then 10155b16253fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10165b16253fSmrg # Otherwise, if the output was created with a 0 exit code from 10175b16253fSmrg # the compiler, it worked. 10185b16253fSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10195b16253fSmrg lt_cv_apple_cc_single_mod=yes 10205b16253fSmrg else 10215b16253fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10225b16253fSmrg fi 10235b16253fSmrg rm -rf libconftest.dylib* 10245b16253fSmrg rm -f conftest.* 10255b16253fSmrg fi]) 10265b16253fSmrg 10275b16253fSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10285b16253fSmrg [lt_cv_ld_exported_symbols_list], 10295b16253fSmrg [lt_cv_ld_exported_symbols_list=no 10305b16253fSmrg save_LDFLAGS=$LDFLAGS 10315b16253fSmrg echo "_main" > conftest.sym 10325b16253fSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10335b16253fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10345b16253fSmrg [lt_cv_ld_exported_symbols_list=yes], 10355b16253fSmrg [lt_cv_ld_exported_symbols_list=no]) 10365b16253fSmrg LDFLAGS=$save_LDFLAGS 10375b16253fSmrg ]) 10385b16253fSmrg 10395b16253fSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10405b16253fSmrg [lt_cv_ld_force_load=no 10415b16253fSmrg cat > conftest.c << _LT_EOF 10425b16253fSmrgint forced_loaded() { return 2;} 10435b16253fSmrg_LT_EOF 10445b16253fSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10455b16253fSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10465b16253fSmrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10475b16253fSmrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10485b16253fSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10495b16253fSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10505b16253fSmrg cat > conftest.c << _LT_EOF 10515b16253fSmrgint main() { return 0;} 10525b16253fSmrg_LT_EOF 10535b16253fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10545b16253fSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10555b16253fSmrg _lt_result=$? 10565b16253fSmrg if test -s conftest.err && $GREP force_load conftest.err; then 10575b16253fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10585b16253fSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 10595b16253fSmrg lt_cv_ld_force_load=yes 10605b16253fSmrg else 10615b16253fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10625b16253fSmrg fi 10635b16253fSmrg rm -f conftest.err libconftest.a conftest conftest.c 10645b16253fSmrg rm -rf conftest.dSYM 10655b16253fSmrg ]) 10665b16253fSmrg case $host_os in 10675b16253fSmrg rhapsody* | darwin1.[[012]]) 10685b16253fSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 10695b16253fSmrg darwin1.*) 10705b16253fSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10715b16253fSmrg darwin*) 10725b16253fSmrg case $MACOSX_DEPLOYMENT_TARGET,$host in 10735b16253fSmrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 10745b16253fSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10755b16253fSmrg *) 10765b16253fSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10775b16253fSmrg esac 10785b16253fSmrg ;; 10795b16253fSmrg esac 10805b16253fSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 10815b16253fSmrg _lt_dar_single_mod='$single_module' 10825b16253fSmrg fi 10835b16253fSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 10845b16253fSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 10855b16253fSmrg else 10865b16253fSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 10875b16253fSmrg fi 10885b16253fSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 10895b16253fSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10905b16253fSmrg else 10915b16253fSmrg _lt_dsymutil= 10925b16253fSmrg fi 10935b16253fSmrg ;; 10945b16253fSmrg esac 10955b16253fSmrg]) 10965b16253fSmrg 10975b16253fSmrg 10985b16253fSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 10995b16253fSmrg# --------------------------------- 11005b16253fSmrg# Checks for linker and compiler features on darwin 11015b16253fSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 11025b16253fSmrg[ 11035b16253fSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11045b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11055b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 11065b16253fSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11075b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 11085b16253fSmrg if test yes = "$lt_cv_ld_force_load"; then 11095b16253fSmrg _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\"`' 11105b16253fSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 11115b16253fSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11125b16253fSmrg else 11135b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11145b16253fSmrg fi 11155b16253fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11165b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11175b16253fSmrg case $cc_basename in 11185b16253fSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11195b16253fSmrg *) _lt_dar_can_shared=$GCC ;; 11205b16253fSmrg esac 11215b16253fSmrg if test yes = "$_lt_dar_can_shared"; then 11225b16253fSmrg output_verbose_link_cmd=func_echo_all 11235b16253fSmrg _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" 11245b16253fSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 11255b16253fSmrg _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" 11265b16253fSmrg _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" 11275b16253fSmrg m4_if([$1], [CXX], 11285b16253fSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 11295b16253fSmrg _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" 11305b16253fSmrg _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" 11315b16253fSmrg fi 11325b16253fSmrg],[]) 11335b16253fSmrg else 11345b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 11355b16253fSmrg fi 11365b16253fSmrg]) 11375b16253fSmrg 11385b16253fSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11395b16253fSmrg# ---------------------------------- 11405b16253fSmrg# Links a minimal program and checks the executable 11415b16253fSmrg# for the system default hardcoded library path. In most cases, 11425b16253fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 11435b16253fSmrg# the location of the communication and MPI libs are included too. 11445b16253fSmrg# If we don't find anything, use the default library path according 11455b16253fSmrg# to the aix ld manual. 11465b16253fSmrg# Store the results from the different compilers for each TAGNAME. 11475b16253fSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 11485b16253fSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11495b16253fSmrg[m4_require([_LT_DECL_SED])dnl 11505b16253fSmrgif test set = "${lt_cv_aix_libpath+set}"; then 11515b16253fSmrg aix_libpath=$lt_cv_aix_libpath 11525b16253fSmrgelse 11535b16253fSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11545b16253fSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11555b16253fSmrg lt_aix_libpath_sed='[ 11565b16253fSmrg /Import File Strings/,/^$/ { 11575b16253fSmrg /^0/ { 11585b16253fSmrg s/^0 *\([^ ]*\) *$/\1/ 11595b16253fSmrg p 11605b16253fSmrg } 11615b16253fSmrg }]' 11625b16253fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11635b16253fSmrg # Check for a 64-bit object if we didn't find anything. 11645b16253fSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11655b16253fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11665b16253fSmrg fi],[]) 11675b16253fSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11685b16253fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 11695b16253fSmrg fi 11705b16253fSmrg ]) 11715b16253fSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11725b16253fSmrgfi 11735b16253fSmrg])# _LT_SYS_MODULE_PATH_AIX 11745b16253fSmrg 11755b16253fSmrg 11765b16253fSmrg# _LT_SHELL_INIT(ARG) 11775b16253fSmrg# ------------------- 11785b16253fSmrgm4_define([_LT_SHELL_INIT], 11795b16253fSmrg[m4_divert_text([M4SH-INIT], [$1 11805b16253fSmrg])])# _LT_SHELL_INIT 11815b16253fSmrg 11825b16253fSmrg 11835b16253fSmrg 11845b16253fSmrg# _LT_PROG_ECHO_BACKSLASH 11855b16253fSmrg# ----------------------- 11865b16253fSmrg# Find how we can fake an echo command that does not interpret backslash. 11875b16253fSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 11885b16253fSmrg# of the generated configure script that will find a shell with a builtin 11895b16253fSmrg# printf (that we can use as an echo command). 11905b16253fSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 11915b16253fSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 11925b16253fSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 11935b16253fSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 11945b16253fSmrg 11955b16253fSmrgAC_MSG_CHECKING([how to print strings]) 11965b16253fSmrg# Test print first, because it will be a builtin if present. 11975b16253fSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 11985b16253fSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 11995b16253fSmrg ECHO='print -r --' 12005b16253fSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 12015b16253fSmrg ECHO='printf %s\n' 12025b16253fSmrgelse 12035b16253fSmrg # Use this function as a fallback that always works. 12045b16253fSmrg func_fallback_echo () 12055b16253fSmrg { 12065b16253fSmrg eval 'cat <<_LTECHO_EOF 12075b16253fSmrg$[]1 12085b16253fSmrg_LTECHO_EOF' 12095b16253fSmrg } 12105b16253fSmrg ECHO='func_fallback_echo' 12115b16253fSmrgfi 12125b16253fSmrg 12135b16253fSmrg# func_echo_all arg... 12145b16253fSmrg# Invoke $ECHO with all args, space-separated. 12155b16253fSmrgfunc_echo_all () 12165b16253fSmrg{ 12175b16253fSmrg $ECHO "$*" 12185b16253fSmrg} 12195b16253fSmrg 12205b16253fSmrgcase $ECHO in 12215b16253fSmrg printf*) AC_MSG_RESULT([printf]) ;; 12225b16253fSmrg print*) AC_MSG_RESULT([print -r]) ;; 12235b16253fSmrg *) AC_MSG_RESULT([cat]) ;; 12245b16253fSmrgesac 12255b16253fSmrg 12265b16253fSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 12275b16253fSmrg[_AS_DETECT_SUGGESTED([ 12285b16253fSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12295b16253fSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12305b16253fSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12315b16253fSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12325b16253fSmrg PATH=/empty FPATH=/empty; export PATH FPATH 12335b16253fSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12345b16253fSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12355b16253fSmrg 12365b16253fSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12375b16253fSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12385b16253fSmrg])# _LT_PROG_ECHO_BACKSLASH 12395b16253fSmrg 12405b16253fSmrg 12415b16253fSmrg# _LT_WITH_SYSROOT 12425b16253fSmrg# ---------------- 12435b16253fSmrgAC_DEFUN([_LT_WITH_SYSROOT], 12445b16253fSmrg[m4_require([_LT_DECL_SED])dnl 12455b16253fSmrgAC_MSG_CHECKING([for sysroot]) 12465b16253fSmrgAC_ARG_WITH([sysroot], 12475b16253fSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 12485b16253fSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 12495b16253fSmrg if not specified).])], 12505b16253fSmrg[], [with_sysroot=no]) 12515b16253fSmrg 12525b16253fSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 12535b16253fSmrgdnl in case the user passed a directory name. 12545b16253fSmrglt_sysroot= 12555b16253fSmrgcase $with_sysroot in #( 12565b16253fSmrg yes) 12575b16253fSmrg if test yes = "$GCC"; then 12585b16253fSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12595b16253fSmrg fi 12605b16253fSmrg ;; #( 12615b16253fSmrg /*) 12625b16253fSmrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 12635b16253fSmrg ;; #( 12645b16253fSmrg no|'') 12655b16253fSmrg ;; #( 12665b16253fSmrg *) 12675b16253fSmrg AC_MSG_RESULT([$with_sysroot]) 12685b16253fSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12695b16253fSmrg ;; 12705b16253fSmrgesac 12715b16253fSmrg 12725b16253fSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12735b16253fSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 12745b16253fSmrg[dependent libraries, and where our libraries should be installed.])]) 12755b16253fSmrg 12765b16253fSmrg# _LT_ENABLE_LOCK 12775b16253fSmrg# --------------- 12785b16253fSmrgm4_defun([_LT_ENABLE_LOCK], 12795b16253fSmrg[AC_ARG_ENABLE([libtool-lock], 12805b16253fSmrg [AS_HELP_STRING([--disable-libtool-lock], 12815b16253fSmrg [avoid locking (might break parallel builds)])]) 12825b16253fSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 12835b16253fSmrg 12845b16253fSmrg# Some flags need to be propagated to the compiler or linker for good 12855b16253fSmrg# libtool support. 12865b16253fSmrgcase $host in 12875b16253fSmrgia64-*-hpux*) 12885b16253fSmrg # Find out what ABI is being produced by ac_compile, and set mode 12895b16253fSmrg # options accordingly. 12905b16253fSmrg echo 'int i;' > conftest.$ac_ext 12915b16253fSmrg if AC_TRY_EVAL(ac_compile); then 12925b16253fSmrg case `$FILECMD conftest.$ac_objext` in 12935b16253fSmrg *ELF-32*) 12945b16253fSmrg HPUX_IA64_MODE=32 12955b16253fSmrg ;; 12965b16253fSmrg *ELF-64*) 12975b16253fSmrg HPUX_IA64_MODE=64 12985b16253fSmrg ;; 12995b16253fSmrg esac 13005b16253fSmrg fi 13015b16253fSmrg rm -rf conftest* 13025b16253fSmrg ;; 13035b16253fSmrg*-*-irix6*) 13045b16253fSmrg # Find out what ABI is being produced by ac_compile, and set linker 13055b16253fSmrg # options accordingly. 13065b16253fSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13075b16253fSmrg if AC_TRY_EVAL(ac_compile); then 13085b16253fSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 13095b16253fSmrg case `$FILECMD conftest.$ac_objext` in 13105b16253fSmrg *32-bit*) 13115b16253fSmrg LD="${LD-ld} -melf32bsmip" 13125b16253fSmrg ;; 13135b16253fSmrg *N32*) 13145b16253fSmrg LD="${LD-ld} -melf32bmipn32" 13155b16253fSmrg ;; 13165b16253fSmrg *64-bit*) 13175b16253fSmrg LD="${LD-ld} -melf64bmip" 13185b16253fSmrg ;; 13195b16253fSmrg esac 13205b16253fSmrg else 13215b16253fSmrg case `$FILECMD conftest.$ac_objext` in 13225b16253fSmrg *32-bit*) 13235b16253fSmrg LD="${LD-ld} -32" 13245b16253fSmrg ;; 13255b16253fSmrg *N32*) 13265b16253fSmrg LD="${LD-ld} -n32" 13275b16253fSmrg ;; 13285b16253fSmrg *64-bit*) 13295b16253fSmrg LD="${LD-ld} -64" 13305b16253fSmrg ;; 13315b16253fSmrg esac 13325b16253fSmrg fi 13335b16253fSmrg fi 13345b16253fSmrg rm -rf conftest* 13355b16253fSmrg ;; 13365b16253fSmrg 13375b16253fSmrgmips64*-*linux*) 13385b16253fSmrg # Find out what ABI is being produced by ac_compile, and set linker 13395b16253fSmrg # options accordingly. 13405b16253fSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13415b16253fSmrg if AC_TRY_EVAL(ac_compile); then 13425b16253fSmrg emul=elf 13435b16253fSmrg case `$FILECMD conftest.$ac_objext` in 13445b16253fSmrg *32-bit*) 13455b16253fSmrg emul="${emul}32" 13465b16253fSmrg ;; 13475b16253fSmrg *64-bit*) 13485b16253fSmrg emul="${emul}64" 13495b16253fSmrg ;; 13505b16253fSmrg esac 13515b16253fSmrg case `$FILECMD conftest.$ac_objext` in 13525b16253fSmrg *MSB*) 13535b16253fSmrg emul="${emul}btsmip" 13545b16253fSmrg ;; 13555b16253fSmrg *LSB*) 13565b16253fSmrg emul="${emul}ltsmip" 13575b16253fSmrg ;; 13585b16253fSmrg esac 13595b16253fSmrg case `$FILECMD conftest.$ac_objext` in 13605b16253fSmrg *N32*) 13615b16253fSmrg emul="${emul}n32" 13625b16253fSmrg ;; 13635b16253fSmrg esac 13645b16253fSmrg LD="${LD-ld} -m $emul" 13655b16253fSmrg fi 13665b16253fSmrg rm -rf conftest* 13675b16253fSmrg ;; 13685b16253fSmrg 13695b16253fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13705b16253fSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13715b16253fSmrg # Find out what ABI is being produced by ac_compile, and set linker 13725b16253fSmrg # options accordingly. Note that the listed cases only cover the 13735b16253fSmrg # situations where additional linker options are needed (such as when 13745b16253fSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 13755b16253fSmrg # vice versa); the common cases where no linker options are needed do 13765b16253fSmrg # not appear in the list. 13775b16253fSmrg echo 'int i;' > conftest.$ac_ext 13785b16253fSmrg if AC_TRY_EVAL(ac_compile); then 13795b16253fSmrg case `$FILECMD conftest.o` in 13805b16253fSmrg *32-bit*) 13815b16253fSmrg case $host in 13825b16253fSmrg x86_64-*kfreebsd*-gnu) 13835b16253fSmrg LD="${LD-ld} -m elf_i386_fbsd" 13845b16253fSmrg ;; 13855b16253fSmrg x86_64-*linux*) 13865b16253fSmrg case `$FILECMD conftest.o` in 13875b16253fSmrg *x86-64*) 13885b16253fSmrg LD="${LD-ld} -m elf32_x86_64" 13895b16253fSmrg ;; 13905b16253fSmrg *) 13915b16253fSmrg LD="${LD-ld} -m elf_i386" 13925b16253fSmrg ;; 13935b16253fSmrg esac 13945b16253fSmrg ;; 13955b16253fSmrg powerpc64le-*linux*) 13965b16253fSmrg LD="${LD-ld} -m elf32lppclinux" 13975b16253fSmrg ;; 13985b16253fSmrg powerpc64-*linux*) 13995b16253fSmrg LD="${LD-ld} -m elf32ppclinux" 14005b16253fSmrg ;; 14015b16253fSmrg s390x-*linux*) 14025b16253fSmrg LD="${LD-ld} -m elf_s390" 14035b16253fSmrg ;; 14045b16253fSmrg sparc64-*linux*) 14055b16253fSmrg LD="${LD-ld} -m elf32_sparc" 14065b16253fSmrg ;; 14075b16253fSmrg esac 14085b16253fSmrg ;; 14095b16253fSmrg *64-bit*) 14105b16253fSmrg case $host in 14115b16253fSmrg x86_64-*kfreebsd*-gnu) 14125b16253fSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 14135b16253fSmrg ;; 14145b16253fSmrg x86_64-*linux*) 14155b16253fSmrg LD="${LD-ld} -m elf_x86_64" 14165b16253fSmrg ;; 14175b16253fSmrg powerpcle-*linux*) 14185b16253fSmrg LD="${LD-ld} -m elf64lppc" 14195b16253fSmrg ;; 14205b16253fSmrg powerpc-*linux*) 14215b16253fSmrg LD="${LD-ld} -m elf64ppc" 14225b16253fSmrg ;; 14235b16253fSmrg s390*-*linux*|s390*-*tpf*) 14245b16253fSmrg LD="${LD-ld} -m elf64_s390" 14255b16253fSmrg ;; 14265b16253fSmrg sparc*-*linux*) 14275b16253fSmrg LD="${LD-ld} -m elf64_sparc" 14285b16253fSmrg ;; 14295b16253fSmrg esac 14305b16253fSmrg ;; 14315b16253fSmrg esac 14325b16253fSmrg fi 14335b16253fSmrg rm -rf conftest* 14345b16253fSmrg ;; 14355b16253fSmrg 14365b16253fSmrg*-*-sco3.2v5*) 14375b16253fSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 14385b16253fSmrg SAVE_CFLAGS=$CFLAGS 14395b16253fSmrg CFLAGS="$CFLAGS -belf" 14405b16253fSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 14415b16253fSmrg [AC_LANG_PUSH(C) 14425b16253fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 14435b16253fSmrg AC_LANG_POP]) 14445b16253fSmrg if test yes != "$lt_cv_cc_needs_belf"; then 14455b16253fSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 14465b16253fSmrg CFLAGS=$SAVE_CFLAGS 14475b16253fSmrg fi 14485b16253fSmrg ;; 14495b16253fSmrg*-*solaris*) 14505b16253fSmrg # Find out what ABI is being produced by ac_compile, and set linker 14515b16253fSmrg # options accordingly. 14525b16253fSmrg echo 'int i;' > conftest.$ac_ext 14535b16253fSmrg if AC_TRY_EVAL(ac_compile); then 14545b16253fSmrg case `$FILECMD conftest.o` in 14555b16253fSmrg *64-bit*) 14565b16253fSmrg case $lt_cv_prog_gnu_ld in 14575b16253fSmrg yes*) 14585b16253fSmrg case $host in 14595b16253fSmrg i?86-*-solaris*|x86_64-*-solaris*) 14605b16253fSmrg LD="${LD-ld} -m elf_x86_64" 14615b16253fSmrg ;; 14625b16253fSmrg sparc*-*-solaris*) 14635b16253fSmrg LD="${LD-ld} -m elf64_sparc" 14645b16253fSmrg ;; 14655b16253fSmrg esac 14665b16253fSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14675b16253fSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 14685b16253fSmrg LD=${LD-ld}_sol2 14695b16253fSmrg fi 14705b16253fSmrg ;; 14715b16253fSmrg *) 14725b16253fSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14735b16253fSmrg LD="${LD-ld} -64" 14745b16253fSmrg fi 14755b16253fSmrg ;; 14765b16253fSmrg esac 14775b16253fSmrg ;; 14785b16253fSmrg esac 14795b16253fSmrg fi 14805b16253fSmrg rm -rf conftest* 14815b16253fSmrg ;; 14825b16253fSmrgesac 14835b16253fSmrg 14845b16253fSmrgneed_locks=$enable_libtool_lock 14855b16253fSmrg])# _LT_ENABLE_LOCK 14865b16253fSmrg 14875b16253fSmrg 14885b16253fSmrg# _LT_PROG_AR 14895b16253fSmrg# ----------- 14905b16253fSmrgm4_defun([_LT_PROG_AR], 14915b16253fSmrg[AC_CHECK_TOOLS(AR, [ar], false) 14925b16253fSmrg: ${AR=ar} 14935b16253fSmrg_LT_DECL([], [AR], [1], [The archiver]) 14945b16253fSmrg 14955b16253fSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 14965b16253fSmrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 14975b16253fSmrg# higher priority because thats what people were doing historically (setting 14985b16253fSmrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 14995b16253fSmrg# variable obsoleted/removed. 15005b16253fSmrg 15015b16253fSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 15025b16253fSmrglt_ar_flags=$AR_FLAGS 15035b16253fSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 15045b16253fSmrg 15055b16253fSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 15065b16253fSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 15075b16253fSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 15085b16253fSmrg [Flags to create an archive]) 15095b16253fSmrg 15105b16253fSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 15115b16253fSmrg [lt_cv_ar_at_file=no 15125b16253fSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 15135b16253fSmrg [echo conftest.$ac_objext > conftest.lst 15145b16253fSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 15155b16253fSmrg AC_TRY_EVAL([lt_ar_try]) 15165b16253fSmrg if test 0 -eq "$ac_status"; then 15175b16253fSmrg # Ensure the archiver fails upon bogus file names. 15185b16253fSmrg rm -f conftest.$ac_objext libconftest.a 15195b16253fSmrg AC_TRY_EVAL([lt_ar_try]) 15205b16253fSmrg if test 0 -ne "$ac_status"; then 15215b16253fSmrg lt_cv_ar_at_file=@ 15225b16253fSmrg fi 15235b16253fSmrg fi 15245b16253fSmrg rm -f conftest.* libconftest.a 15255b16253fSmrg ]) 15265b16253fSmrg ]) 15275b16253fSmrg 15285b16253fSmrgif test no = "$lt_cv_ar_at_file"; then 15295b16253fSmrg archiver_list_spec= 15305b16253fSmrgelse 15315b16253fSmrg archiver_list_spec=$lt_cv_ar_at_file 15325b16253fSmrgfi 15335b16253fSmrg_LT_DECL([], [archiver_list_spec], [1], 15345b16253fSmrg [How to feed a file listing to the archiver]) 15355b16253fSmrg])# _LT_PROG_AR 15365b16253fSmrg 15375b16253fSmrg 15385b16253fSmrg# _LT_CMD_OLD_ARCHIVE 15395b16253fSmrg# ------------------- 15405b16253fSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 15415b16253fSmrg[_LT_PROG_AR 15425b16253fSmrg 15435b16253fSmrgAC_CHECK_TOOL(STRIP, strip, :) 15445b16253fSmrgtest -z "$STRIP" && STRIP=: 15455b16253fSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 15465b16253fSmrg 15475b16253fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15485b16253fSmrgtest -z "$RANLIB" && RANLIB=: 15495b16253fSmrg_LT_DECL([], [RANLIB], [1], 15505b16253fSmrg [Commands used to install an old-style archive]) 15515b16253fSmrg 15525b16253fSmrg# Determine commands to create old-style static archives. 15535b16253fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15545b16253fSmrgold_postinstall_cmds='chmod 644 $oldlib' 15555b16253fSmrgold_postuninstall_cmds= 15565b16253fSmrg 15575b16253fSmrgif test -n "$RANLIB"; then 15585b16253fSmrg case $host_os in 15595b16253fSmrg bitrig* | openbsd*) 15605b16253fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15615b16253fSmrg ;; 15625b16253fSmrg *) 15635b16253fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15645b16253fSmrg ;; 15655b16253fSmrg esac 15665b16253fSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15675b16253fSmrgfi 15685b16253fSmrg 15695b16253fSmrgcase $host_os in 15705b16253fSmrg darwin*) 15715b16253fSmrg lock_old_archive_extraction=yes ;; 15725b16253fSmrg *) 15735b16253fSmrg lock_old_archive_extraction=no ;; 15745b16253fSmrgesac 15755b16253fSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 15765b16253fSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15775b16253fSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 15785b16253fSmrg [Commands used to build an old-style archive]) 15795b16253fSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 15805b16253fSmrg [Whether to use a lock for old archive extraction]) 15815b16253fSmrg])# _LT_CMD_OLD_ARCHIVE 15825b16253fSmrg 15835b16253fSmrg 15845b16253fSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15855b16253fSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15865b16253fSmrg# ---------------------------------------------------------------- 15875b16253fSmrg# Check whether the given compiler option works 15885b16253fSmrgAC_DEFUN([_LT_COMPILER_OPTION], 15895b16253fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15905b16253fSmrgm4_require([_LT_DECL_SED])dnl 15915b16253fSmrgAC_CACHE_CHECK([$1], [$2], 15925b16253fSmrg [$2=no 15935b16253fSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15945b16253fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15955b16253fSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 15965b16253fSmrg # Insert the option either (1) after the last *FLAGS variable, or 15975b16253fSmrg # (2) before a word containing "conftest.", or (3) at the end. 15985b16253fSmrg # Note that $ac_compile itself does not contain backslashes and begins 15995b16253fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 16005b16253fSmrg # The option is referenced via a variable to avoid confusing sed. 16015b16253fSmrg lt_compile=`echo "$ac_compile" | $SED \ 16025b16253fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16035b16253fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 16045b16253fSmrg -e 's:$: $lt_compiler_flag:'` 16055b16253fSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 16065b16253fSmrg (eval "$lt_compile" 2>conftest.err) 16075b16253fSmrg ac_status=$? 16085b16253fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 16095b16253fSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 16105b16253fSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 16115b16253fSmrg # The compiler can only warn and ignore the option if not recognized 16125b16253fSmrg # So say no if there are warnings other than the usual output. 16135b16253fSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 16145b16253fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16155b16253fSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 16165b16253fSmrg $2=yes 16175b16253fSmrg fi 16185b16253fSmrg fi 16195b16253fSmrg $RM conftest* 16205b16253fSmrg]) 16215b16253fSmrg 16225b16253fSmrgif test yes = "[$]$2"; then 16235b16253fSmrg m4_if([$5], , :, [$5]) 16245b16253fSmrgelse 16255b16253fSmrg m4_if([$6], , :, [$6]) 16265b16253fSmrgfi 16275b16253fSmrg])# _LT_COMPILER_OPTION 16285b16253fSmrg 16295b16253fSmrg# Old name: 16305b16253fSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16315b16253fSmrgdnl aclocal-1.4 backwards compatibility: 16325b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 16335b16253fSmrg 16345b16253fSmrg 16355b16253fSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16365b16253fSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16375b16253fSmrg# ---------------------------------------------------- 16385b16253fSmrg# Check whether the given linker option works 16395b16253fSmrgAC_DEFUN([_LT_LINKER_OPTION], 16405b16253fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16415b16253fSmrgm4_require([_LT_DECL_SED])dnl 16425b16253fSmrgAC_CACHE_CHECK([$1], [$2], 16435b16253fSmrg [$2=no 16445b16253fSmrg save_LDFLAGS=$LDFLAGS 16455b16253fSmrg LDFLAGS="$LDFLAGS $3" 16465b16253fSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 16475b16253fSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 16485b16253fSmrg # The linker can only warn and ignore the option if not recognized 16495b16253fSmrg # So say no if there are warnings 16505b16253fSmrg if test -s conftest.err; then 16515b16253fSmrg # Append any errors to the config.log. 16525b16253fSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 16535b16253fSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 16545b16253fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16555b16253fSmrg if diff conftest.exp conftest.er2 >/dev/null; then 16565b16253fSmrg $2=yes 16575b16253fSmrg fi 16585b16253fSmrg else 16595b16253fSmrg $2=yes 16605b16253fSmrg fi 16615b16253fSmrg fi 16625b16253fSmrg $RM -r conftest* 16635b16253fSmrg LDFLAGS=$save_LDFLAGS 16645b16253fSmrg]) 16655b16253fSmrg 16665b16253fSmrgif test yes = "[$]$2"; then 16675b16253fSmrg m4_if([$4], , :, [$4]) 16685b16253fSmrgelse 16695b16253fSmrg m4_if([$5], , :, [$5]) 16705b16253fSmrgfi 16715b16253fSmrg])# _LT_LINKER_OPTION 16725b16253fSmrg 16735b16253fSmrg# Old name: 16745b16253fSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16755b16253fSmrgdnl aclocal-1.4 backwards compatibility: 16765b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 16775b16253fSmrg 16785b16253fSmrg 16795b16253fSmrg# LT_CMD_MAX_LEN 16805b16253fSmrg#--------------- 16815b16253fSmrgAC_DEFUN([LT_CMD_MAX_LEN], 16825b16253fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16835b16253fSmrg# find the maximum length of command line arguments 16845b16253fSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16855b16253fSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16865b16253fSmrg i=0 16875b16253fSmrg teststring=ABCD 16885b16253fSmrg 16895b16253fSmrg case $build_os in 16905b16253fSmrg msdosdjgpp*) 16915b16253fSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16925b16253fSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16935b16253fSmrg # during glob expansion). Even if it were fixed, the result of this 16945b16253fSmrg # check would be larger than it should be. 16955b16253fSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 16965b16253fSmrg ;; 16975b16253fSmrg 16985b16253fSmrg gnu*) 16995b16253fSmrg # Under GNU Hurd, this test is not required because there is 17005b16253fSmrg # no limit to the length of command line arguments. 17015b16253fSmrg # Libtool will interpret -1 as no limit whatsoever 17025b16253fSmrg lt_cv_sys_max_cmd_len=-1; 17035b16253fSmrg ;; 17045b16253fSmrg 17055b16253fSmrg cygwin* | mingw* | cegcc*) 17065b16253fSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 17075b16253fSmrg # about 5 minutes as the teststring grows exponentially. 17085b16253fSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 17095b16253fSmrg # you end up with a "frozen" computer, even though with patience 17105b16253fSmrg # the test eventually succeeds (with a max line length of 256k). 17115b16253fSmrg # Instead, let's just punt: use the minimum linelength reported by 17125b16253fSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 17135b16253fSmrg lt_cv_sys_max_cmd_len=8192; 17145b16253fSmrg ;; 17155b16253fSmrg 17165b16253fSmrg mint*) 17175b16253fSmrg # On MiNT this can take a long time and run out of memory. 17185b16253fSmrg lt_cv_sys_max_cmd_len=8192; 17195b16253fSmrg ;; 17205b16253fSmrg 17215b16253fSmrg amigaos*) 17225b16253fSmrg # On AmigaOS with pdksh, this test takes hours, literally. 17235b16253fSmrg # So we just punt and use a minimum line length of 8192. 17245b16253fSmrg lt_cv_sys_max_cmd_len=8192; 17255b16253fSmrg ;; 17265b16253fSmrg 17275b16253fSmrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 17285b16253fSmrg # This has been around since 386BSD, at least. Likely further. 17295b16253fSmrg if test -x /sbin/sysctl; then 17305b16253fSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 17315b16253fSmrg elif test -x /usr/sbin/sysctl; then 17325b16253fSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 17335b16253fSmrg else 17345b16253fSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 17355b16253fSmrg fi 17365b16253fSmrg # And add a safety zone 17375b16253fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17385b16253fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17395b16253fSmrg ;; 17405b16253fSmrg 17415b16253fSmrg interix*) 17425b16253fSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 17435b16253fSmrg lt_cv_sys_max_cmd_len=196608 17445b16253fSmrg ;; 17455b16253fSmrg 17465b16253fSmrg os2*) 17475b16253fSmrg # The test takes a long time on OS/2. 17485b16253fSmrg lt_cv_sys_max_cmd_len=8192 17495b16253fSmrg ;; 17505b16253fSmrg 17515b16253fSmrg osf*) 17525b16253fSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 17535b16253fSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 17545b16253fSmrg # nice to cause kernel panics so lets avoid the loop below. 17555b16253fSmrg # First set a reasonable default. 17565b16253fSmrg lt_cv_sys_max_cmd_len=16384 17575b16253fSmrg # 17585b16253fSmrg if test -x /sbin/sysconfig; then 17595b16253fSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17605b16253fSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17615b16253fSmrg esac 17625b16253fSmrg fi 17635b16253fSmrg ;; 17645b16253fSmrg sco3.2v5*) 17655b16253fSmrg lt_cv_sys_max_cmd_len=102400 17665b16253fSmrg ;; 17675b16253fSmrg sysv5* | sco5v6* | sysv4.2uw2*) 17685b16253fSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17695b16253fSmrg if test -n "$kargmax"; then 17705b16253fSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 17715b16253fSmrg else 17725b16253fSmrg lt_cv_sys_max_cmd_len=32768 17735b16253fSmrg fi 17745b16253fSmrg ;; 17755b16253fSmrg *) 17765b16253fSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17775b16253fSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 17785b16253fSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17795b16253fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17805b16253fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17815b16253fSmrg else 17825b16253fSmrg # Make teststring a little bigger before we do anything with it. 17835b16253fSmrg # a 1K string should be a reasonable start. 17845b16253fSmrg for i in 1 2 3 4 5 6 7 8; do 17855b16253fSmrg teststring=$teststring$teststring 17865b16253fSmrg done 17875b16253fSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17885b16253fSmrg # If test is not a shell built-in, we'll probably end up computing a 17895b16253fSmrg # maximum length that is only half of the actual maximum length, but 17905b16253fSmrg # we can't tell. 17915b16253fSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 17925b16253fSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17935b16253fSmrg test 17 != "$i" # 1/2 MB should be enough 17945b16253fSmrg do 17955b16253fSmrg i=`expr $i + 1` 17965b16253fSmrg teststring=$teststring$teststring 17975b16253fSmrg done 17985b16253fSmrg # Only check the string length outside the loop. 17995b16253fSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18005b16253fSmrg teststring= 18015b16253fSmrg # Add a significant safety factor because C++ compilers can tack on 18025b16253fSmrg # massive amounts of additional arguments before passing them to the 18035b16253fSmrg # linker. It appears as though 1/2 is a usable value. 18045b16253fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18055b16253fSmrg fi 18065b16253fSmrg ;; 18075b16253fSmrg esac 18085b16253fSmrg]) 18095b16253fSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 18105b16253fSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 18115b16253fSmrgelse 18125b16253fSmrg AC_MSG_RESULT(none) 18135b16253fSmrgfi 18145b16253fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18155b16253fSmrg_LT_DECL([], [max_cmd_len], [0], 18165b16253fSmrg [What is the maximum length of a command?]) 18175b16253fSmrg])# LT_CMD_MAX_LEN 18185b16253fSmrg 18195b16253fSmrg# Old name: 18205b16253fSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18215b16253fSmrgdnl aclocal-1.4 backwards compatibility: 18225b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 18235b16253fSmrg 18245b16253fSmrg 18255b16253fSmrg# _LT_HEADER_DLFCN 18265b16253fSmrg# ---------------- 18275b16253fSmrgm4_defun([_LT_HEADER_DLFCN], 18285b16253fSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18295b16253fSmrg])# _LT_HEADER_DLFCN 18305b16253fSmrg 18315b16253fSmrg 18325b16253fSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18335b16253fSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18345b16253fSmrg# ---------------------------------------------------------------- 18355b16253fSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 18365b16253fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 18375b16253fSmrgif test yes = "$cross_compiling"; then : 18385b16253fSmrg [$4] 18395b16253fSmrgelse 18405b16253fSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 18415b16253fSmrg lt_status=$lt_dlunknown 18425b16253fSmrg cat > conftest.$ac_ext <<_LT_EOF 18435b16253fSmrg[#line $LINENO "configure" 18445b16253fSmrg#include "confdefs.h" 18455b16253fSmrg 18465b16253fSmrg#if HAVE_DLFCN_H 18475b16253fSmrg#include <dlfcn.h> 18485b16253fSmrg#endif 18495b16253fSmrg 18505b16253fSmrg#include <stdio.h> 18515b16253fSmrg 18525b16253fSmrg#ifdef RTLD_GLOBAL 18535b16253fSmrg# define LT_DLGLOBAL RTLD_GLOBAL 18545b16253fSmrg#else 18555b16253fSmrg# ifdef DL_GLOBAL 18565b16253fSmrg# define LT_DLGLOBAL DL_GLOBAL 18575b16253fSmrg# else 18585b16253fSmrg# define LT_DLGLOBAL 0 18595b16253fSmrg# endif 18605b16253fSmrg#endif 18615b16253fSmrg 18625b16253fSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18635b16253fSmrg find out it does not work in some platform. */ 18645b16253fSmrg#ifndef LT_DLLAZY_OR_NOW 18655b16253fSmrg# ifdef RTLD_LAZY 18665b16253fSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18675b16253fSmrg# else 18685b16253fSmrg# ifdef DL_LAZY 18695b16253fSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 18705b16253fSmrg# else 18715b16253fSmrg# ifdef RTLD_NOW 18725b16253fSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18735b16253fSmrg# else 18745b16253fSmrg# ifdef DL_NOW 18755b16253fSmrg# define LT_DLLAZY_OR_NOW DL_NOW 18765b16253fSmrg# else 18775b16253fSmrg# define LT_DLLAZY_OR_NOW 0 18785b16253fSmrg# endif 18795b16253fSmrg# endif 18805b16253fSmrg# endif 18815b16253fSmrg# endif 18825b16253fSmrg#endif 18835b16253fSmrg 18845b16253fSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 18855b16253fSmrg correspondingly for the symbols needed. */ 18865b16253fSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18875b16253fSmrgint fnord () __attribute__((visibility("default"))); 18885b16253fSmrg#endif 18895b16253fSmrg 18905b16253fSmrgint fnord () { return 42; } 18915b16253fSmrgint main () 18925b16253fSmrg{ 18935b16253fSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18945b16253fSmrg int status = $lt_dlunknown; 18955b16253fSmrg 18965b16253fSmrg if (self) 18975b16253fSmrg { 18985b16253fSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 18995b16253fSmrg else 19005b16253fSmrg { 19015b16253fSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 19025b16253fSmrg else puts (dlerror ()); 19035b16253fSmrg } 19045b16253fSmrg /* dlclose (self); */ 19055b16253fSmrg } 19065b16253fSmrg else 19075b16253fSmrg puts (dlerror ()); 19085b16253fSmrg 19095b16253fSmrg return status; 19105b16253fSmrg}] 19115b16253fSmrg_LT_EOF 19125b16253fSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 19135b16253fSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 19145b16253fSmrg lt_status=$? 19155b16253fSmrg case x$lt_status in 19165b16253fSmrg x$lt_dlno_uscore) $1 ;; 19175b16253fSmrg x$lt_dlneed_uscore) $2 ;; 19185b16253fSmrg x$lt_dlunknown|x*) $3 ;; 19195b16253fSmrg esac 19205b16253fSmrg else : 19215b16253fSmrg # compilation failed 19225b16253fSmrg $3 19235b16253fSmrg fi 19245b16253fSmrgfi 19255b16253fSmrgrm -fr conftest* 19265b16253fSmrg])# _LT_TRY_DLOPEN_SELF 19275b16253fSmrg 19285b16253fSmrg 19295b16253fSmrg# LT_SYS_DLOPEN_SELF 19305b16253fSmrg# ------------------ 19315b16253fSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19325b16253fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 19335b16253fSmrgif test yes != "$enable_dlopen"; then 19345b16253fSmrg enable_dlopen=unknown 19355b16253fSmrg enable_dlopen_self=unknown 19365b16253fSmrg enable_dlopen_self_static=unknown 19375b16253fSmrgelse 19385b16253fSmrg lt_cv_dlopen=no 19395b16253fSmrg lt_cv_dlopen_libs= 19405b16253fSmrg 19415b16253fSmrg case $host_os in 19425b16253fSmrg beos*) 19435b16253fSmrg lt_cv_dlopen=load_add_on 19445b16253fSmrg lt_cv_dlopen_libs= 19455b16253fSmrg lt_cv_dlopen_self=yes 19465b16253fSmrg ;; 19475b16253fSmrg 19485b16253fSmrg mingw* | pw32* | cegcc*) 19495b16253fSmrg lt_cv_dlopen=LoadLibrary 19505b16253fSmrg lt_cv_dlopen_libs= 19515b16253fSmrg ;; 19525b16253fSmrg 19535b16253fSmrg cygwin*) 19545b16253fSmrg lt_cv_dlopen=dlopen 19555b16253fSmrg lt_cv_dlopen_libs= 19565b16253fSmrg ;; 19575b16253fSmrg 19585b16253fSmrg darwin*) 19595b16253fSmrg # if libdl is installed we need to link against it 19605b16253fSmrg AC_CHECK_LIB([dl], [dlopen], 19615b16253fSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 19625b16253fSmrg lt_cv_dlopen=dyld 19635b16253fSmrg lt_cv_dlopen_libs= 19645b16253fSmrg lt_cv_dlopen_self=yes 19655b16253fSmrg ]) 19665b16253fSmrg ;; 19675b16253fSmrg 19685b16253fSmrg tpf*) 19695b16253fSmrg # Don't try to run any link tests for TPF. We know it's impossible 19705b16253fSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 19715b16253fSmrg lt_cv_dlopen=dlopen 19725b16253fSmrg lt_cv_dlopen_libs= 19735b16253fSmrg lt_cv_dlopen_self=no 19745b16253fSmrg ;; 19755b16253fSmrg 19765b16253fSmrg *) 19775b16253fSmrg AC_CHECK_FUNC([shl_load], 19785b16253fSmrg [lt_cv_dlopen=shl_load], 19795b16253fSmrg [AC_CHECK_LIB([dld], [shl_load], 19805b16253fSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 19815b16253fSmrg [AC_CHECK_FUNC([dlopen], 19825b16253fSmrg [lt_cv_dlopen=dlopen], 19835b16253fSmrg [AC_CHECK_LIB([dl], [dlopen], 19845b16253fSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 19855b16253fSmrg [AC_CHECK_LIB([svld], [dlopen], 19865b16253fSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 19875b16253fSmrg [AC_CHECK_LIB([dld], [dld_link], 19885b16253fSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 19895b16253fSmrg ]) 19905b16253fSmrg ]) 19915b16253fSmrg ]) 19925b16253fSmrg ]) 19935b16253fSmrg ]) 19945b16253fSmrg ;; 19955b16253fSmrg esac 19965b16253fSmrg 19975b16253fSmrg if test no = "$lt_cv_dlopen"; then 19985b16253fSmrg enable_dlopen=no 19995b16253fSmrg else 20005b16253fSmrg enable_dlopen=yes 20015b16253fSmrg fi 20025b16253fSmrg 20035b16253fSmrg case $lt_cv_dlopen in 20045b16253fSmrg dlopen) 20055b16253fSmrg save_CPPFLAGS=$CPPFLAGS 20065b16253fSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 20075b16253fSmrg 20085b16253fSmrg save_LDFLAGS=$LDFLAGS 20095b16253fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 20105b16253fSmrg 20115b16253fSmrg save_LIBS=$LIBS 20125b16253fSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 20135b16253fSmrg 20145b16253fSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 20155b16253fSmrg lt_cv_dlopen_self, [dnl 20165b16253fSmrg _LT_TRY_DLOPEN_SELF( 20175b16253fSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 20185b16253fSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20195b16253fSmrg ]) 20205b16253fSmrg 20215b16253fSmrg if test yes = "$lt_cv_dlopen_self"; then 20225b16253fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 20235b16253fSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20245b16253fSmrg lt_cv_dlopen_self_static, [dnl 20255b16253fSmrg _LT_TRY_DLOPEN_SELF( 20265b16253fSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 20275b16253fSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 20285b16253fSmrg ]) 20295b16253fSmrg fi 20305b16253fSmrg 20315b16253fSmrg CPPFLAGS=$save_CPPFLAGS 20325b16253fSmrg LDFLAGS=$save_LDFLAGS 20335b16253fSmrg LIBS=$save_LIBS 20345b16253fSmrg ;; 20355b16253fSmrg esac 20365b16253fSmrg 20375b16253fSmrg case $lt_cv_dlopen_self in 20385b16253fSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 20395b16253fSmrg *) enable_dlopen_self=unknown ;; 20405b16253fSmrg esac 20415b16253fSmrg 20425b16253fSmrg case $lt_cv_dlopen_self_static in 20435b16253fSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 20445b16253fSmrg *) enable_dlopen_self_static=unknown ;; 20455b16253fSmrg esac 20465b16253fSmrgfi 20475b16253fSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20485b16253fSmrg [Whether dlopen is supported]) 20495b16253fSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20505b16253fSmrg [Whether dlopen of programs is supported]) 20515b16253fSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20525b16253fSmrg [Whether dlopen of statically linked programs is supported]) 20535b16253fSmrg])# LT_SYS_DLOPEN_SELF 20545b16253fSmrg 20555b16253fSmrg# Old name: 20565b16253fSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20575b16253fSmrgdnl aclocal-1.4 backwards compatibility: 20585b16253fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 20595b16253fSmrg 20605b16253fSmrg 20615b16253fSmrg# _LT_COMPILER_C_O([TAGNAME]) 20625b16253fSmrg# --------------------------- 20635b16253fSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 20645b16253fSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20655b16253fSmrgm4_defun([_LT_COMPILER_C_O], 20665b16253fSmrg[m4_require([_LT_DECL_SED])dnl 20675b16253fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20685b16253fSmrgm4_require([_LT_TAG_COMPILER])dnl 20695b16253fSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20705b16253fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20715b16253fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20725b16253fSmrg $RM -r conftest 2>/dev/null 20735b16253fSmrg mkdir conftest 20745b16253fSmrg cd conftest 20755b16253fSmrg mkdir out 20765b16253fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 20775b16253fSmrg 20785b16253fSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20795b16253fSmrg # Insert the option either (1) after the last *FLAGS variable, or 20805b16253fSmrg # (2) before a word containing "conftest.", or (3) at the end. 20815b16253fSmrg # Note that $ac_compile itself does not contain backslashes and begins 20825b16253fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20835b16253fSmrg lt_compile=`echo "$ac_compile" | $SED \ 20845b16253fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20855b16253fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20865b16253fSmrg -e 's:$: $lt_compiler_flag:'` 20875b16253fSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20885b16253fSmrg (eval "$lt_compile" 2>out/conftest.err) 20895b16253fSmrg ac_status=$? 20905b16253fSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20915b16253fSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20925b16253fSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20935b16253fSmrg then 20945b16253fSmrg # The compiler can only warn and ignore the option if not recognized 20955b16253fSmrg # So say no if there are warnings 20965b16253fSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 20975b16253fSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 20985b16253fSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 20995b16253fSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 21005b16253fSmrg fi 21015b16253fSmrg fi 21025b16253fSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21035b16253fSmrg $RM conftest* 21045b16253fSmrg # SGI C++ compiler will create directory out/ii_files/ for 21055b16253fSmrg # template instantiation 21065b16253fSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21075b16253fSmrg $RM out/* && rmdir out 21085b16253fSmrg cd .. 21095b16253fSmrg $RM -r conftest 21105b16253fSmrg $RM conftest* 21115b16253fSmrg]) 21125b16253fSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21135b16253fSmrg [Does compiler simultaneously support -c and -o options?]) 21145b16253fSmrg])# _LT_COMPILER_C_O 21155b16253fSmrg 21165b16253fSmrg 21175b16253fSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21185b16253fSmrg# ---------------------------------- 21195b16253fSmrg# Check to see if we can do hard links to lock some files if needed 21205b16253fSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21215b16253fSmrg[m4_require([_LT_ENABLE_LOCK])dnl 21225b16253fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21235b16253fSmrg_LT_COMPILER_C_O([$1]) 21245b16253fSmrg 21255b16253fSmrghard_links=nottested 21265b16253fSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 21275b16253fSmrg # do not overwrite the value of need_locks provided by the user 21285b16253fSmrg AC_MSG_CHECKING([if we can lock with hard links]) 21295b16253fSmrg hard_links=yes 21305b16253fSmrg $RM conftest* 21315b16253fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21325b16253fSmrg touch conftest.a 21335b16253fSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 21345b16253fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21355b16253fSmrg AC_MSG_RESULT([$hard_links]) 21365b16253fSmrg if test no = "$hard_links"; then 21375b16253fSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 21385b16253fSmrg need_locks=warn 21395b16253fSmrg fi 21405b16253fSmrgelse 21415b16253fSmrg need_locks=no 21425b16253fSmrgfi 21435b16253fSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21445b16253fSmrg])# _LT_COMPILER_FILE_LOCKS 21455b16253fSmrg 21465b16253fSmrg 21475b16253fSmrg# _LT_CHECK_OBJDIR 21485b16253fSmrg# ---------------- 21495b16253fSmrgm4_defun([_LT_CHECK_OBJDIR], 21505b16253fSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 21515b16253fSmrg[rm -f .libs 2>/dev/null 21525b16253fSmrgmkdir .libs 2>/dev/null 21535b16253fSmrgif test -d .libs; then 21545b16253fSmrg lt_cv_objdir=.libs 21555b16253fSmrgelse 21565b16253fSmrg # MS-DOS does not allow filenames that begin with a dot. 21575b16253fSmrg lt_cv_objdir=_libs 21585b16253fSmrgfi 21595b16253fSmrgrmdir .libs 2>/dev/null]) 21605b16253fSmrgobjdir=$lt_cv_objdir 21615b16253fSmrg_LT_DECL([], [objdir], [0], 21625b16253fSmrg [The name of the directory that contains temporary libtool files])dnl 21635b16253fSmrgm4_pattern_allow([LT_OBJDIR])dnl 21645b16253fSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 21655b16253fSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21665b16253fSmrg])# _LT_CHECK_OBJDIR 21675b16253fSmrg 21685b16253fSmrg 21695b16253fSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21705b16253fSmrg# -------------------------------------- 21715b16253fSmrg# Check hardcoding attributes. 21725b16253fSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21735b16253fSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21745b16253fSmrg_LT_TAGVAR(hardcode_action, $1)= 21755b16253fSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21765b16253fSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 21775b16253fSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 21785b16253fSmrg 21795b16253fSmrg # We can hardcode non-existent directories. 21805b16253fSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 21815b16253fSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21825b16253fSmrg # have to relink, otherwise we might link with an installed library 21835b16253fSmrg # when we should be linking with a yet-to-be-installed one 21845b16253fSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 21855b16253fSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 21865b16253fSmrg # Linking always hardcodes the temporary library directory. 21875b16253fSmrg _LT_TAGVAR(hardcode_action, $1)=relink 21885b16253fSmrg else 21895b16253fSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21905b16253fSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 21915b16253fSmrg fi 21925b16253fSmrgelse 21935b16253fSmrg # We cannot hardcode anything, or else we can only hardcode existing 21945b16253fSmrg # directories. 21955b16253fSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 21965b16253fSmrgfi 21975b16253fSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 21985b16253fSmrg 21995b16253fSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 22005b16253fSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 22015b16253fSmrg # Fast installation is not supported 22025b16253fSmrg enable_fast_install=no 22035b16253fSmrgelif test yes = "$shlibpath_overrides_runpath" || 22045b16253fSmrg test no = "$enable_shared"; then 22055b16253fSmrg # Fast installation is not necessary 22065b16253fSmrg enable_fast_install=needless 22075b16253fSmrgfi 22085b16253fSmrg_LT_TAGDECL([], [hardcode_action], [0], 22095b16253fSmrg [How to hardcode a shared library path into an executable]) 22105b16253fSmrg])# _LT_LINKER_HARDCODE_LIBPATH 22115b16253fSmrg 22125b16253fSmrg 22135b16253fSmrg# _LT_CMD_STRIPLIB 22145b16253fSmrg# ---------------- 22155b16253fSmrgm4_defun([_LT_CMD_STRIPLIB], 22165b16253fSmrg[m4_require([_LT_DECL_EGREP]) 22175b16253fSmrgstriplib= 22185b16253fSmrgold_striplib= 22195b16253fSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 22205b16253fSmrgif test -z "$STRIP"; then 22215b16253fSmrg AC_MSG_RESULT([no]) 22225b16253fSmrgelse 22235b16253fSmrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 22245b16253fSmrg old_striplib="$STRIP --strip-debug" 22255b16253fSmrg striplib="$STRIP --strip-unneeded" 22265b16253fSmrg AC_MSG_RESULT([yes]) 22275b16253fSmrg else 22285b16253fSmrg case $host_os in 22295b16253fSmrg darwin*) 22305b16253fSmrg # FIXME - insert some real tests, host_os isn't really good enough 22315b16253fSmrg striplib="$STRIP -x" 22325b16253fSmrg old_striplib="$STRIP -S" 22335b16253fSmrg AC_MSG_RESULT([yes]) 22345b16253fSmrg ;; 22355b16253fSmrg freebsd*) 22365b16253fSmrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 22375b16253fSmrg old_striplib="$STRIP --strip-debug" 22385b16253fSmrg striplib="$STRIP --strip-unneeded" 22395b16253fSmrg AC_MSG_RESULT([yes]) 22405b16253fSmrg else 22415b16253fSmrg AC_MSG_RESULT([no]) 22425b16253fSmrg fi 22435b16253fSmrg ;; 22445b16253fSmrg *) 22455b16253fSmrg AC_MSG_RESULT([no]) 22465b16253fSmrg ;; 22475b16253fSmrg esac 22485b16253fSmrg fi 22495b16253fSmrgfi 22505b16253fSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22515b16253fSmrg_LT_DECL([], [striplib], [1]) 22525b16253fSmrg])# _LT_CMD_STRIPLIB 22535b16253fSmrg 22545b16253fSmrg 22555b16253fSmrg# _LT_PREPARE_MUNGE_PATH_LIST 22565b16253fSmrg# --------------------------- 22575b16253fSmrg# Make sure func_munge_path_list() is defined correctly. 22585b16253fSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 22595b16253fSmrg[[# func_munge_path_list VARIABLE PATH 22605b16253fSmrg# ----------------------------------- 22615b16253fSmrg# VARIABLE is name of variable containing _space_ separated list of 22625b16253fSmrg# directories to be munged by the contents of PATH, which is string 22635b16253fSmrg# having a format: 22645b16253fSmrg# "DIR[:DIR]:" 22655b16253fSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 22665b16253fSmrg# ":DIR[:DIR]" 22675b16253fSmrg# string "DIR[ DIR]" will be appended to VARIABLE 22685b16253fSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 22695b16253fSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 22705b16253fSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 22715b16253fSmrg# "DIR[:DIR]" 22725b16253fSmrg# VARIABLE will be replaced by "DIR[ DIR]" 22735b16253fSmrgfunc_munge_path_list () 22745b16253fSmrg{ 22755b16253fSmrg case x@S|@2 in 22765b16253fSmrg x) 22775b16253fSmrg ;; 22785b16253fSmrg *:) 22795b16253fSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 22805b16253fSmrg ;; 22815b16253fSmrg x:*) 22825b16253fSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 22835b16253fSmrg ;; 22845b16253fSmrg *::*) 22855b16253fSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 22865b16253fSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 22875b16253fSmrg ;; 22885b16253fSmrg *) 22895b16253fSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 22905b16253fSmrg ;; 22915b16253fSmrg esac 22925b16253fSmrg} 22935b16253fSmrg]])# _LT_PREPARE_PATH_LIST 22945b16253fSmrg 22955b16253fSmrg 22965b16253fSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 22975b16253fSmrg# ----------------------------- 22985b16253fSmrg# PORTME Fill in your ld.so characteristics 22995b16253fSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 23005b16253fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 23015b16253fSmrgm4_require([_LT_DECL_EGREP])dnl 23025b16253fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 23035b16253fSmrgm4_require([_LT_DECL_OBJDUMP])dnl 23045b16253fSmrgm4_require([_LT_DECL_SED])dnl 23055b16253fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 23065b16253fSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23075b16253fSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23085b16253fSmrgm4_if([$1], 23095b16253fSmrg [], [ 23105b16253fSmrgif test yes = "$GCC"; then 23115b16253fSmrg case $host_os in 23125b16253fSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 23135b16253fSmrg *) lt_awk_arg='/^libraries:/' ;; 23145b16253fSmrg esac 23155b16253fSmrg case $host_os in 23165b16253fSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 23175b16253fSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 23185b16253fSmrg esac 23195b16253fSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23205b16253fSmrg case $lt_search_path_spec in 23215b16253fSmrg *\;*) 23225b16253fSmrg # if the path contains ";" then we assume it to be the separator 23235b16253fSmrg # otherwise default to the standard path separator (i.e. ":") - it is 23245b16253fSmrg # assumed that no part of a normal pathname contains ";" but that should 23255b16253fSmrg # okay in the real world where ";" in dirpaths is itself problematic. 23265b16253fSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23275b16253fSmrg ;; 23285b16253fSmrg *) 23295b16253fSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23305b16253fSmrg ;; 23315b16253fSmrg esac 23325b16253fSmrg # Ok, now we have the path, separated by spaces, we can step through it 23335b16253fSmrg # and add multilib dir if necessary... 23345b16253fSmrg lt_tmp_lt_search_path_spec= 23355b16253fSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 23365b16253fSmrg # ...but if some path component already ends with the multilib dir we assume 23375b16253fSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 23385b16253fSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 23395b16253fSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 23405b16253fSmrg lt_multi_os_dir= 23415b16253fSmrg ;; 23425b16253fSmrg esac 23435b16253fSmrg for lt_sys_path in $lt_search_path_spec; do 23445b16253fSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 23455b16253fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 23465b16253fSmrg elif test -n "$lt_multi_os_dir"; then 23475b16253fSmrg test -d "$lt_sys_path" && \ 23485b16253fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23495b16253fSmrg fi 23505b16253fSmrg done 23515b16253fSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 23525b16253fSmrgBEGIN {RS = " "; FS = "/|\n";} { 23535b16253fSmrg lt_foo = ""; 23545b16253fSmrg lt_count = 0; 23555b16253fSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 23565b16253fSmrg if ($lt_i != "" && $lt_i != ".") { 23575b16253fSmrg if ($lt_i == "..") { 23585b16253fSmrg lt_count++; 23595b16253fSmrg } else { 23605b16253fSmrg if (lt_count == 0) { 23615b16253fSmrg lt_foo = "/" $lt_i lt_foo; 23625b16253fSmrg } else { 23635b16253fSmrg lt_count--; 23645b16253fSmrg } 23655b16253fSmrg } 23665b16253fSmrg } 23675b16253fSmrg } 23685b16253fSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23695b16253fSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23705b16253fSmrg}'` 23715b16253fSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 23725b16253fSmrg # for these hosts. 23735b16253fSmrg case $host_os in 23745b16253fSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 23755b16253fSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 23765b16253fSmrg esac 23775b16253fSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23785b16253fSmrgelse 23795b16253fSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 23805b16253fSmrgfi]) 23815b16253fSmrglibrary_names_spec= 23825b16253fSmrglibname_spec='lib$name' 23835b16253fSmrgsoname_spec= 23845b16253fSmrgshrext_cmds=.so 23855b16253fSmrgpostinstall_cmds= 23865b16253fSmrgpostuninstall_cmds= 23875b16253fSmrgfinish_cmds= 23885b16253fSmrgfinish_eval= 23895b16253fSmrgshlibpath_var= 23905b16253fSmrgshlibpath_overrides_runpath=unknown 23915b16253fSmrgversion_type=none 23925b16253fSmrgdynamic_linker="$host_os ld.so" 23935b16253fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 23945b16253fSmrgneed_lib_prefix=unknown 23955b16253fSmrghardcode_into_libs=no 23965b16253fSmrg 23975b16253fSmrg# when you set need_version to no, make sure it does not cause -set_version 23985b16253fSmrg# flags to be left without arguments 23995b16253fSmrgneed_version=unknown 24005b16253fSmrg 24015b16253fSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 24025b16253fSmrg[User-defined run-time library search path.]) 24035b16253fSmrg 24045b16253fSmrgcase $host_os in 24055b16253fSmrgaix3*) 24065b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 24075b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 24085b16253fSmrg shlibpath_var=LIBPATH 24095b16253fSmrg 24105b16253fSmrg # AIX 3 has no versioning support, so we append a major version to the name. 24115b16253fSmrg soname_spec='$libname$release$shared_ext$major' 24125b16253fSmrg ;; 24135b16253fSmrg 24145b16253fSmrgaix[[4-9]]*) 24155b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 24165b16253fSmrg need_lib_prefix=no 24175b16253fSmrg need_version=no 24185b16253fSmrg hardcode_into_libs=yes 24195b16253fSmrg if test ia64 = "$host_cpu"; then 24205b16253fSmrg # AIX 5 supports IA64 24215b16253fSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 24225b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 24235b16253fSmrg else 24245b16253fSmrg # With GCC up to 2.95.x, collect2 would create an import file 24255b16253fSmrg # for dependence libraries. The import file would start with 24265b16253fSmrg # the line '#! .'. This would cause the generated library to 24275b16253fSmrg # depend on '.', always an invalid library. This was fixed in 24285b16253fSmrg # development snapshots of GCC prior to 3.0. 24295b16253fSmrg case $host_os in 24305b16253fSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 24315b16253fSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 24325b16253fSmrg echo ' yes ' 24335b16253fSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 24345b16253fSmrg : 24355b16253fSmrg else 24365b16253fSmrg can_build_shared=no 24375b16253fSmrg fi 24385b16253fSmrg ;; 24395b16253fSmrg esac 24405b16253fSmrg # Using Import Files as archive members, it is possible to support 24415b16253fSmrg # filename-based versioning of shared library archives on AIX. While 24425b16253fSmrg # this would work for both with and without runtime linking, it will 24435b16253fSmrg # prevent static linking of such archives. So we do filename-based 24445b16253fSmrg # shared library versioning with .so extension only, which is used 24455b16253fSmrg # when both runtime linking and shared linking is enabled. 24465b16253fSmrg # Unfortunately, runtime linking may impact performance, so we do 24475b16253fSmrg # not want this to be the default eventually. Also, we use the 24485b16253fSmrg # versioned .so libs for executables only if there is the -brtl 24495b16253fSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 24505b16253fSmrg # To allow for filename-based versioning support, we need to create 24515b16253fSmrg # libNAME.so.V as an archive file, containing: 24525b16253fSmrg # *) an Import File, referring to the versioned filename of the 24535b16253fSmrg # archive as well as the shared archive member, telling the 24545b16253fSmrg # bitwidth (32 or 64) of that shared object, and providing the 24555b16253fSmrg # list of exported symbols of that shared object, eventually 24565b16253fSmrg # decorated with the 'weak' keyword 24575b16253fSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 24585b16253fSmrg # it being seen by the linker. 24595b16253fSmrg # At run time we better use the real file rather than another symlink, 24605b16253fSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 24615b16253fSmrg 24625b16253fSmrg case $with_aix_soname,$aix_use_runtimelinking in 24635b16253fSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 24645b16253fSmrg # soname into executable. Probably we can add versioning support to 24655b16253fSmrg # collect2, so additional links can be useful in future. 24665b16253fSmrg aix,yes) # traditional libtool 24675b16253fSmrg dynamic_linker='AIX unversionable lib.so' 24685b16253fSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 24695b16253fSmrg # instead of lib<name>.a to let people know that these are not 24705b16253fSmrg # typical AIX shared libraries. 24715b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 24725b16253fSmrg ;; 24735b16253fSmrg aix,no) # traditional AIX only 24745b16253fSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 24755b16253fSmrg # We preserve .a as extension for shared libraries through AIX4.2 24765b16253fSmrg # and later when we are not doing run time linking. 24775b16253fSmrg library_names_spec='$libname$release.a $libname.a' 24785b16253fSmrg soname_spec='$libname$release$shared_ext$major' 24795b16253fSmrg ;; 24805b16253fSmrg svr4,*) # full svr4 only 24815b16253fSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 24825b16253fSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 24835b16253fSmrg # We do not specify a path in Import Files, so LIBPATH fires. 24845b16253fSmrg shlibpath_overrides_runpath=yes 24855b16253fSmrg ;; 24865b16253fSmrg *,yes) # both, prefer svr4 24875b16253fSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 24885b16253fSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 24895b16253fSmrg # unpreferred sharedlib libNAME.a needs extra handling 24905b16253fSmrg 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"' 24915b16253fSmrg 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"' 24925b16253fSmrg # We do not specify a path in Import Files, so LIBPATH fires. 24935b16253fSmrg shlibpath_overrides_runpath=yes 24945b16253fSmrg ;; 24955b16253fSmrg *,no) # both, prefer aix 24965b16253fSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 24975b16253fSmrg library_names_spec='$libname$release.a $libname.a' 24985b16253fSmrg soname_spec='$libname$release$shared_ext$major' 24995b16253fSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 25005b16253fSmrg 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)' 25015b16253fSmrg 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"' 25025b16253fSmrg ;; 25035b16253fSmrg esac 25045b16253fSmrg shlibpath_var=LIBPATH 25055b16253fSmrg fi 25065b16253fSmrg ;; 25075b16253fSmrg 25085b16253fSmrgamigaos*) 25095b16253fSmrg case $host_cpu in 25105b16253fSmrg powerpc) 25115b16253fSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25125b16253fSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 25135b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25145b16253fSmrg ;; 25155b16253fSmrg m68k) 25165b16253fSmrg library_names_spec='$libname.ixlibrary $libname.a' 25175b16253fSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 25185b16253fSmrg 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' 25195b16253fSmrg ;; 25205b16253fSmrg esac 25215b16253fSmrg ;; 25225b16253fSmrg 25235b16253fSmrgbeos*) 25245b16253fSmrg library_names_spec='$libname$shared_ext' 25255b16253fSmrg dynamic_linker="$host_os ld.so" 25265b16253fSmrg shlibpath_var=LIBRARY_PATH 25275b16253fSmrg ;; 25285b16253fSmrg 25295b16253fSmrgbsdi[[45]]*) 25305b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 25315b16253fSmrg need_version=no 25325b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25335b16253fSmrg soname_spec='$libname$release$shared_ext$major' 25345b16253fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 25355b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 25365b16253fSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 25375b16253fSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 25385b16253fSmrg # the default ld.so.conf also contains /usr/contrib/lib and 25395b16253fSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 25405b16253fSmrg # libtool to hard-code these into programs 25415b16253fSmrg ;; 25425b16253fSmrg 25435b16253fSmrgcygwin* | mingw* | pw32* | cegcc*) 25445b16253fSmrg version_type=windows 25455b16253fSmrg shrext_cmds=.dll 25465b16253fSmrg need_version=no 25475b16253fSmrg need_lib_prefix=no 25485b16253fSmrg 25495b16253fSmrg case $GCC,$cc_basename in 25505b16253fSmrg yes,*) 25515b16253fSmrg # gcc 25525b16253fSmrg library_names_spec='$libname.dll.a' 25535b16253fSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 25545b16253fSmrg postinstall_cmds='base_file=`basename \$file`~ 25555b16253fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25565b16253fSmrg dldir=$destdir/`dirname \$dlpath`~ 25575b16253fSmrg test -d \$dldir || mkdir -p \$dldir~ 25585b16253fSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 25595b16253fSmrg chmod a+x \$dldir/$dlname~ 25605b16253fSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25615b16253fSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25625b16253fSmrg fi' 25635b16253fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 25645b16253fSmrg dlpath=$dir/\$dldll~ 25655b16253fSmrg $RM \$dlpath' 25665b16253fSmrg shlibpath_overrides_runpath=yes 25675b16253fSmrg 25685b16253fSmrg case $host_os in 25695b16253fSmrg cygwin*) 25705b16253fSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 25715b16253fSmrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25725b16253fSmrgm4_if([$1], [],[ 25735b16253fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 25745b16253fSmrg ;; 25755b16253fSmrg mingw* | cegcc*) 25765b16253fSmrg # MinGW DLLs use traditional 'lib' prefix 25775b16253fSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25785b16253fSmrg ;; 25795b16253fSmrg pw32*) 25805b16253fSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 25815b16253fSmrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25825b16253fSmrg ;; 25835b16253fSmrg esac 25845b16253fSmrg dynamic_linker='Win32 ld.exe' 25855b16253fSmrg ;; 25865b16253fSmrg 25875b16253fSmrg *,cl* | *,icl*) 25885b16253fSmrg # Native MSVC or ICC 25895b16253fSmrg libname_spec='$name' 25905b16253fSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25915b16253fSmrg library_names_spec='$libname.dll.lib' 25925b16253fSmrg 25935b16253fSmrg case $build_os in 25945b16253fSmrg mingw*) 25955b16253fSmrg sys_lib_search_path_spec= 25965b16253fSmrg lt_save_ifs=$IFS 25975b16253fSmrg IFS=';' 25985b16253fSmrg for lt_path in $LIB 25995b16253fSmrg do 26005b16253fSmrg IFS=$lt_save_ifs 26015b16253fSmrg # Let DOS variable expansion print the short 8.3 style file name. 26025b16253fSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 26035b16253fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 26045b16253fSmrg done 26055b16253fSmrg IFS=$lt_save_ifs 26065b16253fSmrg # Convert to MSYS style. 26075b16253fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 26085b16253fSmrg ;; 26095b16253fSmrg cygwin*) 26105b16253fSmrg # Convert to unix form, then to dos form, then back to unix form 26115b16253fSmrg # but this time dos style (no spaces!) so that the unix form looks 26125b16253fSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 26135b16253fSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 26145b16253fSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 26155b16253fSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26165b16253fSmrg ;; 26175b16253fSmrg *) 26185b16253fSmrg sys_lib_search_path_spec=$LIB 26195b16253fSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 26205b16253fSmrg # It is most probably a Windows format PATH. 26215b16253fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26225b16253fSmrg else 26235b16253fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26245b16253fSmrg fi 26255b16253fSmrg # FIXME: find the short name or the path components, as spaces are 26265b16253fSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 26275b16253fSmrg ;; 26285b16253fSmrg esac 26295b16253fSmrg 26305b16253fSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 26315b16253fSmrg postinstall_cmds='base_file=`basename \$file`~ 26325b16253fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 26335b16253fSmrg dldir=$destdir/`dirname \$dlpath`~ 26345b16253fSmrg test -d \$dldir || mkdir -p \$dldir~ 26355b16253fSmrg $install_prog $dir/$dlname \$dldir/$dlname' 26365b16253fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26375b16253fSmrg dlpath=$dir/\$dldll~ 26385b16253fSmrg $RM \$dlpath' 26395b16253fSmrg shlibpath_overrides_runpath=yes 26405b16253fSmrg dynamic_linker='Win32 link.exe' 26415b16253fSmrg ;; 26425b16253fSmrg 26435b16253fSmrg *) 26445b16253fSmrg # Assume MSVC and ICC wrapper 26455b16253fSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 26465b16253fSmrg dynamic_linker='Win32 ld.exe' 26475b16253fSmrg ;; 26485b16253fSmrg esac 26495b16253fSmrg # FIXME: first we should search . and the directory the executable is in 26505b16253fSmrg shlibpath_var=PATH 26515b16253fSmrg ;; 26525b16253fSmrg 26535b16253fSmrgdarwin* | rhapsody*) 26545b16253fSmrg dynamic_linker="$host_os dyld" 26555b16253fSmrg version_type=darwin 26565b16253fSmrg need_lib_prefix=no 26575b16253fSmrg need_version=no 26585b16253fSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 26595b16253fSmrg soname_spec='$libname$release$major$shared_ext' 26605b16253fSmrg shlibpath_overrides_runpath=yes 26615b16253fSmrg shlibpath_var=DYLD_LIBRARY_PATH 26625b16253fSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 26635b16253fSmrgm4_if([$1], [],[ 26645b16253fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 26655b16253fSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 26665b16253fSmrg ;; 26675b16253fSmrg 26685b16253fSmrgdgux*) 26695b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 26705b16253fSmrg need_lib_prefix=no 26715b16253fSmrg need_version=no 26725b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 26735b16253fSmrg soname_spec='$libname$release$shared_ext$major' 26745b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 26755b16253fSmrg ;; 26765b16253fSmrg 26775b16253fSmrgfreebsd* | dragonfly* | midnightbsd*) 26785b16253fSmrg # DragonFly does not have aout. When/if they implement a new 26795b16253fSmrg # versioning mechanism, adjust this. 26805b16253fSmrg if test -x /usr/bin/objformat; then 26815b16253fSmrg objformat=`/usr/bin/objformat` 26825b16253fSmrg else 26835b16253fSmrg case $host_os in 26845b16253fSmrg freebsd[[23]].*) objformat=aout ;; 26855b16253fSmrg *) objformat=elf ;; 26865b16253fSmrg esac 26875b16253fSmrg fi 26885b16253fSmrg version_type=freebsd-$objformat 26895b16253fSmrg case $version_type in 26905b16253fSmrg freebsd-elf*) 26915b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 26925b16253fSmrg soname_spec='$libname$release$shared_ext$major' 26935b16253fSmrg need_version=no 26945b16253fSmrg need_lib_prefix=no 26955b16253fSmrg ;; 26965b16253fSmrg freebsd-*) 26975b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 26985b16253fSmrg need_version=yes 26995b16253fSmrg ;; 27005b16253fSmrg esac 27015b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 27025b16253fSmrg case $host_os in 27035b16253fSmrg freebsd2.*) 27045b16253fSmrg shlibpath_overrides_runpath=yes 27055b16253fSmrg ;; 27065b16253fSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 27075b16253fSmrg shlibpath_overrides_runpath=yes 27085b16253fSmrg hardcode_into_libs=yes 27095b16253fSmrg ;; 27105b16253fSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 27115b16253fSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 27125b16253fSmrg shlibpath_overrides_runpath=no 27135b16253fSmrg hardcode_into_libs=yes 27145b16253fSmrg ;; 27155b16253fSmrg *) # from 4.6 on, and DragonFly 27165b16253fSmrg shlibpath_overrides_runpath=yes 27175b16253fSmrg hardcode_into_libs=yes 27185b16253fSmrg ;; 27195b16253fSmrg esac 27205b16253fSmrg ;; 27215b16253fSmrg 27225b16253fSmrghaiku*) 27235b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 27245b16253fSmrg need_lib_prefix=no 27255b16253fSmrg need_version=no 27265b16253fSmrg dynamic_linker="$host_os runtime_loader" 27275b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27285b16253fSmrg soname_spec='$libname$release$shared_ext$major' 27295b16253fSmrg shlibpath_var=LIBRARY_PATH 27305b16253fSmrg shlibpath_overrides_runpath=no 27315b16253fSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 27325b16253fSmrg hardcode_into_libs=yes 27335b16253fSmrg ;; 27345b16253fSmrg 27355b16253fSmrghpux9* | hpux10* | hpux11*) 27365b16253fSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 27375b16253fSmrg # link against other versions. 27385b16253fSmrg version_type=sunos 27395b16253fSmrg need_lib_prefix=no 27405b16253fSmrg need_version=no 27415b16253fSmrg case $host_cpu in 27425b16253fSmrg ia64*) 27435b16253fSmrg shrext_cmds='.so' 27445b16253fSmrg hardcode_into_libs=yes 27455b16253fSmrg dynamic_linker="$host_os dld.so" 27465b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 27475b16253fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27485b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27495b16253fSmrg soname_spec='$libname$release$shared_ext$major' 27505b16253fSmrg if test 32 = "$HPUX_IA64_MODE"; then 27515b16253fSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 27525b16253fSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27535b16253fSmrg else 27545b16253fSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 27555b16253fSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27565b16253fSmrg fi 27575b16253fSmrg ;; 27585b16253fSmrg hppa*64*) 27595b16253fSmrg shrext_cmds='.sl' 27605b16253fSmrg hardcode_into_libs=yes 27615b16253fSmrg dynamic_linker="$host_os dld.sl" 27625b16253fSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27635b16253fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27645b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27655b16253fSmrg soname_spec='$libname$release$shared_ext$major' 27665b16253fSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 27675b16253fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27685b16253fSmrg ;; 27695b16253fSmrg *) 27705b16253fSmrg shrext_cmds='.sl' 27715b16253fSmrg dynamic_linker="$host_os dld.sl" 27725b16253fSmrg shlibpath_var=SHLIB_PATH 27735b16253fSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 27745b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27755b16253fSmrg soname_spec='$libname$release$shared_ext$major' 27765b16253fSmrg ;; 27775b16253fSmrg esac 27785b16253fSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 27795b16253fSmrg postinstall_cmds='chmod 555 $lib' 27805b16253fSmrg # or fails outright, so override atomically: 27815b16253fSmrg install_override_mode=555 27825b16253fSmrg ;; 27835b16253fSmrg 27845b16253fSmrginterix[[3-9]]*) 27855b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 27865b16253fSmrg need_lib_prefix=no 27875b16253fSmrg need_version=no 27885b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27895b16253fSmrg soname_spec='$libname$release$shared_ext$major' 27905b16253fSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 27915b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 27925b16253fSmrg shlibpath_overrides_runpath=no 27935b16253fSmrg hardcode_into_libs=yes 27945b16253fSmrg ;; 27955b16253fSmrg 27965b16253fSmrgirix5* | irix6* | nonstopux*) 27975b16253fSmrg case $host_os in 27985b16253fSmrg nonstopux*) version_type=nonstopux ;; 27995b16253fSmrg *) 28005b16253fSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 28015b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 28025b16253fSmrg else 28035b16253fSmrg version_type=irix 28045b16253fSmrg fi ;; 28055b16253fSmrg esac 28065b16253fSmrg need_lib_prefix=no 28075b16253fSmrg need_version=no 28085b16253fSmrg soname_spec='$libname$release$shared_ext$major' 28095b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 28105b16253fSmrg case $host_os in 28115b16253fSmrg irix5* | nonstopux*) 28125b16253fSmrg libsuff= shlibsuff= 28135b16253fSmrg ;; 28145b16253fSmrg *) 28155b16253fSmrg case $LD in # libtool.m4 will add one of these switches to LD 28165b16253fSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 28175b16253fSmrg libsuff= shlibsuff= libmagic=32-bit;; 28185b16253fSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28195b16253fSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 28205b16253fSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28215b16253fSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 28225b16253fSmrg *) libsuff= shlibsuff= libmagic=never-match;; 28235b16253fSmrg esac 28245b16253fSmrg ;; 28255b16253fSmrg esac 28265b16253fSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28275b16253fSmrg shlibpath_overrides_runpath=no 28285b16253fSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 28295b16253fSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28305b16253fSmrg hardcode_into_libs=yes 28315b16253fSmrg ;; 28325b16253fSmrg 28335b16253fSmrg# No shared lib support for Linux oldld, aout, or coff. 28345b16253fSmrglinux*oldld* | linux*aout* | linux*coff*) 28355b16253fSmrg dynamic_linker=no 28365b16253fSmrg ;; 28375b16253fSmrg 28385b16253fSmrglinux*android*) 28395b16253fSmrg version_type=none # Android doesn't support versioned libraries. 28405b16253fSmrg need_lib_prefix=no 28415b16253fSmrg need_version=no 28425b16253fSmrg library_names_spec='$libname$release$shared_ext' 28435b16253fSmrg soname_spec='$libname$release$shared_ext' 28445b16253fSmrg finish_cmds= 28455b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 28465b16253fSmrg shlibpath_overrides_runpath=yes 28475b16253fSmrg 28485b16253fSmrg # This implies no fast_install, which is unacceptable. 28495b16253fSmrg # Some rework will be needed to allow for fast_install 28505b16253fSmrg # before this can be enabled. 28515b16253fSmrg hardcode_into_libs=yes 28525b16253fSmrg 28535b16253fSmrg dynamic_linker='Android linker' 28545b16253fSmrg # Don't embed -rpath directories since the linker doesn't support them. 28555b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 28565b16253fSmrg ;; 28575b16253fSmrg 28585b16253fSmrg# This must be glibc/ELF. 28595b16253fSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 28605b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 28615b16253fSmrg need_lib_prefix=no 28625b16253fSmrg need_version=no 28635b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28645b16253fSmrg soname_spec='$libname$release$shared_ext$major' 28655b16253fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 28665b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 28675b16253fSmrg shlibpath_overrides_runpath=no 28685b16253fSmrg 28695b16253fSmrg # Some binutils ld are patched to set DT_RUNPATH 28705b16253fSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 28715b16253fSmrg [lt_cv_shlibpath_overrides_runpath=no 28725b16253fSmrg save_LDFLAGS=$LDFLAGS 28735b16253fSmrg save_libdir=$libdir 28745b16253fSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 28755b16253fSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 28765b16253fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 28775b16253fSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 28785b16253fSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 28795b16253fSmrg LDFLAGS=$save_LDFLAGS 28805b16253fSmrg libdir=$save_libdir 28815b16253fSmrg ]) 28825b16253fSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 28835b16253fSmrg 28845b16253fSmrg # This implies no fast_install, which is unacceptable. 28855b16253fSmrg # Some rework will be needed to allow for fast_install 28865b16253fSmrg # before this can be enabled. 28875b16253fSmrg hardcode_into_libs=yes 28885b16253fSmrg 28895b16253fSmrg # Ideally, we could use ldconfig to report *all* directores which are 28905b16253fSmrg # searched for libraries, however this is still not possible. Aside from not 28915b16253fSmrg # being certain /sbin/ldconfig is available, command 28925b16253fSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 28935b16253fSmrg # even though it is searched at run-time. Try to do the best guess by 28945b16253fSmrg # appending ld.so.conf contents (and includes) to the search path. 28955b16253fSmrg if test -f /etc/ld.so.conf; then 28965b16253fSmrg 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' ' '` 28975b16253fSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 28985b16253fSmrg fi 28995b16253fSmrg 29005b16253fSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 29015b16253fSmrg # powerpc, because MkLinux only supported shared libraries with the 29025b16253fSmrg # GNU dynamic linker. Since this was broken with cross compilers, 29035b16253fSmrg # most powerpc-linux boxes support dynamic linking these days and 29045b16253fSmrg # people can always --disable-shared, the test was removed, and we 29055b16253fSmrg # assume the GNU/Linux dynamic linker is in use. 29065b16253fSmrg dynamic_linker='GNU/Linux ld.so' 29075b16253fSmrg ;; 29085b16253fSmrg 2909efbcb2bfSmrgnetbsdelf*-gnu) 2910efbcb2bfSmrg version_type=linux 2911efbcb2bfSmrg need_lib_prefix=no 2912efbcb2bfSmrg need_version=no 2913efbcb2bfSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2914efbcb2bfSmrg soname_spec='${libname}${release}${shared_ext}$major' 2915efbcb2bfSmrg shlibpath_var=LD_LIBRARY_PATH 2916efbcb2bfSmrg shlibpath_overrides_runpath=no 2917efbcb2bfSmrg hardcode_into_libs=yes 2918efbcb2bfSmrg dynamic_linker='NetBSD ld.elf_so' 2919efbcb2bfSmrg ;; 2920efbcb2bfSmrg 29215b16253fSmrgnetbsd*) 29225b16253fSmrg version_type=sunos 29235b16253fSmrg need_lib_prefix=no 29245b16253fSmrg need_version=no 29255b16253fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 29265b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29275b16253fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29285b16253fSmrg dynamic_linker='NetBSD (a.out) ld.so' 29295b16253fSmrg else 29305b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29315b16253fSmrg soname_spec='$libname$release$shared_ext$major' 29325b16253fSmrg dynamic_linker='NetBSD ld.elf_so' 29335b16253fSmrg fi 29345b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 29355b16253fSmrg shlibpath_overrides_runpath=yes 29365b16253fSmrg hardcode_into_libs=yes 29375b16253fSmrg ;; 29385b16253fSmrg 29395b16253fSmrgnewsos6) 29405b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 29415b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29425b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 29435b16253fSmrg shlibpath_overrides_runpath=yes 29445b16253fSmrg ;; 29455b16253fSmrg 29465b16253fSmrg*nto* | *qnx*) 29475b16253fSmrg version_type=qnx 29485b16253fSmrg need_lib_prefix=no 29495b16253fSmrg need_version=no 29505b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29515b16253fSmrg soname_spec='$libname$release$shared_ext$major' 29525b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 29535b16253fSmrg shlibpath_overrides_runpath=no 29545b16253fSmrg hardcode_into_libs=yes 29555b16253fSmrg dynamic_linker='ldqnx.so' 29565b16253fSmrg ;; 29575b16253fSmrg 29585b16253fSmrgopenbsd* | bitrig*) 29595b16253fSmrg version_type=sunos 29605b16253fSmrg sys_lib_dlsearch_path_spec=/usr/lib 29615b16253fSmrg need_lib_prefix=no 29625b16253fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 29635b16253fSmrg need_version=no 29645b16253fSmrg else 29655b16253fSmrg need_version=yes 29665b16253fSmrg fi 29675b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29685b16253fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29695b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 29705b16253fSmrg shlibpath_overrides_runpath=yes 29715b16253fSmrg ;; 29725b16253fSmrg 29735b16253fSmrgos2*) 29745b16253fSmrg libname_spec='$name' 29755b16253fSmrg version_type=windows 29765b16253fSmrg shrext_cmds=.dll 29775b16253fSmrg need_version=no 29785b16253fSmrg need_lib_prefix=no 29795b16253fSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 29805b16253fSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 29815b16253fSmrg v=$($ECHO $release$versuffix | tr -d .-); 29825b16253fSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 29835b16253fSmrg $ECHO $n$v`$shared_ext' 29845b16253fSmrg library_names_spec='${libname}_dll.$libext' 29855b16253fSmrg dynamic_linker='OS/2 ld.exe' 29865b16253fSmrg shlibpath_var=BEGINLIBPATH 29875b16253fSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 29885b16253fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 29895b16253fSmrg postinstall_cmds='base_file=`basename \$file`~ 29905b16253fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 29915b16253fSmrg dldir=$destdir/`dirname \$dlpath`~ 29925b16253fSmrg test -d \$dldir || mkdir -p \$dldir~ 29935b16253fSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 29945b16253fSmrg chmod a+x \$dldir/$dlname~ 29955b16253fSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 29965b16253fSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 29975b16253fSmrg fi' 29985b16253fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 29995b16253fSmrg dlpath=$dir/\$dldll~ 30005b16253fSmrg $RM \$dlpath' 30015b16253fSmrg ;; 30025b16253fSmrg 30035b16253fSmrgosf3* | osf4* | osf5*) 30045b16253fSmrg version_type=osf 30055b16253fSmrg need_lib_prefix=no 30065b16253fSmrg need_version=no 30075b16253fSmrg soname_spec='$libname$release$shared_ext$major' 30085b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30095b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 30105b16253fSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 30115b16253fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30125b16253fSmrg ;; 30135b16253fSmrg 30145b16253fSmrgrdos*) 30155b16253fSmrg dynamic_linker=no 30165b16253fSmrg ;; 30175b16253fSmrg 30185b16253fSmrgsolaris*) 30195b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 30205b16253fSmrg need_lib_prefix=no 30215b16253fSmrg need_version=no 30225b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30235b16253fSmrg soname_spec='$libname$release$shared_ext$major' 30245b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 30255b16253fSmrg shlibpath_overrides_runpath=yes 30265b16253fSmrg hardcode_into_libs=yes 30275b16253fSmrg # ldd complains unless libraries are executable 30285b16253fSmrg postinstall_cmds='chmod +x $lib' 30295b16253fSmrg ;; 30305b16253fSmrg 30315b16253fSmrgsunos4*) 30325b16253fSmrg version_type=sunos 30335b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30345b16253fSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 30355b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 30365b16253fSmrg shlibpath_overrides_runpath=yes 30375b16253fSmrg if test yes = "$with_gnu_ld"; then 30385b16253fSmrg need_lib_prefix=no 30395b16253fSmrg fi 30405b16253fSmrg need_version=yes 30415b16253fSmrg ;; 30425b16253fSmrg 30435b16253fSmrgsysv4 | sysv4.3*) 30445b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 30455b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30465b16253fSmrg soname_spec='$libname$release$shared_ext$major' 30475b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 30485b16253fSmrg case $host_vendor in 30495b16253fSmrg sni) 30505b16253fSmrg shlibpath_overrides_runpath=no 30515b16253fSmrg need_lib_prefix=no 30525b16253fSmrg runpath_var=LD_RUN_PATH 30535b16253fSmrg ;; 30545b16253fSmrg siemens) 30555b16253fSmrg need_lib_prefix=no 30565b16253fSmrg ;; 30575b16253fSmrg motorola) 30585b16253fSmrg need_lib_prefix=no 30595b16253fSmrg need_version=no 30605b16253fSmrg shlibpath_overrides_runpath=no 30615b16253fSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 30625b16253fSmrg ;; 30635b16253fSmrg esac 30645b16253fSmrg ;; 30655b16253fSmrg 30665b16253fSmrgsysv4*MP*) 30675b16253fSmrg if test -d /usr/nec; then 30685b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 30695b16253fSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 30705b16253fSmrg soname_spec='$libname$shared_ext.$major' 30715b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 30725b16253fSmrg fi 30735b16253fSmrg ;; 30745b16253fSmrg 30755b16253fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 30765b16253fSmrg version_type=sco 30775b16253fSmrg need_lib_prefix=no 30785b16253fSmrg need_version=no 30795b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 30805b16253fSmrg soname_spec='$libname$release$shared_ext$major' 30815b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 30825b16253fSmrg shlibpath_overrides_runpath=yes 30835b16253fSmrg hardcode_into_libs=yes 30845b16253fSmrg if test yes = "$with_gnu_ld"; then 30855b16253fSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 30865b16253fSmrg else 30875b16253fSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 30885b16253fSmrg case $host_os in 30895b16253fSmrg sco3.2v5*) 30905b16253fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 30915b16253fSmrg ;; 30925b16253fSmrg esac 30935b16253fSmrg fi 30945b16253fSmrg sys_lib_dlsearch_path_spec='/usr/lib' 30955b16253fSmrg ;; 30965b16253fSmrg 30975b16253fSmrgtpf*) 30985b16253fSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 30995b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 31005b16253fSmrg need_lib_prefix=no 31015b16253fSmrg need_version=no 31025b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31035b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 31045b16253fSmrg shlibpath_overrides_runpath=no 31055b16253fSmrg hardcode_into_libs=yes 31065b16253fSmrg ;; 31075b16253fSmrg 31085b16253fSmrguts4*) 31095b16253fSmrg version_type=linux # correct to gnu/linux during the next big refactor 31105b16253fSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 31115b16253fSmrg soname_spec='$libname$release$shared_ext$major' 31125b16253fSmrg shlibpath_var=LD_LIBRARY_PATH 31135b16253fSmrg ;; 31145b16253fSmrg 31155b16253fSmrg*) 31165b16253fSmrg dynamic_linker=no 31175b16253fSmrg ;; 31185b16253fSmrgesac 31195b16253fSmrgAC_MSG_RESULT([$dynamic_linker]) 31205b16253fSmrgtest no = "$dynamic_linker" && can_build_shared=no 31215b16253fSmrg 31225b16253fSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 31235b16253fSmrgif test yes = "$GCC"; then 31245b16253fSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 31255b16253fSmrgfi 31265b16253fSmrg 31275b16253fSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 31285b16253fSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31295b16253fSmrgfi 31305b16253fSmrg 31315b16253fSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 31325b16253fSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 31335b16253fSmrgfi 31345b16253fSmrg 31355b16253fSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 31365b16253fSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 31375b16253fSmrg 31385b16253fSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 31395b16253fSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 31405b16253fSmrg 31415b16253fSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 31425b16253fSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 31435b16253fSmrg 31445b16253fSmrg_LT_DECL([], [variables_saved_for_relink], [1], 31455b16253fSmrg [Variables whose values should be saved in libtool wrapper scripts and 31465b16253fSmrg restored at link time]) 31475b16253fSmrg_LT_DECL([], [need_lib_prefix], [0], 31485b16253fSmrg [Do we need the "lib" prefix for modules?]) 31495b16253fSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31505b16253fSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 31515b16253fSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31525b16253fSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31535b16253fSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 31545b16253fSmrg [Is shlibpath searched before the hard-coded library search path?]) 31555b16253fSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31565b16253fSmrg_LT_DECL([], [library_names_spec], [1], 31575b16253fSmrg [[List of archive names. First name is the real one, the rest are links. 31585b16253fSmrg The last name is the one that the linker finds with -lNAME]]) 31595b16253fSmrg_LT_DECL([], [soname_spec], [1], 31605b16253fSmrg [[The coded name of the library, if different from the real name]]) 31615b16253fSmrg_LT_DECL([], [install_override_mode], [1], 31625b16253fSmrg [Permission mode override for installation of shared libraries]) 31635b16253fSmrg_LT_DECL([], [postinstall_cmds], [2], 31645b16253fSmrg [Command to use after installation of a shared archive]) 31655b16253fSmrg_LT_DECL([], [postuninstall_cmds], [2], 31665b16253fSmrg [Command to use after uninstallation of a shared archive]) 31675b16253fSmrg_LT_DECL([], [finish_cmds], [2], 31685b16253fSmrg [Commands used to finish a libtool library installation in a directory]) 31695b16253fSmrg_LT_DECL([], [finish_eval], [1], 31705b16253fSmrg [[As "finish_cmds", except a single script fragment to be evaled but 31715b16253fSmrg not shown]]) 31725b16253fSmrg_LT_DECL([], [hardcode_into_libs], [0], 31735b16253fSmrg [Whether we should hardcode library paths into libraries]) 31745b16253fSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 31755b16253fSmrg [Compile-time system search path for libraries]) 31765b16253fSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 31775b16253fSmrg [Detected run-time system search path for libraries]) 31785b16253fSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 31795b16253fSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 31805b16253fSmrg])# _LT_SYS_DYNAMIC_LINKER 31815b16253fSmrg 31825b16253fSmrg 31835b16253fSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 31845b16253fSmrg# -------------------------- 31855b16253fSmrg# find a file program that can recognize shared library 31865b16253fSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 31875b16253fSmrg[m4_require([_LT_DECL_EGREP])dnl 31885b16253fSmrgAC_MSG_CHECKING([for $1]) 31895b16253fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 31905b16253fSmrg[case $MAGIC_CMD in 31915b16253fSmrg[[\\/*] | ?:[\\/]*]) 31925b16253fSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 31935b16253fSmrg ;; 31945b16253fSmrg*) 31955b16253fSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 31965b16253fSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 31975b16253fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 31985b16253fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 31995b16253fSmrgdnl not every word. This closes a longstanding sh security hole. 32005b16253fSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 32015b16253fSmrg for ac_dir in $ac_dummy; do 32025b16253fSmrg IFS=$lt_save_ifs 32035b16253fSmrg test -z "$ac_dir" && ac_dir=. 32045b16253fSmrg if test -f "$ac_dir/$1"; then 32055b16253fSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 32065b16253fSmrg if test -n "$file_magic_test_file"; then 32075b16253fSmrg case $deplibs_check_method in 32085b16253fSmrg "file_magic "*) 32095b16253fSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 32105b16253fSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 32115b16253fSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 32125b16253fSmrg $EGREP "$file_magic_regex" > /dev/null; then 32135b16253fSmrg : 32145b16253fSmrg else 32155b16253fSmrg cat <<_LT_EOF 1>&2 32165b16253fSmrg 32175b16253fSmrg*** Warning: the command libtool uses to detect shared libraries, 32185b16253fSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 32195b16253fSmrg*** The result is that libtool may fail to recognize shared libraries 32205b16253fSmrg*** as such. This will affect the creation of libtool libraries that 32215b16253fSmrg*** depend on shared libraries, but programs linked with such libtool 32225b16253fSmrg*** libraries will work regardless of this problem. Nevertheless, you 32235b16253fSmrg*** may want to report the problem to your system manager and/or to 32245b16253fSmrg*** bug-libtool@gnu.org 32255b16253fSmrg 32265b16253fSmrg_LT_EOF 32275b16253fSmrg fi ;; 32285b16253fSmrg esac 32295b16253fSmrg fi 32305b16253fSmrg break 32315b16253fSmrg fi 32325b16253fSmrg done 32335b16253fSmrg IFS=$lt_save_ifs 32345b16253fSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 32355b16253fSmrg ;; 32365b16253fSmrgesac]) 32375b16253fSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 32385b16253fSmrgif test -n "$MAGIC_CMD"; then 32395b16253fSmrg AC_MSG_RESULT($MAGIC_CMD) 32405b16253fSmrgelse 32415b16253fSmrg AC_MSG_RESULT(no) 32425b16253fSmrgfi 32435b16253fSmrg_LT_DECL([], [MAGIC_CMD], [0], 32445b16253fSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32455b16253fSmrg])# _LT_PATH_TOOL_PREFIX 32465b16253fSmrg 32475b16253fSmrg# Old name: 32485b16253fSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32495b16253fSmrgdnl aclocal-1.4 backwards compatibility: 32505b16253fSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 32515b16253fSmrg 32525b16253fSmrg 32535b16253fSmrg# _LT_PATH_MAGIC 32545b16253fSmrg# -------------- 32555b16253fSmrg# find a file program that can recognize a shared library 32565b16253fSmrgm4_defun([_LT_PATH_MAGIC], 32575b16253fSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 32585b16253fSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 32595b16253fSmrg if test -n "$ac_tool_prefix"; then 32605b16253fSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 32615b16253fSmrg else 32625b16253fSmrg MAGIC_CMD=: 32635b16253fSmrg fi 32645b16253fSmrgfi 32655b16253fSmrg])# _LT_PATH_MAGIC 32665b16253fSmrg 32675b16253fSmrg 32685b16253fSmrg# LT_PATH_LD 32695b16253fSmrg# ---------- 32705b16253fSmrg# find the pathname to the GNU or non-GNU linker 32715b16253fSmrgAC_DEFUN([LT_PATH_LD], 32725b16253fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 32735b16253fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 32745b16253fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32755b16253fSmrgm4_require([_LT_DECL_SED])dnl 32765b16253fSmrgm4_require([_LT_DECL_EGREP])dnl 32775b16253fSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32785b16253fSmrg 32795b16253fSmrgAC_ARG_WITH([gnu-ld], 32805b16253fSmrg [AS_HELP_STRING([--with-gnu-ld], 32815b16253fSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 32825b16253fSmrg [test no = "$withval" || with_gnu_ld=yes], 32835b16253fSmrg [with_gnu_ld=no])dnl 32845b16253fSmrg 32855b16253fSmrgac_prog=ld 32865b16253fSmrgif test yes = "$GCC"; then 32875b16253fSmrg # Check if gcc -print-prog-name=ld gives a path. 32885b16253fSmrg AC_MSG_CHECKING([for ld used by $CC]) 32895b16253fSmrg case $host in 32905b16253fSmrg *-*-mingw*) 32915b16253fSmrg # gcc leaves a trailing carriage return, which upsets mingw 32925b16253fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 32935b16253fSmrg *) 32945b16253fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 32955b16253fSmrg esac 32965b16253fSmrg case $ac_prog in 32975b16253fSmrg # Accept absolute paths. 32985b16253fSmrg [[\\/]]* | ?:[[\\/]]*) 32995b16253fSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 33005b16253fSmrg # Canonicalize the pathname of ld 33015b16253fSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 33025b16253fSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 33035b16253fSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 33045b16253fSmrg done 33055b16253fSmrg test -z "$LD" && LD=$ac_prog 33065b16253fSmrg ;; 33075b16253fSmrg "") 33085b16253fSmrg # If it fails, then pretend we aren't using GCC. 33095b16253fSmrg ac_prog=ld 33105b16253fSmrg ;; 33115b16253fSmrg *) 33125b16253fSmrg # If it is relative, then search for the first ld in PATH. 33135b16253fSmrg with_gnu_ld=unknown 33145b16253fSmrg ;; 33155b16253fSmrg esac 33165b16253fSmrgelif test yes = "$with_gnu_ld"; then 33175b16253fSmrg AC_MSG_CHECKING([for GNU ld]) 33185b16253fSmrgelse 33195b16253fSmrg AC_MSG_CHECKING([for non-GNU ld]) 33205b16253fSmrgfi 33215b16253fSmrgAC_CACHE_VAL(lt_cv_path_LD, 33225b16253fSmrg[if test -z "$LD"; then 33235b16253fSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 33245b16253fSmrg for ac_dir in $PATH; do 33255b16253fSmrg IFS=$lt_save_ifs 33265b16253fSmrg test -z "$ac_dir" && ac_dir=. 33275b16253fSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 33285b16253fSmrg lt_cv_path_LD=$ac_dir/$ac_prog 33295b16253fSmrg # Check to see if the program is GNU ld. I'd rather use --version, 33305b16253fSmrg # but apparently some variants of GNU ld only accept -v. 33315b16253fSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 33325b16253fSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 33335b16253fSmrg *GNU* | *'with BFD'*) 33345b16253fSmrg test no != "$with_gnu_ld" && break 33355b16253fSmrg ;; 33365b16253fSmrg *) 33375b16253fSmrg test yes != "$with_gnu_ld" && break 33385b16253fSmrg ;; 33395b16253fSmrg esac 33405b16253fSmrg fi 33415b16253fSmrg done 33425b16253fSmrg IFS=$lt_save_ifs 33435b16253fSmrgelse 33445b16253fSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 33455b16253fSmrgfi]) 33465b16253fSmrgLD=$lt_cv_path_LD 33475b16253fSmrgif test -n "$LD"; then 33485b16253fSmrg AC_MSG_RESULT($LD) 33495b16253fSmrgelse 33505b16253fSmrg AC_MSG_RESULT(no) 33515b16253fSmrgfi 33525b16253fSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33535b16253fSmrg_LT_PATH_LD_GNU 33545b16253fSmrgAC_SUBST([LD]) 33555b16253fSmrg 33565b16253fSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33575b16253fSmrg])# LT_PATH_LD 33585b16253fSmrg 33595b16253fSmrg# Old names: 33605b16253fSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33615b16253fSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33625b16253fSmrgdnl aclocal-1.4 backwards compatibility: 33635b16253fSmrgdnl AC_DEFUN([AM_PROG_LD], []) 33645b16253fSmrgdnl AC_DEFUN([AC_PROG_LD], []) 33655b16253fSmrg 33665b16253fSmrg 33675b16253fSmrg# _LT_PATH_LD_GNU 33685b16253fSmrg#- -------------- 33695b16253fSmrgm4_defun([_LT_PATH_LD_GNU], 33705b16253fSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 33715b16253fSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 33725b16253fSmrgcase `$LD -v 2>&1 </dev/null` in 33735b16253fSmrg*GNU* | *'with BFD'*) 33745b16253fSmrg lt_cv_prog_gnu_ld=yes 33755b16253fSmrg ;; 33765b16253fSmrg*) 33775b16253fSmrg lt_cv_prog_gnu_ld=no 33785b16253fSmrg ;; 33795b16253fSmrgesac]) 33805b16253fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 33815b16253fSmrg])# _LT_PATH_LD_GNU 33825b16253fSmrg 33835b16253fSmrg 33845b16253fSmrg# _LT_CMD_RELOAD 33855b16253fSmrg# -------------- 33865b16253fSmrg# find reload flag for linker 33875b16253fSmrg# -- PORTME Some linkers may need a different reload flag. 33885b16253fSmrgm4_defun([_LT_CMD_RELOAD], 33895b16253fSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 33905b16253fSmrg lt_cv_ld_reload_flag, 33915b16253fSmrg [lt_cv_ld_reload_flag='-r']) 33925b16253fSmrgreload_flag=$lt_cv_ld_reload_flag 33935b16253fSmrgcase $reload_flag in 33945b16253fSmrg"" | " "*) ;; 33955b16253fSmrg*) reload_flag=" $reload_flag" ;; 33965b16253fSmrgesac 33975b16253fSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 33985b16253fSmrgcase $host_os in 33995b16253fSmrg cygwin* | mingw* | pw32* | cegcc*) 34005b16253fSmrg if test yes != "$GCC"; then 34015b16253fSmrg reload_cmds=false 34025b16253fSmrg fi 34035b16253fSmrg ;; 34045b16253fSmrg darwin*) 34055b16253fSmrg if test yes = "$GCC"; then 34065b16253fSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 34075b16253fSmrg else 34085b16253fSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 34095b16253fSmrg fi 34105b16253fSmrg ;; 34115b16253fSmrgesac 34125b16253fSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 34135b16253fSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 34145b16253fSmrg])# _LT_CMD_RELOAD 34155b16253fSmrg 34165b16253fSmrg 34175b16253fSmrg# _LT_PATH_DD 34185b16253fSmrg# ----------- 34195b16253fSmrg# find a working dd 34205b16253fSmrgm4_defun([_LT_PATH_DD], 34215b16253fSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 34225b16253fSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34235b16253fSmrgcat conftest.i conftest.i >conftest2.i 34245b16253fSmrg: ${lt_DD:=$DD} 34255b16253fSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 34265b16253fSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34275b16253fSmrg cmp -s conftest.i conftest.out \ 34285b16253fSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 34295b16253fSmrgfi]) 34305b16253fSmrgrm -f conftest.i conftest2.i conftest.out]) 34315b16253fSmrg])# _LT_PATH_DD 34325b16253fSmrg 34335b16253fSmrg 34345b16253fSmrg# _LT_CMD_TRUNCATE 34355b16253fSmrg# ---------------- 34365b16253fSmrg# find command to truncate a binary pipe 34375b16253fSmrgm4_defun([_LT_CMD_TRUNCATE], 34385b16253fSmrg[m4_require([_LT_PATH_DD]) 34395b16253fSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 34405b16253fSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34415b16253fSmrgcat conftest.i conftest.i >conftest2.i 34425b16253fSmrglt_cv_truncate_bin= 34435b16253fSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34445b16253fSmrg cmp -s conftest.i conftest.out \ 34455b16253fSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 34465b16253fSmrgfi 34475b16253fSmrgrm -f conftest.i conftest2.i conftest.out 34485b16253fSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 34495b16253fSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 34505b16253fSmrg [Command to truncate a binary pipe]) 34515b16253fSmrg])# _LT_CMD_TRUNCATE 34525b16253fSmrg 34535b16253fSmrg 34545b16253fSmrg# _LT_CHECK_MAGIC_METHOD 34555b16253fSmrg# ---------------------- 34565b16253fSmrg# how to check for library dependencies 34575b16253fSmrg# -- PORTME fill in with the dynamic library characteristics 34585b16253fSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 34595b16253fSmrg[m4_require([_LT_DECL_EGREP]) 34605b16253fSmrgm4_require([_LT_DECL_OBJDUMP]) 34615b16253fSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 34625b16253fSmrglt_cv_deplibs_check_method, 34635b16253fSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 34645b16253fSmrglt_cv_file_magic_test_file= 34655b16253fSmrglt_cv_deplibs_check_method='unknown' 34665b16253fSmrg# Need to set the preceding variable on all platforms that support 34675b16253fSmrg# interlibrary dependencies. 34685b16253fSmrg# 'none' -- dependencies not supported. 34695b16253fSmrg# 'unknown' -- same as none, but documents that we really don't know. 34705b16253fSmrg# 'pass_all' -- all dependencies passed with no checks. 34715b16253fSmrg# 'test_compile' -- check by making test program. 34725b16253fSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 34735b16253fSmrg# that responds to the $file_magic_cmd with a given extended regex. 34745b16253fSmrg# If you have 'file' or equivalent on your system and you're not sure 34755b16253fSmrg# whether 'pass_all' will *always* work, you probably want this one. 34765b16253fSmrg 34775b16253fSmrgcase $host_os in 34785b16253fSmrgaix[[4-9]]*) 34795b16253fSmrg lt_cv_deplibs_check_method=pass_all 34805b16253fSmrg ;; 34815b16253fSmrg 34825b16253fSmrgbeos*) 34835b16253fSmrg lt_cv_deplibs_check_method=pass_all 34845b16253fSmrg ;; 34855b16253fSmrg 34865b16253fSmrgbsdi[[45]]*) 34875b16253fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 34885b16253fSmrg lt_cv_file_magic_cmd='$FILECMD -L' 34895b16253fSmrg lt_cv_file_magic_test_file=/shlib/libc.so 34905b16253fSmrg ;; 34915b16253fSmrg 34925b16253fSmrgcygwin*) 34935b16253fSmrg # func_win32_libid is a shell function defined in ltmain.sh 34945b16253fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34955b16253fSmrg lt_cv_file_magic_cmd='func_win32_libid' 34965b16253fSmrg ;; 34975b16253fSmrg 34985b16253fSmrgmingw* | pw32*) 34995b16253fSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 35005b16253fSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 35015b16253fSmrg # unless we find 'file', for example because we are cross-compiling. 35025b16253fSmrg if ( file / ) >/dev/null 2>&1; then 35035b16253fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 35045b16253fSmrg lt_cv_file_magic_cmd='func_win32_libid' 35055b16253fSmrg else 35065b16253fSmrg # Keep this pattern in sync with the one in func_win32_libid. 35075b16253fSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 35085b16253fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35095b16253fSmrg fi 35105b16253fSmrg ;; 35115b16253fSmrg 35125b16253fSmrgcegcc*) 35135b16253fSmrg # use the weaker test based on 'objdump'. See mingw*. 35145b16253fSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 35155b16253fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35165b16253fSmrg ;; 35175b16253fSmrg 35185b16253fSmrgdarwin* | rhapsody*) 35195b16253fSmrg lt_cv_deplibs_check_method=pass_all 35205b16253fSmrg ;; 35215b16253fSmrg 35225b16253fSmrgfreebsd* | dragonfly* | midnightbsd*) 35235b16253fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35245b16253fSmrg case $host_cpu in 35255b16253fSmrg i*86 ) 35265b16253fSmrg # Not sure whether the presence of OpenBSD here was a mistake. 35275b16253fSmrg # Let's accept both of them until this is cleared up. 35285b16253fSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 35295b16253fSmrg lt_cv_file_magic_cmd=$FILECMD 35305b16253fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 35315b16253fSmrg ;; 35325b16253fSmrg esac 35335b16253fSmrg else 35345b16253fSmrg lt_cv_deplibs_check_method=pass_all 35355b16253fSmrg fi 35365b16253fSmrg ;; 35375b16253fSmrg 35385b16253fSmrghaiku*) 35395b16253fSmrg lt_cv_deplibs_check_method=pass_all 35405b16253fSmrg ;; 35415b16253fSmrg 35425b16253fSmrghpux10.20* | hpux11*) 35435b16253fSmrg lt_cv_file_magic_cmd=$FILECMD 35445b16253fSmrg case $host_cpu in 35455b16253fSmrg ia64*) 35465b16253fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 35475b16253fSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 35485b16253fSmrg ;; 35495b16253fSmrg hppa*64*) 35505b16253fSmrg [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]'] 35515b16253fSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 35525b16253fSmrg ;; 35535b16253fSmrg *) 35545b16253fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 35555b16253fSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 35565b16253fSmrg ;; 35575b16253fSmrg esac 35585b16253fSmrg ;; 35595b16253fSmrg 35605b16253fSmrginterix[[3-9]]*) 35615b16253fSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 35625b16253fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 35635b16253fSmrg ;; 35645b16253fSmrg 35655b16253fSmrgirix5* | irix6* | nonstopux*) 35665b16253fSmrg case $LD in 35675b16253fSmrg *-32|*"-32 ") libmagic=32-bit;; 35685b16253fSmrg *-n32|*"-n32 ") libmagic=N32;; 35695b16253fSmrg *-64|*"-64 ") libmagic=64-bit;; 35705b16253fSmrg *) libmagic=never-match;; 35715b16253fSmrg esac 35725b16253fSmrg lt_cv_deplibs_check_method=pass_all 35735b16253fSmrg ;; 35745b16253fSmrg 35755b16253fSmrg# This must be glibc/ELF. 35765b16253fSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 35775b16253fSmrg lt_cv_deplibs_check_method=pass_all 35785b16253fSmrg ;; 35795b16253fSmrg 3580efbcb2bfSmrgnetbsd* | netbsdelf*-gnu) 35815b16253fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35825b16253fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35835b16253fSmrg else 35845b16253fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 35855b16253fSmrg fi 35865b16253fSmrg ;; 35875b16253fSmrg 35885b16253fSmrgnewos6*) 35895b16253fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 35905b16253fSmrg lt_cv_file_magic_cmd=$FILECMD 35915b16253fSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 35925b16253fSmrg ;; 35935b16253fSmrg 35945b16253fSmrg*nto* | *qnx*) 35955b16253fSmrg lt_cv_deplibs_check_method=pass_all 35965b16253fSmrg ;; 35975b16253fSmrg 35985b16253fSmrgopenbsd* | bitrig*) 35995b16253fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 36005b16253fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 36015b16253fSmrg else 36025b16253fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 36035b16253fSmrg fi 36045b16253fSmrg ;; 36055b16253fSmrg 36065b16253fSmrgosf3* | osf4* | osf5*) 36075b16253fSmrg lt_cv_deplibs_check_method=pass_all 36085b16253fSmrg ;; 36095b16253fSmrg 36105b16253fSmrgrdos*) 36115b16253fSmrg lt_cv_deplibs_check_method=pass_all 36125b16253fSmrg ;; 36135b16253fSmrg 36145b16253fSmrgsolaris*) 36155b16253fSmrg lt_cv_deplibs_check_method=pass_all 36165b16253fSmrg ;; 36175b16253fSmrg 36185b16253fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 36195b16253fSmrg lt_cv_deplibs_check_method=pass_all 36205b16253fSmrg ;; 36215b16253fSmrg 36225b16253fSmrgsysv4 | sysv4.3*) 36235b16253fSmrg case $host_vendor in 36245b16253fSmrg motorola) 36255b16253fSmrg 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]]' 36265b16253fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 36275b16253fSmrg ;; 36285b16253fSmrg ncr) 36295b16253fSmrg lt_cv_deplibs_check_method=pass_all 36305b16253fSmrg ;; 36315b16253fSmrg sequent) 36325b16253fSmrg lt_cv_file_magic_cmd='/bin/file' 36335b16253fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 36345b16253fSmrg ;; 36355b16253fSmrg sni) 36365b16253fSmrg lt_cv_file_magic_cmd='/bin/file' 36375b16253fSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 36385b16253fSmrg lt_cv_file_magic_test_file=/lib/libc.so 36395b16253fSmrg ;; 36405b16253fSmrg siemens) 36415b16253fSmrg lt_cv_deplibs_check_method=pass_all 36425b16253fSmrg ;; 36435b16253fSmrg pc) 36445b16253fSmrg lt_cv_deplibs_check_method=pass_all 36455b16253fSmrg ;; 36465b16253fSmrg esac 36475b16253fSmrg ;; 36485b16253fSmrg 36495b16253fSmrgtpf*) 36505b16253fSmrg lt_cv_deplibs_check_method=pass_all 36515b16253fSmrg ;; 36525b16253fSmrgos2*) 36535b16253fSmrg lt_cv_deplibs_check_method=pass_all 36545b16253fSmrg ;; 36555b16253fSmrgesac 36565b16253fSmrg]) 36575b16253fSmrg 36585b16253fSmrgfile_magic_glob= 36595b16253fSmrgwant_nocaseglob=no 36605b16253fSmrgif test "$build" = "$host"; then 36615b16253fSmrg case $host_os in 36625b16253fSmrg mingw* | pw32*) 36635b16253fSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 36645b16253fSmrg want_nocaseglob=yes 36655b16253fSmrg else 36665b16253fSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 36675b16253fSmrg fi 36685b16253fSmrg ;; 36695b16253fSmrg esac 36705b16253fSmrgfi 36715b16253fSmrg 36725b16253fSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 36735b16253fSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 36745b16253fSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 36755b16253fSmrg 36765b16253fSmrg_LT_DECL([], [deplibs_check_method], [1], 36775b16253fSmrg [Method to check whether dependent libraries are shared objects]) 36785b16253fSmrg_LT_DECL([], [file_magic_cmd], [1], 36795b16253fSmrg [Command to use when deplibs_check_method = "file_magic"]) 36805b16253fSmrg_LT_DECL([], [file_magic_glob], [1], 36815b16253fSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 36825b16253fSmrg_LT_DECL([], [want_nocaseglob], [1], 36835b16253fSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 36845b16253fSmrg])# _LT_CHECK_MAGIC_METHOD 36855b16253fSmrg 36865b16253fSmrg 36875b16253fSmrg# LT_PATH_NM 36885b16253fSmrg# ---------- 36895b16253fSmrg# find the pathname to a BSD- or MS-compatible name lister 36905b16253fSmrgAC_DEFUN([LT_PATH_NM], 36915b16253fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 36925b16253fSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 36935b16253fSmrg[if test -n "$NM"; then 36945b16253fSmrg # Let the user override the test. 36955b16253fSmrg lt_cv_path_NM=$NM 36965b16253fSmrgelse 36975b16253fSmrg lt_nm_to_check=${ac_tool_prefix}nm 36985b16253fSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 36995b16253fSmrg lt_nm_to_check="$lt_nm_to_check nm" 37005b16253fSmrg fi 37015b16253fSmrg for lt_tmp_nm in $lt_nm_to_check; do 37025b16253fSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 37035b16253fSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 37045b16253fSmrg IFS=$lt_save_ifs 37055b16253fSmrg test -z "$ac_dir" && ac_dir=. 37065b16253fSmrg tmp_nm=$ac_dir/$lt_tmp_nm 37075b16253fSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 37085b16253fSmrg # Check to see if the nm accepts a BSD-compat flag. 37095b16253fSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 37105b16253fSmrg # nm: unknown option "B" ignored 37115b16253fSmrg # Tru64's nm complains that /dev/null is an invalid object file 37125b16253fSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 37135b16253fSmrg case $build_os in 37145b16253fSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 37155b16253fSmrg *) lt_bad_file=/dev/null ;; 37165b16253fSmrg esac 37175b16253fSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 37185b16253fSmrg *$lt_bad_file* | *'Invalid file or object type'*) 37195b16253fSmrg lt_cv_path_NM="$tmp_nm -B" 37205b16253fSmrg break 2 37215b16253fSmrg ;; 37225b16253fSmrg *) 37235b16253fSmrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 37245b16253fSmrg */dev/null*) 37255b16253fSmrg lt_cv_path_NM="$tmp_nm -p" 37265b16253fSmrg break 2 37275b16253fSmrg ;; 37285b16253fSmrg *) 37295b16253fSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 37305b16253fSmrg continue # so that we can try to find one that supports BSD flags 37315b16253fSmrg ;; 37325b16253fSmrg esac 37335b16253fSmrg ;; 37345b16253fSmrg esac 37355b16253fSmrg fi 37365b16253fSmrg done 37375b16253fSmrg IFS=$lt_save_ifs 37385b16253fSmrg done 37395b16253fSmrg : ${lt_cv_path_NM=no} 37405b16253fSmrgfi]) 37415b16253fSmrgif test no != "$lt_cv_path_NM"; then 37425b16253fSmrg NM=$lt_cv_path_NM 37435b16253fSmrgelse 37445b16253fSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 37455b16253fSmrg if test -n "$DUMPBIN"; then : 37465b16253fSmrg # Let the user override the test. 37475b16253fSmrg else 37485b16253fSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 37495b16253fSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 37505b16253fSmrg *COFF*) 37515b16253fSmrg DUMPBIN="$DUMPBIN -symbols -headers" 37525b16253fSmrg ;; 37535b16253fSmrg *) 37545b16253fSmrg DUMPBIN=: 37555b16253fSmrg ;; 37565b16253fSmrg esac 37575b16253fSmrg fi 37585b16253fSmrg AC_SUBST([DUMPBIN]) 37595b16253fSmrg if test : != "$DUMPBIN"; then 37605b16253fSmrg NM=$DUMPBIN 37615b16253fSmrg fi 37625b16253fSmrgfi 37635b16253fSmrgtest -z "$NM" && NM=nm 37645b16253fSmrgAC_SUBST([NM]) 37655b16253fSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 37665b16253fSmrg 37675b16253fSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37685b16253fSmrg [lt_cv_nm_interface="BSD nm" 37695b16253fSmrg echo "int some_variable = 0;" > conftest.$ac_ext 37705b16253fSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37715b16253fSmrg (eval "$ac_compile" 2>conftest.err) 37725b16253fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 37735b16253fSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37745b16253fSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37755b16253fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 37765b16253fSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37775b16253fSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 37785b16253fSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 37795b16253fSmrg lt_cv_nm_interface="MS dumpbin" 37805b16253fSmrg fi 37815b16253fSmrg rm -f conftest*]) 37825b16253fSmrg])# LT_PATH_NM 37835b16253fSmrg 37845b16253fSmrg# Old names: 37855b16253fSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 37865b16253fSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 37875b16253fSmrgdnl aclocal-1.4 backwards compatibility: 37885b16253fSmrgdnl AC_DEFUN([AM_PROG_NM], []) 37895b16253fSmrgdnl AC_DEFUN([AC_PROG_NM], []) 37905b16253fSmrg 37915b16253fSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 37925b16253fSmrg# -------------------------------- 37935b16253fSmrg# how to determine the name of the shared library 37945b16253fSmrg# associated with a specific link library. 37955b16253fSmrg# -- PORTME fill in with the dynamic library characteristics 37965b16253fSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 37975b16253fSmrg[m4_require([_LT_DECL_EGREP]) 37985b16253fSmrgm4_require([_LT_DECL_OBJDUMP]) 37995b16253fSmrgm4_require([_LT_DECL_DLLTOOL]) 38005b16253fSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 38015b16253fSmrglt_cv_sharedlib_from_linklib_cmd, 38025b16253fSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 38035b16253fSmrg 38045b16253fSmrgcase $host_os in 38055b16253fSmrgcygwin* | mingw* | pw32* | cegcc*) 38065b16253fSmrg # two different shell functions defined in ltmain.sh; 38075b16253fSmrg # decide which one to use based on capabilities of $DLLTOOL 38085b16253fSmrg case `$DLLTOOL --help 2>&1` in 38095b16253fSmrg *--identify-strict*) 38105b16253fSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 38115b16253fSmrg ;; 38125b16253fSmrg *) 38135b16253fSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 38145b16253fSmrg ;; 38155b16253fSmrg esac 38165b16253fSmrg ;; 38175b16253fSmrg*) 38185b16253fSmrg # fallback: assume linklib IS sharedlib 38195b16253fSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 38205b16253fSmrg ;; 38215b16253fSmrgesac 38225b16253fSmrg]) 38235b16253fSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 38245b16253fSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 38255b16253fSmrg 38265b16253fSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 38275b16253fSmrg [Command to associate shared and link libraries]) 38285b16253fSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 38295b16253fSmrg 38305b16253fSmrg 38315b16253fSmrg# _LT_PATH_MANIFEST_TOOL 38325b16253fSmrg# ---------------------- 38335b16253fSmrg# locate the manifest tool 38345b16253fSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 38355b16253fSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 38365b16253fSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 38375b16253fSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 38385b16253fSmrg [lt_cv_path_mainfest_tool=no 38395b16253fSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 38405b16253fSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 38415b16253fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 38425b16253fSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 38435b16253fSmrg lt_cv_path_mainfest_tool=yes 38445b16253fSmrg fi 38455b16253fSmrg rm -f conftest*]) 38465b16253fSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 38475b16253fSmrg MANIFEST_TOOL=: 38485b16253fSmrgfi 38495b16253fSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 38505b16253fSmrg])# _LT_PATH_MANIFEST_TOOL 38515b16253fSmrg 38525b16253fSmrg 38535b16253fSmrg# _LT_DLL_DEF_P([FILE]) 38545b16253fSmrg# --------------------- 38555b16253fSmrg# True iff FILE is a Windows DLL '.def' file. 38565b16253fSmrg# Keep in sync with func_dll_def_p in the libtool script 38575b16253fSmrgAC_DEFUN([_LT_DLL_DEF_P], 38585b16253fSmrg[dnl 38595b16253fSmrg test DEF = "`$SED -n dnl 38605b16253fSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 38615b16253fSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 38625b16253fSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 38635b16253fSmrg -e q dnl Only consider the first "real" line 38645b16253fSmrg $1`" dnl 38655b16253fSmrg])# _LT_DLL_DEF_P 38665b16253fSmrg 38675b16253fSmrg 38685b16253fSmrg# LT_LIB_M 38695b16253fSmrg# -------- 38705b16253fSmrg# check for math library 38715b16253fSmrgAC_DEFUN([LT_LIB_M], 38725b16253fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 38735b16253fSmrgLIBM= 38745b16253fSmrgcase $host in 38755b16253fSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 38765b16253fSmrg # These system don't have libm, or don't need it 38775b16253fSmrg ;; 38785b16253fSmrg*-ncr-sysv4.3*) 38795b16253fSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 38805b16253fSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 38815b16253fSmrg ;; 38825b16253fSmrg*) 38835b16253fSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 38845b16253fSmrg ;; 38855b16253fSmrgesac 38865b16253fSmrgAC_SUBST([LIBM]) 38875b16253fSmrg])# LT_LIB_M 38885b16253fSmrg 38895b16253fSmrg# Old name: 38905b16253fSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 38915b16253fSmrgdnl aclocal-1.4 backwards compatibility: 38925b16253fSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 38935b16253fSmrg 38945b16253fSmrg 38955b16253fSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 38965b16253fSmrg# ------------------------------- 38975b16253fSmrgm4_defun([_LT_COMPILER_NO_RTTI], 38985b16253fSmrg[m4_require([_LT_TAG_COMPILER])dnl 38995b16253fSmrg 39005b16253fSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 39015b16253fSmrg 39025b16253fSmrgif test yes = "$GCC"; then 39035b16253fSmrg case $cc_basename in 39045b16253fSmrg nvcc*) 39055b16253fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 39065b16253fSmrg *) 39075b16253fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 39085b16253fSmrg esac 39095b16253fSmrg 39105b16253fSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 39115b16253fSmrg lt_cv_prog_compiler_rtti_exceptions, 39125b16253fSmrg [-fno-rtti -fno-exceptions], [], 39135b16253fSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 39145b16253fSmrgfi 39155b16253fSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 39165b16253fSmrg [Compiler flag to turn off builtin functions]) 39175b16253fSmrg])# _LT_COMPILER_NO_RTTI 39185b16253fSmrg 39195b16253fSmrg 39205b16253fSmrg# _LT_CMD_GLOBAL_SYMBOLS 39215b16253fSmrg# ---------------------- 39225b16253fSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 39235b16253fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39245b16253fSmrgAC_REQUIRE([AC_PROG_CC])dnl 39255b16253fSmrgAC_REQUIRE([AC_PROG_AWK])dnl 39265b16253fSmrgAC_REQUIRE([LT_PATH_NM])dnl 39275b16253fSmrgAC_REQUIRE([LT_PATH_LD])dnl 39285b16253fSmrgm4_require([_LT_DECL_SED])dnl 39295b16253fSmrgm4_require([_LT_DECL_EGREP])dnl 39305b16253fSmrgm4_require([_LT_TAG_COMPILER])dnl 39315b16253fSmrg 39325b16253fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 39335b16253fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39345b16253fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 39355b16253fSmrg[ 39365b16253fSmrg# These are sane defaults that work on at least a few old systems. 39375b16253fSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 39385b16253fSmrg 39395b16253fSmrg# Character class describing NM global symbol codes. 39405b16253fSmrgsymcode='[[BCDEGRST]]' 39415b16253fSmrg 39425b16253fSmrg# Regexp to match symbols that can be accessed directly from C. 39435b16253fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 39445b16253fSmrg 39455b16253fSmrg# Define system-specific variables. 39465b16253fSmrgcase $host_os in 39475b16253fSmrgaix*) 39485b16253fSmrg symcode='[[BCDT]]' 39495b16253fSmrg ;; 39505b16253fSmrgcygwin* | mingw* | pw32* | cegcc*) 39515b16253fSmrg symcode='[[ABCDGISTW]]' 39525b16253fSmrg ;; 39535b16253fSmrghpux*) 39545b16253fSmrg if test ia64 = "$host_cpu"; then 39555b16253fSmrg symcode='[[ABCDEGRST]]' 39565b16253fSmrg fi 39575b16253fSmrg ;; 39585b16253fSmrgirix* | nonstopux*) 39595b16253fSmrg symcode='[[BCDEGRST]]' 39605b16253fSmrg ;; 39615b16253fSmrgosf*) 39625b16253fSmrg symcode='[[BCDEGQRST]]' 39635b16253fSmrg ;; 39645b16253fSmrgsolaris*) 39655b16253fSmrg symcode='[[BDRT]]' 39665b16253fSmrg ;; 39675b16253fSmrgsco3.2v5*) 39685b16253fSmrg symcode='[[DT]]' 39695b16253fSmrg ;; 39705b16253fSmrgsysv4.2uw2*) 39715b16253fSmrg symcode='[[DT]]' 39725b16253fSmrg ;; 39735b16253fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 39745b16253fSmrg symcode='[[ABDT]]' 39755b16253fSmrg ;; 39765b16253fSmrgsysv4) 39775b16253fSmrg symcode='[[DFNSTU]]' 39785b16253fSmrg ;; 39795b16253fSmrgesac 39805b16253fSmrg 39815b16253fSmrg# If we're using GNU nm, then use its standard symbol codes. 39825b16253fSmrgcase `$NM -V 2>&1` in 39835b16253fSmrg*GNU* | *'with BFD'*) 39845b16253fSmrg symcode='[[ABCDGIRSTW]]' ;; 39855b16253fSmrgesac 39865b16253fSmrg 39875b16253fSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 39885b16253fSmrg # Gets list of data symbols to import. 39895b16253fSmrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 39905b16253fSmrg # Adjust the below global symbol transforms to fixup imported variables. 39915b16253fSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 39925b16253fSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 39935b16253fSmrg lt_c_name_lib_hook="\ 39945b16253fSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 39955b16253fSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 39965b16253fSmrgelse 39975b16253fSmrg # Disable hooks by default. 39985b16253fSmrg lt_cv_sys_global_symbol_to_import= 39995b16253fSmrg lt_cdecl_hook= 40005b16253fSmrg lt_c_name_hook= 40015b16253fSmrg lt_c_name_lib_hook= 40025b16253fSmrgfi 40035b16253fSmrg 40045b16253fSmrg# Transform an extracted symbol line into a proper C declaration. 40055b16253fSmrg# Some systems (esp. on ia64) link data and code symbols differently, 40065b16253fSmrg# so use this general approach. 40075b16253fSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 40085b16253fSmrg$lt_cdecl_hook\ 40095b16253fSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 40105b16253fSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 40115b16253fSmrg 40125b16253fSmrg# Transform an extracted symbol line into symbol name and symbol address 40135b16253fSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 40145b16253fSmrg$lt_c_name_hook\ 40155b16253fSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40165b16253fSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 40175b16253fSmrg 40185b16253fSmrg# Transform an extracted symbol line into symbol name with lib prefix and 40195b16253fSmrg# symbol address. 40205b16253fSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 40215b16253fSmrg$lt_c_name_lib_hook\ 40225b16253fSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40235b16253fSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 40245b16253fSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 40255b16253fSmrg 40265b16253fSmrg# Handle CRLF in mingw tool chain 40275b16253fSmrgopt_cr= 40285b16253fSmrgcase $build_os in 40295b16253fSmrgmingw*) 40305b16253fSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40315b16253fSmrg ;; 40325b16253fSmrgesac 40335b16253fSmrg 40345b16253fSmrg# Try without a prefix underscore, then with it. 40355b16253fSmrgfor ac_symprfx in "" "_"; do 40365b16253fSmrg 40375b16253fSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40385b16253fSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 40395b16253fSmrg 40405b16253fSmrg # Write the raw and C identifiers. 40415b16253fSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 40425b16253fSmrg # Fake it for dumpbin and say T for any non-static function, 40435b16253fSmrg # D for any global variable and I for any imported variable. 40445b16253fSmrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 40455b16253fSmrg # which start with @ or ?. 40465b16253fSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40475b16253fSmrg" {last_section=section; section=\$ 3};"\ 40485b16253fSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40495b16253fSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 40505b16253fSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 40515b16253fSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 40525b16253fSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40535b16253fSmrg" \$ 0!~/External *\|/{next};"\ 40545b16253fSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40555b16253fSmrg" {if(hide[section]) next};"\ 40565b16253fSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 40575b16253fSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 40585b16253fSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 40595b16253fSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40605b16253fSmrg" ' prfx=^$ac_symprfx]" 40615b16253fSmrg else 40625b16253fSmrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40635b16253fSmrg fi 40645b16253fSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 40655b16253fSmrg 40665b16253fSmrg # Check to see that the pipe works correctly. 40675b16253fSmrg pipe_works=no 40685b16253fSmrg 40695b16253fSmrg rm -f conftest* 40705b16253fSmrg cat > conftest.$ac_ext <<_LT_EOF 40715b16253fSmrg#ifdef __cplusplus 40725b16253fSmrgextern "C" { 40735b16253fSmrg#endif 40745b16253fSmrgchar nm_test_var; 40755b16253fSmrgvoid nm_test_func(void); 40765b16253fSmrgvoid nm_test_func(void){} 40775b16253fSmrg#ifdef __cplusplus 40785b16253fSmrg} 40795b16253fSmrg#endif 40805b16253fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 40815b16253fSmrg_LT_EOF 40825b16253fSmrg 40835b16253fSmrg if AC_TRY_EVAL(ac_compile); then 40845b16253fSmrg # Now try to grab the symbols. 40855b16253fSmrg nlist=conftest.nm 4086efbcb2bfSmrg $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD 4087efbcb2bfSmrg if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then 40885b16253fSmrg # Try sorting and uniquifying the output. 40895b16253fSmrg if sort "$nlist" | uniq > "$nlist"T; then 40905b16253fSmrg mv -f "$nlist"T "$nlist" 40915b16253fSmrg else 40925b16253fSmrg rm -f "$nlist"T 40935b16253fSmrg fi 40945b16253fSmrg 40955b16253fSmrg # Make sure that we snagged all the symbols we need. 40965b16253fSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 40975b16253fSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 40985b16253fSmrg cat <<_LT_EOF > conftest.$ac_ext 40995b16253fSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 41005b16253fSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 41015b16253fSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 41025b16253fSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 41035b16253fSmrg# define LT@&t@_DLSYM_CONST 41045b16253fSmrg#elif defined __osf__ 41055b16253fSmrg/* This system does not cope well with relocations in const data. */ 41065b16253fSmrg# define LT@&t@_DLSYM_CONST 41075b16253fSmrg#else 41085b16253fSmrg# define LT@&t@_DLSYM_CONST const 41095b16253fSmrg#endif 41105b16253fSmrg 41115b16253fSmrg#ifdef __cplusplus 41125b16253fSmrgextern "C" { 41135b16253fSmrg#endif 41145b16253fSmrg 41155b16253fSmrg_LT_EOF 41165b16253fSmrg # Now generate the symbol file. 41175b16253fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 41185b16253fSmrg 41195b16253fSmrg cat <<_LT_EOF >> conftest.$ac_ext 41205b16253fSmrg 41215b16253fSmrg/* The mapping between symbol names and symbols. */ 41225b16253fSmrgLT@&t@_DLSYM_CONST struct { 41235b16253fSmrg const char *name; 41245b16253fSmrg void *address; 41255b16253fSmrg} 41265b16253fSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41275b16253fSmrg{ 41285b16253fSmrg { "@PROGRAM@", (void *) 0 }, 41295b16253fSmrg_LT_EOF 41305b16253fSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41315b16253fSmrg cat <<\_LT_EOF >> conftest.$ac_ext 41325b16253fSmrg {0, (void *) 0} 41335b16253fSmrg}; 41345b16253fSmrg 41355b16253fSmrg/* This works around a problem in FreeBSD linker */ 41365b16253fSmrg#ifdef FREEBSD_WORKAROUND 41375b16253fSmrgstatic const void *lt_preloaded_setup() { 41385b16253fSmrg return lt__PROGRAM__LTX_preloaded_symbols; 41395b16253fSmrg} 41405b16253fSmrg#endif 41415b16253fSmrg 41425b16253fSmrg#ifdef __cplusplus 41435b16253fSmrg} 41445b16253fSmrg#endif 41455b16253fSmrg_LT_EOF 41465b16253fSmrg # Now try linking the two files. 41475b16253fSmrg mv conftest.$ac_objext conftstm.$ac_objext 41485b16253fSmrg lt_globsym_save_LIBS=$LIBS 41495b16253fSmrg lt_globsym_save_CFLAGS=$CFLAGS 41505b16253fSmrg LIBS=conftstm.$ac_objext 41515b16253fSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 41525b16253fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41535b16253fSmrg pipe_works=yes 41545b16253fSmrg fi 41555b16253fSmrg LIBS=$lt_globsym_save_LIBS 41565b16253fSmrg CFLAGS=$lt_globsym_save_CFLAGS 41575b16253fSmrg else 41585b16253fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 41595b16253fSmrg fi 41605b16253fSmrg else 41615b16253fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 41625b16253fSmrg fi 41635b16253fSmrg else 41645b16253fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 41655b16253fSmrg fi 41665b16253fSmrg else 41675b16253fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41685b16253fSmrg cat conftest.$ac_ext >&5 41695b16253fSmrg fi 41705b16253fSmrg rm -rf conftest* conftst* 41715b16253fSmrg 41725b16253fSmrg # Do not use the global_symbol_pipe unless it works. 41735b16253fSmrg if test yes = "$pipe_works"; then 41745b16253fSmrg break 41755b16253fSmrg else 41765b16253fSmrg lt_cv_sys_global_symbol_pipe= 41775b16253fSmrg fi 41785b16253fSmrgdone 41795b16253fSmrg]) 41805b16253fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 41815b16253fSmrg lt_cv_sys_global_symbol_to_cdecl= 41825b16253fSmrgfi 41835b16253fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 41845b16253fSmrg AC_MSG_RESULT(failed) 41855b16253fSmrgelse 41865b16253fSmrg AC_MSG_RESULT(ok) 41875b16253fSmrgfi 41885b16253fSmrg 41895b16253fSmrg# Response file support. 41905b16253fSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 41915b16253fSmrg nm_file_list_spec='@' 41925b16253fSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 41935b16253fSmrg nm_file_list_spec='@' 41945b16253fSmrgfi 41955b16253fSmrg 41965b16253fSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 41975b16253fSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 41985b16253fSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 41995b16253fSmrg [Transform the output of nm in a proper C declaration]) 42005b16253fSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 42015b16253fSmrg [Transform the output of nm into a list of symbols to manually relocate]) 42025b16253fSmrg_LT_DECL([global_symbol_to_c_name_address], 42035b16253fSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 42045b16253fSmrg [Transform the output of nm in a C name address pair]) 42055b16253fSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 42065b16253fSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 42075b16253fSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 42085b16253fSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 42095b16253fSmrg [The name lister interface]) 42105b16253fSmrg_LT_DECL([], [nm_file_list_spec], [1], 42115b16253fSmrg [Specify filename containing input files for $NM]) 42125b16253fSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 42135b16253fSmrg 42145b16253fSmrg 42155b16253fSmrg# _LT_COMPILER_PIC([TAGNAME]) 42165b16253fSmrg# --------------------------- 42175b16253fSmrgm4_defun([_LT_COMPILER_PIC], 42185b16253fSmrg[m4_require([_LT_TAG_COMPILER])dnl 42195b16253fSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42205b16253fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42215b16253fSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 42225b16253fSmrg 42235b16253fSmrgm4_if([$1], [CXX], [ 42245b16253fSmrg # C++ specific cases for pic, static, wl, etc. 42255b16253fSmrg if test yes = "$GXX"; then 42265b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42275b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42285b16253fSmrg 42295b16253fSmrg case $host_os in 42305b16253fSmrg aix*) 42315b16253fSmrg # All AIX code is PIC. 42325b16253fSmrg if test ia64 = "$host_cpu"; then 42335b16253fSmrg # AIX 5 now supports IA64 processor 42345b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42355b16253fSmrg fi 42365b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42375b16253fSmrg ;; 42385b16253fSmrg 42395b16253fSmrg amigaos*) 42405b16253fSmrg case $host_cpu in 42415b16253fSmrg powerpc) 42425b16253fSmrg # see comment about AmigaOS4 .so support 42435b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42445b16253fSmrg ;; 42455b16253fSmrg m68k) 42465b16253fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 42475b16253fSmrg # adding the '-m68020' flag to GCC prevents building anything better, 42485b16253fSmrg # like '-m68040'. 42495b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42505b16253fSmrg ;; 42515b16253fSmrg esac 42525b16253fSmrg ;; 42535b16253fSmrg 42545b16253fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42555b16253fSmrg # PIC is the default for these OSes. 42565b16253fSmrg ;; 42575b16253fSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42585b16253fSmrg # This hack is so that the source file can tell whether it is being 42595b16253fSmrg # built for inclusion in a dll (and should export symbols for example). 42605b16253fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42615b16253fSmrg # (--disable-auto-import) libraries 42625b16253fSmrg m4_if([$1], [GCJ], [], 42635b16253fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42645b16253fSmrg case $host_os in 42655b16253fSmrg os2*) 42665b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 42675b16253fSmrg ;; 42685b16253fSmrg esac 42695b16253fSmrg ;; 42705b16253fSmrg darwin* | rhapsody*) 42715b16253fSmrg # PIC is the default on this platform 42725b16253fSmrg # Common symbols not allowed in MH_DYLIB files 42735b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42745b16253fSmrg ;; 42755b16253fSmrg *djgpp*) 42765b16253fSmrg # DJGPP does not support shared libraries at all 42775b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42785b16253fSmrg ;; 42795b16253fSmrg haiku*) 42805b16253fSmrg # PIC is the default for Haiku. 42815b16253fSmrg # The "-static" flag exists, but is broken. 42825b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42835b16253fSmrg ;; 42845b16253fSmrg interix[[3-9]]*) 42855b16253fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42865b16253fSmrg # Instead, we relocate shared libraries at runtime. 42875b16253fSmrg ;; 42885b16253fSmrg sysv4*MP*) 42895b16253fSmrg if test -d /usr/nec; then 42905b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42915b16253fSmrg fi 42925b16253fSmrg ;; 42935b16253fSmrg hpux*) 42945b16253fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42955b16253fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42965b16253fSmrg # sets the default TLS model and affects inlining. 42975b16253fSmrg case $host_cpu in 42985b16253fSmrg hppa*64*) 42995b16253fSmrg ;; 43005b16253fSmrg *) 43015b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43025b16253fSmrg ;; 43035b16253fSmrg esac 43045b16253fSmrg ;; 43055b16253fSmrg *qnx* | *nto*) 43065b16253fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 43075b16253fSmrg # it will coredump. 43085b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43095b16253fSmrg ;; 43105b16253fSmrg *) 43115b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43125b16253fSmrg ;; 43135b16253fSmrg esac 43145b16253fSmrg else 43155b16253fSmrg case $host_os in 43165b16253fSmrg aix[[4-9]]*) 43175b16253fSmrg # All AIX code is PIC. 43185b16253fSmrg if test ia64 = "$host_cpu"; then 43195b16253fSmrg # AIX 5 now supports IA64 processor 43205b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43215b16253fSmrg else 43225b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43235b16253fSmrg fi 43245b16253fSmrg ;; 43255b16253fSmrg chorus*) 43265b16253fSmrg case $cc_basename in 43275b16253fSmrg cxch68*) 43285b16253fSmrg # Green Hills C++ Compiler 43295b16253fSmrg # _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" 43305b16253fSmrg ;; 43315b16253fSmrg esac 43325b16253fSmrg ;; 43335b16253fSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 43345b16253fSmrg # This hack is so that the source file can tell whether it is being 43355b16253fSmrg # built for inclusion in a dll (and should export symbols for example). 43365b16253fSmrg m4_if([$1], [GCJ], [], 43375b16253fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43385b16253fSmrg ;; 43395b16253fSmrg dgux*) 43405b16253fSmrg case $cc_basename in 43415b16253fSmrg ec++*) 43425b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43435b16253fSmrg ;; 43445b16253fSmrg ghcx*) 43455b16253fSmrg # Green Hills C++ Compiler 43465b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43475b16253fSmrg ;; 43485b16253fSmrg *) 43495b16253fSmrg ;; 43505b16253fSmrg esac 43515b16253fSmrg ;; 43525b16253fSmrg freebsd* | dragonfly* | midnightbsd*) 43535b16253fSmrg # FreeBSD uses GNU C++ 43545b16253fSmrg ;; 43555b16253fSmrg hpux9* | hpux10* | hpux11*) 43565b16253fSmrg case $cc_basename in 43575b16253fSmrg CC*) 43585b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43595b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43605b16253fSmrg if test ia64 != "$host_cpu"; then 43615b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43625b16253fSmrg fi 43635b16253fSmrg ;; 43645b16253fSmrg aCC*) 43655b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43665b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43675b16253fSmrg case $host_cpu in 43685b16253fSmrg hppa*64*|ia64*) 43695b16253fSmrg # +Z the default 43705b16253fSmrg ;; 43715b16253fSmrg *) 43725b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43735b16253fSmrg ;; 43745b16253fSmrg esac 43755b16253fSmrg ;; 43765b16253fSmrg *) 43775b16253fSmrg ;; 43785b16253fSmrg esac 43795b16253fSmrg ;; 43805b16253fSmrg interix*) 43815b16253fSmrg # This is c89, which is MS Visual C++ (no shared libs) 43825b16253fSmrg # Anyone wants to do a port? 43835b16253fSmrg ;; 43845b16253fSmrg irix5* | irix6* | nonstopux*) 43855b16253fSmrg case $cc_basename in 43865b16253fSmrg CC*) 43875b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43885b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43895b16253fSmrg # CC pic flag -KPIC is the default. 43905b16253fSmrg ;; 43915b16253fSmrg *) 43925b16253fSmrg ;; 43935b16253fSmrg esac 43945b16253fSmrg ;; 43955b16253fSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43965b16253fSmrg case $cc_basename in 43975b16253fSmrg KCC*) 43985b16253fSmrg # KAI C++ Compiler 43995b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44005b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44015b16253fSmrg ;; 44025b16253fSmrg ecpc* ) 44035b16253fSmrg # old Intel C++ for x86_64, which still supported -KPIC. 44045b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44055b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44065b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44075b16253fSmrg ;; 44085b16253fSmrg icpc* ) 44095b16253fSmrg # Intel C++, used to be incompatible with GCC. 44105b16253fSmrg # ICC 10 doesn't accept -KPIC any more. 44115b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44125b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44135b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44145b16253fSmrg ;; 44155b16253fSmrg pgCC* | pgcpp*) 44165b16253fSmrg # Portland Group C++ compiler 44175b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44185b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44195b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44205b16253fSmrg ;; 44215b16253fSmrg cxx*) 44225b16253fSmrg # Compaq C++ 44235b16253fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 44245b16253fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 44255b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44265b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44275b16253fSmrg ;; 44285b16253fSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 44295b16253fSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44305b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44315b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44325b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44335b16253fSmrg ;; 44345b16253fSmrg *) 44355b16253fSmrg case `$CC -V 2>&1 | $SED 5q` in 44365b16253fSmrg *Sun\ C*) 44375b16253fSmrg # Sun C++ 5.9 44385b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44395b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44405b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44415b16253fSmrg ;; 44425b16253fSmrg esac 44435b16253fSmrg ;; 44445b16253fSmrg esac 44455b16253fSmrg ;; 44465b16253fSmrg lynxos*) 44475b16253fSmrg ;; 44485b16253fSmrg m88k*) 44495b16253fSmrg ;; 44505b16253fSmrg mvs*) 44515b16253fSmrg case $cc_basename in 44525b16253fSmrg cxx*) 44535b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44545b16253fSmrg ;; 44555b16253fSmrg *) 44565b16253fSmrg ;; 44575b16253fSmrg esac 44585b16253fSmrg ;; 4459efbcb2bfSmrg netbsd* | netbsdelf*-gnu) 44605b16253fSmrg ;; 44615b16253fSmrg *qnx* | *nto*) 44625b16253fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44635b16253fSmrg # it will coredump. 44645b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44655b16253fSmrg ;; 44665b16253fSmrg osf3* | osf4* | osf5*) 44675b16253fSmrg case $cc_basename in 44685b16253fSmrg KCC*) 44695b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44705b16253fSmrg ;; 44715b16253fSmrg RCC*) 44725b16253fSmrg # Rational C++ 2.4.1 44735b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44745b16253fSmrg ;; 44755b16253fSmrg cxx*) 44765b16253fSmrg # Digital/Compaq C++ 44775b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44785b16253fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 44795b16253fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 44805b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44815b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44825b16253fSmrg ;; 44835b16253fSmrg *) 44845b16253fSmrg ;; 44855b16253fSmrg esac 44865b16253fSmrg ;; 44875b16253fSmrg psos*) 44885b16253fSmrg ;; 44895b16253fSmrg solaris*) 44905b16253fSmrg case $cc_basename in 44915b16253fSmrg CC* | sunCC*) 44925b16253fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 44935b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44945b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44955b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44965b16253fSmrg ;; 44975b16253fSmrg gcx*) 44985b16253fSmrg # Green Hills C++ Compiler 44995b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 45005b16253fSmrg ;; 45015b16253fSmrg *) 45025b16253fSmrg ;; 45035b16253fSmrg esac 45045b16253fSmrg ;; 45055b16253fSmrg sunos4*) 45065b16253fSmrg case $cc_basename in 45075b16253fSmrg CC*) 45085b16253fSmrg # Sun C++ 4.x 45095b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45105b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45115b16253fSmrg ;; 45125b16253fSmrg lcc*) 45135b16253fSmrg # Lucid 45145b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45155b16253fSmrg ;; 45165b16253fSmrg *) 45175b16253fSmrg ;; 45185b16253fSmrg esac 45195b16253fSmrg ;; 45205b16253fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45215b16253fSmrg case $cc_basename in 45225b16253fSmrg CC*) 45235b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45245b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45255b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45265b16253fSmrg ;; 45275b16253fSmrg esac 45285b16253fSmrg ;; 45295b16253fSmrg tandem*) 45305b16253fSmrg case $cc_basename in 45315b16253fSmrg NCC*) 45325b16253fSmrg # NonStop-UX NCC 3.20 45335b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45345b16253fSmrg ;; 45355b16253fSmrg *) 45365b16253fSmrg ;; 45375b16253fSmrg esac 45385b16253fSmrg ;; 45395b16253fSmrg vxworks*) 45405b16253fSmrg ;; 45415b16253fSmrg *) 45425b16253fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45435b16253fSmrg ;; 45445b16253fSmrg esac 45455b16253fSmrg fi 45465b16253fSmrg], 45475b16253fSmrg[ 45485b16253fSmrg if test yes = "$GCC"; then 45495b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45505b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45515b16253fSmrg 45525b16253fSmrg case $host_os in 45535b16253fSmrg aix*) 45545b16253fSmrg # All AIX code is PIC. 45555b16253fSmrg if test ia64 = "$host_cpu"; then 45565b16253fSmrg # AIX 5 now supports IA64 processor 45575b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45585b16253fSmrg fi 45595b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45605b16253fSmrg ;; 45615b16253fSmrg 45625b16253fSmrg amigaos*) 45635b16253fSmrg case $host_cpu in 45645b16253fSmrg powerpc) 45655b16253fSmrg # see comment about AmigaOS4 .so support 45665b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45675b16253fSmrg ;; 45685b16253fSmrg m68k) 45695b16253fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 45705b16253fSmrg # adding the '-m68020' flag to GCC prevents building anything better, 45715b16253fSmrg # like '-m68040'. 45725b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45735b16253fSmrg ;; 45745b16253fSmrg esac 45755b16253fSmrg ;; 45765b16253fSmrg 45775b16253fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45785b16253fSmrg # PIC is the default for these OSes. 45795b16253fSmrg ;; 45805b16253fSmrg 45815b16253fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 45825b16253fSmrg # This hack is so that the source file can tell whether it is being 45835b16253fSmrg # built for inclusion in a dll (and should export symbols for example). 45845b16253fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 45855b16253fSmrg # (--disable-auto-import) libraries 45865b16253fSmrg m4_if([$1], [GCJ], [], 45875b16253fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 45885b16253fSmrg case $host_os in 45895b16253fSmrg os2*) 45905b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 45915b16253fSmrg ;; 45925b16253fSmrg esac 45935b16253fSmrg ;; 45945b16253fSmrg 45955b16253fSmrg darwin* | rhapsody*) 45965b16253fSmrg # PIC is the default on this platform 45975b16253fSmrg # Common symbols not allowed in MH_DYLIB files 45985b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 45995b16253fSmrg ;; 46005b16253fSmrg 46015b16253fSmrg haiku*) 46025b16253fSmrg # PIC is the default for Haiku. 46035b16253fSmrg # The "-static" flag exists, but is broken. 46045b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 46055b16253fSmrg ;; 46065b16253fSmrg 46075b16253fSmrg hpux*) 46085b16253fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 46095b16253fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 46105b16253fSmrg # sets the default TLS model and affects inlining. 46115b16253fSmrg case $host_cpu in 46125b16253fSmrg hppa*64*) 46135b16253fSmrg # +Z the default 46145b16253fSmrg ;; 46155b16253fSmrg *) 46165b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46175b16253fSmrg ;; 46185b16253fSmrg esac 46195b16253fSmrg ;; 46205b16253fSmrg 46215b16253fSmrg interix[[3-9]]*) 46225b16253fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46235b16253fSmrg # Instead, we relocate shared libraries at runtime. 46245b16253fSmrg ;; 46255b16253fSmrg 46265b16253fSmrg msdosdjgpp*) 46275b16253fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46285b16253fSmrg # on systems that don't support them. 46295b16253fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46305b16253fSmrg enable_shared=no 46315b16253fSmrg ;; 46325b16253fSmrg 46335b16253fSmrg *nto* | *qnx*) 46345b16253fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46355b16253fSmrg # it will coredump. 46365b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46375b16253fSmrg ;; 46385b16253fSmrg 46395b16253fSmrg sysv4*MP*) 46405b16253fSmrg if test -d /usr/nec; then 46415b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46425b16253fSmrg fi 46435b16253fSmrg ;; 46445b16253fSmrg 46455b16253fSmrg *) 46465b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46475b16253fSmrg ;; 46485b16253fSmrg esac 46495b16253fSmrg 46505b16253fSmrg case $cc_basename in 46515b16253fSmrg nvcc*) # Cuda Compiler Driver 2.2 46525b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 46535b16253fSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 46545b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 46555b16253fSmrg fi 46565b16253fSmrg ;; 46575b16253fSmrg esac 46585b16253fSmrg else 46595b16253fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 46605b16253fSmrg case $host_os in 46615b16253fSmrg aix*) 46625b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46635b16253fSmrg if test ia64 = "$host_cpu"; then 46645b16253fSmrg # AIX 5 now supports IA64 processor 46655b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46665b16253fSmrg else 46675b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46685b16253fSmrg fi 46695b16253fSmrg ;; 46705b16253fSmrg 46715b16253fSmrg darwin* | rhapsody*) 46725b16253fSmrg # PIC is the default on this platform 46735b16253fSmrg # Common symbols not allowed in MH_DYLIB files 46745b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 46755b16253fSmrg case $cc_basename in 46765b16253fSmrg nagfor*) 46775b16253fSmrg # NAG Fortran compiler 46785b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 46795b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 46805b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46815b16253fSmrg ;; 46825b16253fSmrg esac 46835b16253fSmrg ;; 46845b16253fSmrg 46855b16253fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46865b16253fSmrg # This hack is so that the source file can tell whether it is being 46875b16253fSmrg # built for inclusion in a dll (and should export symbols for example). 46885b16253fSmrg m4_if([$1], [GCJ], [], 46895b16253fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 46905b16253fSmrg case $host_os in 46915b16253fSmrg os2*) 46925b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 46935b16253fSmrg ;; 46945b16253fSmrg esac 46955b16253fSmrg ;; 46965b16253fSmrg 46975b16253fSmrg hpux9* | hpux10* | hpux11*) 46985b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46995b16253fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 47005b16253fSmrg # not for PA HP-UX. 47015b16253fSmrg case $host_cpu in 47025b16253fSmrg hppa*64*|ia64*) 47035b16253fSmrg # +Z the default 47045b16253fSmrg ;; 47055b16253fSmrg *) 47065b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 47075b16253fSmrg ;; 47085b16253fSmrg esac 47095b16253fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 47105b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 47115b16253fSmrg ;; 47125b16253fSmrg 47135b16253fSmrg irix5* | irix6* | nonstopux*) 47145b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47155b16253fSmrg # PIC (with -KPIC) is the default. 47165b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47175b16253fSmrg ;; 47185b16253fSmrg 47195b16253fSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47205b16253fSmrg case $cc_basename in 47215b16253fSmrg # old Intel for x86_64, which still supported -KPIC. 47225b16253fSmrg ecc*) 47235b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47245b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47255b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47265b16253fSmrg ;; 4727efbcb2bfSmrg # flang / f18. f95 an alias for gfortran or flang on Debian 4728efbcb2bfSmrg flang* | f18* | f95*) 4729efbcb2bfSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4730efbcb2bfSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4731efbcb2bfSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4732efbcb2bfSmrg ;; 47335b16253fSmrg # icc used to be incompatible with GCC. 47345b16253fSmrg # ICC 10 doesn't accept -KPIC any more. 47355b16253fSmrg icc* | ifort*) 47365b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47375b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47385b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47395b16253fSmrg ;; 47405b16253fSmrg # Lahey Fortran 8.1. 47415b16253fSmrg lf95*) 47425b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47435b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47445b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47455b16253fSmrg ;; 47465b16253fSmrg nagfor*) 47475b16253fSmrg # NAG Fortran compiler 47485b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47495b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47505b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47515b16253fSmrg ;; 47525b16253fSmrg tcc*) 47535b16253fSmrg # Fabrice Bellard et al's Tiny C Compiler 47545b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47555b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47565b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47575b16253fSmrg ;; 47585b16253fSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47595b16253fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 47605b16253fSmrg # which looks to be a dead project) 47615b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47625b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47635b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47645b16253fSmrg ;; 47655b16253fSmrg ccc*) 47665b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47675b16253fSmrg # All Alpha code is PIC. 47685b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47695b16253fSmrg ;; 47705b16253fSmrg xl* | bgxl* | bgf* | mpixl*) 47715b16253fSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47725b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47735b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47745b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47755b16253fSmrg ;; 47765b16253fSmrg *) 47775b16253fSmrg case `$CC -V 2>&1 | $SED 5q` in 47785b16253fSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47795b16253fSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 47805b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47815b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47825b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47835b16253fSmrg ;; 47845b16253fSmrg *Sun\ F* | *Sun*Fortran*) 47855b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47865b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47875b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 47885b16253fSmrg ;; 47895b16253fSmrg *Sun\ C*) 47905b16253fSmrg # Sun C 5.9 47915b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47925b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47935b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47945b16253fSmrg ;; 47955b16253fSmrg *Intel*\ [[CF]]*Compiler*) 47965b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47975b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47985b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47995b16253fSmrg ;; 48005b16253fSmrg *Portland\ Group*) 48015b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48025b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 48035b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48045b16253fSmrg ;; 48055b16253fSmrg esac 48065b16253fSmrg ;; 48075b16253fSmrg esac 48085b16253fSmrg ;; 48095b16253fSmrg 48105b16253fSmrg newsos6) 48115b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48125b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48135b16253fSmrg ;; 48145b16253fSmrg 48155b16253fSmrg *nto* | *qnx*) 48165b16253fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 48175b16253fSmrg # it will coredump. 48185b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 48195b16253fSmrg ;; 48205b16253fSmrg 48215b16253fSmrg osf3* | osf4* | osf5*) 48225b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48235b16253fSmrg # All OSF/1 code is PIC. 48245b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48255b16253fSmrg ;; 48265b16253fSmrg 48275b16253fSmrg rdos*) 48285b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48295b16253fSmrg ;; 48305b16253fSmrg 48315b16253fSmrg solaris*) 48325b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48335b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48345b16253fSmrg case $cc_basename in 48355b16253fSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48365b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48375b16253fSmrg *) 48385b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48395b16253fSmrg esac 48405b16253fSmrg ;; 48415b16253fSmrg 48425b16253fSmrg sunos4*) 48435b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48445b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48455b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48465b16253fSmrg ;; 48475b16253fSmrg 48485b16253fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 48495b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48505b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48515b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48525b16253fSmrg ;; 48535b16253fSmrg 48545b16253fSmrg sysv4*MP*) 48555b16253fSmrg if test -d /usr/nec; then 48565b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48575b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48585b16253fSmrg fi 48595b16253fSmrg ;; 48605b16253fSmrg 48615b16253fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48625b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48635b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48645b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48655b16253fSmrg ;; 48665b16253fSmrg 48675b16253fSmrg unicos*) 48685b16253fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48695b16253fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48705b16253fSmrg ;; 48715b16253fSmrg 48725b16253fSmrg uts4*) 48735b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48745b16253fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48755b16253fSmrg ;; 48765b16253fSmrg 48775b16253fSmrg *) 48785b16253fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48795b16253fSmrg ;; 48805b16253fSmrg esac 48815b16253fSmrg fi 48825b16253fSmrg]) 48835b16253fSmrgcase $host_os in 48845b16253fSmrg # For platforms that do not support PIC, -DPIC is meaningless: 48855b16253fSmrg *djgpp*) 48865b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 48875b16253fSmrg ;; 48885b16253fSmrg *) 48895b16253fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 48905b16253fSmrg ;; 48915b16253fSmrgesac 48925b16253fSmrg 48935b16253fSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 48945b16253fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 48955b16253fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 48965b16253fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 48975b16253fSmrg 48985b16253fSmrg# 48995b16253fSmrg# Check to make sure the PIC flag actually works. 49005b16253fSmrg# 49015b16253fSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 49025b16253fSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 49035b16253fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 49045b16253fSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 49055b16253fSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 49065b16253fSmrg "" | " "*) ;; 49075b16253fSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 49085b16253fSmrg esac], 49095b16253fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 49105b16253fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 49115b16253fSmrgfi 49125b16253fSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 49135b16253fSmrg [Additional compiler flags for building library objects]) 49145b16253fSmrg 49155b16253fSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 49165b16253fSmrg [How to pass a linker flag through the compiler]) 49175b16253fSmrg# 49185b16253fSmrg# Check to make sure the static flag actually works. 49195b16253fSmrg# 49205b16253fSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 49215b16253fSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 49225b16253fSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 49235b16253fSmrg $lt_tmp_static_flag, 49245b16253fSmrg [], 49255b16253fSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49265b16253fSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49275b16253fSmrg [Compiler flag to prevent dynamic linking]) 49285b16253fSmrg])# _LT_COMPILER_PIC 49295b16253fSmrg 49305b16253fSmrg 49315b16253fSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 49325b16253fSmrg# ---------------------------- 49335b16253fSmrg# See if the linker supports building shared libraries. 49345b16253fSmrgm4_defun([_LT_LINKER_SHLIBS], 49355b16253fSmrg[AC_REQUIRE([LT_PATH_LD])dnl 49365b16253fSmrgAC_REQUIRE([LT_PATH_NM])dnl 49375b16253fSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49385b16253fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49395b16253fSmrgm4_require([_LT_DECL_EGREP])dnl 49405b16253fSmrgm4_require([_LT_DECL_SED])dnl 49415b16253fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49425b16253fSmrgm4_require([_LT_TAG_COMPILER])dnl 49435b16253fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49445b16253fSmrgm4_if([$1], [CXX], [ 49455b16253fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49465b16253fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49475b16253fSmrg case $host_os in 49485b16253fSmrg aix[[4-9]]*) 49495b16253fSmrg # If we're using GNU nm, then we don't want the "-C" option. 49505b16253fSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 49515b16253fSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 49525b16253fSmrg # weak defined symbols like other global defined symbols, whereas 49535b16253fSmrg # GNU nm marks them as "W". 49545b16253fSmrg # While the 'weak' keyword is ignored in the Export File, we need 49555b16253fSmrg # it in the Import File for the 'aix-soname' feature, so we have 49565b16253fSmrg # to replace the "-B" option with "-P" for AIX nm. 49575b16253fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 49585b16253fSmrg _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' 49595b16253fSmrg else 49605b16253fSmrg _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' 49615b16253fSmrg fi 49625b16253fSmrg ;; 49635b16253fSmrg pw32*) 49645b16253fSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 49655b16253fSmrg ;; 49665b16253fSmrg cygwin* | mingw* | cegcc*) 49675b16253fSmrg case $cc_basename in 49685b16253fSmrg cl* | icl*) 49695b16253fSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 49705b16253fSmrg ;; 49715b16253fSmrg *) 49725b16253fSmrg _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' 49735b16253fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 49745b16253fSmrg ;; 49755b16253fSmrg esac 49765b16253fSmrg ;; 4977efbcb2bfSmrg linux* | k*bsd*-gnu | gnu*) 4978efbcb2bfSmrg _LT_TAGVAR(link_all_deplibs, $1)=no 4979efbcb2bfSmrg ;; 49805b16253fSmrg *) 49815b16253fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49825b16253fSmrg ;; 49835b16253fSmrg esac 49845b16253fSmrg], [ 49855b16253fSmrg runpath_var= 49865b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 49875b16253fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 49885b16253fSmrg _LT_TAGVAR(archive_cmds, $1)= 49895b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 49905b16253fSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 49915b16253fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 49925b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49935b16253fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49945b16253fSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 49955b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 49965b16253fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 49975b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49985b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 49995b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 50005b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 50015b16253fSmrg _LT_TAGVAR(inherit_rpath, $1)=no 50025b16253fSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 50035b16253fSmrg _LT_TAGVAR(module_cmds, $1)= 50045b16253fSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 50055b16253fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 50065b16253fSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 50075b16253fSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 50085b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50095b16253fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 50105b16253fSmrg # included in the symbol list 50115b16253fSmrg _LT_TAGVAR(include_expsyms, $1)= 50125b16253fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 50135b16253fSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 50145b16253fSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 50155b16253fSmrg # as well as any symbol that contains 'd'. 50165b16253fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 50175b16253fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 50185b16253fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 50195b16253fSmrg # the symbol is explicitly referenced. Since portable code cannot 50205b16253fSmrg # rely on this symbol name, it's probably fine to never include it in 50215b16253fSmrg # preloaded symbol tables. 50225b16253fSmrg # Exclude shared library initialization/finalization symbols. 50235b16253fSmrgdnl Note also adjust exclude_expsyms for C++ above. 50245b16253fSmrg extract_expsyms_cmds= 50255b16253fSmrg 50265b16253fSmrg case $host_os in 50275b16253fSmrg cygwin* | mingw* | pw32* | cegcc*) 50285b16253fSmrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 50295b16253fSmrg # When not using gcc, we currently assume that we are using 50305b16253fSmrg # Microsoft Visual C++ or Intel C++ Compiler. 50315b16253fSmrg if test yes != "$GCC"; then 50325b16253fSmrg with_gnu_ld=no 50335b16253fSmrg fi 50345b16253fSmrg ;; 50355b16253fSmrg interix*) 50365b16253fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 50375b16253fSmrg with_gnu_ld=yes 50385b16253fSmrg ;; 50395b16253fSmrg openbsd* | bitrig*) 50405b16253fSmrg with_gnu_ld=no 50415b16253fSmrg ;; 5042efbcb2bfSmrg linux* | k*bsd*-gnu | gnu*) 5043efbcb2bfSmrg _LT_TAGVAR(link_all_deplibs, $1)=no 5044efbcb2bfSmrg ;; 50455b16253fSmrg esac 50465b16253fSmrg 50475b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 50485b16253fSmrg 50495b16253fSmrg # On some targets, GNU ld is compatible enough with the native linker 50505b16253fSmrg # that we're better off using the native interface for both. 50515b16253fSmrg lt_use_gnu_ld_interface=no 50525b16253fSmrg if test yes = "$with_gnu_ld"; then 50535b16253fSmrg case $host_os in 50545b16253fSmrg aix*) 50555b16253fSmrg # The AIX port of GNU ld has always aspired to compatibility 50565b16253fSmrg # with the native linker. However, as the warning in the GNU ld 50575b16253fSmrg # block says, versions before 2.19.5* couldn't really create working 50585b16253fSmrg # shared libraries, regardless of the interface used. 50595b16253fSmrg case `$LD -v 2>&1` in 50605b16253fSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50615b16253fSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50625b16253fSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50635b16253fSmrg *) 50645b16253fSmrg lt_use_gnu_ld_interface=yes 50655b16253fSmrg ;; 50665b16253fSmrg esac 50675b16253fSmrg ;; 50685b16253fSmrg *) 50695b16253fSmrg lt_use_gnu_ld_interface=yes 50705b16253fSmrg ;; 50715b16253fSmrg esac 50725b16253fSmrg fi 50735b16253fSmrg 50745b16253fSmrg if test yes = "$lt_use_gnu_ld_interface"; then 50755b16253fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 50765b16253fSmrg wlarc='$wl' 50775b16253fSmrg 50785b16253fSmrg # Set some defaults for GNU ld with shared library support. These 50795b16253fSmrg # are reset later if shared libraries are not supported. Putting them 50805b16253fSmrg # here allows them to be overridden if necessary. 50815b16253fSmrg runpath_var=LD_RUN_PATH 50825b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 50835b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50845b16253fSmrg # ancient GNU ld didn't support --whole-archive et. al. 50855b16253fSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 50865b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50875b16253fSmrg else 50885b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50895b16253fSmrg fi 50905b16253fSmrg supports_anon_versioning=no 50915b16253fSmrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 50925b16253fSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 50935b16253fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 50945b16253fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 50955b16253fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 50965b16253fSmrg *\ 2.11.*) ;; # other 2.11 versions 50975b16253fSmrg *) supports_anon_versioning=yes ;; 50985b16253fSmrg esac 50995b16253fSmrg 51005b16253fSmrg # See if GNU ld supports shared libraries. 51015b16253fSmrg case $host_os in 51025b16253fSmrg aix[[3-9]]*) 51035b16253fSmrg # On AIX/PPC, the GNU linker is very broken 51045b16253fSmrg if test ia64 != "$host_cpu"; then 51055b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51065b16253fSmrg cat <<_LT_EOF 1>&2 51075b16253fSmrg 51085b16253fSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 51095b16253fSmrg*** to be unable to reliably create shared libraries on AIX. 51105b16253fSmrg*** Therefore, libtool is disabling shared libraries support. If you 51115b16253fSmrg*** really care for shared libraries, you may want to install binutils 51125b16253fSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 51135b16253fSmrg*** You will then need to restart the configuration process. 51145b16253fSmrg 51155b16253fSmrg_LT_EOF 51165b16253fSmrg fi 51175b16253fSmrg ;; 51185b16253fSmrg 51195b16253fSmrg amigaos*) 51205b16253fSmrg case $host_cpu in 51215b16253fSmrg powerpc) 51225b16253fSmrg # see comment about AmigaOS4 .so support 51235b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51245b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51255b16253fSmrg ;; 51265b16253fSmrg m68k) 51275b16253fSmrg _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)' 51285b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51295b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51305b16253fSmrg ;; 51315b16253fSmrg esac 51325b16253fSmrg ;; 51335b16253fSmrg 51345b16253fSmrg beos*) 51355b16253fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51365b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51375b16253fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51385b16253fSmrg # support --undefined. This deserves some investigation. FIXME 51395b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51405b16253fSmrg else 51415b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51425b16253fSmrg fi 51435b16253fSmrg ;; 51445b16253fSmrg 51455b16253fSmrg cygwin* | mingw* | pw32* | cegcc*) 51465b16253fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51475b16253fSmrg # as there is no search path for DLLs. 51485b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51495b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51505b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51515b16253fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 51525b16253fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51535b16253fSmrg _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' 51545b16253fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 51555b16253fSmrg 51565b16253fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 51575b16253fSmrg _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' 51585b16253fSmrg # If the export-symbols file already is a .def file, use it as 51595b16253fSmrg # is; otherwise, prepend EXPORTS... 51605b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 51615b16253fSmrg cp $export_symbols $output_objdir/$soname.def; 51625b16253fSmrg else 51635b16253fSmrg echo EXPORTS > $output_objdir/$soname.def; 51645b16253fSmrg cat $export_symbols >> $output_objdir/$soname.def; 51655b16253fSmrg fi~ 51665b16253fSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51675b16253fSmrg else 51685b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51695b16253fSmrg fi 51705b16253fSmrg ;; 51715b16253fSmrg 51725b16253fSmrg haiku*) 51735b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51745b16253fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 51755b16253fSmrg ;; 51765b16253fSmrg 51775b16253fSmrg os2*) 51785b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51795b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51805b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51815b16253fSmrg shrext_cmds=.dll 51825b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51835b16253fSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51845b16253fSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51855b16253fSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51865b16253fSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 51875b16253fSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51885b16253fSmrg emximp -o $lib $output_objdir/$libname.def' 51895b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51905b16253fSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51915b16253fSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51925b16253fSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51935b16253fSmrg prefix_cmds="$SED"~ 51945b16253fSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 51955b16253fSmrg prefix_cmds="$prefix_cmds -e 1d"; 51965b16253fSmrg fi~ 51975b16253fSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 51985b16253fSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 51995b16253fSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 52005b16253fSmrg emximp -o $lib $output_objdir/$libname.def' 52015b16253fSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 52025b16253fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 52035b16253fSmrg _LT_TAGVAR(file_list_spec, $1)='@' 52045b16253fSmrg ;; 52055b16253fSmrg 52065b16253fSmrg interix[[3-9]]*) 52075b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 52085b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52095b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 52105b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 52115b16253fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 52125b16253fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 52135b16253fSmrg # default) and relocated if they conflict, which is a slow very memory 52145b16253fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 52155b16253fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 52165b16253fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 52175b16253fSmrg _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' 52185b16253fSmrg _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' 52195b16253fSmrg ;; 52205b16253fSmrg 52215b16253fSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 52225b16253fSmrg tmp_diet=no 52235b16253fSmrg if test linux-dietlibc = "$host_os"; then 52245b16253fSmrg case $cc_basename in 52255b16253fSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 52265b16253fSmrg esac 52275b16253fSmrg fi 52285b16253fSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 52295b16253fSmrg && test no = "$tmp_diet" 52305b16253fSmrg then 52315b16253fSmrg tmp_addflag=' $pic_flag' 52325b16253fSmrg tmp_sharedflag='-shared' 52335b16253fSmrg case $cc_basename,$host_cpu in 52345b16253fSmrg pgcc*) # Portland Group C compiler 52355b16253fSmrg _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' 52365b16253fSmrg tmp_addflag=' $pic_flag' 52375b16253fSmrg ;; 52385b16253fSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 52395b16253fSmrg # Portland Group f77 and f90 compilers 52405b16253fSmrg _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' 52415b16253fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 52425b16253fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52435b16253fSmrg tmp_addflag=' -i_dynamic' ;; 52445b16253fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52455b16253fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52465b16253fSmrg ifc* | ifort*) # Intel Fortran compiler 52475b16253fSmrg tmp_addflag=' -nofor_main' ;; 52485b16253fSmrg lf95*) # Lahey Fortran 8.1 52495b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52505b16253fSmrg tmp_sharedflag='--shared' ;; 52515b16253fSmrg nagfor*) # NAGFOR 5.3 52525b16253fSmrg tmp_sharedflag='-Wl,-shared' ;; 52535b16253fSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52545b16253fSmrg tmp_sharedflag='-qmkshrobj' 52555b16253fSmrg tmp_addflag= ;; 52565b16253fSmrg nvcc*) # Cuda Compiler Driver 2.2 52575b16253fSmrg _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' 52585b16253fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52595b16253fSmrg ;; 52605b16253fSmrg esac 52615b16253fSmrg case `$CC -V 2>&1 | $SED 5q` in 52625b16253fSmrg *Sun\ C*) # Sun C 5.9 52635b16253fSmrg _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' 52645b16253fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52655b16253fSmrg tmp_sharedflag='-G' ;; 52665b16253fSmrg *Sun\ F*) # Sun Fortran 8.3 52675b16253fSmrg tmp_sharedflag='-G' ;; 52685b16253fSmrg esac 52695b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52705b16253fSmrg 52715b16253fSmrg if test yes = "$supports_anon_versioning"; then 52725b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52735b16253fSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52745b16253fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52755b16253fSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52765b16253fSmrg fi 52775b16253fSmrg 52785b16253fSmrg case $cc_basename in 52795b16253fSmrg tcc*) 5280efbcb2bfSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52815b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 52825b16253fSmrg ;; 52835b16253fSmrg xlf* | bgf* | bgxlf* | mpixlf*) 52845b16253fSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52855b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 52865b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52875b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 52885b16253fSmrg if test yes = "$supports_anon_versioning"; then 52895b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52905b16253fSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52915b16253fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52925b16253fSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 52935b16253fSmrg fi 52945b16253fSmrg ;; 52955b16253fSmrg esac 52965b16253fSmrg else 52975b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 52985b16253fSmrg fi 52995b16253fSmrg ;; 53005b16253fSmrg 5301efbcb2bfSmrg netbsd* | netbsdelf*-gnu) 53025b16253fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53035b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 53045b16253fSmrg wlarc= 53055b16253fSmrg else 53065b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53075b16253fSmrg _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' 53085b16253fSmrg fi 53095b16253fSmrg ;; 53105b16253fSmrg 53115b16253fSmrg solaris*) 53125b16253fSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 53135b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53145b16253fSmrg cat <<_LT_EOF 1>&2 53155b16253fSmrg 53165b16253fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 53175b16253fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 53185b16253fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 53195b16253fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 53205b16253fSmrg*** your PATH or compiler configuration so that the native linker is 53215b16253fSmrg*** used, and then restart. 53225b16253fSmrg 53235b16253fSmrg_LT_EOF 53245b16253fSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53255b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53265b16253fSmrg _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' 53275b16253fSmrg else 53285b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53295b16253fSmrg fi 53305b16253fSmrg ;; 53315b16253fSmrg 53325b16253fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53335b16253fSmrg case `$LD -v 2>&1` in 53345b16253fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53355b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53365b16253fSmrg cat <<_LT_EOF 1>&2 53375b16253fSmrg 53385b16253fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53395b16253fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53405b16253fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 53415b16253fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53425b16253fSmrg*** your PATH or compiler configuration so that the native linker is 53435b16253fSmrg*** used, and then restart. 53445b16253fSmrg 53455b16253fSmrg_LT_EOF 53465b16253fSmrg ;; 53475b16253fSmrg *) 53485b16253fSmrg # For security reasons, it is highly recommended that you always 53495b16253fSmrg # use absolute paths for naming shared libraries, and exclude the 53505b16253fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 53515b16253fSmrg # requires that you compile everything twice, which is a pain. 53525b16253fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53535b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 53545b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53555b16253fSmrg _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' 53565b16253fSmrg else 53575b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53585b16253fSmrg fi 53595b16253fSmrg ;; 53605b16253fSmrg esac 53615b16253fSmrg ;; 53625b16253fSmrg 53635b16253fSmrg sunos4*) 53645b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53655b16253fSmrg wlarc= 53665b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53675b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53685b16253fSmrg ;; 53695b16253fSmrg 53705b16253fSmrg *) 53715b16253fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53725b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53735b16253fSmrg _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' 53745b16253fSmrg else 53755b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53765b16253fSmrg fi 53775b16253fSmrg ;; 53785b16253fSmrg esac 53795b16253fSmrg 53805b16253fSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53815b16253fSmrg runpath_var= 53825b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53835b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53845b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53855b16253fSmrg fi 53865b16253fSmrg else 53875b16253fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 53885b16253fSmrg case $host_os in 53895b16253fSmrg aix3*) 53905b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53915b16253fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 53925b16253fSmrg _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' 53935b16253fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 53945b16253fSmrg # are no directories specified by -L. 53955b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53965b16253fSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 53975b16253fSmrg # Neither direct hardcoding nor static linking is supported with a 53985b16253fSmrg # broken collect2. 53995b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54005b16253fSmrg fi 54015b16253fSmrg ;; 54025b16253fSmrg 54035b16253fSmrg aix[[4-9]]*) 54045b16253fSmrg if test ia64 = "$host_cpu"; then 54055b16253fSmrg # On IA64, the linker does run time linking by default, so we don't 54065b16253fSmrg # have to do anything special. 54075b16253fSmrg aix_use_runtimelinking=no 54085b16253fSmrg exp_sym_flag='-Bexport' 54095b16253fSmrg no_entry_flag= 54105b16253fSmrg else 54115b16253fSmrg # If we're using GNU nm, then we don't want the "-C" option. 54125b16253fSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 54135b16253fSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 54145b16253fSmrg # weak defined symbols like other global defined symbols, whereas 54155b16253fSmrg # GNU nm marks them as "W". 54165b16253fSmrg # While the 'weak' keyword is ignored in the Export File, we need 54175b16253fSmrg # it in the Import File for the 'aix-soname' feature, so we have 54185b16253fSmrg # to replace the "-B" option with "-P" for AIX nm. 54195b16253fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 54205b16253fSmrg _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' 54215b16253fSmrg else 54225b16253fSmrg _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' 54235b16253fSmrg fi 54245b16253fSmrg aix_use_runtimelinking=no 54255b16253fSmrg 54265b16253fSmrg # Test if we are trying to use run time linking or normal 54275b16253fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 54285b16253fSmrg # have runtime linking enabled, and use it for executables. 54295b16253fSmrg # For shared libraries, we enable/disable runtime linking 54305b16253fSmrg # depending on the kind of the shared library created - 54315b16253fSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 54325b16253fSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 54335b16253fSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 54345b16253fSmrg # lib.a static archive 54355b16253fSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 54365b16253fSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 54375b16253fSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 54385b16253fSmrg # lib.a(lib.so.V) shared, rtl:no 54395b16253fSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 54405b16253fSmrg # lib.a static archive 54415b16253fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54425b16253fSmrg for ld_flag in $LDFLAGS; do 54435b16253fSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54445b16253fSmrg aix_use_runtimelinking=yes 54455b16253fSmrg break 54465b16253fSmrg fi 54475b16253fSmrg done 54485b16253fSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 54495b16253fSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 54505b16253fSmrg # so we don't have lib.a shared libs to link our executables. 54515b16253fSmrg # We have to force runtime linking in this case. 54525b16253fSmrg aix_use_runtimelinking=yes 54535b16253fSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 54545b16253fSmrg fi 54555b16253fSmrg ;; 54565b16253fSmrg esac 54575b16253fSmrg 54585b16253fSmrg exp_sym_flag='-bexport' 54595b16253fSmrg no_entry_flag='-bnoentry' 54605b16253fSmrg fi 54615b16253fSmrg 54625b16253fSmrg # When large executables or shared objects are built, AIX ld can 54635b16253fSmrg # have problems creating the table of contents. If linking a library 54645b16253fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 54655b16253fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54665b16253fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 54675b16253fSmrg 54685b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='' 54695b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 54705b16253fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54715b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54725b16253fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54735b16253fSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 54745b16253fSmrg case $with_aix_soname,$aix_use_runtimelinking in 54755b16253fSmrg aix,*) ;; # traditional, no import file 54765b16253fSmrg svr4,* | *,yes) # use import file 54775b16253fSmrg # The Import File defines what to hardcode. 54785b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 54795b16253fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 54805b16253fSmrg ;; 54815b16253fSmrg esac 54825b16253fSmrg 54835b16253fSmrg if test yes = "$GCC"; then 54845b16253fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54855b16253fSmrg # We only want to do this on AIX 4.2 and lower, the check 54865b16253fSmrg # below for broken collect2 doesn't work under 4.3+ 54875b16253fSmrg collect2name=`$CC -print-prog-name=collect2` 54885b16253fSmrg if test -f "$collect2name" && 54895b16253fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54905b16253fSmrg then 54915b16253fSmrg # We have reworked collect2 54925b16253fSmrg : 54935b16253fSmrg else 54945b16253fSmrg # We have old collect2 54955b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54965b16253fSmrg # It fails to find uninstalled libraries when the uninstalled 54975b16253fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 54985b16253fSmrg # to unsupported forces relinking 54995b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55005b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55015b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 55025b16253fSmrg fi 55035b16253fSmrg ;; 55045b16253fSmrg esac 55055b16253fSmrg shared_flag='-shared' 55065b16253fSmrg if test yes = "$aix_use_runtimelinking"; then 55075b16253fSmrg shared_flag="$shared_flag "'$wl-G' 55085b16253fSmrg fi 55095b16253fSmrg # Need to ensure runtime linking is disabled for the traditional 55105b16253fSmrg # shared library, or the linker may eventually find shared libraries 55115b16253fSmrg # /with/ Import File - we do not want to mix them. 55125b16253fSmrg shared_flag_aix='-shared' 55135b16253fSmrg shared_flag_svr4='-shared $wl-G' 55145b16253fSmrg else 55155b16253fSmrg # not using gcc 55165b16253fSmrg if test ia64 = "$host_cpu"; then 55175b16253fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 55185b16253fSmrg # chokes on -Wl,-G. The following line is correct: 55195b16253fSmrg shared_flag='-G' 55205b16253fSmrg else 55215b16253fSmrg if test yes = "$aix_use_runtimelinking"; then 55225b16253fSmrg shared_flag='$wl-G' 55235b16253fSmrg else 55245b16253fSmrg shared_flag='$wl-bM:SRE' 55255b16253fSmrg fi 55265b16253fSmrg shared_flag_aix='$wl-bM:SRE' 55275b16253fSmrg shared_flag_svr4='$wl-G' 55285b16253fSmrg fi 55295b16253fSmrg fi 55305b16253fSmrg 55315b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55325b16253fSmrg # It seems that -bexpall does not export symbols beginning with 55335b16253fSmrg # underscore (_), so it is better to generate a list of symbols to export. 55345b16253fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 55355b16253fSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55365b16253fSmrg # Warning - without using the other runtime loading flags (-brtl), 55375b16253fSmrg # -berok will link without error, but may produce a broken library. 55385b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55395b16253fSmrg # Determine the default libpath from the value encoded in an 55405b16253fSmrg # empty executable. 55415b16253fSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 55425b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55435b16253fSmrg _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 55445b16253fSmrg else 55455b16253fSmrg if test ia64 = "$host_cpu"; then 55465b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55475b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 55485b16253fSmrg _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" 55495b16253fSmrg else 55505b16253fSmrg # Determine the default libpath from the value encoded in an 55515b16253fSmrg # empty executable. 55525b16253fSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 55535b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55545b16253fSmrg # Warning - without using the other run time loading flags, 55555b16253fSmrg # -berok will link without error, but may produce a broken library. 55565b16253fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 55575b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 55585b16253fSmrg if test yes = "$with_gnu_ld"; then 55595b16253fSmrg # We only use this code for GNU lds that support --whole-archive. 55605b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55615b16253fSmrg else 55625b16253fSmrg # Exported symbols can be pulled into shared objects from archives 55635b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55645b16253fSmrg fi 55655b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 55665b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 55675b16253fSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 55685b16253fSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 55695b16253fSmrg if test svr4 != "$with_aix_soname"; then 55705b16253fSmrg # This is similar to how AIX traditionally builds its shared libraries. 55715b16253fSmrg _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' 55725b16253fSmrg fi 55735b16253fSmrg if test aix != "$with_aix_soname"; then 55745b16253fSmrg _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' 55755b16253fSmrg else 55765b16253fSmrg # used by -dlpreopen to get the symbols 55775b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 55785b16253fSmrg fi 55795b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55805b16253fSmrg fi 55815b16253fSmrg fi 55825b16253fSmrg ;; 55835b16253fSmrg 55845b16253fSmrg amigaos*) 55855b16253fSmrg case $host_cpu in 55865b16253fSmrg powerpc) 55875b16253fSmrg # see comment about AmigaOS4 .so support 55885b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55895b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55905b16253fSmrg ;; 55915b16253fSmrg m68k) 55925b16253fSmrg _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)' 55935b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55945b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55955b16253fSmrg ;; 55965b16253fSmrg esac 55975b16253fSmrg ;; 55985b16253fSmrg 55995b16253fSmrg bsdi[[45]]*) 56005b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 56015b16253fSmrg ;; 56025b16253fSmrg 56035b16253fSmrg cygwin* | mingw* | pw32* | cegcc*) 56045b16253fSmrg # When not using gcc, we currently assume that we are using 56055b16253fSmrg # Microsoft Visual C++ or Intel C++ Compiler. 56065b16253fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 56075b16253fSmrg # no search path for DLLs. 56085b16253fSmrg case $cc_basename in 56095b16253fSmrg cl* | icl*) 56105b16253fSmrg # Native MSVC or ICC 56115b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56125b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56135b16253fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 56145b16253fSmrg _LT_TAGVAR(file_list_spec, $1)='@' 56155b16253fSmrg # Tell ltmain to make .lib files, not .a files. 56165b16253fSmrg libext=lib 56175b16253fSmrg # Tell ltmain to make .dll files, not .so files. 56185b16253fSmrg shrext_cmds=.dll 56195b16253fSmrg # FIXME: Setting linknames here is a bad hack. 56205b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 56215b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 56225b16253fSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 56235b16253fSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 56245b16253fSmrg else 56255b16253fSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 56265b16253fSmrg fi~ 56275b16253fSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 56285b16253fSmrg linknames=' 56295b16253fSmrg # The linker will not automatically build a static lib if we build a DLL. 56305b16253fSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56315b16253fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56325b16253fSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56335b16253fSmrg _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' 56345b16253fSmrg # Don't use ranlib 56355b16253fSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 56365b16253fSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 56375b16253fSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 56385b16253fSmrg case $lt_outputfile in 56395b16253fSmrg *.exe|*.EXE) ;; 56405b16253fSmrg *) 56415b16253fSmrg lt_outputfile=$lt_outputfile.exe 56425b16253fSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 56435b16253fSmrg ;; 56445b16253fSmrg esac~ 56455b16253fSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 56465b16253fSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 56475b16253fSmrg $RM "$lt_outputfile.manifest"; 56485b16253fSmrg fi' 56495b16253fSmrg ;; 56505b16253fSmrg *) 56515b16253fSmrg # Assume MSVC and ICC wrapper 56525b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56535b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56545b16253fSmrg # Tell ltmain to make .lib files, not .a files. 56555b16253fSmrg libext=lib 56565b16253fSmrg # Tell ltmain to make .dll files, not .so files. 56575b16253fSmrg shrext_cmds=.dll 56585b16253fSmrg # FIXME: Setting linknames here is a bad hack. 56595b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 56605b16253fSmrg # The linker will automatically build a .lib file if we build a DLL. 56615b16253fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56625b16253fSmrg # FIXME: Should let the user specify the lib program. 56635b16253fSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 56645b16253fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56655b16253fSmrg ;; 56665b16253fSmrg esac 56675b16253fSmrg ;; 56685b16253fSmrg 56695b16253fSmrg darwin* | rhapsody*) 56705b16253fSmrg _LT_DARWIN_LINKER_FEATURES($1) 56715b16253fSmrg ;; 56725b16253fSmrg 56735b16253fSmrg dgux*) 56745b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56755b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56765b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56775b16253fSmrg ;; 56785b16253fSmrg 56795b16253fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56805b16253fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 56815b16253fSmrg # does not break anything, and helps significantly (at the cost of a little 56825b16253fSmrg # extra space). 56835b16253fSmrg freebsd2.2*) 56845b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56855b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56865b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56875b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56885b16253fSmrg ;; 56895b16253fSmrg 56905b16253fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 56915b16253fSmrg freebsd2.*) 56925b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 56935b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56945b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56955b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56965b16253fSmrg ;; 56975b16253fSmrg 56985b16253fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 56995b16253fSmrg freebsd* | dragonfly* | midnightbsd*) 57005b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 57015b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 57025b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57035b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57045b16253fSmrg ;; 57055b16253fSmrg 57065b16253fSmrg hpux9*) 57075b16253fSmrg if test yes = "$GCC"; then 57085b16253fSmrg _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' 57095b16253fSmrg else 57105b16253fSmrg _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' 57115b16253fSmrg fi 57125b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57135b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57145b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57155b16253fSmrg 57165b16253fSmrg # hardcode_minus_L: Not really in the search PATH, 57175b16253fSmrg # but as the default location of the library. 57185b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57195b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57205b16253fSmrg ;; 57215b16253fSmrg 57225b16253fSmrg hpux10*) 57235b16253fSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 57245b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57255b16253fSmrg else 57265b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 57275b16253fSmrg fi 57285b16253fSmrg if test no = "$with_gnu_ld"; then 57295b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57305b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57315b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57325b16253fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57335b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57345b16253fSmrg # hardcode_minus_L: Not really in the search PATH, 57355b16253fSmrg # but as the default location of the library. 57365b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57375b16253fSmrg fi 57385b16253fSmrg ;; 57395b16253fSmrg 57405b16253fSmrg hpux11*) 57415b16253fSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 57425b16253fSmrg case $host_cpu in 57435b16253fSmrg hppa*64*) 57445b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57455b16253fSmrg ;; 57465b16253fSmrg ia64*) 57475b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57485b16253fSmrg ;; 57495b16253fSmrg *) 57505b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57515b16253fSmrg ;; 57525b16253fSmrg esac 57535b16253fSmrg else 57545b16253fSmrg case $host_cpu in 57555b16253fSmrg hppa*64*) 57565b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57575b16253fSmrg ;; 57585b16253fSmrg ia64*) 57595b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57605b16253fSmrg ;; 57615b16253fSmrg *) 57625b16253fSmrg m4_if($1, [], [ 57635b16253fSmrg # Older versions of the 11.00 compiler do not understand -b yet 57645b16253fSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57655b16253fSmrg _LT_LINKER_OPTION([if $CC understands -b], 57665b16253fSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 57675b16253fSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57685b16253fSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 57695b16253fSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57705b16253fSmrg ;; 57715b16253fSmrg esac 57725b16253fSmrg fi 57735b16253fSmrg if test no = "$with_gnu_ld"; then 57745b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57755b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57765b16253fSmrg 57775b16253fSmrg case $host_cpu in 57785b16253fSmrg hppa*64*|ia64*) 57795b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 57805b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57815b16253fSmrg ;; 57825b16253fSmrg *) 57835b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57845b16253fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57855b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57865b16253fSmrg 57875b16253fSmrg # hardcode_minus_L: Not really in the search PATH, 57885b16253fSmrg # but as the default location of the library. 57895b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57905b16253fSmrg ;; 57915b16253fSmrg esac 57925b16253fSmrg fi 57935b16253fSmrg ;; 57945b16253fSmrg 57955b16253fSmrg irix5* | irix6* | nonstopux*) 57965b16253fSmrg if test yes = "$GCC"; then 57975b16253fSmrg _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' 57985b16253fSmrg # Try to use the -exported_symbol ld option, if it does not 57995b16253fSmrg # work, assume that -exports_file does not work either and 58005b16253fSmrg # implicitly export all symbols. 58015b16253fSmrg # This should be the same for all languages, so no per-tag cache variable. 58025b16253fSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 58035b16253fSmrg [lt_cv_irix_exported_symbol], 58045b16253fSmrg [save_LDFLAGS=$LDFLAGS 58055b16253fSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 58065b16253fSmrg AC_LINK_IFELSE( 58075b16253fSmrg [AC_LANG_SOURCE( 58085b16253fSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 58095b16253fSmrg [C++], [[int foo (void) { return 0; }]], 58105b16253fSmrg [Fortran 77], [[ 58115b16253fSmrg subroutine foo 58125b16253fSmrg end]], 58135b16253fSmrg [Fortran], [[ 58145b16253fSmrg subroutine foo 58155b16253fSmrg end]])])], 58165b16253fSmrg [lt_cv_irix_exported_symbol=yes], 58175b16253fSmrg [lt_cv_irix_exported_symbol=no]) 58185b16253fSmrg LDFLAGS=$save_LDFLAGS]) 58195b16253fSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 58205b16253fSmrg _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' 58215b16253fSmrg fi 5822efbcb2bfSmrg _LT_TAGVAR(link_all_deplibs, $1)=no 58235b16253fSmrg else 58245b16253fSmrg _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' 58255b16253fSmrg _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' 58265b16253fSmrg fi 58275b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 58285b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58295b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58305b16253fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 58315b16253fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58325b16253fSmrg ;; 58335b16253fSmrg 58345b16253fSmrg linux*) 58355b16253fSmrg case $cc_basename in 58365b16253fSmrg tcc*) 58375b16253fSmrg # Fabrice Bellard et al's Tiny C Compiler 58385b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 58395b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5840efbcb2bfSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58415b16253fSmrg ;; 58425b16253fSmrg esac 58435b16253fSmrg ;; 58445b16253fSmrg 5845efbcb2bfSmrg netbsd* | netbsdelf*-gnu) 58465b16253fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58475b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 58485b16253fSmrg else 58495b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58505b16253fSmrg fi 58515b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58525b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 58535b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58545b16253fSmrg ;; 58555b16253fSmrg 58565b16253fSmrg newsos6) 58575b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58585b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 58595b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58605b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58615b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58625b16253fSmrg ;; 58635b16253fSmrg 58645b16253fSmrg *nto* | *qnx*) 58655b16253fSmrg ;; 58665b16253fSmrg 58675b16253fSmrg openbsd* | bitrig*) 58685b16253fSmrg if test -f /usr/libexec/ld.so; then 58695b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 58705b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58715b16253fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 58725b16253fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58735b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58745b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 58755b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58765b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58775b16253fSmrg else 58785b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58795b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58805b16253fSmrg fi 58815b16253fSmrg else 58825b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58835b16253fSmrg fi 58845b16253fSmrg ;; 58855b16253fSmrg 58865b16253fSmrg os2*) 58875b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58885b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58895b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58905b16253fSmrg shrext_cmds=.dll 58915b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58925b16253fSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58935b16253fSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58945b16253fSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58955b16253fSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 58965b16253fSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 58975b16253fSmrg emximp -o $lib $output_objdir/$libname.def' 58985b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58995b16253fSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 59005b16253fSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 59015b16253fSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 59025b16253fSmrg prefix_cmds="$SED"~ 59035b16253fSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 59045b16253fSmrg prefix_cmds="$prefix_cmds -e 1d"; 59055b16253fSmrg fi~ 59065b16253fSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 59075b16253fSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 59085b16253fSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 59095b16253fSmrg emximp -o $lib $output_objdir/$libname.def' 59105b16253fSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 59115b16253fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 59125b16253fSmrg _LT_TAGVAR(file_list_spec, $1)='@' 59135b16253fSmrg ;; 59145b16253fSmrg 59155b16253fSmrg osf3*) 59165b16253fSmrg if test yes = "$GCC"; then 59175b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 59185b16253fSmrg _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' 59195b16253fSmrg else 59205b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59215b16253fSmrg _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' 59225b16253fSmrg fi 59235b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59245b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59255b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59265b16253fSmrg ;; 59275b16253fSmrg 59285b16253fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 59295b16253fSmrg if test yes = "$GCC"; then 59305b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 59315b16253fSmrg _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' 59325b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59335b16253fSmrg else 59345b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59355b16253fSmrg _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' 59365b16253fSmrg _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~ 59375b16253fSmrg $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' 59385b16253fSmrg 59395b16253fSmrg # Both c and cxx compiler support -rpath directly 59405b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59415b16253fSmrg fi 59425b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59435b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59445b16253fSmrg ;; 59455b16253fSmrg 59465b16253fSmrg solaris*) 59475b16253fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 59485b16253fSmrg if test yes = "$GCC"; then 59495b16253fSmrg wlarc='$wl' 59505b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59515b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59525b16253fSmrg $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' 59535b16253fSmrg else 59545b16253fSmrg case `$CC -V 2>&1` in 59555b16253fSmrg *"Compilers 5.0"*) 59565b16253fSmrg wlarc='' 59575b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59585b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59595b16253fSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59605b16253fSmrg ;; 59615b16253fSmrg *) 59625b16253fSmrg wlarc='$wl' 59635b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59645b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59655b16253fSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59665b16253fSmrg ;; 59675b16253fSmrg esac 59685b16253fSmrg fi 59695b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59705b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59715b16253fSmrg case $host_os in 59725b16253fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59735b16253fSmrg *) 59745b16253fSmrg # The compiler driver will combine and reorder linker options, 59755b16253fSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59765b16253fSmrg # but is careful enough not to reorder. 59775b16253fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 59785b16253fSmrg if test yes = "$GCC"; then 59795b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59805b16253fSmrg else 59815b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59825b16253fSmrg fi 59835b16253fSmrg ;; 59845b16253fSmrg esac 59855b16253fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59865b16253fSmrg ;; 59875b16253fSmrg 59885b16253fSmrg sunos4*) 59895b16253fSmrg if test sequent = "$host_vendor"; then 59905b16253fSmrg # Use $CC to link under sequent, because it throws in some extra .o 59915b16253fSmrg # files that make .init and .fini sections work. 59925b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59935b16253fSmrg else 59945b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 59955b16253fSmrg fi 59965b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59975b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 59985b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59995b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60005b16253fSmrg ;; 60015b16253fSmrg 60025b16253fSmrg sysv4) 60035b16253fSmrg case $host_vendor in 60045b16253fSmrg sni) 60055b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60065b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 60075b16253fSmrg ;; 60085b16253fSmrg siemens) 60095b16253fSmrg ## LD is ld it makes a PLAMLIB 60105b16253fSmrg ## CC just makes a GrossModule. 60115b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 60125b16253fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 60135b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 60145b16253fSmrg ;; 60155b16253fSmrg motorola) 60165b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60175b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 60185b16253fSmrg ;; 60195b16253fSmrg esac 60205b16253fSmrg runpath_var='LD_RUN_PATH' 60215b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60225b16253fSmrg ;; 60235b16253fSmrg 60245b16253fSmrg sysv4.3*) 60255b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60265b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60275b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 60285b16253fSmrg ;; 60295b16253fSmrg 60305b16253fSmrg sysv4*MP*) 60315b16253fSmrg if test -d /usr/nec; then 60325b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60335b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60345b16253fSmrg runpath_var=LD_RUN_PATH 60355b16253fSmrg hardcode_runpath_var=yes 60365b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 60375b16253fSmrg fi 60385b16253fSmrg ;; 60395b16253fSmrg 60405b16253fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 60415b16253fSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60425b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60435b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60445b16253fSmrg runpath_var='LD_RUN_PATH' 60455b16253fSmrg 60465b16253fSmrg if test yes = "$GCC"; then 60475b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60485b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60495b16253fSmrg else 60505b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60515b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60525b16253fSmrg fi 60535b16253fSmrg ;; 60545b16253fSmrg 60555b16253fSmrg sysv5* | sco3.2v5* | sco5v6*) 60565b16253fSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 60575b16253fSmrg # link with -lc, and that would cause any symbols used from libc to 60585b16253fSmrg # always be unresolved, which means just about no library would 60595b16253fSmrg # ever link correctly. If we're not using GNU ld we use -z text 60605b16253fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 60615b16253fSmrg # as -z defs. 60625b16253fSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60635b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60645b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60655b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60665b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60675b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60685b16253fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60695b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60705b16253fSmrg runpath_var='LD_RUN_PATH' 60715b16253fSmrg 60725b16253fSmrg if test yes = "$GCC"; then 60735b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60745b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60755b16253fSmrg else 60765b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60775b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60785b16253fSmrg fi 60795b16253fSmrg ;; 60805b16253fSmrg 60815b16253fSmrg uts4*) 60825b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60835b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60845b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60855b16253fSmrg ;; 60865b16253fSmrg 60875b16253fSmrg *) 60885b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60895b16253fSmrg ;; 60905b16253fSmrg esac 60915b16253fSmrg 60925b16253fSmrg if test sni = "$host_vendor"; then 60935b16253fSmrg case $host in 60945b16253fSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 60955b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 60965b16253fSmrg ;; 60975b16253fSmrg esac 60985b16253fSmrg fi 60995b16253fSmrg fi 61005b16253fSmrg]) 61015b16253fSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 61025b16253fSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 61035b16253fSmrg 61045b16253fSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 61055b16253fSmrg 61065b16253fSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 61075b16253fSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 61085b16253fSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 61095b16253fSmrg [The commands to extract the exported symbol list from a shared archive]) 61105b16253fSmrg 61115b16253fSmrg# 61125b16253fSmrg# Do we need to explicitly link libc? 61135b16253fSmrg# 61145b16253fSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 61155b16253fSmrgx|xyes) 61165b16253fSmrg # Assume -lc should be added 61175b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61185b16253fSmrg 61195b16253fSmrg if test yes,yes = "$GCC,$enable_shared"; then 61205b16253fSmrg case $_LT_TAGVAR(archive_cmds, $1) in 61215b16253fSmrg *'~'*) 61225b16253fSmrg # FIXME: we may have to deal with multi-command sequences. 61235b16253fSmrg ;; 61245b16253fSmrg '$CC '*) 61255b16253fSmrg # Test whether the compiler implicitly links with -lc since on some 61265b16253fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 61275b16253fSmrg # to ld, don't add -lc before -lgcc. 61285b16253fSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 61295b16253fSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 61305b16253fSmrg [$RM conftest* 61315b16253fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 61325b16253fSmrg 61335b16253fSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 61345b16253fSmrg soname=conftest 61355b16253fSmrg lib=conftest 61365b16253fSmrg libobjs=conftest.$ac_objext 61375b16253fSmrg deplibs= 61385b16253fSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 61395b16253fSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 61405b16253fSmrg compiler_flags=-v 61415b16253fSmrg linker_flags=-v 61425b16253fSmrg verstring= 61435b16253fSmrg output_objdir=. 61445b16253fSmrg libname=conftest 61455b16253fSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 61465b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 61475b16253fSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 61485b16253fSmrg then 61495b16253fSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61505b16253fSmrg else 61515b16253fSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61525b16253fSmrg fi 61535b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61545b16253fSmrg else 61555b16253fSmrg cat conftest.err 1>&5 61565b16253fSmrg fi 61575b16253fSmrg $RM conftest* 61585b16253fSmrg ]) 61595b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 61605b16253fSmrg ;; 61615b16253fSmrg esac 61625b16253fSmrg fi 61635b16253fSmrg ;; 61645b16253fSmrgesac 61655b16253fSmrg 61665b16253fSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61675b16253fSmrg [Whether or not to add -lc for building shared libraries]) 61685b16253fSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61695b16253fSmrg [enable_shared_with_static_runtimes], [0], 61705b16253fSmrg [Whether or not to disallow shared libs when runtime libs are static]) 61715b16253fSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61725b16253fSmrg [Compiler flag to allow reflexive dlopens]) 61735b16253fSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61745b16253fSmrg [Compiler flag to generate shared objects directly from archives]) 61755b16253fSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 61765b16253fSmrg [Whether the compiler copes with passing no objects directly]) 61775b16253fSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61785b16253fSmrg [Create an old-style archive from a shared archive]) 61795b16253fSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61805b16253fSmrg [Create a temporary old-style archive to link instead of a shared archive]) 61815b16253fSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61825b16253fSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61835b16253fSmrg_LT_TAGDECL([], [module_cmds], [2], 61845b16253fSmrg [Commands used to build a loadable module if different from building 61855b16253fSmrg a shared archive.]) 61865b16253fSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61875b16253fSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 61885b16253fSmrg [Whether we are building with GNU ld or not]) 61895b16253fSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61905b16253fSmrg [Flag that allows shared libraries with undefined symbols to be built]) 61915b16253fSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 61925b16253fSmrg [Flag that enforces no undefined symbols]) 61935b16253fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61945b16253fSmrg [Flag to hardcode $libdir into a binary during linking. 61955b16253fSmrg This must work even if $libdir does not exist]) 61965b16253fSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 61975b16253fSmrg [Whether we need a single "-rpath" flag with a separated argument]) 61985b16253fSmrg_LT_TAGDECL([], [hardcode_direct], [0], 61995b16253fSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 62005b16253fSmrg DIR into the resulting binary]) 62015b16253fSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 62025b16253fSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 62035b16253fSmrg DIR into the resulting binary and the resulting library dependency is 62045b16253fSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 62055b16253fSmrg library is relocated]) 62065b16253fSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 62075b16253fSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 62085b16253fSmrg into the resulting binary]) 62095b16253fSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 62105b16253fSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 62115b16253fSmrg into the resulting binary]) 62125b16253fSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 62135b16253fSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 62145b16253fSmrg into the library and all subsequent libraries and executables linked 62155b16253fSmrg against it]) 62165b16253fSmrg_LT_TAGDECL([], [inherit_rpath], [0], 62175b16253fSmrg [Set to yes if linker adds runtime paths of dependent libraries 62185b16253fSmrg to runtime path list]) 62195b16253fSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 62205b16253fSmrg [Whether libtool must link a program against all its dependency libraries]) 62215b16253fSmrg_LT_TAGDECL([], [always_export_symbols], [0], 62225b16253fSmrg [Set to "yes" if exported symbols are required]) 62235b16253fSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 62245b16253fSmrg [The commands to list exported symbols]) 62255b16253fSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 62265b16253fSmrg [Symbols that should not be listed in the preloaded symbols]) 62275b16253fSmrg_LT_TAGDECL([], [include_expsyms], [1], 62285b16253fSmrg [Symbols that must always be exported]) 62295b16253fSmrg_LT_TAGDECL([], [prelink_cmds], [2], 62305b16253fSmrg [Commands necessary for linking programs (against libraries) with templates]) 62315b16253fSmrg_LT_TAGDECL([], [postlink_cmds], [2], 62325b16253fSmrg [Commands necessary for finishing linking programs]) 62335b16253fSmrg_LT_TAGDECL([], [file_list_spec], [1], 62345b16253fSmrg [Specify filename containing input files]) 62355b16253fSmrgdnl FIXME: Not yet implemented 62365b16253fSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62375b16253fSmrgdnl [Compiler flag to generate thread safe objects]) 62385b16253fSmrg])# _LT_LINKER_SHLIBS 62395b16253fSmrg 62405b16253fSmrg 62415b16253fSmrg# _LT_LANG_C_CONFIG([TAG]) 62425b16253fSmrg# ------------------------ 62435b16253fSmrg# Ensure that the configuration variables for a C compiler are suitably 62445b16253fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 62455b16253fSmrg# the compiler configuration to 'libtool'. 62465b16253fSmrgm4_defun([_LT_LANG_C_CONFIG], 62475b16253fSmrg[m4_require([_LT_DECL_EGREP])dnl 62485b16253fSmrglt_save_CC=$CC 62495b16253fSmrgAC_LANG_PUSH(C) 62505b16253fSmrg 62515b16253fSmrg# Source file extension for C test sources. 62525b16253fSmrgac_ext=c 62535b16253fSmrg 62545b16253fSmrg# Object file extension for compiled C test sources. 62555b16253fSmrgobjext=o 62565b16253fSmrg_LT_TAGVAR(objext, $1)=$objext 62575b16253fSmrg 62585b16253fSmrg# Code to be used in simple compile tests 62595b16253fSmrglt_simple_compile_test_code="int some_variable = 0;" 62605b16253fSmrg 62615b16253fSmrg# Code to be used in simple link tests 62625b16253fSmrglt_simple_link_test_code='int main(){return(0);}' 62635b16253fSmrg 62645b16253fSmrg_LT_TAG_COMPILER 62655b16253fSmrg# Save the default compiler, since it gets overwritten when the other 62665b16253fSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62675b16253fSmrgcompiler_DEFAULT=$CC 62685b16253fSmrg 62695b16253fSmrg# save warnings/boilerplate of simple test code 62705b16253fSmrg_LT_COMPILER_BOILERPLATE 62715b16253fSmrg_LT_LINKER_BOILERPLATE 62725b16253fSmrg 62735b16253fSmrg## CAVEAT EMPTOR: 62745b16253fSmrg## There is no encapsulation within the following macros, do not change 62755b16253fSmrg## the running order or otherwise move them around unless you know exactly 62765b16253fSmrg## what you are doing... 62775b16253fSmrgif test -n "$compiler"; then 62785b16253fSmrg _LT_COMPILER_NO_RTTI($1) 62795b16253fSmrg _LT_COMPILER_PIC($1) 62805b16253fSmrg _LT_COMPILER_C_O($1) 62815b16253fSmrg _LT_COMPILER_FILE_LOCKS($1) 62825b16253fSmrg _LT_LINKER_SHLIBS($1) 62835b16253fSmrg _LT_SYS_DYNAMIC_LINKER($1) 62845b16253fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 62855b16253fSmrg LT_SYS_DLOPEN_SELF 62865b16253fSmrg _LT_CMD_STRIPLIB 62875b16253fSmrg 62885b16253fSmrg # Report what library types will actually be built 62895b16253fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62905b16253fSmrg AC_MSG_RESULT([$can_build_shared]) 62915b16253fSmrg 62925b16253fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 62935b16253fSmrg test no = "$can_build_shared" && enable_shared=no 62945b16253fSmrg 62955b16253fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 62965b16253fSmrg # are all built from PIC. 62975b16253fSmrg case $host_os in 62985b16253fSmrg aix3*) 62995b16253fSmrg test yes = "$enable_shared" && enable_static=no 63005b16253fSmrg if test -n "$RANLIB"; then 63015b16253fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 63025b16253fSmrg postinstall_cmds='$RANLIB $lib' 63035b16253fSmrg fi 63045b16253fSmrg ;; 63055b16253fSmrg 63065b16253fSmrg aix[[4-9]]*) 63075b16253fSmrg if test ia64 != "$host_cpu"; then 63085b16253fSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 63095b16253fSmrg yes,aix,yes) ;; # shared object as lib.so file only 63105b16253fSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 63115b16253fSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 63125b16253fSmrg esac 63135b16253fSmrg fi 63145b16253fSmrg ;; 63155b16253fSmrg esac 63165b16253fSmrg AC_MSG_RESULT([$enable_shared]) 63175b16253fSmrg 63185b16253fSmrg AC_MSG_CHECKING([whether to build static libraries]) 63195b16253fSmrg # Make sure either enable_shared or enable_static is yes. 63205b16253fSmrg test yes = "$enable_shared" || enable_static=yes 63215b16253fSmrg AC_MSG_RESULT([$enable_static]) 63225b16253fSmrg 63235b16253fSmrg _LT_CONFIG($1) 63245b16253fSmrgfi 63255b16253fSmrgAC_LANG_POP 63265b16253fSmrgCC=$lt_save_CC 63275b16253fSmrg])# _LT_LANG_C_CONFIG 63285b16253fSmrg 63295b16253fSmrg 63305b16253fSmrg# _LT_LANG_CXX_CONFIG([TAG]) 63315b16253fSmrg# -------------------------- 63325b16253fSmrg# Ensure that the configuration variables for a C++ compiler are suitably 63335b16253fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 63345b16253fSmrg# the compiler configuration to 'libtool'. 63355b16253fSmrgm4_defun([_LT_LANG_CXX_CONFIG], 63365b16253fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63375b16253fSmrgm4_require([_LT_DECL_EGREP])dnl 63385b16253fSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 63395b16253fSmrgif test -n "$CXX" && ( test no != "$CXX" && 63405b16253fSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 63415b16253fSmrg (test g++ != "$CXX"))); then 63425b16253fSmrg AC_PROG_CXXCPP 63435b16253fSmrgelse 63445b16253fSmrg _lt_caught_CXX_error=yes 63455b16253fSmrgfi 63465b16253fSmrg 63475b16253fSmrgAC_LANG_PUSH(C++) 63485b16253fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 63495b16253fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 63505b16253fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 63515b16253fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63525b16253fSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 63535b16253fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 63545b16253fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 63555b16253fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 63565b16253fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 63575b16253fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 63585b16253fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63595b16253fSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 63605b16253fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 63615b16253fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 63625b16253fSmrg_LT_TAGVAR(module_cmds, $1)= 63635b16253fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 63645b16253fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 63655b16253fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 63665b16253fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 63675b16253fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 63685b16253fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 63695b16253fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 63705b16253fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 63715b16253fSmrg 63725b16253fSmrg# Source file extension for C++ test sources. 63735b16253fSmrgac_ext=cpp 63745b16253fSmrg 63755b16253fSmrg# Object file extension for compiled C++ test sources. 63765b16253fSmrgobjext=o 63775b16253fSmrg_LT_TAGVAR(objext, $1)=$objext 63785b16253fSmrg 63795b16253fSmrg# No sense in running all these tests if we already determined that 63805b16253fSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 63815b16253fSmrg# are currently assumed to apply to all compilers on this platform, 63825b16253fSmrg# and will be corrupted by setting them based on a non-working compiler. 63835b16253fSmrgif test yes != "$_lt_caught_CXX_error"; then 63845b16253fSmrg # Code to be used in simple compile tests 63855b16253fSmrg lt_simple_compile_test_code="int some_variable = 0;" 63865b16253fSmrg 63875b16253fSmrg # Code to be used in simple link tests 63885b16253fSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 63895b16253fSmrg 63905b16253fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 63915b16253fSmrg _LT_TAG_COMPILER 63925b16253fSmrg 63935b16253fSmrg # save warnings/boilerplate of simple test code 63945b16253fSmrg _LT_COMPILER_BOILERPLATE 63955b16253fSmrg _LT_LINKER_BOILERPLATE 63965b16253fSmrg 63975b16253fSmrg # Allow CC to be a program name with arguments. 63985b16253fSmrg lt_save_CC=$CC 63995b16253fSmrg lt_save_CFLAGS=$CFLAGS 64005b16253fSmrg lt_save_LD=$LD 64015b16253fSmrg lt_save_GCC=$GCC 64025b16253fSmrg GCC=$GXX 64035b16253fSmrg lt_save_with_gnu_ld=$with_gnu_ld 64045b16253fSmrg lt_save_path_LD=$lt_cv_path_LD 64055b16253fSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 64065b16253fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 64075b16253fSmrg else 64085b16253fSmrg $as_unset lt_cv_prog_gnu_ld 64095b16253fSmrg fi 64105b16253fSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 64115b16253fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 64125b16253fSmrg else 64135b16253fSmrg $as_unset lt_cv_path_LD 64145b16253fSmrg fi 64155b16253fSmrg test -z "${LDCXX+set}" || LD=$LDCXX 64165b16253fSmrg CC=${CXX-"c++"} 64175b16253fSmrg CFLAGS=$CXXFLAGS 64185b16253fSmrg compiler=$CC 64195b16253fSmrg _LT_TAGVAR(compiler, $1)=$CC 64205b16253fSmrg _LT_CC_BASENAME([$compiler]) 64215b16253fSmrg 64225b16253fSmrg if test -n "$compiler"; then 64235b16253fSmrg # We don't want -fno-exception when compiling C++ code, so set the 64245b16253fSmrg # no_builtin_flag separately 64255b16253fSmrg if test yes = "$GXX"; then 64265b16253fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 64275b16253fSmrg else 64285b16253fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 64295b16253fSmrg fi 64305b16253fSmrg 64315b16253fSmrg if test yes = "$GXX"; then 64325b16253fSmrg # Set up default GNU C++ configuration 64335b16253fSmrg 64345b16253fSmrg LT_PATH_LD 64355b16253fSmrg 64365b16253fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 64375b16253fSmrg # archiving commands below assume that GNU ld is being used. 64385b16253fSmrg if test yes = "$with_gnu_ld"; then 64395b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 64405b16253fSmrg _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' 64415b16253fSmrg 64425b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 64435b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 64445b16253fSmrg 64455b16253fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 64465b16253fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64475b16253fSmrg # investigate it a little bit more. (MM) 64485b16253fSmrg wlarc='$wl' 64495b16253fSmrg 64505b16253fSmrg # ancient GNU ld didn't support --whole-archive et. al. 64515b16253fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64525b16253fSmrg $GREP 'no-whole-archive' > /dev/null; then 64535b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64545b16253fSmrg else 64555b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64565b16253fSmrg fi 64575b16253fSmrg else 64585b16253fSmrg with_gnu_ld=no 64595b16253fSmrg wlarc= 64605b16253fSmrg 64615b16253fSmrg # A generic and very simple default shared library creation 64625b16253fSmrg # command for GNU C++ for the case where it uses the native 64635b16253fSmrg # linker, instead of GNU ld. If possible, this setting should 64645b16253fSmrg # overridden to take advantage of the native linker features on 64655b16253fSmrg # the platform it is being used on. 64665b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64675b16253fSmrg fi 64685b16253fSmrg 64695b16253fSmrg # Commands to make compiler produce verbose output that lists 64705b16253fSmrg # what "hidden" libraries, object files and flags are used when 64715b16253fSmrg # linking a shared library. 6472efbcb2bfSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' 64735b16253fSmrg 64745b16253fSmrg else 64755b16253fSmrg GXX=no 64765b16253fSmrg with_gnu_ld=no 64775b16253fSmrg wlarc= 64785b16253fSmrg fi 64795b16253fSmrg 64805b16253fSmrg # PORTME: fill in a description of your system's C++ link characteristics 64815b16253fSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64825b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 64835b16253fSmrg case $host_os in 64845b16253fSmrg aix3*) 64855b16253fSmrg # FIXME: insert proper C++ library support 64865b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 64875b16253fSmrg ;; 64885b16253fSmrg aix[[4-9]]*) 64895b16253fSmrg if test ia64 = "$host_cpu"; then 64905b16253fSmrg # On IA64, the linker does run time linking by default, so we don't 64915b16253fSmrg # have to do anything special. 64925b16253fSmrg aix_use_runtimelinking=no 64935b16253fSmrg exp_sym_flag='-Bexport' 64945b16253fSmrg no_entry_flag= 64955b16253fSmrg else 64965b16253fSmrg aix_use_runtimelinking=no 64975b16253fSmrg 64985b16253fSmrg # Test if we are trying to use run time linking or normal 64995b16253fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 65005b16253fSmrg # have runtime linking enabled, and use it for executables. 65015b16253fSmrg # For shared libraries, we enable/disable runtime linking 65025b16253fSmrg # depending on the kind of the shared library created - 65035b16253fSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 65045b16253fSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 65055b16253fSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 65065b16253fSmrg # lib.a static archive 65075b16253fSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 65085b16253fSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 65095b16253fSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 65105b16253fSmrg # lib.a(lib.so.V) shared, rtl:no 65115b16253fSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 65125b16253fSmrg # lib.a static archive 65135b16253fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 65145b16253fSmrg for ld_flag in $LDFLAGS; do 65155b16253fSmrg case $ld_flag in 65165b16253fSmrg *-brtl*) 65175b16253fSmrg aix_use_runtimelinking=yes 65185b16253fSmrg break 65195b16253fSmrg ;; 65205b16253fSmrg esac 65215b16253fSmrg done 65225b16253fSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 65235b16253fSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 65245b16253fSmrg # so we don't have lib.a shared libs to link our executables. 65255b16253fSmrg # We have to force runtime linking in this case. 65265b16253fSmrg aix_use_runtimelinking=yes 65275b16253fSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 65285b16253fSmrg fi 65295b16253fSmrg ;; 65305b16253fSmrg esac 65315b16253fSmrg 65325b16253fSmrg exp_sym_flag='-bexport' 65335b16253fSmrg no_entry_flag='-bnoentry' 65345b16253fSmrg fi 65355b16253fSmrg 65365b16253fSmrg # When large executables or shared objects are built, AIX ld can 65375b16253fSmrg # have problems creating the table of contents. If linking a library 65385b16253fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 65395b16253fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65405b16253fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 65415b16253fSmrg 65425b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='' 65435b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65445b16253fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65455b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65465b16253fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65475b16253fSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 65485b16253fSmrg case $with_aix_soname,$aix_use_runtimelinking in 65495b16253fSmrg aix,*) ;; # no import file 65505b16253fSmrg svr4,* | *,yes) # use import file 65515b16253fSmrg # The Import File defines what to hardcode. 65525b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 65535b16253fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 65545b16253fSmrg ;; 65555b16253fSmrg esac 65565b16253fSmrg 65575b16253fSmrg if test yes = "$GXX"; then 65585b16253fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65595b16253fSmrg # We only want to do this on AIX 4.2 and lower, the check 65605b16253fSmrg # below for broken collect2 doesn't work under 4.3+ 65615b16253fSmrg collect2name=`$CC -print-prog-name=collect2` 65625b16253fSmrg if test -f "$collect2name" && 65635b16253fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65645b16253fSmrg then 65655b16253fSmrg # We have reworked collect2 65665b16253fSmrg : 65675b16253fSmrg else 65685b16253fSmrg # We have old collect2 65695b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65705b16253fSmrg # It fails to find uninstalled libraries when the uninstalled 65715b16253fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 65725b16253fSmrg # to unsupported forces relinking 65735b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65745b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65755b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65765b16253fSmrg fi 65775b16253fSmrg esac 65785b16253fSmrg shared_flag='-shared' 65795b16253fSmrg if test yes = "$aix_use_runtimelinking"; then 65805b16253fSmrg shared_flag=$shared_flag' $wl-G' 65815b16253fSmrg fi 65825b16253fSmrg # Need to ensure runtime linking is disabled for the traditional 65835b16253fSmrg # shared library, or the linker may eventually find shared libraries 65845b16253fSmrg # /with/ Import File - we do not want to mix them. 65855b16253fSmrg shared_flag_aix='-shared' 65865b16253fSmrg shared_flag_svr4='-shared $wl-G' 65875b16253fSmrg else 65885b16253fSmrg # not using gcc 65895b16253fSmrg if test ia64 = "$host_cpu"; then 65905b16253fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65915b16253fSmrg # chokes on -Wl,-G. The following line is correct: 65925b16253fSmrg shared_flag='-G' 65935b16253fSmrg else 65945b16253fSmrg if test yes = "$aix_use_runtimelinking"; then 65955b16253fSmrg shared_flag='$wl-G' 65965b16253fSmrg else 65975b16253fSmrg shared_flag='$wl-bM:SRE' 65985b16253fSmrg fi 65995b16253fSmrg shared_flag_aix='$wl-bM:SRE' 66005b16253fSmrg shared_flag_svr4='$wl-G' 66015b16253fSmrg fi 66025b16253fSmrg fi 66035b16253fSmrg 66045b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 66055b16253fSmrg # It seems that -bexpall does not export symbols beginning with 66065b16253fSmrg # underscore (_), so it is better to generate a list of symbols to 66075b16253fSmrg # export. 66085b16253fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 66095b16253fSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 66105b16253fSmrg # Warning - without using the other runtime loading flags (-brtl), 66115b16253fSmrg # -berok will link without error, but may produce a broken library. 66125b16253fSmrg # The "-G" linker flag allows undefined symbols. 66135b16253fSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 66145b16253fSmrg # Determine the default libpath from the value encoded in an empty 66155b16253fSmrg # executable. 66165b16253fSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 66175b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66185b16253fSmrg 66195b16253fSmrg _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 66205b16253fSmrg else 66215b16253fSmrg if test ia64 = "$host_cpu"; then 66225b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 66235b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 66245b16253fSmrg _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" 66255b16253fSmrg else 66265b16253fSmrg # Determine the default libpath from the value encoded in an 66275b16253fSmrg # empty executable. 66285b16253fSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 66295b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66305b16253fSmrg # Warning - without using the other run time loading flags, 66315b16253fSmrg # -berok will link without error, but may produce a broken library. 66325b16253fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 66335b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 66345b16253fSmrg if test yes = "$with_gnu_ld"; then 66355b16253fSmrg # We only use this code for GNU lds that support --whole-archive. 66365b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 66375b16253fSmrg else 66385b16253fSmrg # Exported symbols can be pulled into shared objects from archives 66395b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 66405b16253fSmrg fi 66415b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66425b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 66435b16253fSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 66445b16253fSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 66455b16253fSmrg if test svr4 != "$with_aix_soname"; then 66465b16253fSmrg # This is similar to how AIX traditionally builds its shared 66475b16253fSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 66485b16253fSmrg _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' 66495b16253fSmrg fi 66505b16253fSmrg if test aix != "$with_aix_soname"; then 66515b16253fSmrg _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' 66525b16253fSmrg else 66535b16253fSmrg # used by -dlpreopen to get the symbols 66545b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 66555b16253fSmrg fi 66565b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66575b16253fSmrg fi 66585b16253fSmrg fi 66595b16253fSmrg ;; 66605b16253fSmrg 66615b16253fSmrg beos*) 66625b16253fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66635b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66645b16253fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66655b16253fSmrg # support --undefined. This deserves some investigation. FIXME 66665b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66675b16253fSmrg else 66685b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66695b16253fSmrg fi 66705b16253fSmrg ;; 66715b16253fSmrg 66725b16253fSmrg chorus*) 66735b16253fSmrg case $cc_basename in 66745b16253fSmrg *) 66755b16253fSmrg # FIXME: insert proper C++ library support 66765b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66775b16253fSmrg ;; 66785b16253fSmrg esac 66795b16253fSmrg ;; 66805b16253fSmrg 66815b16253fSmrg cygwin* | mingw* | pw32* | cegcc*) 66825b16253fSmrg case $GXX,$cc_basename in 66835b16253fSmrg ,cl* | no,cl* | ,icl* | no,icl*) 66845b16253fSmrg # Native MSVC or ICC 66855b16253fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 66865b16253fSmrg # no search path for DLLs. 66875b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 66885b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66895b16253fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 66905b16253fSmrg _LT_TAGVAR(file_list_spec, $1)='@' 66915b16253fSmrg # Tell ltmain to make .lib files, not .a files. 66925b16253fSmrg libext=lib 66935b16253fSmrg # Tell ltmain to make .dll files, not .so files. 66945b16253fSmrg shrext_cmds=.dll 66955b16253fSmrg # FIXME: Setting linknames here is a bad hack. 66965b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 66975b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 66985b16253fSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 66995b16253fSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 67005b16253fSmrg else 67015b16253fSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 67025b16253fSmrg fi~ 67035b16253fSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 67045b16253fSmrg linknames=' 67055b16253fSmrg # The linker will not automatically build a static lib if we build a DLL. 67065b16253fSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 67075b16253fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67085b16253fSmrg # Don't use ranlib 67095b16253fSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 67105b16253fSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 67115b16253fSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 67125b16253fSmrg case $lt_outputfile in 67135b16253fSmrg *.exe|*.EXE) ;; 67145b16253fSmrg *) 67155b16253fSmrg lt_outputfile=$lt_outputfile.exe 67165b16253fSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 67175b16253fSmrg ;; 67185b16253fSmrg esac~ 67195b16253fSmrg func_to_tool_file "$lt_outputfile"~ 67205b16253fSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 67215b16253fSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 67225b16253fSmrg $RM "$lt_outputfile.manifest"; 67235b16253fSmrg fi' 67245b16253fSmrg ;; 67255b16253fSmrg *) 67265b16253fSmrg # g++ 67275b16253fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 67285b16253fSmrg # as there is no search path for DLLs. 67295b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67305b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 67315b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67325b16253fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 67335b16253fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67345b16253fSmrg 67355b16253fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 67365b16253fSmrg _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' 67375b16253fSmrg # If the export-symbols file already is a .def file, use it as 67385b16253fSmrg # is; otherwise, prepend EXPORTS... 67395b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 67405b16253fSmrg cp $export_symbols $output_objdir/$soname.def; 67415b16253fSmrg else 67425b16253fSmrg echo EXPORTS > $output_objdir/$soname.def; 67435b16253fSmrg cat $export_symbols >> $output_objdir/$soname.def; 67445b16253fSmrg fi~ 67455b16253fSmrg $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' 67465b16253fSmrg else 67475b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67485b16253fSmrg fi 67495b16253fSmrg ;; 67505b16253fSmrg esac 67515b16253fSmrg ;; 67525b16253fSmrg darwin* | rhapsody*) 67535b16253fSmrg _LT_DARWIN_LINKER_FEATURES($1) 67545b16253fSmrg ;; 67555b16253fSmrg 67565b16253fSmrg os2*) 67575b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67585b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 67595b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67605b16253fSmrg shrext_cmds=.dll 67615b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67625b16253fSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67635b16253fSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67645b16253fSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67655b16253fSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 67665b16253fSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67675b16253fSmrg emximp -o $lib $output_objdir/$libname.def' 67685b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67695b16253fSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67705b16253fSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67715b16253fSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67725b16253fSmrg prefix_cmds="$SED"~ 67735b16253fSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 67745b16253fSmrg prefix_cmds="$prefix_cmds -e 1d"; 67755b16253fSmrg fi~ 67765b16253fSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 67775b16253fSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 67785b16253fSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67795b16253fSmrg emximp -o $lib $output_objdir/$libname.def' 67805b16253fSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 67815b16253fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67825b16253fSmrg _LT_TAGVAR(file_list_spec, $1)='@' 67835b16253fSmrg ;; 67845b16253fSmrg 67855b16253fSmrg dgux*) 67865b16253fSmrg case $cc_basename in 67875b16253fSmrg ec++*) 67885b16253fSmrg # FIXME: insert proper C++ library support 67895b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67905b16253fSmrg ;; 67915b16253fSmrg ghcx*) 67925b16253fSmrg # Green Hills C++ Compiler 67935b16253fSmrg # FIXME: insert proper C++ library support 67945b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67955b16253fSmrg ;; 67965b16253fSmrg *) 67975b16253fSmrg # FIXME: insert proper C++ library support 67985b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67995b16253fSmrg ;; 68005b16253fSmrg esac 68015b16253fSmrg ;; 68025b16253fSmrg 68035b16253fSmrg freebsd2.*) 68045b16253fSmrg # C++ shared libraries reported to be fairly broken before 68055b16253fSmrg # switch to ELF 68065b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68075b16253fSmrg ;; 68085b16253fSmrg 68095b16253fSmrg freebsd-elf*) 68105b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68115b16253fSmrg ;; 68125b16253fSmrg 68135b16253fSmrg freebsd* | dragonfly* | midnightbsd*) 68145b16253fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 68155b16253fSmrg # conventions 68165b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 68175b16253fSmrg ;; 68185b16253fSmrg 68195b16253fSmrg haiku*) 68205b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 68215b16253fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68225b16253fSmrg ;; 68235b16253fSmrg 68245b16253fSmrg hpux9*) 68255b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68265b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68275b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68285b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 68295b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68305b16253fSmrg # but as the default 68315b16253fSmrg # location of the library. 68325b16253fSmrg 68335b16253fSmrg case $cc_basename in 68345b16253fSmrg CC*) 68355b16253fSmrg # FIXME: insert proper C++ library support 68365b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68375b16253fSmrg ;; 68385b16253fSmrg aCC*) 68395b16253fSmrg _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' 68405b16253fSmrg # Commands to make compiler produce verbose output that lists 68415b16253fSmrg # what "hidden" libraries, object files and flags are used when 68425b16253fSmrg # linking a shared library. 68435b16253fSmrg # 68445b16253fSmrg # There doesn't appear to be a way to prevent this compiler from 68455b16253fSmrg # explicitly linking system object files so we need to strip them 68465b16253fSmrg # from the output so that they don't get included in the library 68475b16253fSmrg # dependencies. 6848efbcb2bfSmrg 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"' 68495b16253fSmrg ;; 68505b16253fSmrg *) 68515b16253fSmrg if test yes = "$GXX"; then 68525b16253fSmrg _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' 68535b16253fSmrg else 68545b16253fSmrg # FIXME: insert proper C++ library support 68555b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68565b16253fSmrg fi 68575b16253fSmrg ;; 68585b16253fSmrg esac 68595b16253fSmrg ;; 68605b16253fSmrg 68615b16253fSmrg hpux10*|hpux11*) 68625b16253fSmrg if test no = "$with_gnu_ld"; then 68635b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68645b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68655b16253fSmrg 68665b16253fSmrg case $host_cpu in 68675b16253fSmrg hppa*64*|ia64*) 68685b16253fSmrg ;; 68695b16253fSmrg *) 68705b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68715b16253fSmrg ;; 68725b16253fSmrg esac 68735b16253fSmrg fi 68745b16253fSmrg case $host_cpu in 68755b16253fSmrg hppa*64*|ia64*) 68765b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 68775b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68785b16253fSmrg ;; 68795b16253fSmrg *) 68805b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 68815b16253fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68825b16253fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68835b16253fSmrg # but as the default 68845b16253fSmrg # location of the library. 68855b16253fSmrg ;; 68865b16253fSmrg esac 68875b16253fSmrg 68885b16253fSmrg case $cc_basename in 68895b16253fSmrg CC*) 68905b16253fSmrg # FIXME: insert proper C++ library support 68915b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68925b16253fSmrg ;; 68935b16253fSmrg aCC*) 68945b16253fSmrg case $host_cpu in 68955b16253fSmrg hppa*64*) 68965b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68975b16253fSmrg ;; 68985b16253fSmrg ia64*) 68995b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 69005b16253fSmrg ;; 69015b16253fSmrg *) 69025b16253fSmrg _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' 69035b16253fSmrg ;; 69045b16253fSmrg esac 69055b16253fSmrg # Commands to make compiler produce verbose output that lists 69065b16253fSmrg # what "hidden" libraries, object files and flags are used when 69075b16253fSmrg # linking a shared library. 69085b16253fSmrg # 69095b16253fSmrg # There doesn't appear to be a way to prevent this compiler from 69105b16253fSmrg # explicitly linking system object files so we need to strip them 69115b16253fSmrg # from the output so that they don't get included in the library 69125b16253fSmrg # dependencies. 6913efbcb2bfSmrg 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"' 69145b16253fSmrg ;; 69155b16253fSmrg *) 69165b16253fSmrg if test yes = "$GXX"; then 69175b16253fSmrg if test no = "$with_gnu_ld"; then 69185b16253fSmrg case $host_cpu in 69195b16253fSmrg hppa*64*) 69205b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 69215b16253fSmrg ;; 69225b16253fSmrg ia64*) 69235b16253fSmrg _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' 69245b16253fSmrg ;; 69255b16253fSmrg *) 69265b16253fSmrg _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' 69275b16253fSmrg ;; 69285b16253fSmrg esac 69295b16253fSmrg fi 69305b16253fSmrg else 69315b16253fSmrg # FIXME: insert proper C++ library support 69325b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 69335b16253fSmrg fi 69345b16253fSmrg ;; 69355b16253fSmrg esac 69365b16253fSmrg ;; 69375b16253fSmrg 69385b16253fSmrg interix[[3-9]]*) 69395b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 69405b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 69415b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69425b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69435b16253fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69445b16253fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69455b16253fSmrg # default) and relocated if they conflict, which is a slow very memory 69465b16253fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 69475b16253fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69485b16253fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 69495b16253fSmrg _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' 69505b16253fSmrg _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' 69515b16253fSmrg ;; 69525b16253fSmrg irix5* | irix6*) 69535b16253fSmrg case $cc_basename in 69545b16253fSmrg CC*) 69555b16253fSmrg # SGI C++ 69565b16253fSmrg _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' 69575b16253fSmrg 69585b16253fSmrg # Archives containing C++ object files must be created using 69595b16253fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69605b16253fSmrg # necessary to make sure instantiated templates are included 69615b16253fSmrg # in the archive. 69625b16253fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69635b16253fSmrg ;; 69645b16253fSmrg *) 69655b16253fSmrg if test yes = "$GXX"; then 69665b16253fSmrg if test no = "$with_gnu_ld"; then 69675b16253fSmrg _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' 69685b16253fSmrg else 69695b16253fSmrg _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' 69705b16253fSmrg fi 69715b16253fSmrg fi 69725b16253fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69735b16253fSmrg ;; 69745b16253fSmrg esac 69755b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69765b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69775b16253fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 69785b16253fSmrg ;; 69795b16253fSmrg 69805b16253fSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69815b16253fSmrg case $cc_basename in 69825b16253fSmrg KCC*) 69835b16253fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 69845b16253fSmrg 69855b16253fSmrg # KCC will only create a shared library if the output file 69865b16253fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69875b16253fSmrg # to its proper name (with version) after linking. 69885b16253fSmrg _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' 69895b16253fSmrg _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' 69905b16253fSmrg # Commands to make compiler produce verbose output that lists 69915b16253fSmrg # what "hidden" libraries, object files and flags are used when 69925b16253fSmrg # linking a shared library. 69935b16253fSmrg # 69945b16253fSmrg # There doesn't appear to be a way to prevent this compiler from 69955b16253fSmrg # explicitly linking system object files so we need to strip them 69965b16253fSmrg # from the output so that they don't get included in the library 69975b16253fSmrg # dependencies. 69985b16253fSmrg 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"' 69995b16253fSmrg 70005b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 70015b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70025b16253fSmrg 70035b16253fSmrg # Archives containing C++ object files must be created using 70045b16253fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 70055b16253fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 70065b16253fSmrg ;; 70075b16253fSmrg icpc* | ecpc* ) 70085b16253fSmrg # Intel C++ 70095b16253fSmrg with_gnu_ld=yes 70105b16253fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 70115b16253fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 70125b16253fSmrg # earlier do not add the objects themselves. 70135b16253fSmrg case `$CC -V 2>&1` in 70145b16253fSmrg *"Version 7."*) 70155b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70165b16253fSmrg _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' 70175b16253fSmrg ;; 70185b16253fSmrg *) # Version 8.0 or newer 70195b16253fSmrg tmp_idyn= 70205b16253fSmrg case $host_cpu in 70215b16253fSmrg ia64*) tmp_idyn=' -i_dynamic';; 70225b16253fSmrg esac 70235b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70245b16253fSmrg _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' 70255b16253fSmrg ;; 70265b16253fSmrg esac 70275b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 70285b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 70295b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70305b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 70315b16253fSmrg ;; 70325b16253fSmrg pgCC* | pgcpp*) 70335b16253fSmrg # Portland Group C++ compiler 70345b16253fSmrg case `$CC -V` in 70355b16253fSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 70365b16253fSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 70375b16253fSmrg rm -rf $tpldir~ 70385b16253fSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 70395b16253fSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70405b16253fSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 70415b16253fSmrg rm -rf $tpldir~ 70425b16253fSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 70435b16253fSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 70445b16253fSmrg $RANLIB $oldlib' 70455b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 70465b16253fSmrg rm -rf $tpldir~ 70475b16253fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70485b16253fSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70495b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 70505b16253fSmrg rm -rf $tpldir~ 70515b16253fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70525b16253fSmrg $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' 70535b16253fSmrg ;; 70545b16253fSmrg *) # Version 6 and above use weak symbols 70555b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70565b16253fSmrg _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' 70575b16253fSmrg ;; 70585b16253fSmrg esac 70595b16253fSmrg 70605b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 70615b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70625b16253fSmrg _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' 70635b16253fSmrg ;; 70645b16253fSmrg cxx*) 70655b16253fSmrg # Compaq C++ 70665b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70675b16253fSmrg _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' 70685b16253fSmrg 70695b16253fSmrg runpath_var=LD_RUN_PATH 70705b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70715b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 70725b16253fSmrg 70735b16253fSmrg # Commands to make compiler produce verbose output that lists 70745b16253fSmrg # what "hidden" libraries, object files and flags are used when 70755b16253fSmrg # linking a shared library. 70765b16253fSmrg # 70775b16253fSmrg # There doesn't appear to be a way to prevent this compiler from 70785b16253fSmrg # explicitly linking system object files so we need to strip them 70795b16253fSmrg # from the output so that they don't get included in the library 70805b16253fSmrg # dependencies. 70815b16253fSmrg 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' 70825b16253fSmrg ;; 70835b16253fSmrg xl* | mpixl* | bgxl*) 70845b16253fSmrg # IBM XL 8.0 on PPC, with GNU ld 70855b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 70865b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70875b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70885b16253fSmrg if test yes = "$supports_anon_versioning"; then 70895b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 70905b16253fSmrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 70915b16253fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 70925b16253fSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70935b16253fSmrg fi 70945b16253fSmrg ;; 70955b16253fSmrg *) 70965b16253fSmrg case `$CC -V 2>&1 | $SED 5q` in 70975b16253fSmrg *Sun\ C*) 70985b16253fSmrg # Sun C++ 5.9 70995b16253fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 71005b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 71015b16253fSmrg _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' 71025b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71035b16253fSmrg _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' 71045b16253fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 71055b16253fSmrg 71065b16253fSmrg # Not sure whether something based on 71075b16253fSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 71085b16253fSmrg # would be better. 71095b16253fSmrg output_verbose_link_cmd='func_echo_all' 71105b16253fSmrg 71115b16253fSmrg # Archives containing C++ object files must be created using 71125b16253fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 71135b16253fSmrg # necessary to make sure instantiated templates are included 71145b16253fSmrg # in the archive. 71155b16253fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 71165b16253fSmrg ;; 71175b16253fSmrg esac 71185b16253fSmrg ;; 71195b16253fSmrg esac 71205b16253fSmrg ;; 71215b16253fSmrg 71225b16253fSmrg lynxos*) 71235b16253fSmrg # FIXME: insert proper C++ library support 71245b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71255b16253fSmrg ;; 71265b16253fSmrg 71275b16253fSmrg m88k*) 71285b16253fSmrg # FIXME: insert proper C++ library support 71295b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71305b16253fSmrg ;; 71315b16253fSmrg 71325b16253fSmrg mvs*) 71335b16253fSmrg case $cc_basename in 71345b16253fSmrg cxx*) 71355b16253fSmrg # FIXME: insert proper C++ library support 71365b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71375b16253fSmrg ;; 71385b16253fSmrg *) 71395b16253fSmrg # FIXME: insert proper C++ library support 71405b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71415b16253fSmrg ;; 71425b16253fSmrg esac 71435b16253fSmrg ;; 71445b16253fSmrg 71455b16253fSmrg netbsd*) 71465b16253fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71475b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71485b16253fSmrg wlarc= 71495b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71505b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 71515b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71525b16253fSmrg fi 71535b16253fSmrg # Workaround some broken pre-1.5 toolchains 71545b16253fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71555b16253fSmrg ;; 71565b16253fSmrg 71575b16253fSmrg *nto* | *qnx*) 71585b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 71595b16253fSmrg ;; 71605b16253fSmrg 71615b16253fSmrg openbsd* | bitrig*) 71625b16253fSmrg if test -f /usr/libexec/ld.so; then 71635b16253fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 71645b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71655b16253fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71665b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 71675b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71685b16253fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 71695b16253fSmrg _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' 71705b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 71715b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71725b16253fSmrg fi 71735b16253fSmrg output_verbose_link_cmd=func_echo_all 71745b16253fSmrg else 71755b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71765b16253fSmrg fi 71775b16253fSmrg ;; 71785b16253fSmrg 71795b16253fSmrg osf3* | osf4* | osf5*) 71805b16253fSmrg case $cc_basename in 71815b16253fSmrg KCC*) 71825b16253fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 71835b16253fSmrg 71845b16253fSmrg # KCC will only create a shared library if the output file 71855b16253fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71865b16253fSmrg # to its proper name (with version) after linking. 71875b16253fSmrg _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' 71885b16253fSmrg 71895b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71905b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71915b16253fSmrg 71925b16253fSmrg # Archives containing C++ object files must be created using 71935b16253fSmrg # the KAI C++ compiler. 71945b16253fSmrg case $host in 71955b16253fSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71965b16253fSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71975b16253fSmrg esac 71985b16253fSmrg ;; 71995b16253fSmrg RCC*) 72005b16253fSmrg # Rational C++ 2.4.1 72015b16253fSmrg # FIXME: insert proper C++ library support 72025b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72035b16253fSmrg ;; 72045b16253fSmrg cxx*) 72055b16253fSmrg case $host in 72065b16253fSmrg osf3*) 72075b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72085b16253fSmrg _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' 72095b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72105b16253fSmrg ;; 72115b16253fSmrg *) 72125b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 72135b16253fSmrg _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' 72145b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 72155b16253fSmrg echo "-hidden">> $lib.exp~ 72165b16253fSmrg $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~ 72175b16253fSmrg $RM $lib.exp' 72185b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 72195b16253fSmrg ;; 72205b16253fSmrg esac 72215b16253fSmrg 72225b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72235b16253fSmrg 72245b16253fSmrg # Commands to make compiler produce verbose output that lists 72255b16253fSmrg # what "hidden" libraries, object files and flags are used when 72265b16253fSmrg # linking a shared library. 72275b16253fSmrg # 72285b16253fSmrg # There doesn't appear to be a way to prevent this compiler from 72295b16253fSmrg # explicitly linking system object files so we need to strip them 72305b16253fSmrg # from the output so that they don't get included in the library 72315b16253fSmrg # dependencies. 72325b16253fSmrg 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"' 72335b16253fSmrg ;; 72345b16253fSmrg *) 72355b16253fSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 72365b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72375b16253fSmrg case $host in 72385b16253fSmrg osf3*) 72395b16253fSmrg _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' 72405b16253fSmrg ;; 72415b16253fSmrg *) 72425b16253fSmrg _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' 72435b16253fSmrg ;; 72445b16253fSmrg esac 72455b16253fSmrg 72465b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72475b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72485b16253fSmrg 72495b16253fSmrg # Commands to make compiler produce verbose output that lists 72505b16253fSmrg # what "hidden" libraries, object files and flags are used when 72515b16253fSmrg # linking a shared library. 7252efbcb2bfSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' 72535b16253fSmrg 72545b16253fSmrg else 72555b16253fSmrg # FIXME: insert proper C++ library support 72565b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72575b16253fSmrg fi 72585b16253fSmrg ;; 72595b16253fSmrg esac 72605b16253fSmrg ;; 72615b16253fSmrg 72625b16253fSmrg psos*) 72635b16253fSmrg # FIXME: insert proper C++ library support 72645b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72655b16253fSmrg ;; 72665b16253fSmrg 72675b16253fSmrg sunos4*) 72685b16253fSmrg case $cc_basename in 72695b16253fSmrg CC*) 72705b16253fSmrg # Sun C++ 4.x 72715b16253fSmrg # FIXME: insert proper C++ library support 72725b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72735b16253fSmrg ;; 72745b16253fSmrg lcc*) 72755b16253fSmrg # Lucid 72765b16253fSmrg # FIXME: insert proper C++ library support 72775b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72785b16253fSmrg ;; 72795b16253fSmrg *) 72805b16253fSmrg # FIXME: insert proper C++ library support 72815b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72825b16253fSmrg ;; 72835b16253fSmrg esac 72845b16253fSmrg ;; 72855b16253fSmrg 72865b16253fSmrg solaris*) 72875b16253fSmrg case $cc_basename in 72885b16253fSmrg CC* | sunCC*) 72895b16253fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 72905b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72915b16253fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 72925b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72935b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 72945b16253fSmrg $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' 72955b16253fSmrg 72965b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72975b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72985b16253fSmrg case $host_os in 72995b16253fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73005b16253fSmrg *) 73015b16253fSmrg # The compiler driver will combine and reorder linker options, 73025b16253fSmrg # but understands '-z linker_flag'. 73035b16253fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 73045b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 73055b16253fSmrg ;; 73065b16253fSmrg esac 73075b16253fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73085b16253fSmrg 73095b16253fSmrg output_verbose_link_cmd='func_echo_all' 73105b16253fSmrg 73115b16253fSmrg # Archives containing C++ object files must be created using 73125b16253fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 73135b16253fSmrg # necessary to make sure instantiated templates are included 73145b16253fSmrg # in the archive. 73155b16253fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 73165b16253fSmrg ;; 73175b16253fSmrg gcx*) 73185b16253fSmrg # Green Hills C++ Compiler 73195b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73205b16253fSmrg 73215b16253fSmrg # The C++ compiler must be used to create the archive. 73225b16253fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 73235b16253fSmrg ;; 73245b16253fSmrg *) 73255b16253fSmrg # GNU C++ compiler with Solaris linker 73265b16253fSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 73275b16253fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 73285b16253fSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 73295b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73305b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73315b16253fSmrg $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' 73325b16253fSmrg 73335b16253fSmrg # Commands to make compiler produce verbose output that lists 73345b16253fSmrg # what "hidden" libraries, object files and flags are used when 73355b16253fSmrg # linking a shared library. 7336efbcb2bfSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' 73375b16253fSmrg else 73385b16253fSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 73395b16253fSmrg # platform. 73405b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73415b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73425b16253fSmrg $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' 73435b16253fSmrg 73445b16253fSmrg # Commands to make compiler produce verbose output that lists 73455b16253fSmrg # what "hidden" libraries, object files and flags are used when 73465b16253fSmrg # linking a shared library. 7347efbcb2bfSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' 73485b16253fSmrg fi 73495b16253fSmrg 73505b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73515b16253fSmrg case $host_os in 73525b16253fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73535b16253fSmrg *) 73545b16253fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73555b16253fSmrg ;; 73565b16253fSmrg esac 73575b16253fSmrg fi 73585b16253fSmrg ;; 73595b16253fSmrg esac 73605b16253fSmrg ;; 73615b16253fSmrg 73625b16253fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 73635b16253fSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73645b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73655b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73665b16253fSmrg runpath_var='LD_RUN_PATH' 73675b16253fSmrg 73685b16253fSmrg case $cc_basename in 73695b16253fSmrg CC*) 73705b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73715b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73725b16253fSmrg ;; 73735b16253fSmrg *) 73745b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73755b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73765b16253fSmrg ;; 73775b16253fSmrg esac 73785b16253fSmrg ;; 73795b16253fSmrg 73805b16253fSmrg sysv5* | sco3.2v5* | sco5v6*) 73815b16253fSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 73825b16253fSmrg # link with -lc, and that would cause any symbols used from libc to 73835b16253fSmrg # always be unresolved, which means just about no library would 73845b16253fSmrg # ever link correctly. If we're not using GNU ld we use -z text 73855b16253fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 73865b16253fSmrg # as -z defs. 73875b16253fSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73885b16253fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73895b16253fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73905b16253fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73915b16253fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73925b16253fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73935b16253fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73945b16253fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73955b16253fSmrg runpath_var='LD_RUN_PATH' 73965b16253fSmrg 73975b16253fSmrg case $cc_basename in 73985b16253fSmrg CC*) 73995b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74005b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74015b16253fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 74025b16253fSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 74035b16253fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 74045b16253fSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 74055b16253fSmrg ;; 74065b16253fSmrg *) 74075b16253fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74085b16253fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 74095b16253fSmrg ;; 74105b16253fSmrg esac 74115b16253fSmrg ;; 74125b16253fSmrg 74135b16253fSmrg tandem*) 74145b16253fSmrg case $cc_basename in 74155b16253fSmrg NCC*) 74165b16253fSmrg # NonStop-UX NCC 3.20 74175b16253fSmrg # FIXME: insert proper C++ library support 74185b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 74195b16253fSmrg ;; 74205b16253fSmrg *) 74215b16253fSmrg # FIXME: insert proper C++ library support 74225b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 74235b16253fSmrg ;; 74245b16253fSmrg esac 74255b16253fSmrg ;; 74265b16253fSmrg 74275b16253fSmrg vxworks*) 74285b16253fSmrg # FIXME: insert proper C++ library support 74295b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 74305b16253fSmrg ;; 74315b16253fSmrg 74325b16253fSmrg *) 74335b16253fSmrg # FIXME: insert proper C++ library support 74345b16253fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 74355b16253fSmrg ;; 74365b16253fSmrg esac 74375b16253fSmrg 74385b16253fSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 74395b16253fSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 74405b16253fSmrg 74415b16253fSmrg _LT_TAGVAR(GCC, $1)=$GXX 74425b16253fSmrg _LT_TAGVAR(LD, $1)=$LD 74435b16253fSmrg 74445b16253fSmrg ## CAVEAT EMPTOR: 74455b16253fSmrg ## There is no encapsulation within the following macros, do not change 74465b16253fSmrg ## the running order or otherwise move them around unless you know exactly 74475b16253fSmrg ## what you are doing... 74485b16253fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 74495b16253fSmrg _LT_COMPILER_PIC($1) 74505b16253fSmrg _LT_COMPILER_C_O($1) 74515b16253fSmrg _LT_COMPILER_FILE_LOCKS($1) 74525b16253fSmrg _LT_LINKER_SHLIBS($1) 74535b16253fSmrg _LT_SYS_DYNAMIC_LINKER($1) 74545b16253fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 74555b16253fSmrg 74565b16253fSmrg _LT_CONFIG($1) 74575b16253fSmrg fi # test -n "$compiler" 74585b16253fSmrg 74595b16253fSmrg CC=$lt_save_CC 74605b16253fSmrg CFLAGS=$lt_save_CFLAGS 74615b16253fSmrg LDCXX=$LD 74625b16253fSmrg LD=$lt_save_LD 74635b16253fSmrg GCC=$lt_save_GCC 74645b16253fSmrg with_gnu_ld=$lt_save_with_gnu_ld 74655b16253fSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 74665b16253fSmrg lt_cv_path_LD=$lt_save_path_LD 74675b16253fSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74685b16253fSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 74695b16253fSmrgfi # test yes != "$_lt_caught_CXX_error" 74705b16253fSmrg 74715b16253fSmrgAC_LANG_POP 74725b16253fSmrg])# _LT_LANG_CXX_CONFIG 74735b16253fSmrg 74745b16253fSmrg 74755b16253fSmrg# _LT_FUNC_STRIPNAME_CNF 74765b16253fSmrg# ---------------------- 74775b16253fSmrg# func_stripname_cnf prefix suffix name 74785b16253fSmrg# strip PREFIX and SUFFIX off of NAME. 74795b16253fSmrg# PREFIX and SUFFIX must not contain globbing or regex special 74805b16253fSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 74815b16253fSmrg# dot (in which case that matches only a dot). 74825b16253fSmrg# 74835b16253fSmrg# This function is identical to the (non-XSI) version of func_stripname, 74845b16253fSmrg# except this one can be used by m4 code that may be executed by configure, 74855b16253fSmrg# rather than the libtool script. 74865b16253fSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 74875b16253fSmrgAC_REQUIRE([_LT_DECL_SED]) 74885b16253fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 74895b16253fSmrgfunc_stripname_cnf () 74905b16253fSmrg{ 74915b16253fSmrg case @S|@2 in 74925b16253fSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 74935b16253fSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 74945b16253fSmrg esac 74955b16253fSmrg} # func_stripname_cnf 74965b16253fSmrg])# _LT_FUNC_STRIPNAME_CNF 74975b16253fSmrg 74985b16253fSmrg 74995b16253fSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 75005b16253fSmrg# --------------------------------- 75015b16253fSmrg# Figure out "hidden" library dependencies from verbose 75025b16253fSmrg# compiler output when linking a shared library. 75035b16253fSmrg# Parse the compiler output and extract the necessary 75045b16253fSmrg# objects, libraries and library flags. 75055b16253fSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 75065b16253fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 75075b16253fSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 75085b16253fSmrg# Dependencies to place before and after the object being linked: 75095b16253fSmrg_LT_TAGVAR(predep_objects, $1)= 75105b16253fSmrg_LT_TAGVAR(postdep_objects, $1)= 75115b16253fSmrg_LT_TAGVAR(predeps, $1)= 75125b16253fSmrg_LT_TAGVAR(postdeps, $1)= 75135b16253fSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 75145b16253fSmrg 75155b16253fSmrgdnl we can't use the lt_simple_compile_test_code here, 75165b16253fSmrgdnl because it contains code intended for an executable, 75175b16253fSmrgdnl not a library. It's possible we should let each 75185b16253fSmrgdnl tag define a new lt_????_link_test_code variable, 75195b16253fSmrgdnl but it's only used here... 75205b16253fSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 75215b16253fSmrgint a; 75225b16253fSmrgvoid foo (void) { a = 0; } 75235b16253fSmrg_LT_EOF 75245b16253fSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 75255b16253fSmrgclass Foo 75265b16253fSmrg{ 75275b16253fSmrgpublic: 75285b16253fSmrg Foo (void) { a = 0; } 75295b16253fSmrgprivate: 75305b16253fSmrg int a; 75315b16253fSmrg}; 75325b16253fSmrg_LT_EOF 75335b16253fSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 75345b16253fSmrg subroutine foo 75355b16253fSmrg implicit none 75365b16253fSmrg integer*4 a 75375b16253fSmrg a=0 75385b16253fSmrg return 75395b16253fSmrg end 75405b16253fSmrg_LT_EOF 75415b16253fSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75425b16253fSmrg subroutine foo 75435b16253fSmrg implicit none 75445b16253fSmrg integer a 75455b16253fSmrg a=0 75465b16253fSmrg return 75475b16253fSmrg end 75485b16253fSmrg_LT_EOF 75495b16253fSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75505b16253fSmrgpublic class foo { 75515b16253fSmrg private int a; 75525b16253fSmrg public void bar (void) { 75535b16253fSmrg a = 0; 75545b16253fSmrg } 75555b16253fSmrg}; 75565b16253fSmrg_LT_EOF 75575b16253fSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 75585b16253fSmrgpackage foo 75595b16253fSmrgfunc foo() { 75605b16253fSmrg} 75615b16253fSmrg_LT_EOF 75625b16253fSmrg]) 75635b16253fSmrg 75645b16253fSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 75655b16253fSmrgcase "$CC $CFLAGS " in #( 75665b16253fSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 75675b16253fSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 75685b16253fSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75695b16253fSmrgesac 75705b16253fSmrg 75715b16253fSmrgdnl Parse the compiler output and extract the necessary 75725b16253fSmrgdnl objects, libraries and library flags. 75735b16253fSmrgif AC_TRY_EVAL(ac_compile); then 75745b16253fSmrg # Parse the compiler output and extract the necessary 75755b16253fSmrg # objects, libraries and library flags. 75765b16253fSmrg 75775b16253fSmrg # Sentinel used to keep track of whether or not we are before 75785b16253fSmrg # the conftest object file. 75795b16253fSmrg pre_test_object_deps_done=no 75805b16253fSmrg 75815b16253fSmrg for p in `eval "$output_verbose_link_cmd"`; do 75825b16253fSmrg case $prev$p in 75835b16253fSmrg 75845b16253fSmrg -L* | -R* | -l*) 75855b16253fSmrg # Some compilers place space between "-{L,R}" and the path. 75865b16253fSmrg # Remove the space. 75875b16253fSmrg if test x-L = "$p" || 75885b16253fSmrg test x-R = "$p"; then 75895b16253fSmrg prev=$p 75905b16253fSmrg continue 75915b16253fSmrg fi 75925b16253fSmrg 75935b16253fSmrg # Expand the sysroot to ease extracting the directories later. 75945b16253fSmrg if test -z "$prev"; then 75955b16253fSmrg case $p in 75965b16253fSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 75975b16253fSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 75985b16253fSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 75995b16253fSmrg esac 76005b16253fSmrg fi 76015b16253fSmrg case $p in 76025b16253fSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 76035b16253fSmrg esac 76045b16253fSmrg if test no = "$pre_test_object_deps_done"; then 76055b16253fSmrg case $prev in 76065b16253fSmrg -L | -R) 76075b16253fSmrg # Internal compiler library paths should come after those 76085b16253fSmrg # provided the user. The postdeps already come after the 76095b16253fSmrg # user supplied libs so there is no need to process them. 76105b16253fSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 76115b16253fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 76125b16253fSmrg else 76135b16253fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 76145b16253fSmrg fi 76155b16253fSmrg ;; 76165b16253fSmrg # The "-l" case would never come before the object being 76175b16253fSmrg # linked, so don't bother handling this case. 76185b16253fSmrg esac 76195b16253fSmrg else 76205b16253fSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 76215b16253fSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 76225b16253fSmrg else 76235b16253fSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 76245b16253fSmrg fi 76255b16253fSmrg fi 76265b16253fSmrg prev= 76275b16253fSmrg ;; 76285b16253fSmrg 76295b16253fSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 76305b16253fSmrg *.$objext) 76315b16253fSmrg # This assumes that the test object file only shows up 76325b16253fSmrg # once in the compiler output. 76335b16253fSmrg if test "$p" = "conftest.$objext"; then 76345b16253fSmrg pre_test_object_deps_done=yes 76355b16253fSmrg continue 76365b16253fSmrg fi 76375b16253fSmrg 76385b16253fSmrg if test no = "$pre_test_object_deps_done"; then 76395b16253fSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 76405b16253fSmrg _LT_TAGVAR(predep_objects, $1)=$p 76415b16253fSmrg else 76425b16253fSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76435b16253fSmrg fi 76445b16253fSmrg else 76455b16253fSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 76465b16253fSmrg _LT_TAGVAR(postdep_objects, $1)=$p 76475b16253fSmrg else 76485b16253fSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76495b16253fSmrg fi 76505b16253fSmrg fi 76515b16253fSmrg ;; 76525b16253fSmrg 76535b16253fSmrg *) ;; # Ignore the rest. 76545b16253fSmrg 76555b16253fSmrg esac 76565b16253fSmrg done 76575b16253fSmrg 76585b16253fSmrg # Clean up. 76595b16253fSmrg rm -f a.out a.exe 76605b16253fSmrgelse 76615b16253fSmrg echo "libtool.m4: error: problem compiling $1 test program" 76625b16253fSmrgfi 76635b16253fSmrg 76645b16253fSmrg$RM -f confest.$objext 76655b16253fSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 76665b16253fSmrg 76675b16253fSmrg# PORTME: override above test on systems where it is broken 76685b16253fSmrgm4_if([$1], [CXX], 76695b16253fSmrg[case $host_os in 76705b16253fSmrginterix[[3-9]]*) 76715b16253fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76725b16253fSmrg # hack all around it, let's just trust "g++" to DTRT. 76735b16253fSmrg _LT_TAGVAR(predep_objects,$1)= 76745b16253fSmrg _LT_TAGVAR(postdep_objects,$1)= 76755b16253fSmrg _LT_TAGVAR(postdeps,$1)= 76765b16253fSmrg ;; 76775b16253fSmrgesac 76785b16253fSmrg]) 76795b16253fSmrg 76805b16253fSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 76815b16253fSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76825b16253fSmrgesac 76835b16253fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76845b16253fSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 76855b16253fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76865b16253fSmrgfi 76875b16253fSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76885b16253fSmrg [The directories searched by this compiler when creating a shared library]) 76895b16253fSmrg_LT_TAGDECL([], [predep_objects], [1], 76905b16253fSmrg [Dependencies to place before and after the objects being linked to 76915b16253fSmrg create a shared library]) 76925b16253fSmrg_LT_TAGDECL([], [postdep_objects], [1]) 76935b16253fSmrg_LT_TAGDECL([], [predeps], [1]) 76945b16253fSmrg_LT_TAGDECL([], [postdeps], [1]) 76955b16253fSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76965b16253fSmrg [The library search path used internally by the compiler when linking 76975b16253fSmrg a shared library]) 76985b16253fSmrg])# _LT_SYS_HIDDEN_LIBDEPS 76995b16253fSmrg 77005b16253fSmrg 77015b16253fSmrg# _LT_LANG_F77_CONFIG([TAG]) 77025b16253fSmrg# -------------------------- 77035b16253fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 77045b16253fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 77055b16253fSmrg# to write the compiler configuration to 'libtool'. 77065b16253fSmrgm4_defun([_LT_LANG_F77_CONFIG], 77075b16253fSmrg[AC_LANG_PUSH(Fortran 77) 77085b16253fSmrgif test -z "$F77" || test no = "$F77"; then 77095b16253fSmrg _lt_disable_F77=yes 77105b16253fSmrgfi 77115b16253fSmrg 77125b16253fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 77135b16253fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 77145b16253fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 77155b16253fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 77165b16253fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 77175b16253fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 77185b16253fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 77195b16253fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 77205b16253fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 77215b16253fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 77225b16253fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 77235b16253fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 77245b16253fSmrg_LT_TAGVAR(module_cmds, $1)= 77255b16253fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 77265b16253fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 77275b16253fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 77285b16253fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 77295b16253fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 77305b16253fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 77315b16253fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 77325b16253fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 77335b16253fSmrg 77345b16253fSmrg# Source file extension for f77 test sources. 77355b16253fSmrgac_ext=f 77365b16253fSmrg 77375b16253fSmrg# Object file extension for compiled f77 test sources. 77385b16253fSmrgobjext=o 77395b16253fSmrg_LT_TAGVAR(objext, $1)=$objext 77405b16253fSmrg 77415b16253fSmrg# No sense in running all these tests if we already determined that 77425b16253fSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 77435b16253fSmrg# are currently assumed to apply to all compilers on this platform, 77445b16253fSmrg# and will be corrupted by setting them based on a non-working compiler. 77455b16253fSmrgif test yes != "$_lt_disable_F77"; then 77465b16253fSmrg # Code to be used in simple compile tests 77475b16253fSmrg lt_simple_compile_test_code="\ 77485b16253fSmrg subroutine t 77495b16253fSmrg return 77505b16253fSmrg end 77515b16253fSmrg" 77525b16253fSmrg 77535b16253fSmrg # Code to be used in simple link tests 77545b16253fSmrg lt_simple_link_test_code="\ 77555b16253fSmrg program t 77565b16253fSmrg end 77575b16253fSmrg" 77585b16253fSmrg 77595b16253fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77605b16253fSmrg _LT_TAG_COMPILER 77615b16253fSmrg 77625b16253fSmrg # save warnings/boilerplate of simple test code 77635b16253fSmrg _LT_COMPILER_BOILERPLATE 77645b16253fSmrg _LT_LINKER_BOILERPLATE 77655b16253fSmrg 77665b16253fSmrg # Allow CC to be a program name with arguments. 77675b16253fSmrg lt_save_CC=$CC 77685b16253fSmrg lt_save_GCC=$GCC 77695b16253fSmrg lt_save_CFLAGS=$CFLAGS 77705b16253fSmrg CC=${F77-"f77"} 77715b16253fSmrg CFLAGS=$FFLAGS 77725b16253fSmrg compiler=$CC 77735b16253fSmrg _LT_TAGVAR(compiler, $1)=$CC 77745b16253fSmrg _LT_CC_BASENAME([$compiler]) 77755b16253fSmrg GCC=$G77 77765b16253fSmrg if test -n "$compiler"; then 77775b16253fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 77785b16253fSmrg AC_MSG_RESULT([$can_build_shared]) 77795b16253fSmrg 77805b16253fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 77815b16253fSmrg test no = "$can_build_shared" && enable_shared=no 77825b16253fSmrg 77835b16253fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 77845b16253fSmrg # are all built from PIC. 77855b16253fSmrg case $host_os in 77865b16253fSmrg aix3*) 77875b16253fSmrg test yes = "$enable_shared" && enable_static=no 77885b16253fSmrg if test -n "$RANLIB"; then 77895b16253fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 77905b16253fSmrg postinstall_cmds='$RANLIB $lib' 77915b16253fSmrg fi 77925b16253fSmrg ;; 77935b16253fSmrg aix[[4-9]]*) 77945b16253fSmrg if test ia64 != "$host_cpu"; then 77955b16253fSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 77965b16253fSmrg yes,aix,yes) ;; # shared object as lib.so file only 77975b16253fSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 77985b16253fSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 77995b16253fSmrg esac 78005b16253fSmrg fi 78015b16253fSmrg ;; 78025b16253fSmrg esac 78035b16253fSmrg AC_MSG_RESULT([$enable_shared]) 78045b16253fSmrg 78055b16253fSmrg AC_MSG_CHECKING([whether to build static libraries]) 78065b16253fSmrg # Make sure either enable_shared or enable_static is yes. 78075b16253fSmrg test yes = "$enable_shared" || enable_static=yes 78085b16253fSmrg AC_MSG_RESULT([$enable_static]) 78095b16253fSmrg 78105b16253fSmrg _LT_TAGVAR(GCC, $1)=$G77 78115b16253fSmrg _LT_TAGVAR(LD, $1)=$LD 78125b16253fSmrg 78135b16253fSmrg ## CAVEAT EMPTOR: 78145b16253fSmrg ## There is no encapsulation within the following macros, do not change 78155b16253fSmrg ## the running order or otherwise move them around unless you know exactly 78165b16253fSmrg ## what you are doing... 78175b16253fSmrg _LT_COMPILER_PIC($1) 78185b16253fSmrg _LT_COMPILER_C_O($1) 78195b16253fSmrg _LT_COMPILER_FILE_LOCKS($1) 78205b16253fSmrg _LT_LINKER_SHLIBS($1) 78215b16253fSmrg _LT_SYS_DYNAMIC_LINKER($1) 78225b16253fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 78235b16253fSmrg 78245b16253fSmrg _LT_CONFIG($1) 78255b16253fSmrg fi # test -n "$compiler" 78265b16253fSmrg 78275b16253fSmrg GCC=$lt_save_GCC 78285b16253fSmrg CC=$lt_save_CC 78295b16253fSmrg CFLAGS=$lt_save_CFLAGS 78305b16253fSmrgfi # test yes != "$_lt_disable_F77" 78315b16253fSmrg 78325b16253fSmrgAC_LANG_POP 78335b16253fSmrg])# _LT_LANG_F77_CONFIG 78345b16253fSmrg 78355b16253fSmrg 78365b16253fSmrg# _LT_LANG_FC_CONFIG([TAG]) 78375b16253fSmrg# ------------------------- 78385b16253fSmrg# Ensure that the configuration variables for a Fortran compiler are 78395b16253fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 78405b16253fSmrg# to write the compiler configuration to 'libtool'. 78415b16253fSmrgm4_defun([_LT_LANG_FC_CONFIG], 78425b16253fSmrg[AC_LANG_PUSH(Fortran) 78435b16253fSmrg 78445b16253fSmrgif test -z "$FC" || test no = "$FC"; then 78455b16253fSmrg _lt_disable_FC=yes 78465b16253fSmrgfi 78475b16253fSmrg 78485b16253fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78495b16253fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 78505b16253fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 78515b16253fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78525b16253fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78535b16253fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 78545b16253fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78555b16253fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78565b16253fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78575b16253fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78585b16253fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 78595b16253fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 78605b16253fSmrg_LT_TAGVAR(module_cmds, $1)= 78615b16253fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 78625b16253fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78635b16253fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78645b16253fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78655b16253fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78665b16253fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 78675b16253fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78685b16253fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78695b16253fSmrg 78705b16253fSmrg# Source file extension for fc test sources. 78715b16253fSmrgac_ext=${ac_fc_srcext-f} 78725b16253fSmrg 78735b16253fSmrg# Object file extension for compiled fc test sources. 78745b16253fSmrgobjext=o 78755b16253fSmrg_LT_TAGVAR(objext, $1)=$objext 78765b16253fSmrg 78775b16253fSmrg# No sense in running all these tests if we already determined that 78785b16253fSmrg# the FC compiler isn't working. Some variables (like enable_shared) 78795b16253fSmrg# are currently assumed to apply to all compilers on this platform, 78805b16253fSmrg# and will be corrupted by setting them based on a non-working compiler. 78815b16253fSmrgif test yes != "$_lt_disable_FC"; then 78825b16253fSmrg # Code to be used in simple compile tests 78835b16253fSmrg lt_simple_compile_test_code="\ 78845b16253fSmrg subroutine t 78855b16253fSmrg return 78865b16253fSmrg end 78875b16253fSmrg" 78885b16253fSmrg 78895b16253fSmrg # Code to be used in simple link tests 78905b16253fSmrg lt_simple_link_test_code="\ 78915b16253fSmrg program t 78925b16253fSmrg end 78935b16253fSmrg" 78945b16253fSmrg 78955b16253fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78965b16253fSmrg _LT_TAG_COMPILER 78975b16253fSmrg 78985b16253fSmrg # save warnings/boilerplate of simple test code 78995b16253fSmrg _LT_COMPILER_BOILERPLATE 79005b16253fSmrg _LT_LINKER_BOILERPLATE 79015b16253fSmrg 79025b16253fSmrg # Allow CC to be a program name with arguments. 79035b16253fSmrg lt_save_CC=$CC 79045b16253fSmrg lt_save_GCC=$GCC 79055b16253fSmrg lt_save_CFLAGS=$CFLAGS 79065b16253fSmrg CC=${FC-"f95"} 79075b16253fSmrg CFLAGS=$FCFLAGS 79085b16253fSmrg compiler=$CC 79095b16253fSmrg GCC=$ac_cv_fc_compiler_gnu 79105b16253fSmrg 79115b16253fSmrg _LT_TAGVAR(compiler, $1)=$CC 79125b16253fSmrg _LT_CC_BASENAME([$compiler]) 79135b16253fSmrg 79145b16253fSmrg if test -n "$compiler"; then 79155b16253fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 79165b16253fSmrg AC_MSG_RESULT([$can_build_shared]) 79175b16253fSmrg 79185b16253fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 79195b16253fSmrg test no = "$can_build_shared" && enable_shared=no 79205b16253fSmrg 79215b16253fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 79225b16253fSmrg # are all built from PIC. 79235b16253fSmrg case $host_os in 79245b16253fSmrg aix3*) 79255b16253fSmrg test yes = "$enable_shared" && enable_static=no 79265b16253fSmrg if test -n "$RANLIB"; then 79275b16253fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 79285b16253fSmrg postinstall_cmds='$RANLIB $lib' 79295b16253fSmrg fi 79305b16253fSmrg ;; 79315b16253fSmrg aix[[4-9]]*) 79325b16253fSmrg if test ia64 != "$host_cpu"; then 79335b16253fSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 79345b16253fSmrg yes,aix,yes) ;; # shared object as lib.so file only 79355b16253fSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 79365b16253fSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 79375b16253fSmrg esac 79385b16253fSmrg fi 79395b16253fSmrg ;; 79405b16253fSmrg esac 79415b16253fSmrg AC_MSG_RESULT([$enable_shared]) 79425b16253fSmrg 79435b16253fSmrg AC_MSG_CHECKING([whether to build static libraries]) 79445b16253fSmrg # Make sure either enable_shared or enable_static is yes. 79455b16253fSmrg test yes = "$enable_shared" || enable_static=yes 79465b16253fSmrg AC_MSG_RESULT([$enable_static]) 79475b16253fSmrg 79485b16253fSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 79495b16253fSmrg _LT_TAGVAR(LD, $1)=$LD 79505b16253fSmrg 79515b16253fSmrg ## CAVEAT EMPTOR: 79525b16253fSmrg ## There is no encapsulation within the following macros, do not change 79535b16253fSmrg ## the running order or otherwise move them around unless you know exactly 79545b16253fSmrg ## what you are doing... 79555b16253fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 79565b16253fSmrg _LT_COMPILER_PIC($1) 79575b16253fSmrg _LT_COMPILER_C_O($1) 79585b16253fSmrg _LT_COMPILER_FILE_LOCKS($1) 79595b16253fSmrg _LT_LINKER_SHLIBS($1) 79605b16253fSmrg _LT_SYS_DYNAMIC_LINKER($1) 79615b16253fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 79625b16253fSmrg 79635b16253fSmrg _LT_CONFIG($1) 79645b16253fSmrg fi # test -n "$compiler" 79655b16253fSmrg 79665b16253fSmrg GCC=$lt_save_GCC 79675b16253fSmrg CC=$lt_save_CC 79685b16253fSmrg CFLAGS=$lt_save_CFLAGS 79695b16253fSmrgfi # test yes != "$_lt_disable_FC" 79705b16253fSmrg 79715b16253fSmrgAC_LANG_POP 79725b16253fSmrg])# _LT_LANG_FC_CONFIG 79735b16253fSmrg 79745b16253fSmrg 79755b16253fSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 79765b16253fSmrg# -------------------------- 79775b16253fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 79785b16253fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 79795b16253fSmrg# to write the compiler configuration to 'libtool'. 79805b16253fSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 79815b16253fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 79825b16253fSmrgAC_LANG_SAVE 79835b16253fSmrg 79845b16253fSmrg# Source file extension for Java test sources. 79855b16253fSmrgac_ext=java 79865b16253fSmrg 79875b16253fSmrg# Object file extension for compiled Java test sources. 79885b16253fSmrgobjext=o 79895b16253fSmrg_LT_TAGVAR(objext, $1)=$objext 79905b16253fSmrg 79915b16253fSmrg# Code to be used in simple compile tests 79925b16253fSmrglt_simple_compile_test_code="class foo {}" 79935b16253fSmrg 79945b16253fSmrg# Code to be used in simple link tests 79955b16253fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 79965b16253fSmrg 79975b16253fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 79985b16253fSmrg_LT_TAG_COMPILER 79995b16253fSmrg 80005b16253fSmrg# save warnings/boilerplate of simple test code 80015b16253fSmrg_LT_COMPILER_BOILERPLATE 80025b16253fSmrg_LT_LINKER_BOILERPLATE 80035b16253fSmrg 80045b16253fSmrg# Allow CC to be a program name with arguments. 80055b16253fSmrglt_save_CC=$CC 80065b16253fSmrglt_save_CFLAGS=$CFLAGS 80075b16253fSmrglt_save_GCC=$GCC 80085b16253fSmrgGCC=yes 80095b16253fSmrgCC=${GCJ-"gcj"} 80105b16253fSmrgCFLAGS=$GCJFLAGS 80115b16253fSmrgcompiler=$CC 80125b16253fSmrg_LT_TAGVAR(compiler, $1)=$CC 80135b16253fSmrg_LT_TAGVAR(LD, $1)=$LD 80145b16253fSmrg_LT_CC_BASENAME([$compiler]) 80155b16253fSmrg 80165b16253fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 80175b16253fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80185b16253fSmrg 80195b16253fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80205b16253fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80215b16253fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80225b16253fSmrg 80235b16253fSmrg## CAVEAT EMPTOR: 80245b16253fSmrg## There is no encapsulation within the following macros, do not change 80255b16253fSmrg## the running order or otherwise move them around unless you know exactly 80265b16253fSmrg## what you are doing... 80275b16253fSmrgif test -n "$compiler"; then 80285b16253fSmrg _LT_COMPILER_NO_RTTI($1) 80295b16253fSmrg _LT_COMPILER_PIC($1) 80305b16253fSmrg _LT_COMPILER_C_O($1) 80315b16253fSmrg _LT_COMPILER_FILE_LOCKS($1) 80325b16253fSmrg _LT_LINKER_SHLIBS($1) 80335b16253fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 80345b16253fSmrg 80355b16253fSmrg _LT_CONFIG($1) 80365b16253fSmrgfi 80375b16253fSmrg 80385b16253fSmrgAC_LANG_RESTORE 80395b16253fSmrg 80405b16253fSmrgGCC=$lt_save_GCC 80415b16253fSmrgCC=$lt_save_CC 80425b16253fSmrgCFLAGS=$lt_save_CFLAGS 80435b16253fSmrg])# _LT_LANG_GCJ_CONFIG 80445b16253fSmrg 80455b16253fSmrg 80465b16253fSmrg# _LT_LANG_GO_CONFIG([TAG]) 80475b16253fSmrg# -------------------------- 80485b16253fSmrg# Ensure that the configuration variables for the GNU Go compiler 80495b16253fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 80505b16253fSmrg# to write the compiler configuration to 'libtool'. 80515b16253fSmrgm4_defun([_LT_LANG_GO_CONFIG], 80525b16253fSmrg[AC_REQUIRE([LT_PROG_GO])dnl 80535b16253fSmrgAC_LANG_SAVE 80545b16253fSmrg 80555b16253fSmrg# Source file extension for Go test sources. 80565b16253fSmrgac_ext=go 80575b16253fSmrg 80585b16253fSmrg# Object file extension for compiled Go test sources. 80595b16253fSmrgobjext=o 80605b16253fSmrg_LT_TAGVAR(objext, $1)=$objext 80615b16253fSmrg 80625b16253fSmrg# Code to be used in simple compile tests 80635b16253fSmrglt_simple_compile_test_code="package main; func main() { }" 80645b16253fSmrg 80655b16253fSmrg# Code to be used in simple link tests 80665b16253fSmrglt_simple_link_test_code='package main; func main() { }' 80675b16253fSmrg 80685b16253fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80695b16253fSmrg_LT_TAG_COMPILER 80705b16253fSmrg 80715b16253fSmrg# save warnings/boilerplate of simple test code 80725b16253fSmrg_LT_COMPILER_BOILERPLATE 80735b16253fSmrg_LT_LINKER_BOILERPLATE 80745b16253fSmrg 80755b16253fSmrg# Allow CC to be a program name with arguments. 80765b16253fSmrglt_save_CC=$CC 80775b16253fSmrglt_save_CFLAGS=$CFLAGS 80785b16253fSmrglt_save_GCC=$GCC 80795b16253fSmrgGCC=yes 80805b16253fSmrgCC=${GOC-"gccgo"} 80815b16253fSmrgCFLAGS=$GOFLAGS 80825b16253fSmrgcompiler=$CC 80835b16253fSmrg_LT_TAGVAR(compiler, $1)=$CC 80845b16253fSmrg_LT_TAGVAR(LD, $1)=$LD 80855b16253fSmrg_LT_CC_BASENAME([$compiler]) 80865b16253fSmrg 80875b16253fSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 80885b16253fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 80895b16253fSmrg 80905b16253fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80915b16253fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80925b16253fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80935b16253fSmrg 80945b16253fSmrg## CAVEAT EMPTOR: 80955b16253fSmrg## There is no encapsulation within the following macros, do not change 80965b16253fSmrg## the running order or otherwise move them around unless you know exactly 80975b16253fSmrg## what you are doing... 80985b16253fSmrgif test -n "$compiler"; then 80995b16253fSmrg _LT_COMPILER_NO_RTTI($1) 81005b16253fSmrg _LT_COMPILER_PIC($1) 81015b16253fSmrg _LT_COMPILER_C_O($1) 81025b16253fSmrg _LT_COMPILER_FILE_LOCKS($1) 81035b16253fSmrg _LT_LINKER_SHLIBS($1) 81045b16253fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 81055b16253fSmrg 81065b16253fSmrg _LT_CONFIG($1) 81075b16253fSmrgfi 81085b16253fSmrg 81095b16253fSmrgAC_LANG_RESTORE 81105b16253fSmrg 81115b16253fSmrgGCC=$lt_save_GCC 81125b16253fSmrgCC=$lt_save_CC 81135b16253fSmrgCFLAGS=$lt_save_CFLAGS 81145b16253fSmrg])# _LT_LANG_GO_CONFIG 81155b16253fSmrg 81165b16253fSmrg 81175b16253fSmrg# _LT_LANG_RC_CONFIG([TAG]) 81185b16253fSmrg# ------------------------- 81195b16253fSmrg# Ensure that the configuration variables for the Windows resource compiler 81205b16253fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 81215b16253fSmrg# to write the compiler configuration to 'libtool'. 81225b16253fSmrgm4_defun([_LT_LANG_RC_CONFIG], 81235b16253fSmrg[AC_REQUIRE([LT_PROG_RC])dnl 81245b16253fSmrgAC_LANG_SAVE 81255b16253fSmrg 81265b16253fSmrg# Source file extension for RC test sources. 81275b16253fSmrgac_ext=rc 81285b16253fSmrg 81295b16253fSmrg# Object file extension for compiled RC test sources. 81305b16253fSmrgobjext=o 81315b16253fSmrg_LT_TAGVAR(objext, $1)=$objext 81325b16253fSmrg 81335b16253fSmrg# Code to be used in simple compile tests 81345b16253fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 81355b16253fSmrg 81365b16253fSmrg# Code to be used in simple link tests 81375b16253fSmrglt_simple_link_test_code=$lt_simple_compile_test_code 81385b16253fSmrg 81395b16253fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 81405b16253fSmrg_LT_TAG_COMPILER 81415b16253fSmrg 81425b16253fSmrg# save warnings/boilerplate of simple test code 81435b16253fSmrg_LT_COMPILER_BOILERPLATE 81445b16253fSmrg_LT_LINKER_BOILERPLATE 81455b16253fSmrg 81465b16253fSmrg# Allow CC to be a program name with arguments. 81475b16253fSmrglt_save_CC=$CC 81485b16253fSmrglt_save_CFLAGS=$CFLAGS 81495b16253fSmrglt_save_GCC=$GCC 81505b16253fSmrgGCC= 81515b16253fSmrgCC=${RC-"windres"} 81525b16253fSmrgCFLAGS= 81535b16253fSmrgcompiler=$CC 81545b16253fSmrg_LT_TAGVAR(compiler, $1)=$CC 81555b16253fSmrg_LT_CC_BASENAME([$compiler]) 81565b16253fSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81575b16253fSmrg 81585b16253fSmrgif test -n "$compiler"; then 81595b16253fSmrg : 81605b16253fSmrg _LT_CONFIG($1) 81615b16253fSmrgfi 81625b16253fSmrg 81635b16253fSmrgGCC=$lt_save_GCC 81645b16253fSmrgAC_LANG_RESTORE 81655b16253fSmrgCC=$lt_save_CC 81665b16253fSmrgCFLAGS=$lt_save_CFLAGS 81675b16253fSmrg])# _LT_LANG_RC_CONFIG 81685b16253fSmrg 81695b16253fSmrg 81705b16253fSmrg# LT_PROG_GCJ 81715b16253fSmrg# ----------- 81725b16253fSmrgAC_DEFUN([LT_PROG_GCJ], 81735b16253fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81745b16253fSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81755b16253fSmrg [AC_CHECK_TOOL(GCJ, gcj,) 81765b16253fSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81775b16253fSmrg AC_SUBST(GCJFLAGS)])])[]dnl 81785b16253fSmrg]) 81795b16253fSmrg 81805b16253fSmrg# Old name: 81815b16253fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81825b16253fSmrgdnl aclocal-1.4 backwards compatibility: 81835b16253fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81845b16253fSmrg 81855b16253fSmrg 81865b16253fSmrg# LT_PROG_GO 81875b16253fSmrg# ---------- 81885b16253fSmrgAC_DEFUN([LT_PROG_GO], 81895b16253fSmrg[AC_CHECK_TOOL(GOC, gccgo,) 81905b16253fSmrg]) 81915b16253fSmrg 81925b16253fSmrg 81935b16253fSmrg# LT_PROG_RC 81945b16253fSmrg# ---------- 81955b16253fSmrgAC_DEFUN([LT_PROG_RC], 81965b16253fSmrg[AC_CHECK_TOOL(RC, windres,) 81975b16253fSmrg]) 81985b16253fSmrg 81995b16253fSmrg# Old name: 82005b16253fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 82015b16253fSmrgdnl aclocal-1.4 backwards compatibility: 82025b16253fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 82035b16253fSmrg 82045b16253fSmrg 82055b16253fSmrg# _LT_DECL_EGREP 82065b16253fSmrg# -------------- 82075b16253fSmrg# If we don't have a new enough Autoconf to choose the best grep 82085b16253fSmrg# available, choose the one first in the user's PATH. 82095b16253fSmrgm4_defun([_LT_DECL_EGREP], 82105b16253fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 82115b16253fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 82125b16253fSmrgtest -z "$GREP" && GREP=grep 82135b16253fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 82145b16253fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 82155b16253fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 82165b16253fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 82175b16253fSmrgAC_SUBST([GREP]) 82185b16253fSmrg]) 82195b16253fSmrg 82205b16253fSmrg 82215b16253fSmrg# _LT_DECL_OBJDUMP 82225b16253fSmrg# -------------- 82235b16253fSmrg# If we don't have a new enough Autoconf to choose the best objdump 82245b16253fSmrg# available, choose the one first in the user's PATH. 82255b16253fSmrgm4_defun([_LT_DECL_OBJDUMP], 82265b16253fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 82275b16253fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 82285b16253fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 82295b16253fSmrgAC_SUBST([OBJDUMP]) 82305b16253fSmrg]) 82315b16253fSmrg 82325b16253fSmrg# _LT_DECL_DLLTOOL 82335b16253fSmrg# ---------------- 82345b16253fSmrg# Ensure DLLTOOL variable is set. 82355b16253fSmrgm4_defun([_LT_DECL_DLLTOOL], 82365b16253fSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 82375b16253fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 82385b16253fSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 82395b16253fSmrgAC_SUBST([DLLTOOL]) 82405b16253fSmrg]) 82415b16253fSmrg 82425b16253fSmrg# _LT_DECL_FILECMD 82435b16253fSmrg# ---------------- 82445b16253fSmrg# Check for a file(cmd) program that can be used to detect file type and magic 82455b16253fSmrgm4_defun([_LT_DECL_FILECMD], 82465b16253fSmrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 82475b16253fSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 82485b16253fSmrg])# _LD_DECL_FILECMD 82495b16253fSmrg 82505b16253fSmrg# _LT_DECL_SED 82515b16253fSmrg# ------------ 82525b16253fSmrg# Check for a fully-functional sed program, that truncates 82535b16253fSmrg# as few characters as possible. Prefer GNU sed if found. 82545b16253fSmrgm4_defun([_LT_DECL_SED], 82555b16253fSmrg[AC_PROG_SED 82565b16253fSmrgtest -z "$SED" && SED=sed 82575b16253fSmrgXsed="$SED -e 1s/^X//" 82585b16253fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82595b16253fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82605b16253fSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82615b16253fSmrg])# _LT_DECL_SED 82625b16253fSmrg 82635b16253fSmrgm4_ifndef([AC_PROG_SED], [ 82645b16253fSmrg############################################################ 82655b16253fSmrg# NOTE: This macro has been submitted for inclusion into # 82665b16253fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 82675b16253fSmrg# a released version of Autoconf we should remove this # 82685b16253fSmrg# macro and use it instead. # 82695b16253fSmrg############################################################ 82705b16253fSmrg 82715b16253fSmrgm4_defun([AC_PROG_SED], 82725b16253fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 82735b16253fSmrgAC_CACHE_VAL(lt_cv_path_SED, 82745b16253fSmrg[# Loop through the user's path and test for sed and gsed. 82755b16253fSmrg# Then use that list of sed's as ones to test for truncation. 82765b16253fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82775b16253fSmrgfor as_dir in $PATH 82785b16253fSmrgdo 82795b16253fSmrg IFS=$as_save_IFS 82805b16253fSmrg test -z "$as_dir" && as_dir=. 82815b16253fSmrg for lt_ac_prog in sed gsed; do 82825b16253fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 82835b16253fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82845b16253fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 82855b16253fSmrg fi 82865b16253fSmrg done 82875b16253fSmrg done 82885b16253fSmrgdone 82895b16253fSmrgIFS=$as_save_IFS 82905b16253fSmrglt_ac_max=0 82915b16253fSmrglt_ac_count=0 82925b16253fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82935b16253fSmrg# along with /bin/sed that truncates output. 82945b16253fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 82955b16253fSmrg test ! -f "$lt_ac_sed" && continue 82965b16253fSmrg cat /dev/null > conftest.in 82975b16253fSmrg lt_ac_count=0 82985b16253fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82995b16253fSmrg # Check for GNU sed and select it if it is found. 83005b16253fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 83015b16253fSmrg lt_cv_path_SED=$lt_ac_sed 83025b16253fSmrg break 83035b16253fSmrg fi 83045b16253fSmrg while true; do 83055b16253fSmrg cat conftest.in conftest.in >conftest.tmp 83065b16253fSmrg mv conftest.tmp conftest.in 83075b16253fSmrg cp conftest.in conftest.nl 83085b16253fSmrg echo >>conftest.nl 83095b16253fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 83105b16253fSmrg cmp -s conftest.out conftest.nl || break 83115b16253fSmrg # 10000 chars as input seems more than enough 83125b16253fSmrg test 10 -lt "$lt_ac_count" && break 83135b16253fSmrg lt_ac_count=`expr $lt_ac_count + 1` 83145b16253fSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 83155b16253fSmrg lt_ac_max=$lt_ac_count 83165b16253fSmrg lt_cv_path_SED=$lt_ac_sed 83175b16253fSmrg fi 83185b16253fSmrg done 83195b16253fSmrgdone 83205b16253fSmrg]) 83215b16253fSmrgSED=$lt_cv_path_SED 83225b16253fSmrgAC_SUBST([SED]) 83235b16253fSmrgAC_MSG_RESULT([$SED]) 83245b16253fSmrg])#AC_PROG_SED 83255b16253fSmrg])#m4_ifndef 83265b16253fSmrg 83275b16253fSmrg# Old name: 83285b16253fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 83295b16253fSmrgdnl aclocal-1.4 backwards compatibility: 83305b16253fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 83315b16253fSmrg 83325b16253fSmrg 83335b16253fSmrg# _LT_CHECK_SHELL_FEATURES 83345b16253fSmrg# ------------------------ 83355b16253fSmrg# Find out whether the shell is Bourne or XSI compatible, 83365b16253fSmrg# or has some other useful features. 83375b16253fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 83385b16253fSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 83395b16253fSmrg lt_unset=unset 83405b16253fSmrgelse 83415b16253fSmrg lt_unset=false 83425b16253fSmrgfi 83435b16253fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 83445b16253fSmrg 83455b16253fSmrg# test EBCDIC or ASCII 83465b16253fSmrgcase `echo X|tr X '\101'` in 83475b16253fSmrg A) # ASCII based system 83485b16253fSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 83495b16253fSmrg lt_SP2NL='tr \040 \012' 83505b16253fSmrg lt_NL2SP='tr \015\012 \040\040' 83515b16253fSmrg ;; 83525b16253fSmrg *) # EBCDIC based system 83535b16253fSmrg lt_SP2NL='tr \100 \n' 83545b16253fSmrg lt_NL2SP='tr \r\n \100\100' 83555b16253fSmrg ;; 83565b16253fSmrgesac 83575b16253fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83585b16253fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83595b16253fSmrg])# _LT_CHECK_SHELL_FEATURES 83605b16253fSmrg 83615b16253fSmrg 83625b16253fSmrg# _LT_PATH_CONVERSION_FUNCTIONS 83635b16253fSmrg# ----------------------------- 83645b16253fSmrg# Determine what file name conversion functions should be used by 83655b16253fSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 83665b16253fSmrg# for certain cross-compile configurations and native mingw. 83675b16253fSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 83685b16253fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 83695b16253fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 83705b16253fSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 83715b16253fSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 83725b16253fSmrg[case $host in 83735b16253fSmrg *-*-mingw* ) 83745b16253fSmrg case $build in 83755b16253fSmrg *-*-mingw* ) # actually msys 83765b16253fSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 83775b16253fSmrg ;; 83785b16253fSmrg *-*-cygwin* ) 83795b16253fSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 83805b16253fSmrg ;; 83815b16253fSmrg * ) # otherwise, assume *nix 83825b16253fSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 83835b16253fSmrg ;; 83845b16253fSmrg esac 83855b16253fSmrg ;; 83865b16253fSmrg *-*-cygwin* ) 83875b16253fSmrg case $build in 83885b16253fSmrg *-*-mingw* ) # actually msys 83895b16253fSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 83905b16253fSmrg ;; 83915b16253fSmrg *-*-cygwin* ) 83925b16253fSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 83935b16253fSmrg ;; 83945b16253fSmrg * ) # otherwise, assume *nix 83955b16253fSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 83965b16253fSmrg ;; 83975b16253fSmrg esac 83985b16253fSmrg ;; 83995b16253fSmrg * ) # unhandled hosts (and "normal" native builds) 84005b16253fSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 84015b16253fSmrg ;; 84025b16253fSmrgesac 84035b16253fSmrg]) 84045b16253fSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 84055b16253fSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 84065b16253fSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 84075b16253fSmrg [0], [convert $build file names to $host format])dnl 84085b16253fSmrg 84095b16253fSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 84105b16253fSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 84115b16253fSmrg[#assume ordinary cross tools, or native build. 84125b16253fSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 84135b16253fSmrgcase $host in 84145b16253fSmrg *-*-mingw* ) 84155b16253fSmrg case $build in 84165b16253fSmrg *-*-mingw* ) # actually msys 84175b16253fSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 84185b16253fSmrg ;; 84195b16253fSmrg esac 84205b16253fSmrg ;; 84215b16253fSmrgesac 84225b16253fSmrg]) 84235b16253fSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 84245b16253fSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 84255b16253fSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 84265b16253fSmrg [0], [convert $build files to toolchain format])dnl 84275b16253fSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 8428