12b15cb3dSCy Schubert# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 22b15cb3dSCy Schubert# 3*f0574f5cSXin LI# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 42b15cb3dSCy Schubert# Written by Gordon Matzigkeit, 1996 52b15cb3dSCy Schubert# 62b15cb3dSCy Schubert# This file is free software; the Free Software Foundation gives 72b15cb3dSCy Schubert# unlimited permission to copy and/or distribute it, with or without 82b15cb3dSCy Schubert# modifications, as long as this notice is preserved. 92b15cb3dSCy Schubert 102b15cb3dSCy Schubertm4_define([_LT_COPYING], [dnl 11*f0574f5cSXin LI# Copyright (C) 2014 Free Software Foundation, Inc. 12*f0574f5cSXin LI# This is free software; see the source for copying conditions. There is NO 13*f0574f5cSXin LI# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14*f0574f5cSXin LI 15*f0574f5cSXin LI# GNU Libtool is free software; you can redistribute it and/or modify 16*f0574f5cSXin LI# it under the terms of the GNU General Public License as published by 17*f0574f5cSXin LI# the Free Software Foundation; either version 2 of of the License, or 18*f0574f5cSXin LI# (at your option) any later version. 192b15cb3dSCy Schubert# 20*f0574f5cSXin LI# As a special exception to the GNU General Public License, if you 21*f0574f5cSXin LI# distribute this file as part of a program or library that is built 22*f0574f5cSXin LI# using GNU Libtool, you may include this file under the same 23*f0574f5cSXin LI# distribution terms that you use for the rest of that program. 242b15cb3dSCy Schubert# 25*f0574f5cSXin LI# GNU Libtool is distributed in the hope that it will be useful, but 26*f0574f5cSXin LI# WITHOUT ANY WARRANTY; without even the implied warranty of 272b15cb3dSCy Schubert# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 282b15cb3dSCy Schubert# GNU General Public License for more details. 292b15cb3dSCy Schubert# 302b15cb3dSCy Schubert# You should have received a copy of the GNU General Public License 31*f0574f5cSXin LI# along with this program. If not, see <http://www.gnu.org/licenses/>. 322b15cb3dSCy Schubert]) 332b15cb3dSCy Schubert 34*f0574f5cSXin LI# serial 58 LT_INIT 352b15cb3dSCy Schubert 362b15cb3dSCy Schubert 372b15cb3dSCy Schubert# LT_PREREQ(VERSION) 382b15cb3dSCy Schubert# ------------------ 392b15cb3dSCy Schubert# Complain and exit if this libtool version is less that VERSION. 402b15cb3dSCy Schubertm4_defun([LT_PREREQ], 412b15cb3dSCy Schubert[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 422b15cb3dSCy Schubert [m4_default([$3], 432b15cb3dSCy Schubert [m4_fatal([Libtool version $1 or higher is required], 442b15cb3dSCy Schubert 63)])], 452b15cb3dSCy Schubert [$2])]) 462b15cb3dSCy Schubert 472b15cb3dSCy Schubert 482b15cb3dSCy Schubert# _LT_CHECK_BUILDDIR 492b15cb3dSCy Schubert# ------------------ 502b15cb3dSCy Schubert# Complain if the absolute build directory name contains unusual characters 512b15cb3dSCy Schubertm4_defun([_LT_CHECK_BUILDDIR], 522b15cb3dSCy Schubert[case `pwd` in 532b15cb3dSCy Schubert *\ * | *\ *) 542b15cb3dSCy Schubert AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 552b15cb3dSCy Schubertesac 562b15cb3dSCy Schubert]) 572b15cb3dSCy Schubert 582b15cb3dSCy Schubert 592b15cb3dSCy Schubert# LT_INIT([OPTIONS]) 602b15cb3dSCy Schubert# ------------------ 612b15cb3dSCy SchubertAC_DEFUN([LT_INIT], 62*f0574f5cSXin LI[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 632b15cb3dSCy SchubertAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 642b15cb3dSCy SchubertAC_BEFORE([$0], [LT_LANG])dnl 652b15cb3dSCy SchubertAC_BEFORE([$0], [LT_OUTPUT])dnl 662b15cb3dSCy SchubertAC_BEFORE([$0], [LTDL_INIT])dnl 672b15cb3dSCy Schubertm4_require([_LT_CHECK_BUILDDIR])dnl 682b15cb3dSCy Schubert 692b15cb3dSCy Schubertdnl Autoconf doesn't catch unexpanded LT_ macros by default: 702b15cb3dSCy Schubertm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 712b15cb3dSCy Schubertm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 722b15cb3dSCy Schubertdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 732b15cb3dSCy Schubertdnl unless we require an AC_DEFUNed macro: 742b15cb3dSCy SchubertAC_REQUIRE([LTOPTIONS_VERSION])dnl 752b15cb3dSCy SchubertAC_REQUIRE([LTSUGAR_VERSION])dnl 762b15cb3dSCy SchubertAC_REQUIRE([LTVERSION_VERSION])dnl 772b15cb3dSCy SchubertAC_REQUIRE([LTOBSOLETE_VERSION])dnl 782b15cb3dSCy Schubertm4_require([_LT_PROG_LTMAIN])dnl 792b15cb3dSCy Schubert 802b15cb3dSCy Schubert_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 812b15cb3dSCy Schubert 822b15cb3dSCy Schubertdnl Parse OPTIONS 832b15cb3dSCy Schubert_LT_SET_OPTIONS([$0], [$1]) 842b15cb3dSCy Schubert 852b15cb3dSCy Schubert# This can be used to rebuild libtool when needed 86*f0574f5cSXin LILIBTOOL_DEPS=$ltmain 872b15cb3dSCy Schubert 882b15cb3dSCy Schubert# Always use our own libtool. 892b15cb3dSCy SchubertLIBTOOL='$(SHELL) $(top_builddir)/libtool' 902b15cb3dSCy SchubertAC_SUBST(LIBTOOL)dnl 912b15cb3dSCy Schubert 922b15cb3dSCy Schubert_LT_SETUP 932b15cb3dSCy Schubert 942b15cb3dSCy Schubert# Only expand once: 952b15cb3dSCy Schubertm4_define([LT_INIT]) 962b15cb3dSCy Schubert])# LT_INIT 972b15cb3dSCy Schubert 982b15cb3dSCy Schubert# Old names: 992b15cb3dSCy SchubertAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1002b15cb3dSCy SchubertAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1012b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 1022b15cb3dSCy Schubertdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1032b15cb3dSCy Schubertdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1042b15cb3dSCy Schubert 1052b15cb3dSCy Schubert 106*f0574f5cSXin LI# _LT_PREPARE_CC_BASENAME 107*f0574f5cSXin LI# ----------------------- 108*f0574f5cSXin LIm4_defun([_LT_PREPARE_CC_BASENAME], [ 1092b15cb3dSCy Schubert# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 110*f0574f5cSXin LIfunc_cc_basename () 111*f0574f5cSXin LI{ 112*f0574f5cSXin LI for cc_temp in @S|@*""; do 1132b15cb3dSCy Schubert case $cc_temp in 1142b15cb3dSCy Schubert compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1152b15cb3dSCy Schubert distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1162b15cb3dSCy Schubert \-*) ;; 1172b15cb3dSCy Schubert *) break;; 1182b15cb3dSCy Schubert esac 1192b15cb3dSCy Schubert done 120*f0574f5cSXin LI func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 121*f0574f5cSXin LI} 122*f0574f5cSXin LI])# _LT_PREPARE_CC_BASENAME 123*f0574f5cSXin LI 124*f0574f5cSXin LI 125*f0574f5cSXin LI# _LT_CC_BASENAME(CC) 126*f0574f5cSXin LI# ------------------- 127*f0574f5cSXin LI# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 128*f0574f5cSXin LI# but that macro is also expanded into generated libtool script, which 129*f0574f5cSXin LI# arranges for $SED and $ECHO to be set by different means. 130*f0574f5cSXin LIm4_defun([_LT_CC_BASENAME], 131*f0574f5cSXin LI[m4_require([_LT_PREPARE_CC_BASENAME])dnl 132*f0574f5cSXin LIAC_REQUIRE([_LT_DECL_SED])dnl 133*f0574f5cSXin LIAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 134*f0574f5cSXin LIfunc_cc_basename $1 135*f0574f5cSXin LIcc_basename=$func_cc_basename_result 1362b15cb3dSCy Schubert]) 1372b15cb3dSCy Schubert 1382b15cb3dSCy Schubert 1392b15cb3dSCy Schubert# _LT_FILEUTILS_DEFAULTS 1402b15cb3dSCy Schubert# ---------------------- 1412b15cb3dSCy Schubert# It is okay to use these file commands and assume they have been set 142*f0574f5cSXin LI# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1432b15cb3dSCy Schubertm4_defun([_LT_FILEUTILS_DEFAULTS], 1442b15cb3dSCy Schubert[: ${CP="cp -f"} 1452b15cb3dSCy Schubert: ${MV="mv -f"} 1462b15cb3dSCy Schubert: ${RM="rm -f"} 1472b15cb3dSCy Schubert])# _LT_FILEUTILS_DEFAULTS 1482b15cb3dSCy Schubert 1492b15cb3dSCy Schubert 1502b15cb3dSCy Schubert# _LT_SETUP 1512b15cb3dSCy Schubert# --------- 1522b15cb3dSCy Schubertm4_defun([_LT_SETUP], 1532b15cb3dSCy Schubert[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1542b15cb3dSCy SchubertAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1552b15cb3dSCy SchubertAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1562b15cb3dSCy SchubertAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1572b15cb3dSCy Schubert 158*f0574f5cSXin LI_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 159*f0574f5cSXin LIdnl 1602b15cb3dSCy Schubert_LT_DECL([], [host_alias], [0], [The host system])dnl 1612b15cb3dSCy Schubert_LT_DECL([], [host], [0])dnl 1622b15cb3dSCy Schubert_LT_DECL([], [host_os], [0])dnl 1632b15cb3dSCy Schubertdnl 1642b15cb3dSCy Schubert_LT_DECL([], [build_alias], [0], [The build system])dnl 1652b15cb3dSCy Schubert_LT_DECL([], [build], [0])dnl 1662b15cb3dSCy Schubert_LT_DECL([], [build_os], [0])dnl 1672b15cb3dSCy Schubertdnl 1682b15cb3dSCy SchubertAC_REQUIRE([AC_PROG_CC])dnl 1692b15cb3dSCy SchubertAC_REQUIRE([LT_PATH_LD])dnl 1702b15cb3dSCy SchubertAC_REQUIRE([LT_PATH_NM])dnl 1712b15cb3dSCy Schubertdnl 1722b15cb3dSCy SchubertAC_REQUIRE([AC_PROG_LN_S])dnl 1732b15cb3dSCy Schuberttest -z "$LN_S" && LN_S="ln -s" 1742b15cb3dSCy Schubert_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1752b15cb3dSCy Schubertdnl 1762b15cb3dSCy SchubertAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1772b15cb3dSCy Schubert_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1782b15cb3dSCy Schubert_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1792b15cb3dSCy Schubertdnl 1802b15cb3dSCy Schubertm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1812b15cb3dSCy Schubertm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1822b15cb3dSCy Schubertm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1832b15cb3dSCy Schubertm4_require([_LT_CMD_RELOAD])dnl 1842b15cb3dSCy Schubertm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1852b15cb3dSCy Schubertm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1862b15cb3dSCy Schubertm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1872b15cb3dSCy Schubertm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1882b15cb3dSCy Schubertm4_require([_LT_WITH_SYSROOT])dnl 189*f0574f5cSXin LIm4_require([_LT_CMD_TRUNCATE])dnl 1902b15cb3dSCy Schubert 1912b15cb3dSCy Schubert_LT_CONFIG_LIBTOOL_INIT([ 192*f0574f5cSXin LI# See if we are running on zsh, and set the options that allow our 1932b15cb3dSCy Schubert# commands through without removal of \ escapes INIT. 1942b15cb3dSCy Schubertif test -n "\${ZSH_VERSION+set}"; then 1952b15cb3dSCy Schubert setopt NO_GLOB_SUBST 1962b15cb3dSCy Schubertfi 1972b15cb3dSCy Schubert]) 1982b15cb3dSCy Schubertif test -n "${ZSH_VERSION+set}"; then 1992b15cb3dSCy Schubert setopt NO_GLOB_SUBST 2002b15cb3dSCy Schubertfi 2012b15cb3dSCy Schubert 2022b15cb3dSCy Schubert_LT_CHECK_OBJDIR 2032b15cb3dSCy Schubert 2042b15cb3dSCy Schubertm4_require([_LT_TAG_COMPILER])dnl 2052b15cb3dSCy Schubert 2062b15cb3dSCy Schubertcase $host_os in 2072b15cb3dSCy Schubertaix3*) 2082b15cb3dSCy Schubert # AIX sometimes has problems with the GCC collect2 program. For some 2092b15cb3dSCy Schubert # reason, if we set the COLLECT_NAMES environment variable, the problems 2102b15cb3dSCy Schubert # vanish in a puff of smoke. 211*f0574f5cSXin LI if test set != "${COLLECT_NAMES+set}"; then 2122b15cb3dSCy Schubert COLLECT_NAMES= 2132b15cb3dSCy Schubert export COLLECT_NAMES 2142b15cb3dSCy Schubert fi 2152b15cb3dSCy Schubert ;; 2162b15cb3dSCy Schubertesac 2172b15cb3dSCy Schubert 2182b15cb3dSCy Schubert# Global variables: 2192b15cb3dSCy Schubertofile=libtool 2202b15cb3dSCy Schubertcan_build_shared=yes 2212b15cb3dSCy Schubert 222*f0574f5cSXin LI# All known linkers require a '.a' archive for static linking (except MSVC, 2232b15cb3dSCy Schubert# which needs '.lib'). 2242b15cb3dSCy Schubertlibext=a 2252b15cb3dSCy Schubert 226*f0574f5cSXin LIwith_gnu_ld=$lt_cv_prog_gnu_ld 2272b15cb3dSCy Schubert 228*f0574f5cSXin LIold_CC=$CC 229*f0574f5cSXin LIold_CFLAGS=$CFLAGS 2302b15cb3dSCy Schubert 2312b15cb3dSCy Schubert# Set sane defaults for various variables 2322b15cb3dSCy Schuberttest -z "$CC" && CC=cc 2332b15cb3dSCy Schuberttest -z "$LTCC" && LTCC=$CC 2342b15cb3dSCy Schuberttest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2352b15cb3dSCy Schuberttest -z "$LD" && LD=ld 2362b15cb3dSCy Schuberttest -z "$ac_objext" && ac_objext=o 2372b15cb3dSCy Schubert 2382b15cb3dSCy Schubert_LT_CC_BASENAME([$compiler]) 2392b15cb3dSCy Schubert 2402b15cb3dSCy Schubert# Only perform the check for file, if the check method requires it 2412b15cb3dSCy Schuberttest -z "$MAGIC_CMD" && MAGIC_CMD=file 2422b15cb3dSCy Schubertcase $deplibs_check_method in 2432b15cb3dSCy Schubertfile_magic*) 2442b15cb3dSCy Schubert if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2452b15cb3dSCy Schubert _LT_PATH_MAGIC 2462b15cb3dSCy Schubert fi 2472b15cb3dSCy Schubert ;; 2482b15cb3dSCy Schubertesac 2492b15cb3dSCy Schubert 2502b15cb3dSCy Schubert# Use C for the default configuration in the libtool script 2512b15cb3dSCy SchubertLT_SUPPORTED_TAG([CC]) 2522b15cb3dSCy Schubert_LT_LANG_C_CONFIG 2532b15cb3dSCy Schubert_LT_LANG_DEFAULT_CONFIG 2542b15cb3dSCy Schubert_LT_CONFIG_COMMANDS 2552b15cb3dSCy Schubert])# _LT_SETUP 2562b15cb3dSCy Schubert 2572b15cb3dSCy Schubert 2582b15cb3dSCy Schubert# _LT_PREPARE_SED_QUOTE_VARS 2592b15cb3dSCy Schubert# -------------------------- 2602b15cb3dSCy Schubert# Define a few sed substitution that help us do robust quoting. 2612b15cb3dSCy Schubertm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2622b15cb3dSCy Schubert[# Backslashify metacharacters that are still active within 2632b15cb3dSCy Schubert# double-quoted strings. 2642b15cb3dSCy Schubertsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2652b15cb3dSCy Schubert 2662b15cb3dSCy Schubert# Same as above, but do not quote variable references. 2672b15cb3dSCy Schubertdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2682b15cb3dSCy Schubert 2692b15cb3dSCy Schubert# Sed substitution to delay expansion of an escaped shell variable in a 2702b15cb3dSCy Schubert# double_quote_subst'ed string. 2712b15cb3dSCy Schubertdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2722b15cb3dSCy Schubert 2732b15cb3dSCy Schubert# Sed substitution to delay expansion of an escaped single quote. 2742b15cb3dSCy Schubertdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2752b15cb3dSCy Schubert 2762b15cb3dSCy Schubert# Sed substitution to avoid accidental globbing in evaled expressions 2772b15cb3dSCy Schubertno_glob_subst='s/\*/\\\*/g' 2782b15cb3dSCy Schubert]) 2792b15cb3dSCy Schubert 2802b15cb3dSCy Schubert# _LT_PROG_LTMAIN 2812b15cb3dSCy Schubert# --------------- 282*f0574f5cSXin LI# Note that this code is called both from 'configure', and 'config.status' 2832b15cb3dSCy Schubert# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 284*f0574f5cSXin LI# 'config.status' has no value for ac_aux_dir unless we are using Automake, 2852b15cb3dSCy Schubert# so we pass a copy along to make sure it has a sensible value anyway. 2862b15cb3dSCy Schubertm4_defun([_LT_PROG_LTMAIN], 2872b15cb3dSCy Schubert[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2882b15cb3dSCy Schubert_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 289*f0574f5cSXin LIltmain=$ac_aux_dir/ltmain.sh 2902b15cb3dSCy Schubert])# _LT_PROG_LTMAIN 2912b15cb3dSCy Schubert 2922b15cb3dSCy Schubert 2932b15cb3dSCy Schubert## ------------------------------------- ## 2942b15cb3dSCy Schubert## Accumulate code for creating libtool. ## 2952b15cb3dSCy Schubert## ------------------------------------- ## 2962b15cb3dSCy Schubert 2972b15cb3dSCy Schubert# So that we can recreate a full libtool script including additional 2982b15cb3dSCy Schubert# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 299*f0574f5cSXin LI# in macros and then make a single call at the end using the 'libtool' 3002b15cb3dSCy Schubert# label. 3012b15cb3dSCy Schubert 3022b15cb3dSCy Schubert 3032b15cb3dSCy Schubert# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3042b15cb3dSCy Schubert# ---------------------------------------- 3052b15cb3dSCy Schubert# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3062b15cb3dSCy Schubertm4_define([_LT_CONFIG_LIBTOOL_INIT], 3072b15cb3dSCy Schubert[m4_ifval([$1], 3082b15cb3dSCy Schubert [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3092b15cb3dSCy Schubert [$1 3102b15cb3dSCy Schubert])])]) 3112b15cb3dSCy Schubert 3122b15cb3dSCy Schubert# Initialize. 3132b15cb3dSCy Schubertm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3142b15cb3dSCy Schubert 3152b15cb3dSCy Schubert 3162b15cb3dSCy Schubert# _LT_CONFIG_LIBTOOL([COMMANDS]) 3172b15cb3dSCy Schubert# ------------------------------ 3182b15cb3dSCy Schubert# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3192b15cb3dSCy Schubertm4_define([_LT_CONFIG_LIBTOOL], 3202b15cb3dSCy Schubert[m4_ifval([$1], 3212b15cb3dSCy Schubert [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3222b15cb3dSCy Schubert [$1 3232b15cb3dSCy Schubert])])]) 3242b15cb3dSCy Schubert 3252b15cb3dSCy Schubert# Initialize. 3262b15cb3dSCy Schubertm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3272b15cb3dSCy Schubert 3282b15cb3dSCy Schubert 3292b15cb3dSCy Schubert# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3302b15cb3dSCy Schubert# ----------------------------------------------------- 3312b15cb3dSCy Schubertm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3322b15cb3dSCy Schubert[_LT_CONFIG_LIBTOOL([$1]) 3332b15cb3dSCy Schubert_LT_CONFIG_LIBTOOL_INIT([$2]) 3342b15cb3dSCy Schubert]) 3352b15cb3dSCy Schubert 3362b15cb3dSCy Schubert 3372b15cb3dSCy Schubert# _LT_FORMAT_COMMENT([COMMENT]) 3382b15cb3dSCy Schubert# ----------------------------- 3392b15cb3dSCy Schubert# Add leading comment marks to the start of each line, and a trailing 3402b15cb3dSCy Schubert# full-stop to the whole comment if one is not present already. 3412b15cb3dSCy Schubertm4_define([_LT_FORMAT_COMMENT], 3422b15cb3dSCy Schubert[m4_ifval([$1], [ 3432b15cb3dSCy Schubertm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3442b15cb3dSCy Schubert [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3452b15cb3dSCy Schubert)]) 3462b15cb3dSCy Schubert 3472b15cb3dSCy Schubert 3482b15cb3dSCy Schubert 3492b15cb3dSCy Schubert## ------------------------ ## 3502b15cb3dSCy Schubert## FIXME: Eliminate VARNAME ## 3512b15cb3dSCy Schubert## ------------------------ ## 3522b15cb3dSCy Schubert 3532b15cb3dSCy Schubert 3542b15cb3dSCy Schubert# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3552b15cb3dSCy Schubert# ------------------------------------------------------------------- 3562b15cb3dSCy Schubert# CONFIGNAME is the name given to the value in the libtool script. 3572b15cb3dSCy Schubert# VARNAME is the (base) name used in the configure script. 3582b15cb3dSCy Schubert# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3592b15cb3dSCy Schubert# VARNAME. Any other value will be used directly. 3602b15cb3dSCy Schubertm4_define([_LT_DECL], 3612b15cb3dSCy Schubert[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3622b15cb3dSCy Schubert [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3632b15cb3dSCy Schubert [m4_ifval([$1], [$1], [$2])]) 3642b15cb3dSCy Schubert lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3652b15cb3dSCy Schubert m4_ifval([$4], 3662b15cb3dSCy Schubert [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3672b15cb3dSCy Schubert lt_dict_add_subkey([lt_decl_dict], [$2], 3682b15cb3dSCy Schubert [tagged?], [m4_ifval([$5], [yes], [no])])]) 3692b15cb3dSCy Schubert]) 3702b15cb3dSCy Schubert 3712b15cb3dSCy Schubert 3722b15cb3dSCy Schubert# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3732b15cb3dSCy Schubert# -------------------------------------------------------- 3742b15cb3dSCy Schubertm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3752b15cb3dSCy Schubert 3762b15cb3dSCy Schubert 3772b15cb3dSCy Schubert# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3782b15cb3dSCy Schubert# ------------------------------------------------ 3792b15cb3dSCy Schubertm4_define([lt_decl_tag_varnames], 3802b15cb3dSCy Schubert[_lt_decl_filter([tagged?], [yes], $@)]) 3812b15cb3dSCy Schubert 3822b15cb3dSCy Schubert 3832b15cb3dSCy Schubert# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3842b15cb3dSCy Schubert# --------------------------------------------------------- 3852b15cb3dSCy Schubertm4_define([_lt_decl_filter], 3862b15cb3dSCy Schubert[m4_case([$#], 3872b15cb3dSCy Schubert [0], [m4_fatal([$0: too few arguments: $#])], 3882b15cb3dSCy Schubert [1], [m4_fatal([$0: too few arguments: $#: $1])], 3892b15cb3dSCy Schubert [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3902b15cb3dSCy Schubert [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3912b15cb3dSCy Schubert [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3922b15cb3dSCy Schubert]) 3932b15cb3dSCy Schubert 3942b15cb3dSCy Schubert 3952b15cb3dSCy Schubert# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3962b15cb3dSCy Schubert# -------------------------------------------------- 3972b15cb3dSCy Schubertm4_define([lt_decl_quote_varnames], 3982b15cb3dSCy Schubert[_lt_decl_filter([value], [1], $@)]) 3992b15cb3dSCy Schubert 4002b15cb3dSCy Schubert 4012b15cb3dSCy Schubert# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4022b15cb3dSCy Schubert# --------------------------------------------------- 4032b15cb3dSCy Schubertm4_define([lt_decl_dquote_varnames], 4042b15cb3dSCy Schubert[_lt_decl_filter([value], [2], $@)]) 4052b15cb3dSCy Schubert 4062b15cb3dSCy Schubert 4072b15cb3dSCy Schubert# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4082b15cb3dSCy Schubert# --------------------------------------------------- 4092b15cb3dSCy Schubertm4_define([lt_decl_varnames_tagged], 4102b15cb3dSCy Schubert[m4_assert([$# <= 2])dnl 4112b15cb3dSCy Schubert_$0(m4_quote(m4_default([$1], [[, ]])), 4122b15cb3dSCy Schubert m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4132b15cb3dSCy Schubert m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4142b15cb3dSCy Schubertm4_define([_lt_decl_varnames_tagged], 4152b15cb3dSCy Schubert[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4162b15cb3dSCy Schubert 4172b15cb3dSCy Schubert 4182b15cb3dSCy Schubert# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4192b15cb3dSCy Schubert# ------------------------------------------------ 4202b15cb3dSCy Schubertm4_define([lt_decl_all_varnames], 4212b15cb3dSCy Schubert[_$0(m4_quote(m4_default([$1], [[, ]])), 4222b15cb3dSCy Schubert m4_if([$2], [], 4232b15cb3dSCy Schubert m4_quote(lt_decl_varnames), 4242b15cb3dSCy Schubert m4_quote(m4_shift($@))))[]dnl 4252b15cb3dSCy Schubert]) 4262b15cb3dSCy Schubertm4_define([_lt_decl_all_varnames], 4272b15cb3dSCy Schubert[lt_join($@, lt_decl_varnames_tagged([$1], 4282b15cb3dSCy Schubert lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4292b15cb3dSCy Schubert]) 4302b15cb3dSCy Schubert 4312b15cb3dSCy Schubert 4322b15cb3dSCy Schubert# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4332b15cb3dSCy Schubert# ------------------------------------ 434*f0574f5cSXin LI# Quote a variable value, and forward it to 'config.status' so that its 435*f0574f5cSXin LI# declaration there will have the same value as in 'configure'. VARNAME 4362b15cb3dSCy Schubert# must have a single quote delimited value for this to work. 4372b15cb3dSCy Schubertm4_define([_LT_CONFIG_STATUS_DECLARE], 4382b15cb3dSCy Schubert[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4392b15cb3dSCy Schubert 4402b15cb3dSCy Schubert 4412b15cb3dSCy Schubert# _LT_CONFIG_STATUS_DECLARATIONS 4422b15cb3dSCy Schubert# ------------------------------ 4432b15cb3dSCy Schubert# We delimit libtool config variables with single quotes, so when 4442b15cb3dSCy Schubert# we write them to config.status, we have to be sure to quote all 4452b15cb3dSCy Schubert# embedded single quotes properly. In configure, this macro expands 4462b15cb3dSCy Schubert# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4472b15cb3dSCy Schubert# 4482b15cb3dSCy Schubert# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4492b15cb3dSCy Schubertm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4502b15cb3dSCy Schubert[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4512b15cb3dSCy Schubert [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4522b15cb3dSCy Schubert 4532b15cb3dSCy Schubert 4542b15cb3dSCy Schubert# _LT_LIBTOOL_TAGS 4552b15cb3dSCy Schubert# ---------------- 4562b15cb3dSCy Schubert# Output comment and list of tags supported by the script 4572b15cb3dSCy Schubertm4_defun([_LT_LIBTOOL_TAGS], 4582b15cb3dSCy Schubert[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 459*f0574f5cSXin LIavailable_tags='_LT_TAGS'dnl 4602b15cb3dSCy Schubert]) 4612b15cb3dSCy Schubert 4622b15cb3dSCy Schubert 4632b15cb3dSCy Schubert# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4642b15cb3dSCy Schubert# ----------------------------------- 4652b15cb3dSCy Schubert# Extract the dictionary values for VARNAME (optionally with TAG) and 4662b15cb3dSCy Schubert# expand to a commented shell variable setting: 4672b15cb3dSCy Schubert# 4682b15cb3dSCy Schubert# # Some comment about what VAR is for. 4692b15cb3dSCy Schubert# visible_name=$lt_internal_name 4702b15cb3dSCy Schubertm4_define([_LT_LIBTOOL_DECLARE], 4712b15cb3dSCy Schubert[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4722b15cb3dSCy Schubert [description])))[]dnl 4732b15cb3dSCy Schubertm4_pushdef([_libtool_name], 4742b15cb3dSCy Schubert m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4752b15cb3dSCy Schubertm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4762b15cb3dSCy Schubert [0], [_libtool_name=[$]$1], 4772b15cb3dSCy Schubert [1], [_libtool_name=$lt_[]$1], 4782b15cb3dSCy Schubert [2], [_libtool_name=$lt_[]$1], 4792b15cb3dSCy Schubert [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4802b15cb3dSCy Schubertm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4812b15cb3dSCy Schubert]) 4822b15cb3dSCy Schubert 4832b15cb3dSCy Schubert 4842b15cb3dSCy Schubert# _LT_LIBTOOL_CONFIG_VARS 4852b15cb3dSCy Schubert# ----------------------- 4862b15cb3dSCy Schubert# Produce commented declarations of non-tagged libtool config variables 487*f0574f5cSXin LI# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 4882b15cb3dSCy Schubert# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4892b15cb3dSCy Schubert# section) are produced by _LT_LIBTOOL_TAG_VARS. 4902b15cb3dSCy Schubertm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4912b15cb3dSCy Schubert[m4_foreach([_lt_var], 4922b15cb3dSCy Schubert m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4932b15cb3dSCy Schubert [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4942b15cb3dSCy Schubert 4952b15cb3dSCy Schubert 4962b15cb3dSCy Schubert# _LT_LIBTOOL_TAG_VARS(TAG) 4972b15cb3dSCy Schubert# ------------------------- 4982b15cb3dSCy Schubertm4_define([_LT_LIBTOOL_TAG_VARS], 4992b15cb3dSCy Schubert[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5002b15cb3dSCy Schubert [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5012b15cb3dSCy Schubert 5022b15cb3dSCy Schubert 5032b15cb3dSCy Schubert# _LT_TAGVAR(VARNAME, [TAGNAME]) 5042b15cb3dSCy Schubert# ------------------------------ 5052b15cb3dSCy Schubertm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5062b15cb3dSCy Schubert 5072b15cb3dSCy Schubert 5082b15cb3dSCy Schubert# _LT_CONFIG_COMMANDS 5092b15cb3dSCy Schubert# ------------------- 5102b15cb3dSCy Schubert# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5112b15cb3dSCy Schubert# variables for single and double quote escaping we saved from calls 5122b15cb3dSCy Schubert# to _LT_DECL, we can put quote escaped variables declarations 513*f0574f5cSXin LI# into 'config.status', and then the shell code to quote escape them in 514*f0574f5cSXin LI# for loops in 'config.status'. Finally, any additional code accumulated 5152b15cb3dSCy Schubert# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5162b15cb3dSCy Schubertm4_defun([_LT_CONFIG_COMMANDS], 5172b15cb3dSCy Schubert[AC_PROVIDE_IFELSE([LT_OUTPUT], 5182b15cb3dSCy Schubert dnl If the libtool generation code has been placed in $CONFIG_LT, 5192b15cb3dSCy Schubert dnl instead of duplicating it all over again into config.status, 5202b15cb3dSCy Schubert dnl then we will have config.status run $CONFIG_LT later, so it 5212b15cb3dSCy Schubert dnl needs to know what name is stored there: 5222b15cb3dSCy Schubert [AC_CONFIG_COMMANDS([libtool], 5232b15cb3dSCy Schubert [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5242b15cb3dSCy Schubert dnl If the libtool generation code is destined for config.status, 5252b15cb3dSCy Schubert dnl expand the accumulated commands and init code now: 5262b15cb3dSCy Schubert [AC_CONFIG_COMMANDS([libtool], 5272b15cb3dSCy Schubert [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5282b15cb3dSCy Schubert])#_LT_CONFIG_COMMANDS 5292b15cb3dSCy Schubert 5302b15cb3dSCy Schubert 5312b15cb3dSCy Schubert# Initialize. 5322b15cb3dSCy Schubertm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5332b15cb3dSCy Schubert[ 5342b15cb3dSCy Schubert 5352b15cb3dSCy Schubert# The HP-UX ksh and POSIX shell print the target directory to stdout 5362b15cb3dSCy Schubert# if CDPATH is set. 5372b15cb3dSCy Schubert(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5382b15cb3dSCy Schubert 5392b15cb3dSCy Schubertsed_quote_subst='$sed_quote_subst' 5402b15cb3dSCy Schubertdouble_quote_subst='$double_quote_subst' 5412b15cb3dSCy Schubertdelay_variable_subst='$delay_variable_subst' 5422b15cb3dSCy Schubert_LT_CONFIG_STATUS_DECLARATIONS 5432b15cb3dSCy SchubertLTCC='$LTCC' 5442b15cb3dSCy SchubertLTCFLAGS='$LTCFLAGS' 5452b15cb3dSCy Schubertcompiler='$compiler_DEFAULT' 5462b15cb3dSCy Schubert 5472b15cb3dSCy Schubert# A function that is used when there is no print builtin or printf. 5482b15cb3dSCy Schubertfunc_fallback_echo () 5492b15cb3dSCy Schubert{ 5502b15cb3dSCy Schubert eval 'cat <<_LTECHO_EOF 5512b15cb3dSCy Schubert\$[]1 5522b15cb3dSCy Schubert_LTECHO_EOF' 5532b15cb3dSCy Schubert} 5542b15cb3dSCy Schubert 5552b15cb3dSCy Schubert# Quote evaled strings. 5562b15cb3dSCy Schubertfor var in lt_decl_all_varnames([[ \ 5572b15cb3dSCy Schubert]], lt_decl_quote_varnames); do 5582b15cb3dSCy Schubert case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5592b15cb3dSCy Schubert *[[\\\\\\\`\\"\\\$]]*) 560*f0574f5cSXin LI eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5612b15cb3dSCy Schubert ;; 5622b15cb3dSCy Schubert *) 5632b15cb3dSCy Schubert eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5642b15cb3dSCy Schubert ;; 5652b15cb3dSCy Schubert esac 5662b15cb3dSCy Schubertdone 5672b15cb3dSCy Schubert 5682b15cb3dSCy Schubert# Double-quote double-evaled strings. 5692b15cb3dSCy Schubertfor var in lt_decl_all_varnames([[ \ 5702b15cb3dSCy Schubert]], lt_decl_dquote_varnames); do 5712b15cb3dSCy Schubert case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5722b15cb3dSCy Schubert *[[\\\\\\\`\\"\\\$]]*) 573*f0574f5cSXin LI eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5742b15cb3dSCy Schubert ;; 5752b15cb3dSCy Schubert *) 5762b15cb3dSCy Schubert eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5772b15cb3dSCy Schubert ;; 5782b15cb3dSCy Schubert esac 5792b15cb3dSCy Schubertdone 5802b15cb3dSCy Schubert 5812b15cb3dSCy Schubert_LT_OUTPUT_LIBTOOL_INIT 5822b15cb3dSCy Schubert]) 5832b15cb3dSCy Schubert 5842b15cb3dSCy Schubert# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 5852b15cb3dSCy Schubert# ------------------------------------ 5862b15cb3dSCy Schubert# Generate a child script FILE with all initialization necessary to 5872b15cb3dSCy Schubert# reuse the environment learned by the parent script, and make the 5882b15cb3dSCy Schubert# file executable. If COMMENT is supplied, it is inserted after the 589*f0574f5cSXin LI# '#!' sequence but before initialization text begins. After this 5902b15cb3dSCy Schubert# macro, additional text can be appended to FILE to form the body of 5912b15cb3dSCy Schubert# the child script. The macro ends with non-zero status if the 5922b15cb3dSCy Schubert# file could not be fully written (such as if the disk is full). 5932b15cb3dSCy Schubertm4_ifdef([AS_INIT_GENERATED], 5942b15cb3dSCy Schubert[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 5952b15cb3dSCy Schubert[m4_defun([_LT_GENERATED_FILE_INIT], 5962b15cb3dSCy Schubert[m4_require([AS_PREPARE])]dnl 5972b15cb3dSCy Schubert[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 5982b15cb3dSCy Schubert[lt_write_fail=0 5992b15cb3dSCy Schubertcat >$1 <<_ASEOF || lt_write_fail=1 6002b15cb3dSCy Schubert#! $SHELL 6012b15cb3dSCy Schubert# Generated by $as_me. 6022b15cb3dSCy Schubert$2 6032b15cb3dSCy SchubertSHELL=\${CONFIG_SHELL-$SHELL} 6042b15cb3dSCy Schubertexport SHELL 6052b15cb3dSCy Schubert_ASEOF 6062b15cb3dSCy Schubertcat >>$1 <<\_ASEOF || lt_write_fail=1 6072b15cb3dSCy SchubertAS_SHELL_SANITIZE 6082b15cb3dSCy Schubert_AS_PREPARE 6092b15cb3dSCy Schubertexec AS_MESSAGE_FD>&1 6102b15cb3dSCy Schubert_ASEOF 611*f0574f5cSXin LItest 0 = "$lt_write_fail" && chmod +x $1[]dnl 6122b15cb3dSCy Schubertm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6132b15cb3dSCy Schubert 6142b15cb3dSCy Schubert# LT_OUTPUT 6152b15cb3dSCy Schubert# --------- 6162b15cb3dSCy Schubert# This macro allows early generation of the libtool script (before 6172b15cb3dSCy Schubert# AC_OUTPUT is called), incase it is used in configure for compilation 6182b15cb3dSCy Schubert# tests. 6192b15cb3dSCy SchubertAC_DEFUN([LT_OUTPUT], 6202b15cb3dSCy Schubert[: ${CONFIG_LT=./config.lt} 6212b15cb3dSCy SchubertAC_MSG_NOTICE([creating $CONFIG_LT]) 6222b15cb3dSCy Schubert_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6232b15cb3dSCy Schubert[# Run this file to recreate a libtool stub with the current configuration.]) 6242b15cb3dSCy Schubert 6252b15cb3dSCy Schubertcat >>"$CONFIG_LT" <<\_LTEOF 6262b15cb3dSCy Schubertlt_cl_silent=false 6272b15cb3dSCy Schubertexec AS_MESSAGE_LOG_FD>>config.log 6282b15cb3dSCy Schubert{ 6292b15cb3dSCy Schubert echo 6302b15cb3dSCy Schubert AS_BOX([Running $as_me.]) 6312b15cb3dSCy Schubert} >&AS_MESSAGE_LOG_FD 6322b15cb3dSCy Schubert 6332b15cb3dSCy Schubertlt_cl_help="\ 634*f0574f5cSXin LI'$as_me' creates a local libtool stub from the current configuration, 6352b15cb3dSCy Schubertfor use in further configure time tests before the real libtool is 6362b15cb3dSCy Schubertgenerated. 6372b15cb3dSCy Schubert 6382b15cb3dSCy SchubertUsage: $[0] [[OPTIONS]] 6392b15cb3dSCy Schubert 6402b15cb3dSCy Schubert -h, --help print this help, then exit 6412b15cb3dSCy Schubert -V, --version print version number, then exit 6422b15cb3dSCy Schubert -q, --quiet do not print progress messages 6432b15cb3dSCy Schubert -d, --debug don't remove temporary files 6442b15cb3dSCy Schubert 6452b15cb3dSCy SchubertReport bugs to <bug-libtool@gnu.org>." 6462b15cb3dSCy Schubert 6472b15cb3dSCy Schubertlt_cl_version="\ 6482b15cb3dSCy Schubertm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6492b15cb3dSCy Schubertm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6502b15cb3dSCy Schubertconfigured by $[0], generated by m4_PACKAGE_STRING. 6512b15cb3dSCy Schubert 652*f0574f5cSXin LICopyright (C) 2011 Free Software Foundation, Inc. 6532b15cb3dSCy SchubertThis config.lt script is free software; the Free Software Foundation 6542b15cb3dSCy Schubertgives unlimited permision to copy, distribute and modify it." 6552b15cb3dSCy Schubert 656*f0574f5cSXin LIwhile test 0 != $[#] 6572b15cb3dSCy Schubertdo 6582b15cb3dSCy Schubert case $[1] in 6592b15cb3dSCy Schubert --version | --v* | -V ) 6602b15cb3dSCy Schubert echo "$lt_cl_version"; exit 0 ;; 6612b15cb3dSCy Schubert --help | --h* | -h ) 6622b15cb3dSCy Schubert echo "$lt_cl_help"; exit 0 ;; 6632b15cb3dSCy Schubert --debug | --d* | -d ) 6642b15cb3dSCy Schubert debug=: ;; 6652b15cb3dSCy Schubert --quiet | --q* | --silent | --s* | -q ) 6662b15cb3dSCy Schubert lt_cl_silent=: ;; 6672b15cb3dSCy Schubert 6682b15cb3dSCy Schubert -*) AC_MSG_ERROR([unrecognized option: $[1] 669*f0574f5cSXin LITry '$[0] --help' for more information.]) ;; 6702b15cb3dSCy Schubert 6712b15cb3dSCy Schubert *) AC_MSG_ERROR([unrecognized argument: $[1] 672*f0574f5cSXin LITry '$[0] --help' for more information.]) ;; 6732b15cb3dSCy Schubert esac 6742b15cb3dSCy Schubert shift 6752b15cb3dSCy Schubertdone 6762b15cb3dSCy Schubert 6772b15cb3dSCy Schubertif $lt_cl_silent; then 6782b15cb3dSCy Schubert exec AS_MESSAGE_FD>/dev/null 6792b15cb3dSCy Schubertfi 6802b15cb3dSCy Schubert_LTEOF 6812b15cb3dSCy Schubert 6822b15cb3dSCy Schubertcat >>"$CONFIG_LT" <<_LTEOF 6832b15cb3dSCy Schubert_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6842b15cb3dSCy Schubert_LTEOF 6852b15cb3dSCy Schubert 6862b15cb3dSCy Schubertcat >>"$CONFIG_LT" <<\_LTEOF 6872b15cb3dSCy SchubertAC_MSG_NOTICE([creating $ofile]) 6882b15cb3dSCy Schubert_LT_OUTPUT_LIBTOOL_COMMANDS 6892b15cb3dSCy SchubertAS_EXIT(0) 6902b15cb3dSCy Schubert_LTEOF 6912b15cb3dSCy Schubertchmod +x "$CONFIG_LT" 6922b15cb3dSCy Schubert 6932b15cb3dSCy Schubert# configure is writing to config.log, but config.lt does its own redirection, 6942b15cb3dSCy Schubert# appending to config.log, which fails on DOS, as config.log is still kept 6952b15cb3dSCy Schubert# open by configure. Here we exec the FD to /dev/null, effectively closing 6962b15cb3dSCy Schubert# config.log, so it can be properly (re)opened and appended to by config.lt. 6972b15cb3dSCy Schubertlt_cl_success=: 698*f0574f5cSXin LItest yes = "$silent" && 6992b15cb3dSCy Schubert lt_config_lt_args="$lt_config_lt_args --quiet" 7002b15cb3dSCy Schubertexec AS_MESSAGE_LOG_FD>/dev/null 7012b15cb3dSCy Schubert$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7022b15cb3dSCy Schubertexec AS_MESSAGE_LOG_FD>>config.log 7032b15cb3dSCy Schubert$lt_cl_success || AS_EXIT(1) 7042b15cb3dSCy Schubert])# LT_OUTPUT 7052b15cb3dSCy Schubert 7062b15cb3dSCy Schubert 7072b15cb3dSCy Schubert# _LT_CONFIG(TAG) 7082b15cb3dSCy Schubert# --------------- 7092b15cb3dSCy Schubert# If TAG is the built-in tag, create an initial libtool script with a 7102b15cb3dSCy Schubert# default configuration from the untagged config vars. Otherwise add code 7112b15cb3dSCy Schubert# to config.status for appending the configuration named by TAG from the 7122b15cb3dSCy Schubert# matching tagged config vars. 7132b15cb3dSCy Schubertm4_defun([_LT_CONFIG], 7142b15cb3dSCy Schubert[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7152b15cb3dSCy Schubert_LT_CONFIG_SAVE_COMMANDS([ 7162b15cb3dSCy Schubert m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7172b15cb3dSCy Schubert m4_if(_LT_TAG, [C], [ 718*f0574f5cSXin LI # See if we are running on zsh, and set the options that allow our 7192b15cb3dSCy Schubert # commands through without removal of \ escapes. 7202b15cb3dSCy Schubert if test -n "${ZSH_VERSION+set}"; then 7212b15cb3dSCy Schubert setopt NO_GLOB_SUBST 7222b15cb3dSCy Schubert fi 7232b15cb3dSCy Schubert 724*f0574f5cSXin LI cfgfile=${ofile}T 7252b15cb3dSCy Schubert trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7262b15cb3dSCy Schubert $RM "$cfgfile" 7272b15cb3dSCy Schubert 7282b15cb3dSCy Schubert cat <<_LT_EOF >> "$cfgfile" 7292b15cb3dSCy Schubert#! $SHELL 730*f0574f5cSXin LI# Generated automatically by $as_me ($PACKAGE) $VERSION 7312b15cb3dSCy Schubert# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7322b15cb3dSCy Schubert# NOTE: Changes made to this file will be lost: look at ltmain.sh. 733*f0574f5cSXin LI 734*f0574f5cSXin LI# Provide generalized library-building support services. 735*f0574f5cSXin LI# Written by Gordon Matzigkeit, 1996 736*f0574f5cSXin LI 7372b15cb3dSCy Schubert_LT_COPYING 7382b15cb3dSCy Schubert_LT_LIBTOOL_TAGS 7392b15cb3dSCy Schubert 740*f0574f5cSXin LI# Configured defaults for sys_lib_dlsearch_path munging. 741*f0574f5cSXin LI: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 742*f0574f5cSXin LI 7432b15cb3dSCy Schubert# ### BEGIN LIBTOOL CONFIG 7442b15cb3dSCy Schubert_LT_LIBTOOL_CONFIG_VARS 7452b15cb3dSCy Schubert_LT_LIBTOOL_TAG_VARS 7462b15cb3dSCy Schubert# ### END LIBTOOL CONFIG 7472b15cb3dSCy Schubert 7482b15cb3dSCy Schubert_LT_EOF 7492b15cb3dSCy Schubert 750*f0574f5cSXin LI cat <<'_LT_EOF' >> "$cfgfile" 751*f0574f5cSXin LI 752*f0574f5cSXin LI# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 753*f0574f5cSXin LI 754*f0574f5cSXin LI_LT_PREPARE_MUNGE_PATH_LIST 755*f0574f5cSXin LI_LT_PREPARE_CC_BASENAME 756*f0574f5cSXin LI 757*f0574f5cSXin LI# ### END FUNCTIONS SHARED WITH CONFIGURE 758*f0574f5cSXin LI 759*f0574f5cSXin LI_LT_EOF 760*f0574f5cSXin LI 7612b15cb3dSCy Schubert case $host_os in 7622b15cb3dSCy Schubert aix3*) 7632b15cb3dSCy Schubert cat <<\_LT_EOF >> "$cfgfile" 7642b15cb3dSCy Schubert# AIX sometimes has problems with the GCC collect2 program. For some 7652b15cb3dSCy Schubert# reason, if we set the COLLECT_NAMES environment variable, the problems 7662b15cb3dSCy Schubert# vanish in a puff of smoke. 767*f0574f5cSXin LIif test set != "${COLLECT_NAMES+set}"; then 7682b15cb3dSCy Schubert COLLECT_NAMES= 7692b15cb3dSCy Schubert export COLLECT_NAMES 7702b15cb3dSCy Schubertfi 7712b15cb3dSCy Schubert_LT_EOF 7722b15cb3dSCy Schubert ;; 7732b15cb3dSCy Schubert esac 7742b15cb3dSCy Schubert 7752b15cb3dSCy Schubert _LT_PROG_LTMAIN 7762b15cb3dSCy Schubert 7772b15cb3dSCy Schubert # We use sed instead of cat because bash on DJGPP gets confused if 7782b15cb3dSCy Schubert # if finds mixed CR/LF and LF-only lines. Since sed operates in 7792b15cb3dSCy Schubert # text mode, it properly converts lines to CR/LF. This bash problem 7802b15cb3dSCy Schubert # is reportedly fixed, but why not run on old versions too? 7812b15cb3dSCy Schubert sed '$q' "$ltmain" >> "$cfgfile" \ 7822b15cb3dSCy Schubert || (rm -f "$cfgfile"; exit 1) 7832b15cb3dSCy Schubert 7842b15cb3dSCy Schubert mv -f "$cfgfile" "$ofile" || 7852b15cb3dSCy Schubert (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7862b15cb3dSCy Schubert chmod +x "$ofile" 7872b15cb3dSCy Schubert], 7882b15cb3dSCy Schubert[cat <<_LT_EOF >> "$ofile" 7892b15cb3dSCy Schubert 7902b15cb3dSCy Schubertdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7912b15cb3dSCy Schubertdnl in a comment (ie after a #). 7922b15cb3dSCy Schubert# ### BEGIN LIBTOOL TAG CONFIG: $1 7932b15cb3dSCy Schubert_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7942b15cb3dSCy Schubert# ### END LIBTOOL TAG CONFIG: $1 7952b15cb3dSCy Schubert_LT_EOF 7962b15cb3dSCy Schubert])dnl /m4_if 7972b15cb3dSCy Schubert], 7982b15cb3dSCy Schubert[m4_if([$1], [], [ 7992b15cb3dSCy Schubert PACKAGE='$PACKAGE' 8002b15cb3dSCy Schubert VERSION='$VERSION' 8012b15cb3dSCy Schubert RM='$RM' 8022b15cb3dSCy Schubert ofile='$ofile'], []) 8032b15cb3dSCy Schubert])dnl /_LT_CONFIG_SAVE_COMMANDS 8042b15cb3dSCy Schubert])# _LT_CONFIG 8052b15cb3dSCy Schubert 8062b15cb3dSCy Schubert 8072b15cb3dSCy Schubert# LT_SUPPORTED_TAG(TAG) 8082b15cb3dSCy Schubert# --------------------- 8092b15cb3dSCy Schubert# Trace this macro to discover what tags are supported by the libtool 8102b15cb3dSCy Schubert# --tag option, using: 8112b15cb3dSCy Schubert# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8122b15cb3dSCy SchubertAC_DEFUN([LT_SUPPORTED_TAG], []) 8132b15cb3dSCy Schubert 8142b15cb3dSCy Schubert 8152b15cb3dSCy Schubert# C support is built-in for now 8162b15cb3dSCy Schubertm4_define([_LT_LANG_C_enabled], []) 8172b15cb3dSCy Schubertm4_define([_LT_TAGS], []) 8182b15cb3dSCy Schubert 8192b15cb3dSCy Schubert 8202b15cb3dSCy Schubert# LT_LANG(LANG) 8212b15cb3dSCy Schubert# ------------- 8222b15cb3dSCy Schubert# Enable libtool support for the given language if not already enabled. 8232b15cb3dSCy SchubertAC_DEFUN([LT_LANG], 8242b15cb3dSCy Schubert[AC_BEFORE([$0], [LT_OUTPUT])dnl 8252b15cb3dSCy Schubertm4_case([$1], 8262b15cb3dSCy Schubert [C], [_LT_LANG(C)], 8272b15cb3dSCy Schubert [C++], [_LT_LANG(CXX)], 828*f0574f5cSXin LI [Go], [_LT_LANG(GO)], 8292b15cb3dSCy Schubert [Java], [_LT_LANG(GCJ)], 8302b15cb3dSCy Schubert [Fortran 77], [_LT_LANG(F77)], 8312b15cb3dSCy Schubert [Fortran], [_LT_LANG(FC)], 8322b15cb3dSCy Schubert [Windows Resource], [_LT_LANG(RC)], 8332b15cb3dSCy Schubert [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8342b15cb3dSCy Schubert [_LT_LANG($1)], 8352b15cb3dSCy Schubert [m4_fatal([$0: unsupported language: "$1"])])])dnl 8362b15cb3dSCy Schubert])# LT_LANG 8372b15cb3dSCy Schubert 8382b15cb3dSCy Schubert 8392b15cb3dSCy Schubert# _LT_LANG(LANGNAME) 8402b15cb3dSCy Schubert# ------------------ 8412b15cb3dSCy Schubertm4_defun([_LT_LANG], 8422b15cb3dSCy Schubert[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8432b15cb3dSCy Schubert [LT_SUPPORTED_TAG([$1])dnl 8442b15cb3dSCy Schubert m4_append([_LT_TAGS], [$1 ])dnl 8452b15cb3dSCy Schubert m4_define([_LT_LANG_]$1[_enabled], [])dnl 8462b15cb3dSCy Schubert _LT_LANG_$1_CONFIG($1)])dnl 8472b15cb3dSCy Schubert])# _LT_LANG 8482b15cb3dSCy Schubert 8492b15cb3dSCy Schubert 850*f0574f5cSXin LIm4_ifndef([AC_PROG_GO], [ 851*f0574f5cSXin LI############################################################ 852*f0574f5cSXin LI# NOTE: This macro has been submitted for inclusion into # 853*f0574f5cSXin LI# GNU Autoconf as AC_PROG_GO. When it is available in # 854*f0574f5cSXin LI# a released version of Autoconf we should remove this # 855*f0574f5cSXin LI# macro and use it instead. # 856*f0574f5cSXin LI############################################################ 857*f0574f5cSXin LIm4_defun([AC_PROG_GO], 858*f0574f5cSXin LI[AC_LANG_PUSH(Go)dnl 859*f0574f5cSXin LIAC_ARG_VAR([GOC], [Go compiler command])dnl 860*f0574f5cSXin LIAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 861*f0574f5cSXin LI_AC_ARG_VAR_LDFLAGS()dnl 862*f0574f5cSXin LIAC_CHECK_TOOL(GOC, gccgo) 863*f0574f5cSXin LIif test -z "$GOC"; then 864*f0574f5cSXin LI if test -n "$ac_tool_prefix"; then 865*f0574f5cSXin LI AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 866*f0574f5cSXin LI fi 867*f0574f5cSXin LIfi 868*f0574f5cSXin LIif test -z "$GOC"; then 869*f0574f5cSXin LI AC_CHECK_PROG(GOC, gccgo, gccgo, false) 870*f0574f5cSXin LIfi 871*f0574f5cSXin LI])#m4_defun 872*f0574f5cSXin LI])#m4_ifndef 873*f0574f5cSXin LI 874*f0574f5cSXin LI 8752b15cb3dSCy Schubert# _LT_LANG_DEFAULT_CONFIG 8762b15cb3dSCy Schubert# ----------------------- 8772b15cb3dSCy Schubertm4_defun([_LT_LANG_DEFAULT_CONFIG], 8782b15cb3dSCy Schubert[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8792b15cb3dSCy Schubert [LT_LANG(CXX)], 8802b15cb3dSCy Schubert [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8812b15cb3dSCy Schubert 8822b15cb3dSCy SchubertAC_PROVIDE_IFELSE([AC_PROG_F77], 8832b15cb3dSCy Schubert [LT_LANG(F77)], 8842b15cb3dSCy Schubert [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8852b15cb3dSCy Schubert 8862b15cb3dSCy SchubertAC_PROVIDE_IFELSE([AC_PROG_FC], 8872b15cb3dSCy Schubert [LT_LANG(FC)], 8882b15cb3dSCy Schubert [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8892b15cb3dSCy Schubert 8902b15cb3dSCy Schubertdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8912b15cb3dSCy Schubertdnl pulling things in needlessly. 8922b15cb3dSCy SchubertAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8932b15cb3dSCy Schubert [LT_LANG(GCJ)], 8942b15cb3dSCy Schubert [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8952b15cb3dSCy Schubert [LT_LANG(GCJ)], 8962b15cb3dSCy Schubert [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8972b15cb3dSCy Schubert [LT_LANG(GCJ)], 8982b15cb3dSCy Schubert [m4_ifdef([AC_PROG_GCJ], 8992b15cb3dSCy Schubert [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9002b15cb3dSCy Schubert m4_ifdef([A][M_PROG_GCJ], 9012b15cb3dSCy Schubert [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9022b15cb3dSCy Schubert m4_ifdef([LT_PROG_GCJ], 9032b15cb3dSCy Schubert [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 9042b15cb3dSCy Schubert 905*f0574f5cSXin LIAC_PROVIDE_IFELSE([AC_PROG_GO], 906*f0574f5cSXin LI [LT_LANG(GO)], 907*f0574f5cSXin LI [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 908*f0574f5cSXin LI 9092b15cb3dSCy SchubertAC_PROVIDE_IFELSE([LT_PROG_RC], 9102b15cb3dSCy Schubert [LT_LANG(RC)], 9112b15cb3dSCy Schubert [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9122b15cb3dSCy Schubert])# _LT_LANG_DEFAULT_CONFIG 9132b15cb3dSCy Schubert 9142b15cb3dSCy Schubert# Obsolete macros: 9152b15cb3dSCy SchubertAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9162b15cb3dSCy SchubertAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9172b15cb3dSCy SchubertAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9182b15cb3dSCy SchubertAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9192b15cb3dSCy SchubertAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9202b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 9212b15cb3dSCy Schubertdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9222b15cb3dSCy Schubertdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9232b15cb3dSCy Schubertdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9242b15cb3dSCy Schubertdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9252b15cb3dSCy Schubertdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9262b15cb3dSCy Schubert 9272b15cb3dSCy Schubert 9282b15cb3dSCy Schubert# _LT_TAG_COMPILER 9292b15cb3dSCy Schubert# ---------------- 9302b15cb3dSCy Schubertm4_defun([_LT_TAG_COMPILER], 9312b15cb3dSCy Schubert[AC_REQUIRE([AC_PROG_CC])dnl 9322b15cb3dSCy Schubert 9332b15cb3dSCy Schubert_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9342b15cb3dSCy Schubert_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9352b15cb3dSCy Schubert_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9362b15cb3dSCy Schubert_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9372b15cb3dSCy Schubert 9382b15cb3dSCy Schubert# If no C compiler was specified, use CC. 9392b15cb3dSCy SchubertLTCC=${LTCC-"$CC"} 9402b15cb3dSCy Schubert 9412b15cb3dSCy Schubert# If no C compiler flags were specified, use CFLAGS. 9422b15cb3dSCy SchubertLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9432b15cb3dSCy Schubert 9442b15cb3dSCy Schubert# Allow CC to be a program name with arguments. 9452b15cb3dSCy Schubertcompiler=$CC 9462b15cb3dSCy Schubert])# _LT_TAG_COMPILER 9472b15cb3dSCy Schubert 9482b15cb3dSCy Schubert 9492b15cb3dSCy Schubert# _LT_COMPILER_BOILERPLATE 9502b15cb3dSCy Schubert# ------------------------ 9512b15cb3dSCy Schubert# Check for compiler boilerplate output or warnings with 9522b15cb3dSCy Schubert# the simple compiler test code. 9532b15cb3dSCy Schubertm4_defun([_LT_COMPILER_BOILERPLATE], 9542b15cb3dSCy Schubert[m4_require([_LT_DECL_SED])dnl 9552b15cb3dSCy Schubertac_outfile=conftest.$ac_objext 9562b15cb3dSCy Schubertecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9572b15cb3dSCy Schuberteval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9582b15cb3dSCy Schubert_lt_compiler_boilerplate=`cat conftest.err` 9592b15cb3dSCy Schubert$RM conftest* 9602b15cb3dSCy Schubert])# _LT_COMPILER_BOILERPLATE 9612b15cb3dSCy Schubert 9622b15cb3dSCy Schubert 9632b15cb3dSCy Schubert# _LT_LINKER_BOILERPLATE 9642b15cb3dSCy Schubert# ---------------------- 9652b15cb3dSCy Schubert# Check for linker boilerplate output or warnings with 9662b15cb3dSCy Schubert# the simple link test code. 9672b15cb3dSCy Schubertm4_defun([_LT_LINKER_BOILERPLATE], 9682b15cb3dSCy Schubert[m4_require([_LT_DECL_SED])dnl 9692b15cb3dSCy Schubertac_outfile=conftest.$ac_objext 9702b15cb3dSCy Schubertecho "$lt_simple_link_test_code" >conftest.$ac_ext 9712b15cb3dSCy Schuberteval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9722b15cb3dSCy Schubert_lt_linker_boilerplate=`cat conftest.err` 9732b15cb3dSCy Schubert$RM -r conftest* 9742b15cb3dSCy Schubert])# _LT_LINKER_BOILERPLATE 9752b15cb3dSCy Schubert 9762b15cb3dSCy Schubert# _LT_REQUIRED_DARWIN_CHECKS 9772b15cb3dSCy Schubert# ------------------------- 9782b15cb3dSCy Schubertm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9792b15cb3dSCy Schubert case $host_os in 9802b15cb3dSCy Schubert rhapsody* | darwin*) 9812b15cb3dSCy Schubert AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9822b15cb3dSCy Schubert AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9832b15cb3dSCy Schubert AC_CHECK_TOOL([LIPO], [lipo], [:]) 9842b15cb3dSCy Schubert AC_CHECK_TOOL([OTOOL], [otool], [:]) 9852b15cb3dSCy Schubert AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9862b15cb3dSCy Schubert _LT_DECL([], [DSYMUTIL], [1], 9872b15cb3dSCy Schubert [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9882b15cb3dSCy Schubert _LT_DECL([], [NMEDIT], [1], 9892b15cb3dSCy Schubert [Tool to change global to local symbols on Mac OS X]) 9902b15cb3dSCy Schubert _LT_DECL([], [LIPO], [1], 9912b15cb3dSCy Schubert [Tool to manipulate fat objects and archives on Mac OS X]) 9922b15cb3dSCy Schubert _LT_DECL([], [OTOOL], [1], 9932b15cb3dSCy Schubert [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9942b15cb3dSCy Schubert _LT_DECL([], [OTOOL64], [1], 9952b15cb3dSCy Schubert [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9962b15cb3dSCy Schubert 9972b15cb3dSCy Schubert AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9982b15cb3dSCy Schubert [lt_cv_apple_cc_single_mod=no 999*f0574f5cSXin LI if test -z "$LT_MULTI_MODULE"; then 10002b15cb3dSCy Schubert # By default we will add the -single_module flag. You can override 10012b15cb3dSCy Schubert # by either setting the environment variable LT_MULTI_MODULE 10022b15cb3dSCy Schubert # non-empty at configure time, or by adding -multi_module to the 10032b15cb3dSCy Schubert # link flags. 10042b15cb3dSCy Schubert rm -rf libconftest.dylib* 10052b15cb3dSCy Schubert echo "int foo(void){return 1;}" > conftest.c 10062b15cb3dSCy Schubert echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10072b15cb3dSCy Schubert-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10082b15cb3dSCy Schubert $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10092b15cb3dSCy Schubert -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10102b15cb3dSCy Schubert _lt_result=$? 1011*f0574f5cSXin LI # If there is a non-empty error log, and "single_module" 1012*f0574f5cSXin LI # appears in it, assume the flag caused a linker warning 1013*f0574f5cSXin LI if test -s conftest.err && $GREP single_module conftest.err; then 1014*f0574f5cSXin LI cat conftest.err >&AS_MESSAGE_LOG_FD 1015*f0574f5cSXin LI # Otherwise, if the output was created with a 0 exit code from 1016*f0574f5cSXin LI # the compiler, it worked. 1017*f0574f5cSXin LI elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10182b15cb3dSCy Schubert lt_cv_apple_cc_single_mod=yes 10192b15cb3dSCy Schubert else 10202b15cb3dSCy Schubert cat conftest.err >&AS_MESSAGE_LOG_FD 10212b15cb3dSCy Schubert fi 10222b15cb3dSCy Schubert rm -rf libconftest.dylib* 10232b15cb3dSCy Schubert rm -f conftest.* 10242b15cb3dSCy Schubert fi]) 1025*f0574f5cSXin LI 10262b15cb3dSCy Schubert AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10272b15cb3dSCy Schubert [lt_cv_ld_exported_symbols_list], 10282b15cb3dSCy Schubert [lt_cv_ld_exported_symbols_list=no 10292b15cb3dSCy Schubert save_LDFLAGS=$LDFLAGS 10302b15cb3dSCy Schubert echo "_main" > conftest.sym 10312b15cb3dSCy Schubert LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10322b15cb3dSCy Schubert AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10332b15cb3dSCy Schubert [lt_cv_ld_exported_symbols_list=yes], 10342b15cb3dSCy Schubert [lt_cv_ld_exported_symbols_list=no]) 1035*f0574f5cSXin LI LDFLAGS=$save_LDFLAGS 10362b15cb3dSCy Schubert ]) 1037*f0574f5cSXin LI 10382b15cb3dSCy Schubert AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10392b15cb3dSCy Schubert [lt_cv_ld_force_load=no 10402b15cb3dSCy Schubert cat > conftest.c << _LT_EOF 10412b15cb3dSCy Schubertint forced_loaded() { return 2;} 10422b15cb3dSCy Schubert_LT_EOF 10432b15cb3dSCy Schubert echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10442b15cb3dSCy Schubert $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10452b15cb3dSCy Schubert echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10462b15cb3dSCy Schubert $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10472b15cb3dSCy Schubert echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10482b15cb3dSCy Schubert $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10492b15cb3dSCy Schubert cat > conftest.c << _LT_EOF 10502b15cb3dSCy Schubertint main() { return 0;} 10512b15cb3dSCy Schubert_LT_EOF 10522b15cb3dSCy Schubert echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10532b15cb3dSCy Schubert $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10542b15cb3dSCy Schubert _lt_result=$? 1055*f0574f5cSXin LI if test -s conftest.err && $GREP force_load conftest.err; then 1056*f0574f5cSXin LI cat conftest.err >&AS_MESSAGE_LOG_FD 1057*f0574f5cSXin LI elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 10582b15cb3dSCy Schubert lt_cv_ld_force_load=yes 10592b15cb3dSCy Schubert else 10602b15cb3dSCy Schubert cat conftest.err >&AS_MESSAGE_LOG_FD 10612b15cb3dSCy Schubert fi 10622b15cb3dSCy Schubert rm -f conftest.err libconftest.a conftest conftest.c 10632b15cb3dSCy Schubert rm -rf conftest.dSYM 10642b15cb3dSCy Schubert ]) 10652b15cb3dSCy Schubert case $host_os in 10662b15cb3dSCy Schubert rhapsody* | darwin1.[[012]]) 1067*f0574f5cSXin LI _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 10682b15cb3dSCy Schubert darwin1.*) 1069*f0574f5cSXin LI _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10702b15cb3dSCy Schubert darwin*) # darwin 5.x on 10712b15cb3dSCy Schubert # if running on 10.5 or later, the deployment target defaults 10722b15cb3dSCy Schubert # to the OS version, if on x86, and 10.4, the deployment 10732b15cb3dSCy Schubert # target defaults to 10.4. Don't you love it? 10742b15cb3dSCy Schubert case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10752b15cb3dSCy Schubert 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1076*f0574f5cSXin LI _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1077*f0574f5cSXin LI 10.[[012]][[,.]]*) 1078*f0574f5cSXin LI _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10792b15cb3dSCy Schubert 10.*) 1080*f0574f5cSXin LI _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10812b15cb3dSCy Schubert esac 10822b15cb3dSCy Schubert ;; 10832b15cb3dSCy Schubert esac 1084*f0574f5cSXin LI if test yes = "$lt_cv_apple_cc_single_mod"; then 10852b15cb3dSCy Schubert _lt_dar_single_mod='$single_module' 10862b15cb3dSCy Schubert fi 1087*f0574f5cSXin LI if test yes = "$lt_cv_ld_exported_symbols_list"; then 1088*f0574f5cSXin LI _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 10892b15cb3dSCy Schubert else 1090*f0574f5cSXin LI _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 10912b15cb3dSCy Schubert fi 1092*f0574f5cSXin LI if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 10932b15cb3dSCy Schubert _lt_dsymutil='~$DSYMUTIL $lib || :' 10942b15cb3dSCy Schubert else 10952b15cb3dSCy Schubert _lt_dsymutil= 10962b15cb3dSCy Schubert fi 10972b15cb3dSCy Schubert ;; 10982b15cb3dSCy Schubert esac 10992b15cb3dSCy Schubert]) 11002b15cb3dSCy Schubert 11012b15cb3dSCy Schubert 1102*f0574f5cSXin LI# _LT_DARWIN_LINKER_FEATURES([TAG]) 1103*f0574f5cSXin LI# --------------------------------- 11042b15cb3dSCy Schubert# Checks for linker and compiler features on darwin 11052b15cb3dSCy Schubertm4_defun([_LT_DARWIN_LINKER_FEATURES], 11062b15cb3dSCy Schubert[ 11072b15cb3dSCy Schubert m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11082b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11092b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=no 11102b15cb3dSCy Schubert _LT_TAGVAR(hardcode_automatic, $1)=yes 11112b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1112*f0574f5cSXin LI if test yes = "$lt_cv_ld_force_load"; then 1113*f0574f5cSXin LI _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\"`' 1114*f0574f5cSXin LI m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1115*f0574f5cSXin LI [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 11162b15cb3dSCy Schubert else 11172b15cb3dSCy Schubert _LT_TAGVAR(whole_archive_flag_spec, $1)='' 11182b15cb3dSCy Schubert fi 11192b15cb3dSCy Schubert _LT_TAGVAR(link_all_deplibs, $1)=yes 1120*f0574f5cSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11212b15cb3dSCy Schubert case $cc_basename in 1122*f0574f5cSXin LI ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11232b15cb3dSCy Schubert *) _lt_dar_can_shared=$GCC ;; 11242b15cb3dSCy Schubert esac 1125*f0574f5cSXin LI if test yes = "$_lt_dar_can_shared"; then 11262b15cb3dSCy Schubert output_verbose_link_cmd=func_echo_all 1127*f0574f5cSXin LI _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" 1128*f0574f5cSXin LI _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1129*f0574f5cSXin LI _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" 1130*f0574f5cSXin LI _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" 11312b15cb3dSCy Schubert m4_if([$1], [CXX], 1132*f0574f5cSXin LI[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1133*f0574f5cSXin LI _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" 1134*f0574f5cSXin LI _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" 11352b15cb3dSCy Schubert fi 11362b15cb3dSCy Schubert],[]) 11372b15cb3dSCy Schubert else 11382b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 11392b15cb3dSCy Schubert fi 11402b15cb3dSCy Schubert]) 11412b15cb3dSCy Schubert 11422b15cb3dSCy Schubert# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 11432b15cb3dSCy Schubert# ---------------------------------- 11442b15cb3dSCy Schubert# Links a minimal program and checks the executable 11452b15cb3dSCy Schubert# for the system default hardcoded library path. In most cases, 11462b15cb3dSCy Schubert# this is /usr/lib:/lib, but when the MPI compilers are used 11472b15cb3dSCy Schubert# the location of the communication and MPI libs are included too. 11482b15cb3dSCy Schubert# If we don't find anything, use the default library path according 11492b15cb3dSCy Schubert# to the aix ld manual. 11502b15cb3dSCy Schubert# Store the results from the different compilers for each TAGNAME. 11512b15cb3dSCy Schubert# Allow to override them for all tags through lt_cv_aix_libpath. 11522b15cb3dSCy Schubertm4_defun([_LT_SYS_MODULE_PATH_AIX], 11532b15cb3dSCy Schubert[m4_require([_LT_DECL_SED])dnl 1154*f0574f5cSXin LIif test set = "${lt_cv_aix_libpath+set}"; then 11552b15cb3dSCy Schubert aix_libpath=$lt_cv_aix_libpath 11562b15cb3dSCy Schubertelse 11572b15cb3dSCy Schubert AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 11582b15cb3dSCy Schubert [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 11592b15cb3dSCy Schubert lt_aix_libpath_sed='[ 11602b15cb3dSCy Schubert /Import File Strings/,/^$/ { 11612b15cb3dSCy Schubert /^0/ { 11622b15cb3dSCy Schubert s/^0 *\([^ ]*\) *$/\1/ 11632b15cb3dSCy Schubert p 11642b15cb3dSCy Schubert } 11652b15cb3dSCy Schubert }]' 11662b15cb3dSCy Schubert _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11672b15cb3dSCy Schubert # Check for a 64-bit object if we didn't find anything. 11682b15cb3dSCy Schubert if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11692b15cb3dSCy Schubert _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 11702b15cb3dSCy Schubert fi],[]) 11712b15cb3dSCy Schubert if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1172*f0574f5cSXin LI _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 11732b15cb3dSCy Schubert fi 11742b15cb3dSCy Schubert ]) 11752b15cb3dSCy Schubert aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 11762b15cb3dSCy Schubertfi 11772b15cb3dSCy Schubert])# _LT_SYS_MODULE_PATH_AIX 11782b15cb3dSCy Schubert 11792b15cb3dSCy Schubert 11802b15cb3dSCy Schubert# _LT_SHELL_INIT(ARG) 11812b15cb3dSCy Schubert# ------------------- 11822b15cb3dSCy Schubertm4_define([_LT_SHELL_INIT], 11832b15cb3dSCy Schubert[m4_divert_text([M4SH-INIT], [$1 11842b15cb3dSCy Schubert])])# _LT_SHELL_INIT 11852b15cb3dSCy Schubert 11862b15cb3dSCy Schubert 11872b15cb3dSCy Schubert 11882b15cb3dSCy Schubert# _LT_PROG_ECHO_BACKSLASH 11892b15cb3dSCy Schubert# ----------------------- 11902b15cb3dSCy Schubert# Find how we can fake an echo command that does not interpret backslash. 11912b15cb3dSCy Schubert# In particular, with Autoconf 2.60 or later we add some code to the start 1192*f0574f5cSXin LI# of the generated configure script that will find a shell with a builtin 1193*f0574f5cSXin LI# printf (that we can use as an echo command). 11942b15cb3dSCy Schubertm4_defun([_LT_PROG_ECHO_BACKSLASH], 11952b15cb3dSCy Schubert[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 11962b15cb3dSCy SchubertECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 11972b15cb3dSCy SchubertECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 11982b15cb3dSCy Schubert 11992b15cb3dSCy SchubertAC_MSG_CHECKING([how to print strings]) 12002b15cb3dSCy Schubert# Test print first, because it will be a builtin if present. 12012b15cb3dSCy Schubertif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 12022b15cb3dSCy Schubert test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 12032b15cb3dSCy Schubert ECHO='print -r --' 12042b15cb3dSCy Schubertelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 12052b15cb3dSCy Schubert ECHO='printf %s\n' 12062b15cb3dSCy Schubertelse 12072b15cb3dSCy Schubert # Use this function as a fallback that always works. 12082b15cb3dSCy Schubert func_fallback_echo () 12092b15cb3dSCy Schubert { 12102b15cb3dSCy Schubert eval 'cat <<_LTECHO_EOF 12112b15cb3dSCy Schubert$[]1 12122b15cb3dSCy Schubert_LTECHO_EOF' 12132b15cb3dSCy Schubert } 12142b15cb3dSCy Schubert ECHO='func_fallback_echo' 12152b15cb3dSCy Schubertfi 12162b15cb3dSCy Schubert 12172b15cb3dSCy Schubert# func_echo_all arg... 12182b15cb3dSCy Schubert# Invoke $ECHO with all args, space-separated. 12192b15cb3dSCy Schubertfunc_echo_all () 12202b15cb3dSCy Schubert{ 12212b15cb3dSCy Schubert $ECHO "$*" 12222b15cb3dSCy Schubert} 12232b15cb3dSCy Schubert 1224*f0574f5cSXin LIcase $ECHO in 12252b15cb3dSCy Schubert printf*) AC_MSG_RESULT([printf]) ;; 12262b15cb3dSCy Schubert print*) AC_MSG_RESULT([print -r]) ;; 12272b15cb3dSCy Schubert *) AC_MSG_RESULT([cat]) ;; 12282b15cb3dSCy Schubertesac 12292b15cb3dSCy Schubert 12302b15cb3dSCy Schubertm4_ifdef([_AS_DETECT_SUGGESTED], 12312b15cb3dSCy Schubert[_AS_DETECT_SUGGESTED([ 12322b15cb3dSCy Schubert test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12332b15cb3dSCy Schubert ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12342b15cb3dSCy Schubert ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12352b15cb3dSCy Schubert ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12362b15cb3dSCy Schubert PATH=/empty FPATH=/empty; export PATH FPATH 12372b15cb3dSCy Schubert test "X`printf %s $ECHO`" = "X$ECHO" \ 12382b15cb3dSCy Schubert || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12392b15cb3dSCy Schubert 12402b15cb3dSCy Schubert_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12412b15cb3dSCy Schubert_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12422b15cb3dSCy Schubert])# _LT_PROG_ECHO_BACKSLASH 12432b15cb3dSCy Schubert 12442b15cb3dSCy Schubert 12452b15cb3dSCy Schubert# _LT_WITH_SYSROOT 12462b15cb3dSCy Schubert# ---------------- 12472b15cb3dSCy SchubertAC_DEFUN([_LT_WITH_SYSROOT], 12482b15cb3dSCy Schubert[AC_MSG_CHECKING([for sysroot]) 12492b15cb3dSCy SchubertAC_ARG_WITH([sysroot], 1250*f0574f5cSXin LI[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1251*f0574f5cSXin LI [Search for dependent libraries within DIR (or the compiler's sysroot 1252*f0574f5cSXin LI if not specified).])], 12532b15cb3dSCy Schubert[], [with_sysroot=no]) 12542b15cb3dSCy Schubert 12552b15cb3dSCy Schubertdnl lt_sysroot will always be passed unquoted. We quote it here 12562b15cb3dSCy Schubertdnl in case the user passed a directory name. 12572b15cb3dSCy Schubertlt_sysroot= 1258*f0574f5cSXin LIcase $with_sysroot in #( 12592b15cb3dSCy Schubert yes) 1260*f0574f5cSXin LI if test yes = "$GCC"; then 12612b15cb3dSCy Schubert lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12622b15cb3dSCy Schubert fi 12632b15cb3dSCy Schubert ;; #( 12642b15cb3dSCy Schubert /*) 12652b15cb3dSCy Schubert lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 12662b15cb3dSCy Schubert ;; #( 12672b15cb3dSCy Schubert no|'') 12682b15cb3dSCy Schubert ;; #( 12692b15cb3dSCy Schubert *) 1270*f0574f5cSXin LI AC_MSG_RESULT([$with_sysroot]) 12712b15cb3dSCy Schubert AC_MSG_ERROR([The sysroot must be an absolute path.]) 12722b15cb3dSCy Schubert ;; 12732b15cb3dSCy Schubertesac 12742b15cb3dSCy Schubert 12752b15cb3dSCy Schubert AC_MSG_RESULT([${lt_sysroot:-no}]) 12762b15cb3dSCy Schubert_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1277*f0574f5cSXin LI[dependent libraries, and where our libraries should be installed.])]) 12782b15cb3dSCy Schubert 12792b15cb3dSCy Schubert# _LT_ENABLE_LOCK 12802b15cb3dSCy Schubert# --------------- 12812b15cb3dSCy Schubertm4_defun([_LT_ENABLE_LOCK], 12822b15cb3dSCy Schubert[AC_ARG_ENABLE([libtool-lock], 12832b15cb3dSCy Schubert [AS_HELP_STRING([--disable-libtool-lock], 12842b15cb3dSCy Schubert [avoid locking (might break parallel builds)])]) 1285*f0574f5cSXin LItest no = "$enable_libtool_lock" || enable_libtool_lock=yes 12862b15cb3dSCy Schubert 12872b15cb3dSCy Schubert# Some flags need to be propagated to the compiler or linker for good 12882b15cb3dSCy Schubert# libtool support. 12892b15cb3dSCy Schubertcase $host in 12902b15cb3dSCy Schubertia64-*-hpux*) 1291*f0574f5cSXin LI # Find out what ABI is being produced by ac_compile, and set mode 1292*f0574f5cSXin LI # options accordingly. 12932b15cb3dSCy Schubert echo 'int i;' > conftest.$ac_ext 12942b15cb3dSCy Schubert if AC_TRY_EVAL(ac_compile); then 12952b15cb3dSCy Schubert case `/usr/bin/file conftest.$ac_objext` in 12962b15cb3dSCy Schubert *ELF-32*) 1297*f0574f5cSXin LI HPUX_IA64_MODE=32 12982b15cb3dSCy Schubert ;; 12992b15cb3dSCy Schubert *ELF-64*) 1300*f0574f5cSXin LI HPUX_IA64_MODE=64 13012b15cb3dSCy Schubert ;; 13022b15cb3dSCy Schubert esac 13032b15cb3dSCy Schubert fi 13042b15cb3dSCy Schubert rm -rf conftest* 13052b15cb3dSCy Schubert ;; 13062b15cb3dSCy Schubert*-*-irix6*) 1307*f0574f5cSXin LI # Find out what ABI is being produced by ac_compile, and set linker 1308*f0574f5cSXin LI # options accordingly. 13092b15cb3dSCy Schubert echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13102b15cb3dSCy Schubert if AC_TRY_EVAL(ac_compile); then 1311*f0574f5cSXin LI if test yes = "$lt_cv_prog_gnu_ld"; then 13122b15cb3dSCy Schubert case `/usr/bin/file conftest.$ac_objext` in 13132b15cb3dSCy Schubert *32-bit*) 13142b15cb3dSCy Schubert LD="${LD-ld} -melf32bsmip" 13152b15cb3dSCy Schubert ;; 13162b15cb3dSCy Schubert *N32*) 13172b15cb3dSCy Schubert LD="${LD-ld} -melf32bmipn32" 13182b15cb3dSCy Schubert ;; 13192b15cb3dSCy Schubert *64-bit*) 13202b15cb3dSCy Schubert LD="${LD-ld} -melf64bmip" 13212b15cb3dSCy Schubert ;; 13222b15cb3dSCy Schubert esac 13232b15cb3dSCy Schubert else 13242b15cb3dSCy Schubert case `/usr/bin/file conftest.$ac_objext` in 13252b15cb3dSCy Schubert *32-bit*) 13262b15cb3dSCy Schubert LD="${LD-ld} -32" 13272b15cb3dSCy Schubert ;; 13282b15cb3dSCy Schubert *N32*) 13292b15cb3dSCy Schubert LD="${LD-ld} -n32" 13302b15cb3dSCy Schubert ;; 13312b15cb3dSCy Schubert *64-bit*) 13322b15cb3dSCy Schubert LD="${LD-ld} -64" 13332b15cb3dSCy Schubert ;; 13342b15cb3dSCy Schubert esac 13352b15cb3dSCy Schubert fi 13362b15cb3dSCy Schubert fi 13372b15cb3dSCy Schubert rm -rf conftest* 13382b15cb3dSCy Schubert ;; 13392b15cb3dSCy Schubert 1340*f0574f5cSXin LImips64*-*linux*) 1341*f0574f5cSXin LI # Find out what ABI is being produced by ac_compile, and set linker 1342*f0574f5cSXin LI # options accordingly. 1343*f0574f5cSXin LI echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1344*f0574f5cSXin LI if AC_TRY_EVAL(ac_compile); then 1345*f0574f5cSXin LI emul=elf 1346*f0574f5cSXin LI case `/usr/bin/file conftest.$ac_objext` in 1347*f0574f5cSXin LI *32-bit*) 1348*f0574f5cSXin LI emul="${emul}32" 1349*f0574f5cSXin LI ;; 1350*f0574f5cSXin LI *64-bit*) 1351*f0574f5cSXin LI emul="${emul}64" 1352*f0574f5cSXin LI ;; 1353*f0574f5cSXin LI esac 1354*f0574f5cSXin LI case `/usr/bin/file conftest.$ac_objext` in 1355*f0574f5cSXin LI *MSB*) 1356*f0574f5cSXin LI emul="${emul}btsmip" 1357*f0574f5cSXin LI ;; 1358*f0574f5cSXin LI *LSB*) 1359*f0574f5cSXin LI emul="${emul}ltsmip" 1360*f0574f5cSXin LI ;; 1361*f0574f5cSXin LI esac 1362*f0574f5cSXin LI case `/usr/bin/file conftest.$ac_objext` in 1363*f0574f5cSXin LI *N32*) 1364*f0574f5cSXin LI emul="${emul}n32" 1365*f0574f5cSXin LI ;; 1366*f0574f5cSXin LI esac 1367*f0574f5cSXin LI LD="${LD-ld} -m $emul" 1368*f0574f5cSXin LI fi 1369*f0574f5cSXin LI rm -rf conftest* 1370*f0574f5cSXin LI ;; 1371*f0574f5cSXin LI 1372*f0574f5cSXin LIx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13732b15cb3dSCy Schuberts390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1374*f0574f5cSXin LI # Find out what ABI is being produced by ac_compile, and set linker 1375*f0574f5cSXin LI # options accordingly. Note that the listed cases only cover the 1376*f0574f5cSXin LI # situations where additional linker options are needed (such as when 1377*f0574f5cSXin LI # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1378*f0574f5cSXin LI # vice versa); the common cases where no linker options are needed do 1379*f0574f5cSXin LI # not appear in the list. 13802b15cb3dSCy Schubert echo 'int i;' > conftest.$ac_ext 13812b15cb3dSCy Schubert if AC_TRY_EVAL(ac_compile); then 13822b15cb3dSCy Schubert case `/usr/bin/file conftest.o` in 13832b15cb3dSCy Schubert *32-bit*) 13842b15cb3dSCy Schubert case $host in 13852b15cb3dSCy Schubert x86_64-*kfreebsd*-gnu) 13862b15cb3dSCy Schubert LD="${LD-ld} -m elf_i386_fbsd" 13872b15cb3dSCy Schubert ;; 13882b15cb3dSCy Schubert x86_64-*linux*) 1389*f0574f5cSXin LI case `/usr/bin/file conftest.o` in 1390*f0574f5cSXin LI *x86-64*) 1391*f0574f5cSXin LI LD="${LD-ld} -m elf32_x86_64" 1392*f0574f5cSXin LI ;; 1393*f0574f5cSXin LI *) 13942b15cb3dSCy Schubert LD="${LD-ld} -m elf_i386" 13952b15cb3dSCy Schubert ;; 1396*f0574f5cSXin LI esac 1397*f0574f5cSXin LI ;; 1398*f0574f5cSXin LI powerpc64le-*linux*) 1399*f0574f5cSXin LI LD="${LD-ld} -m elf32lppclinux" 1400*f0574f5cSXin LI ;; 1401*f0574f5cSXin LI powerpc64-*linux*) 14022b15cb3dSCy Schubert LD="${LD-ld} -m elf32ppclinux" 14032b15cb3dSCy Schubert ;; 14042b15cb3dSCy Schubert s390x-*linux*) 14052b15cb3dSCy Schubert LD="${LD-ld} -m elf_s390" 14062b15cb3dSCy Schubert ;; 14072b15cb3dSCy Schubert sparc64-*linux*) 14082b15cb3dSCy Schubert LD="${LD-ld} -m elf32_sparc" 14092b15cb3dSCy Schubert ;; 14102b15cb3dSCy Schubert esac 14112b15cb3dSCy Schubert ;; 14122b15cb3dSCy Schubert *64-bit*) 14132b15cb3dSCy Schubert case $host in 14142b15cb3dSCy Schubert x86_64-*kfreebsd*-gnu) 14152b15cb3dSCy Schubert LD="${LD-ld} -m elf_x86_64_fbsd" 14162b15cb3dSCy Schubert ;; 14172b15cb3dSCy Schubert x86_64-*linux*) 14182b15cb3dSCy Schubert LD="${LD-ld} -m elf_x86_64" 14192b15cb3dSCy Schubert ;; 1420*f0574f5cSXin LI powerpcle-*linux*) 1421*f0574f5cSXin LI LD="${LD-ld} -m elf64lppc" 1422*f0574f5cSXin LI ;; 1423*f0574f5cSXin LI powerpc-*linux*) 14242b15cb3dSCy Schubert LD="${LD-ld} -m elf64ppc" 14252b15cb3dSCy Schubert ;; 14262b15cb3dSCy Schubert s390*-*linux*|s390*-*tpf*) 14272b15cb3dSCy Schubert LD="${LD-ld} -m elf64_s390" 14282b15cb3dSCy Schubert ;; 14292b15cb3dSCy Schubert sparc*-*linux*) 14302b15cb3dSCy Schubert LD="${LD-ld} -m elf64_sparc" 14312b15cb3dSCy Schubert ;; 14322b15cb3dSCy Schubert esac 14332b15cb3dSCy Schubert ;; 14342b15cb3dSCy Schubert esac 14352b15cb3dSCy Schubert fi 14362b15cb3dSCy Schubert rm -rf conftest* 14372b15cb3dSCy Schubert ;; 14382b15cb3dSCy Schubert 14392b15cb3dSCy Schubert*-*-sco3.2v5*) 14402b15cb3dSCy Schubert # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1441*f0574f5cSXin LI SAVE_CFLAGS=$CFLAGS 14422b15cb3dSCy Schubert CFLAGS="$CFLAGS -belf" 14432b15cb3dSCy Schubert AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 14442b15cb3dSCy Schubert [AC_LANG_PUSH(C) 14452b15cb3dSCy Schubert AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 14462b15cb3dSCy Schubert AC_LANG_POP]) 1447*f0574f5cSXin LI if test yes != "$lt_cv_cc_needs_belf"; then 14482b15cb3dSCy Schubert # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1449*f0574f5cSXin LI CFLAGS=$SAVE_CFLAGS 14502b15cb3dSCy Schubert fi 14512b15cb3dSCy Schubert ;; 1452*f0574f5cSXin LI*-*solaris*) 1453*f0574f5cSXin LI # Find out what ABI is being produced by ac_compile, and set linker 1454*f0574f5cSXin LI # options accordingly. 14552b15cb3dSCy Schubert echo 'int i;' > conftest.$ac_ext 14562b15cb3dSCy Schubert if AC_TRY_EVAL(ac_compile); then 14572b15cb3dSCy Schubert case `/usr/bin/file conftest.o` in 14582b15cb3dSCy Schubert *64-bit*) 14592b15cb3dSCy Schubert case $lt_cv_prog_gnu_ld in 1460*f0574f5cSXin LI yes*) 1461*f0574f5cSXin LI case $host in 1462*f0574f5cSXin LI i?86-*-solaris*|x86_64-*-solaris*) 1463*f0574f5cSXin LI LD="${LD-ld} -m elf_x86_64" 1464*f0574f5cSXin LI ;; 1465*f0574f5cSXin LI sparc*-*-solaris*) 1466*f0574f5cSXin LI LD="${LD-ld} -m elf64_sparc" 1467*f0574f5cSXin LI ;; 1468*f0574f5cSXin LI esac 1469*f0574f5cSXin LI # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1470*f0574f5cSXin LI if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1471*f0574f5cSXin LI LD=${LD-ld}_sol2 1472*f0574f5cSXin LI fi 1473*f0574f5cSXin LI ;; 14742b15cb3dSCy Schubert *) 14752b15cb3dSCy Schubert if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14762b15cb3dSCy Schubert LD="${LD-ld} -64" 14772b15cb3dSCy Schubert fi 14782b15cb3dSCy Schubert ;; 14792b15cb3dSCy Schubert esac 14802b15cb3dSCy Schubert ;; 14812b15cb3dSCy Schubert esac 14822b15cb3dSCy Schubert fi 14832b15cb3dSCy Schubert rm -rf conftest* 14842b15cb3dSCy Schubert ;; 14852b15cb3dSCy Schubertesac 14862b15cb3dSCy Schubert 1487*f0574f5cSXin LIneed_locks=$enable_libtool_lock 14882b15cb3dSCy Schubert])# _LT_ENABLE_LOCK 14892b15cb3dSCy Schubert 14902b15cb3dSCy Schubert 14912b15cb3dSCy Schubert# _LT_PROG_AR 14922b15cb3dSCy Schubert# ----------- 14932b15cb3dSCy Schubertm4_defun([_LT_PROG_AR], 14942b15cb3dSCy Schubert[AC_CHECK_TOOLS(AR, [ar], false) 14952b15cb3dSCy Schubert: ${AR=ar} 14962b15cb3dSCy Schubert: ${AR_FLAGS=cru} 14972b15cb3dSCy Schubert_LT_DECL([], [AR], [1], [The archiver]) 14982b15cb3dSCy Schubert_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 14992b15cb3dSCy Schubert 15002b15cb3dSCy SchubertAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 15012b15cb3dSCy Schubert [lt_cv_ar_at_file=no 15022b15cb3dSCy Schubert AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 15032b15cb3dSCy Schubert [echo conftest.$ac_objext > conftest.lst 15042b15cb3dSCy Schubert lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 15052b15cb3dSCy Schubert AC_TRY_EVAL([lt_ar_try]) 1506*f0574f5cSXin LI if test 0 -eq "$ac_status"; then 15072b15cb3dSCy Schubert # Ensure the archiver fails upon bogus file names. 15082b15cb3dSCy Schubert rm -f conftest.$ac_objext libconftest.a 15092b15cb3dSCy Schubert AC_TRY_EVAL([lt_ar_try]) 1510*f0574f5cSXin LI if test 0 -ne "$ac_status"; then 15112b15cb3dSCy Schubert lt_cv_ar_at_file=@ 15122b15cb3dSCy Schubert fi 15132b15cb3dSCy Schubert fi 15142b15cb3dSCy Schubert rm -f conftest.* libconftest.a 15152b15cb3dSCy Schubert ]) 15162b15cb3dSCy Schubert ]) 15172b15cb3dSCy Schubert 1518*f0574f5cSXin LIif test no = "$lt_cv_ar_at_file"; then 15192b15cb3dSCy Schubert archiver_list_spec= 15202b15cb3dSCy Schubertelse 15212b15cb3dSCy Schubert archiver_list_spec=$lt_cv_ar_at_file 15222b15cb3dSCy Schubertfi 15232b15cb3dSCy Schubert_LT_DECL([], [archiver_list_spec], [1], 15242b15cb3dSCy Schubert [How to feed a file listing to the archiver]) 15252b15cb3dSCy Schubert])# _LT_PROG_AR 15262b15cb3dSCy Schubert 15272b15cb3dSCy Schubert 15282b15cb3dSCy Schubert# _LT_CMD_OLD_ARCHIVE 15292b15cb3dSCy Schubert# ------------------- 15302b15cb3dSCy Schubertm4_defun([_LT_CMD_OLD_ARCHIVE], 15312b15cb3dSCy Schubert[_LT_PROG_AR 15322b15cb3dSCy Schubert 15332b15cb3dSCy SchubertAC_CHECK_TOOL(STRIP, strip, :) 15342b15cb3dSCy Schuberttest -z "$STRIP" && STRIP=: 15352b15cb3dSCy Schubert_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 15362b15cb3dSCy Schubert 15372b15cb3dSCy SchubertAC_CHECK_TOOL(RANLIB, ranlib, :) 15382b15cb3dSCy Schuberttest -z "$RANLIB" && RANLIB=: 15392b15cb3dSCy Schubert_LT_DECL([], [RANLIB], [1], 15402b15cb3dSCy Schubert [Commands used to install an old-style archive]) 15412b15cb3dSCy Schubert 15422b15cb3dSCy Schubert# Determine commands to create old-style static archives. 15432b15cb3dSCy Schubertold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15442b15cb3dSCy Schubertold_postinstall_cmds='chmod 644 $oldlib' 15452b15cb3dSCy Schubertold_postuninstall_cmds= 15462b15cb3dSCy Schubert 15472b15cb3dSCy Schubertif test -n "$RANLIB"; then 15482b15cb3dSCy Schubert case $host_os in 1549*f0574f5cSXin LI bitrig* | openbsd*) 1550*f0574f5cSXin LI old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15512b15cb3dSCy Schubert ;; 15522b15cb3dSCy Schubert *) 1553*f0574f5cSXin LI old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15542b15cb3dSCy Schubert ;; 15552b15cb3dSCy Schubert esac 1556*f0574f5cSXin LI old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15572b15cb3dSCy Schubertfi 15582b15cb3dSCy Schubert 15592b15cb3dSCy Schubertcase $host_os in 15602b15cb3dSCy Schubert darwin*) 15612b15cb3dSCy Schubert lock_old_archive_extraction=yes ;; 15622b15cb3dSCy Schubert *) 15632b15cb3dSCy Schubert lock_old_archive_extraction=no ;; 15642b15cb3dSCy Schubertesac 15652b15cb3dSCy Schubert_LT_DECL([], [old_postinstall_cmds], [2]) 15662b15cb3dSCy Schubert_LT_DECL([], [old_postuninstall_cmds], [2]) 15672b15cb3dSCy Schubert_LT_TAGDECL([], [old_archive_cmds], [2], 15682b15cb3dSCy Schubert [Commands used to build an old-style archive]) 15692b15cb3dSCy Schubert_LT_DECL([], [lock_old_archive_extraction], [0], 15702b15cb3dSCy Schubert [Whether to use a lock for old archive extraction]) 15712b15cb3dSCy Schubert])# _LT_CMD_OLD_ARCHIVE 15722b15cb3dSCy Schubert 15732b15cb3dSCy Schubert 15742b15cb3dSCy Schubert# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15752b15cb3dSCy Schubert# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15762b15cb3dSCy Schubert# ---------------------------------------------------------------- 15772b15cb3dSCy Schubert# Check whether the given compiler option works 15782b15cb3dSCy SchubertAC_DEFUN([_LT_COMPILER_OPTION], 15792b15cb3dSCy Schubert[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15802b15cb3dSCy Schubertm4_require([_LT_DECL_SED])dnl 15812b15cb3dSCy SchubertAC_CACHE_CHECK([$1], [$2], 15822b15cb3dSCy Schubert [$2=no 15832b15cb3dSCy Schubert m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15842b15cb3dSCy Schubert echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1585*f0574f5cSXin LI lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 15862b15cb3dSCy Schubert # Insert the option either (1) after the last *FLAGS variable, or 15872b15cb3dSCy Schubert # (2) before a word containing "conftest.", or (3) at the end. 15882b15cb3dSCy Schubert # Note that $ac_compile itself does not contain backslashes and begins 15892b15cb3dSCy Schubert # with a dollar sign (not a hyphen), so the echo should work correctly. 15902b15cb3dSCy Schubert # The option is referenced via a variable to avoid confusing sed. 15912b15cb3dSCy Schubert lt_compile=`echo "$ac_compile" | $SED \ 15922b15cb3dSCy Schubert -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 15932b15cb3dSCy Schubert -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 15942b15cb3dSCy Schubert -e 's:$: $lt_compiler_flag:'` 15952b15cb3dSCy Schubert (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 15962b15cb3dSCy Schubert (eval "$lt_compile" 2>conftest.err) 15972b15cb3dSCy Schubert ac_status=$? 15982b15cb3dSCy Schubert cat conftest.err >&AS_MESSAGE_LOG_FD 15992b15cb3dSCy Schubert echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 16002b15cb3dSCy Schubert if (exit $ac_status) && test -s "$ac_outfile"; then 16012b15cb3dSCy Schubert # The compiler can only warn and ignore the option if not recognized 16022b15cb3dSCy Schubert # So say no if there are warnings other than the usual output. 16032b15cb3dSCy Schubert $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 16042b15cb3dSCy Schubert $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16052b15cb3dSCy Schubert if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 16062b15cb3dSCy Schubert $2=yes 16072b15cb3dSCy Schubert fi 16082b15cb3dSCy Schubert fi 16092b15cb3dSCy Schubert $RM conftest* 16102b15cb3dSCy Schubert]) 16112b15cb3dSCy Schubert 1612*f0574f5cSXin LIif test yes = "[$]$2"; then 16132b15cb3dSCy Schubert m4_if([$5], , :, [$5]) 16142b15cb3dSCy Schubertelse 16152b15cb3dSCy Schubert m4_if([$6], , :, [$6]) 16162b15cb3dSCy Schubertfi 16172b15cb3dSCy Schubert])# _LT_COMPILER_OPTION 16182b15cb3dSCy Schubert 16192b15cb3dSCy Schubert# Old name: 16202b15cb3dSCy SchubertAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16212b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 16222b15cb3dSCy Schubertdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 16232b15cb3dSCy Schubert 16242b15cb3dSCy Schubert 16252b15cb3dSCy Schubert# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16262b15cb3dSCy Schubert# [ACTION-SUCCESS], [ACTION-FAILURE]) 16272b15cb3dSCy Schubert# ---------------------------------------------------- 16282b15cb3dSCy Schubert# Check whether the given linker option works 16292b15cb3dSCy SchubertAC_DEFUN([_LT_LINKER_OPTION], 16302b15cb3dSCy Schubert[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16312b15cb3dSCy Schubertm4_require([_LT_DECL_SED])dnl 16322b15cb3dSCy SchubertAC_CACHE_CHECK([$1], [$2], 16332b15cb3dSCy Schubert [$2=no 1634*f0574f5cSXin LI save_LDFLAGS=$LDFLAGS 16352b15cb3dSCy Schubert LDFLAGS="$LDFLAGS $3" 16362b15cb3dSCy Schubert echo "$lt_simple_link_test_code" > conftest.$ac_ext 16372b15cb3dSCy Schubert if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 16382b15cb3dSCy Schubert # The linker can only warn and ignore the option if not recognized 16392b15cb3dSCy Schubert # So say no if there are warnings 16402b15cb3dSCy Schubert if test -s conftest.err; then 16412b15cb3dSCy Schubert # Append any errors to the config.log. 16422b15cb3dSCy Schubert cat conftest.err 1>&AS_MESSAGE_LOG_FD 16432b15cb3dSCy Schubert $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 16442b15cb3dSCy Schubert $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16452b15cb3dSCy Schubert if diff conftest.exp conftest.er2 >/dev/null; then 16462b15cb3dSCy Schubert $2=yes 16472b15cb3dSCy Schubert fi 16482b15cb3dSCy Schubert else 16492b15cb3dSCy Schubert $2=yes 16502b15cb3dSCy Schubert fi 16512b15cb3dSCy Schubert fi 16522b15cb3dSCy Schubert $RM -r conftest* 1653*f0574f5cSXin LI LDFLAGS=$save_LDFLAGS 16542b15cb3dSCy Schubert]) 16552b15cb3dSCy Schubert 1656*f0574f5cSXin LIif test yes = "[$]$2"; then 16572b15cb3dSCy Schubert m4_if([$4], , :, [$4]) 16582b15cb3dSCy Schubertelse 16592b15cb3dSCy Schubert m4_if([$5], , :, [$5]) 16602b15cb3dSCy Schubertfi 16612b15cb3dSCy Schubert])# _LT_LINKER_OPTION 16622b15cb3dSCy Schubert 16632b15cb3dSCy Schubert# Old name: 16642b15cb3dSCy SchubertAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16652b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 16662b15cb3dSCy Schubertdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 16672b15cb3dSCy Schubert 16682b15cb3dSCy Schubert 16692b15cb3dSCy Schubert# LT_CMD_MAX_LEN 16702b15cb3dSCy Schubert#--------------- 16712b15cb3dSCy SchubertAC_DEFUN([LT_CMD_MAX_LEN], 16722b15cb3dSCy Schubert[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16732b15cb3dSCy Schubert# find the maximum length of command line arguments 16742b15cb3dSCy SchubertAC_MSG_CHECKING([the maximum length of command line arguments]) 16752b15cb3dSCy SchubertAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16762b15cb3dSCy Schubert i=0 1677*f0574f5cSXin LI teststring=ABCD 16782b15cb3dSCy Schubert 16792b15cb3dSCy Schubert case $build_os in 16802b15cb3dSCy Schubert msdosdjgpp*) 16812b15cb3dSCy Schubert # On DJGPP, this test can blow up pretty badly due to problems in libc 16822b15cb3dSCy Schubert # (any single argument exceeding 2000 bytes causes a buffer overrun 16832b15cb3dSCy Schubert # during glob expansion). Even if it were fixed, the result of this 16842b15cb3dSCy Schubert # check would be larger than it should be. 16852b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=12288; # 12K is about right 16862b15cb3dSCy Schubert ;; 16872b15cb3dSCy Schubert 16882b15cb3dSCy Schubert gnu*) 16892b15cb3dSCy Schubert # Under GNU Hurd, this test is not required because there is 16902b15cb3dSCy Schubert # no limit to the length of command line arguments. 16912b15cb3dSCy Schubert # Libtool will interpret -1 as no limit whatsoever 16922b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=-1; 16932b15cb3dSCy Schubert ;; 16942b15cb3dSCy Schubert 16952b15cb3dSCy Schubert cygwin* | mingw* | cegcc*) 16962b15cb3dSCy Schubert # On Win9x/ME, this test blows up -- it succeeds, but takes 16972b15cb3dSCy Schubert # about 5 minutes as the teststring grows exponentially. 16982b15cb3dSCy Schubert # Worse, since 9x/ME are not pre-emptively multitasking, 16992b15cb3dSCy Schubert # you end up with a "frozen" computer, even though with patience 17002b15cb3dSCy Schubert # the test eventually succeeds (with a max line length of 256k). 17012b15cb3dSCy Schubert # Instead, let's just punt: use the minimum linelength reported by 17022b15cb3dSCy Schubert # all of the supported platforms: 8192 (on NT/2K/XP). 17032b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=8192; 17042b15cb3dSCy Schubert ;; 17052b15cb3dSCy Schubert 17062b15cb3dSCy Schubert mint*) 17072b15cb3dSCy Schubert # On MiNT this can take a long time and run out of memory. 17082b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=8192; 17092b15cb3dSCy Schubert ;; 17102b15cb3dSCy Schubert 17112b15cb3dSCy Schubert amigaos*) 17122b15cb3dSCy Schubert # On AmigaOS with pdksh, this test takes hours, literally. 17132b15cb3dSCy Schubert # So we just punt and use a minimum line length of 8192. 17142b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=8192; 17152b15cb3dSCy Schubert ;; 17162b15cb3dSCy Schubert 1717*f0574f5cSXin LI bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 17182b15cb3dSCy Schubert # This has been around since 386BSD, at least. Likely further. 17192b15cb3dSCy Schubert if test -x /sbin/sysctl; then 17202b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 17212b15cb3dSCy Schubert elif test -x /usr/sbin/sysctl; then 17222b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 17232b15cb3dSCy Schubert else 17242b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 17252b15cb3dSCy Schubert fi 17262b15cb3dSCy Schubert # And add a safety zone 17272b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17282b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17292b15cb3dSCy Schubert ;; 17302b15cb3dSCy Schubert 17312b15cb3dSCy Schubert interix*) 17322b15cb3dSCy Schubert # We know the value 262144 and hardcode it with a safety zone (like BSD) 17332b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=196608 17342b15cb3dSCy Schubert ;; 17352b15cb3dSCy Schubert 1736*f0574f5cSXin LI os2*) 1737*f0574f5cSXin LI # The test takes a long time on OS/2. 1738*f0574f5cSXin LI lt_cv_sys_max_cmd_len=8192 1739*f0574f5cSXin LI ;; 1740*f0574f5cSXin LI 17412b15cb3dSCy Schubert osf*) 17422b15cb3dSCy Schubert # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 17432b15cb3dSCy Schubert # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 17442b15cb3dSCy Schubert # nice to cause kernel panics so lets avoid the loop below. 17452b15cb3dSCy Schubert # First set a reasonable default. 17462b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=16384 17472b15cb3dSCy Schubert # 17482b15cb3dSCy Schubert if test -x /sbin/sysconfig; then 17492b15cb3dSCy Schubert case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17502b15cb3dSCy Schubert *1*) lt_cv_sys_max_cmd_len=-1 ;; 17512b15cb3dSCy Schubert esac 17522b15cb3dSCy Schubert fi 17532b15cb3dSCy Schubert ;; 17542b15cb3dSCy Schubert sco3.2v5*) 17552b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=102400 17562b15cb3dSCy Schubert ;; 17572b15cb3dSCy Schubert sysv5* | sco5v6* | sysv4.2uw2*) 17582b15cb3dSCy Schubert kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17592b15cb3dSCy Schubert if test -n "$kargmax"; then 17602b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 17612b15cb3dSCy Schubert else 17622b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=32768 17632b15cb3dSCy Schubert fi 17642b15cb3dSCy Schubert ;; 17652b15cb3dSCy Schubert *) 17662b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1767*f0574f5cSXin LI if test -n "$lt_cv_sys_max_cmd_len" && \ 1768*f0574f5cSXin LI test undefined != "$lt_cv_sys_max_cmd_len"; then 17692b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17702b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17712b15cb3dSCy Schubert else 17722b15cb3dSCy Schubert # Make teststring a little bigger before we do anything with it. 17732b15cb3dSCy Schubert # a 1K string should be a reasonable start. 17742b15cb3dSCy Schubert for i in 1 2 3 4 5 6 7 8; do 17752b15cb3dSCy Schubert teststring=$teststring$teststring 17762b15cb3dSCy Schubert done 17772b15cb3dSCy Schubert SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17782b15cb3dSCy Schubert # If test is not a shell built-in, we'll probably end up computing a 17792b15cb3dSCy Schubert # maximum length that is only half of the actual maximum length, but 17802b15cb3dSCy Schubert # we can't tell. 1781*f0574f5cSXin LI while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 17822b15cb3dSCy Schubert = "X$teststring$teststring"; } >/dev/null 2>&1 && 1783*f0574f5cSXin LI test 17 != "$i" # 1/2 MB should be enough 17842b15cb3dSCy Schubert do 17852b15cb3dSCy Schubert i=`expr $i + 1` 17862b15cb3dSCy Schubert teststring=$teststring$teststring 17872b15cb3dSCy Schubert done 17882b15cb3dSCy Schubert # Only check the string length outside the loop. 17892b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 17902b15cb3dSCy Schubert teststring= 17912b15cb3dSCy Schubert # Add a significant safety factor because C++ compilers can tack on 17922b15cb3dSCy Schubert # massive amounts of additional arguments before passing them to the 17932b15cb3dSCy Schubert # linker. It appears as though 1/2 is a usable value. 17942b15cb3dSCy Schubert lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 17952b15cb3dSCy Schubert fi 17962b15cb3dSCy Schubert ;; 17972b15cb3dSCy Schubert esac 17982b15cb3dSCy Schubert]) 1799*f0574f5cSXin LIif test -n "$lt_cv_sys_max_cmd_len"; then 18002b15cb3dSCy Schubert AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 18012b15cb3dSCy Schubertelse 18022b15cb3dSCy Schubert AC_MSG_RESULT(none) 18032b15cb3dSCy Schubertfi 18042b15cb3dSCy Schubertmax_cmd_len=$lt_cv_sys_max_cmd_len 18052b15cb3dSCy Schubert_LT_DECL([], [max_cmd_len], [0], 18062b15cb3dSCy Schubert [What is the maximum length of a command?]) 18072b15cb3dSCy Schubert])# LT_CMD_MAX_LEN 18082b15cb3dSCy Schubert 18092b15cb3dSCy Schubert# Old name: 18102b15cb3dSCy SchubertAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18112b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 18122b15cb3dSCy Schubertdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 18132b15cb3dSCy Schubert 18142b15cb3dSCy Schubert 18152b15cb3dSCy Schubert# _LT_HEADER_DLFCN 18162b15cb3dSCy Schubert# ---------------- 18172b15cb3dSCy Schubertm4_defun([_LT_HEADER_DLFCN], 18182b15cb3dSCy Schubert[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18192b15cb3dSCy Schubert])# _LT_HEADER_DLFCN 18202b15cb3dSCy Schubert 18212b15cb3dSCy Schubert 18222b15cb3dSCy Schubert# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18232b15cb3dSCy Schubert# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18242b15cb3dSCy Schubert# ---------------------------------------------------------------- 18252b15cb3dSCy Schubertm4_defun([_LT_TRY_DLOPEN_SELF], 18262b15cb3dSCy Schubert[m4_require([_LT_HEADER_DLFCN])dnl 1827*f0574f5cSXin LIif test yes = "$cross_compiling"; then : 18282b15cb3dSCy Schubert [$4] 18292b15cb3dSCy Schubertelse 18302b15cb3dSCy Schubert lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 18312b15cb3dSCy Schubert lt_status=$lt_dlunknown 18322b15cb3dSCy Schubert cat > conftest.$ac_ext <<_LT_EOF 18332b15cb3dSCy Schubert[#line $LINENO "configure" 18342b15cb3dSCy Schubert#include "confdefs.h" 18352b15cb3dSCy Schubert 18362b15cb3dSCy Schubert#if HAVE_DLFCN_H 18372b15cb3dSCy Schubert#include <dlfcn.h> 18382b15cb3dSCy Schubert#endif 18392b15cb3dSCy Schubert 18402b15cb3dSCy Schubert#include <stdio.h> 18412b15cb3dSCy Schubert 18422b15cb3dSCy Schubert#ifdef RTLD_GLOBAL 18432b15cb3dSCy Schubert# define LT_DLGLOBAL RTLD_GLOBAL 18442b15cb3dSCy Schubert#else 18452b15cb3dSCy Schubert# ifdef DL_GLOBAL 18462b15cb3dSCy Schubert# define LT_DLGLOBAL DL_GLOBAL 18472b15cb3dSCy Schubert# else 18482b15cb3dSCy Schubert# define LT_DLGLOBAL 0 18492b15cb3dSCy Schubert# endif 18502b15cb3dSCy Schubert#endif 18512b15cb3dSCy Schubert 18522b15cb3dSCy Schubert/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18532b15cb3dSCy Schubert find out it does not work in some platform. */ 18542b15cb3dSCy Schubert#ifndef LT_DLLAZY_OR_NOW 18552b15cb3dSCy Schubert# ifdef RTLD_LAZY 18562b15cb3dSCy Schubert# define LT_DLLAZY_OR_NOW RTLD_LAZY 18572b15cb3dSCy Schubert# else 18582b15cb3dSCy Schubert# ifdef DL_LAZY 18592b15cb3dSCy Schubert# define LT_DLLAZY_OR_NOW DL_LAZY 18602b15cb3dSCy Schubert# else 18612b15cb3dSCy Schubert# ifdef RTLD_NOW 18622b15cb3dSCy Schubert# define LT_DLLAZY_OR_NOW RTLD_NOW 18632b15cb3dSCy Schubert# else 18642b15cb3dSCy Schubert# ifdef DL_NOW 18652b15cb3dSCy Schubert# define LT_DLLAZY_OR_NOW DL_NOW 18662b15cb3dSCy Schubert# else 18672b15cb3dSCy Schubert# define LT_DLLAZY_OR_NOW 0 18682b15cb3dSCy Schubert# endif 18692b15cb3dSCy Schubert# endif 18702b15cb3dSCy Schubert# endif 18712b15cb3dSCy Schubert# endif 18722b15cb3dSCy Schubert#endif 18732b15cb3dSCy Schubert 1874*f0574f5cSXin LI/* When -fvisibility=hidden is used, assume the code has been annotated 18752b15cb3dSCy Schubert correspondingly for the symbols needed. */ 1876*f0574f5cSXin LI#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18772b15cb3dSCy Schubertint fnord () __attribute__((visibility("default"))); 18782b15cb3dSCy Schubert#endif 18792b15cb3dSCy Schubert 18802b15cb3dSCy Schubertint fnord () { return 42; } 18812b15cb3dSCy Schubertint main () 18822b15cb3dSCy Schubert{ 18832b15cb3dSCy Schubert void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18842b15cb3dSCy Schubert int status = $lt_dlunknown; 18852b15cb3dSCy Schubert 18862b15cb3dSCy Schubert if (self) 18872b15cb3dSCy Schubert { 18882b15cb3dSCy Schubert if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 18892b15cb3dSCy Schubert else 18902b15cb3dSCy Schubert { 18912b15cb3dSCy Schubert if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 18922b15cb3dSCy Schubert else puts (dlerror ()); 18932b15cb3dSCy Schubert } 18942b15cb3dSCy Schubert /* dlclose (self); */ 18952b15cb3dSCy Schubert } 18962b15cb3dSCy Schubert else 18972b15cb3dSCy Schubert puts (dlerror ()); 18982b15cb3dSCy Schubert 18992b15cb3dSCy Schubert return status; 19002b15cb3dSCy Schubert}] 19012b15cb3dSCy Schubert_LT_EOF 1902*f0574f5cSXin LI if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 19032b15cb3dSCy Schubert (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 19042b15cb3dSCy Schubert lt_status=$? 19052b15cb3dSCy Schubert case x$lt_status in 19062b15cb3dSCy Schubert x$lt_dlno_uscore) $1 ;; 19072b15cb3dSCy Schubert x$lt_dlneed_uscore) $2 ;; 19082b15cb3dSCy Schubert x$lt_dlunknown|x*) $3 ;; 19092b15cb3dSCy Schubert esac 19102b15cb3dSCy Schubert else : 19112b15cb3dSCy Schubert # compilation failed 19122b15cb3dSCy Schubert $3 19132b15cb3dSCy Schubert fi 19142b15cb3dSCy Schubertfi 19152b15cb3dSCy Schubertrm -fr conftest* 19162b15cb3dSCy Schubert])# _LT_TRY_DLOPEN_SELF 19172b15cb3dSCy Schubert 19182b15cb3dSCy Schubert 19192b15cb3dSCy Schubert# LT_SYS_DLOPEN_SELF 19202b15cb3dSCy Schubert# ------------------ 19212b15cb3dSCy SchubertAC_DEFUN([LT_SYS_DLOPEN_SELF], 19222b15cb3dSCy Schubert[m4_require([_LT_HEADER_DLFCN])dnl 1923*f0574f5cSXin LIif test yes != "$enable_dlopen"; then 19242b15cb3dSCy Schubert enable_dlopen=unknown 19252b15cb3dSCy Schubert enable_dlopen_self=unknown 19262b15cb3dSCy Schubert enable_dlopen_self_static=unknown 19272b15cb3dSCy Schubertelse 19282b15cb3dSCy Schubert lt_cv_dlopen=no 19292b15cb3dSCy Schubert lt_cv_dlopen_libs= 19302b15cb3dSCy Schubert 19312b15cb3dSCy Schubert case $host_os in 19322b15cb3dSCy Schubert beos*) 1933*f0574f5cSXin LI lt_cv_dlopen=load_add_on 19342b15cb3dSCy Schubert lt_cv_dlopen_libs= 19352b15cb3dSCy Schubert lt_cv_dlopen_self=yes 19362b15cb3dSCy Schubert ;; 19372b15cb3dSCy Schubert 19382b15cb3dSCy Schubert mingw* | pw32* | cegcc*) 1939*f0574f5cSXin LI lt_cv_dlopen=LoadLibrary 19402b15cb3dSCy Schubert lt_cv_dlopen_libs= 19412b15cb3dSCy Schubert ;; 19422b15cb3dSCy Schubert 19432b15cb3dSCy Schubert cygwin*) 1944*f0574f5cSXin LI lt_cv_dlopen=dlopen 19452b15cb3dSCy Schubert lt_cv_dlopen_libs= 19462b15cb3dSCy Schubert ;; 19472b15cb3dSCy Schubert 19482b15cb3dSCy Schubert darwin*) 19492b15cb3dSCy Schubert # if libdl is installed we need to link against it 19502b15cb3dSCy Schubert AC_CHECK_LIB([dl], [dlopen], 1951*f0574f5cSXin LI [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1952*f0574f5cSXin LI lt_cv_dlopen=dyld 19532b15cb3dSCy Schubert lt_cv_dlopen_libs= 19542b15cb3dSCy Schubert lt_cv_dlopen_self=yes 19552b15cb3dSCy Schubert ]) 19562b15cb3dSCy Schubert ;; 19572b15cb3dSCy Schubert 1958*f0574f5cSXin LI tpf*) 1959*f0574f5cSXin LI # Don't try to run any link tests for TPF. We know it's impossible 1960*f0574f5cSXin LI # because TPF is a cross-compiler, and we know how we open DSOs. 1961*f0574f5cSXin LI lt_cv_dlopen=dlopen 1962*f0574f5cSXin LI lt_cv_dlopen_libs= 1963*f0574f5cSXin LI lt_cv_dlopen_self=no 1964*f0574f5cSXin LI ;; 1965*f0574f5cSXin LI 19662b15cb3dSCy Schubert *) 19672b15cb3dSCy Schubert AC_CHECK_FUNC([shl_load], 1968*f0574f5cSXin LI [lt_cv_dlopen=shl_load], 19692b15cb3dSCy Schubert [AC_CHECK_LIB([dld], [shl_load], 1970*f0574f5cSXin LI [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 19712b15cb3dSCy Schubert [AC_CHECK_FUNC([dlopen], 1972*f0574f5cSXin LI [lt_cv_dlopen=dlopen], 19732b15cb3dSCy Schubert [AC_CHECK_LIB([dl], [dlopen], 1974*f0574f5cSXin LI [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 19752b15cb3dSCy Schubert [AC_CHECK_LIB([svld], [dlopen], 1976*f0574f5cSXin LI [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 19772b15cb3dSCy Schubert [AC_CHECK_LIB([dld], [dld_link], 1978*f0574f5cSXin LI [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 19792b15cb3dSCy Schubert ]) 19802b15cb3dSCy Schubert ]) 19812b15cb3dSCy Schubert ]) 19822b15cb3dSCy Schubert ]) 19832b15cb3dSCy Schubert ]) 19842b15cb3dSCy Schubert ;; 19852b15cb3dSCy Schubert esac 19862b15cb3dSCy Schubert 1987*f0574f5cSXin LI if test no = "$lt_cv_dlopen"; then 19882b15cb3dSCy Schubert enable_dlopen=no 1989*f0574f5cSXin LI else 1990*f0574f5cSXin LI enable_dlopen=yes 19912b15cb3dSCy Schubert fi 19922b15cb3dSCy Schubert 19932b15cb3dSCy Schubert case $lt_cv_dlopen in 19942b15cb3dSCy Schubert dlopen) 1995*f0574f5cSXin LI save_CPPFLAGS=$CPPFLAGS 1996*f0574f5cSXin LI test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 19972b15cb3dSCy Schubert 1998*f0574f5cSXin LI save_LDFLAGS=$LDFLAGS 19992b15cb3dSCy Schubert wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 20002b15cb3dSCy Schubert 2001*f0574f5cSXin LI save_LIBS=$LIBS 20022b15cb3dSCy Schubert LIBS="$lt_cv_dlopen_libs $LIBS" 20032b15cb3dSCy Schubert 20042b15cb3dSCy Schubert AC_CACHE_CHECK([whether a program can dlopen itself], 20052b15cb3dSCy Schubert lt_cv_dlopen_self, [dnl 20062b15cb3dSCy Schubert _LT_TRY_DLOPEN_SELF( 20072b15cb3dSCy Schubert lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 20082b15cb3dSCy Schubert lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20092b15cb3dSCy Schubert ]) 20102b15cb3dSCy Schubert 2011*f0574f5cSXin LI if test yes = "$lt_cv_dlopen_self"; then 20122b15cb3dSCy Schubert wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 20132b15cb3dSCy Schubert AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20142b15cb3dSCy Schubert lt_cv_dlopen_self_static, [dnl 20152b15cb3dSCy Schubert _LT_TRY_DLOPEN_SELF( 20162b15cb3dSCy Schubert lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 20172b15cb3dSCy Schubert lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 20182b15cb3dSCy Schubert ]) 20192b15cb3dSCy Schubert fi 20202b15cb3dSCy Schubert 2021*f0574f5cSXin LI CPPFLAGS=$save_CPPFLAGS 2022*f0574f5cSXin LI LDFLAGS=$save_LDFLAGS 2023*f0574f5cSXin LI LIBS=$save_LIBS 20242b15cb3dSCy Schubert ;; 20252b15cb3dSCy Schubert esac 20262b15cb3dSCy Schubert 20272b15cb3dSCy Schubert case $lt_cv_dlopen_self in 20282b15cb3dSCy Schubert yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 20292b15cb3dSCy Schubert *) enable_dlopen_self=unknown ;; 20302b15cb3dSCy Schubert esac 20312b15cb3dSCy Schubert 20322b15cb3dSCy Schubert case $lt_cv_dlopen_self_static in 20332b15cb3dSCy Schubert yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 20342b15cb3dSCy Schubert *) enable_dlopen_self_static=unknown ;; 20352b15cb3dSCy Schubert esac 20362b15cb3dSCy Schubertfi 20372b15cb3dSCy Schubert_LT_DECL([dlopen_support], [enable_dlopen], [0], 20382b15cb3dSCy Schubert [Whether dlopen is supported]) 20392b15cb3dSCy Schubert_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20402b15cb3dSCy Schubert [Whether dlopen of programs is supported]) 20412b15cb3dSCy Schubert_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20422b15cb3dSCy Schubert [Whether dlopen of statically linked programs is supported]) 20432b15cb3dSCy Schubert])# LT_SYS_DLOPEN_SELF 20442b15cb3dSCy Schubert 20452b15cb3dSCy Schubert# Old name: 20462b15cb3dSCy SchubertAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20472b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 20482b15cb3dSCy Schubertdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 20492b15cb3dSCy Schubert 20502b15cb3dSCy Schubert 20512b15cb3dSCy Schubert# _LT_COMPILER_C_O([TAGNAME]) 20522b15cb3dSCy Schubert# --------------------------- 20532b15cb3dSCy Schubert# Check to see if options -c and -o are simultaneously supported by compiler. 20542b15cb3dSCy Schubert# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20552b15cb3dSCy Schubertm4_defun([_LT_COMPILER_C_O], 20562b15cb3dSCy Schubert[m4_require([_LT_DECL_SED])dnl 20572b15cb3dSCy Schubertm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20582b15cb3dSCy Schubertm4_require([_LT_TAG_COMPILER])dnl 20592b15cb3dSCy SchubertAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20602b15cb3dSCy Schubert [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20612b15cb3dSCy Schubert [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20622b15cb3dSCy Schubert $RM -r conftest 2>/dev/null 20632b15cb3dSCy Schubert mkdir conftest 20642b15cb3dSCy Schubert cd conftest 20652b15cb3dSCy Schubert mkdir out 20662b15cb3dSCy Schubert echo "$lt_simple_compile_test_code" > conftest.$ac_ext 20672b15cb3dSCy Schubert 20682b15cb3dSCy Schubert lt_compiler_flag="-o out/conftest2.$ac_objext" 20692b15cb3dSCy Schubert # Insert the option either (1) after the last *FLAGS variable, or 20702b15cb3dSCy Schubert # (2) before a word containing "conftest.", or (3) at the end. 20712b15cb3dSCy Schubert # Note that $ac_compile itself does not contain backslashes and begins 20722b15cb3dSCy Schubert # with a dollar sign (not a hyphen), so the echo should work correctly. 20732b15cb3dSCy Schubert lt_compile=`echo "$ac_compile" | $SED \ 20742b15cb3dSCy Schubert -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20752b15cb3dSCy Schubert -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20762b15cb3dSCy Schubert -e 's:$: $lt_compiler_flag:'` 20772b15cb3dSCy Schubert (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20782b15cb3dSCy Schubert (eval "$lt_compile" 2>out/conftest.err) 20792b15cb3dSCy Schubert ac_status=$? 20802b15cb3dSCy Schubert cat out/conftest.err >&AS_MESSAGE_LOG_FD 20812b15cb3dSCy Schubert echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20822b15cb3dSCy Schubert if (exit $ac_status) && test -s out/conftest2.$ac_objext 20832b15cb3dSCy Schubert then 20842b15cb3dSCy Schubert # The compiler can only warn and ignore the option if not recognized 20852b15cb3dSCy Schubert # So say no if there are warnings 20862b15cb3dSCy Schubert $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 20872b15cb3dSCy Schubert $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 20882b15cb3dSCy Schubert if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 20892b15cb3dSCy Schubert _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 20902b15cb3dSCy Schubert fi 20912b15cb3dSCy Schubert fi 20922b15cb3dSCy Schubert chmod u+w . 2>&AS_MESSAGE_LOG_FD 20932b15cb3dSCy Schubert $RM conftest* 20942b15cb3dSCy Schubert # SGI C++ compiler will create directory out/ii_files/ for 20952b15cb3dSCy Schubert # template instantiation 20962b15cb3dSCy Schubert test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 20972b15cb3dSCy Schubert $RM out/* && rmdir out 20982b15cb3dSCy Schubert cd .. 20992b15cb3dSCy Schubert $RM -r conftest 21002b15cb3dSCy Schubert $RM conftest* 21012b15cb3dSCy Schubert]) 21022b15cb3dSCy Schubert_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21032b15cb3dSCy Schubert [Does compiler simultaneously support -c and -o options?]) 21042b15cb3dSCy Schubert])# _LT_COMPILER_C_O 21052b15cb3dSCy Schubert 21062b15cb3dSCy Schubert 21072b15cb3dSCy Schubert# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21082b15cb3dSCy Schubert# ---------------------------------- 21092b15cb3dSCy Schubert# Check to see if we can do hard links to lock some files if needed 21102b15cb3dSCy Schubertm4_defun([_LT_COMPILER_FILE_LOCKS], 21112b15cb3dSCy Schubert[m4_require([_LT_ENABLE_LOCK])dnl 21122b15cb3dSCy Schubertm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21132b15cb3dSCy Schubert_LT_COMPILER_C_O([$1]) 21142b15cb3dSCy Schubert 2115*f0574f5cSXin LIhard_links=nottested 2116*f0574f5cSXin LIif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 21172b15cb3dSCy Schubert # do not overwrite the value of need_locks provided by the user 21182b15cb3dSCy Schubert AC_MSG_CHECKING([if we can lock with hard links]) 21192b15cb3dSCy Schubert hard_links=yes 21202b15cb3dSCy Schubert $RM conftest* 21212b15cb3dSCy Schubert ln conftest.a conftest.b 2>/dev/null && hard_links=no 21222b15cb3dSCy Schubert touch conftest.a 21232b15cb3dSCy Schubert ln conftest.a conftest.b 2>&5 || hard_links=no 21242b15cb3dSCy Schubert ln conftest.a conftest.b 2>/dev/null && hard_links=no 21252b15cb3dSCy Schubert AC_MSG_RESULT([$hard_links]) 2126*f0574f5cSXin LI if test no = "$hard_links"; then 2127*f0574f5cSXin LI AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 21282b15cb3dSCy Schubert need_locks=warn 21292b15cb3dSCy Schubert fi 21302b15cb3dSCy Schubertelse 21312b15cb3dSCy Schubert need_locks=no 21322b15cb3dSCy Schubertfi 21332b15cb3dSCy Schubert_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21342b15cb3dSCy Schubert])# _LT_COMPILER_FILE_LOCKS 21352b15cb3dSCy Schubert 21362b15cb3dSCy Schubert 21372b15cb3dSCy Schubert# _LT_CHECK_OBJDIR 21382b15cb3dSCy Schubert# ---------------- 21392b15cb3dSCy Schubertm4_defun([_LT_CHECK_OBJDIR], 21402b15cb3dSCy Schubert[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 21412b15cb3dSCy Schubert[rm -f .libs 2>/dev/null 21422b15cb3dSCy Schubertmkdir .libs 2>/dev/null 21432b15cb3dSCy Schubertif test -d .libs; then 21442b15cb3dSCy Schubert lt_cv_objdir=.libs 21452b15cb3dSCy Schubertelse 21462b15cb3dSCy Schubert # MS-DOS does not allow filenames that begin with a dot. 21472b15cb3dSCy Schubert lt_cv_objdir=_libs 21482b15cb3dSCy Schubertfi 21492b15cb3dSCy Schubertrmdir .libs 2>/dev/null]) 21502b15cb3dSCy Schubertobjdir=$lt_cv_objdir 21512b15cb3dSCy Schubert_LT_DECL([], [objdir], [0], 21522b15cb3dSCy Schubert [The name of the directory that contains temporary libtool files])dnl 21532b15cb3dSCy Schubertm4_pattern_allow([LT_OBJDIR])dnl 2154*f0574f5cSXin LIAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2155*f0574f5cSXin LI [Define to the sub-directory where libtool stores uninstalled libraries.]) 21562b15cb3dSCy Schubert])# _LT_CHECK_OBJDIR 21572b15cb3dSCy Schubert 21582b15cb3dSCy Schubert 21592b15cb3dSCy Schubert# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21602b15cb3dSCy Schubert# -------------------------------------- 21612b15cb3dSCy Schubert# Check hardcoding attributes. 21622b15cb3dSCy Schubertm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21632b15cb3dSCy Schubert[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21642b15cb3dSCy Schubert_LT_TAGVAR(hardcode_action, $1)= 21652b15cb3dSCy Schubertif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21662b15cb3dSCy Schubert test -n "$_LT_TAGVAR(runpath_var, $1)" || 2167*f0574f5cSXin LI test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 21682b15cb3dSCy Schubert 21692b15cb3dSCy Schubert # We can hardcode non-existent directories. 2170*f0574f5cSXin LI if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 21712b15cb3dSCy Schubert # If the only mechanism to avoid hardcoding is shlibpath_var, we 21722b15cb3dSCy Schubert # have to relink, otherwise we might link with an installed library 21732b15cb3dSCy Schubert # when we should be linking with a yet-to-be-installed one 2174*f0574f5cSXin LI ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2175*f0574f5cSXin LI test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 21762b15cb3dSCy Schubert # Linking always hardcodes the temporary library directory. 21772b15cb3dSCy Schubert _LT_TAGVAR(hardcode_action, $1)=relink 21782b15cb3dSCy Schubert else 21792b15cb3dSCy Schubert # We can link without hardcoding, and we can hardcode nonexisting dirs. 21802b15cb3dSCy Schubert _LT_TAGVAR(hardcode_action, $1)=immediate 21812b15cb3dSCy Schubert fi 21822b15cb3dSCy Schubertelse 21832b15cb3dSCy Schubert # We cannot hardcode anything, or else we can only hardcode existing 21842b15cb3dSCy Schubert # directories. 21852b15cb3dSCy Schubert _LT_TAGVAR(hardcode_action, $1)=unsupported 21862b15cb3dSCy Schubertfi 21872b15cb3dSCy SchubertAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 21882b15cb3dSCy Schubert 2189*f0574f5cSXin LIif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2190*f0574f5cSXin LI test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 21912b15cb3dSCy Schubert # Fast installation is not supported 21922b15cb3dSCy Schubert enable_fast_install=no 2193*f0574f5cSXin LIelif test yes = "$shlibpath_overrides_runpath" || 2194*f0574f5cSXin LI test no = "$enable_shared"; then 21952b15cb3dSCy Schubert # Fast installation is not necessary 21962b15cb3dSCy Schubert enable_fast_install=needless 21972b15cb3dSCy Schubertfi 21982b15cb3dSCy Schubert_LT_TAGDECL([], [hardcode_action], [0], 21992b15cb3dSCy Schubert [How to hardcode a shared library path into an executable]) 22002b15cb3dSCy Schubert])# _LT_LINKER_HARDCODE_LIBPATH 22012b15cb3dSCy Schubert 22022b15cb3dSCy Schubert 22032b15cb3dSCy Schubert# _LT_CMD_STRIPLIB 22042b15cb3dSCy Schubert# ---------------- 22052b15cb3dSCy Schubertm4_defun([_LT_CMD_STRIPLIB], 22062b15cb3dSCy Schubert[m4_require([_LT_DECL_EGREP]) 22072b15cb3dSCy Schubertstriplib= 22082b15cb3dSCy Schubertold_striplib= 22092b15cb3dSCy SchubertAC_MSG_CHECKING([whether stripping libraries is possible]) 22102b15cb3dSCy Schubertif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 22112b15cb3dSCy Schubert test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 22122b15cb3dSCy Schubert test -z "$striplib" && striplib="$STRIP --strip-unneeded" 22132b15cb3dSCy Schubert AC_MSG_RESULT([yes]) 22142b15cb3dSCy Schubertelse 22152b15cb3dSCy Schubert# FIXME - insert some real tests, host_os isn't really good enough 22162b15cb3dSCy Schubert case $host_os in 22172b15cb3dSCy Schubert darwin*) 22182b15cb3dSCy Schubert if test -n "$STRIP"; then 22192b15cb3dSCy Schubert striplib="$STRIP -x" 22202b15cb3dSCy Schubert old_striplib="$STRIP -S" 22212b15cb3dSCy Schubert AC_MSG_RESULT([yes]) 22222b15cb3dSCy Schubert else 22232b15cb3dSCy Schubert AC_MSG_RESULT([no]) 22242b15cb3dSCy Schubert fi 22252b15cb3dSCy Schubert ;; 22262b15cb3dSCy Schubert *) 22272b15cb3dSCy Schubert AC_MSG_RESULT([no]) 22282b15cb3dSCy Schubert ;; 22292b15cb3dSCy Schubert esac 22302b15cb3dSCy Schubertfi 22312b15cb3dSCy Schubert_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22322b15cb3dSCy Schubert_LT_DECL([], [striplib], [1]) 22332b15cb3dSCy Schubert])# _LT_CMD_STRIPLIB 22342b15cb3dSCy Schubert 22352b15cb3dSCy Schubert 2236*f0574f5cSXin LI# _LT_PREPARE_MUNGE_PATH_LIST 2237*f0574f5cSXin LI# --------------------------- 2238*f0574f5cSXin LI# Make sure func_munge_path_list() is defined correctly. 2239*f0574f5cSXin LIm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2240*f0574f5cSXin LI[[# func_munge_path_list VARIABLE PATH 2241*f0574f5cSXin LI# ----------------------------------- 2242*f0574f5cSXin LI# VARIABLE is name of variable containing _space_ separated list of 2243*f0574f5cSXin LI# directories to be munged by the contents of PATH, which is string 2244*f0574f5cSXin LI# having a format: 2245*f0574f5cSXin LI# "DIR[:DIR]:" 2246*f0574f5cSXin LI# string "DIR[ DIR]" will be prepended to VARIABLE 2247*f0574f5cSXin LI# ":DIR[:DIR]" 2248*f0574f5cSXin LI# string "DIR[ DIR]" will be appended to VARIABLE 2249*f0574f5cSXin LI# "DIRP[:DIRP]::[DIRA:]DIRA" 2250*f0574f5cSXin LI# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2251*f0574f5cSXin LI# "DIRA[ DIRA]" will be appended to VARIABLE 2252*f0574f5cSXin LI# "DIR[:DIR]" 2253*f0574f5cSXin LI# VARIABLE will be replaced by "DIR[ DIR]" 2254*f0574f5cSXin LIfunc_munge_path_list () 2255*f0574f5cSXin LI{ 2256*f0574f5cSXin LI case x@S|@2 in 2257*f0574f5cSXin LI x) 2258*f0574f5cSXin LI ;; 2259*f0574f5cSXin LI *:) 2260*f0574f5cSXin LI eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2261*f0574f5cSXin LI ;; 2262*f0574f5cSXin LI x:*) 2263*f0574f5cSXin LI eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2264*f0574f5cSXin LI ;; 2265*f0574f5cSXin LI *::*) 2266*f0574f5cSXin LI eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2267*f0574f5cSXin LI eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2268*f0574f5cSXin LI ;; 2269*f0574f5cSXin LI *) 2270*f0574f5cSXin LI eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2271*f0574f5cSXin LI ;; 2272*f0574f5cSXin LI esac 2273*f0574f5cSXin LI} 2274*f0574f5cSXin LI]])# _LT_PREPARE_PATH_LIST 2275*f0574f5cSXin LI 2276*f0574f5cSXin LI 22772b15cb3dSCy Schubert# _LT_SYS_DYNAMIC_LINKER([TAG]) 22782b15cb3dSCy Schubert# ----------------------------- 22792b15cb3dSCy Schubert# PORTME Fill in your ld.so characteristics 22802b15cb3dSCy Schubertm4_defun([_LT_SYS_DYNAMIC_LINKER], 22812b15cb3dSCy Schubert[AC_REQUIRE([AC_CANONICAL_HOST])dnl 22822b15cb3dSCy Schubertm4_require([_LT_DECL_EGREP])dnl 22832b15cb3dSCy Schubertm4_require([_LT_FILEUTILS_DEFAULTS])dnl 22842b15cb3dSCy Schubertm4_require([_LT_DECL_OBJDUMP])dnl 22852b15cb3dSCy Schubertm4_require([_LT_DECL_SED])dnl 22862b15cb3dSCy Schubertm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2287*f0574f5cSXin LIm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 22882b15cb3dSCy SchubertAC_MSG_CHECKING([dynamic linker characteristics]) 22892b15cb3dSCy Schubertm4_if([$1], 22902b15cb3dSCy Schubert [], [ 2291*f0574f5cSXin LIif test yes = "$GCC"; then 22922b15cb3dSCy Schubert case $host_os in 2293*f0574f5cSXin LI darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2294*f0574f5cSXin LI *) lt_awk_arg='/^libraries:/' ;; 22952b15cb3dSCy Schubert esac 22962b15cb3dSCy Schubert case $host_os in 2297*f0574f5cSXin LI mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2298*f0574f5cSXin LI *) lt_sed_strip_eq='s|=/|/|g' ;; 22992b15cb3dSCy Schubert esac 23002b15cb3dSCy Schubert lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23012b15cb3dSCy Schubert case $lt_search_path_spec in 23022b15cb3dSCy Schubert *\;*) 23032b15cb3dSCy Schubert # if the path contains ";" then we assume it to be the separator 23042b15cb3dSCy Schubert # otherwise default to the standard path separator (i.e. ":") - it is 23052b15cb3dSCy Schubert # assumed that no part of a normal pathname contains ";" but that should 23062b15cb3dSCy Schubert # okay in the real world where ";" in dirpaths is itself problematic. 23072b15cb3dSCy Schubert lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23082b15cb3dSCy Schubert ;; 23092b15cb3dSCy Schubert *) 23102b15cb3dSCy Schubert lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23112b15cb3dSCy Schubert ;; 23122b15cb3dSCy Schubert esac 23132b15cb3dSCy Schubert # Ok, now we have the path, separated by spaces, we can step through it 2314*f0574f5cSXin LI # and add multilib dir if necessary... 23152b15cb3dSCy Schubert lt_tmp_lt_search_path_spec= 2316*f0574f5cSXin LI lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2317*f0574f5cSXin LI # ...but if some path component already ends with the multilib dir we assume 2318*f0574f5cSXin LI # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2319*f0574f5cSXin LI case "$lt_multi_os_dir; $lt_search_path_spec " in 2320*f0574f5cSXin LI "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2321*f0574f5cSXin LI lt_multi_os_dir= 2322*f0574f5cSXin LI ;; 2323*f0574f5cSXin LI esac 23242b15cb3dSCy Schubert for lt_sys_path in $lt_search_path_spec; do 2325*f0574f5cSXin LI if test -d "$lt_sys_path$lt_multi_os_dir"; then 2326*f0574f5cSXin LI lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2327*f0574f5cSXin LI elif test -n "$lt_multi_os_dir"; then 23282b15cb3dSCy Schubert test -d "$lt_sys_path" && \ 23292b15cb3dSCy Schubert lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23302b15cb3dSCy Schubert fi 23312b15cb3dSCy Schubert done 23322b15cb3dSCy Schubert lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 23332b15cb3dSCy SchubertBEGIN {RS = " "; FS = "/|\n";} { 23342b15cb3dSCy Schubert lt_foo = ""; 23352b15cb3dSCy Schubert lt_count = 0; 23362b15cb3dSCy Schubert for (lt_i = NF; lt_i > 0; lt_i--) { 23372b15cb3dSCy Schubert if ($lt_i != "" && $lt_i != ".") { 23382b15cb3dSCy Schubert if ($lt_i == "..") { 23392b15cb3dSCy Schubert lt_count++; 23402b15cb3dSCy Schubert } else { 23412b15cb3dSCy Schubert if (lt_count == 0) { 23422b15cb3dSCy Schubert lt_foo = "/" $lt_i lt_foo; 23432b15cb3dSCy Schubert } else { 23442b15cb3dSCy Schubert lt_count--; 23452b15cb3dSCy Schubert } 23462b15cb3dSCy Schubert } 23472b15cb3dSCy Schubert } 23482b15cb3dSCy Schubert } 23492b15cb3dSCy Schubert if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23502b15cb3dSCy Schubert if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23512b15cb3dSCy Schubert}'` 23522b15cb3dSCy Schubert # AWK program above erroneously prepends '/' to C:/dos/paths 23532b15cb3dSCy Schubert # for these hosts. 23542b15cb3dSCy Schubert case $host_os in 23552b15cb3dSCy Schubert mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2356*f0574f5cSXin LI $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 23572b15cb3dSCy Schubert esac 23582b15cb3dSCy Schubert sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23592b15cb3dSCy Schubertelse 23602b15cb3dSCy Schubert sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 23612b15cb3dSCy Schubertfi]) 23622b15cb3dSCy Schubertlibrary_names_spec= 23632b15cb3dSCy Schubertlibname_spec='lib$name' 23642b15cb3dSCy Schubertsoname_spec= 2365*f0574f5cSXin LIshrext_cmds=.so 23662b15cb3dSCy Schubertpostinstall_cmds= 23672b15cb3dSCy Schubertpostuninstall_cmds= 23682b15cb3dSCy Schubertfinish_cmds= 23692b15cb3dSCy Schubertfinish_eval= 23702b15cb3dSCy Schubertshlibpath_var= 23712b15cb3dSCy Schubertshlibpath_overrides_runpath=unknown 23722b15cb3dSCy Schubertversion_type=none 23732b15cb3dSCy Schubertdynamic_linker="$host_os ld.so" 23742b15cb3dSCy Schubertsys_lib_dlsearch_path_spec="/lib /usr/lib" 23752b15cb3dSCy Schubertneed_lib_prefix=unknown 23762b15cb3dSCy Schuberthardcode_into_libs=no 23772b15cb3dSCy Schubert 23782b15cb3dSCy Schubert# when you set need_version to no, make sure it does not cause -set_version 23792b15cb3dSCy Schubert# flags to be left without arguments 23802b15cb3dSCy Schubertneed_version=unknown 23812b15cb3dSCy Schubert 2382*f0574f5cSXin LIAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2383*f0574f5cSXin LI[User-defined run-time library search path.]) 2384*f0574f5cSXin LI 23852b15cb3dSCy Schubertcase $host_os in 23862b15cb3dSCy Schubertaix3*) 2387*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 2388*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 23892b15cb3dSCy Schubert shlibpath_var=LIBPATH 23902b15cb3dSCy Schubert 23912b15cb3dSCy Schubert # AIX 3 has no versioning support, so we append a major version to the name. 2392*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 23932b15cb3dSCy Schubert ;; 23942b15cb3dSCy Schubert 23952b15cb3dSCy Schubertaix[[4-9]]*) 2396*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 23972b15cb3dSCy Schubert need_lib_prefix=no 23982b15cb3dSCy Schubert need_version=no 23992b15cb3dSCy Schubert hardcode_into_libs=yes 2400*f0574f5cSXin LI if test ia64 = "$host_cpu"; then 24012b15cb3dSCy Schubert # AIX 5 supports IA64 2402*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 24032b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 24042b15cb3dSCy Schubert else 24052b15cb3dSCy Schubert # With GCC up to 2.95.x, collect2 would create an import file 24062b15cb3dSCy Schubert # for dependence libraries. The import file would start with 2407*f0574f5cSXin LI # the line '#! .'. This would cause the generated library to 2408*f0574f5cSXin LI # depend on '.', always an invalid library. This was fixed in 24092b15cb3dSCy Schubert # development snapshots of GCC prior to 3.0. 24102b15cb3dSCy Schubert case $host_os in 24112b15cb3dSCy Schubert aix4 | aix4.[[01]] | aix4.[[01]].*) 24122b15cb3dSCy Schubert if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 24132b15cb3dSCy Schubert echo ' yes ' 2414*f0574f5cSXin LI echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 24152b15cb3dSCy Schubert : 24162b15cb3dSCy Schubert else 24172b15cb3dSCy Schubert can_build_shared=no 24182b15cb3dSCy Schubert fi 24192b15cb3dSCy Schubert ;; 24202b15cb3dSCy Schubert esac 2421*f0574f5cSXin LI # Using Import Files as archive members, it is possible to support 2422*f0574f5cSXin LI # filename-based versioning of shared library archives on AIX. While 2423*f0574f5cSXin LI # this would work for both with and without runtime linking, it will 2424*f0574f5cSXin LI # prevent static linking of such archives. So we do filename-based 2425*f0574f5cSXin LI # shared library versioning with .so extension only, which is used 2426*f0574f5cSXin LI # when both runtime linking and shared linking is enabled. 2427*f0574f5cSXin LI # Unfortunately, runtime linking may impact performance, so we do 2428*f0574f5cSXin LI # not want this to be the default eventually. Also, we use the 2429*f0574f5cSXin LI # versioned .so libs for executables only if there is the -brtl 2430*f0574f5cSXin LI # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2431*f0574f5cSXin LI # To allow for filename-based versioning support, we need to create 2432*f0574f5cSXin LI # libNAME.so.V as an archive file, containing: 2433*f0574f5cSXin LI # *) an Import File, referring to the versioned filename of the 2434*f0574f5cSXin LI # archive as well as the shared archive member, telling the 2435*f0574f5cSXin LI # bitwidth (32 or 64) of that shared object, and providing the 2436*f0574f5cSXin LI # list of exported symbols of that shared object, eventually 2437*f0574f5cSXin LI # decorated with the 'weak' keyword 2438*f0574f5cSXin LI # *) the shared object with the F_LOADONLY flag set, to really avoid 2439*f0574f5cSXin LI # it being seen by the linker. 2440*f0574f5cSXin LI # At run time we better use the real file rather than another symlink, 2441*f0574f5cSXin LI # but for link time we create the symlink libNAME.so -> libNAME.so.V 2442*f0574f5cSXin LI 2443*f0574f5cSXin LI case $with_aix_soname,$aix_use_runtimelinking in 24442b15cb3dSCy Schubert # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 24452b15cb3dSCy Schubert # soname into executable. Probably we can add versioning support to 24462b15cb3dSCy Schubert # collect2, so additional links can be useful in future. 2447*f0574f5cSXin LI aix,yes) # traditional libtool 2448*f0574f5cSXin LI dynamic_linker='AIX unversionable lib.so' 24492b15cb3dSCy Schubert # If using run time linking (on AIX 4.2 or later) use lib<name>.so 24502b15cb3dSCy Schubert # instead of lib<name>.a to let people know that these are not 24512b15cb3dSCy Schubert # typical AIX shared libraries. 2452*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2453*f0574f5cSXin LI ;; 2454*f0574f5cSXin LI aix,no) # traditional AIX only 2455*f0574f5cSXin LI dynamic_linker='AIX lib.a[(]lib.so.V[)]' 24562b15cb3dSCy Schubert # We preserve .a as extension for shared libraries through AIX4.2 24572b15cb3dSCy Schubert # and later when we are not doing run time linking. 2458*f0574f5cSXin LI library_names_spec='$libname$release.a $libname.a' 2459*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 2460*f0574f5cSXin LI ;; 2461*f0574f5cSXin LI svr4,*) # full svr4 only 2462*f0574f5cSXin LI dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2463*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2464*f0574f5cSXin LI # We do not specify a path in Import Files, so LIBPATH fires. 2465*f0574f5cSXin LI shlibpath_overrides_runpath=yes 2466*f0574f5cSXin LI ;; 2467*f0574f5cSXin LI *,yes) # both, prefer svr4 2468*f0574f5cSXin LI dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2469*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2470*f0574f5cSXin LI # unpreferred sharedlib libNAME.a needs extra handling 2471*f0574f5cSXin LI 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"' 2472*f0574f5cSXin LI 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"' 2473*f0574f5cSXin LI # We do not specify a path in Import Files, so LIBPATH fires. 2474*f0574f5cSXin LI shlibpath_overrides_runpath=yes 2475*f0574f5cSXin LI ;; 2476*f0574f5cSXin LI *,no) # both, prefer aix 2477*f0574f5cSXin LI dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2478*f0574f5cSXin LI library_names_spec='$libname$release.a $libname.a' 2479*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 2480*f0574f5cSXin LI # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2481*f0574f5cSXin LI 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)' 2482*f0574f5cSXin LI 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"' 2483*f0574f5cSXin LI ;; 2484*f0574f5cSXin LI esac 24852b15cb3dSCy Schubert shlibpath_var=LIBPATH 24862b15cb3dSCy Schubert fi 24872b15cb3dSCy Schubert ;; 24882b15cb3dSCy Schubert 24892b15cb3dSCy Schubertamigaos*) 24902b15cb3dSCy Schubert case $host_cpu in 24912b15cb3dSCy Schubert powerpc) 24922b15cb3dSCy Schubert # Since July 2007 AmigaOS4 officially supports .so libraries. 24932b15cb3dSCy Schubert # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2494*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 24952b15cb3dSCy Schubert ;; 24962b15cb3dSCy Schubert m68k) 24972b15cb3dSCy Schubert library_names_spec='$libname.ixlibrary $libname.a' 24982b15cb3dSCy Schubert # Create ${libname}_ixlibrary.a entries in /sys/libs. 2499*f0574f5cSXin LI 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' 25002b15cb3dSCy Schubert ;; 25012b15cb3dSCy Schubert esac 25022b15cb3dSCy Schubert ;; 25032b15cb3dSCy Schubert 25042b15cb3dSCy Schubertbeos*) 2505*f0574f5cSXin LI library_names_spec='$libname$shared_ext' 25062b15cb3dSCy Schubert dynamic_linker="$host_os ld.so" 25072b15cb3dSCy Schubert shlibpath_var=LIBRARY_PATH 25082b15cb3dSCy Schubert ;; 25092b15cb3dSCy Schubert 25102b15cb3dSCy Schubertbsdi[[45]]*) 2511*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 25122b15cb3dSCy Schubert need_version=no 2513*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2514*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 25152b15cb3dSCy Schubert finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 25162b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 25172b15cb3dSCy Schubert sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 25182b15cb3dSCy Schubert sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 25192b15cb3dSCy Schubert # the default ld.so.conf also contains /usr/contrib/lib and 25202b15cb3dSCy Schubert # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 25212b15cb3dSCy Schubert # libtool to hard-code these into programs 25222b15cb3dSCy Schubert ;; 25232b15cb3dSCy Schubert 25242b15cb3dSCy Schubertcygwin* | mingw* | pw32* | cegcc*) 25252b15cb3dSCy Schubert version_type=windows 2526*f0574f5cSXin LI shrext_cmds=.dll 25272b15cb3dSCy Schubert need_version=no 25282b15cb3dSCy Schubert need_lib_prefix=no 25292b15cb3dSCy Schubert 25302b15cb3dSCy Schubert case $GCC,$cc_basename in 25312b15cb3dSCy Schubert yes,*) 25322b15cb3dSCy Schubert # gcc 25332b15cb3dSCy Schubert library_names_spec='$libname.dll.a' 25342b15cb3dSCy Schubert # DLL is installed to $(libdir)/../bin by postinstall_cmds 2535*f0574f5cSXin LI postinstall_cmds='base_file=`basename \$file`~ 2536*f0574f5cSXin LI dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25372b15cb3dSCy Schubert dldir=$destdir/`dirname \$dlpath`~ 25382b15cb3dSCy Schubert test -d \$dldir || mkdir -p \$dldir~ 25392b15cb3dSCy Schubert $install_prog $dir/$dlname \$dldir/$dlname~ 25402b15cb3dSCy Schubert chmod a+x \$dldir/$dlname~ 25412b15cb3dSCy Schubert if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25422b15cb3dSCy Schubert eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25432b15cb3dSCy Schubert fi' 25442b15cb3dSCy Schubert postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 25452b15cb3dSCy Schubert dlpath=$dir/\$dldll~ 25462b15cb3dSCy Schubert $RM \$dlpath' 25472b15cb3dSCy Schubert shlibpath_overrides_runpath=yes 25482b15cb3dSCy Schubert 25492b15cb3dSCy Schubert case $host_os in 25502b15cb3dSCy Schubert cygwin*) 25512b15cb3dSCy Schubert # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2552*f0574f5cSXin LI soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25532b15cb3dSCy Schubertm4_if([$1], [],[ 25542b15cb3dSCy Schubert sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 25552b15cb3dSCy Schubert ;; 25562b15cb3dSCy Schubert mingw* | cegcc*) 25572b15cb3dSCy Schubert # MinGW DLLs use traditional 'lib' prefix 2558*f0574f5cSXin LI soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25592b15cb3dSCy Schubert ;; 25602b15cb3dSCy Schubert pw32*) 25612b15cb3dSCy Schubert # pw32 DLLs use 'pw' prefix rather than 'lib' 2562*f0574f5cSXin LI library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25632b15cb3dSCy Schubert ;; 25642b15cb3dSCy Schubert esac 25652b15cb3dSCy Schubert dynamic_linker='Win32 ld.exe' 25662b15cb3dSCy Schubert ;; 25672b15cb3dSCy Schubert 25682b15cb3dSCy Schubert *,cl*) 25692b15cb3dSCy Schubert # Native MSVC 25702b15cb3dSCy Schubert libname_spec='$name' 2571*f0574f5cSXin LI soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2572*f0574f5cSXin LI library_names_spec='$libname.dll.lib' 25732b15cb3dSCy Schubert 25742b15cb3dSCy Schubert case $build_os in 25752b15cb3dSCy Schubert mingw*) 25762b15cb3dSCy Schubert sys_lib_search_path_spec= 25772b15cb3dSCy Schubert lt_save_ifs=$IFS 25782b15cb3dSCy Schubert IFS=';' 25792b15cb3dSCy Schubert for lt_path in $LIB 25802b15cb3dSCy Schubert do 25812b15cb3dSCy Schubert IFS=$lt_save_ifs 25822b15cb3dSCy Schubert # Let DOS variable expansion print the short 8.3 style file name. 25832b15cb3dSCy Schubert lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 25842b15cb3dSCy Schubert sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 25852b15cb3dSCy Schubert done 25862b15cb3dSCy Schubert IFS=$lt_save_ifs 25872b15cb3dSCy Schubert # Convert to MSYS style. 25882b15cb3dSCy Schubert sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 25892b15cb3dSCy Schubert ;; 25902b15cb3dSCy Schubert cygwin*) 25912b15cb3dSCy Schubert # Convert to unix form, then to dos form, then back to unix form 25922b15cb3dSCy Schubert # but this time dos style (no spaces!) so that the unix form looks 25932b15cb3dSCy Schubert # like /cygdrive/c/PROGRA~1:/cygdr... 25942b15cb3dSCy Schubert sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 25952b15cb3dSCy Schubert sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 25962b15cb3dSCy Schubert sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 25972b15cb3dSCy Schubert ;; 25982b15cb3dSCy Schubert *) 2599*f0574f5cSXin LI sys_lib_search_path_spec=$LIB 26002b15cb3dSCy Schubert if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 26012b15cb3dSCy Schubert # It is most probably a Windows format PATH. 26022b15cb3dSCy Schubert sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26032b15cb3dSCy Schubert else 26042b15cb3dSCy Schubert sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26052b15cb3dSCy Schubert fi 26062b15cb3dSCy Schubert # FIXME: find the short name or the path components, as spaces are 26072b15cb3dSCy Schubert # common. (e.g. "Program Files" -> "PROGRA~1") 26082b15cb3dSCy Schubert ;; 26092b15cb3dSCy Schubert esac 26102b15cb3dSCy Schubert 26112b15cb3dSCy Schubert # DLL is installed to $(libdir)/../bin by postinstall_cmds 2612*f0574f5cSXin LI postinstall_cmds='base_file=`basename \$file`~ 2613*f0574f5cSXin LI dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 26142b15cb3dSCy Schubert dldir=$destdir/`dirname \$dlpath`~ 26152b15cb3dSCy Schubert test -d \$dldir || mkdir -p \$dldir~ 26162b15cb3dSCy Schubert $install_prog $dir/$dlname \$dldir/$dlname' 26172b15cb3dSCy Schubert postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26182b15cb3dSCy Schubert dlpath=$dir/\$dldll~ 26192b15cb3dSCy Schubert $RM \$dlpath' 26202b15cb3dSCy Schubert shlibpath_overrides_runpath=yes 26212b15cb3dSCy Schubert dynamic_linker='Win32 link.exe' 26222b15cb3dSCy Schubert ;; 26232b15cb3dSCy Schubert 26242b15cb3dSCy Schubert *) 26252b15cb3dSCy Schubert # Assume MSVC wrapper 2626*f0574f5cSXin LI library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 26272b15cb3dSCy Schubert dynamic_linker='Win32 ld.exe' 26282b15cb3dSCy Schubert ;; 26292b15cb3dSCy Schubert esac 26302b15cb3dSCy Schubert # FIXME: first we should search . and the directory the executable is in 26312b15cb3dSCy Schubert shlibpath_var=PATH 26322b15cb3dSCy Schubert ;; 26332b15cb3dSCy Schubert 26342b15cb3dSCy Schubertdarwin* | rhapsody*) 26352b15cb3dSCy Schubert dynamic_linker="$host_os dyld" 26362b15cb3dSCy Schubert version_type=darwin 26372b15cb3dSCy Schubert need_lib_prefix=no 26382b15cb3dSCy Schubert need_version=no 2639*f0574f5cSXin LI library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2640*f0574f5cSXin LI soname_spec='$libname$release$major$shared_ext' 26412b15cb3dSCy Schubert shlibpath_overrides_runpath=yes 26422b15cb3dSCy Schubert shlibpath_var=DYLD_LIBRARY_PATH 26432b15cb3dSCy Schubert shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 26442b15cb3dSCy Schubertm4_if([$1], [],[ 26452b15cb3dSCy Schubert sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 26462b15cb3dSCy Schubert sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 26472b15cb3dSCy Schubert ;; 26482b15cb3dSCy Schubert 26492b15cb3dSCy Schubertdgux*) 2650*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 26512b15cb3dSCy Schubert need_lib_prefix=no 26522b15cb3dSCy Schubert need_version=no 2653*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2654*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 26552b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 26562b15cb3dSCy Schubert ;; 26572b15cb3dSCy Schubert 26582b15cb3dSCy Schubertfreebsd* | dragonfly*) 26592b15cb3dSCy Schubert # DragonFly does not have aout. When/if they implement a new 26602b15cb3dSCy Schubert # versioning mechanism, adjust this. 26612b15cb3dSCy Schubert if test -x /usr/bin/objformat; then 26622b15cb3dSCy Schubert objformat=`/usr/bin/objformat` 26632b15cb3dSCy Schubert else 26642b15cb3dSCy Schubert case $host_os in 2665*f0574f5cSXin LI freebsd[[23]].*) objformat=aout ;; 26662b15cb3dSCy Schubert *) objformat=elf ;; 26672b15cb3dSCy Schubert esac 26682b15cb3dSCy Schubert fi 26692b15cb3dSCy Schubert version_type=freebsd-$objformat 26702b15cb3dSCy Schubert case $version_type in 26712b15cb3dSCy Schubert freebsd-elf*) 2672*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2673*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 26742b15cb3dSCy Schubert need_version=no 26752b15cb3dSCy Schubert need_lib_prefix=no 26762b15cb3dSCy Schubert ;; 26772b15cb3dSCy Schubert freebsd-*) 2678*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 26792b15cb3dSCy Schubert need_version=yes 26802b15cb3dSCy Schubert ;; 26812b15cb3dSCy Schubert esac 26822b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 26832b15cb3dSCy Schubert case $host_os in 2684*f0574f5cSXin LI freebsd2.*) 26852b15cb3dSCy Schubert shlibpath_overrides_runpath=yes 26862b15cb3dSCy Schubert ;; 26872b15cb3dSCy Schubert freebsd3.[[01]]* | freebsdelf3.[[01]]*) 26882b15cb3dSCy Schubert shlibpath_overrides_runpath=yes 26892b15cb3dSCy Schubert hardcode_into_libs=yes 26902b15cb3dSCy Schubert ;; 26912b15cb3dSCy Schubert freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 26922b15cb3dSCy Schubert freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 26932b15cb3dSCy Schubert shlibpath_overrides_runpath=no 26942b15cb3dSCy Schubert hardcode_into_libs=yes 26952b15cb3dSCy Schubert ;; 26962b15cb3dSCy Schubert *) # from 4.6 on, and DragonFly 26972b15cb3dSCy Schubert shlibpath_overrides_runpath=yes 26982b15cb3dSCy Schubert hardcode_into_libs=yes 26992b15cb3dSCy Schubert ;; 27002b15cb3dSCy Schubert esac 27012b15cb3dSCy Schubert ;; 27022b15cb3dSCy Schubert 27032b15cb3dSCy Schuberthaiku*) 2704*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 27052b15cb3dSCy Schubert need_lib_prefix=no 27062b15cb3dSCy Schubert need_version=no 27072b15cb3dSCy Schubert dynamic_linker="$host_os runtime_loader" 2708*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2709*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 27102b15cb3dSCy Schubert shlibpath_var=LIBRARY_PATH 2711*f0574f5cSXin LI shlibpath_overrides_runpath=no 27122b15cb3dSCy Schubert sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 27132b15cb3dSCy Schubert hardcode_into_libs=yes 27142b15cb3dSCy Schubert ;; 27152b15cb3dSCy Schubert 27162b15cb3dSCy Schuberthpux9* | hpux10* | hpux11*) 27172b15cb3dSCy Schubert # Give a soname corresponding to the major version so that dld.sl refuses to 27182b15cb3dSCy Schubert # link against other versions. 27192b15cb3dSCy Schubert version_type=sunos 27202b15cb3dSCy Schubert need_lib_prefix=no 27212b15cb3dSCy Schubert need_version=no 27222b15cb3dSCy Schubert case $host_cpu in 27232b15cb3dSCy Schubert ia64*) 27242b15cb3dSCy Schubert shrext_cmds='.so' 27252b15cb3dSCy Schubert hardcode_into_libs=yes 27262b15cb3dSCy Schubert dynamic_linker="$host_os dld.so" 27272b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 27282b15cb3dSCy Schubert shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2729*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2730*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 2731*f0574f5cSXin LI if test 32 = "$HPUX_IA64_MODE"; then 27322b15cb3dSCy Schubert sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2733*f0574f5cSXin LI sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27342b15cb3dSCy Schubert else 27352b15cb3dSCy Schubert sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2736*f0574f5cSXin LI sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27372b15cb3dSCy Schubert fi 27382b15cb3dSCy Schubert ;; 27392b15cb3dSCy Schubert hppa*64*) 27402b15cb3dSCy Schubert shrext_cmds='.sl' 27412b15cb3dSCy Schubert hardcode_into_libs=yes 27422b15cb3dSCy Schubert dynamic_linker="$host_os dld.sl" 27432b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27442b15cb3dSCy Schubert shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2745*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2746*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 27472b15cb3dSCy Schubert sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 27482b15cb3dSCy Schubert sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27492b15cb3dSCy Schubert ;; 27502b15cb3dSCy Schubert *) 27512b15cb3dSCy Schubert shrext_cmds='.sl' 27522b15cb3dSCy Schubert dynamic_linker="$host_os dld.sl" 27532b15cb3dSCy Schubert shlibpath_var=SHLIB_PATH 27542b15cb3dSCy Schubert shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2755*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2756*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 27572b15cb3dSCy Schubert ;; 27582b15cb3dSCy Schubert esac 27592b15cb3dSCy Schubert # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 27602b15cb3dSCy Schubert postinstall_cmds='chmod 555 $lib' 27612b15cb3dSCy Schubert # or fails outright, so override atomically: 27622b15cb3dSCy Schubert install_override_mode=555 27632b15cb3dSCy Schubert ;; 27642b15cb3dSCy Schubert 27652b15cb3dSCy Schubertinterix[[3-9]]*) 2766*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 27672b15cb3dSCy Schubert need_lib_prefix=no 27682b15cb3dSCy Schubert need_version=no 2769*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2770*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 27712b15cb3dSCy Schubert dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 27722b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 27732b15cb3dSCy Schubert shlibpath_overrides_runpath=no 27742b15cb3dSCy Schubert hardcode_into_libs=yes 27752b15cb3dSCy Schubert ;; 27762b15cb3dSCy Schubert 27772b15cb3dSCy Schubertirix5* | irix6* | nonstopux*) 27782b15cb3dSCy Schubert case $host_os in 27792b15cb3dSCy Schubert nonstopux*) version_type=nonstopux ;; 27802b15cb3dSCy Schubert *) 2781*f0574f5cSXin LI if test yes = "$lt_cv_prog_gnu_ld"; then 2782*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 27832b15cb3dSCy Schubert else 27842b15cb3dSCy Schubert version_type=irix 27852b15cb3dSCy Schubert fi ;; 27862b15cb3dSCy Schubert esac 27872b15cb3dSCy Schubert need_lib_prefix=no 27882b15cb3dSCy Schubert need_version=no 2789*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 2790*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 27912b15cb3dSCy Schubert case $host_os in 27922b15cb3dSCy Schubert irix5* | nonstopux*) 27932b15cb3dSCy Schubert libsuff= shlibsuff= 27942b15cb3dSCy Schubert ;; 27952b15cb3dSCy Schubert *) 27962b15cb3dSCy Schubert case $LD in # libtool.m4 will add one of these switches to LD 27972b15cb3dSCy Schubert *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 27982b15cb3dSCy Schubert libsuff= shlibsuff= libmagic=32-bit;; 27992b15cb3dSCy Schubert *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28002b15cb3dSCy Schubert libsuff=32 shlibsuff=N32 libmagic=N32;; 28012b15cb3dSCy Schubert *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28022b15cb3dSCy Schubert libsuff=64 shlibsuff=64 libmagic=64-bit;; 28032b15cb3dSCy Schubert *) libsuff= shlibsuff= libmagic=never-match;; 28042b15cb3dSCy Schubert esac 28052b15cb3dSCy Schubert ;; 28062b15cb3dSCy Schubert esac 28072b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28082b15cb3dSCy Schubert shlibpath_overrides_runpath=no 2809*f0574f5cSXin LI sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2810*f0574f5cSXin LI sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28112b15cb3dSCy Schubert hardcode_into_libs=yes 28122b15cb3dSCy Schubert ;; 28132b15cb3dSCy Schubert 28142b15cb3dSCy Schubert# No shared lib support for Linux oldld, aout, or coff. 28152b15cb3dSCy Schubertlinux*oldld* | linux*aout* | linux*coff*) 28162b15cb3dSCy Schubert dynamic_linker=no 28172b15cb3dSCy Schubert ;; 28182b15cb3dSCy Schubert 2819*f0574f5cSXin LIlinux*android*) 2820*f0574f5cSXin LI version_type=none # Android doesn't support versioned libraries. 28212b15cb3dSCy Schubert need_lib_prefix=no 28222b15cb3dSCy Schubert need_version=no 2823*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext' 2824*f0574f5cSXin LI soname_spec='$libname$release$shared_ext' 2825*f0574f5cSXin LI finish_cmds= 2826*f0574f5cSXin LI shlibpath_var=LD_LIBRARY_PATH 2827*f0574f5cSXin LI shlibpath_overrides_runpath=yes 2828*f0574f5cSXin LI 2829*f0574f5cSXin LI # This implies no fast_install, which is unacceptable. 2830*f0574f5cSXin LI # Some rework will be needed to allow for fast_install 2831*f0574f5cSXin LI # before this can be enabled. 2832*f0574f5cSXin LI hardcode_into_libs=yes 2833*f0574f5cSXin LI 2834*f0574f5cSXin LI dynamic_linker='Android linker' 2835*f0574f5cSXin LI # Don't embed -rpath directories since the linker doesn't support them. 2836*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2837*f0574f5cSXin LI ;; 2838*f0574f5cSXin LI 2839*f0574f5cSXin LI# This must be glibc/ELF. 2840*f0574f5cSXin LIlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2841*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 2842*f0574f5cSXin LI need_lib_prefix=no 2843*f0574f5cSXin LI need_version=no 2844*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2845*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 28462b15cb3dSCy Schubert finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 28472b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 28482b15cb3dSCy Schubert shlibpath_overrides_runpath=no 28492b15cb3dSCy Schubert 28502b15cb3dSCy Schubert # Some binutils ld are patched to set DT_RUNPATH 28512b15cb3dSCy Schubert AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 28522b15cb3dSCy Schubert [lt_cv_shlibpath_overrides_runpath=no 28532b15cb3dSCy Schubert save_LDFLAGS=$LDFLAGS 28542b15cb3dSCy Schubert save_libdir=$libdir 28552b15cb3dSCy Schubert eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 28562b15cb3dSCy Schubert LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 28572b15cb3dSCy Schubert AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 28582b15cb3dSCy Schubert [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 28592b15cb3dSCy Schubert [lt_cv_shlibpath_overrides_runpath=yes])]) 28602b15cb3dSCy Schubert LDFLAGS=$save_LDFLAGS 28612b15cb3dSCy Schubert libdir=$save_libdir 28622b15cb3dSCy Schubert ]) 28632b15cb3dSCy Schubert shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 28642b15cb3dSCy Schubert 28652b15cb3dSCy Schubert # This implies no fast_install, which is unacceptable. 28662b15cb3dSCy Schubert # Some rework will be needed to allow for fast_install 28672b15cb3dSCy Schubert # before this can be enabled. 28682b15cb3dSCy Schubert hardcode_into_libs=yes 28692b15cb3dSCy Schubert 2870*f0574f5cSXin LI # Ideally, we could use ldconfig to report *all* directores which are 2871*f0574f5cSXin LI # searched for libraries, however this is still not possible. Aside from not 2872*f0574f5cSXin LI # being certain /sbin/ldconfig is available, command 2873*f0574f5cSXin LI # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2874*f0574f5cSXin LI # even though it is searched at run-time. Try to do the best guess by 2875*f0574f5cSXin LI # appending ld.so.conf contents (and includes) to the search path. 28762b15cb3dSCy Schubert if test -f /etc/ld.so.conf; then 28772b15cb3dSCy Schubert 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' ' '` 28782b15cb3dSCy Schubert sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 28792b15cb3dSCy Schubert fi 28802b15cb3dSCy Schubert 28812b15cb3dSCy Schubert # We used to test for /lib/ld.so.1 and disable shared libraries on 28822b15cb3dSCy Schubert # powerpc, because MkLinux only supported shared libraries with the 28832b15cb3dSCy Schubert # GNU dynamic linker. Since this was broken with cross compilers, 28842b15cb3dSCy Schubert # most powerpc-linux boxes support dynamic linking these days and 28852b15cb3dSCy Schubert # people can always --disable-shared, the test was removed, and we 28862b15cb3dSCy Schubert # assume the GNU/Linux dynamic linker is in use. 28872b15cb3dSCy Schubert dynamic_linker='GNU/Linux ld.so' 28882b15cb3dSCy Schubert ;; 28892b15cb3dSCy Schubert 28902b15cb3dSCy Schubertnetbsd*) 28912b15cb3dSCy Schubert version_type=sunos 28922b15cb3dSCy Schubert need_lib_prefix=no 28932b15cb3dSCy Schubert need_version=no 28942b15cb3dSCy Schubert if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2895*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 28962b15cb3dSCy Schubert finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 28972b15cb3dSCy Schubert dynamic_linker='NetBSD (a.out) ld.so' 28982b15cb3dSCy Schubert else 2899*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2900*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 29012b15cb3dSCy Schubert dynamic_linker='NetBSD ld.elf_so' 29022b15cb3dSCy Schubert fi 29032b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 29042b15cb3dSCy Schubert shlibpath_overrides_runpath=yes 29052b15cb3dSCy Schubert hardcode_into_libs=yes 29062b15cb3dSCy Schubert ;; 29072b15cb3dSCy Schubert 29082b15cb3dSCy Schubertnewsos6) 2909*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 2910*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29112b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 29122b15cb3dSCy Schubert shlibpath_overrides_runpath=yes 29132b15cb3dSCy Schubert ;; 29142b15cb3dSCy Schubert 29152b15cb3dSCy Schubert*nto* | *qnx*) 29162b15cb3dSCy Schubert version_type=qnx 29172b15cb3dSCy Schubert need_lib_prefix=no 29182b15cb3dSCy Schubert need_version=no 2919*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2920*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 29212b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 29222b15cb3dSCy Schubert shlibpath_overrides_runpath=no 29232b15cb3dSCy Schubert hardcode_into_libs=yes 29242b15cb3dSCy Schubert dynamic_linker='ldqnx.so' 29252b15cb3dSCy Schubert ;; 29262b15cb3dSCy Schubert 2927*f0574f5cSXin LIopenbsd* | bitrig*) 29282b15cb3dSCy Schubert version_type=sunos 2929*f0574f5cSXin LI sys_lib_dlsearch_path_spec=/usr/lib 29302b15cb3dSCy Schubert need_lib_prefix=no 2931*f0574f5cSXin LI if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2932*f0574f5cSXin LI need_version=no 2933*f0574f5cSXin LI else 2934*f0574f5cSXin LI need_version=yes 2935*f0574f5cSXin LI fi 2936*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29372b15cb3dSCy Schubert finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29382b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 29392b15cb3dSCy Schubert shlibpath_overrides_runpath=yes 29402b15cb3dSCy Schubert ;; 29412b15cb3dSCy Schubert 29422b15cb3dSCy Schubertos2*) 29432b15cb3dSCy Schubert libname_spec='$name' 2944*f0574f5cSXin LI version_type=windows 2945*f0574f5cSXin LI shrext_cmds=.dll 2946*f0574f5cSXin LI need_version=no 29472b15cb3dSCy Schubert need_lib_prefix=no 2948*f0574f5cSXin LI # OS/2 can only load a DLL with a base name of 8 characters or less. 2949*f0574f5cSXin LI soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2950*f0574f5cSXin LI v=$($ECHO $release$versuffix | tr -d .-); 2951*f0574f5cSXin LI n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2952*f0574f5cSXin LI $ECHO $n$v`$shared_ext' 2953*f0574f5cSXin LI library_names_spec='${libname}_dll.$libext' 29542b15cb3dSCy Schubert dynamic_linker='OS/2 ld.exe' 2955*f0574f5cSXin LI shlibpath_var=BEGINLIBPATH 2956*f0574f5cSXin LI sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2957*f0574f5cSXin LI sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2958*f0574f5cSXin LI postinstall_cmds='base_file=`basename \$file`~ 2959*f0574f5cSXin LI dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2960*f0574f5cSXin LI dldir=$destdir/`dirname \$dlpath`~ 2961*f0574f5cSXin LI test -d \$dldir || mkdir -p \$dldir~ 2962*f0574f5cSXin LI $install_prog $dir/$dlname \$dldir/$dlname~ 2963*f0574f5cSXin LI chmod a+x \$dldir/$dlname~ 2964*f0574f5cSXin LI if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2965*f0574f5cSXin LI eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2966*f0574f5cSXin LI fi' 2967*f0574f5cSXin LI postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2968*f0574f5cSXin LI dlpath=$dir/\$dldll~ 2969*f0574f5cSXin LI $RM \$dlpath' 29702b15cb3dSCy Schubert ;; 29712b15cb3dSCy Schubert 29722b15cb3dSCy Schubertosf3* | osf4* | osf5*) 29732b15cb3dSCy Schubert version_type=osf 29742b15cb3dSCy Schubert need_lib_prefix=no 29752b15cb3dSCy Schubert need_version=no 2976*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 2977*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29782b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 29792b15cb3dSCy Schubert sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2980*f0574f5cSXin LI sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 29812b15cb3dSCy Schubert ;; 29822b15cb3dSCy Schubert 29832b15cb3dSCy Schubertrdos*) 29842b15cb3dSCy Schubert dynamic_linker=no 29852b15cb3dSCy Schubert ;; 29862b15cb3dSCy Schubert 29872b15cb3dSCy Schubertsolaris*) 2988*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 29892b15cb3dSCy Schubert need_lib_prefix=no 29902b15cb3dSCy Schubert need_version=no 2991*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2992*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 29932b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 29942b15cb3dSCy Schubert shlibpath_overrides_runpath=yes 29952b15cb3dSCy Schubert hardcode_into_libs=yes 29962b15cb3dSCy Schubert # ldd complains unless libraries are executable 29972b15cb3dSCy Schubert postinstall_cmds='chmod +x $lib' 29982b15cb3dSCy Schubert ;; 29992b15cb3dSCy Schubert 30002b15cb3dSCy Schubertsunos4*) 30012b15cb3dSCy Schubert version_type=sunos 3002*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30032b15cb3dSCy Schubert finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 30042b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 30052b15cb3dSCy Schubert shlibpath_overrides_runpath=yes 3006*f0574f5cSXin LI if test yes = "$with_gnu_ld"; then 30072b15cb3dSCy Schubert need_lib_prefix=no 30082b15cb3dSCy Schubert fi 30092b15cb3dSCy Schubert need_version=yes 30102b15cb3dSCy Schubert ;; 30112b15cb3dSCy Schubert 30122b15cb3dSCy Schubertsysv4 | sysv4.3*) 3013*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 3014*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3015*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 30162b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 30172b15cb3dSCy Schubert case $host_vendor in 30182b15cb3dSCy Schubert sni) 30192b15cb3dSCy Schubert shlibpath_overrides_runpath=no 30202b15cb3dSCy Schubert need_lib_prefix=no 30212b15cb3dSCy Schubert runpath_var=LD_RUN_PATH 30222b15cb3dSCy Schubert ;; 30232b15cb3dSCy Schubert siemens) 30242b15cb3dSCy Schubert need_lib_prefix=no 30252b15cb3dSCy Schubert ;; 30262b15cb3dSCy Schubert motorola) 30272b15cb3dSCy Schubert need_lib_prefix=no 30282b15cb3dSCy Schubert need_version=no 30292b15cb3dSCy Schubert shlibpath_overrides_runpath=no 30302b15cb3dSCy Schubert sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 30312b15cb3dSCy Schubert ;; 30322b15cb3dSCy Schubert esac 30332b15cb3dSCy Schubert ;; 30342b15cb3dSCy Schubert 30352b15cb3dSCy Schubertsysv4*MP*) 30362b15cb3dSCy Schubert if test -d /usr/nec; then 3037*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 3038*f0574f5cSXin LI library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3039*f0574f5cSXin LI soname_spec='$libname$shared_ext.$major' 30402b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 30412b15cb3dSCy Schubert fi 30422b15cb3dSCy Schubert ;; 30432b15cb3dSCy Schubert 30442b15cb3dSCy Schubertsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3045*f0574f5cSXin LI version_type=sco 30462b15cb3dSCy Schubert need_lib_prefix=no 30472b15cb3dSCy Schubert need_version=no 3048*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3049*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 30502b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 30512b15cb3dSCy Schubert shlibpath_overrides_runpath=yes 30522b15cb3dSCy Schubert hardcode_into_libs=yes 3053*f0574f5cSXin LI if test yes = "$with_gnu_ld"; then 30542b15cb3dSCy Schubert sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 30552b15cb3dSCy Schubert else 30562b15cb3dSCy Schubert sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 30572b15cb3dSCy Schubert case $host_os in 30582b15cb3dSCy Schubert sco3.2v5*) 30592b15cb3dSCy Schubert sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 30602b15cb3dSCy Schubert ;; 30612b15cb3dSCy Schubert esac 30622b15cb3dSCy Schubert fi 30632b15cb3dSCy Schubert sys_lib_dlsearch_path_spec='/usr/lib' 30642b15cb3dSCy Schubert ;; 30652b15cb3dSCy Schubert 30662b15cb3dSCy Schuberttpf*) 30672b15cb3dSCy Schubert # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3068*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 30692b15cb3dSCy Schubert need_lib_prefix=no 30702b15cb3dSCy Schubert need_version=no 3071*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30722b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 30732b15cb3dSCy Schubert shlibpath_overrides_runpath=no 30742b15cb3dSCy Schubert hardcode_into_libs=yes 30752b15cb3dSCy Schubert ;; 30762b15cb3dSCy Schubert 30772b15cb3dSCy Schubertuts4*) 3078*f0574f5cSXin LI version_type=linux # correct to gnu/linux during the next big refactor 3079*f0574f5cSXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3080*f0574f5cSXin LI soname_spec='$libname$release$shared_ext$major' 30812b15cb3dSCy Schubert shlibpath_var=LD_LIBRARY_PATH 30822b15cb3dSCy Schubert ;; 30832b15cb3dSCy Schubert 30842b15cb3dSCy Schubert*) 30852b15cb3dSCy Schubert dynamic_linker=no 30862b15cb3dSCy Schubert ;; 30872b15cb3dSCy Schubertesac 30882b15cb3dSCy SchubertAC_MSG_RESULT([$dynamic_linker]) 3089*f0574f5cSXin LItest no = "$dynamic_linker" && can_build_shared=no 30902b15cb3dSCy Schubert 30912b15cb3dSCy Schubertvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3092*f0574f5cSXin LIif test yes = "$GCC"; then 30932b15cb3dSCy Schubert variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 30942b15cb3dSCy Schubertfi 30952b15cb3dSCy Schubert 3096*f0574f5cSXin LIif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3097*f0574f5cSXin LI sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 30982b15cb3dSCy Schubertfi 3099*f0574f5cSXin LI 3100*f0574f5cSXin LIif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3101*f0574f5cSXin LI sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 31022b15cb3dSCy Schubertfi 31032b15cb3dSCy Schubert 3104*f0574f5cSXin LI# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3105*f0574f5cSXin LIconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3106*f0574f5cSXin LI 3107*f0574f5cSXin LI# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3108*f0574f5cSXin LIfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3109*f0574f5cSXin LI 3110*f0574f5cSXin LI# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3111*f0574f5cSXin LIconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3112*f0574f5cSXin LI 31132b15cb3dSCy Schubert_LT_DECL([], [variables_saved_for_relink], [1], 31142b15cb3dSCy Schubert [Variables whose values should be saved in libtool wrapper scripts and 31152b15cb3dSCy Schubert restored at link time]) 31162b15cb3dSCy Schubert_LT_DECL([], [need_lib_prefix], [0], 31172b15cb3dSCy Schubert [Do we need the "lib" prefix for modules?]) 31182b15cb3dSCy Schubert_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31192b15cb3dSCy Schubert_LT_DECL([], [version_type], [0], [Library versioning type]) 31202b15cb3dSCy Schubert_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31212b15cb3dSCy Schubert_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31222b15cb3dSCy Schubert_LT_DECL([], [shlibpath_overrides_runpath], [0], 31232b15cb3dSCy Schubert [Is shlibpath searched before the hard-coded library search path?]) 31242b15cb3dSCy Schubert_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31252b15cb3dSCy Schubert_LT_DECL([], [library_names_spec], [1], 31262b15cb3dSCy Schubert [[List of archive names. First name is the real one, the rest are links. 31272b15cb3dSCy Schubert The last name is the one that the linker finds with -lNAME]]) 31282b15cb3dSCy Schubert_LT_DECL([], [soname_spec], [1], 31292b15cb3dSCy Schubert [[The coded name of the library, if different from the real name]]) 31302b15cb3dSCy Schubert_LT_DECL([], [install_override_mode], [1], 31312b15cb3dSCy Schubert [Permission mode override for installation of shared libraries]) 31322b15cb3dSCy Schubert_LT_DECL([], [postinstall_cmds], [2], 31332b15cb3dSCy Schubert [Command to use after installation of a shared archive]) 31342b15cb3dSCy Schubert_LT_DECL([], [postuninstall_cmds], [2], 31352b15cb3dSCy Schubert [Command to use after uninstallation of a shared archive]) 31362b15cb3dSCy Schubert_LT_DECL([], [finish_cmds], [2], 31372b15cb3dSCy Schubert [Commands used to finish a libtool library installation in a directory]) 31382b15cb3dSCy Schubert_LT_DECL([], [finish_eval], [1], 31392b15cb3dSCy Schubert [[As "finish_cmds", except a single script fragment to be evaled but 31402b15cb3dSCy Schubert not shown]]) 31412b15cb3dSCy Schubert_LT_DECL([], [hardcode_into_libs], [0], 31422b15cb3dSCy Schubert [Whether we should hardcode library paths into libraries]) 31432b15cb3dSCy Schubert_LT_DECL([], [sys_lib_search_path_spec], [2], 31442b15cb3dSCy Schubert [Compile-time system search path for libraries]) 3145*f0574f5cSXin LI_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3146*f0574f5cSXin LI [Detected run-time system search path for libraries]) 3147*f0574f5cSXin LI_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3148*f0574f5cSXin LI [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 31492b15cb3dSCy Schubert])# _LT_SYS_DYNAMIC_LINKER 31502b15cb3dSCy Schubert 31512b15cb3dSCy Schubert 31522b15cb3dSCy Schubert# _LT_PATH_TOOL_PREFIX(TOOL) 31532b15cb3dSCy Schubert# -------------------------- 3154*f0574f5cSXin LI# find a file program that can recognize shared library 31552b15cb3dSCy SchubertAC_DEFUN([_LT_PATH_TOOL_PREFIX], 31562b15cb3dSCy Schubert[m4_require([_LT_DECL_EGREP])dnl 31572b15cb3dSCy SchubertAC_MSG_CHECKING([for $1]) 31582b15cb3dSCy SchubertAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 31592b15cb3dSCy Schubert[case $MAGIC_CMD in 31602b15cb3dSCy Schubert[[\\/*] | ?:[\\/]*]) 3161*f0574f5cSXin LI lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 31622b15cb3dSCy Schubert ;; 31632b15cb3dSCy Schubert*) 3164*f0574f5cSXin LI lt_save_MAGIC_CMD=$MAGIC_CMD 3165*f0574f5cSXin LI lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 31662b15cb3dSCy Schubertdnl $ac_dummy forces splitting on constant user-supplied paths. 31672b15cb3dSCy Schubertdnl POSIX.2 word splitting is done only on the output of word expansions, 31682b15cb3dSCy Schubertdnl not every word. This closes a longstanding sh security hole. 31692b15cb3dSCy Schubert ac_dummy="m4_if([$2], , $PATH, [$2])" 31702b15cb3dSCy Schubert for ac_dir in $ac_dummy; do 3171*f0574f5cSXin LI IFS=$lt_save_ifs 31722b15cb3dSCy Schubert test -z "$ac_dir" && ac_dir=. 3173*f0574f5cSXin LI if test -f "$ac_dir/$1"; then 3174*f0574f5cSXin LI lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 31752b15cb3dSCy Schubert if test -n "$file_magic_test_file"; then 31762b15cb3dSCy Schubert case $deplibs_check_method in 31772b15cb3dSCy Schubert "file_magic "*) 31782b15cb3dSCy Schubert file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3179*f0574f5cSXin LI MAGIC_CMD=$lt_cv_path_MAGIC_CMD 31802b15cb3dSCy Schubert if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 31812b15cb3dSCy Schubert $EGREP "$file_magic_regex" > /dev/null; then 31822b15cb3dSCy Schubert : 31832b15cb3dSCy Schubert else 31842b15cb3dSCy Schubert cat <<_LT_EOF 1>&2 31852b15cb3dSCy Schubert 31862b15cb3dSCy Schubert*** Warning: the command libtool uses to detect shared libraries, 31872b15cb3dSCy Schubert*** $file_magic_cmd, produces output that libtool cannot recognize. 31882b15cb3dSCy Schubert*** The result is that libtool may fail to recognize shared libraries 31892b15cb3dSCy Schubert*** as such. This will affect the creation of libtool libraries that 31902b15cb3dSCy Schubert*** depend on shared libraries, but programs linked with such libtool 31912b15cb3dSCy Schubert*** libraries will work regardless of this problem. Nevertheless, you 31922b15cb3dSCy Schubert*** may want to report the problem to your system manager and/or to 31932b15cb3dSCy Schubert*** bug-libtool@gnu.org 31942b15cb3dSCy Schubert 31952b15cb3dSCy Schubert_LT_EOF 31962b15cb3dSCy Schubert fi ;; 31972b15cb3dSCy Schubert esac 31982b15cb3dSCy Schubert fi 31992b15cb3dSCy Schubert break 32002b15cb3dSCy Schubert fi 32012b15cb3dSCy Schubert done 3202*f0574f5cSXin LI IFS=$lt_save_ifs 3203*f0574f5cSXin LI MAGIC_CMD=$lt_save_MAGIC_CMD 32042b15cb3dSCy Schubert ;; 32052b15cb3dSCy Schubertesac]) 3206*f0574f5cSXin LIMAGIC_CMD=$lt_cv_path_MAGIC_CMD 32072b15cb3dSCy Schubertif test -n "$MAGIC_CMD"; then 32082b15cb3dSCy Schubert AC_MSG_RESULT($MAGIC_CMD) 32092b15cb3dSCy Schubertelse 32102b15cb3dSCy Schubert AC_MSG_RESULT(no) 32112b15cb3dSCy Schubertfi 32122b15cb3dSCy Schubert_LT_DECL([], [MAGIC_CMD], [0], 32132b15cb3dSCy Schubert [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32142b15cb3dSCy Schubert])# _LT_PATH_TOOL_PREFIX 32152b15cb3dSCy Schubert 32162b15cb3dSCy Schubert# Old name: 32172b15cb3dSCy SchubertAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32182b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 32192b15cb3dSCy Schubertdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 32202b15cb3dSCy Schubert 32212b15cb3dSCy Schubert 32222b15cb3dSCy Schubert# _LT_PATH_MAGIC 32232b15cb3dSCy Schubert# -------------- 3224*f0574f5cSXin LI# find a file program that can recognize a shared library 32252b15cb3dSCy Schubertm4_defun([_LT_PATH_MAGIC], 32262b15cb3dSCy Schubert[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 32272b15cb3dSCy Schubertif test -z "$lt_cv_path_MAGIC_CMD"; then 32282b15cb3dSCy Schubert if test -n "$ac_tool_prefix"; then 32292b15cb3dSCy Schubert _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 32302b15cb3dSCy Schubert else 32312b15cb3dSCy Schubert MAGIC_CMD=: 32322b15cb3dSCy Schubert fi 32332b15cb3dSCy Schubertfi 32342b15cb3dSCy Schubert])# _LT_PATH_MAGIC 32352b15cb3dSCy Schubert 32362b15cb3dSCy Schubert 32372b15cb3dSCy Schubert# LT_PATH_LD 32382b15cb3dSCy Schubert# ---------- 32392b15cb3dSCy Schubert# find the pathname to the GNU or non-GNU linker 32402b15cb3dSCy SchubertAC_DEFUN([LT_PATH_LD], 32412b15cb3dSCy Schubert[AC_REQUIRE([AC_PROG_CC])dnl 32422b15cb3dSCy SchubertAC_REQUIRE([AC_CANONICAL_HOST])dnl 32432b15cb3dSCy SchubertAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32442b15cb3dSCy Schubertm4_require([_LT_DECL_SED])dnl 32452b15cb3dSCy Schubertm4_require([_LT_DECL_EGREP])dnl 32462b15cb3dSCy Schubertm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32472b15cb3dSCy Schubert 32482b15cb3dSCy SchubertAC_ARG_WITH([gnu-ld], 32492b15cb3dSCy Schubert [AS_HELP_STRING([--with-gnu-ld], 32502b15cb3dSCy Schubert [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3251*f0574f5cSXin LI [test no = "$withval" || with_gnu_ld=yes], 32522b15cb3dSCy Schubert [with_gnu_ld=no])dnl 32532b15cb3dSCy Schubert 32542b15cb3dSCy Schubertac_prog=ld 3255*f0574f5cSXin LIif test yes = "$GCC"; then 32562b15cb3dSCy Schubert # Check if gcc -print-prog-name=ld gives a path. 32572b15cb3dSCy Schubert AC_MSG_CHECKING([for ld used by $CC]) 32582b15cb3dSCy Schubert case $host in 32592b15cb3dSCy Schubert *-*-mingw*) 3260*f0574f5cSXin LI # gcc leaves a trailing carriage return, which upsets mingw 32612b15cb3dSCy Schubert ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 32622b15cb3dSCy Schubert *) 32632b15cb3dSCy Schubert ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 32642b15cb3dSCy Schubert esac 32652b15cb3dSCy Schubert case $ac_prog in 32662b15cb3dSCy Schubert # Accept absolute paths. 32672b15cb3dSCy Schubert [[\\/]]* | ?:[[\\/]]*) 32682b15cb3dSCy Schubert re_direlt='/[[^/]][[^/]]*/\.\./' 32692b15cb3dSCy Schubert # Canonicalize the pathname of ld 32702b15cb3dSCy Schubert ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 32712b15cb3dSCy Schubert while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 32722b15cb3dSCy Schubert ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 32732b15cb3dSCy Schubert done 3274*f0574f5cSXin LI test -z "$LD" && LD=$ac_prog 32752b15cb3dSCy Schubert ;; 32762b15cb3dSCy Schubert "") 32772b15cb3dSCy Schubert # If it fails, then pretend we aren't using GCC. 32782b15cb3dSCy Schubert ac_prog=ld 32792b15cb3dSCy Schubert ;; 32802b15cb3dSCy Schubert *) 32812b15cb3dSCy Schubert # If it is relative, then search for the first ld in PATH. 32822b15cb3dSCy Schubert with_gnu_ld=unknown 32832b15cb3dSCy Schubert ;; 32842b15cb3dSCy Schubert esac 3285*f0574f5cSXin LIelif test yes = "$with_gnu_ld"; then 32862b15cb3dSCy Schubert AC_MSG_CHECKING([for GNU ld]) 32872b15cb3dSCy Schubertelse 32882b15cb3dSCy Schubert AC_MSG_CHECKING([for non-GNU ld]) 32892b15cb3dSCy Schubertfi 32902b15cb3dSCy SchubertAC_CACHE_VAL(lt_cv_path_LD, 32912b15cb3dSCy Schubert[if test -z "$LD"; then 3292*f0574f5cSXin LI lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 32932b15cb3dSCy Schubert for ac_dir in $PATH; do 3294*f0574f5cSXin LI IFS=$lt_save_ifs 32952b15cb3dSCy Schubert test -z "$ac_dir" && ac_dir=. 32962b15cb3dSCy Schubert if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3297*f0574f5cSXin LI lt_cv_path_LD=$ac_dir/$ac_prog 32982b15cb3dSCy Schubert # Check to see if the program is GNU ld. I'd rather use --version, 32992b15cb3dSCy Schubert # but apparently some variants of GNU ld only accept -v. 33002b15cb3dSCy Schubert # Break only if it was the GNU/non-GNU ld that we prefer. 33012b15cb3dSCy Schubert case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 33022b15cb3dSCy Schubert *GNU* | *'with BFD'*) 3303*f0574f5cSXin LI test no != "$with_gnu_ld" && break 33042b15cb3dSCy Schubert ;; 33052b15cb3dSCy Schubert *) 3306*f0574f5cSXin LI test yes != "$with_gnu_ld" && break 33072b15cb3dSCy Schubert ;; 33082b15cb3dSCy Schubert esac 33092b15cb3dSCy Schubert fi 33102b15cb3dSCy Schubert done 3311*f0574f5cSXin LI IFS=$lt_save_ifs 33122b15cb3dSCy Schubertelse 3313*f0574f5cSXin LI lt_cv_path_LD=$LD # Let the user override the test with a path. 33142b15cb3dSCy Schubertfi]) 3315*f0574f5cSXin LILD=$lt_cv_path_LD 33162b15cb3dSCy Schubertif test -n "$LD"; then 33172b15cb3dSCy Schubert AC_MSG_RESULT($LD) 33182b15cb3dSCy Schubertelse 33192b15cb3dSCy Schubert AC_MSG_RESULT(no) 33202b15cb3dSCy Schubertfi 33212b15cb3dSCy Schuberttest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33222b15cb3dSCy Schubert_LT_PATH_LD_GNU 33232b15cb3dSCy SchubertAC_SUBST([LD]) 33242b15cb3dSCy Schubert 33252b15cb3dSCy Schubert_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33262b15cb3dSCy Schubert])# LT_PATH_LD 33272b15cb3dSCy Schubert 33282b15cb3dSCy Schubert# Old names: 33292b15cb3dSCy SchubertAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33302b15cb3dSCy SchubertAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33312b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 33322b15cb3dSCy Schubertdnl AC_DEFUN([AM_PROG_LD], []) 33332b15cb3dSCy Schubertdnl AC_DEFUN([AC_PROG_LD], []) 33342b15cb3dSCy Schubert 33352b15cb3dSCy Schubert 33362b15cb3dSCy Schubert# _LT_PATH_LD_GNU 33372b15cb3dSCy Schubert#- -------------- 33382b15cb3dSCy Schubertm4_defun([_LT_PATH_LD_GNU], 33392b15cb3dSCy Schubert[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 33402b15cb3dSCy Schubert[# I'd rather use --version here, but apparently some GNU lds only accept -v. 33412b15cb3dSCy Schubertcase `$LD -v 2>&1 </dev/null` in 33422b15cb3dSCy Schubert*GNU* | *'with BFD'*) 33432b15cb3dSCy Schubert lt_cv_prog_gnu_ld=yes 33442b15cb3dSCy Schubert ;; 33452b15cb3dSCy Schubert*) 33462b15cb3dSCy Schubert lt_cv_prog_gnu_ld=no 33472b15cb3dSCy Schubert ;; 33482b15cb3dSCy Schubertesac]) 33492b15cb3dSCy Schubertwith_gnu_ld=$lt_cv_prog_gnu_ld 33502b15cb3dSCy Schubert])# _LT_PATH_LD_GNU 33512b15cb3dSCy Schubert 33522b15cb3dSCy Schubert 33532b15cb3dSCy Schubert# _LT_CMD_RELOAD 33542b15cb3dSCy Schubert# -------------- 33552b15cb3dSCy Schubert# find reload flag for linker 33562b15cb3dSCy Schubert# -- PORTME Some linkers may need a different reload flag. 33572b15cb3dSCy Schubertm4_defun([_LT_CMD_RELOAD], 33582b15cb3dSCy Schubert[AC_CACHE_CHECK([for $LD option to reload object files], 33592b15cb3dSCy Schubert lt_cv_ld_reload_flag, 33602b15cb3dSCy Schubert [lt_cv_ld_reload_flag='-r']) 33612b15cb3dSCy Schubertreload_flag=$lt_cv_ld_reload_flag 33622b15cb3dSCy Schubertcase $reload_flag in 33632b15cb3dSCy Schubert"" | " "*) ;; 33642b15cb3dSCy Schubert*) reload_flag=" $reload_flag" ;; 33652b15cb3dSCy Schubertesac 33662b15cb3dSCy Schubertreload_cmds='$LD$reload_flag -o $output$reload_objs' 33672b15cb3dSCy Schubertcase $host_os in 33682b15cb3dSCy Schubert cygwin* | mingw* | pw32* | cegcc*) 3369*f0574f5cSXin LI if test yes != "$GCC"; then 33702b15cb3dSCy Schubert reload_cmds=false 33712b15cb3dSCy Schubert fi 33722b15cb3dSCy Schubert ;; 33732b15cb3dSCy Schubert darwin*) 3374*f0574f5cSXin LI if test yes = "$GCC"; then 3375*f0574f5cSXin LI reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 33762b15cb3dSCy Schubert else 33772b15cb3dSCy Schubert reload_cmds='$LD$reload_flag -o $output$reload_objs' 33782b15cb3dSCy Schubert fi 33792b15cb3dSCy Schubert ;; 33802b15cb3dSCy Schubertesac 33812b15cb3dSCy Schubert_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 33822b15cb3dSCy Schubert_LT_TAGDECL([], [reload_cmds], [2])dnl 33832b15cb3dSCy Schubert])# _LT_CMD_RELOAD 33842b15cb3dSCy Schubert 33852b15cb3dSCy Schubert 3386*f0574f5cSXin LI# _LT_PATH_DD 3387*f0574f5cSXin LI# ----------- 3388*f0574f5cSXin LI# find a working dd 3389*f0574f5cSXin LIm4_defun([_LT_PATH_DD], 3390*f0574f5cSXin LI[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3391*f0574f5cSXin LI[printf 0123456789abcdef0123456789abcdef >conftest.i 3392*f0574f5cSXin LIcat conftest.i conftest.i >conftest2.i 3393*f0574f5cSXin LI: ${lt_DD:=$DD} 3394*f0574f5cSXin LIAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3395*f0574f5cSXin LI[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3396*f0574f5cSXin LI cmp -s conftest.i conftest.out \ 3397*f0574f5cSXin LI && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3398*f0574f5cSXin LIfi]) 3399*f0574f5cSXin LIrm -f conftest.i conftest2.i conftest.out]) 3400*f0574f5cSXin LI])# _LT_PATH_DD 3401*f0574f5cSXin LI 3402*f0574f5cSXin LI 3403*f0574f5cSXin LI# _LT_CMD_TRUNCATE 3404*f0574f5cSXin LI# ---------------- 3405*f0574f5cSXin LI# find command to truncate a binary pipe 3406*f0574f5cSXin LIm4_defun([_LT_CMD_TRUNCATE], 3407*f0574f5cSXin LI[m4_require([_LT_PATH_DD]) 3408*f0574f5cSXin LIAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3409*f0574f5cSXin LI[printf 0123456789abcdef0123456789abcdef >conftest.i 3410*f0574f5cSXin LIcat conftest.i conftest.i >conftest2.i 3411*f0574f5cSXin LIlt_cv_truncate_bin= 3412*f0574f5cSXin LIif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3413*f0574f5cSXin LI cmp -s conftest.i conftest.out \ 3414*f0574f5cSXin LI && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3415*f0574f5cSXin LIfi 3416*f0574f5cSXin LIrm -f conftest.i conftest2.i conftest.out 3417*f0574f5cSXin LItest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3418*f0574f5cSXin LI_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3419*f0574f5cSXin LI [Command to truncate a binary pipe]) 3420*f0574f5cSXin LI])# _LT_CMD_TRUNCATE 3421*f0574f5cSXin LI 3422*f0574f5cSXin LI 34232b15cb3dSCy Schubert# _LT_CHECK_MAGIC_METHOD 34242b15cb3dSCy Schubert# ---------------------- 34252b15cb3dSCy Schubert# how to check for library dependencies 34262b15cb3dSCy Schubert# -- PORTME fill in with the dynamic library characteristics 34272b15cb3dSCy Schubertm4_defun([_LT_CHECK_MAGIC_METHOD], 34282b15cb3dSCy Schubert[m4_require([_LT_DECL_EGREP]) 34292b15cb3dSCy Schubertm4_require([_LT_DECL_OBJDUMP]) 34302b15cb3dSCy SchubertAC_CACHE_CHECK([how to recognize dependent libraries], 34312b15cb3dSCy Schubertlt_cv_deplibs_check_method, 34322b15cb3dSCy Schubert[lt_cv_file_magic_cmd='$MAGIC_CMD' 34332b15cb3dSCy Schubertlt_cv_file_magic_test_file= 34342b15cb3dSCy Schubertlt_cv_deplibs_check_method='unknown' 34352b15cb3dSCy Schubert# Need to set the preceding variable on all platforms that support 34362b15cb3dSCy Schubert# interlibrary dependencies. 34372b15cb3dSCy Schubert# 'none' -- dependencies not supported. 3438*f0574f5cSXin LI# 'unknown' -- same as none, but documents that we really don't know. 34392b15cb3dSCy Schubert# 'pass_all' -- all dependencies passed with no checks. 34402b15cb3dSCy Schubert# 'test_compile' -- check by making test program. 34412b15cb3dSCy Schubert# 'file_magic [[regex]]' -- check by looking for files in library path 3442*f0574f5cSXin LI# that responds to the $file_magic_cmd with a given extended regex. 3443*f0574f5cSXin LI# If you have 'file' or equivalent on your system and you're not sure 3444*f0574f5cSXin LI# whether 'pass_all' will *always* work, you probably want this one. 34452b15cb3dSCy Schubert 34462b15cb3dSCy Schubertcase $host_os in 34472b15cb3dSCy Schubertaix[[4-9]]*) 34482b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 34492b15cb3dSCy Schubert ;; 34502b15cb3dSCy Schubert 34512b15cb3dSCy Schubertbeos*) 34522b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 34532b15cb3dSCy Schubert ;; 34542b15cb3dSCy Schubert 34552b15cb3dSCy Schubertbsdi[[45]]*) 34562b15cb3dSCy Schubert lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 34572b15cb3dSCy Schubert lt_cv_file_magic_cmd='/usr/bin/file -L' 34582b15cb3dSCy Schubert lt_cv_file_magic_test_file=/shlib/libc.so 34592b15cb3dSCy Schubert ;; 34602b15cb3dSCy Schubert 34612b15cb3dSCy Schubertcygwin*) 34622b15cb3dSCy Schubert # func_win32_libid is a shell function defined in ltmain.sh 34632b15cb3dSCy Schubert lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34642b15cb3dSCy Schubert lt_cv_file_magic_cmd='func_win32_libid' 34652b15cb3dSCy Schubert ;; 34662b15cb3dSCy Schubert 34672b15cb3dSCy Schubertmingw* | pw32*) 34682b15cb3dSCy Schubert # Base MSYS/MinGW do not provide the 'file' command needed by 34692b15cb3dSCy Schubert # func_win32_libid shell function, so use a weaker test based on 'objdump', 34702b15cb3dSCy Schubert # unless we find 'file', for example because we are cross-compiling. 3471*f0574f5cSXin LI if ( file / ) >/dev/null 2>&1; then 34722b15cb3dSCy Schubert lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34732b15cb3dSCy Schubert lt_cv_file_magic_cmd='func_win32_libid' 34742b15cb3dSCy Schubert else 34752b15cb3dSCy Schubert # Keep this pattern in sync with the one in func_win32_libid. 34762b15cb3dSCy Schubert lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 34772b15cb3dSCy Schubert lt_cv_file_magic_cmd='$OBJDUMP -f' 34782b15cb3dSCy Schubert fi 34792b15cb3dSCy Schubert ;; 34802b15cb3dSCy Schubert 34812b15cb3dSCy Schubertcegcc*) 34822b15cb3dSCy Schubert # use the weaker test based on 'objdump'. See mingw*. 34832b15cb3dSCy Schubert lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 34842b15cb3dSCy Schubert lt_cv_file_magic_cmd='$OBJDUMP -f' 34852b15cb3dSCy Schubert ;; 34862b15cb3dSCy Schubert 34872b15cb3dSCy Schubertdarwin* | rhapsody*) 34882b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 34892b15cb3dSCy Schubert ;; 34902b15cb3dSCy Schubert 34912b15cb3dSCy Schubertfreebsd* | dragonfly*) 34922b15cb3dSCy Schubert if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 34932b15cb3dSCy Schubert case $host_cpu in 34942b15cb3dSCy Schubert i*86 ) 34952b15cb3dSCy Schubert # Not sure whether the presence of OpenBSD here was a mistake. 34962b15cb3dSCy Schubert # Let's accept both of them until this is cleared up. 34972b15cb3dSCy Schubert lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 34982b15cb3dSCy Schubert lt_cv_file_magic_cmd=/usr/bin/file 34992b15cb3dSCy Schubert lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 35002b15cb3dSCy Schubert ;; 35012b15cb3dSCy Schubert esac 35022b15cb3dSCy Schubert else 35032b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 35042b15cb3dSCy Schubert fi 35052b15cb3dSCy Schubert ;; 35062b15cb3dSCy Schubert 35072b15cb3dSCy Schuberthaiku*) 35082b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 35092b15cb3dSCy Schubert ;; 35102b15cb3dSCy Schubert 35112b15cb3dSCy Schuberthpux10.20* | hpux11*) 35122b15cb3dSCy Schubert lt_cv_file_magic_cmd=/usr/bin/file 35132b15cb3dSCy Schubert case $host_cpu in 35142b15cb3dSCy Schubert ia64*) 35152b15cb3dSCy Schubert lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 35162b15cb3dSCy Schubert lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 35172b15cb3dSCy Schubert ;; 35182b15cb3dSCy Schubert hppa*64*) 35192b15cb3dSCy Schubert [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]'] 35202b15cb3dSCy Schubert lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 35212b15cb3dSCy Schubert ;; 35222b15cb3dSCy Schubert *) 35232b15cb3dSCy Schubert lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 35242b15cb3dSCy Schubert lt_cv_file_magic_test_file=/usr/lib/libc.sl 35252b15cb3dSCy Schubert ;; 35262b15cb3dSCy Schubert esac 35272b15cb3dSCy Schubert ;; 35282b15cb3dSCy Schubert 35292b15cb3dSCy Schubertinterix[[3-9]]*) 35302b15cb3dSCy Schubert # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 35312b15cb3dSCy Schubert lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 35322b15cb3dSCy Schubert ;; 35332b15cb3dSCy Schubert 35342b15cb3dSCy Schubertirix5* | irix6* | nonstopux*) 35352b15cb3dSCy Schubert case $LD in 35362b15cb3dSCy Schubert *-32|*"-32 ") libmagic=32-bit;; 35372b15cb3dSCy Schubert *-n32|*"-n32 ") libmagic=N32;; 35382b15cb3dSCy Schubert *-64|*"-64 ") libmagic=64-bit;; 35392b15cb3dSCy Schubert *) libmagic=never-match;; 35402b15cb3dSCy Schubert esac 35412b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 35422b15cb3dSCy Schubert ;; 35432b15cb3dSCy Schubert 3544*f0574f5cSXin LI# This must be glibc/ELF. 3545*f0574f5cSXin LIlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 35462b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 35472b15cb3dSCy Schubert ;; 35482b15cb3dSCy Schubert 35492b15cb3dSCy Schubertnetbsd*) 35502b15cb3dSCy Schubert if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35512b15cb3dSCy Schubert lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35522b15cb3dSCy Schubert else 35532b15cb3dSCy Schubert lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 35542b15cb3dSCy Schubert fi 35552b15cb3dSCy Schubert ;; 35562b15cb3dSCy Schubert 35572b15cb3dSCy Schubertnewos6*) 35582b15cb3dSCy Schubert lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 35592b15cb3dSCy Schubert lt_cv_file_magic_cmd=/usr/bin/file 35602b15cb3dSCy Schubert lt_cv_file_magic_test_file=/usr/lib/libnls.so 35612b15cb3dSCy Schubert ;; 35622b15cb3dSCy Schubert 35632b15cb3dSCy Schubert*nto* | *qnx*) 35642b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 35652b15cb3dSCy Schubert ;; 35662b15cb3dSCy Schubert 3567*f0574f5cSXin LIopenbsd* | bitrig*) 3568*f0574f5cSXin LI if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 35692b15cb3dSCy Schubert lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 35702b15cb3dSCy Schubert else 35712b15cb3dSCy Schubert lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35722b15cb3dSCy Schubert fi 35732b15cb3dSCy Schubert ;; 35742b15cb3dSCy Schubert 35752b15cb3dSCy Schubertosf3* | osf4* | osf5*) 35762b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 35772b15cb3dSCy Schubert ;; 35782b15cb3dSCy Schubert 35792b15cb3dSCy Schubertrdos*) 35802b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 35812b15cb3dSCy Schubert ;; 35822b15cb3dSCy Schubert 35832b15cb3dSCy Schubertsolaris*) 35842b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 35852b15cb3dSCy Schubert ;; 35862b15cb3dSCy Schubert 35872b15cb3dSCy Schubertsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 35882b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 35892b15cb3dSCy Schubert ;; 35902b15cb3dSCy Schubert 35912b15cb3dSCy Schubertsysv4 | sysv4.3*) 35922b15cb3dSCy Schubert case $host_vendor in 35932b15cb3dSCy Schubert motorola) 35942b15cb3dSCy Schubert 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]]' 35952b15cb3dSCy Schubert lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 35962b15cb3dSCy Schubert ;; 35972b15cb3dSCy Schubert ncr) 35982b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 35992b15cb3dSCy Schubert ;; 36002b15cb3dSCy Schubert sequent) 36012b15cb3dSCy Schubert lt_cv_file_magic_cmd='/bin/file' 36022b15cb3dSCy Schubert lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 36032b15cb3dSCy Schubert ;; 36042b15cb3dSCy Schubert sni) 36052b15cb3dSCy Schubert lt_cv_file_magic_cmd='/bin/file' 36062b15cb3dSCy Schubert lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 36072b15cb3dSCy Schubert lt_cv_file_magic_test_file=/lib/libc.so 36082b15cb3dSCy Schubert ;; 36092b15cb3dSCy Schubert siemens) 36102b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 36112b15cb3dSCy Schubert ;; 36122b15cb3dSCy Schubert pc) 36132b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 36142b15cb3dSCy Schubert ;; 36152b15cb3dSCy Schubert esac 36162b15cb3dSCy Schubert ;; 36172b15cb3dSCy Schubert 36182b15cb3dSCy Schuberttpf*) 36192b15cb3dSCy Schubert lt_cv_deplibs_check_method=pass_all 36202b15cb3dSCy Schubert ;; 3621*f0574f5cSXin LIos2*) 3622*f0574f5cSXin LI lt_cv_deplibs_check_method=pass_all 3623*f0574f5cSXin LI ;; 36242b15cb3dSCy Schubertesac 36252b15cb3dSCy Schubert]) 36262b15cb3dSCy Schubert 36272b15cb3dSCy Schubertfile_magic_glob= 36282b15cb3dSCy Schubertwant_nocaseglob=no 36292b15cb3dSCy Schubertif test "$build" = "$host"; then 36302b15cb3dSCy Schubert case $host_os in 36312b15cb3dSCy Schubert mingw* | pw32*) 36322b15cb3dSCy Schubert if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 36332b15cb3dSCy Schubert want_nocaseglob=yes 36342b15cb3dSCy Schubert else 36352b15cb3dSCy Schubert file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 36362b15cb3dSCy Schubert fi 36372b15cb3dSCy Schubert ;; 36382b15cb3dSCy Schubert esac 36392b15cb3dSCy Schubertfi 36402b15cb3dSCy Schubert 36412b15cb3dSCy Schubertfile_magic_cmd=$lt_cv_file_magic_cmd 36422b15cb3dSCy Schubertdeplibs_check_method=$lt_cv_deplibs_check_method 36432b15cb3dSCy Schuberttest -z "$deplibs_check_method" && deplibs_check_method=unknown 36442b15cb3dSCy Schubert 36452b15cb3dSCy Schubert_LT_DECL([], [deplibs_check_method], [1], 36462b15cb3dSCy Schubert [Method to check whether dependent libraries are shared objects]) 36472b15cb3dSCy Schubert_LT_DECL([], [file_magic_cmd], [1], 36482b15cb3dSCy Schubert [Command to use when deplibs_check_method = "file_magic"]) 36492b15cb3dSCy Schubert_LT_DECL([], [file_magic_glob], [1], 36502b15cb3dSCy Schubert [How to find potential files when deplibs_check_method = "file_magic"]) 36512b15cb3dSCy Schubert_LT_DECL([], [want_nocaseglob], [1], 36522b15cb3dSCy Schubert [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 36532b15cb3dSCy Schubert])# _LT_CHECK_MAGIC_METHOD 36542b15cb3dSCy Schubert 36552b15cb3dSCy Schubert 36562b15cb3dSCy Schubert# LT_PATH_NM 36572b15cb3dSCy Schubert# ---------- 36582b15cb3dSCy Schubert# find the pathname to a BSD- or MS-compatible name lister 36592b15cb3dSCy SchubertAC_DEFUN([LT_PATH_NM], 36602b15cb3dSCy Schubert[AC_REQUIRE([AC_PROG_CC])dnl 36612b15cb3dSCy SchubertAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 36622b15cb3dSCy Schubert[if test -n "$NM"; then 36632b15cb3dSCy Schubert # Let the user override the test. 3664*f0574f5cSXin LI lt_cv_path_NM=$NM 36652b15cb3dSCy Schubertelse 3666*f0574f5cSXin LI lt_nm_to_check=${ac_tool_prefix}nm 36672b15cb3dSCy Schubert if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 36682b15cb3dSCy Schubert lt_nm_to_check="$lt_nm_to_check nm" 36692b15cb3dSCy Schubert fi 36702b15cb3dSCy Schubert for lt_tmp_nm in $lt_nm_to_check; do 3671*f0574f5cSXin LI lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 36722b15cb3dSCy Schubert for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3673*f0574f5cSXin LI IFS=$lt_save_ifs 36742b15cb3dSCy Schubert test -z "$ac_dir" && ac_dir=. 3675*f0574f5cSXin LI tmp_nm=$ac_dir/$lt_tmp_nm 36762b15cb3dSCy Schubert if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 36772b15cb3dSCy Schubert # Check to see if the nm accepts a BSD-compat flag. 3678*f0574f5cSXin LI # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 36792b15cb3dSCy Schubert # nm: unknown option "B" ignored 36802b15cb3dSCy Schubert # Tru64's nm complains that /dev/null is an invalid object file 3681*f0574f5cSXin LI # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3682*f0574f5cSXin LI case $build_os in 3683*f0574f5cSXin LI mingw*) lt_bad_file=conftest.nm/nofile ;; 3684*f0574f5cSXin LI *) lt_bad_file=/dev/null ;; 3685*f0574f5cSXin LI esac 3686*f0574f5cSXin LI case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3687*f0574f5cSXin LI *$lt_bad_file* | *'Invalid file or object type'*) 36882b15cb3dSCy Schubert lt_cv_path_NM="$tmp_nm -B" 3689*f0574f5cSXin LI break 2 36902b15cb3dSCy Schubert ;; 36912b15cb3dSCy Schubert *) 36922b15cb3dSCy Schubert case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 36932b15cb3dSCy Schubert */dev/null*) 36942b15cb3dSCy Schubert lt_cv_path_NM="$tmp_nm -p" 3695*f0574f5cSXin LI break 2 36962b15cb3dSCy Schubert ;; 36972b15cb3dSCy Schubert *) 36982b15cb3dSCy Schubert lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 36992b15cb3dSCy Schubert continue # so that we can try to find one that supports BSD flags 37002b15cb3dSCy Schubert ;; 37012b15cb3dSCy Schubert esac 37022b15cb3dSCy Schubert ;; 37032b15cb3dSCy Schubert esac 37042b15cb3dSCy Schubert fi 37052b15cb3dSCy Schubert done 3706*f0574f5cSXin LI IFS=$lt_save_ifs 37072b15cb3dSCy Schubert done 37082b15cb3dSCy Schubert : ${lt_cv_path_NM=no} 37092b15cb3dSCy Schubertfi]) 3710*f0574f5cSXin LIif test no != "$lt_cv_path_NM"; then 3711*f0574f5cSXin LI NM=$lt_cv_path_NM 37122b15cb3dSCy Schubertelse 37132b15cb3dSCy Schubert # Didn't find any BSD compatible name lister, look for dumpbin. 37142b15cb3dSCy Schubert if test -n "$DUMPBIN"; then : 37152b15cb3dSCy Schubert # Let the user override the test. 37162b15cb3dSCy Schubert else 37172b15cb3dSCy Schubert AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3718*f0574f5cSXin LI case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 37192b15cb3dSCy Schubert *COFF*) 3720*f0574f5cSXin LI DUMPBIN="$DUMPBIN -symbols -headers" 37212b15cb3dSCy Schubert ;; 37222b15cb3dSCy Schubert *) 37232b15cb3dSCy Schubert DUMPBIN=: 37242b15cb3dSCy Schubert ;; 37252b15cb3dSCy Schubert esac 37262b15cb3dSCy Schubert fi 37272b15cb3dSCy Schubert AC_SUBST([DUMPBIN]) 3728*f0574f5cSXin LI if test : != "$DUMPBIN"; then 3729*f0574f5cSXin LI NM=$DUMPBIN 37302b15cb3dSCy Schubert fi 37312b15cb3dSCy Schubertfi 37322b15cb3dSCy Schuberttest -z "$NM" && NM=nm 37332b15cb3dSCy SchubertAC_SUBST([NM]) 37342b15cb3dSCy Schubert_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 37352b15cb3dSCy Schubert 37362b15cb3dSCy SchubertAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37372b15cb3dSCy Schubert [lt_cv_nm_interface="BSD nm" 37382b15cb3dSCy Schubert echo "int some_variable = 0;" > conftest.$ac_ext 37392b15cb3dSCy Schubert (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37402b15cb3dSCy Schubert (eval "$ac_compile" 2>conftest.err) 37412b15cb3dSCy Schubert cat conftest.err >&AS_MESSAGE_LOG_FD 37422b15cb3dSCy Schubert (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37432b15cb3dSCy Schubert (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37442b15cb3dSCy Schubert cat conftest.err >&AS_MESSAGE_LOG_FD 37452b15cb3dSCy Schubert (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37462b15cb3dSCy Schubert cat conftest.out >&AS_MESSAGE_LOG_FD 37472b15cb3dSCy Schubert if $GREP 'External.*some_variable' conftest.out > /dev/null; then 37482b15cb3dSCy Schubert lt_cv_nm_interface="MS dumpbin" 37492b15cb3dSCy Schubert fi 37502b15cb3dSCy Schubert rm -f conftest*]) 37512b15cb3dSCy Schubert])# LT_PATH_NM 37522b15cb3dSCy Schubert 37532b15cb3dSCy Schubert# Old names: 37542b15cb3dSCy SchubertAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 37552b15cb3dSCy SchubertAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 37562b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 37572b15cb3dSCy Schubertdnl AC_DEFUN([AM_PROG_NM], []) 37582b15cb3dSCy Schubertdnl AC_DEFUN([AC_PROG_NM], []) 37592b15cb3dSCy Schubert 37602b15cb3dSCy Schubert# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 37612b15cb3dSCy Schubert# -------------------------------- 37622b15cb3dSCy Schubert# how to determine the name of the shared library 37632b15cb3dSCy Schubert# associated with a specific link library. 37642b15cb3dSCy Schubert# -- PORTME fill in with the dynamic library characteristics 37652b15cb3dSCy Schubertm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 37662b15cb3dSCy Schubert[m4_require([_LT_DECL_EGREP]) 37672b15cb3dSCy Schubertm4_require([_LT_DECL_OBJDUMP]) 37682b15cb3dSCy Schubertm4_require([_LT_DECL_DLLTOOL]) 37692b15cb3dSCy SchubertAC_CACHE_CHECK([how to associate runtime and link libraries], 37702b15cb3dSCy Schubertlt_cv_sharedlib_from_linklib_cmd, 37712b15cb3dSCy Schubert[lt_cv_sharedlib_from_linklib_cmd='unknown' 37722b15cb3dSCy Schubert 37732b15cb3dSCy Schubertcase $host_os in 37742b15cb3dSCy Schubertcygwin* | mingw* | pw32* | cegcc*) 3775*f0574f5cSXin LI # two different shell functions defined in ltmain.sh; 3776*f0574f5cSXin LI # decide which one to use based on capabilities of $DLLTOOL 37772b15cb3dSCy Schubert case `$DLLTOOL --help 2>&1` in 37782b15cb3dSCy Schubert *--identify-strict*) 37792b15cb3dSCy Schubert lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 37802b15cb3dSCy Schubert ;; 37812b15cb3dSCy Schubert *) 37822b15cb3dSCy Schubert lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 37832b15cb3dSCy Schubert ;; 37842b15cb3dSCy Schubert esac 37852b15cb3dSCy Schubert ;; 37862b15cb3dSCy Schubert*) 37872b15cb3dSCy Schubert # fallback: assume linklib IS sharedlib 3788*f0574f5cSXin LI lt_cv_sharedlib_from_linklib_cmd=$ECHO 37892b15cb3dSCy Schubert ;; 37902b15cb3dSCy Schubertesac 37912b15cb3dSCy Schubert]) 37922b15cb3dSCy Schubertsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 37932b15cb3dSCy Schuberttest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 37942b15cb3dSCy Schubert 37952b15cb3dSCy Schubert_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 37962b15cb3dSCy Schubert [Command to associate shared and link libraries]) 37972b15cb3dSCy Schubert])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 37982b15cb3dSCy Schubert 37992b15cb3dSCy Schubert 38002b15cb3dSCy Schubert# _LT_PATH_MANIFEST_TOOL 38012b15cb3dSCy Schubert# ---------------------- 38022b15cb3dSCy Schubert# locate the manifest tool 38032b15cb3dSCy Schubertm4_defun([_LT_PATH_MANIFEST_TOOL], 38042b15cb3dSCy Schubert[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 38052b15cb3dSCy Schuberttest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 38062b15cb3dSCy SchubertAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 38072b15cb3dSCy Schubert [lt_cv_path_mainfest_tool=no 38082b15cb3dSCy Schubert echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 38092b15cb3dSCy Schubert $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 38102b15cb3dSCy Schubert cat conftest.err >&AS_MESSAGE_LOG_FD 38112b15cb3dSCy Schubert if $GREP 'Manifest Tool' conftest.out > /dev/null; then 38122b15cb3dSCy Schubert lt_cv_path_mainfest_tool=yes 38132b15cb3dSCy Schubert fi 38142b15cb3dSCy Schubert rm -f conftest*]) 3815*f0574f5cSXin LIif test yes != "$lt_cv_path_mainfest_tool"; then 38162b15cb3dSCy Schubert MANIFEST_TOOL=: 38172b15cb3dSCy Schubertfi 38182b15cb3dSCy Schubert_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 38192b15cb3dSCy Schubert])# _LT_PATH_MANIFEST_TOOL 38202b15cb3dSCy Schubert 38212b15cb3dSCy Schubert 3822*f0574f5cSXin LI# _LT_DLL_DEF_P([FILE]) 3823*f0574f5cSXin LI# --------------------- 3824*f0574f5cSXin LI# True iff FILE is a Windows DLL '.def' file. 3825*f0574f5cSXin LI# Keep in sync with func_dll_def_p in the libtool script 3826*f0574f5cSXin LIAC_DEFUN([_LT_DLL_DEF_P], 3827*f0574f5cSXin LI[dnl 3828*f0574f5cSXin LI test DEF = "`$SED -n dnl 3829*f0574f5cSXin LI -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3830*f0574f5cSXin LI -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3831*f0574f5cSXin LI -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3832*f0574f5cSXin LI -e q dnl Only consider the first "real" line 3833*f0574f5cSXin LI $1`" dnl 3834*f0574f5cSXin LI])# _LT_DLL_DEF_P 3835*f0574f5cSXin LI 3836*f0574f5cSXin LI 38372b15cb3dSCy Schubert# LT_LIB_M 38382b15cb3dSCy Schubert# -------- 38392b15cb3dSCy Schubert# check for math library 38402b15cb3dSCy SchubertAC_DEFUN([LT_LIB_M], 38412b15cb3dSCy Schubert[AC_REQUIRE([AC_CANONICAL_HOST])dnl 38422b15cb3dSCy SchubertLIBM= 38432b15cb3dSCy Schubertcase $host in 38442b15cb3dSCy Schubert*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 38452b15cb3dSCy Schubert # These system don't have libm, or don't need it 38462b15cb3dSCy Schubert ;; 38472b15cb3dSCy Schubert*-ncr-sysv4.3*) 3848*f0574f5cSXin LI AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 38492b15cb3dSCy Schubert AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 38502b15cb3dSCy Schubert ;; 38512b15cb3dSCy Schubert*) 3852*f0574f5cSXin LI AC_CHECK_LIB(m, cos, LIBM=-lm) 38532b15cb3dSCy Schubert ;; 38542b15cb3dSCy Schubertesac 38552b15cb3dSCy SchubertAC_SUBST([LIBM]) 38562b15cb3dSCy Schubert])# LT_LIB_M 38572b15cb3dSCy Schubert 38582b15cb3dSCy Schubert# Old name: 38592b15cb3dSCy SchubertAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 38602b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 38612b15cb3dSCy Schubertdnl AC_DEFUN([AC_CHECK_LIBM], []) 38622b15cb3dSCy Schubert 38632b15cb3dSCy Schubert 38642b15cb3dSCy Schubert# _LT_COMPILER_NO_RTTI([TAGNAME]) 38652b15cb3dSCy Schubert# ------------------------------- 38662b15cb3dSCy Schubertm4_defun([_LT_COMPILER_NO_RTTI], 38672b15cb3dSCy Schubert[m4_require([_LT_TAG_COMPILER])dnl 38682b15cb3dSCy Schubert 38692b15cb3dSCy Schubert_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 38702b15cb3dSCy Schubert 3871*f0574f5cSXin LIif test yes = "$GCC"; then 38722b15cb3dSCy Schubert case $cc_basename in 38732b15cb3dSCy Schubert nvcc*) 38742b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 38752b15cb3dSCy Schubert *) 38762b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 38772b15cb3dSCy Schubert esac 38782b15cb3dSCy Schubert 38792b15cb3dSCy Schubert _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 38802b15cb3dSCy Schubert lt_cv_prog_compiler_rtti_exceptions, 38812b15cb3dSCy Schubert [-fno-rtti -fno-exceptions], [], 38822b15cb3dSCy Schubert [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 38832b15cb3dSCy Schubertfi 38842b15cb3dSCy Schubert_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 38852b15cb3dSCy Schubert [Compiler flag to turn off builtin functions]) 38862b15cb3dSCy Schubert])# _LT_COMPILER_NO_RTTI 38872b15cb3dSCy Schubert 38882b15cb3dSCy Schubert 38892b15cb3dSCy Schubert# _LT_CMD_GLOBAL_SYMBOLS 38902b15cb3dSCy Schubert# ---------------------- 38912b15cb3dSCy Schubertm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 38922b15cb3dSCy Schubert[AC_REQUIRE([AC_CANONICAL_HOST])dnl 38932b15cb3dSCy SchubertAC_REQUIRE([AC_PROG_CC])dnl 38942b15cb3dSCy SchubertAC_REQUIRE([AC_PROG_AWK])dnl 38952b15cb3dSCy SchubertAC_REQUIRE([LT_PATH_NM])dnl 38962b15cb3dSCy SchubertAC_REQUIRE([LT_PATH_LD])dnl 38972b15cb3dSCy Schubertm4_require([_LT_DECL_SED])dnl 38982b15cb3dSCy Schubertm4_require([_LT_DECL_EGREP])dnl 38992b15cb3dSCy Schubertm4_require([_LT_TAG_COMPILER])dnl 39002b15cb3dSCy Schubert 39012b15cb3dSCy Schubert# Check for command to grab the raw symbol name followed by C symbol from nm. 39022b15cb3dSCy SchubertAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39032b15cb3dSCy SchubertAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 39042b15cb3dSCy Schubert[ 39052b15cb3dSCy Schubert# These are sane defaults that work on at least a few old systems. 39062b15cb3dSCy Schubert# [They come from Ultrix. What could be older than Ultrix?!! ;)] 39072b15cb3dSCy Schubert 39082b15cb3dSCy Schubert# Character class describing NM global symbol codes. 39092b15cb3dSCy Schubertsymcode='[[BCDEGRST]]' 39102b15cb3dSCy Schubert 39112b15cb3dSCy Schubert# Regexp to match symbols that can be accessed directly from C. 39122b15cb3dSCy Schubertsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 39132b15cb3dSCy Schubert 39142b15cb3dSCy Schubert# Define system-specific variables. 39152b15cb3dSCy Schubertcase $host_os in 39162b15cb3dSCy Schubertaix*) 39172b15cb3dSCy Schubert symcode='[[BCDT]]' 39182b15cb3dSCy Schubert ;; 39192b15cb3dSCy Schubertcygwin* | mingw* | pw32* | cegcc*) 39202b15cb3dSCy Schubert symcode='[[ABCDGISTW]]' 39212b15cb3dSCy Schubert ;; 39222b15cb3dSCy Schuberthpux*) 3923*f0574f5cSXin LI if test ia64 = "$host_cpu"; then 39242b15cb3dSCy Schubert symcode='[[ABCDEGRST]]' 39252b15cb3dSCy Schubert fi 39262b15cb3dSCy Schubert ;; 39272b15cb3dSCy Schubertirix* | nonstopux*) 39282b15cb3dSCy Schubert symcode='[[BCDEGRST]]' 39292b15cb3dSCy Schubert ;; 39302b15cb3dSCy Schubertosf*) 39312b15cb3dSCy Schubert symcode='[[BCDEGQRST]]' 39322b15cb3dSCy Schubert ;; 39332b15cb3dSCy Schubertsolaris*) 39342b15cb3dSCy Schubert symcode='[[BDRT]]' 39352b15cb3dSCy Schubert ;; 39362b15cb3dSCy Schubertsco3.2v5*) 39372b15cb3dSCy Schubert symcode='[[DT]]' 39382b15cb3dSCy Schubert ;; 39392b15cb3dSCy Schubertsysv4.2uw2*) 39402b15cb3dSCy Schubert symcode='[[DT]]' 39412b15cb3dSCy Schubert ;; 39422b15cb3dSCy Schubertsysv5* | sco5v6* | unixware* | OpenUNIX*) 39432b15cb3dSCy Schubert symcode='[[ABDT]]' 39442b15cb3dSCy Schubert ;; 39452b15cb3dSCy Schubertsysv4) 39462b15cb3dSCy Schubert symcode='[[DFNSTU]]' 39472b15cb3dSCy Schubert ;; 39482b15cb3dSCy Schubertesac 39492b15cb3dSCy Schubert 39502b15cb3dSCy Schubert# If we're using GNU nm, then use its standard symbol codes. 39512b15cb3dSCy Schubertcase `$NM -V 2>&1` in 39522b15cb3dSCy Schubert*GNU* | *'with BFD'*) 39532b15cb3dSCy Schubert symcode='[[ABCDGIRSTW]]' ;; 39542b15cb3dSCy Schubertesac 39552b15cb3dSCy Schubert 3956*f0574f5cSXin LIif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3957*f0574f5cSXin LI # Gets list of data symbols to import. 3958*f0574f5cSXin LI lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3959*f0574f5cSXin LI # Adjust the below global symbol transforms to fixup imported variables. 3960*f0574f5cSXin LI lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3961*f0574f5cSXin LI lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3962*f0574f5cSXin LI lt_c_name_lib_hook="\ 3963*f0574f5cSXin LI -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3964*f0574f5cSXin LI -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3965*f0574f5cSXin LIelse 3966*f0574f5cSXin LI # Disable hooks by default. 3967*f0574f5cSXin LI lt_cv_sys_global_symbol_to_import= 3968*f0574f5cSXin LI lt_cdecl_hook= 3969*f0574f5cSXin LI lt_c_name_hook= 3970*f0574f5cSXin LI lt_c_name_lib_hook= 3971*f0574f5cSXin LIfi 3972*f0574f5cSXin LI 39732b15cb3dSCy Schubert# Transform an extracted symbol line into a proper C declaration. 39742b15cb3dSCy Schubert# Some systems (esp. on ia64) link data and code symbols differently, 39752b15cb3dSCy Schubert# so use this general approach. 3976*f0574f5cSXin LIlt_cv_sys_global_symbol_to_cdecl="sed -n"\ 3977*f0574f5cSXin LI$lt_cdecl_hook\ 3978*f0574f5cSXin LI" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 3979*f0574f5cSXin LI" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 39802b15cb3dSCy Schubert 39812b15cb3dSCy Schubert# Transform an extracted symbol line into symbol name and symbol address 3982*f0574f5cSXin LIlt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 3983*f0574f5cSXin LI$lt_c_name_hook\ 3984*f0574f5cSXin LI" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 3985*f0574f5cSXin LI" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 3986*f0574f5cSXin LI 3987*f0574f5cSXin LI# Transform an extracted symbol line into symbol name with lib prefix and 3988*f0574f5cSXin LI# symbol address. 3989*f0574f5cSXin LIlt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 3990*f0574f5cSXin LI$lt_c_name_lib_hook\ 3991*f0574f5cSXin LI" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 3992*f0574f5cSXin LI" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 3993*f0574f5cSXin LI" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 39942b15cb3dSCy Schubert 39952b15cb3dSCy Schubert# Handle CRLF in mingw tool chain 39962b15cb3dSCy Schubertopt_cr= 39972b15cb3dSCy Schubertcase $build_os in 39982b15cb3dSCy Schubertmingw*) 39992b15cb3dSCy Schubert opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40002b15cb3dSCy Schubert ;; 40012b15cb3dSCy Schubertesac 40022b15cb3dSCy Schubert 40032b15cb3dSCy Schubert# Try without a prefix underscore, then with it. 40042b15cb3dSCy Schubertfor ac_symprfx in "" "_"; do 40052b15cb3dSCy Schubert 40062b15cb3dSCy Schubert # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40072b15cb3dSCy Schubert symxfrm="\\1 $ac_symprfx\\2 \\2" 40082b15cb3dSCy Schubert 40092b15cb3dSCy Schubert # Write the raw and C identifiers. 40102b15cb3dSCy Schubert if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4011*f0574f5cSXin LI # Fake it for dumpbin and say T for any non-static function, 4012*f0574f5cSXin LI # D for any global variable and I for any imported variable. 40132b15cb3dSCy Schubert # Also find C++ and __fastcall symbols from MSVC++, 40142b15cb3dSCy Schubert # which start with @ or ?. 40152b15cb3dSCy Schubert lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40162b15cb3dSCy Schubert" {last_section=section; section=\$ 3};"\ 4017*f0574f5cSXin LI" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40182b15cb3dSCy Schubert" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4019*f0574f5cSXin LI" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4020*f0574f5cSXin LI" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4021*f0574f5cSXin LI" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40222b15cb3dSCy Schubert" \$ 0!~/External *\|/{next};"\ 40232b15cb3dSCy Schubert" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40242b15cb3dSCy Schubert" {if(hide[section]) next};"\ 4025*f0574f5cSXin LI" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 40262b15cb3dSCy Schubert" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4027*f0574f5cSXin LI" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4028*f0574f5cSXin LI" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40292b15cb3dSCy Schubert" ' prfx=^$ac_symprfx]" 40302b15cb3dSCy Schubert else 40312b15cb3dSCy Schubert lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40322b15cb3dSCy Schubert fi 40332b15cb3dSCy Schubert lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 40342b15cb3dSCy Schubert 40352b15cb3dSCy Schubert # Check to see that the pipe works correctly. 40362b15cb3dSCy Schubert pipe_works=no 40372b15cb3dSCy Schubert 40382b15cb3dSCy Schubert rm -f conftest* 40392b15cb3dSCy Schubert cat > conftest.$ac_ext <<_LT_EOF 40402b15cb3dSCy Schubert#ifdef __cplusplus 40412b15cb3dSCy Schubertextern "C" { 40422b15cb3dSCy Schubert#endif 40432b15cb3dSCy Schubertchar nm_test_var; 40442b15cb3dSCy Schubertvoid nm_test_func(void); 40452b15cb3dSCy Schubertvoid nm_test_func(void){} 40462b15cb3dSCy Schubert#ifdef __cplusplus 40472b15cb3dSCy Schubert} 40482b15cb3dSCy Schubert#endif 40492b15cb3dSCy Schubertint main(){nm_test_var='a';nm_test_func();return(0);} 40502b15cb3dSCy Schubert_LT_EOF 40512b15cb3dSCy Schubert 40522b15cb3dSCy Schubert if AC_TRY_EVAL(ac_compile); then 40532b15cb3dSCy Schubert # Now try to grab the symbols. 40542b15cb3dSCy Schubert nlist=conftest.nm 40552b15cb3dSCy Schubert if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 40562b15cb3dSCy Schubert # Try sorting and uniquifying the output. 40572b15cb3dSCy Schubert if sort "$nlist" | uniq > "$nlist"T; then 40582b15cb3dSCy Schubert mv -f "$nlist"T "$nlist" 40592b15cb3dSCy Schubert else 40602b15cb3dSCy Schubert rm -f "$nlist"T 40612b15cb3dSCy Schubert fi 40622b15cb3dSCy Schubert 40632b15cb3dSCy Schubert # Make sure that we snagged all the symbols we need. 40642b15cb3dSCy Schubert if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 40652b15cb3dSCy Schubert if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 40662b15cb3dSCy Schubert cat <<_LT_EOF > conftest.$ac_ext 40672b15cb3dSCy Schubert/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4068*f0574f5cSXin LI#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4069*f0574f5cSXin LI/* DATA imports from DLLs on WIN32 can't be const, because runtime 40702b15cb3dSCy Schubert relocations are performed -- see ld's documentation on pseudo-relocs. */ 40712b15cb3dSCy Schubert# define LT@&t@_DLSYM_CONST 4072*f0574f5cSXin LI#elif defined __osf__ 40732b15cb3dSCy Schubert/* This system does not cope well with relocations in const data. */ 40742b15cb3dSCy Schubert# define LT@&t@_DLSYM_CONST 40752b15cb3dSCy Schubert#else 40762b15cb3dSCy Schubert# define LT@&t@_DLSYM_CONST const 40772b15cb3dSCy Schubert#endif 40782b15cb3dSCy Schubert 40792b15cb3dSCy Schubert#ifdef __cplusplus 40802b15cb3dSCy Schubertextern "C" { 40812b15cb3dSCy Schubert#endif 40822b15cb3dSCy Schubert 40832b15cb3dSCy Schubert_LT_EOF 40842b15cb3dSCy Schubert # Now generate the symbol file. 40852b15cb3dSCy Schubert eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 40862b15cb3dSCy Schubert 40872b15cb3dSCy Schubert cat <<_LT_EOF >> conftest.$ac_ext 40882b15cb3dSCy Schubert 40892b15cb3dSCy Schubert/* The mapping between symbol names and symbols. */ 40902b15cb3dSCy SchubertLT@&t@_DLSYM_CONST struct { 40912b15cb3dSCy Schubert const char *name; 40922b15cb3dSCy Schubert void *address; 40932b15cb3dSCy Schubert} 40942b15cb3dSCy Schubertlt__PROGRAM__LTX_preloaded_symbols[[]] = 40952b15cb3dSCy Schubert{ 40962b15cb3dSCy Schubert { "@PROGRAM@", (void *) 0 }, 40972b15cb3dSCy Schubert_LT_EOF 4098*f0574f5cSXin LI $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 40992b15cb3dSCy Schubert cat <<\_LT_EOF >> conftest.$ac_ext 41002b15cb3dSCy Schubert {0, (void *) 0} 41012b15cb3dSCy Schubert}; 41022b15cb3dSCy Schubert 41032b15cb3dSCy Schubert/* This works around a problem in FreeBSD linker */ 41042b15cb3dSCy Schubert#ifdef FREEBSD_WORKAROUND 41052b15cb3dSCy Schubertstatic const void *lt_preloaded_setup() { 41062b15cb3dSCy Schubert return lt__PROGRAM__LTX_preloaded_symbols; 41072b15cb3dSCy Schubert} 41082b15cb3dSCy Schubert#endif 41092b15cb3dSCy Schubert 41102b15cb3dSCy Schubert#ifdef __cplusplus 41112b15cb3dSCy Schubert} 41122b15cb3dSCy Schubert#endif 41132b15cb3dSCy Schubert_LT_EOF 41142b15cb3dSCy Schubert # Now try linking the two files. 41152b15cb3dSCy Schubert mv conftest.$ac_objext conftstm.$ac_objext 41162b15cb3dSCy Schubert lt_globsym_save_LIBS=$LIBS 41172b15cb3dSCy Schubert lt_globsym_save_CFLAGS=$CFLAGS 4118*f0574f5cSXin LI LIBS=conftstm.$ac_objext 41192b15cb3dSCy Schubert CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4120*f0574f5cSXin LI if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41212b15cb3dSCy Schubert pipe_works=yes 41222b15cb3dSCy Schubert fi 41232b15cb3dSCy Schubert LIBS=$lt_globsym_save_LIBS 41242b15cb3dSCy Schubert CFLAGS=$lt_globsym_save_CFLAGS 41252b15cb3dSCy Schubert else 41262b15cb3dSCy Schubert echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 41272b15cb3dSCy Schubert fi 41282b15cb3dSCy Schubert else 41292b15cb3dSCy Schubert echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 41302b15cb3dSCy Schubert fi 41312b15cb3dSCy Schubert else 41322b15cb3dSCy Schubert echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 41332b15cb3dSCy Schubert fi 41342b15cb3dSCy Schubert else 41352b15cb3dSCy Schubert echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41362b15cb3dSCy Schubert cat conftest.$ac_ext >&5 41372b15cb3dSCy Schubert fi 41382b15cb3dSCy Schubert rm -rf conftest* conftst* 41392b15cb3dSCy Schubert 41402b15cb3dSCy Schubert # Do not use the global_symbol_pipe unless it works. 4141*f0574f5cSXin LI if test yes = "$pipe_works"; then 41422b15cb3dSCy Schubert break 41432b15cb3dSCy Schubert else 41442b15cb3dSCy Schubert lt_cv_sys_global_symbol_pipe= 41452b15cb3dSCy Schubert fi 41462b15cb3dSCy Schubertdone 41472b15cb3dSCy Schubert]) 41482b15cb3dSCy Schubertif test -z "$lt_cv_sys_global_symbol_pipe"; then 41492b15cb3dSCy Schubert lt_cv_sys_global_symbol_to_cdecl= 41502b15cb3dSCy Schubertfi 41512b15cb3dSCy Schubertif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 41522b15cb3dSCy Schubert AC_MSG_RESULT(failed) 41532b15cb3dSCy Schubertelse 41542b15cb3dSCy Schubert AC_MSG_RESULT(ok) 41552b15cb3dSCy Schubertfi 41562b15cb3dSCy Schubert 41572b15cb3dSCy Schubert# Response file support. 41582b15cb3dSCy Schubertif test "$lt_cv_nm_interface" = "MS dumpbin"; then 41592b15cb3dSCy Schubert nm_file_list_spec='@' 41602b15cb3dSCy Schubertelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 41612b15cb3dSCy Schubert nm_file_list_spec='@' 41622b15cb3dSCy Schubertfi 41632b15cb3dSCy Schubert 41642b15cb3dSCy Schubert_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 41652b15cb3dSCy Schubert [Take the output of nm and produce a listing of raw symbols and C names]) 41662b15cb3dSCy Schubert_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 41672b15cb3dSCy Schubert [Transform the output of nm in a proper C declaration]) 4168*f0574f5cSXin LI_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4169*f0574f5cSXin LI [Transform the output of nm into a list of symbols to manually relocate]) 41702b15cb3dSCy Schubert_LT_DECL([global_symbol_to_c_name_address], 41712b15cb3dSCy Schubert [lt_cv_sys_global_symbol_to_c_name_address], [1], 41722b15cb3dSCy Schubert [Transform the output of nm in a C name address pair]) 41732b15cb3dSCy Schubert_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 41742b15cb3dSCy Schubert [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 41752b15cb3dSCy Schubert [Transform the output of nm in a C name address pair when lib prefix is needed]) 4176*f0574f5cSXin LI_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4177*f0574f5cSXin LI [The name lister interface]) 41782b15cb3dSCy Schubert_LT_DECL([], [nm_file_list_spec], [1], 41792b15cb3dSCy Schubert [Specify filename containing input files for $NM]) 41802b15cb3dSCy Schubert]) # _LT_CMD_GLOBAL_SYMBOLS 41812b15cb3dSCy Schubert 41822b15cb3dSCy Schubert 41832b15cb3dSCy Schubert# _LT_COMPILER_PIC([TAGNAME]) 41842b15cb3dSCy Schubert# --------------------------- 41852b15cb3dSCy Schubertm4_defun([_LT_COMPILER_PIC], 41862b15cb3dSCy Schubert[m4_require([_LT_TAG_COMPILER])dnl 41872b15cb3dSCy Schubert_LT_TAGVAR(lt_prog_compiler_wl, $1)= 41882b15cb3dSCy Schubert_LT_TAGVAR(lt_prog_compiler_pic, $1)= 41892b15cb3dSCy Schubert_LT_TAGVAR(lt_prog_compiler_static, $1)= 41902b15cb3dSCy Schubert 41912b15cb3dSCy Schubertm4_if([$1], [CXX], [ 41922b15cb3dSCy Schubert # C++ specific cases for pic, static, wl, etc. 4193*f0574f5cSXin LI if test yes = "$GXX"; then 41942b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41952b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 41962b15cb3dSCy Schubert 41972b15cb3dSCy Schubert case $host_os in 41982b15cb3dSCy Schubert aix*) 41992b15cb3dSCy Schubert # All AIX code is PIC. 4200*f0574f5cSXin LI if test ia64 = "$host_cpu"; then 42012b15cb3dSCy Schubert # AIX 5 now supports IA64 processor 42022b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42032b15cb3dSCy Schubert fi 4204*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42052b15cb3dSCy Schubert ;; 42062b15cb3dSCy Schubert 42072b15cb3dSCy Schubert amigaos*) 42082b15cb3dSCy Schubert case $host_cpu in 42092b15cb3dSCy Schubert powerpc) 42102b15cb3dSCy Schubert # see comment about AmigaOS4 .so support 42112b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42122b15cb3dSCy Schubert ;; 42132b15cb3dSCy Schubert m68k) 42142b15cb3dSCy Schubert # FIXME: we need at least 68020 code to build shared libraries, but 4215*f0574f5cSXin LI # adding the '-m68020' flag to GCC prevents building anything better, 4216*f0574f5cSXin LI # like '-m68040'. 42172b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42182b15cb3dSCy Schubert ;; 42192b15cb3dSCy Schubert esac 42202b15cb3dSCy Schubert ;; 42212b15cb3dSCy Schubert 42222b15cb3dSCy Schubert beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42232b15cb3dSCy Schubert # PIC is the default for these OSes. 42242b15cb3dSCy Schubert ;; 42252b15cb3dSCy Schubert mingw* | cygwin* | os2* | pw32* | cegcc*) 42262b15cb3dSCy Schubert # This hack is so that the source file can tell whether it is being 42272b15cb3dSCy Schubert # built for inclusion in a dll (and should export symbols for example). 42282b15cb3dSCy Schubert # Although the cygwin gcc ignores -fPIC, still need this for old-style 42292b15cb3dSCy Schubert # (--disable-auto-import) libraries 42302b15cb3dSCy Schubert m4_if([$1], [GCJ], [], 42312b15cb3dSCy Schubert [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4232*f0574f5cSXin LI case $host_os in 4233*f0574f5cSXin LI os2*) 4234*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4235*f0574f5cSXin LI ;; 4236*f0574f5cSXin LI esac 42372b15cb3dSCy Schubert ;; 42382b15cb3dSCy Schubert darwin* | rhapsody*) 42392b15cb3dSCy Schubert # PIC is the default on this platform 42402b15cb3dSCy Schubert # Common symbols not allowed in MH_DYLIB files 42412b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42422b15cb3dSCy Schubert ;; 42432b15cb3dSCy Schubert *djgpp*) 42442b15cb3dSCy Schubert # DJGPP does not support shared libraries at all 42452b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42462b15cb3dSCy Schubert ;; 42472b15cb3dSCy Schubert haiku*) 42482b15cb3dSCy Schubert # PIC is the default for Haiku. 42492b15cb3dSCy Schubert # The "-static" flag exists, but is broken. 42502b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)= 42512b15cb3dSCy Schubert ;; 42522b15cb3dSCy Schubert interix[[3-9]]*) 42532b15cb3dSCy Schubert # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42542b15cb3dSCy Schubert # Instead, we relocate shared libraries at runtime. 42552b15cb3dSCy Schubert ;; 42562b15cb3dSCy Schubert sysv4*MP*) 42572b15cb3dSCy Schubert if test -d /usr/nec; then 42582b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42592b15cb3dSCy Schubert fi 42602b15cb3dSCy Schubert ;; 42612b15cb3dSCy Schubert hpux*) 42622b15cb3dSCy Schubert # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42632b15cb3dSCy Schubert # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42642b15cb3dSCy Schubert # sets the default TLS model and affects inlining. 42652b15cb3dSCy Schubert case $host_cpu in 42662b15cb3dSCy Schubert hppa*64*) 42672b15cb3dSCy Schubert ;; 42682b15cb3dSCy Schubert *) 42692b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42702b15cb3dSCy Schubert ;; 42712b15cb3dSCy Schubert esac 42722b15cb3dSCy Schubert ;; 42732b15cb3dSCy Schubert *qnx* | *nto*) 42742b15cb3dSCy Schubert # QNX uses GNU C++, but need to define -shared option too, otherwise 42752b15cb3dSCy Schubert # it will coredump. 42762b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 42772b15cb3dSCy Schubert ;; 42782b15cb3dSCy Schubert *) 42792b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42802b15cb3dSCy Schubert ;; 42812b15cb3dSCy Schubert esac 42822b15cb3dSCy Schubert else 42832b15cb3dSCy Schubert case $host_os in 42842b15cb3dSCy Schubert aix[[4-9]]*) 42852b15cb3dSCy Schubert # All AIX code is PIC. 4286*f0574f5cSXin LI if test ia64 = "$host_cpu"; then 42872b15cb3dSCy Schubert # AIX 5 now supports IA64 processor 42882b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42892b15cb3dSCy Schubert else 42902b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 42912b15cb3dSCy Schubert fi 42922b15cb3dSCy Schubert ;; 42932b15cb3dSCy Schubert chorus*) 42942b15cb3dSCy Schubert case $cc_basename in 42952b15cb3dSCy Schubert cxch68*) 42962b15cb3dSCy Schubert # Green Hills C++ Compiler 42972b15cb3dSCy Schubert # _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" 42982b15cb3dSCy Schubert ;; 42992b15cb3dSCy Schubert esac 43002b15cb3dSCy Schubert ;; 43012b15cb3dSCy Schubert mingw* | cygwin* | os2* | pw32* | cegcc*) 43022b15cb3dSCy Schubert # This hack is so that the source file can tell whether it is being 43032b15cb3dSCy Schubert # built for inclusion in a dll (and should export symbols for example). 43042b15cb3dSCy Schubert m4_if([$1], [GCJ], [], 43052b15cb3dSCy Schubert [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43062b15cb3dSCy Schubert ;; 43072b15cb3dSCy Schubert dgux*) 43082b15cb3dSCy Schubert case $cc_basename in 43092b15cb3dSCy Schubert ec++*) 43102b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43112b15cb3dSCy Schubert ;; 43122b15cb3dSCy Schubert ghcx*) 43132b15cb3dSCy Schubert # Green Hills C++ Compiler 43142b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43152b15cb3dSCy Schubert ;; 43162b15cb3dSCy Schubert *) 43172b15cb3dSCy Schubert ;; 43182b15cb3dSCy Schubert esac 43192b15cb3dSCy Schubert ;; 43202b15cb3dSCy Schubert freebsd* | dragonfly*) 43212b15cb3dSCy Schubert # FreeBSD uses GNU C++ 43222b15cb3dSCy Schubert ;; 43232b15cb3dSCy Schubert hpux9* | hpux10* | hpux11*) 43242b15cb3dSCy Schubert case $cc_basename in 43252b15cb3dSCy Schubert CC*) 43262b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4327*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4328*f0574f5cSXin LI if test ia64 != "$host_cpu"; then 43292b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43302b15cb3dSCy Schubert fi 43312b15cb3dSCy Schubert ;; 43322b15cb3dSCy Schubert aCC*) 43332b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4334*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43352b15cb3dSCy Schubert case $host_cpu in 43362b15cb3dSCy Schubert hppa*64*|ia64*) 43372b15cb3dSCy Schubert # +Z the default 43382b15cb3dSCy Schubert ;; 43392b15cb3dSCy Schubert *) 43402b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43412b15cb3dSCy Schubert ;; 43422b15cb3dSCy Schubert esac 43432b15cb3dSCy Schubert ;; 43442b15cb3dSCy Schubert *) 43452b15cb3dSCy Schubert ;; 43462b15cb3dSCy Schubert esac 43472b15cb3dSCy Schubert ;; 43482b15cb3dSCy Schubert interix*) 43492b15cb3dSCy Schubert # This is c89, which is MS Visual C++ (no shared libs) 43502b15cb3dSCy Schubert # Anyone wants to do a port? 43512b15cb3dSCy Schubert ;; 43522b15cb3dSCy Schubert irix5* | irix6* | nonstopux*) 43532b15cb3dSCy Schubert case $cc_basename in 43542b15cb3dSCy Schubert CC*) 43552b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43562b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43572b15cb3dSCy Schubert # CC pic flag -KPIC is the default. 43582b15cb3dSCy Schubert ;; 43592b15cb3dSCy Schubert *) 43602b15cb3dSCy Schubert ;; 43612b15cb3dSCy Schubert esac 43622b15cb3dSCy Schubert ;; 4363*f0574f5cSXin LI linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43642b15cb3dSCy Schubert case $cc_basename in 43652b15cb3dSCy Schubert KCC*) 43662b15cb3dSCy Schubert # KAI C++ Compiler 43672b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 43682b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43692b15cb3dSCy Schubert ;; 43702b15cb3dSCy Schubert ecpc* ) 4371*f0574f5cSXin LI # old Intel C++ for x86_64, which still supported -KPIC. 43722b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43732b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43742b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43752b15cb3dSCy Schubert ;; 43762b15cb3dSCy Schubert icpc* ) 43772b15cb3dSCy Schubert # Intel C++, used to be incompatible with GCC. 43782b15cb3dSCy Schubert # ICC 10 doesn't accept -KPIC any more. 43792b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43802b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43812b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43822b15cb3dSCy Schubert ;; 43832b15cb3dSCy Schubert pgCC* | pgcpp*) 43842b15cb3dSCy Schubert # Portland Group C++ compiler 43852b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43862b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 43872b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43882b15cb3dSCy Schubert ;; 43892b15cb3dSCy Schubert cxx*) 43902b15cb3dSCy Schubert # Compaq C++ 43912b15cb3dSCy Schubert # Make sure the PIC flag is empty. It appears that all Alpha 43922b15cb3dSCy Schubert # Linux and Compaq Tru64 Unix objects are PIC. 43932b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)= 43942b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43952b15cb3dSCy Schubert ;; 43962b15cb3dSCy Schubert xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 43972b15cb3dSCy Schubert # IBM XL 8.0, 9.0 on PPC and BlueGene 43982b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43992b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44002b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44012b15cb3dSCy Schubert ;; 44022b15cb3dSCy Schubert *) 44032b15cb3dSCy Schubert case `$CC -V 2>&1 | sed 5q` in 44042b15cb3dSCy Schubert *Sun\ C*) 44052b15cb3dSCy Schubert # Sun C++ 5.9 44062b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44072b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44082b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44092b15cb3dSCy Schubert ;; 44102b15cb3dSCy Schubert esac 44112b15cb3dSCy Schubert ;; 44122b15cb3dSCy Schubert esac 44132b15cb3dSCy Schubert ;; 44142b15cb3dSCy Schubert lynxos*) 44152b15cb3dSCy Schubert ;; 44162b15cb3dSCy Schubert m88k*) 44172b15cb3dSCy Schubert ;; 44182b15cb3dSCy Schubert mvs*) 44192b15cb3dSCy Schubert case $cc_basename in 44202b15cb3dSCy Schubert cxx*) 44212b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44222b15cb3dSCy Schubert ;; 44232b15cb3dSCy Schubert *) 44242b15cb3dSCy Schubert ;; 44252b15cb3dSCy Schubert esac 44262b15cb3dSCy Schubert ;; 44272b15cb3dSCy Schubert netbsd*) 44282b15cb3dSCy Schubert ;; 44292b15cb3dSCy Schubert *qnx* | *nto*) 44302b15cb3dSCy Schubert # QNX uses GNU C++, but need to define -shared option too, otherwise 44312b15cb3dSCy Schubert # it will coredump. 44322b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44332b15cb3dSCy Schubert ;; 44342b15cb3dSCy Schubert osf3* | osf4* | osf5*) 44352b15cb3dSCy Schubert case $cc_basename in 44362b15cb3dSCy Schubert KCC*) 44372b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44382b15cb3dSCy Schubert ;; 44392b15cb3dSCy Schubert RCC*) 44402b15cb3dSCy Schubert # Rational C++ 2.4.1 44412b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44422b15cb3dSCy Schubert ;; 44432b15cb3dSCy Schubert cxx*) 44442b15cb3dSCy Schubert # Digital/Compaq C++ 44452b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44462b15cb3dSCy Schubert # Make sure the PIC flag is empty. It appears that all Alpha 44472b15cb3dSCy Schubert # Linux and Compaq Tru64 Unix objects are PIC. 44482b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44492b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44502b15cb3dSCy Schubert ;; 44512b15cb3dSCy Schubert *) 44522b15cb3dSCy Schubert ;; 44532b15cb3dSCy Schubert esac 44542b15cb3dSCy Schubert ;; 44552b15cb3dSCy Schubert psos*) 44562b15cb3dSCy Schubert ;; 44572b15cb3dSCy Schubert solaris*) 44582b15cb3dSCy Schubert case $cc_basename in 44592b15cb3dSCy Schubert CC* | sunCC*) 44602b15cb3dSCy Schubert # Sun C++ 4.2, 5.x and Centerline C++ 44612b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44622b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44632b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44642b15cb3dSCy Schubert ;; 44652b15cb3dSCy Schubert gcx*) 44662b15cb3dSCy Schubert # Green Hills C++ Compiler 44672b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44682b15cb3dSCy Schubert ;; 44692b15cb3dSCy Schubert *) 44702b15cb3dSCy Schubert ;; 44712b15cb3dSCy Schubert esac 44722b15cb3dSCy Schubert ;; 44732b15cb3dSCy Schubert sunos4*) 44742b15cb3dSCy Schubert case $cc_basename in 44752b15cb3dSCy Schubert CC*) 44762b15cb3dSCy Schubert # Sun C++ 4.x 44772b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44782b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44792b15cb3dSCy Schubert ;; 44802b15cb3dSCy Schubert lcc*) 44812b15cb3dSCy Schubert # Lucid 44822b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44832b15cb3dSCy Schubert ;; 44842b15cb3dSCy Schubert *) 44852b15cb3dSCy Schubert ;; 44862b15cb3dSCy Schubert esac 44872b15cb3dSCy Schubert ;; 44882b15cb3dSCy Schubert sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 44892b15cb3dSCy Schubert case $cc_basename in 44902b15cb3dSCy Schubert CC*) 44912b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44922b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44932b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44942b15cb3dSCy Schubert ;; 44952b15cb3dSCy Schubert esac 44962b15cb3dSCy Schubert ;; 44972b15cb3dSCy Schubert tandem*) 44982b15cb3dSCy Schubert case $cc_basename in 44992b15cb3dSCy Schubert NCC*) 45002b15cb3dSCy Schubert # NonStop-UX NCC 3.20 45012b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45022b15cb3dSCy Schubert ;; 45032b15cb3dSCy Schubert *) 45042b15cb3dSCy Schubert ;; 45052b15cb3dSCy Schubert esac 45062b15cb3dSCy Schubert ;; 45072b15cb3dSCy Schubert vxworks*) 45082b15cb3dSCy Schubert ;; 45092b15cb3dSCy Schubert *) 45102b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45112b15cb3dSCy Schubert ;; 45122b15cb3dSCy Schubert esac 45132b15cb3dSCy Schubert fi 45142b15cb3dSCy Schubert], 45152b15cb3dSCy Schubert[ 4516*f0574f5cSXin LI if test yes = "$GCC"; then 45172b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45182b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45192b15cb3dSCy Schubert 45202b15cb3dSCy Schubert case $host_os in 45212b15cb3dSCy Schubert aix*) 45222b15cb3dSCy Schubert # All AIX code is PIC. 4523*f0574f5cSXin LI if test ia64 = "$host_cpu"; then 45242b15cb3dSCy Schubert # AIX 5 now supports IA64 processor 45252b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45262b15cb3dSCy Schubert fi 4527*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45282b15cb3dSCy Schubert ;; 45292b15cb3dSCy Schubert 45302b15cb3dSCy Schubert amigaos*) 45312b15cb3dSCy Schubert case $host_cpu in 45322b15cb3dSCy Schubert powerpc) 45332b15cb3dSCy Schubert # see comment about AmigaOS4 .so support 45342b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45352b15cb3dSCy Schubert ;; 45362b15cb3dSCy Schubert m68k) 45372b15cb3dSCy Schubert # FIXME: we need at least 68020 code to build shared libraries, but 4538*f0574f5cSXin LI # adding the '-m68020' flag to GCC prevents building anything better, 4539*f0574f5cSXin LI # like '-m68040'. 45402b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45412b15cb3dSCy Schubert ;; 45422b15cb3dSCy Schubert esac 45432b15cb3dSCy Schubert ;; 45442b15cb3dSCy Schubert 45452b15cb3dSCy Schubert beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45462b15cb3dSCy Schubert # PIC is the default for these OSes. 45472b15cb3dSCy Schubert ;; 45482b15cb3dSCy Schubert 45492b15cb3dSCy Schubert mingw* | cygwin* | pw32* | os2* | cegcc*) 45502b15cb3dSCy Schubert # This hack is so that the source file can tell whether it is being 45512b15cb3dSCy Schubert # built for inclusion in a dll (and should export symbols for example). 45522b15cb3dSCy Schubert # Although the cygwin gcc ignores -fPIC, still need this for old-style 45532b15cb3dSCy Schubert # (--disable-auto-import) libraries 45542b15cb3dSCy Schubert m4_if([$1], [GCJ], [], 45552b15cb3dSCy Schubert [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4556*f0574f5cSXin LI case $host_os in 4557*f0574f5cSXin LI os2*) 4558*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4559*f0574f5cSXin LI ;; 4560*f0574f5cSXin LI esac 45612b15cb3dSCy Schubert ;; 45622b15cb3dSCy Schubert 45632b15cb3dSCy Schubert darwin* | rhapsody*) 45642b15cb3dSCy Schubert # PIC is the default on this platform 45652b15cb3dSCy Schubert # Common symbols not allowed in MH_DYLIB files 45662b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 45672b15cb3dSCy Schubert ;; 45682b15cb3dSCy Schubert 45692b15cb3dSCy Schubert haiku*) 45702b15cb3dSCy Schubert # PIC is the default for Haiku. 45712b15cb3dSCy Schubert # The "-static" flag exists, but is broken. 45722b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)= 45732b15cb3dSCy Schubert ;; 45742b15cb3dSCy Schubert 45752b15cb3dSCy Schubert hpux*) 45762b15cb3dSCy Schubert # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 45772b15cb3dSCy Schubert # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 45782b15cb3dSCy Schubert # sets the default TLS model and affects inlining. 45792b15cb3dSCy Schubert case $host_cpu in 45802b15cb3dSCy Schubert hppa*64*) 45812b15cb3dSCy Schubert # +Z the default 45822b15cb3dSCy Schubert ;; 45832b15cb3dSCy Schubert *) 45842b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45852b15cb3dSCy Schubert ;; 45862b15cb3dSCy Schubert esac 45872b15cb3dSCy Schubert ;; 45882b15cb3dSCy Schubert 45892b15cb3dSCy Schubert interix[[3-9]]*) 45902b15cb3dSCy Schubert # Interix 3.x gcc -fpic/-fPIC options generate broken code. 45912b15cb3dSCy Schubert # Instead, we relocate shared libraries at runtime. 45922b15cb3dSCy Schubert ;; 45932b15cb3dSCy Schubert 45942b15cb3dSCy Schubert msdosdjgpp*) 45952b15cb3dSCy Schubert # Just because we use GCC doesn't mean we suddenly get shared libraries 45962b15cb3dSCy Schubert # on systems that don't support them. 45972b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45982b15cb3dSCy Schubert enable_shared=no 45992b15cb3dSCy Schubert ;; 46002b15cb3dSCy Schubert 46012b15cb3dSCy Schubert *nto* | *qnx*) 46022b15cb3dSCy Schubert # QNX uses GNU C++, but need to define -shared option too, otherwise 46032b15cb3dSCy Schubert # it will coredump. 46042b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46052b15cb3dSCy Schubert ;; 46062b15cb3dSCy Schubert 46072b15cb3dSCy Schubert sysv4*MP*) 46082b15cb3dSCy Schubert if test -d /usr/nec; then 46092b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46102b15cb3dSCy Schubert fi 46112b15cb3dSCy Schubert ;; 46122b15cb3dSCy Schubert 46132b15cb3dSCy Schubert *) 46142b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46152b15cb3dSCy Schubert ;; 46162b15cb3dSCy Schubert esac 46172b15cb3dSCy Schubert 46182b15cb3dSCy Schubert case $cc_basename in 46192b15cb3dSCy Schubert nvcc*) # Cuda Compiler Driver 2.2 46202b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4621*f0574f5cSXin LI if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4622*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4623*f0574f5cSXin LI fi 46242b15cb3dSCy Schubert ;; 46252b15cb3dSCy Schubert esac 46262b15cb3dSCy Schubert else 46272b15cb3dSCy Schubert # PORTME Check for flag to pass linker flags through the system compiler. 46282b15cb3dSCy Schubert case $host_os in 46292b15cb3dSCy Schubert aix*) 46302b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4631*f0574f5cSXin LI if test ia64 = "$host_cpu"; then 46322b15cb3dSCy Schubert # AIX 5 now supports IA64 processor 46332b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46342b15cb3dSCy Schubert else 46352b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46362b15cb3dSCy Schubert fi 46372b15cb3dSCy Schubert ;; 46382b15cb3dSCy Schubert 4639*f0574f5cSXin LI darwin* | rhapsody*) 4640*f0574f5cSXin LI # PIC is the default on this platform 4641*f0574f5cSXin LI # Common symbols not allowed in MH_DYLIB files 4642*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4643*f0574f5cSXin LI case $cc_basename in 4644*f0574f5cSXin LI nagfor*) 4645*f0574f5cSXin LI # NAG Fortran compiler 4646*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4647*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4648*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4649*f0574f5cSXin LI ;; 4650*f0574f5cSXin LI esac 4651*f0574f5cSXin LI ;; 4652*f0574f5cSXin LI 46532b15cb3dSCy Schubert mingw* | cygwin* | pw32* | os2* | cegcc*) 46542b15cb3dSCy Schubert # This hack is so that the source file can tell whether it is being 46552b15cb3dSCy Schubert # built for inclusion in a dll (and should export symbols for example). 46562b15cb3dSCy Schubert m4_if([$1], [GCJ], [], 46572b15cb3dSCy Schubert [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4658*f0574f5cSXin LI case $host_os in 4659*f0574f5cSXin LI os2*) 4660*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4661*f0574f5cSXin LI ;; 4662*f0574f5cSXin LI esac 46632b15cb3dSCy Schubert ;; 46642b15cb3dSCy Schubert 46652b15cb3dSCy Schubert hpux9* | hpux10* | hpux11*) 46662b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46672b15cb3dSCy Schubert # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 46682b15cb3dSCy Schubert # not for PA HP-UX. 46692b15cb3dSCy Schubert case $host_cpu in 46702b15cb3dSCy Schubert hppa*64*|ia64*) 46712b15cb3dSCy Schubert # +Z the default 46722b15cb3dSCy Schubert ;; 46732b15cb3dSCy Schubert *) 46742b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 46752b15cb3dSCy Schubert ;; 46762b15cb3dSCy Schubert esac 46772b15cb3dSCy Schubert # Is there a better lt_prog_compiler_static that works with the bundled CC? 4678*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 46792b15cb3dSCy Schubert ;; 46802b15cb3dSCy Schubert 46812b15cb3dSCy Schubert irix5* | irix6* | nonstopux*) 46822b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46832b15cb3dSCy Schubert # PIC (with -KPIC) is the default. 46842b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 46852b15cb3dSCy Schubert ;; 46862b15cb3dSCy Schubert 4687*f0574f5cSXin LI linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 46882b15cb3dSCy Schubert case $cc_basename in 4689*f0574f5cSXin LI # old Intel for x86_64, which still supported -KPIC. 46902b15cb3dSCy Schubert ecc*) 46912b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46922b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 46932b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 46942b15cb3dSCy Schubert ;; 46952b15cb3dSCy Schubert # icc used to be incompatible with GCC. 46962b15cb3dSCy Schubert # ICC 10 doesn't accept -KPIC any more. 46972b15cb3dSCy Schubert icc* | ifort*) 46982b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46992b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47002b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47012b15cb3dSCy Schubert ;; 47022b15cb3dSCy Schubert # Lahey Fortran 8.1. 47032b15cb3dSCy Schubert lf95*) 47042b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47052b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47062b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47072b15cb3dSCy Schubert ;; 47082b15cb3dSCy Schubert nagfor*) 47092b15cb3dSCy Schubert # NAG Fortran compiler 47102b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47112b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47122b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47132b15cb3dSCy Schubert ;; 4714*f0574f5cSXin LI tcc*) 4715*f0574f5cSXin LI # Fabrice Bellard et al's Tiny C Compiler 4716*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4717*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4718*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4719*f0574f5cSXin LI ;; 47202b15cb3dSCy Schubert pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47212b15cb3dSCy Schubert # Portland Group compilers (*not* the Pentium gcc compiler, 47222b15cb3dSCy Schubert # which looks to be a dead project) 47232b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47242b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47252b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47262b15cb3dSCy Schubert ;; 47272b15cb3dSCy Schubert ccc*) 47282b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47292b15cb3dSCy Schubert # All Alpha code is PIC. 47302b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47312b15cb3dSCy Schubert ;; 47322b15cb3dSCy Schubert xl* | bgxl* | bgf* | mpixl*) 47332b15cb3dSCy Schubert # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47342b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47352b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47362b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47372b15cb3dSCy Schubert ;; 47382b15cb3dSCy Schubert *) 47392b15cb3dSCy Schubert case `$CC -V 2>&1 | sed 5q` in 4740*f0574f5cSXin LI *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47412b15cb3dSCy Schubert # Sun Fortran 8.3 passes all unrecognized flags to the linker 47422b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47432b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47442b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47452b15cb3dSCy Schubert ;; 4746*f0574f5cSXin LI *Sun\ F* | *Sun*Fortran*) 4747*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4748*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4749*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4750*f0574f5cSXin LI ;; 47512b15cb3dSCy Schubert *Sun\ C*) 47522b15cb3dSCy Schubert # Sun C 5.9 47532b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47542b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47552b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47562b15cb3dSCy Schubert ;; 4757*f0574f5cSXin LI *Intel*\ [[CF]]*Compiler*) 4758*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4759*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4760*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4761*f0574f5cSXin LI ;; 4762*f0574f5cSXin LI *Portland\ Group*) 4763*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4764*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4765*f0574f5cSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4766*f0574f5cSXin LI ;; 47672b15cb3dSCy Schubert esac 47682b15cb3dSCy Schubert ;; 47692b15cb3dSCy Schubert esac 47702b15cb3dSCy Schubert ;; 47712b15cb3dSCy Schubert 47722b15cb3dSCy Schubert newsos6) 47732b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47742b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47752b15cb3dSCy Schubert ;; 47762b15cb3dSCy Schubert 47772b15cb3dSCy Schubert *nto* | *qnx*) 47782b15cb3dSCy Schubert # QNX uses GNU C++, but need to define -shared option too, otherwise 47792b15cb3dSCy Schubert # it will coredump. 47802b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 47812b15cb3dSCy Schubert ;; 47822b15cb3dSCy Schubert 47832b15cb3dSCy Schubert osf3* | osf4* | osf5*) 47842b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47852b15cb3dSCy Schubert # All OSF/1 code is PIC. 47862b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47872b15cb3dSCy Schubert ;; 47882b15cb3dSCy Schubert 47892b15cb3dSCy Schubert rdos*) 47902b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47912b15cb3dSCy Schubert ;; 47922b15cb3dSCy Schubert 47932b15cb3dSCy Schubert solaris*) 47942b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47952b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47962b15cb3dSCy Schubert case $cc_basename in 47972b15cb3dSCy Schubert f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 47982b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 47992b15cb3dSCy Schubert *) 48002b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48012b15cb3dSCy Schubert esac 48022b15cb3dSCy Schubert ;; 48032b15cb3dSCy Schubert 48042b15cb3dSCy Schubert sunos4*) 48052b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48062b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48072b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48082b15cb3dSCy Schubert ;; 48092b15cb3dSCy Schubert 48102b15cb3dSCy Schubert sysv4 | sysv4.2uw2* | sysv4.3*) 48112b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48122b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48132b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48142b15cb3dSCy Schubert ;; 48152b15cb3dSCy Schubert 48162b15cb3dSCy Schubert sysv4*MP*) 48172b15cb3dSCy Schubert if test -d /usr/nec; then 48182b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48192b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48202b15cb3dSCy Schubert fi 48212b15cb3dSCy Schubert ;; 48222b15cb3dSCy Schubert 48232b15cb3dSCy Schubert sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48242b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48252b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48262b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48272b15cb3dSCy Schubert ;; 48282b15cb3dSCy Schubert 48292b15cb3dSCy Schubert unicos*) 48302b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48312b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48322b15cb3dSCy Schubert ;; 48332b15cb3dSCy Schubert 48342b15cb3dSCy Schubert uts4*) 48352b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48362b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48372b15cb3dSCy Schubert ;; 48382b15cb3dSCy Schubert 48392b15cb3dSCy Schubert *) 48402b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48412b15cb3dSCy Schubert ;; 48422b15cb3dSCy Schubert esac 48432b15cb3dSCy Schubert fi 48442b15cb3dSCy Schubert]) 48452b15cb3dSCy Schubertcase $host_os in 4846*f0574f5cSXin LI # For platforms that do not support PIC, -DPIC is meaningless: 48472b15cb3dSCy Schubert *djgpp*) 48482b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)= 48492b15cb3dSCy Schubert ;; 48502b15cb3dSCy Schubert *) 48512b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 48522b15cb3dSCy Schubert ;; 48532b15cb3dSCy Schubertesac 48542b15cb3dSCy Schubert 48552b15cb3dSCy SchubertAC_CACHE_CHECK([for $compiler option to produce PIC], 48562b15cb3dSCy Schubert [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 48572b15cb3dSCy Schubert [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 48582b15cb3dSCy Schubert_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 48592b15cb3dSCy Schubert 48602b15cb3dSCy Schubert# 48612b15cb3dSCy Schubert# Check to make sure the PIC flag actually works. 48622b15cb3dSCy Schubert# 48632b15cb3dSCy Schubertif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 48642b15cb3dSCy Schubert _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 48652b15cb3dSCy Schubert [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 48662b15cb3dSCy Schubert [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 48672b15cb3dSCy Schubert [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 48682b15cb3dSCy Schubert "" | " "*) ;; 48692b15cb3dSCy Schubert *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 48702b15cb3dSCy Schubert esac], 48712b15cb3dSCy Schubert [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 48722b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 48732b15cb3dSCy Schubertfi 48742b15cb3dSCy Schubert_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 48752b15cb3dSCy Schubert [Additional compiler flags for building library objects]) 48762b15cb3dSCy Schubert 48772b15cb3dSCy Schubert_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 48782b15cb3dSCy Schubert [How to pass a linker flag through the compiler]) 48792b15cb3dSCy Schubert# 48802b15cb3dSCy Schubert# Check to make sure the static flag actually works. 48812b15cb3dSCy Schubert# 48822b15cb3dSCy Schubertwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 48832b15cb3dSCy Schubert_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 48842b15cb3dSCy Schubert _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 48852b15cb3dSCy Schubert $lt_tmp_static_flag, 48862b15cb3dSCy Schubert [], 48872b15cb3dSCy Schubert [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 48882b15cb3dSCy Schubert_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 48892b15cb3dSCy Schubert [Compiler flag to prevent dynamic linking]) 48902b15cb3dSCy Schubert])# _LT_COMPILER_PIC 48912b15cb3dSCy Schubert 48922b15cb3dSCy Schubert 48932b15cb3dSCy Schubert# _LT_LINKER_SHLIBS([TAGNAME]) 48942b15cb3dSCy Schubert# ---------------------------- 48952b15cb3dSCy Schubert# See if the linker supports building shared libraries. 48962b15cb3dSCy Schubertm4_defun([_LT_LINKER_SHLIBS], 48972b15cb3dSCy Schubert[AC_REQUIRE([LT_PATH_LD])dnl 48982b15cb3dSCy SchubertAC_REQUIRE([LT_PATH_NM])dnl 48992b15cb3dSCy Schubertm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49002b15cb3dSCy Schubertm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49012b15cb3dSCy Schubertm4_require([_LT_DECL_EGREP])dnl 49022b15cb3dSCy Schubertm4_require([_LT_DECL_SED])dnl 49032b15cb3dSCy Schubertm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49042b15cb3dSCy Schubertm4_require([_LT_TAG_COMPILER])dnl 49052b15cb3dSCy SchubertAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49062b15cb3dSCy Schubertm4_if([$1], [CXX], [ 49072b15cb3dSCy Schubert _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49082b15cb3dSCy Schubert _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49092b15cb3dSCy Schubert case $host_os in 49102b15cb3dSCy Schubert aix[[4-9]]*) 49112b15cb3dSCy Schubert # If we're using GNU nm, then we don't want the "-C" option. 4912*f0574f5cSXin LI # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4913*f0574f5cSXin LI # Without the "-l" option, or with the "-B" option, AIX nm treats 4914*f0574f5cSXin LI # weak defined symbols like other global defined symbols, whereas 4915*f0574f5cSXin LI # GNU nm marks them as "W". 4916*f0574f5cSXin LI # While the 'weak' keyword is ignored in the Export File, we need 4917*f0574f5cSXin LI # it in the Import File for the 'aix-soname' feature, so we have 4918*f0574f5cSXin LI # to replace the "-B" option with "-P" for AIX nm. 49192b15cb3dSCy Schubert if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4920*f0574f5cSXin LI _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' 49212b15cb3dSCy Schubert else 4922*f0574f5cSXin LI _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 == "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' 49232b15cb3dSCy Schubert fi 49242b15cb3dSCy Schubert ;; 49252b15cb3dSCy Schubert pw32*) 4926*f0574f5cSXin LI _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 49272b15cb3dSCy Schubert ;; 49282b15cb3dSCy Schubert cygwin* | mingw* | cegcc*) 49292b15cb3dSCy Schubert case $cc_basename in 4930*f0574f5cSXin LI cl*) 4931*f0574f5cSXin LI _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4932*f0574f5cSXin LI ;; 49332b15cb3dSCy Schubert *) 49342b15cb3dSCy Schubert _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' 49352b15cb3dSCy Schubert _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 49362b15cb3dSCy Schubert ;; 49372b15cb3dSCy Schubert esac 49382b15cb3dSCy Schubert ;; 49392b15cb3dSCy Schubert *) 49402b15cb3dSCy Schubert _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49412b15cb3dSCy Schubert ;; 49422b15cb3dSCy Schubert esac 49432b15cb3dSCy Schubert], [ 49442b15cb3dSCy Schubert runpath_var= 49452b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)= 49462b15cb3dSCy Schubert _LT_TAGVAR(always_export_symbols, $1)=no 49472b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)= 49482b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)= 49492b15cb3dSCy Schubert _LT_TAGVAR(compiler_needs_object, $1)=no 49502b15cb3dSCy Schubert _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 49512b15cb3dSCy Schubert _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49522b15cb3dSCy Schubert _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49532b15cb3dSCy Schubert _LT_TAGVAR(hardcode_automatic, $1)=no 49542b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=no 49552b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct_absolute, $1)=no 49562b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49572b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)= 49582b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=no 49592b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 49602b15cb3dSCy Schubert _LT_TAGVAR(inherit_rpath, $1)=no 49612b15cb3dSCy Schubert _LT_TAGVAR(link_all_deplibs, $1)=unknown 49622b15cb3dSCy Schubert _LT_TAGVAR(module_cmds, $1)= 49632b15cb3dSCy Schubert _LT_TAGVAR(module_expsym_cmds, $1)= 49642b15cb3dSCy Schubert _LT_TAGVAR(old_archive_from_new_cmds, $1)= 49652b15cb3dSCy Schubert _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 49662b15cb3dSCy Schubert _LT_TAGVAR(thread_safe_flag_spec, $1)= 49672b15cb3dSCy Schubert _LT_TAGVAR(whole_archive_flag_spec, $1)= 49682b15cb3dSCy Schubert # include_expsyms should be a list of space-separated symbols to be *always* 49692b15cb3dSCy Schubert # included in the symbol list 49702b15cb3dSCy Schubert _LT_TAGVAR(include_expsyms, $1)= 49712b15cb3dSCy Schubert # exclude_expsyms can be an extended regexp of symbols to exclude 4972*f0574f5cSXin LI # it will be wrapped by ' (' and ')$', so one must not match beginning or 4973*f0574f5cSXin LI # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4974*f0574f5cSXin LI # as well as any symbol that contains 'd'. 49752b15cb3dSCy Schubert _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49762b15cb3dSCy Schubert # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 49772b15cb3dSCy Schubert # platforms (ab)use it in PIC code, but their linkers get confused if 49782b15cb3dSCy Schubert # the symbol is explicitly referenced. Since portable code cannot 49792b15cb3dSCy Schubert # rely on this symbol name, it's probably fine to never include it in 49802b15cb3dSCy Schubert # preloaded symbol tables. 49812b15cb3dSCy Schubert # Exclude shared library initialization/finalization symbols. 49822b15cb3dSCy Schubertdnl Note also adjust exclude_expsyms for C++ above. 49832b15cb3dSCy Schubert extract_expsyms_cmds= 49842b15cb3dSCy Schubert 49852b15cb3dSCy Schubert case $host_os in 49862b15cb3dSCy Schubert cygwin* | mingw* | pw32* | cegcc*) 49872b15cb3dSCy Schubert # FIXME: the MSVC++ port hasn't been tested in a loooong time 49882b15cb3dSCy Schubert # When not using gcc, we currently assume that we are using 49892b15cb3dSCy Schubert # Microsoft Visual C++. 4990*f0574f5cSXin LI if test yes != "$GCC"; then 49912b15cb3dSCy Schubert with_gnu_ld=no 49922b15cb3dSCy Schubert fi 49932b15cb3dSCy Schubert ;; 49942b15cb3dSCy Schubert interix*) 49952b15cb3dSCy Schubert # we just hope/assume this is gcc and not c89 (= MSVC++) 49962b15cb3dSCy Schubert with_gnu_ld=yes 49972b15cb3dSCy Schubert ;; 4998*f0574f5cSXin LI openbsd* | bitrig*) 49992b15cb3dSCy Schubert with_gnu_ld=no 50002b15cb3dSCy Schubert ;; 50012b15cb3dSCy Schubert esac 50022b15cb3dSCy Schubert 50032b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=yes 50042b15cb3dSCy Schubert 50052b15cb3dSCy Schubert # On some targets, GNU ld is compatible enough with the native linker 50062b15cb3dSCy Schubert # that we're better off using the native interface for both. 50072b15cb3dSCy Schubert lt_use_gnu_ld_interface=no 5008*f0574f5cSXin LI if test yes = "$with_gnu_ld"; then 50092b15cb3dSCy Schubert case $host_os in 50102b15cb3dSCy Schubert aix*) 50112b15cb3dSCy Schubert # The AIX port of GNU ld has always aspired to compatibility 50122b15cb3dSCy Schubert # with the native linker. However, as the warning in the GNU ld 50132b15cb3dSCy Schubert # block says, versions before 2.19.5* couldn't really create working 50142b15cb3dSCy Schubert # shared libraries, regardless of the interface used. 50152b15cb3dSCy Schubert case `$LD -v 2>&1` in 50162b15cb3dSCy Schubert *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50172b15cb3dSCy Schubert *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50182b15cb3dSCy Schubert *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50192b15cb3dSCy Schubert *) 50202b15cb3dSCy Schubert lt_use_gnu_ld_interface=yes 50212b15cb3dSCy Schubert ;; 50222b15cb3dSCy Schubert esac 50232b15cb3dSCy Schubert ;; 50242b15cb3dSCy Schubert *) 50252b15cb3dSCy Schubert lt_use_gnu_ld_interface=yes 50262b15cb3dSCy Schubert ;; 50272b15cb3dSCy Schubert esac 50282b15cb3dSCy Schubert fi 50292b15cb3dSCy Schubert 5030*f0574f5cSXin LI if test yes = "$lt_use_gnu_ld_interface"; then 50312b15cb3dSCy Schubert # If archive_cmds runs LD, not CC, wlarc should be empty 5032*f0574f5cSXin LI wlarc='$wl' 50332b15cb3dSCy Schubert 50342b15cb3dSCy Schubert # Set some defaults for GNU ld with shared library support. These 50352b15cb3dSCy Schubert # are reset later if shared libraries are not supported. Putting them 50362b15cb3dSCy Schubert # here allows them to be overridden if necessary. 50372b15cb3dSCy Schubert runpath_var=LD_RUN_PATH 5038*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5039*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50402b15cb3dSCy Schubert # ancient GNU ld didn't support --whole-archive et. al. 50412b15cb3dSCy Schubert if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5042*f0574f5cSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50432b15cb3dSCy Schubert else 50442b15cb3dSCy Schubert _LT_TAGVAR(whole_archive_flag_spec, $1)= 50452b15cb3dSCy Schubert fi 50462b15cb3dSCy Schubert supports_anon_versioning=no 5047*f0574f5cSXin LI case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 50482b15cb3dSCy Schubert *GNU\ gold*) supports_anon_versioning=yes ;; 50492b15cb3dSCy Schubert *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 50502b15cb3dSCy Schubert *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 50512b15cb3dSCy Schubert *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 50522b15cb3dSCy Schubert *\ 2.11.*) ;; # other 2.11 versions 50532b15cb3dSCy Schubert *) supports_anon_versioning=yes ;; 50542b15cb3dSCy Schubert esac 50552b15cb3dSCy Schubert 50562b15cb3dSCy Schubert # See if GNU ld supports shared libraries. 50572b15cb3dSCy Schubert case $host_os in 50582b15cb3dSCy Schubert aix[[3-9]]*) 50592b15cb3dSCy Schubert # On AIX/PPC, the GNU linker is very broken 5060*f0574f5cSXin LI if test ia64 != "$host_cpu"; then 50612b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 50622b15cb3dSCy Schubert cat <<_LT_EOF 1>&2 50632b15cb3dSCy Schubert 50642b15cb3dSCy Schubert*** Warning: the GNU linker, at least up to release 2.19, is reported 50652b15cb3dSCy Schubert*** to be unable to reliably create shared libraries on AIX. 50662b15cb3dSCy Schubert*** Therefore, libtool is disabling shared libraries support. If you 50672b15cb3dSCy Schubert*** really care for shared libraries, you may want to install binutils 50682b15cb3dSCy Schubert*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 50692b15cb3dSCy Schubert*** You will then need to restart the configuration process. 50702b15cb3dSCy Schubert 50712b15cb3dSCy Schubert_LT_EOF 50722b15cb3dSCy Schubert fi 50732b15cb3dSCy Schubert ;; 50742b15cb3dSCy Schubert 50752b15cb3dSCy Schubert amigaos*) 50762b15cb3dSCy Schubert case $host_cpu in 50772b15cb3dSCy Schubert powerpc) 50782b15cb3dSCy Schubert # see comment about AmigaOS4 .so support 5079*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 50802b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='' 50812b15cb3dSCy Schubert ;; 50822b15cb3dSCy Schubert m68k) 50832b15cb3dSCy Schubert _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)' 50842b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50852b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes 50862b15cb3dSCy Schubert ;; 50872b15cb3dSCy Schubert esac 50882b15cb3dSCy Schubert ;; 50892b15cb3dSCy Schubert 50902b15cb3dSCy Schubert beos*) 50912b15cb3dSCy Schubert if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 50922b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 50932b15cb3dSCy Schubert # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 50942b15cb3dSCy Schubert # support --undefined. This deserves some investigation. FIXME 5095*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 50962b15cb3dSCy Schubert else 50972b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 50982b15cb3dSCy Schubert fi 50992b15cb3dSCy Schubert ;; 51002b15cb3dSCy Schubert 51012b15cb3dSCy Schubert cygwin* | mingw* | pw32* | cegcc*) 51022b15cb3dSCy Schubert # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51032b15cb3dSCy Schubert # as there is no search path for DLLs. 51042b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5105*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51062b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51072b15cb3dSCy Schubert _LT_TAGVAR(always_export_symbols, $1)=no 51082b15cb3dSCy Schubert _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51092b15cb3dSCy Schubert _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' 51102b15cb3dSCy Schubert _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 51112b15cb3dSCy Schubert 51122b15cb3dSCy Schubert if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5113*f0574f5cSXin LI _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' 5114*f0574f5cSXin LI # If the export-symbols file already is a .def file, use it as 5115*f0574f5cSXin LI # is; otherwise, prepend EXPORTS... 5116*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 51172b15cb3dSCy Schubert cp $export_symbols $output_objdir/$soname.def; 51182b15cb3dSCy Schubert else 51192b15cb3dSCy Schubert echo EXPORTS > $output_objdir/$soname.def; 51202b15cb3dSCy Schubert cat $export_symbols >> $output_objdir/$soname.def; 51212b15cb3dSCy Schubert fi~ 5122*f0574f5cSXin LI $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51232b15cb3dSCy Schubert else 51242b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 51252b15cb3dSCy Schubert fi 51262b15cb3dSCy Schubert ;; 51272b15cb3dSCy Schubert 51282b15cb3dSCy Schubert haiku*) 5129*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51302b15cb3dSCy Schubert _LT_TAGVAR(link_all_deplibs, $1)=yes 51312b15cb3dSCy Schubert ;; 51322b15cb3dSCy Schubert 5133*f0574f5cSXin LI os2*) 5134*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5135*f0574f5cSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 5136*f0574f5cSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5137*f0574f5cSXin LI shrext_cmds=.dll 5138*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5139*f0574f5cSXin LI $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5140*f0574f5cSXin LI $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5141*f0574f5cSXin LI $ECHO EXPORTS >> $output_objdir/$libname.def~ 5142*f0574f5cSXin LI emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5143*f0574f5cSXin LI $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5144*f0574f5cSXin LI emximp -o $lib $output_objdir/$libname.def' 5145*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5146*f0574f5cSXin LI $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5147*f0574f5cSXin LI $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5148*f0574f5cSXin LI $ECHO EXPORTS >> $output_objdir/$libname.def~ 5149*f0574f5cSXin LI prefix_cmds="$SED"~ 5150*f0574f5cSXin LI if test EXPORTS = "`$SED 1q $export_symbols`"; then 5151*f0574f5cSXin LI prefix_cmds="$prefix_cmds -e 1d"; 5152*f0574f5cSXin LI fi~ 5153*f0574f5cSXin LI prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5154*f0574f5cSXin LI cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5155*f0574f5cSXin LI $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5156*f0574f5cSXin LI emximp -o $lib $output_objdir/$libname.def' 5157*f0574f5cSXin LI _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5158*f0574f5cSXin LI _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5159*f0574f5cSXin LI ;; 5160*f0574f5cSXin LI 51612b15cb3dSCy Schubert interix[[3-9]]*) 51622b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=no 51632b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5164*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5165*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 51662b15cb3dSCy Schubert # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 51672b15cb3dSCy Schubert # Instead, shared libraries are loaded at an image base (0x10000000 by 51682b15cb3dSCy Schubert # default) and relocated if they conflict, which is a slow very memory 51692b15cb3dSCy Schubert # consuming and fragmenting process. To avoid this, we pick a random, 51702b15cb3dSCy Schubert # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 51712b15cb3dSCy Schubert # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5172*f0574f5cSXin LI _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' 5173*f0574f5cSXin LI _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' 51742b15cb3dSCy Schubert ;; 51752b15cb3dSCy Schubert 51762b15cb3dSCy Schubert gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 51772b15cb3dSCy Schubert tmp_diet=no 5178*f0574f5cSXin LI if test linux-dietlibc = "$host_os"; then 51792b15cb3dSCy Schubert case $cc_basename in 51802b15cb3dSCy Schubert diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 51812b15cb3dSCy Schubert esac 51822b15cb3dSCy Schubert fi 51832b15cb3dSCy Schubert if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5184*f0574f5cSXin LI && test no = "$tmp_diet" 51852b15cb3dSCy Schubert then 51862b15cb3dSCy Schubert tmp_addflag=' $pic_flag' 51872b15cb3dSCy Schubert tmp_sharedflag='-shared' 51882b15cb3dSCy Schubert case $cc_basename,$host_cpu in 51892b15cb3dSCy Schubert pgcc*) # Portland Group C compiler 5190*f0574f5cSXin LI _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' 51912b15cb3dSCy Schubert tmp_addflag=' $pic_flag' 51922b15cb3dSCy Schubert ;; 51932b15cb3dSCy Schubert pgf77* | pgf90* | pgf95* | pgfortran*) 51942b15cb3dSCy Schubert # Portland Group f77 and f90 compilers 5195*f0574f5cSXin LI _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' 51962b15cb3dSCy Schubert tmp_addflag=' $pic_flag -Mnomain' ;; 51972b15cb3dSCy Schubert ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 51982b15cb3dSCy Schubert tmp_addflag=' -i_dynamic' ;; 51992b15cb3dSCy Schubert efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52002b15cb3dSCy Schubert tmp_addflag=' -i_dynamic -nofor_main' ;; 52012b15cb3dSCy Schubert ifc* | ifort*) # Intel Fortran compiler 52022b15cb3dSCy Schubert tmp_addflag=' -nofor_main' ;; 52032b15cb3dSCy Schubert lf95*) # Lahey Fortran 8.1 52042b15cb3dSCy Schubert _LT_TAGVAR(whole_archive_flag_spec, $1)= 52052b15cb3dSCy Schubert tmp_sharedflag='--shared' ;; 5206*f0574f5cSXin LI nagfor*) # NAGFOR 5.3 5207*f0574f5cSXin LI tmp_sharedflag='-Wl,-shared' ;; 52082b15cb3dSCy Schubert xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52092b15cb3dSCy Schubert tmp_sharedflag='-qmkshrobj' 52102b15cb3dSCy Schubert tmp_addflag= ;; 52112b15cb3dSCy Schubert nvcc*) # Cuda Compiler Driver 2.2 5212*f0574f5cSXin LI _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' 52132b15cb3dSCy Schubert _LT_TAGVAR(compiler_needs_object, $1)=yes 52142b15cb3dSCy Schubert ;; 52152b15cb3dSCy Schubert esac 52162b15cb3dSCy Schubert case `$CC -V 2>&1 | sed 5q` in 52172b15cb3dSCy Schubert *Sun\ C*) # Sun C 5.9 5218*f0574f5cSXin LI _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' 52192b15cb3dSCy Schubert _LT_TAGVAR(compiler_needs_object, $1)=yes 52202b15cb3dSCy Schubert tmp_sharedflag='-G' ;; 52212b15cb3dSCy Schubert *Sun\ F*) # Sun Fortran 8.3 52222b15cb3dSCy Schubert tmp_sharedflag='-G' ;; 52232b15cb3dSCy Schubert esac 5224*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52252b15cb3dSCy Schubert 5226*f0574f5cSXin LI if test yes = "$supports_anon_versioning"; then 52272b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52282b15cb3dSCy Schubert cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52292b15cb3dSCy Schubert echo "local: *; };" >> $output_objdir/$libname.ver~ 5230*f0574f5cSXin LI $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52312b15cb3dSCy Schubert fi 52322b15cb3dSCy Schubert 52332b15cb3dSCy Schubert case $cc_basename in 5234*f0574f5cSXin LI tcc*) 5235*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5236*f0574f5cSXin LI ;; 52372b15cb3dSCy Schubert xlf* | bgf* | bgxlf* | mpixlf*) 52382b15cb3dSCy Schubert # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52392b15cb3dSCy Schubert _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5240*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52412b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5242*f0574f5cSXin LI if test yes = "$supports_anon_versioning"; then 52432b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52442b15cb3dSCy Schubert cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52452b15cb3dSCy Schubert echo "local: *; };" >> $output_objdir/$libname.ver~ 52462b15cb3dSCy Schubert $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 52472b15cb3dSCy Schubert fi 52482b15cb3dSCy Schubert ;; 52492b15cb3dSCy Schubert esac 52502b15cb3dSCy Schubert else 52512b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 52522b15cb3dSCy Schubert fi 52532b15cb3dSCy Schubert ;; 52542b15cb3dSCy Schubert 52552b15cb3dSCy Schubert netbsd*) 52562b15cb3dSCy Schubert if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 52572b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 52582b15cb3dSCy Schubert wlarc= 52592b15cb3dSCy Schubert else 5260*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5261*f0574f5cSXin LI _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' 52622b15cb3dSCy Schubert fi 52632b15cb3dSCy Schubert ;; 52642b15cb3dSCy Schubert 52652b15cb3dSCy Schubert solaris*) 52662b15cb3dSCy Schubert if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 52672b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 52682b15cb3dSCy Schubert cat <<_LT_EOF 1>&2 52692b15cb3dSCy Schubert 52702b15cb3dSCy Schubert*** Warning: The releases 2.8.* of the GNU linker cannot reliably 52712b15cb3dSCy Schubert*** create shared libraries on Solaris systems. Therefore, libtool 52722b15cb3dSCy Schubert*** is disabling shared libraries support. We urge you to upgrade GNU 52732b15cb3dSCy Schubert*** binutils to release 2.9.1 or newer. Another option is to modify 52742b15cb3dSCy Schubert*** your PATH or compiler configuration so that the native linker is 52752b15cb3dSCy Schubert*** used, and then restart. 52762b15cb3dSCy Schubert 52772b15cb3dSCy Schubert_LT_EOF 52782b15cb3dSCy Schubert elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5279*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5280*f0574f5cSXin LI _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' 52812b15cb3dSCy Schubert else 52822b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 52832b15cb3dSCy Schubert fi 52842b15cb3dSCy Schubert ;; 52852b15cb3dSCy Schubert 52862b15cb3dSCy Schubert sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 52872b15cb3dSCy Schubert case `$LD -v 2>&1` in 52882b15cb3dSCy Schubert *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 52892b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 52902b15cb3dSCy Schubert cat <<_LT_EOF 1>&2 52912b15cb3dSCy Schubert 52922b15cb3dSCy Schubert*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 52932b15cb3dSCy Schubert*** reliably create shared libraries on SCO systems. Therefore, libtool 52942b15cb3dSCy Schubert*** is disabling shared libraries support. We urge you to upgrade GNU 52952b15cb3dSCy Schubert*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 52962b15cb3dSCy Schubert*** your PATH or compiler configuration so that the native linker is 52972b15cb3dSCy Schubert*** used, and then restart. 52982b15cb3dSCy Schubert 52992b15cb3dSCy Schubert_LT_EOF 53002b15cb3dSCy Schubert ;; 53012b15cb3dSCy Schubert *) 53022b15cb3dSCy Schubert # For security reasons, it is highly recommended that you always 53032b15cb3dSCy Schubert # use absolute paths for naming shared libraries, and exclude the 53042b15cb3dSCy Schubert # DT_RUNPATH tag from executables and libraries. But doing so 53052b15cb3dSCy Schubert # requires that you compile everything twice, which is a pain. 53062b15cb3dSCy Schubert if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5307*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5308*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5309*f0574f5cSXin LI _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' 53102b15cb3dSCy Schubert else 53112b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 53122b15cb3dSCy Schubert fi 53132b15cb3dSCy Schubert ;; 53142b15cb3dSCy Schubert esac 53152b15cb3dSCy Schubert ;; 53162b15cb3dSCy Schubert 53172b15cb3dSCy Schubert sunos4*) 53182b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53192b15cb3dSCy Schubert wlarc= 53202b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 53212b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53222b15cb3dSCy Schubert ;; 53232b15cb3dSCy Schubert 53242b15cb3dSCy Schubert *) 53252b15cb3dSCy Schubert if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5326*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5327*f0574f5cSXin LI _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' 53282b15cb3dSCy Schubert else 53292b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 53302b15cb3dSCy Schubert fi 53312b15cb3dSCy Schubert ;; 53322b15cb3dSCy Schubert esac 53332b15cb3dSCy Schubert 5334*f0574f5cSXin LI if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53352b15cb3dSCy Schubert runpath_var= 53362b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53372b15cb3dSCy Schubert _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53382b15cb3dSCy Schubert _LT_TAGVAR(whole_archive_flag_spec, $1)= 53392b15cb3dSCy Schubert fi 53402b15cb3dSCy Schubert else 53412b15cb3dSCy Schubert # PORTME fill in a description of your system's linker (not GNU ld) 53422b15cb3dSCy Schubert case $host_os in 53432b15cb3dSCy Schubert aix3*) 53442b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53452b15cb3dSCy Schubert _LT_TAGVAR(always_export_symbols, $1)=yes 53462b15cb3dSCy Schubert _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' 53472b15cb3dSCy Schubert # Note: this linker hardcodes the directories in LIBPATH if there 53482b15cb3dSCy Schubert # are no directories specified by -L. 53492b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes 5350*f0574f5cSXin LI if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 53512b15cb3dSCy Schubert # Neither direct hardcoding nor static linking is supported with a 53522b15cb3dSCy Schubert # broken collect2. 53532b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=unsupported 53542b15cb3dSCy Schubert fi 53552b15cb3dSCy Schubert ;; 53562b15cb3dSCy Schubert 53572b15cb3dSCy Schubert aix[[4-9]]*) 5358*f0574f5cSXin LI if test ia64 = "$host_cpu"; then 53592b15cb3dSCy Schubert # On IA64, the linker does run time linking by default, so we don't 53602b15cb3dSCy Schubert # have to do anything special. 53612b15cb3dSCy Schubert aix_use_runtimelinking=no 53622b15cb3dSCy Schubert exp_sym_flag='-Bexport' 5363*f0574f5cSXin LI no_entry_flag= 53642b15cb3dSCy Schubert else 53652b15cb3dSCy Schubert # If we're using GNU nm, then we don't want the "-C" option. 5366*f0574f5cSXin LI # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5367*f0574f5cSXin LI # Without the "-l" option, or with the "-B" option, AIX nm treats 5368*f0574f5cSXin LI # weak defined symbols like other global defined symbols, whereas 5369*f0574f5cSXin LI # GNU nm marks them as "W". 5370*f0574f5cSXin LI # While the 'weak' keyword is ignored in the Export File, we need 5371*f0574f5cSXin LI # it in the Import File for the 'aix-soname' feature, so we have 5372*f0574f5cSXin LI # to replace the "-B" option with "-P" for AIX nm. 53732b15cb3dSCy Schubert if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5374*f0574f5cSXin LI _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' 53752b15cb3dSCy Schubert else 5376*f0574f5cSXin LI _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 == "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' 53772b15cb3dSCy Schubert fi 53782b15cb3dSCy Schubert aix_use_runtimelinking=no 53792b15cb3dSCy Schubert 53802b15cb3dSCy Schubert # Test if we are trying to use run time linking or normal 53812b15cb3dSCy Schubert # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5382*f0574f5cSXin LI # have runtime linking enabled, and use it for executables. 5383*f0574f5cSXin LI # For shared libraries, we enable/disable runtime linking 5384*f0574f5cSXin LI # depending on the kind of the shared library created - 5385*f0574f5cSXin LI # when "with_aix_soname,aix_use_runtimelinking" is: 5386*f0574f5cSXin LI # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5387*f0574f5cSXin LI # "aix,yes" lib.so shared, rtl:yes, for executables 5388*f0574f5cSXin LI # lib.a static archive 5389*f0574f5cSXin LI # "both,no" lib.so.V(shr.o) shared, rtl:yes 5390*f0574f5cSXin LI # lib.a(lib.so.V) shared, rtl:no, for executables 5391*f0574f5cSXin LI # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5392*f0574f5cSXin LI # lib.a(lib.so.V) shared, rtl:no 5393*f0574f5cSXin LI # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5394*f0574f5cSXin LI # lib.a static archive 53952b15cb3dSCy Schubert case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 53962b15cb3dSCy Schubert for ld_flag in $LDFLAGS; do 5397*f0574f5cSXin LI if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 53982b15cb3dSCy Schubert aix_use_runtimelinking=yes 53992b15cb3dSCy Schubert break 54002b15cb3dSCy Schubert fi 54012b15cb3dSCy Schubert done 5402*f0574f5cSXin LI if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5403*f0574f5cSXin LI # With aix-soname=svr4, we create the lib.so.V shared archives only, 5404*f0574f5cSXin LI # so we don't have lib.a shared libs to link our executables. 5405*f0574f5cSXin LI # We have to force runtime linking in this case. 5406*f0574f5cSXin LI aix_use_runtimelinking=yes 5407*f0574f5cSXin LI LDFLAGS="$LDFLAGS -Wl,-brtl" 5408*f0574f5cSXin LI fi 54092b15cb3dSCy Schubert ;; 54102b15cb3dSCy Schubert esac 54112b15cb3dSCy Schubert 54122b15cb3dSCy Schubert exp_sym_flag='-bexport' 54132b15cb3dSCy Schubert no_entry_flag='-bnoentry' 54142b15cb3dSCy Schubert fi 54152b15cb3dSCy Schubert 54162b15cb3dSCy Schubert # When large executables or shared objects are built, AIX ld can 54172b15cb3dSCy Schubert # have problems creating the table of contents. If linking a library 54182b15cb3dSCy Schubert # or program results in "error TOC overflow" add -mminimal-toc to 54192b15cb3dSCy Schubert # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54202b15cb3dSCy Schubert # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 54212b15cb3dSCy Schubert 54222b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='' 54232b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 54242b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54252b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54262b15cb3dSCy Schubert _LT_TAGVAR(link_all_deplibs, $1)=yes 5427*f0574f5cSXin LI _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5428*f0574f5cSXin LI case $with_aix_soname,$aix_use_runtimelinking in 5429*f0574f5cSXin LI aix,*) ;; # traditional, no import file 5430*f0574f5cSXin LI svr4,* | *,yes) # use import file 5431*f0574f5cSXin LI # The Import File defines what to hardcode. 5432*f0574f5cSXin LI _LT_TAGVAR(hardcode_direct, $1)=no 5433*f0574f5cSXin LI _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5434*f0574f5cSXin LI ;; 5435*f0574f5cSXin LI esac 54362b15cb3dSCy Schubert 5437*f0574f5cSXin LI if test yes = "$GCC"; then 54382b15cb3dSCy Schubert case $host_os in aix4.[[012]]|aix4.[[012]].*) 54392b15cb3dSCy Schubert # We only want to do this on AIX 4.2 and lower, the check 54402b15cb3dSCy Schubert # below for broken collect2 doesn't work under 4.3+ 5441*f0574f5cSXin LI collect2name=`$CC -print-prog-name=collect2` 54422b15cb3dSCy Schubert if test -f "$collect2name" && 54432b15cb3dSCy Schubert strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54442b15cb3dSCy Schubert then 54452b15cb3dSCy Schubert # We have reworked collect2 54462b15cb3dSCy Schubert : 54472b15cb3dSCy Schubert else 54482b15cb3dSCy Schubert # We have old collect2 54492b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=unsupported 54502b15cb3dSCy Schubert # It fails to find uninstalled libraries when the uninstalled 54512b15cb3dSCy Schubert # path is not listed in the libpath. Setting hardcode_minus_L 54522b15cb3dSCy Schubert # to unsupported forces relinking 54532b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes 54542b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54552b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)= 54562b15cb3dSCy Schubert fi 54572b15cb3dSCy Schubert ;; 54582b15cb3dSCy Schubert esac 54592b15cb3dSCy Schubert shared_flag='-shared' 5460*f0574f5cSXin LI if test yes = "$aix_use_runtimelinking"; then 5461*f0574f5cSXin LI shared_flag="$shared_flag "'$wl-G' 54622b15cb3dSCy Schubert fi 5463*f0574f5cSXin LI # Need to ensure runtime linking is disabled for the traditional 5464*f0574f5cSXin LI # shared library, or the linker may eventually find shared libraries 5465*f0574f5cSXin LI # /with/ Import File - we do not want to mix them. 5466*f0574f5cSXin LI shared_flag_aix='-shared' 5467*f0574f5cSXin LI shared_flag_svr4='-shared $wl-G' 54682b15cb3dSCy Schubert else 54692b15cb3dSCy Schubert # not using gcc 5470*f0574f5cSXin LI if test ia64 = "$host_cpu"; then 54712b15cb3dSCy Schubert # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 54722b15cb3dSCy Schubert # chokes on -Wl,-G. The following line is correct: 54732b15cb3dSCy Schubert shared_flag='-G' 54742b15cb3dSCy Schubert else 5475*f0574f5cSXin LI if test yes = "$aix_use_runtimelinking"; then 5476*f0574f5cSXin LI shared_flag='$wl-G' 54772b15cb3dSCy Schubert else 5478*f0574f5cSXin LI shared_flag='$wl-bM:SRE' 54792b15cb3dSCy Schubert fi 5480*f0574f5cSXin LI shared_flag_aix='$wl-bM:SRE' 5481*f0574f5cSXin LI shared_flag_svr4='$wl-G' 54822b15cb3dSCy Schubert fi 54832b15cb3dSCy Schubert fi 54842b15cb3dSCy Schubert 5485*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 54862b15cb3dSCy Schubert # It seems that -bexpall does not export symbols beginning with 54872b15cb3dSCy Schubert # underscore (_), so it is better to generate a list of symbols to export. 54882b15cb3dSCy Schubert _LT_TAGVAR(always_export_symbols, $1)=yes 5489*f0574f5cSXin LI if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 54902b15cb3dSCy Schubert # Warning - without using the other runtime loading flags (-brtl), 54912b15cb3dSCy Schubert # -berok will link without error, but may produce a broken library. 54922b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 54932b15cb3dSCy Schubert # Determine the default libpath from the value encoded in an 54942b15cb3dSCy Schubert # empty executable. 54952b15cb3dSCy Schubert _LT_SYS_MODULE_PATH_AIX([$1]) 5496*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5497*f0574f5cSXin LI _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 54982b15cb3dSCy Schubert else 5499*f0574f5cSXin LI if test ia64 = "$host_cpu"; then 5500*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55012b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5502*f0574f5cSXin LI _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" 55032b15cb3dSCy Schubert else 55042b15cb3dSCy Schubert # Determine the default libpath from the value encoded in an 55052b15cb3dSCy Schubert # empty executable. 55062b15cb3dSCy Schubert _LT_SYS_MODULE_PATH_AIX([$1]) 5507*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55082b15cb3dSCy Schubert # Warning - without using the other run time loading flags, 55092b15cb3dSCy Schubert # -berok will link without error, but may produce a broken library. 5510*f0574f5cSXin LI _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5511*f0574f5cSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5512*f0574f5cSXin LI if test yes = "$with_gnu_ld"; then 55132b15cb3dSCy Schubert # We only use this code for GNU lds that support --whole-archive. 5514*f0574f5cSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55152b15cb3dSCy Schubert else 55162b15cb3dSCy Schubert # Exported symbols can be pulled into shared objects from archives 55172b15cb3dSCy Schubert _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55182b15cb3dSCy Schubert fi 55192b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5520*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5521*f0574f5cSXin LI # -brtl affects multiple linker settings, -berok does not and is overridden later 5522*f0574f5cSXin LI compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5523*f0574f5cSXin LI if test svr4 != "$with_aix_soname"; then 55242b15cb3dSCy Schubert # This is similar to how AIX traditionally builds its shared libraries. 5525*f0574f5cSXin LI _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' 5526*f0574f5cSXin LI fi 5527*f0574f5cSXin LI if test aix != "$with_aix_soname"; then 5528*f0574f5cSXin LI _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' 5529*f0574f5cSXin LI else 5530*f0574f5cSXin LI # used by -dlpreopen to get the symbols 5531*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5532*f0574f5cSXin LI fi 5533*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55342b15cb3dSCy Schubert fi 55352b15cb3dSCy Schubert fi 55362b15cb3dSCy Schubert ;; 55372b15cb3dSCy Schubert 55382b15cb3dSCy Schubert amigaos*) 55392b15cb3dSCy Schubert case $host_cpu in 55402b15cb3dSCy Schubert powerpc) 55412b15cb3dSCy Schubert # see comment about AmigaOS4 .so support 5542*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55432b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='' 55442b15cb3dSCy Schubert ;; 55452b15cb3dSCy Schubert m68k) 55462b15cb3dSCy Schubert _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)' 55472b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55482b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes 55492b15cb3dSCy Schubert ;; 55502b15cb3dSCy Schubert esac 55512b15cb3dSCy Schubert ;; 55522b15cb3dSCy Schubert 55532b15cb3dSCy Schubert bsdi[[45]]*) 55542b15cb3dSCy Schubert _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 55552b15cb3dSCy Schubert ;; 55562b15cb3dSCy Schubert 55572b15cb3dSCy Schubert cygwin* | mingw* | pw32* | cegcc*) 55582b15cb3dSCy Schubert # When not using gcc, we currently assume that we are using 55592b15cb3dSCy Schubert # Microsoft Visual C++. 55602b15cb3dSCy Schubert # hardcode_libdir_flag_spec is actually meaningless, as there is 55612b15cb3dSCy Schubert # no search path for DLLs. 55622b15cb3dSCy Schubert case $cc_basename in 55632b15cb3dSCy Schubert cl*) 55642b15cb3dSCy Schubert # Native MSVC 55652b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 55662b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 55672b15cb3dSCy Schubert _LT_TAGVAR(always_export_symbols, $1)=yes 55682b15cb3dSCy Schubert _LT_TAGVAR(file_list_spec, $1)='@' 55692b15cb3dSCy Schubert # Tell ltmain to make .lib files, not .a files. 55702b15cb3dSCy Schubert libext=lib 55712b15cb3dSCy Schubert # Tell ltmain to make .dll files, not .so files. 5572*f0574f5cSXin LI shrext_cmds=.dll 55732b15cb3dSCy Schubert # FIXME: Setting linknames here is a bad hack. 5574*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5575*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5576*f0574f5cSXin LI cp "$export_symbols" "$output_objdir/$soname.def"; 5577*f0574f5cSXin LI echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 55782b15cb3dSCy Schubert else 5579*f0574f5cSXin LI $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 55802b15cb3dSCy Schubert fi~ 55812b15cb3dSCy Schubert $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 55822b15cb3dSCy Schubert linknames=' 55832b15cb3dSCy Schubert # The linker will not automatically build a static lib if we build a DLL. 55842b15cb3dSCy Schubert # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 55852b15cb3dSCy Schubert _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5586*f0574f5cSXin LI _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 55872b15cb3dSCy Schubert _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' 55882b15cb3dSCy Schubert # Don't use ranlib 55892b15cb3dSCy Schubert _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 55902b15cb3dSCy Schubert _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 55912b15cb3dSCy Schubert lt_tool_outputfile="@TOOL_OUTPUT@"~ 55922b15cb3dSCy Schubert case $lt_outputfile in 55932b15cb3dSCy Schubert *.exe|*.EXE) ;; 55942b15cb3dSCy Schubert *) 5595*f0574f5cSXin LI lt_outputfile=$lt_outputfile.exe 5596*f0574f5cSXin LI lt_tool_outputfile=$lt_tool_outputfile.exe 55972b15cb3dSCy Schubert ;; 55982b15cb3dSCy Schubert esac~ 5599*f0574f5cSXin LI if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 56002b15cb3dSCy Schubert $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 56012b15cb3dSCy Schubert $RM "$lt_outputfile.manifest"; 56022b15cb3dSCy Schubert fi' 56032b15cb3dSCy Schubert ;; 56042b15cb3dSCy Schubert *) 56052b15cb3dSCy Schubert # Assume MSVC wrapper 56062b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56072b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56082b15cb3dSCy Schubert # Tell ltmain to make .lib files, not .a files. 56092b15cb3dSCy Schubert libext=lib 56102b15cb3dSCy Schubert # Tell ltmain to make .dll files, not .so files. 5611*f0574f5cSXin LI shrext_cmds=.dll 56122b15cb3dSCy Schubert # FIXME: Setting linknames here is a bad hack. 56132b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 56142b15cb3dSCy Schubert # The linker will automatically build a .lib file if we build a DLL. 56152b15cb3dSCy Schubert _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56162b15cb3dSCy Schubert # FIXME: Should let the user specify the lib program. 56172b15cb3dSCy Schubert _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 56182b15cb3dSCy Schubert _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56192b15cb3dSCy Schubert ;; 56202b15cb3dSCy Schubert esac 56212b15cb3dSCy Schubert ;; 56222b15cb3dSCy Schubert 56232b15cb3dSCy Schubert darwin* | rhapsody*) 56242b15cb3dSCy Schubert _LT_DARWIN_LINKER_FEATURES($1) 56252b15cb3dSCy Schubert ;; 56262b15cb3dSCy Schubert 56272b15cb3dSCy Schubert dgux*) 56282b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56292b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56302b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56312b15cb3dSCy Schubert ;; 56322b15cb3dSCy Schubert 56332b15cb3dSCy Schubert # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56342b15cb3dSCy Schubert # support. Future versions do this automatically, but an explicit c++rt0.o 56352b15cb3dSCy Schubert # does not break anything, and helps significantly (at the cost of a little 56362b15cb3dSCy Schubert # extra space). 56372b15cb3dSCy Schubert freebsd2.2*) 56382b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56392b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56402b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 56412b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56422b15cb3dSCy Schubert ;; 56432b15cb3dSCy Schubert 56442b15cb3dSCy Schubert # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5645*f0574f5cSXin LI freebsd2.*) 56462b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 56472b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 56482b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes 56492b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56502b15cb3dSCy Schubert ;; 56512b15cb3dSCy Schubert 56522b15cb3dSCy Schubert # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 56532b15cb3dSCy Schubert freebsd* | dragonfly*) 56542b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 56552b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56562b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 56572b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56582b15cb3dSCy Schubert ;; 56592b15cb3dSCy Schubert 56602b15cb3dSCy Schubert hpux9*) 5661*f0574f5cSXin LI if test yes = "$GCC"; then 5662*f0574f5cSXin LI _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' 56632b15cb3dSCy Schubert else 5664*f0574f5cSXin LI _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' 56652b15cb3dSCy Schubert fi 5666*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 56672b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 56682b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 56692b15cb3dSCy Schubert 56702b15cb3dSCy Schubert # hardcode_minus_L: Not really in the search PATH, 56712b15cb3dSCy Schubert # but as the default location of the library. 56722b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes 5673*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 56742b15cb3dSCy Schubert ;; 56752b15cb3dSCy Schubert 56762b15cb3dSCy Schubert hpux10*) 5677*f0574f5cSXin LI if test yes,no = "$GCC,$with_gnu_ld"; then 5678*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 56792b15cb3dSCy Schubert else 56802b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 56812b15cb3dSCy Schubert fi 5682*f0574f5cSXin LI if test no = "$with_gnu_ld"; then 5683*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 56842b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 56852b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 56862b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5687*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 56882b15cb3dSCy Schubert # hardcode_minus_L: Not really in the search PATH, 56892b15cb3dSCy Schubert # but as the default location of the library. 56902b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes 56912b15cb3dSCy Schubert fi 56922b15cb3dSCy Schubert ;; 56932b15cb3dSCy Schubert 56942b15cb3dSCy Schubert hpux11*) 5695*f0574f5cSXin LI if test yes,no = "$GCC,$with_gnu_ld"; then 56962b15cb3dSCy Schubert case $host_cpu in 56972b15cb3dSCy Schubert hppa*64*) 5698*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 56992b15cb3dSCy Schubert ;; 57002b15cb3dSCy Schubert ia64*) 5701*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57022b15cb3dSCy Schubert ;; 57032b15cb3dSCy Schubert *) 5704*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57052b15cb3dSCy Schubert ;; 57062b15cb3dSCy Schubert esac 57072b15cb3dSCy Schubert else 57082b15cb3dSCy Schubert case $host_cpu in 57092b15cb3dSCy Schubert hppa*64*) 5710*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57112b15cb3dSCy Schubert ;; 57122b15cb3dSCy Schubert ia64*) 5713*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57142b15cb3dSCy Schubert ;; 57152b15cb3dSCy Schubert *) 57162b15cb3dSCy Schubert m4_if($1, [], [ 57172b15cb3dSCy Schubert # Older versions of the 11.00 compiler do not understand -b yet 57182b15cb3dSCy Schubert # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57192b15cb3dSCy Schubert _LT_LINKER_OPTION([if $CC understands -b], 57202b15cb3dSCy Schubert _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5721*f0574f5cSXin LI [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57222b15cb3dSCy Schubert [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5723*f0574f5cSXin LI [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57242b15cb3dSCy Schubert ;; 57252b15cb3dSCy Schubert esac 57262b15cb3dSCy Schubert fi 5727*f0574f5cSXin LI if test no = "$with_gnu_ld"; then 5728*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57292b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57302b15cb3dSCy Schubert 57312b15cb3dSCy Schubert case $host_cpu in 57322b15cb3dSCy Schubert hppa*64*|ia64*) 57332b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=no 57342b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57352b15cb3dSCy Schubert ;; 57362b15cb3dSCy Schubert *) 57372b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 57382b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5739*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57402b15cb3dSCy Schubert 57412b15cb3dSCy Schubert # hardcode_minus_L: Not really in the search PATH, 57422b15cb3dSCy Schubert # but as the default location of the library. 57432b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes 57442b15cb3dSCy Schubert ;; 57452b15cb3dSCy Schubert esac 57462b15cb3dSCy Schubert fi 57472b15cb3dSCy Schubert ;; 57482b15cb3dSCy Schubert 57492b15cb3dSCy Schubert irix5* | irix6* | nonstopux*) 5750*f0574f5cSXin LI if test yes = "$GCC"; then 5751*f0574f5cSXin LI _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' 57522b15cb3dSCy Schubert # Try to use the -exported_symbol ld option, if it does not 57532b15cb3dSCy Schubert # work, assume that -exports_file does not work either and 57542b15cb3dSCy Schubert # implicitly export all symbols. 57552b15cb3dSCy Schubert # This should be the same for all languages, so no per-tag cache variable. 57562b15cb3dSCy Schubert AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 57572b15cb3dSCy Schubert [lt_cv_irix_exported_symbol], 5758*f0574f5cSXin LI [save_LDFLAGS=$LDFLAGS 5759*f0574f5cSXin LI LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 57602b15cb3dSCy Schubert AC_LINK_IFELSE( 57612b15cb3dSCy Schubert [AC_LANG_SOURCE( 57622b15cb3dSCy Schubert [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 57632b15cb3dSCy Schubert [C++], [[int foo (void) { return 0; }]], 57642b15cb3dSCy Schubert [Fortran 77], [[ 57652b15cb3dSCy Schubert subroutine foo 57662b15cb3dSCy Schubert end]], 57672b15cb3dSCy Schubert [Fortran], [[ 57682b15cb3dSCy Schubert subroutine foo 57692b15cb3dSCy Schubert end]])])], 57702b15cb3dSCy Schubert [lt_cv_irix_exported_symbol=yes], 57712b15cb3dSCy Schubert [lt_cv_irix_exported_symbol=no]) 5772*f0574f5cSXin LI LDFLAGS=$save_LDFLAGS]) 5773*f0574f5cSXin LI if test yes = "$lt_cv_irix_exported_symbol"; then 5774*f0574f5cSXin LI _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' 57752b15cb3dSCy Schubert fi 57762b15cb3dSCy Schubert else 5777*f0574f5cSXin LI _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' 5778*f0574f5cSXin LI _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' 57792b15cb3dSCy Schubert fi 57802b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5781*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 57822b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57832b15cb3dSCy Schubert _LT_TAGVAR(inherit_rpath, $1)=yes 57842b15cb3dSCy Schubert _LT_TAGVAR(link_all_deplibs, $1)=yes 57852b15cb3dSCy Schubert ;; 57862b15cb3dSCy Schubert 5787*f0574f5cSXin LI linux*) 5788*f0574f5cSXin LI case $cc_basename in 5789*f0574f5cSXin LI tcc*) 5790*f0574f5cSXin LI # Fabrice Bellard et al's Tiny C Compiler 5791*f0574f5cSXin LI _LT_TAGVAR(ld_shlibs, $1)=yes 5792*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5793*f0574f5cSXin LI ;; 5794*f0574f5cSXin LI esac 5795*f0574f5cSXin LI ;; 5796*f0574f5cSXin LI 57972b15cb3dSCy Schubert netbsd*) 57982b15cb3dSCy Schubert if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 57992b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 58002b15cb3dSCy Schubert else 58012b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58022b15cb3dSCy Schubert fi 58032b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58042b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 58052b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58062b15cb3dSCy Schubert ;; 58072b15cb3dSCy Schubert 58082b15cb3dSCy Schubert newsos6) 58092b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58102b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 5811*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58122b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58132b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58142b15cb3dSCy Schubert ;; 58152b15cb3dSCy Schubert 58162b15cb3dSCy Schubert *nto* | *qnx*) 58172b15cb3dSCy Schubert ;; 58182b15cb3dSCy Schubert 5819*f0574f5cSXin LI openbsd* | bitrig*) 58202b15cb3dSCy Schubert if test -f /usr/libexec/ld.so; then 58212b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 58222b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58232b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5824*f0574f5cSXin LI if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58252b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5826*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5827*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5828*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58292b15cb3dSCy Schubert else 58302b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5831*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58322b15cb3dSCy Schubert fi 58332b15cb3dSCy Schubert else 58342b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 58352b15cb3dSCy Schubert fi 58362b15cb3dSCy Schubert ;; 58372b15cb3dSCy Schubert 58382b15cb3dSCy Schubert os2*) 58392b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58402b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes 58412b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5842*f0574f5cSXin LI shrext_cmds=.dll 5843*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5844*f0574f5cSXin LI $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5845*f0574f5cSXin LI $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5846*f0574f5cSXin LI $ECHO EXPORTS >> $output_objdir/$libname.def~ 5847*f0574f5cSXin LI emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5848*f0574f5cSXin LI $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5849*f0574f5cSXin LI emximp -o $lib $output_objdir/$libname.def' 5850*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5851*f0574f5cSXin LI $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5852*f0574f5cSXin LI $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5853*f0574f5cSXin LI $ECHO EXPORTS >> $output_objdir/$libname.def~ 5854*f0574f5cSXin LI prefix_cmds="$SED"~ 5855*f0574f5cSXin LI if test EXPORTS = "`$SED 1q $export_symbols`"; then 5856*f0574f5cSXin LI prefix_cmds="$prefix_cmds -e 1d"; 5857*f0574f5cSXin LI fi~ 5858*f0574f5cSXin LI prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5859*f0574f5cSXin LI cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5860*f0574f5cSXin LI $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5861*f0574f5cSXin LI emximp -o $lib $output_objdir/$libname.def' 5862*f0574f5cSXin LI _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5863*f0574f5cSXin LI _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58642b15cb3dSCy Schubert ;; 58652b15cb3dSCy Schubert 58662b15cb3dSCy Schubert osf3*) 5867*f0574f5cSXin LI if test yes = "$GCC"; then 5868*f0574f5cSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5869*f0574f5cSXin LI _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' 58702b15cb3dSCy Schubert else 58712b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5872*f0574f5cSXin LI _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' 58732b15cb3dSCy Schubert fi 58742b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5875*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58762b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58772b15cb3dSCy Schubert ;; 58782b15cb3dSCy Schubert 58792b15cb3dSCy Schubert osf4* | osf5*) # as osf3* with the addition of -msym flag 5880*f0574f5cSXin LI if test yes = "$GCC"; then 5881*f0574f5cSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5882*f0574f5cSXin LI _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' 5883*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58842b15cb3dSCy Schubert else 58852b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5886*f0574f5cSXin LI _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' 58872b15cb3dSCy Schubert _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~ 5888*f0574f5cSXin LI $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' 58892b15cb3dSCy Schubert 58902b15cb3dSCy Schubert # Both c and cxx compiler support -rpath directly 58912b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 58922b15cb3dSCy Schubert fi 58932b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 58942b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58952b15cb3dSCy Schubert ;; 58962b15cb3dSCy Schubert 58972b15cb3dSCy Schubert solaris*) 58982b15cb3dSCy Schubert _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5899*f0574f5cSXin LI if test yes = "$GCC"; then 5900*f0574f5cSXin LI wlarc='$wl' 5901*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59022b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5903*f0574f5cSXin LI $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' 59042b15cb3dSCy Schubert else 59052b15cb3dSCy Schubert case `$CC -V 2>&1` in 59062b15cb3dSCy Schubert *"Compilers 5.0"*) 59072b15cb3dSCy Schubert wlarc='' 5908*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59092b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5910*f0574f5cSXin LI $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59112b15cb3dSCy Schubert ;; 59122b15cb3dSCy Schubert *) 5913*f0574f5cSXin LI wlarc='$wl' 5914*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59152b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5916*f0574f5cSXin LI $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59172b15cb3dSCy Schubert ;; 59182b15cb3dSCy Schubert esac 59192b15cb3dSCy Schubert fi 59202b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59212b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59222b15cb3dSCy Schubert case $host_os in 59232b15cb3dSCy Schubert solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59242b15cb3dSCy Schubert *) 59252b15cb3dSCy Schubert # The compiler driver will combine and reorder linker options, 5926*f0574f5cSXin LI # but understands '-z linker_flag'. GCC discards it without '$wl', 59272b15cb3dSCy Schubert # but is careful enough not to reorder. 59282b15cb3dSCy Schubert # Supported since Solaris 2.6 (maybe 2.5.1?) 5929*f0574f5cSXin LI if test yes = "$GCC"; then 5930*f0574f5cSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59312b15cb3dSCy Schubert else 59322b15cb3dSCy Schubert _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59332b15cb3dSCy Schubert fi 59342b15cb3dSCy Schubert ;; 59352b15cb3dSCy Schubert esac 59362b15cb3dSCy Schubert _LT_TAGVAR(link_all_deplibs, $1)=yes 59372b15cb3dSCy Schubert ;; 59382b15cb3dSCy Schubert 59392b15cb3dSCy Schubert sunos4*) 5940*f0574f5cSXin LI if test sequent = "$host_vendor"; then 59412b15cb3dSCy Schubert # Use $CC to link under sequent, because it throws in some extra .o 59422b15cb3dSCy Schubert # files that make .init and .fini sections work. 5943*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59442b15cb3dSCy Schubert else 59452b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 59462b15cb3dSCy Schubert fi 59472b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59482b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 59492b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes 59502b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59512b15cb3dSCy Schubert ;; 59522b15cb3dSCy Schubert 59532b15cb3dSCy Schubert sysv4) 59542b15cb3dSCy Schubert case $host_vendor in 59552b15cb3dSCy Schubert sni) 59562b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59572b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 59582b15cb3dSCy Schubert ;; 59592b15cb3dSCy Schubert siemens) 59602b15cb3dSCy Schubert ## LD is ld it makes a PLAMLIB 59612b15cb3dSCy Schubert ## CC just makes a GrossModule. 59622b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 59632b15cb3dSCy Schubert _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 59642b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=no 59652b15cb3dSCy Schubert ;; 59662b15cb3dSCy Schubert motorola) 59672b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59682b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 59692b15cb3dSCy Schubert ;; 59702b15cb3dSCy Schubert esac 59712b15cb3dSCy Schubert runpath_var='LD_RUN_PATH' 59722b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59732b15cb3dSCy Schubert ;; 59742b15cb3dSCy Schubert 59752b15cb3dSCy Schubert sysv4.3*) 59762b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59772b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59782b15cb3dSCy Schubert _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 59792b15cb3dSCy Schubert ;; 59802b15cb3dSCy Schubert 59812b15cb3dSCy Schubert sysv4*MP*) 59822b15cb3dSCy Schubert if test -d /usr/nec; then 59832b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59842b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59852b15cb3dSCy Schubert runpath_var=LD_RUN_PATH 59862b15cb3dSCy Schubert hardcode_runpath_var=yes 59872b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=yes 59882b15cb3dSCy Schubert fi 59892b15cb3dSCy Schubert ;; 59902b15cb3dSCy Schubert 59912b15cb3dSCy Schubert sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5992*f0574f5cSXin LI _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 59932b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)=no 59942b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59952b15cb3dSCy Schubert runpath_var='LD_RUN_PATH' 59962b15cb3dSCy Schubert 5997*f0574f5cSXin LI if test yes = "$GCC"; then 5998*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5999*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60002b15cb3dSCy Schubert else 6001*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6002*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60032b15cb3dSCy Schubert fi 60042b15cb3dSCy Schubert ;; 60052b15cb3dSCy Schubert 60062b15cb3dSCy Schubert sysv5* | sco3.2v5* | sco5v6*) 6007*f0574f5cSXin LI # Note: We CANNOT use -z defs as we might desire, because we do not 60082b15cb3dSCy Schubert # link with -lc, and that would cause any symbols used from libc to 60092b15cb3dSCy Schubert # always be unresolved, which means just about no library would 60102b15cb3dSCy Schubert # ever link correctly. If we're not using GNU ld we use -z text 60112b15cb3dSCy Schubert # though, which does catch some bad symbols but isn't as heavy-handed 60122b15cb3dSCy Schubert # as -z defs. 6013*f0574f5cSXin LI _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6014*f0574f5cSXin LI _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60152b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60162b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6017*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60182b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60192b15cb3dSCy Schubert _LT_TAGVAR(link_all_deplibs, $1)=yes 6020*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60212b15cb3dSCy Schubert runpath_var='LD_RUN_PATH' 60222b15cb3dSCy Schubert 6023*f0574f5cSXin LI if test yes = "$GCC"; then 6024*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6025*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60262b15cb3dSCy Schubert else 6027*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6028*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60292b15cb3dSCy Schubert fi 60302b15cb3dSCy Schubert ;; 60312b15cb3dSCy Schubert 60322b15cb3dSCy Schubert uts4*) 60332b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60342b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60352b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60362b15cb3dSCy Schubert ;; 60372b15cb3dSCy Schubert 60382b15cb3dSCy Schubert *) 60392b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 60402b15cb3dSCy Schubert ;; 60412b15cb3dSCy Schubert esac 60422b15cb3dSCy Schubert 6043*f0574f5cSXin LI if test sni = "$host_vendor"; then 60442b15cb3dSCy Schubert case $host in 60452b15cb3dSCy Schubert sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6046*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 60472b15cb3dSCy Schubert ;; 60482b15cb3dSCy Schubert esac 60492b15cb3dSCy Schubert fi 60502b15cb3dSCy Schubert fi 60512b15cb3dSCy Schubert]) 60522b15cb3dSCy SchubertAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6053*f0574f5cSXin LItest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 60542b15cb3dSCy Schubert 60552b15cb3dSCy Schubert_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 60562b15cb3dSCy Schubert 60572b15cb3dSCy Schubert_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 60582b15cb3dSCy Schubert_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 60592b15cb3dSCy Schubert_LT_DECL([], [extract_expsyms_cmds], [2], 60602b15cb3dSCy Schubert [The commands to extract the exported symbol list from a shared archive]) 60612b15cb3dSCy Schubert 60622b15cb3dSCy Schubert# 60632b15cb3dSCy Schubert# Do we need to explicitly link libc? 60642b15cb3dSCy Schubert# 60652b15cb3dSCy Schubertcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 60662b15cb3dSCy Schubertx|xyes) 60672b15cb3dSCy Schubert # Assume -lc should be added 60682b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 60692b15cb3dSCy Schubert 6070*f0574f5cSXin LI if test yes,yes = "$GCC,$enable_shared"; then 60712b15cb3dSCy Schubert case $_LT_TAGVAR(archive_cmds, $1) in 60722b15cb3dSCy Schubert *'~'*) 60732b15cb3dSCy Schubert # FIXME: we may have to deal with multi-command sequences. 60742b15cb3dSCy Schubert ;; 60752b15cb3dSCy Schubert '$CC '*) 60762b15cb3dSCy Schubert # Test whether the compiler implicitly links with -lc since on some 60772b15cb3dSCy Schubert # systems, -lgcc has to come before -lc. If gcc already passes -lc 60782b15cb3dSCy Schubert # to ld, don't add -lc before -lgcc. 60792b15cb3dSCy Schubert AC_CACHE_CHECK([whether -lc should be explicitly linked in], 60802b15cb3dSCy Schubert [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 60812b15cb3dSCy Schubert [$RM conftest* 60822b15cb3dSCy Schubert echo "$lt_simple_compile_test_code" > conftest.$ac_ext 60832b15cb3dSCy Schubert 60842b15cb3dSCy Schubert if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 60852b15cb3dSCy Schubert soname=conftest 60862b15cb3dSCy Schubert lib=conftest 60872b15cb3dSCy Schubert libobjs=conftest.$ac_objext 60882b15cb3dSCy Schubert deplibs= 60892b15cb3dSCy Schubert wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 60902b15cb3dSCy Schubert pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 60912b15cb3dSCy Schubert compiler_flags=-v 60922b15cb3dSCy Schubert linker_flags=-v 60932b15cb3dSCy Schubert verstring= 60942b15cb3dSCy Schubert output_objdir=. 60952b15cb3dSCy Schubert libname=conftest 60962b15cb3dSCy Schubert lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 60972b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)= 60982b15cb3dSCy Schubert if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 60992b15cb3dSCy Schubert then 61002b15cb3dSCy Schubert lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61012b15cb3dSCy Schubert else 61022b15cb3dSCy Schubert lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61032b15cb3dSCy Schubert fi 61042b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61052b15cb3dSCy Schubert else 61062b15cb3dSCy Schubert cat conftest.err 1>&5 61072b15cb3dSCy Schubert fi 61082b15cb3dSCy Schubert $RM conftest* 61092b15cb3dSCy Schubert ]) 61102b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 61112b15cb3dSCy Schubert ;; 61122b15cb3dSCy Schubert esac 61132b15cb3dSCy Schubert fi 61142b15cb3dSCy Schubert ;; 61152b15cb3dSCy Schubertesac 61162b15cb3dSCy Schubert 61172b15cb3dSCy Schubert_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61182b15cb3dSCy Schubert [Whether or not to add -lc for building shared libraries]) 61192b15cb3dSCy Schubert_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61202b15cb3dSCy Schubert [enable_shared_with_static_runtimes], [0], 61212b15cb3dSCy Schubert [Whether or not to disallow shared libs when runtime libs are static]) 61222b15cb3dSCy Schubert_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61232b15cb3dSCy Schubert [Compiler flag to allow reflexive dlopens]) 61242b15cb3dSCy Schubert_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61252b15cb3dSCy Schubert [Compiler flag to generate shared objects directly from archives]) 61262b15cb3dSCy Schubert_LT_TAGDECL([], [compiler_needs_object], [1], 61272b15cb3dSCy Schubert [Whether the compiler copes with passing no objects directly]) 61282b15cb3dSCy Schubert_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61292b15cb3dSCy Schubert [Create an old-style archive from a shared archive]) 61302b15cb3dSCy Schubert_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61312b15cb3dSCy Schubert [Create a temporary old-style archive to link instead of a shared archive]) 61322b15cb3dSCy Schubert_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61332b15cb3dSCy Schubert_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61342b15cb3dSCy Schubert_LT_TAGDECL([], [module_cmds], [2], 61352b15cb3dSCy Schubert [Commands used to build a loadable module if different from building 61362b15cb3dSCy Schubert a shared archive.]) 61372b15cb3dSCy Schubert_LT_TAGDECL([], [module_expsym_cmds], [2]) 61382b15cb3dSCy Schubert_LT_TAGDECL([], [with_gnu_ld], [1], 61392b15cb3dSCy Schubert [Whether we are building with GNU ld or not]) 61402b15cb3dSCy Schubert_LT_TAGDECL([], [allow_undefined_flag], [1], 61412b15cb3dSCy Schubert [Flag that allows shared libraries with undefined symbols to be built]) 61422b15cb3dSCy Schubert_LT_TAGDECL([], [no_undefined_flag], [1], 61432b15cb3dSCy Schubert [Flag that enforces no undefined symbols]) 61442b15cb3dSCy Schubert_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61452b15cb3dSCy Schubert [Flag to hardcode $libdir into a binary during linking. 61462b15cb3dSCy Schubert This must work even if $libdir does not exist]) 61472b15cb3dSCy Schubert_LT_TAGDECL([], [hardcode_libdir_separator], [1], 61482b15cb3dSCy Schubert [Whether we need a single "-rpath" flag with a separated argument]) 61492b15cb3dSCy Schubert_LT_TAGDECL([], [hardcode_direct], [0], 6150*f0574f5cSXin LI [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61512b15cb3dSCy Schubert DIR into the resulting binary]) 61522b15cb3dSCy Schubert_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6153*f0574f5cSXin LI [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61542b15cb3dSCy Schubert DIR into the resulting binary and the resulting library dependency is 6155*f0574f5cSXin LI "absolute", i.e impossible to change by setting $shlibpath_var if the 61562b15cb3dSCy Schubert library is relocated]) 61572b15cb3dSCy Schubert_LT_TAGDECL([], [hardcode_minus_L], [0], 61582b15cb3dSCy Schubert [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 61592b15cb3dSCy Schubert into the resulting binary]) 61602b15cb3dSCy Schubert_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 61612b15cb3dSCy Schubert [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 61622b15cb3dSCy Schubert into the resulting binary]) 61632b15cb3dSCy Schubert_LT_TAGDECL([], [hardcode_automatic], [0], 61642b15cb3dSCy Schubert [Set to "yes" if building a shared library automatically hardcodes DIR 61652b15cb3dSCy Schubert into the library and all subsequent libraries and executables linked 61662b15cb3dSCy Schubert against it]) 61672b15cb3dSCy Schubert_LT_TAGDECL([], [inherit_rpath], [0], 61682b15cb3dSCy Schubert [Set to yes if linker adds runtime paths of dependent libraries 61692b15cb3dSCy Schubert to runtime path list]) 61702b15cb3dSCy Schubert_LT_TAGDECL([], [link_all_deplibs], [0], 61712b15cb3dSCy Schubert [Whether libtool must link a program against all its dependency libraries]) 61722b15cb3dSCy Schubert_LT_TAGDECL([], [always_export_symbols], [0], 61732b15cb3dSCy Schubert [Set to "yes" if exported symbols are required]) 61742b15cb3dSCy Schubert_LT_TAGDECL([], [export_symbols_cmds], [2], 61752b15cb3dSCy Schubert [The commands to list exported symbols]) 61762b15cb3dSCy Schubert_LT_TAGDECL([], [exclude_expsyms], [1], 61772b15cb3dSCy Schubert [Symbols that should not be listed in the preloaded symbols]) 61782b15cb3dSCy Schubert_LT_TAGDECL([], [include_expsyms], [1], 61792b15cb3dSCy Schubert [Symbols that must always be exported]) 61802b15cb3dSCy Schubert_LT_TAGDECL([], [prelink_cmds], [2], 61812b15cb3dSCy Schubert [Commands necessary for linking programs (against libraries) with templates]) 61822b15cb3dSCy Schubert_LT_TAGDECL([], [postlink_cmds], [2], 61832b15cb3dSCy Schubert [Commands necessary for finishing linking programs]) 61842b15cb3dSCy Schubert_LT_TAGDECL([], [file_list_spec], [1], 61852b15cb3dSCy Schubert [Specify filename containing input files]) 61862b15cb3dSCy Schubertdnl FIXME: Not yet implemented 61872b15cb3dSCy Schubertdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 61882b15cb3dSCy Schubertdnl [Compiler flag to generate thread safe objects]) 61892b15cb3dSCy Schubert])# _LT_LINKER_SHLIBS 61902b15cb3dSCy Schubert 61912b15cb3dSCy Schubert 61922b15cb3dSCy Schubert# _LT_LANG_C_CONFIG([TAG]) 61932b15cb3dSCy Schubert# ------------------------ 61942b15cb3dSCy Schubert# Ensure that the configuration variables for a C compiler are suitably 61952b15cb3dSCy Schubert# defined. These variables are subsequently used by _LT_CONFIG to write 6196*f0574f5cSXin LI# the compiler configuration to 'libtool'. 61972b15cb3dSCy Schubertm4_defun([_LT_LANG_C_CONFIG], 61982b15cb3dSCy Schubert[m4_require([_LT_DECL_EGREP])dnl 6199*f0574f5cSXin LIlt_save_CC=$CC 62002b15cb3dSCy SchubertAC_LANG_PUSH(C) 62012b15cb3dSCy Schubert 62022b15cb3dSCy Schubert# Source file extension for C test sources. 62032b15cb3dSCy Schubertac_ext=c 62042b15cb3dSCy Schubert 62052b15cb3dSCy Schubert# Object file extension for compiled C test sources. 62062b15cb3dSCy Schubertobjext=o 62072b15cb3dSCy Schubert_LT_TAGVAR(objext, $1)=$objext 62082b15cb3dSCy Schubert 62092b15cb3dSCy Schubert# Code to be used in simple compile tests 62102b15cb3dSCy Schubertlt_simple_compile_test_code="int some_variable = 0;" 62112b15cb3dSCy Schubert 62122b15cb3dSCy Schubert# Code to be used in simple link tests 62132b15cb3dSCy Schubertlt_simple_link_test_code='int main(){return(0);}' 62142b15cb3dSCy Schubert 62152b15cb3dSCy Schubert_LT_TAG_COMPILER 62162b15cb3dSCy Schubert# Save the default compiler, since it gets overwritten when the other 62172b15cb3dSCy Schubert# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62182b15cb3dSCy Schubertcompiler_DEFAULT=$CC 62192b15cb3dSCy Schubert 62202b15cb3dSCy Schubert# save warnings/boilerplate of simple test code 62212b15cb3dSCy Schubert_LT_COMPILER_BOILERPLATE 62222b15cb3dSCy Schubert_LT_LINKER_BOILERPLATE 62232b15cb3dSCy Schubert 62242b15cb3dSCy Schubert## CAVEAT EMPTOR: 62252b15cb3dSCy Schubert## There is no encapsulation within the following macros, do not change 62262b15cb3dSCy Schubert## the running order or otherwise move them around unless you know exactly 62272b15cb3dSCy Schubert## what you are doing... 62282b15cb3dSCy Schubertif test -n "$compiler"; then 62292b15cb3dSCy Schubert _LT_COMPILER_NO_RTTI($1) 62302b15cb3dSCy Schubert _LT_COMPILER_PIC($1) 62312b15cb3dSCy Schubert _LT_COMPILER_C_O($1) 62322b15cb3dSCy Schubert _LT_COMPILER_FILE_LOCKS($1) 62332b15cb3dSCy Schubert _LT_LINKER_SHLIBS($1) 62342b15cb3dSCy Schubert _LT_SYS_DYNAMIC_LINKER($1) 62352b15cb3dSCy Schubert _LT_LINKER_HARDCODE_LIBPATH($1) 62362b15cb3dSCy Schubert LT_SYS_DLOPEN_SELF 62372b15cb3dSCy Schubert _LT_CMD_STRIPLIB 62382b15cb3dSCy Schubert 6239*f0574f5cSXin LI # Report what library types will actually be built 62402b15cb3dSCy Schubert AC_MSG_CHECKING([if libtool supports shared libraries]) 62412b15cb3dSCy Schubert AC_MSG_RESULT([$can_build_shared]) 62422b15cb3dSCy Schubert 62432b15cb3dSCy Schubert AC_MSG_CHECKING([whether to build shared libraries]) 6244*f0574f5cSXin LI test no = "$can_build_shared" && enable_shared=no 62452b15cb3dSCy Schubert 62462b15cb3dSCy Schubert # On AIX, shared libraries and static libraries use the same namespace, and 62472b15cb3dSCy Schubert # are all built from PIC. 62482b15cb3dSCy Schubert case $host_os in 62492b15cb3dSCy Schubert aix3*) 6250*f0574f5cSXin LI test yes = "$enable_shared" && enable_static=no 62512b15cb3dSCy Schubert if test -n "$RANLIB"; then 62522b15cb3dSCy Schubert archive_cmds="$archive_cmds~\$RANLIB \$lib" 62532b15cb3dSCy Schubert postinstall_cmds='$RANLIB $lib' 62542b15cb3dSCy Schubert fi 62552b15cb3dSCy Schubert ;; 62562b15cb3dSCy Schubert 62572b15cb3dSCy Schubert aix[[4-9]]*) 6258*f0574f5cSXin LI if test ia64 != "$host_cpu"; then 6259*f0574f5cSXin LI case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6260*f0574f5cSXin LI yes,aix,yes) ;; # shared object as lib.so file only 6261*f0574f5cSXin LI yes,svr4,*) ;; # shared object as lib.so archive member only 6262*f0574f5cSXin LI yes,*) enable_static=no ;; # shared object in lib.a archive as well 6263*f0574f5cSXin LI esac 62642b15cb3dSCy Schubert fi 62652b15cb3dSCy Schubert ;; 62662b15cb3dSCy Schubert esac 62672b15cb3dSCy Schubert AC_MSG_RESULT([$enable_shared]) 62682b15cb3dSCy Schubert 62692b15cb3dSCy Schubert AC_MSG_CHECKING([whether to build static libraries]) 62702b15cb3dSCy Schubert # Make sure either enable_shared or enable_static is yes. 6271*f0574f5cSXin LI test yes = "$enable_shared" || enable_static=yes 62722b15cb3dSCy Schubert AC_MSG_RESULT([$enable_static]) 62732b15cb3dSCy Schubert 62742b15cb3dSCy Schubert _LT_CONFIG($1) 62752b15cb3dSCy Schubertfi 62762b15cb3dSCy SchubertAC_LANG_POP 6277*f0574f5cSXin LICC=$lt_save_CC 62782b15cb3dSCy Schubert])# _LT_LANG_C_CONFIG 62792b15cb3dSCy Schubert 62802b15cb3dSCy Schubert 62812b15cb3dSCy Schubert# _LT_LANG_CXX_CONFIG([TAG]) 62822b15cb3dSCy Schubert# -------------------------- 62832b15cb3dSCy Schubert# Ensure that the configuration variables for a C++ compiler are suitably 62842b15cb3dSCy Schubert# defined. These variables are subsequently used by _LT_CONFIG to write 6285*f0574f5cSXin LI# the compiler configuration to 'libtool'. 62862b15cb3dSCy Schubertm4_defun([_LT_LANG_CXX_CONFIG], 62872b15cb3dSCy Schubert[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 62882b15cb3dSCy Schubertm4_require([_LT_DECL_EGREP])dnl 62892b15cb3dSCy Schubertm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6290*f0574f5cSXin LIif test -n "$CXX" && ( test no != "$CXX" && 6291*f0574f5cSXin LI ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6292*f0574f5cSXin LI (test g++ != "$CXX"))); then 62932b15cb3dSCy Schubert AC_PROG_CXXCPP 62942b15cb3dSCy Schubertelse 62952b15cb3dSCy Schubert _lt_caught_CXX_error=yes 62962b15cb3dSCy Schubertfi 62972b15cb3dSCy Schubert 62982b15cb3dSCy SchubertAC_LANG_PUSH(C++) 62992b15cb3dSCy Schubert_LT_TAGVAR(archive_cmds_need_lc, $1)=no 63002b15cb3dSCy Schubert_LT_TAGVAR(allow_undefined_flag, $1)= 63012b15cb3dSCy Schubert_LT_TAGVAR(always_export_symbols, $1)=no 63022b15cb3dSCy Schubert_LT_TAGVAR(archive_expsym_cmds, $1)= 63032b15cb3dSCy Schubert_LT_TAGVAR(compiler_needs_object, $1)=no 63042b15cb3dSCy Schubert_LT_TAGVAR(export_dynamic_flag_spec, $1)= 63052b15cb3dSCy Schubert_LT_TAGVAR(hardcode_direct, $1)=no 63062b15cb3dSCy Schubert_LT_TAGVAR(hardcode_direct_absolute, $1)=no 63072b15cb3dSCy Schubert_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 63082b15cb3dSCy Schubert_LT_TAGVAR(hardcode_libdir_separator, $1)= 63092b15cb3dSCy Schubert_LT_TAGVAR(hardcode_minus_L, $1)=no 63102b15cb3dSCy Schubert_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 63112b15cb3dSCy Schubert_LT_TAGVAR(hardcode_automatic, $1)=no 63122b15cb3dSCy Schubert_LT_TAGVAR(inherit_rpath, $1)=no 63132b15cb3dSCy Schubert_LT_TAGVAR(module_cmds, $1)= 63142b15cb3dSCy Schubert_LT_TAGVAR(module_expsym_cmds, $1)= 63152b15cb3dSCy Schubert_LT_TAGVAR(link_all_deplibs, $1)=unknown 63162b15cb3dSCy Schubert_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 63172b15cb3dSCy Schubert_LT_TAGVAR(reload_flag, $1)=$reload_flag 63182b15cb3dSCy Schubert_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 63192b15cb3dSCy Schubert_LT_TAGVAR(no_undefined_flag, $1)= 63202b15cb3dSCy Schubert_LT_TAGVAR(whole_archive_flag_spec, $1)= 63212b15cb3dSCy Schubert_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 63222b15cb3dSCy Schubert 63232b15cb3dSCy Schubert# Source file extension for C++ test sources. 63242b15cb3dSCy Schubertac_ext=cpp 63252b15cb3dSCy Schubert 63262b15cb3dSCy Schubert# Object file extension for compiled C++ test sources. 63272b15cb3dSCy Schubertobjext=o 63282b15cb3dSCy Schubert_LT_TAGVAR(objext, $1)=$objext 63292b15cb3dSCy Schubert 63302b15cb3dSCy Schubert# No sense in running all these tests if we already determined that 63312b15cb3dSCy Schubert# the CXX compiler isn't working. Some variables (like enable_shared) 63322b15cb3dSCy Schubert# are currently assumed to apply to all compilers on this platform, 63332b15cb3dSCy Schubert# and will be corrupted by setting them based on a non-working compiler. 6334*f0574f5cSXin LIif test yes != "$_lt_caught_CXX_error"; then 63352b15cb3dSCy Schubert # Code to be used in simple compile tests 63362b15cb3dSCy Schubert lt_simple_compile_test_code="int some_variable = 0;" 63372b15cb3dSCy Schubert 63382b15cb3dSCy Schubert # Code to be used in simple link tests 63392b15cb3dSCy Schubert lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 63402b15cb3dSCy Schubert 63412b15cb3dSCy Schubert # ltmain only uses $CC for tagged configurations so make sure $CC is set. 63422b15cb3dSCy Schubert _LT_TAG_COMPILER 63432b15cb3dSCy Schubert 63442b15cb3dSCy Schubert # save warnings/boilerplate of simple test code 63452b15cb3dSCy Schubert _LT_COMPILER_BOILERPLATE 63462b15cb3dSCy Schubert _LT_LINKER_BOILERPLATE 63472b15cb3dSCy Schubert 63482b15cb3dSCy Schubert # Allow CC to be a program name with arguments. 63492b15cb3dSCy Schubert lt_save_CC=$CC 63502b15cb3dSCy Schubert lt_save_CFLAGS=$CFLAGS 63512b15cb3dSCy Schubert lt_save_LD=$LD 63522b15cb3dSCy Schubert lt_save_GCC=$GCC 63532b15cb3dSCy Schubert GCC=$GXX 63542b15cb3dSCy Schubert lt_save_with_gnu_ld=$with_gnu_ld 63552b15cb3dSCy Schubert lt_save_path_LD=$lt_cv_path_LD 63562b15cb3dSCy Schubert if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 63572b15cb3dSCy Schubert lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 63582b15cb3dSCy Schubert else 63592b15cb3dSCy Schubert $as_unset lt_cv_prog_gnu_ld 63602b15cb3dSCy Schubert fi 63612b15cb3dSCy Schubert if test -n "${lt_cv_path_LDCXX+set}"; then 63622b15cb3dSCy Schubert lt_cv_path_LD=$lt_cv_path_LDCXX 63632b15cb3dSCy Schubert else 63642b15cb3dSCy Schubert $as_unset lt_cv_path_LD 63652b15cb3dSCy Schubert fi 63662b15cb3dSCy Schubert test -z "${LDCXX+set}" || LD=$LDCXX 63672b15cb3dSCy Schubert CC=${CXX-"c++"} 63682b15cb3dSCy Schubert CFLAGS=$CXXFLAGS 63692b15cb3dSCy Schubert compiler=$CC 63702b15cb3dSCy Schubert _LT_TAGVAR(compiler, $1)=$CC 63712b15cb3dSCy Schubert _LT_CC_BASENAME([$compiler]) 63722b15cb3dSCy Schubert 63732b15cb3dSCy Schubert if test -n "$compiler"; then 63742b15cb3dSCy Schubert # We don't want -fno-exception when compiling C++ code, so set the 63752b15cb3dSCy Schubert # no_builtin_flag separately 6376*f0574f5cSXin LI if test yes = "$GXX"; then 63772b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 63782b15cb3dSCy Schubert else 63792b15cb3dSCy Schubert _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 63802b15cb3dSCy Schubert fi 63812b15cb3dSCy Schubert 6382*f0574f5cSXin LI if test yes = "$GXX"; then 63832b15cb3dSCy Schubert # Set up default GNU C++ configuration 63842b15cb3dSCy Schubert 63852b15cb3dSCy Schubert LT_PATH_LD 63862b15cb3dSCy Schubert 63872b15cb3dSCy Schubert # Check if GNU C++ uses GNU ld as the underlying linker, since the 63882b15cb3dSCy Schubert # archiving commands below assume that GNU ld is being used. 6389*f0574f5cSXin LI if test yes = "$with_gnu_ld"; then 6390*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6391*f0574f5cSXin LI _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' 63922b15cb3dSCy Schubert 6393*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6394*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 63952b15cb3dSCy Schubert 63962b15cb3dSCy Schubert # If archive_cmds runs LD, not CC, wlarc should be empty 63972b15cb3dSCy Schubert # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 63982b15cb3dSCy Schubert # investigate it a little bit more. (MM) 6399*f0574f5cSXin LI wlarc='$wl' 64002b15cb3dSCy Schubert 64012b15cb3dSCy Schubert # ancient GNU ld didn't support --whole-archive et. al. 64022b15cb3dSCy Schubert if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64032b15cb3dSCy Schubert $GREP 'no-whole-archive' > /dev/null; then 6404*f0574f5cSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64052b15cb3dSCy Schubert else 64062b15cb3dSCy Schubert _LT_TAGVAR(whole_archive_flag_spec, $1)= 64072b15cb3dSCy Schubert fi 64082b15cb3dSCy Schubert else 64092b15cb3dSCy Schubert with_gnu_ld=no 64102b15cb3dSCy Schubert wlarc= 64112b15cb3dSCy Schubert 64122b15cb3dSCy Schubert # A generic and very simple default shared library creation 64132b15cb3dSCy Schubert # command for GNU C++ for the case where it uses the native 64142b15cb3dSCy Schubert # linker, instead of GNU ld. If possible, this setting should 64152b15cb3dSCy Schubert # overridden to take advantage of the native linker features on 64162b15cb3dSCy Schubert # the platform it is being used on. 64172b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64182b15cb3dSCy Schubert fi 64192b15cb3dSCy Schubert 64202b15cb3dSCy Schubert # Commands to make compiler produce verbose output that lists 64212b15cb3dSCy Schubert # what "hidden" libraries, object files and flags are used when 64222b15cb3dSCy Schubert # linking a shared library. 64232b15cb3dSCy Schubert output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 64242b15cb3dSCy Schubert 64252b15cb3dSCy Schubert else 64262b15cb3dSCy Schubert GXX=no 64272b15cb3dSCy Schubert with_gnu_ld=no 64282b15cb3dSCy Schubert wlarc= 64292b15cb3dSCy Schubert fi 64302b15cb3dSCy Schubert 64312b15cb3dSCy Schubert # PORTME: fill in a description of your system's C++ link characteristics 64322b15cb3dSCy Schubert AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64332b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=yes 64342b15cb3dSCy Schubert case $host_os in 64352b15cb3dSCy Schubert aix3*) 64362b15cb3dSCy Schubert # FIXME: insert proper C++ library support 64372b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 64382b15cb3dSCy Schubert ;; 64392b15cb3dSCy Schubert aix[[4-9]]*) 6440*f0574f5cSXin LI if test ia64 = "$host_cpu"; then 64412b15cb3dSCy Schubert # On IA64, the linker does run time linking by default, so we don't 64422b15cb3dSCy Schubert # have to do anything special. 64432b15cb3dSCy Schubert aix_use_runtimelinking=no 64442b15cb3dSCy Schubert exp_sym_flag='-Bexport' 6445*f0574f5cSXin LI no_entry_flag= 64462b15cb3dSCy Schubert else 64472b15cb3dSCy Schubert aix_use_runtimelinking=no 64482b15cb3dSCy Schubert 64492b15cb3dSCy Schubert # Test if we are trying to use run time linking or normal 64502b15cb3dSCy Schubert # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6451*f0574f5cSXin LI # have runtime linking enabled, and use it for executables. 6452*f0574f5cSXin LI # For shared libraries, we enable/disable runtime linking 6453*f0574f5cSXin LI # depending on the kind of the shared library created - 6454*f0574f5cSXin LI # when "with_aix_soname,aix_use_runtimelinking" is: 6455*f0574f5cSXin LI # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6456*f0574f5cSXin LI # "aix,yes" lib.so shared, rtl:yes, for executables 6457*f0574f5cSXin LI # lib.a static archive 6458*f0574f5cSXin LI # "both,no" lib.so.V(shr.o) shared, rtl:yes 6459*f0574f5cSXin LI # lib.a(lib.so.V) shared, rtl:no, for executables 6460*f0574f5cSXin LI # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6461*f0574f5cSXin LI # lib.a(lib.so.V) shared, rtl:no 6462*f0574f5cSXin LI # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6463*f0574f5cSXin LI # lib.a static archive 64642b15cb3dSCy Schubert case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 64652b15cb3dSCy Schubert for ld_flag in $LDFLAGS; do 64662b15cb3dSCy Schubert case $ld_flag in 64672b15cb3dSCy Schubert *-brtl*) 64682b15cb3dSCy Schubert aix_use_runtimelinking=yes 64692b15cb3dSCy Schubert break 64702b15cb3dSCy Schubert ;; 64712b15cb3dSCy Schubert esac 64722b15cb3dSCy Schubert done 6473*f0574f5cSXin LI if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6474*f0574f5cSXin LI # With aix-soname=svr4, we create the lib.so.V shared archives only, 6475*f0574f5cSXin LI # so we don't have lib.a shared libs to link our executables. 6476*f0574f5cSXin LI # We have to force runtime linking in this case. 6477*f0574f5cSXin LI aix_use_runtimelinking=yes 6478*f0574f5cSXin LI LDFLAGS="$LDFLAGS -Wl,-brtl" 6479*f0574f5cSXin LI fi 64802b15cb3dSCy Schubert ;; 64812b15cb3dSCy Schubert esac 64822b15cb3dSCy Schubert 64832b15cb3dSCy Schubert exp_sym_flag='-bexport' 64842b15cb3dSCy Schubert no_entry_flag='-bnoentry' 64852b15cb3dSCy Schubert fi 64862b15cb3dSCy Schubert 64872b15cb3dSCy Schubert # When large executables or shared objects are built, AIX ld can 64882b15cb3dSCy Schubert # have problems creating the table of contents. If linking a library 64892b15cb3dSCy Schubert # or program results in "error TOC overflow" add -mminimal-toc to 64902b15cb3dSCy Schubert # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 64912b15cb3dSCy Schubert # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 64922b15cb3dSCy Schubert 64932b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='' 64942b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 64952b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 64962b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 64972b15cb3dSCy Schubert _LT_TAGVAR(link_all_deplibs, $1)=yes 6498*f0574f5cSXin LI _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6499*f0574f5cSXin LI case $with_aix_soname,$aix_use_runtimelinking in 6500*f0574f5cSXin LI aix,*) ;; # no import file 6501*f0574f5cSXin LI svr4,* | *,yes) # use import file 6502*f0574f5cSXin LI # The Import File defines what to hardcode. 6503*f0574f5cSXin LI _LT_TAGVAR(hardcode_direct, $1)=no 6504*f0574f5cSXin LI _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6505*f0574f5cSXin LI ;; 6506*f0574f5cSXin LI esac 65072b15cb3dSCy Schubert 6508*f0574f5cSXin LI if test yes = "$GXX"; then 65092b15cb3dSCy Schubert case $host_os in aix4.[[012]]|aix4.[[012]].*) 65102b15cb3dSCy Schubert # We only want to do this on AIX 4.2 and lower, the check 65112b15cb3dSCy Schubert # below for broken collect2 doesn't work under 4.3+ 6512*f0574f5cSXin LI collect2name=`$CC -print-prog-name=collect2` 65132b15cb3dSCy Schubert if test -f "$collect2name" && 65142b15cb3dSCy Schubert strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65152b15cb3dSCy Schubert then 65162b15cb3dSCy Schubert # We have reworked collect2 65172b15cb3dSCy Schubert : 65182b15cb3dSCy Schubert else 65192b15cb3dSCy Schubert # We have old collect2 65202b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=unsupported 65212b15cb3dSCy Schubert # It fails to find uninstalled libraries when the uninstalled 65222b15cb3dSCy Schubert # path is not listed in the libpath. Setting hardcode_minus_L 65232b15cb3dSCy Schubert # to unsupported forces relinking 65242b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes 65252b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65262b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)= 65272b15cb3dSCy Schubert fi 65282b15cb3dSCy Schubert esac 65292b15cb3dSCy Schubert shared_flag='-shared' 6530*f0574f5cSXin LI if test yes = "$aix_use_runtimelinking"; then 6531*f0574f5cSXin LI shared_flag=$shared_flag' $wl-G' 65322b15cb3dSCy Schubert fi 6533*f0574f5cSXin LI # Need to ensure runtime linking is disabled for the traditional 6534*f0574f5cSXin LI # shared library, or the linker may eventually find shared libraries 6535*f0574f5cSXin LI # /with/ Import File - we do not want to mix them. 6536*f0574f5cSXin LI shared_flag_aix='-shared' 6537*f0574f5cSXin LI shared_flag_svr4='-shared $wl-G' 65382b15cb3dSCy Schubert else 65392b15cb3dSCy Schubert # not using gcc 6540*f0574f5cSXin LI if test ia64 = "$host_cpu"; then 65412b15cb3dSCy Schubert # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65422b15cb3dSCy Schubert # chokes on -Wl,-G. The following line is correct: 65432b15cb3dSCy Schubert shared_flag='-G' 65442b15cb3dSCy Schubert else 6545*f0574f5cSXin LI if test yes = "$aix_use_runtimelinking"; then 6546*f0574f5cSXin LI shared_flag='$wl-G' 65472b15cb3dSCy Schubert else 6548*f0574f5cSXin LI shared_flag='$wl-bM:SRE' 65492b15cb3dSCy Schubert fi 6550*f0574f5cSXin LI shared_flag_aix='$wl-bM:SRE' 6551*f0574f5cSXin LI shared_flag_svr4='$wl-G' 65522b15cb3dSCy Schubert fi 65532b15cb3dSCy Schubert fi 65542b15cb3dSCy Schubert 6555*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 65562b15cb3dSCy Schubert # It seems that -bexpall does not export symbols beginning with 65572b15cb3dSCy Schubert # underscore (_), so it is better to generate a list of symbols to 65582b15cb3dSCy Schubert # export. 65592b15cb3dSCy Schubert _LT_TAGVAR(always_export_symbols, $1)=yes 6560*f0574f5cSXin LI if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 65612b15cb3dSCy Schubert # Warning - without using the other runtime loading flags (-brtl), 65622b15cb3dSCy Schubert # -berok will link without error, but may produce a broken library. 6563*f0574f5cSXin LI # The "-G" linker flag allows undefined symbols. 6564*f0574f5cSXin LI _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 65652b15cb3dSCy Schubert # Determine the default libpath from the value encoded in an empty 65662b15cb3dSCy Schubert # executable. 65672b15cb3dSCy Schubert _LT_SYS_MODULE_PATH_AIX([$1]) 6568*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65692b15cb3dSCy Schubert 6570*f0574f5cSXin LI _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 65712b15cb3dSCy Schubert else 6572*f0574f5cSXin LI if test ia64 = "$host_cpu"; then 6573*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 65742b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6575*f0574f5cSXin LI _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" 65762b15cb3dSCy Schubert else 65772b15cb3dSCy Schubert # Determine the default libpath from the value encoded in an 65782b15cb3dSCy Schubert # empty executable. 65792b15cb3dSCy Schubert _LT_SYS_MODULE_PATH_AIX([$1]) 6580*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65812b15cb3dSCy Schubert # Warning - without using the other run time loading flags, 65822b15cb3dSCy Schubert # -berok will link without error, but may produce a broken library. 6583*f0574f5cSXin LI _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6584*f0574f5cSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6585*f0574f5cSXin LI if test yes = "$with_gnu_ld"; then 65862b15cb3dSCy Schubert # We only use this code for GNU lds that support --whole-archive. 6587*f0574f5cSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 65882b15cb3dSCy Schubert else 65892b15cb3dSCy Schubert # Exported symbols can be pulled into shared objects from archives 65902b15cb3dSCy Schubert _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 65912b15cb3dSCy Schubert fi 65922b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6593*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6594*f0574f5cSXin LI # -brtl affects multiple linker settings, -berok does not and is overridden later 6595*f0574f5cSXin LI compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6596*f0574f5cSXin LI if test svr4 != "$with_aix_soname"; then 65972b15cb3dSCy Schubert # This is similar to how AIX traditionally builds its shared 6598*f0574f5cSXin LI # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6599*f0574f5cSXin LI _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' 6600*f0574f5cSXin LI fi 6601*f0574f5cSXin LI if test aix != "$with_aix_soname"; then 6602*f0574f5cSXin LI _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' 6603*f0574f5cSXin LI else 6604*f0574f5cSXin LI # used by -dlpreopen to get the symbols 6605*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6606*f0574f5cSXin LI fi 6607*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66082b15cb3dSCy Schubert fi 66092b15cb3dSCy Schubert fi 66102b15cb3dSCy Schubert ;; 66112b15cb3dSCy Schubert 66122b15cb3dSCy Schubert beos*) 66132b15cb3dSCy Schubert if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66142b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66152b15cb3dSCy Schubert # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66162b15cb3dSCy Schubert # support --undefined. This deserves some investigation. FIXME 6617*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66182b15cb3dSCy Schubert else 66192b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 66202b15cb3dSCy Schubert fi 66212b15cb3dSCy Schubert ;; 66222b15cb3dSCy Schubert 66232b15cb3dSCy Schubert chorus*) 66242b15cb3dSCy Schubert case $cc_basename in 66252b15cb3dSCy Schubert *) 66262b15cb3dSCy Schubert # FIXME: insert proper C++ library support 66272b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 66282b15cb3dSCy Schubert ;; 66292b15cb3dSCy Schubert esac 66302b15cb3dSCy Schubert ;; 66312b15cb3dSCy Schubert 66322b15cb3dSCy Schubert cygwin* | mingw* | pw32* | cegcc*) 66332b15cb3dSCy Schubert case $GXX,$cc_basename in 66342b15cb3dSCy Schubert ,cl* | no,cl*) 66352b15cb3dSCy Schubert # Native MSVC 66362b15cb3dSCy Schubert # hardcode_libdir_flag_spec is actually meaningless, as there is 66372b15cb3dSCy Schubert # no search path for DLLs. 66382b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 66392b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66402b15cb3dSCy Schubert _LT_TAGVAR(always_export_symbols, $1)=yes 66412b15cb3dSCy Schubert _LT_TAGVAR(file_list_spec, $1)='@' 66422b15cb3dSCy Schubert # Tell ltmain to make .lib files, not .a files. 66432b15cb3dSCy Schubert libext=lib 66442b15cb3dSCy Schubert # Tell ltmain to make .dll files, not .so files. 6645*f0574f5cSXin LI shrext_cmds=.dll 66462b15cb3dSCy Schubert # FIXME: Setting linknames here is a bad hack. 6647*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6648*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6649*f0574f5cSXin LI cp "$export_symbols" "$output_objdir/$soname.def"; 6650*f0574f5cSXin LI echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 66512b15cb3dSCy Schubert else 6652*f0574f5cSXin LI $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 66532b15cb3dSCy Schubert fi~ 66542b15cb3dSCy Schubert $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 66552b15cb3dSCy Schubert linknames=' 66562b15cb3dSCy Schubert # The linker will not automatically build a static lib if we build a DLL. 66572b15cb3dSCy Schubert # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 66582b15cb3dSCy Schubert _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66592b15cb3dSCy Schubert # Don't use ranlib 66602b15cb3dSCy Schubert _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 66612b15cb3dSCy Schubert _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 66622b15cb3dSCy Schubert lt_tool_outputfile="@TOOL_OUTPUT@"~ 66632b15cb3dSCy Schubert case $lt_outputfile in 66642b15cb3dSCy Schubert *.exe|*.EXE) ;; 66652b15cb3dSCy Schubert *) 6666*f0574f5cSXin LI lt_outputfile=$lt_outputfile.exe 6667*f0574f5cSXin LI lt_tool_outputfile=$lt_tool_outputfile.exe 66682b15cb3dSCy Schubert ;; 66692b15cb3dSCy Schubert esac~ 66702b15cb3dSCy Schubert func_to_tool_file "$lt_outputfile"~ 6671*f0574f5cSXin LI if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 66722b15cb3dSCy Schubert $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 66732b15cb3dSCy Schubert $RM "$lt_outputfile.manifest"; 66742b15cb3dSCy Schubert fi' 66752b15cb3dSCy Schubert ;; 66762b15cb3dSCy Schubert *) 66772b15cb3dSCy Schubert # g++ 66782b15cb3dSCy Schubert # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 66792b15cb3dSCy Schubert # as there is no search path for DLLs. 66802b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6681*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 66822b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66832b15cb3dSCy Schubert _LT_TAGVAR(always_export_symbols, $1)=no 66842b15cb3dSCy Schubert _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66852b15cb3dSCy Schubert 66862b15cb3dSCy Schubert if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6687*f0574f5cSXin LI _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' 6688*f0574f5cSXin LI # If the export-symbols file already is a .def file, use it as 6689*f0574f5cSXin LI # is; otherwise, prepend EXPORTS... 6690*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 66912b15cb3dSCy Schubert cp $export_symbols $output_objdir/$soname.def; 66922b15cb3dSCy Schubert else 66932b15cb3dSCy Schubert echo EXPORTS > $output_objdir/$soname.def; 66942b15cb3dSCy Schubert cat $export_symbols >> $output_objdir/$soname.def; 66952b15cb3dSCy Schubert fi~ 6696*f0574f5cSXin LI $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' 66972b15cb3dSCy Schubert else 66982b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 66992b15cb3dSCy Schubert fi 67002b15cb3dSCy Schubert ;; 67012b15cb3dSCy Schubert esac 67022b15cb3dSCy Schubert ;; 67032b15cb3dSCy Schubert darwin* | rhapsody*) 67042b15cb3dSCy Schubert _LT_DARWIN_LINKER_FEATURES($1) 67052b15cb3dSCy Schubert ;; 67062b15cb3dSCy Schubert 6707*f0574f5cSXin LI os2*) 6708*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6709*f0574f5cSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 6710*f0574f5cSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6711*f0574f5cSXin LI shrext_cmds=.dll 6712*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6713*f0574f5cSXin LI $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6714*f0574f5cSXin LI $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6715*f0574f5cSXin LI $ECHO EXPORTS >> $output_objdir/$libname.def~ 6716*f0574f5cSXin LI emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6717*f0574f5cSXin LI $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6718*f0574f5cSXin LI emximp -o $lib $output_objdir/$libname.def' 6719*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6720*f0574f5cSXin LI $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6721*f0574f5cSXin LI $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6722*f0574f5cSXin LI $ECHO EXPORTS >> $output_objdir/$libname.def~ 6723*f0574f5cSXin LI prefix_cmds="$SED"~ 6724*f0574f5cSXin LI if test EXPORTS = "`$SED 1q $export_symbols`"; then 6725*f0574f5cSXin LI prefix_cmds="$prefix_cmds -e 1d"; 6726*f0574f5cSXin LI fi~ 6727*f0574f5cSXin LI prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6728*f0574f5cSXin LI cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6729*f0574f5cSXin LI $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6730*f0574f5cSXin LI emximp -o $lib $output_objdir/$libname.def' 6731*f0574f5cSXin LI _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6732*f0574f5cSXin LI _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6733*f0574f5cSXin LI ;; 6734*f0574f5cSXin LI 67352b15cb3dSCy Schubert dgux*) 67362b15cb3dSCy Schubert case $cc_basename in 67372b15cb3dSCy Schubert ec++*) 67382b15cb3dSCy Schubert # FIXME: insert proper C++ library support 67392b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 67402b15cb3dSCy Schubert ;; 67412b15cb3dSCy Schubert ghcx*) 67422b15cb3dSCy Schubert # Green Hills C++ Compiler 67432b15cb3dSCy Schubert # FIXME: insert proper C++ library support 67442b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 67452b15cb3dSCy Schubert ;; 67462b15cb3dSCy Schubert *) 67472b15cb3dSCy Schubert # FIXME: insert proper C++ library support 67482b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 67492b15cb3dSCy Schubert ;; 67502b15cb3dSCy Schubert esac 67512b15cb3dSCy Schubert ;; 67522b15cb3dSCy Schubert 6753*f0574f5cSXin LI freebsd2.*) 67542b15cb3dSCy Schubert # C++ shared libraries reported to be fairly broken before 67552b15cb3dSCy Schubert # switch to ELF 67562b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 67572b15cb3dSCy Schubert ;; 67582b15cb3dSCy Schubert 67592b15cb3dSCy Schubert freebsd-elf*) 67602b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67612b15cb3dSCy Schubert ;; 67622b15cb3dSCy Schubert 67632b15cb3dSCy Schubert freebsd* | dragonfly*) 67642b15cb3dSCy Schubert # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 67652b15cb3dSCy Schubert # conventions 67662b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=yes 67672b15cb3dSCy Schubert ;; 67682b15cb3dSCy Schubert 67692b15cb3dSCy Schubert haiku*) 6770*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 67712b15cb3dSCy Schubert _LT_TAGVAR(link_all_deplibs, $1)=yes 67722b15cb3dSCy Schubert ;; 67732b15cb3dSCy Schubert 67742b15cb3dSCy Schubert hpux9*) 6775*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 67762b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6777*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 67782b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 67792b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 67802b15cb3dSCy Schubert # but as the default 67812b15cb3dSCy Schubert # location of the library. 67822b15cb3dSCy Schubert 67832b15cb3dSCy Schubert case $cc_basename in 67842b15cb3dSCy Schubert CC*) 67852b15cb3dSCy Schubert # FIXME: insert proper C++ library support 67862b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 67872b15cb3dSCy Schubert ;; 67882b15cb3dSCy Schubert aCC*) 6789*f0574f5cSXin LI _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' 67902b15cb3dSCy Schubert # Commands to make compiler produce verbose output that lists 67912b15cb3dSCy Schubert # what "hidden" libraries, object files and flags are used when 67922b15cb3dSCy Schubert # linking a shared library. 67932b15cb3dSCy Schubert # 67942b15cb3dSCy Schubert # There doesn't appear to be a way to prevent this compiler from 67952b15cb3dSCy Schubert # explicitly linking system object files so we need to strip them 67962b15cb3dSCy Schubert # from the output so that they don't get included in the library 67972b15cb3dSCy Schubert # dependencies. 6798*f0574f5cSXin LI 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"' 67992b15cb3dSCy Schubert ;; 68002b15cb3dSCy Schubert *) 6801*f0574f5cSXin LI if test yes = "$GXX"; then 6802*f0574f5cSXin LI _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' 68032b15cb3dSCy Schubert else 68042b15cb3dSCy Schubert # FIXME: insert proper C++ library support 68052b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 68062b15cb3dSCy Schubert fi 68072b15cb3dSCy Schubert ;; 68082b15cb3dSCy Schubert esac 68092b15cb3dSCy Schubert ;; 68102b15cb3dSCy Schubert 68112b15cb3dSCy Schubert hpux10*|hpux11*) 6812*f0574f5cSXin LI if test no = "$with_gnu_ld"; then 6813*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68142b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68152b15cb3dSCy Schubert 68162b15cb3dSCy Schubert case $host_cpu in 68172b15cb3dSCy Schubert hppa*64*|ia64*) 68182b15cb3dSCy Schubert ;; 68192b15cb3dSCy Schubert *) 6820*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68212b15cb3dSCy Schubert ;; 68222b15cb3dSCy Schubert esac 68232b15cb3dSCy Schubert fi 68242b15cb3dSCy Schubert case $host_cpu in 68252b15cb3dSCy Schubert hppa*64*|ia64*) 68262b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=no 68272b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68282b15cb3dSCy Schubert ;; 68292b15cb3dSCy Schubert *) 68302b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 68312b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68322b15cb3dSCy Schubert _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68332b15cb3dSCy Schubert # but as the default 68342b15cb3dSCy Schubert # location of the library. 68352b15cb3dSCy Schubert ;; 68362b15cb3dSCy Schubert esac 68372b15cb3dSCy Schubert 68382b15cb3dSCy Schubert case $cc_basename in 68392b15cb3dSCy Schubert CC*) 68402b15cb3dSCy Schubert # FIXME: insert proper C++ library support 68412b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 68422b15cb3dSCy Schubert ;; 68432b15cb3dSCy Schubert aCC*) 68442b15cb3dSCy Schubert case $host_cpu in 68452b15cb3dSCy Schubert hppa*64*) 6846*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68472b15cb3dSCy Schubert ;; 68482b15cb3dSCy Schubert ia64*) 6849*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68502b15cb3dSCy Schubert ;; 68512b15cb3dSCy Schubert *) 6852*f0574f5cSXin LI _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' 68532b15cb3dSCy Schubert ;; 68542b15cb3dSCy Schubert esac 68552b15cb3dSCy Schubert # Commands to make compiler produce verbose output that lists 68562b15cb3dSCy Schubert # what "hidden" libraries, object files and flags are used when 68572b15cb3dSCy Schubert # linking a shared library. 68582b15cb3dSCy Schubert # 68592b15cb3dSCy Schubert # There doesn't appear to be a way to prevent this compiler from 68602b15cb3dSCy Schubert # explicitly linking system object files so we need to strip them 68612b15cb3dSCy Schubert # from the output so that they don't get included in the library 68622b15cb3dSCy Schubert # dependencies. 6863*f0574f5cSXin LI 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"' 68642b15cb3dSCy Schubert ;; 68652b15cb3dSCy Schubert *) 6866*f0574f5cSXin LI if test yes = "$GXX"; then 6867*f0574f5cSXin LI if test no = "$with_gnu_ld"; then 68682b15cb3dSCy Schubert case $host_cpu in 68692b15cb3dSCy Schubert hppa*64*) 6870*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68712b15cb3dSCy Schubert ;; 68722b15cb3dSCy Schubert ia64*) 6873*f0574f5cSXin LI _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' 68742b15cb3dSCy Schubert ;; 68752b15cb3dSCy Schubert *) 6876*f0574f5cSXin LI _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' 68772b15cb3dSCy Schubert ;; 68782b15cb3dSCy Schubert esac 68792b15cb3dSCy Schubert fi 68802b15cb3dSCy Schubert else 68812b15cb3dSCy Schubert # FIXME: insert proper C++ library support 68822b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 68832b15cb3dSCy Schubert fi 68842b15cb3dSCy Schubert ;; 68852b15cb3dSCy Schubert esac 68862b15cb3dSCy Schubert ;; 68872b15cb3dSCy Schubert 68882b15cb3dSCy Schubert interix[[3-9]]*) 68892b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=no 68902b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6891*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6892*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68932b15cb3dSCy Schubert # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 68942b15cb3dSCy Schubert # Instead, shared libraries are loaded at an image base (0x10000000 by 68952b15cb3dSCy Schubert # default) and relocated if they conflict, which is a slow very memory 68962b15cb3dSCy Schubert # consuming and fragmenting process. To avoid this, we pick a random, 68972b15cb3dSCy Schubert # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 68982b15cb3dSCy Schubert # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6899*f0574f5cSXin LI _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' 6900*f0574f5cSXin LI _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' 69012b15cb3dSCy Schubert ;; 69022b15cb3dSCy Schubert irix5* | irix6*) 69032b15cb3dSCy Schubert case $cc_basename in 69042b15cb3dSCy Schubert CC*) 69052b15cb3dSCy Schubert # SGI C++ 6906*f0574f5cSXin LI _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' 69072b15cb3dSCy Schubert 69082b15cb3dSCy Schubert # Archives containing C++ object files must be created using 69092b15cb3dSCy Schubert # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69102b15cb3dSCy Schubert # necessary to make sure instantiated templates are included 69112b15cb3dSCy Schubert # in the archive. 69122b15cb3dSCy Schubert _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69132b15cb3dSCy Schubert ;; 69142b15cb3dSCy Schubert *) 6915*f0574f5cSXin LI if test yes = "$GXX"; then 6916*f0574f5cSXin LI if test no = "$with_gnu_ld"; then 6917*f0574f5cSXin LI _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' 69182b15cb3dSCy Schubert else 6919*f0574f5cSXin LI _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' 69202b15cb3dSCy Schubert fi 69212b15cb3dSCy Schubert fi 69222b15cb3dSCy Schubert _LT_TAGVAR(link_all_deplibs, $1)=yes 69232b15cb3dSCy Schubert ;; 69242b15cb3dSCy Schubert esac 6925*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69262b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69272b15cb3dSCy Schubert _LT_TAGVAR(inherit_rpath, $1)=yes 69282b15cb3dSCy Schubert ;; 69292b15cb3dSCy Schubert 6930*f0574f5cSXin LI linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69312b15cb3dSCy Schubert case $cc_basename in 69322b15cb3dSCy Schubert KCC*) 69332b15cb3dSCy Schubert # Kuck and Associates, Inc. (KAI) C++ Compiler 69342b15cb3dSCy Schubert 69352b15cb3dSCy Schubert # KCC will only create a shared library if the output file 69362b15cb3dSCy Schubert # ends with ".so" (or ".sl" for HP-UX), so rename the library 69372b15cb3dSCy Schubert # to its proper name (with version) after linking. 6938*f0574f5cSXin LI _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' 6939*f0574f5cSXin LI _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' 69402b15cb3dSCy Schubert # Commands to make compiler produce verbose output that lists 69412b15cb3dSCy Schubert # what "hidden" libraries, object files and flags are used when 69422b15cb3dSCy Schubert # linking a shared library. 69432b15cb3dSCy Schubert # 69442b15cb3dSCy Schubert # There doesn't appear to be a way to prevent this compiler from 69452b15cb3dSCy Schubert # explicitly linking system object files so we need to strip them 69462b15cb3dSCy Schubert # from the output so that they don't get included in the library 69472b15cb3dSCy Schubert # dependencies. 6948*f0574f5cSXin LI 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"' 69492b15cb3dSCy Schubert 6950*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6951*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 69522b15cb3dSCy Schubert 69532b15cb3dSCy Schubert # Archives containing C++ object files must be created using 69542b15cb3dSCy Schubert # "CC -Bstatic", where "CC" is the KAI C++ compiler. 69552b15cb3dSCy Schubert _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 69562b15cb3dSCy Schubert ;; 69572b15cb3dSCy Schubert icpc* | ecpc* ) 69582b15cb3dSCy Schubert # Intel C++ 69592b15cb3dSCy Schubert with_gnu_ld=yes 69602b15cb3dSCy Schubert # version 8.0 and above of icpc choke on multiply defined symbols 69612b15cb3dSCy Schubert # if we add $predep_objects and $postdep_objects, however 7.1 and 69622b15cb3dSCy Schubert # earlier do not add the objects themselves. 69632b15cb3dSCy Schubert case `$CC -V 2>&1` in 69642b15cb3dSCy Schubert *"Version 7."*) 6965*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6966*f0574f5cSXin LI _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' 69672b15cb3dSCy Schubert ;; 69682b15cb3dSCy Schubert *) # Version 8.0 or newer 69692b15cb3dSCy Schubert tmp_idyn= 69702b15cb3dSCy Schubert case $host_cpu in 69712b15cb3dSCy Schubert ia64*) tmp_idyn=' -i_dynamic';; 69722b15cb3dSCy Schubert esac 6973*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6974*f0574f5cSXin LI _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' 69752b15cb3dSCy Schubert ;; 69762b15cb3dSCy Schubert esac 69772b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6978*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6979*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6980*f0574f5cSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 69812b15cb3dSCy Schubert ;; 69822b15cb3dSCy Schubert pgCC* | pgcpp*) 69832b15cb3dSCy Schubert # Portland Group C++ compiler 69842b15cb3dSCy Schubert case `$CC -V` in 69852b15cb3dSCy Schubert *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 69862b15cb3dSCy Schubert _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 69872b15cb3dSCy Schubert rm -rf $tpldir~ 69882b15cb3dSCy Schubert $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 69892b15cb3dSCy Schubert compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 69902b15cb3dSCy Schubert _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 69912b15cb3dSCy Schubert rm -rf $tpldir~ 69922b15cb3dSCy Schubert $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 69932b15cb3dSCy Schubert $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 69942b15cb3dSCy Schubert $RANLIB $oldlib' 69952b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 69962b15cb3dSCy Schubert rm -rf $tpldir~ 69972b15cb3dSCy Schubert $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6998*f0574f5cSXin LI $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 69992b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 70002b15cb3dSCy Schubert rm -rf $tpldir~ 70012b15cb3dSCy Schubert $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7002*f0574f5cSXin LI $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' 70032b15cb3dSCy Schubert ;; 70042b15cb3dSCy Schubert *) # Version 6 and above use weak symbols 7005*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7006*f0574f5cSXin LI _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' 70072b15cb3dSCy Schubert ;; 70082b15cb3dSCy Schubert esac 70092b15cb3dSCy Schubert 7010*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7011*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7012*f0574f5cSXin LI _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' 70132b15cb3dSCy Schubert ;; 70142b15cb3dSCy Schubert cxx*) 70152b15cb3dSCy Schubert # Compaq C++ 7016*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7017*f0574f5cSXin LI _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' 70182b15cb3dSCy Schubert 70192b15cb3dSCy Schubert runpath_var=LD_RUN_PATH 70202b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70212b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 70222b15cb3dSCy Schubert 70232b15cb3dSCy Schubert # Commands to make compiler produce verbose output that lists 70242b15cb3dSCy Schubert # what "hidden" libraries, object files and flags are used when 70252b15cb3dSCy Schubert # linking a shared library. 70262b15cb3dSCy Schubert # 70272b15cb3dSCy Schubert # There doesn't appear to be a way to prevent this compiler from 70282b15cb3dSCy Schubert # explicitly linking system object files so we need to strip them 70292b15cb3dSCy Schubert # from the output so that they don't get included in the library 70302b15cb3dSCy Schubert # dependencies. 7031*f0574f5cSXin LI 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' 70322b15cb3dSCy Schubert ;; 70332b15cb3dSCy Schubert xl* | mpixl* | bgxl*) 70342b15cb3dSCy Schubert # IBM XL 8.0 on PPC, with GNU ld 7035*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7036*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7037*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7038*f0574f5cSXin LI if test yes = "$supports_anon_versioning"; then 70392b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 70402b15cb3dSCy Schubert cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 70412b15cb3dSCy Schubert echo "local: *; };" >> $output_objdir/$libname.ver~ 7042*f0574f5cSXin LI $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70432b15cb3dSCy Schubert fi 70442b15cb3dSCy Schubert ;; 70452b15cb3dSCy Schubert *) 70462b15cb3dSCy Schubert case `$CC -V 2>&1 | sed 5q` in 70472b15cb3dSCy Schubert *Sun\ C*) 70482b15cb3dSCy Schubert # Sun C++ 5.9 70492b15cb3dSCy Schubert _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7050*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7051*f0574f5cSXin LI _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' 70522b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7053*f0574f5cSXin LI _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' 70542b15cb3dSCy Schubert _LT_TAGVAR(compiler_needs_object, $1)=yes 70552b15cb3dSCy Schubert 70562b15cb3dSCy Schubert # Not sure whether something based on 70572b15cb3dSCy Schubert # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 70582b15cb3dSCy Schubert # would be better. 70592b15cb3dSCy Schubert output_verbose_link_cmd='func_echo_all' 70602b15cb3dSCy Schubert 70612b15cb3dSCy Schubert # Archives containing C++ object files must be created using 70622b15cb3dSCy Schubert # "CC -xar", where "CC" is the Sun C++ compiler. This is 70632b15cb3dSCy Schubert # necessary to make sure instantiated templates are included 70642b15cb3dSCy Schubert # in the archive. 70652b15cb3dSCy Schubert _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 70662b15cb3dSCy Schubert ;; 70672b15cb3dSCy Schubert esac 70682b15cb3dSCy Schubert ;; 70692b15cb3dSCy Schubert esac 70702b15cb3dSCy Schubert ;; 70712b15cb3dSCy Schubert 70722b15cb3dSCy Schubert lynxos*) 70732b15cb3dSCy Schubert # FIXME: insert proper C++ library support 70742b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 70752b15cb3dSCy Schubert ;; 70762b15cb3dSCy Schubert 70772b15cb3dSCy Schubert m88k*) 70782b15cb3dSCy Schubert # FIXME: insert proper C++ library support 70792b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 70802b15cb3dSCy Schubert ;; 70812b15cb3dSCy Schubert 70822b15cb3dSCy Schubert mvs*) 70832b15cb3dSCy Schubert case $cc_basename in 70842b15cb3dSCy Schubert cxx*) 70852b15cb3dSCy Schubert # FIXME: insert proper C++ library support 70862b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 70872b15cb3dSCy Schubert ;; 70882b15cb3dSCy Schubert *) 70892b15cb3dSCy Schubert # FIXME: insert proper C++ library support 70902b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 70912b15cb3dSCy Schubert ;; 70922b15cb3dSCy Schubert esac 70932b15cb3dSCy Schubert ;; 70942b15cb3dSCy Schubert 70952b15cb3dSCy Schubert netbsd*) 70962b15cb3dSCy Schubert if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 70972b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 70982b15cb3dSCy Schubert wlarc= 70992b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71002b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 71012b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71022b15cb3dSCy Schubert fi 71032b15cb3dSCy Schubert # Workaround some broken pre-1.5 toolchains 71042b15cb3dSCy Schubert output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71052b15cb3dSCy Schubert ;; 71062b15cb3dSCy Schubert 71072b15cb3dSCy Schubert *nto* | *qnx*) 71082b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=yes 71092b15cb3dSCy Schubert ;; 71102b15cb3dSCy Schubert 7111*f0574f5cSXin LI openbsd* | bitrig*) 71122b15cb3dSCy Schubert if test -f /usr/libexec/ld.so; then 71132b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct, $1)=yes 71142b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71152b15cb3dSCy Schubert _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71162b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7117*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7118*f0574f5cSXin LI if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7119*f0574f5cSXin LI _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' 7120*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7121*f0574f5cSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71222b15cb3dSCy Schubert fi 71232b15cb3dSCy Schubert output_verbose_link_cmd=func_echo_all 71242b15cb3dSCy Schubert else 71252b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 71262b15cb3dSCy Schubert fi 71272b15cb3dSCy Schubert ;; 71282b15cb3dSCy Schubert 71292b15cb3dSCy Schubert osf3* | osf4* | osf5*) 71302b15cb3dSCy Schubert case $cc_basename in 71312b15cb3dSCy Schubert KCC*) 71322b15cb3dSCy Schubert # Kuck and Associates, Inc. (KAI) C++ Compiler 71332b15cb3dSCy Schubert 71342b15cb3dSCy Schubert # KCC will only create a shared library if the output file 71352b15cb3dSCy Schubert # ends with ".so" (or ".sl" for HP-UX), so rename the library 71362b15cb3dSCy Schubert # to its proper name (with version) after linking. 7137*f0574f5cSXin LI _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' 71382b15cb3dSCy Schubert 7139*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71402b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71412b15cb3dSCy Schubert 71422b15cb3dSCy Schubert # Archives containing C++ object files must be created using 71432b15cb3dSCy Schubert # the KAI C++ compiler. 71442b15cb3dSCy Schubert case $host in 71452b15cb3dSCy Schubert osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71462b15cb3dSCy Schubert *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71472b15cb3dSCy Schubert esac 71482b15cb3dSCy Schubert ;; 71492b15cb3dSCy Schubert RCC*) 71502b15cb3dSCy Schubert # Rational C++ 2.4.1 71512b15cb3dSCy Schubert # FIXME: insert proper C++ library support 71522b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 71532b15cb3dSCy Schubert ;; 71542b15cb3dSCy Schubert cxx*) 71552b15cb3dSCy Schubert case $host in 71562b15cb3dSCy Schubert osf3*) 7157*f0574f5cSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7158*f0574f5cSXin LI _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' 7159*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 71602b15cb3dSCy Schubert ;; 71612b15cb3dSCy Schubert *) 71622b15cb3dSCy Schubert _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7163*f0574f5cSXin LI _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' 71642b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 71652b15cb3dSCy Schubert echo "-hidden">> $lib.exp~ 7166*f0574f5cSXin LI $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~ 71672b15cb3dSCy Schubert $RM $lib.exp' 71682b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 71692b15cb3dSCy Schubert ;; 71702b15cb3dSCy Schubert esac 71712b15cb3dSCy Schubert 71722b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71732b15cb3dSCy Schubert 71742b15cb3dSCy Schubert # Commands to make compiler produce verbose output that lists 71752b15cb3dSCy Schubert # what "hidden" libraries, object files and flags are used when 71762b15cb3dSCy Schubert # linking a shared library. 71772b15cb3dSCy Schubert # 71782b15cb3dSCy Schubert # There doesn't appear to be a way to prevent this compiler from 71792b15cb3dSCy Schubert # explicitly linking system object files so we need to strip them 71802b15cb3dSCy Schubert # from the output so that they don't get included in the library 71812b15cb3dSCy Schubert # dependencies. 7182*f0574f5cSXin LI 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"' 71832b15cb3dSCy Schubert ;; 71842b15cb3dSCy Schubert *) 7185*f0574f5cSXin LI if test yes,no = "$GXX,$with_gnu_ld"; then 7186*f0574f5cSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 71872b15cb3dSCy Schubert case $host in 71882b15cb3dSCy Schubert osf3*) 7189*f0574f5cSXin LI _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' 71902b15cb3dSCy Schubert ;; 71912b15cb3dSCy Schubert *) 7192*f0574f5cSXin LI _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' 71932b15cb3dSCy Schubert ;; 71942b15cb3dSCy Schubert esac 71952b15cb3dSCy Schubert 7196*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 71972b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71982b15cb3dSCy Schubert 71992b15cb3dSCy Schubert # Commands to make compiler produce verbose output that lists 72002b15cb3dSCy Schubert # what "hidden" libraries, object files and flags are used when 72012b15cb3dSCy Schubert # linking a shared library. 72022b15cb3dSCy Schubert output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72032b15cb3dSCy Schubert 72042b15cb3dSCy Schubert else 72052b15cb3dSCy Schubert # FIXME: insert proper C++ library support 72062b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 72072b15cb3dSCy Schubert fi 72082b15cb3dSCy Schubert ;; 72092b15cb3dSCy Schubert esac 72102b15cb3dSCy Schubert ;; 72112b15cb3dSCy Schubert 72122b15cb3dSCy Schubert psos*) 72132b15cb3dSCy Schubert # FIXME: insert proper C++ library support 72142b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 72152b15cb3dSCy Schubert ;; 72162b15cb3dSCy Schubert 72172b15cb3dSCy Schubert sunos4*) 72182b15cb3dSCy Schubert case $cc_basename in 72192b15cb3dSCy Schubert CC*) 72202b15cb3dSCy Schubert # Sun C++ 4.x 72212b15cb3dSCy Schubert # FIXME: insert proper C++ library support 72222b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 72232b15cb3dSCy Schubert ;; 72242b15cb3dSCy Schubert lcc*) 72252b15cb3dSCy Schubert # Lucid 72262b15cb3dSCy Schubert # FIXME: insert proper C++ library support 72272b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 72282b15cb3dSCy Schubert ;; 72292b15cb3dSCy Schubert *) 72302b15cb3dSCy Schubert # FIXME: insert proper C++ library support 72312b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 72322b15cb3dSCy Schubert ;; 72332b15cb3dSCy Schubert esac 72342b15cb3dSCy Schubert ;; 72352b15cb3dSCy Schubert 72362b15cb3dSCy Schubert solaris*) 72372b15cb3dSCy Schubert case $cc_basename in 72382b15cb3dSCy Schubert CC* | sunCC*) 72392b15cb3dSCy Schubert # Sun C++ 4.2, 5.x and Centerline C++ 72402b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72412b15cb3dSCy Schubert _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7242*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72432b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7244*f0574f5cSXin LI $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' 72452b15cb3dSCy Schubert 72462b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72472b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72482b15cb3dSCy Schubert case $host_os in 72492b15cb3dSCy Schubert solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 72502b15cb3dSCy Schubert *) 72512b15cb3dSCy Schubert # The compiler driver will combine and reorder linker options, 7252*f0574f5cSXin LI # but understands '-z linker_flag'. 72532b15cb3dSCy Schubert # Supported since Solaris 2.6 (maybe 2.5.1?) 72542b15cb3dSCy Schubert _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 72552b15cb3dSCy Schubert ;; 72562b15cb3dSCy Schubert esac 72572b15cb3dSCy Schubert _LT_TAGVAR(link_all_deplibs, $1)=yes 72582b15cb3dSCy Schubert 72592b15cb3dSCy Schubert output_verbose_link_cmd='func_echo_all' 72602b15cb3dSCy Schubert 72612b15cb3dSCy Schubert # Archives containing C++ object files must be created using 72622b15cb3dSCy Schubert # "CC -xar", where "CC" is the Sun C++ compiler. This is 72632b15cb3dSCy Schubert # necessary to make sure instantiated templates are included 72642b15cb3dSCy Schubert # in the archive. 72652b15cb3dSCy Schubert _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 72662b15cb3dSCy Schubert ;; 72672b15cb3dSCy Schubert gcx*) 72682b15cb3dSCy Schubert # Green Hills C++ Compiler 7269*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72702b15cb3dSCy Schubert 72712b15cb3dSCy Schubert # The C++ compiler must be used to create the archive. 72722b15cb3dSCy Schubert _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 72732b15cb3dSCy Schubert ;; 72742b15cb3dSCy Schubert *) 72752b15cb3dSCy Schubert # GNU C++ compiler with Solaris linker 7276*f0574f5cSXin LI if test yes,no = "$GXX,$with_gnu_ld"; then 7277*f0574f5cSXin LI _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 72782b15cb3dSCy Schubert if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7279*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72802b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7281*f0574f5cSXin LI $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' 72822b15cb3dSCy Schubert 72832b15cb3dSCy Schubert # Commands to make compiler produce verbose output that lists 72842b15cb3dSCy Schubert # what "hidden" libraries, object files and flags are used when 72852b15cb3dSCy Schubert # linking a shared library. 72862b15cb3dSCy Schubert output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72872b15cb3dSCy Schubert else 7288*f0574f5cSXin LI # g++ 2.7 appears to require '-G' NOT '-shared' on this 72892b15cb3dSCy Schubert # platform. 7290*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72912b15cb3dSCy Schubert _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7292*f0574f5cSXin LI $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' 72932b15cb3dSCy Schubert 72942b15cb3dSCy Schubert # Commands to make compiler produce verbose output that lists 72952b15cb3dSCy Schubert # what "hidden" libraries, object files and flags are used when 72962b15cb3dSCy Schubert # linking a shared library. 72972b15cb3dSCy Schubert output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72982b15cb3dSCy Schubert fi 72992b15cb3dSCy Schubert 7300*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73012b15cb3dSCy Schubert case $host_os in 73022b15cb3dSCy Schubert solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73032b15cb3dSCy Schubert *) 7304*f0574f5cSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73052b15cb3dSCy Schubert ;; 73062b15cb3dSCy Schubert esac 73072b15cb3dSCy Schubert fi 73082b15cb3dSCy Schubert ;; 73092b15cb3dSCy Schubert esac 73102b15cb3dSCy Schubert ;; 73112b15cb3dSCy Schubert 73122b15cb3dSCy Schubert sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7313*f0574f5cSXin LI _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73142b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73152b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73162b15cb3dSCy Schubert runpath_var='LD_RUN_PATH' 73172b15cb3dSCy Schubert 73182b15cb3dSCy Schubert case $cc_basename in 73192b15cb3dSCy Schubert CC*) 7320*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7321*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73222b15cb3dSCy Schubert ;; 73232b15cb3dSCy Schubert *) 7324*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7325*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73262b15cb3dSCy Schubert ;; 73272b15cb3dSCy Schubert esac 73282b15cb3dSCy Schubert ;; 73292b15cb3dSCy Schubert 73302b15cb3dSCy Schubert sysv5* | sco3.2v5* | sco5v6*) 7331*f0574f5cSXin LI # Note: We CANNOT use -z defs as we might desire, because we do not 73322b15cb3dSCy Schubert # link with -lc, and that would cause any symbols used from libc to 73332b15cb3dSCy Schubert # always be unresolved, which means just about no library would 73342b15cb3dSCy Schubert # ever link correctly. If we're not using GNU ld we use -z text 73352b15cb3dSCy Schubert # though, which does catch some bad symbols but isn't as heavy-handed 73362b15cb3dSCy Schubert # as -z defs. 7337*f0574f5cSXin LI _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7338*f0574f5cSXin LI _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73392b15cb3dSCy Schubert _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73402b15cb3dSCy Schubert _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7341*f0574f5cSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73422b15cb3dSCy Schubert _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73432b15cb3dSCy Schubert _LT_TAGVAR(link_all_deplibs, $1)=yes 7344*f0574f5cSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73452b15cb3dSCy Schubert runpath_var='LD_RUN_PATH' 73462b15cb3dSCy Schubert 73472b15cb3dSCy Schubert case $cc_basename in 73482b15cb3dSCy Schubert CC*) 7349*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7350*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73512b15cb3dSCy Schubert _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 73522b15cb3dSCy Schubert '"$_LT_TAGVAR(old_archive_cmds, $1)" 73532b15cb3dSCy Schubert _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 73542b15cb3dSCy Schubert '"$_LT_TAGVAR(reload_cmds, $1)" 73552b15cb3dSCy Schubert ;; 73562b15cb3dSCy Schubert *) 7357*f0574f5cSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7358*f0574f5cSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73592b15cb3dSCy Schubert ;; 73602b15cb3dSCy Schubert esac 73612b15cb3dSCy Schubert ;; 73622b15cb3dSCy Schubert 73632b15cb3dSCy Schubert tandem*) 73642b15cb3dSCy Schubert case $cc_basename in 73652b15cb3dSCy Schubert NCC*) 73662b15cb3dSCy Schubert # NonStop-UX NCC 3.20 73672b15cb3dSCy Schubert # FIXME: insert proper C++ library support 73682b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 73692b15cb3dSCy Schubert ;; 73702b15cb3dSCy Schubert *) 73712b15cb3dSCy Schubert # FIXME: insert proper C++ library support 73722b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 73732b15cb3dSCy Schubert ;; 73742b15cb3dSCy Schubert esac 73752b15cb3dSCy Schubert ;; 73762b15cb3dSCy Schubert 73772b15cb3dSCy Schubert vxworks*) 73782b15cb3dSCy Schubert # FIXME: insert proper C++ library support 73792b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 73802b15cb3dSCy Schubert ;; 73812b15cb3dSCy Schubert 73822b15cb3dSCy Schubert *) 73832b15cb3dSCy Schubert # FIXME: insert proper C++ library support 73842b15cb3dSCy Schubert _LT_TAGVAR(ld_shlibs, $1)=no 73852b15cb3dSCy Schubert ;; 73862b15cb3dSCy Schubert esac 73872b15cb3dSCy Schubert 73882b15cb3dSCy Schubert AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7389*f0574f5cSXin LI test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 73902b15cb3dSCy Schubert 7391*f0574f5cSXin LI _LT_TAGVAR(GCC, $1)=$GXX 7392*f0574f5cSXin LI _LT_TAGVAR(LD, $1)=$LD 73932b15cb3dSCy Schubert 73942b15cb3dSCy Schubert ## CAVEAT EMPTOR: 73952b15cb3dSCy Schubert ## There is no encapsulation within the following macros, do not change 73962b15cb3dSCy Schubert ## the running order or otherwise move them around unless you know exactly 73972b15cb3dSCy Schubert ## what you are doing... 73982b15cb3dSCy Schubert _LT_SYS_HIDDEN_LIBDEPS($1) 73992b15cb3dSCy Schubert _LT_COMPILER_PIC($1) 74002b15cb3dSCy Schubert _LT_COMPILER_C_O($1) 74012b15cb3dSCy Schubert _LT_COMPILER_FILE_LOCKS($1) 74022b15cb3dSCy Schubert _LT_LINKER_SHLIBS($1) 74032b15cb3dSCy Schubert _LT_SYS_DYNAMIC_LINKER($1) 74042b15cb3dSCy Schubert _LT_LINKER_HARDCODE_LIBPATH($1) 74052b15cb3dSCy Schubert 74062b15cb3dSCy Schubert _LT_CONFIG($1) 74072b15cb3dSCy Schubert fi # test -n "$compiler" 74082b15cb3dSCy Schubert 74092b15cb3dSCy Schubert CC=$lt_save_CC 74102b15cb3dSCy Schubert CFLAGS=$lt_save_CFLAGS 74112b15cb3dSCy Schubert LDCXX=$LD 74122b15cb3dSCy Schubert LD=$lt_save_LD 74132b15cb3dSCy Schubert GCC=$lt_save_GCC 74142b15cb3dSCy Schubert with_gnu_ld=$lt_save_with_gnu_ld 74152b15cb3dSCy Schubert lt_cv_path_LDCXX=$lt_cv_path_LD 74162b15cb3dSCy Schubert lt_cv_path_LD=$lt_save_path_LD 74172b15cb3dSCy Schubert lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74182b15cb3dSCy Schubert lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7419*f0574f5cSXin LIfi # test yes != "$_lt_caught_CXX_error" 74202b15cb3dSCy Schubert 74212b15cb3dSCy SchubertAC_LANG_POP 74222b15cb3dSCy Schubert])# _LT_LANG_CXX_CONFIG 74232b15cb3dSCy Schubert 74242b15cb3dSCy Schubert 74252b15cb3dSCy Schubert# _LT_FUNC_STRIPNAME_CNF 74262b15cb3dSCy Schubert# ---------------------- 74272b15cb3dSCy Schubert# func_stripname_cnf prefix suffix name 74282b15cb3dSCy Schubert# strip PREFIX and SUFFIX off of NAME. 74292b15cb3dSCy Schubert# PREFIX and SUFFIX must not contain globbing or regex special 74302b15cb3dSCy Schubert# characters, hashes, percent signs, but SUFFIX may contain a leading 74312b15cb3dSCy Schubert# dot (in which case that matches only a dot). 74322b15cb3dSCy Schubert# 74332b15cb3dSCy Schubert# This function is identical to the (non-XSI) version of func_stripname, 74342b15cb3dSCy Schubert# except this one can be used by m4 code that may be executed by configure, 74352b15cb3dSCy Schubert# rather than the libtool script. 74362b15cb3dSCy Schubertm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 74372b15cb3dSCy SchubertAC_REQUIRE([_LT_DECL_SED]) 74382b15cb3dSCy SchubertAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 74392b15cb3dSCy Schubertfunc_stripname_cnf () 74402b15cb3dSCy Schubert{ 7441*f0574f5cSXin LI case @S|@2 in 7442*f0574f5cSXin LI .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7443*f0574f5cSXin LI *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 74442b15cb3dSCy Schubert esac 74452b15cb3dSCy Schubert} # func_stripname_cnf 74462b15cb3dSCy Schubert])# _LT_FUNC_STRIPNAME_CNF 74472b15cb3dSCy Schubert 7448*f0574f5cSXin LI 74492b15cb3dSCy Schubert# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 74502b15cb3dSCy Schubert# --------------------------------- 74512b15cb3dSCy Schubert# Figure out "hidden" library dependencies from verbose 74522b15cb3dSCy Schubert# compiler output when linking a shared library. 74532b15cb3dSCy Schubert# Parse the compiler output and extract the necessary 74542b15cb3dSCy Schubert# objects, libraries and library flags. 74552b15cb3dSCy Schubertm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 74562b15cb3dSCy Schubert[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 74572b15cb3dSCy SchubertAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 74582b15cb3dSCy Schubert# Dependencies to place before and after the object being linked: 74592b15cb3dSCy Schubert_LT_TAGVAR(predep_objects, $1)= 74602b15cb3dSCy Schubert_LT_TAGVAR(postdep_objects, $1)= 74612b15cb3dSCy Schubert_LT_TAGVAR(predeps, $1)= 74622b15cb3dSCy Schubert_LT_TAGVAR(postdeps, $1)= 74632b15cb3dSCy Schubert_LT_TAGVAR(compiler_lib_search_path, $1)= 74642b15cb3dSCy Schubert 74652b15cb3dSCy Schubertdnl we can't use the lt_simple_compile_test_code here, 74662b15cb3dSCy Schubertdnl because it contains code intended for an executable, 74672b15cb3dSCy Schubertdnl not a library. It's possible we should let each 74682b15cb3dSCy Schubertdnl tag define a new lt_????_link_test_code variable, 74692b15cb3dSCy Schubertdnl but it's only used here... 74702b15cb3dSCy Schubertm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 74712b15cb3dSCy Schubertint a; 74722b15cb3dSCy Schubertvoid foo (void) { a = 0; } 74732b15cb3dSCy Schubert_LT_EOF 74742b15cb3dSCy Schubert], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 74752b15cb3dSCy Schubertclass Foo 74762b15cb3dSCy Schubert{ 74772b15cb3dSCy Schubertpublic: 74782b15cb3dSCy Schubert Foo (void) { a = 0; } 74792b15cb3dSCy Schubertprivate: 74802b15cb3dSCy Schubert int a; 74812b15cb3dSCy Schubert}; 74822b15cb3dSCy Schubert_LT_EOF 74832b15cb3dSCy Schubert], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 74842b15cb3dSCy Schubert subroutine foo 74852b15cb3dSCy Schubert implicit none 74862b15cb3dSCy Schubert integer*4 a 74872b15cb3dSCy Schubert a=0 74882b15cb3dSCy Schubert return 74892b15cb3dSCy Schubert end 74902b15cb3dSCy Schubert_LT_EOF 74912b15cb3dSCy Schubert], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 74922b15cb3dSCy Schubert subroutine foo 74932b15cb3dSCy Schubert implicit none 74942b15cb3dSCy Schubert integer a 74952b15cb3dSCy Schubert a=0 74962b15cb3dSCy Schubert return 74972b15cb3dSCy Schubert end 74982b15cb3dSCy Schubert_LT_EOF 74992b15cb3dSCy Schubert], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75002b15cb3dSCy Schubertpublic class foo { 75012b15cb3dSCy Schubert private int a; 75022b15cb3dSCy Schubert public void bar (void) { 75032b15cb3dSCy Schubert a = 0; 75042b15cb3dSCy Schubert } 75052b15cb3dSCy Schubert}; 75062b15cb3dSCy Schubert_LT_EOF 7507*f0574f5cSXin LI], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7508*f0574f5cSXin LIpackage foo 7509*f0574f5cSXin LIfunc foo() { 7510*f0574f5cSXin LI} 7511*f0574f5cSXin LI_LT_EOF 75122b15cb3dSCy Schubert]) 75132b15cb3dSCy Schubert 75142b15cb3dSCy Schubert_lt_libdeps_save_CFLAGS=$CFLAGS 75152b15cb3dSCy Schubertcase "$CC $CFLAGS " in #( 75162b15cb3dSCy Schubert*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 75172b15cb3dSCy Schubert*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7518*f0574f5cSXin LI*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75192b15cb3dSCy Schubertesac 75202b15cb3dSCy Schubert 75212b15cb3dSCy Schubertdnl Parse the compiler output and extract the necessary 75222b15cb3dSCy Schubertdnl objects, libraries and library flags. 75232b15cb3dSCy Schubertif AC_TRY_EVAL(ac_compile); then 75242b15cb3dSCy Schubert # Parse the compiler output and extract the necessary 75252b15cb3dSCy Schubert # objects, libraries and library flags. 75262b15cb3dSCy Schubert 75272b15cb3dSCy Schubert # Sentinel used to keep track of whether or not we are before 75282b15cb3dSCy Schubert # the conftest object file. 75292b15cb3dSCy Schubert pre_test_object_deps_done=no 75302b15cb3dSCy Schubert 75312b15cb3dSCy Schubert for p in `eval "$output_verbose_link_cmd"`; do 7532*f0574f5cSXin LI case $prev$p in 75332b15cb3dSCy Schubert 75342b15cb3dSCy Schubert -L* | -R* | -l*) 75352b15cb3dSCy Schubert # Some compilers place space between "-{L,R}" and the path. 75362b15cb3dSCy Schubert # Remove the space. 7537*f0574f5cSXin LI if test x-L = "$p" || 7538*f0574f5cSXin LI test x-R = "$p"; then 75392b15cb3dSCy Schubert prev=$p 75402b15cb3dSCy Schubert continue 75412b15cb3dSCy Schubert fi 75422b15cb3dSCy Schubert 75432b15cb3dSCy Schubert # Expand the sysroot to ease extracting the directories later. 75442b15cb3dSCy Schubert if test -z "$prev"; then 75452b15cb3dSCy Schubert case $p in 75462b15cb3dSCy Schubert -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 75472b15cb3dSCy Schubert -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 75482b15cb3dSCy Schubert -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 75492b15cb3dSCy Schubert esac 75502b15cb3dSCy Schubert fi 75512b15cb3dSCy Schubert case $p in 75522b15cb3dSCy Schubert =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 75532b15cb3dSCy Schubert esac 7554*f0574f5cSXin LI if test no = "$pre_test_object_deps_done"; then 7555*f0574f5cSXin LI case $prev in 75562b15cb3dSCy Schubert -L | -R) 75572b15cb3dSCy Schubert # Internal compiler library paths should come after those 75582b15cb3dSCy Schubert # provided the user. The postdeps already come after the 75592b15cb3dSCy Schubert # user supplied libs so there is no need to process them. 75602b15cb3dSCy Schubert if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7561*f0574f5cSXin LI _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 75622b15cb3dSCy Schubert else 7563*f0574f5cSXin LI _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 75642b15cb3dSCy Schubert fi 75652b15cb3dSCy Schubert ;; 75662b15cb3dSCy Schubert # The "-l" case would never come before the object being 75672b15cb3dSCy Schubert # linked, so don't bother handling this case. 75682b15cb3dSCy Schubert esac 75692b15cb3dSCy Schubert else 75702b15cb3dSCy Schubert if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7571*f0574f5cSXin LI _LT_TAGVAR(postdeps, $1)=$prev$p 75722b15cb3dSCy Schubert else 7573*f0574f5cSXin LI _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 75742b15cb3dSCy Schubert fi 75752b15cb3dSCy Schubert fi 75762b15cb3dSCy Schubert prev= 75772b15cb3dSCy Schubert ;; 75782b15cb3dSCy Schubert 75792b15cb3dSCy Schubert *.lto.$objext) ;; # Ignore GCC LTO objects 75802b15cb3dSCy Schubert *.$objext) 75812b15cb3dSCy Schubert # This assumes that the test object file only shows up 75822b15cb3dSCy Schubert # once in the compiler output. 75832b15cb3dSCy Schubert if test "$p" = "conftest.$objext"; then 75842b15cb3dSCy Schubert pre_test_object_deps_done=yes 75852b15cb3dSCy Schubert continue 75862b15cb3dSCy Schubert fi 75872b15cb3dSCy Schubert 7588*f0574f5cSXin LI if test no = "$pre_test_object_deps_done"; then 75892b15cb3dSCy Schubert if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7590*f0574f5cSXin LI _LT_TAGVAR(predep_objects, $1)=$p 75912b15cb3dSCy Schubert else 75922b15cb3dSCy Schubert _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 75932b15cb3dSCy Schubert fi 75942b15cb3dSCy Schubert else 75952b15cb3dSCy Schubert if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7596*f0574f5cSXin LI _LT_TAGVAR(postdep_objects, $1)=$p 75972b15cb3dSCy Schubert else 75982b15cb3dSCy Schubert _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 75992b15cb3dSCy Schubert fi 76002b15cb3dSCy Schubert fi 76012b15cb3dSCy Schubert ;; 76022b15cb3dSCy Schubert 76032b15cb3dSCy Schubert *) ;; # Ignore the rest. 76042b15cb3dSCy Schubert 76052b15cb3dSCy Schubert esac 76062b15cb3dSCy Schubert done 76072b15cb3dSCy Schubert 76082b15cb3dSCy Schubert # Clean up. 76092b15cb3dSCy Schubert rm -f a.out a.exe 76102b15cb3dSCy Schubertelse 76112b15cb3dSCy Schubert echo "libtool.m4: error: problem compiling $1 test program" 76122b15cb3dSCy Schubertfi 76132b15cb3dSCy Schubert 76142b15cb3dSCy Schubert$RM -f confest.$objext 76152b15cb3dSCy SchubertCFLAGS=$_lt_libdeps_save_CFLAGS 76162b15cb3dSCy Schubert 76172b15cb3dSCy Schubert# PORTME: override above test on systems where it is broken 76182b15cb3dSCy Schubertm4_if([$1], [CXX], 76192b15cb3dSCy Schubert[case $host_os in 76202b15cb3dSCy Schubertinterix[[3-9]]*) 76212b15cb3dSCy Schubert # Interix 3.5 installs completely hosed .la files for C++, so rather than 76222b15cb3dSCy Schubert # hack all around it, let's just trust "g++" to DTRT. 76232b15cb3dSCy Schubert _LT_TAGVAR(predep_objects,$1)= 76242b15cb3dSCy Schubert _LT_TAGVAR(postdep_objects,$1)= 76252b15cb3dSCy Schubert _LT_TAGVAR(postdeps,$1)= 76262b15cb3dSCy Schubert ;; 76272b15cb3dSCy Schubertesac 76282b15cb3dSCy Schubert]) 76292b15cb3dSCy Schubert 76302b15cb3dSCy Schubertcase " $_LT_TAGVAR(postdeps, $1) " in 76312b15cb3dSCy Schubert*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76322b15cb3dSCy Schubertesac 76332b15cb3dSCy Schubert _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76342b15cb3dSCy Schubertif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7635*f0574f5cSXin LI _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76362b15cb3dSCy Schubertfi 76372b15cb3dSCy Schubert_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76382b15cb3dSCy Schubert [The directories searched by this compiler when creating a shared library]) 76392b15cb3dSCy Schubert_LT_TAGDECL([], [predep_objects], [1], 76402b15cb3dSCy Schubert [Dependencies to place before and after the objects being linked to 76412b15cb3dSCy Schubert create a shared library]) 76422b15cb3dSCy Schubert_LT_TAGDECL([], [postdep_objects], [1]) 76432b15cb3dSCy Schubert_LT_TAGDECL([], [predeps], [1]) 76442b15cb3dSCy Schubert_LT_TAGDECL([], [postdeps], [1]) 76452b15cb3dSCy Schubert_LT_TAGDECL([], [compiler_lib_search_path], [1], 76462b15cb3dSCy Schubert [The library search path used internally by the compiler when linking 76472b15cb3dSCy Schubert a shared library]) 76482b15cb3dSCy Schubert])# _LT_SYS_HIDDEN_LIBDEPS 76492b15cb3dSCy Schubert 76502b15cb3dSCy Schubert 76512b15cb3dSCy Schubert# _LT_LANG_F77_CONFIG([TAG]) 76522b15cb3dSCy Schubert# -------------------------- 76532b15cb3dSCy Schubert# Ensure that the configuration variables for a Fortran 77 compiler are 76542b15cb3dSCy Schubert# suitably defined. These variables are subsequently used by _LT_CONFIG 7655*f0574f5cSXin LI# to write the compiler configuration to 'libtool'. 76562b15cb3dSCy Schubertm4_defun([_LT_LANG_F77_CONFIG], 76572b15cb3dSCy Schubert[AC_LANG_PUSH(Fortran 77) 7658*f0574f5cSXin LIif test -z "$F77" || test no = "$F77"; then 76592b15cb3dSCy Schubert _lt_disable_F77=yes 76602b15cb3dSCy Schubertfi 76612b15cb3dSCy Schubert 76622b15cb3dSCy Schubert_LT_TAGVAR(archive_cmds_need_lc, $1)=no 76632b15cb3dSCy Schubert_LT_TAGVAR(allow_undefined_flag, $1)= 76642b15cb3dSCy Schubert_LT_TAGVAR(always_export_symbols, $1)=no 76652b15cb3dSCy Schubert_LT_TAGVAR(archive_expsym_cmds, $1)= 76662b15cb3dSCy Schubert_LT_TAGVAR(export_dynamic_flag_spec, $1)= 76672b15cb3dSCy Schubert_LT_TAGVAR(hardcode_direct, $1)=no 76682b15cb3dSCy Schubert_LT_TAGVAR(hardcode_direct_absolute, $1)=no 76692b15cb3dSCy Schubert_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 76702b15cb3dSCy Schubert_LT_TAGVAR(hardcode_libdir_separator, $1)= 76712b15cb3dSCy Schubert_LT_TAGVAR(hardcode_minus_L, $1)=no 76722b15cb3dSCy Schubert_LT_TAGVAR(hardcode_automatic, $1)=no 76732b15cb3dSCy Schubert_LT_TAGVAR(inherit_rpath, $1)=no 76742b15cb3dSCy Schubert_LT_TAGVAR(module_cmds, $1)= 76752b15cb3dSCy Schubert_LT_TAGVAR(module_expsym_cmds, $1)= 76762b15cb3dSCy Schubert_LT_TAGVAR(link_all_deplibs, $1)=unknown 76772b15cb3dSCy Schubert_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 76782b15cb3dSCy Schubert_LT_TAGVAR(reload_flag, $1)=$reload_flag 76792b15cb3dSCy Schubert_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 76802b15cb3dSCy Schubert_LT_TAGVAR(no_undefined_flag, $1)= 76812b15cb3dSCy Schubert_LT_TAGVAR(whole_archive_flag_spec, $1)= 76822b15cb3dSCy Schubert_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 76832b15cb3dSCy Schubert 76842b15cb3dSCy Schubert# Source file extension for f77 test sources. 76852b15cb3dSCy Schubertac_ext=f 76862b15cb3dSCy Schubert 76872b15cb3dSCy Schubert# Object file extension for compiled f77 test sources. 76882b15cb3dSCy Schubertobjext=o 76892b15cb3dSCy Schubert_LT_TAGVAR(objext, $1)=$objext 76902b15cb3dSCy Schubert 76912b15cb3dSCy Schubert# No sense in running all these tests if we already determined that 76922b15cb3dSCy Schubert# the F77 compiler isn't working. Some variables (like enable_shared) 76932b15cb3dSCy Schubert# are currently assumed to apply to all compilers on this platform, 76942b15cb3dSCy Schubert# and will be corrupted by setting them based on a non-working compiler. 7695*f0574f5cSXin LIif test yes != "$_lt_disable_F77"; then 76962b15cb3dSCy Schubert # Code to be used in simple compile tests 76972b15cb3dSCy Schubert lt_simple_compile_test_code="\ 76982b15cb3dSCy Schubert subroutine t 76992b15cb3dSCy Schubert return 77002b15cb3dSCy Schubert end 77012b15cb3dSCy Schubert" 77022b15cb3dSCy Schubert 77032b15cb3dSCy Schubert # Code to be used in simple link tests 77042b15cb3dSCy Schubert lt_simple_link_test_code="\ 77052b15cb3dSCy Schubert program t 77062b15cb3dSCy Schubert end 77072b15cb3dSCy Schubert" 77082b15cb3dSCy Schubert 77092b15cb3dSCy Schubert # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77102b15cb3dSCy Schubert _LT_TAG_COMPILER 77112b15cb3dSCy Schubert 77122b15cb3dSCy Schubert # save warnings/boilerplate of simple test code 77132b15cb3dSCy Schubert _LT_COMPILER_BOILERPLATE 77142b15cb3dSCy Schubert _LT_LINKER_BOILERPLATE 77152b15cb3dSCy Schubert 77162b15cb3dSCy Schubert # Allow CC to be a program name with arguments. 7717*f0574f5cSXin LI lt_save_CC=$CC 77182b15cb3dSCy Schubert lt_save_GCC=$GCC 77192b15cb3dSCy Schubert lt_save_CFLAGS=$CFLAGS 77202b15cb3dSCy Schubert CC=${F77-"f77"} 77212b15cb3dSCy Schubert CFLAGS=$FFLAGS 77222b15cb3dSCy Schubert compiler=$CC 77232b15cb3dSCy Schubert _LT_TAGVAR(compiler, $1)=$CC 77242b15cb3dSCy Schubert _LT_CC_BASENAME([$compiler]) 77252b15cb3dSCy Schubert GCC=$G77 77262b15cb3dSCy Schubert if test -n "$compiler"; then 77272b15cb3dSCy Schubert AC_MSG_CHECKING([if libtool supports shared libraries]) 77282b15cb3dSCy Schubert AC_MSG_RESULT([$can_build_shared]) 77292b15cb3dSCy Schubert 77302b15cb3dSCy Schubert AC_MSG_CHECKING([whether to build shared libraries]) 7731*f0574f5cSXin LI test no = "$can_build_shared" && enable_shared=no 77322b15cb3dSCy Schubert 77332b15cb3dSCy Schubert # On AIX, shared libraries and static libraries use the same namespace, and 77342b15cb3dSCy Schubert # are all built from PIC. 77352b15cb3dSCy Schubert case $host_os in 77362b15cb3dSCy Schubert aix3*) 7737*f0574f5cSXin LI test yes = "$enable_shared" && enable_static=no 77382b15cb3dSCy Schubert if test -n "$RANLIB"; then 77392b15cb3dSCy Schubert archive_cmds="$archive_cmds~\$RANLIB \$lib" 77402b15cb3dSCy Schubert postinstall_cmds='$RANLIB $lib' 77412b15cb3dSCy Schubert fi 77422b15cb3dSCy Schubert ;; 77432b15cb3dSCy Schubert aix[[4-9]]*) 7744*f0574f5cSXin LI if test ia64 != "$host_cpu"; then 7745*f0574f5cSXin LI case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7746*f0574f5cSXin LI yes,aix,yes) ;; # shared object as lib.so file only 7747*f0574f5cSXin LI yes,svr4,*) ;; # shared object as lib.so archive member only 7748*f0574f5cSXin LI yes,*) enable_static=no ;; # shared object in lib.a archive as well 7749*f0574f5cSXin LI esac 77502b15cb3dSCy Schubert fi 77512b15cb3dSCy Schubert ;; 77522b15cb3dSCy Schubert esac 77532b15cb3dSCy Schubert AC_MSG_RESULT([$enable_shared]) 77542b15cb3dSCy Schubert 77552b15cb3dSCy Schubert AC_MSG_CHECKING([whether to build static libraries]) 77562b15cb3dSCy Schubert # Make sure either enable_shared or enable_static is yes. 7757*f0574f5cSXin LI test yes = "$enable_shared" || enable_static=yes 77582b15cb3dSCy Schubert AC_MSG_RESULT([$enable_static]) 77592b15cb3dSCy Schubert 7760*f0574f5cSXin LI _LT_TAGVAR(GCC, $1)=$G77 7761*f0574f5cSXin LI _LT_TAGVAR(LD, $1)=$LD 77622b15cb3dSCy Schubert 77632b15cb3dSCy Schubert ## CAVEAT EMPTOR: 77642b15cb3dSCy Schubert ## There is no encapsulation within the following macros, do not change 77652b15cb3dSCy Schubert ## the running order or otherwise move them around unless you know exactly 77662b15cb3dSCy Schubert ## what you are doing... 77672b15cb3dSCy Schubert _LT_COMPILER_PIC($1) 77682b15cb3dSCy Schubert _LT_COMPILER_C_O($1) 77692b15cb3dSCy Schubert _LT_COMPILER_FILE_LOCKS($1) 77702b15cb3dSCy Schubert _LT_LINKER_SHLIBS($1) 77712b15cb3dSCy Schubert _LT_SYS_DYNAMIC_LINKER($1) 77722b15cb3dSCy Schubert _LT_LINKER_HARDCODE_LIBPATH($1) 77732b15cb3dSCy Schubert 77742b15cb3dSCy Schubert _LT_CONFIG($1) 77752b15cb3dSCy Schubert fi # test -n "$compiler" 77762b15cb3dSCy Schubert 77772b15cb3dSCy Schubert GCC=$lt_save_GCC 7778*f0574f5cSXin LI CC=$lt_save_CC 7779*f0574f5cSXin LI CFLAGS=$lt_save_CFLAGS 7780*f0574f5cSXin LIfi # test yes != "$_lt_disable_F77" 77812b15cb3dSCy Schubert 77822b15cb3dSCy SchubertAC_LANG_POP 77832b15cb3dSCy Schubert])# _LT_LANG_F77_CONFIG 77842b15cb3dSCy Schubert 77852b15cb3dSCy Schubert 77862b15cb3dSCy Schubert# _LT_LANG_FC_CONFIG([TAG]) 77872b15cb3dSCy Schubert# ------------------------- 77882b15cb3dSCy Schubert# Ensure that the configuration variables for a Fortran compiler are 77892b15cb3dSCy Schubert# suitably defined. These variables are subsequently used by _LT_CONFIG 7790*f0574f5cSXin LI# to write the compiler configuration to 'libtool'. 77912b15cb3dSCy Schubertm4_defun([_LT_LANG_FC_CONFIG], 77922b15cb3dSCy Schubert[AC_LANG_PUSH(Fortran) 77932b15cb3dSCy Schubert 7794*f0574f5cSXin LIif test -z "$FC" || test no = "$FC"; then 77952b15cb3dSCy Schubert _lt_disable_FC=yes 77962b15cb3dSCy Schubertfi 77972b15cb3dSCy Schubert 77982b15cb3dSCy Schubert_LT_TAGVAR(archive_cmds_need_lc, $1)=no 77992b15cb3dSCy Schubert_LT_TAGVAR(allow_undefined_flag, $1)= 78002b15cb3dSCy Schubert_LT_TAGVAR(always_export_symbols, $1)=no 78012b15cb3dSCy Schubert_LT_TAGVAR(archive_expsym_cmds, $1)= 78022b15cb3dSCy Schubert_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78032b15cb3dSCy Schubert_LT_TAGVAR(hardcode_direct, $1)=no 78042b15cb3dSCy Schubert_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78052b15cb3dSCy Schubert_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78062b15cb3dSCy Schubert_LT_TAGVAR(hardcode_libdir_separator, $1)= 78072b15cb3dSCy Schubert_LT_TAGVAR(hardcode_minus_L, $1)=no 78082b15cb3dSCy Schubert_LT_TAGVAR(hardcode_automatic, $1)=no 78092b15cb3dSCy Schubert_LT_TAGVAR(inherit_rpath, $1)=no 78102b15cb3dSCy Schubert_LT_TAGVAR(module_cmds, $1)= 78112b15cb3dSCy Schubert_LT_TAGVAR(module_expsym_cmds, $1)= 78122b15cb3dSCy Schubert_LT_TAGVAR(link_all_deplibs, $1)=unknown 78132b15cb3dSCy Schubert_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78142b15cb3dSCy Schubert_LT_TAGVAR(reload_flag, $1)=$reload_flag 78152b15cb3dSCy Schubert_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78162b15cb3dSCy Schubert_LT_TAGVAR(no_undefined_flag, $1)= 78172b15cb3dSCy Schubert_LT_TAGVAR(whole_archive_flag_spec, $1)= 78182b15cb3dSCy Schubert_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78192b15cb3dSCy Schubert 78202b15cb3dSCy Schubert# Source file extension for fc test sources. 78212b15cb3dSCy Schubertac_ext=${ac_fc_srcext-f} 78222b15cb3dSCy Schubert 78232b15cb3dSCy Schubert# Object file extension for compiled fc test sources. 78242b15cb3dSCy Schubertobjext=o 78252b15cb3dSCy Schubert_LT_TAGVAR(objext, $1)=$objext 78262b15cb3dSCy Schubert 78272b15cb3dSCy Schubert# No sense in running all these tests if we already determined that 78282b15cb3dSCy Schubert# the FC compiler isn't working. Some variables (like enable_shared) 78292b15cb3dSCy Schubert# are currently assumed to apply to all compilers on this platform, 78302b15cb3dSCy Schubert# and will be corrupted by setting them based on a non-working compiler. 7831*f0574f5cSXin LIif test yes != "$_lt_disable_FC"; then 78322b15cb3dSCy Schubert # Code to be used in simple compile tests 78332b15cb3dSCy Schubert lt_simple_compile_test_code="\ 78342b15cb3dSCy Schubert subroutine t 78352b15cb3dSCy Schubert return 78362b15cb3dSCy Schubert end 78372b15cb3dSCy Schubert" 78382b15cb3dSCy Schubert 78392b15cb3dSCy Schubert # Code to be used in simple link tests 78402b15cb3dSCy Schubert lt_simple_link_test_code="\ 78412b15cb3dSCy Schubert program t 78422b15cb3dSCy Schubert end 78432b15cb3dSCy Schubert" 78442b15cb3dSCy Schubert 78452b15cb3dSCy Schubert # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78462b15cb3dSCy Schubert _LT_TAG_COMPILER 78472b15cb3dSCy Schubert 78482b15cb3dSCy Schubert # save warnings/boilerplate of simple test code 78492b15cb3dSCy Schubert _LT_COMPILER_BOILERPLATE 78502b15cb3dSCy Schubert _LT_LINKER_BOILERPLATE 78512b15cb3dSCy Schubert 78522b15cb3dSCy Schubert # Allow CC to be a program name with arguments. 7853*f0574f5cSXin LI lt_save_CC=$CC 78542b15cb3dSCy Schubert lt_save_GCC=$GCC 78552b15cb3dSCy Schubert lt_save_CFLAGS=$CFLAGS 78562b15cb3dSCy Schubert CC=${FC-"f95"} 78572b15cb3dSCy Schubert CFLAGS=$FCFLAGS 78582b15cb3dSCy Schubert compiler=$CC 78592b15cb3dSCy Schubert GCC=$ac_cv_fc_compiler_gnu 78602b15cb3dSCy Schubert 78612b15cb3dSCy Schubert _LT_TAGVAR(compiler, $1)=$CC 78622b15cb3dSCy Schubert _LT_CC_BASENAME([$compiler]) 78632b15cb3dSCy Schubert 78642b15cb3dSCy Schubert if test -n "$compiler"; then 78652b15cb3dSCy Schubert AC_MSG_CHECKING([if libtool supports shared libraries]) 78662b15cb3dSCy Schubert AC_MSG_RESULT([$can_build_shared]) 78672b15cb3dSCy Schubert 78682b15cb3dSCy Schubert AC_MSG_CHECKING([whether to build shared libraries]) 7869*f0574f5cSXin LI test no = "$can_build_shared" && enable_shared=no 78702b15cb3dSCy Schubert 78712b15cb3dSCy Schubert # On AIX, shared libraries and static libraries use the same namespace, and 78722b15cb3dSCy Schubert # are all built from PIC. 78732b15cb3dSCy Schubert case $host_os in 78742b15cb3dSCy Schubert aix3*) 7875*f0574f5cSXin LI test yes = "$enable_shared" && enable_static=no 78762b15cb3dSCy Schubert if test -n "$RANLIB"; then 78772b15cb3dSCy Schubert archive_cmds="$archive_cmds~\$RANLIB \$lib" 78782b15cb3dSCy Schubert postinstall_cmds='$RANLIB $lib' 78792b15cb3dSCy Schubert fi 78802b15cb3dSCy Schubert ;; 78812b15cb3dSCy Schubert aix[[4-9]]*) 7882*f0574f5cSXin LI if test ia64 != "$host_cpu"; then 7883*f0574f5cSXin LI case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7884*f0574f5cSXin LI yes,aix,yes) ;; # shared object as lib.so file only 7885*f0574f5cSXin LI yes,svr4,*) ;; # shared object as lib.so archive member only 7886*f0574f5cSXin LI yes,*) enable_static=no ;; # shared object in lib.a archive as well 7887*f0574f5cSXin LI esac 78882b15cb3dSCy Schubert fi 78892b15cb3dSCy Schubert ;; 78902b15cb3dSCy Schubert esac 78912b15cb3dSCy Schubert AC_MSG_RESULT([$enable_shared]) 78922b15cb3dSCy Schubert 78932b15cb3dSCy Schubert AC_MSG_CHECKING([whether to build static libraries]) 78942b15cb3dSCy Schubert # Make sure either enable_shared or enable_static is yes. 7895*f0574f5cSXin LI test yes = "$enable_shared" || enable_static=yes 78962b15cb3dSCy Schubert AC_MSG_RESULT([$enable_static]) 78972b15cb3dSCy Schubert 7898*f0574f5cSXin LI _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7899*f0574f5cSXin LI _LT_TAGVAR(LD, $1)=$LD 79002b15cb3dSCy Schubert 79012b15cb3dSCy Schubert ## CAVEAT EMPTOR: 79022b15cb3dSCy Schubert ## There is no encapsulation within the following macros, do not change 79032b15cb3dSCy Schubert ## the running order or otherwise move them around unless you know exactly 79042b15cb3dSCy Schubert ## what you are doing... 79052b15cb3dSCy Schubert _LT_SYS_HIDDEN_LIBDEPS($1) 79062b15cb3dSCy Schubert _LT_COMPILER_PIC($1) 79072b15cb3dSCy Schubert _LT_COMPILER_C_O($1) 79082b15cb3dSCy Schubert _LT_COMPILER_FILE_LOCKS($1) 79092b15cb3dSCy Schubert _LT_LINKER_SHLIBS($1) 79102b15cb3dSCy Schubert _LT_SYS_DYNAMIC_LINKER($1) 79112b15cb3dSCy Schubert _LT_LINKER_HARDCODE_LIBPATH($1) 79122b15cb3dSCy Schubert 79132b15cb3dSCy Schubert _LT_CONFIG($1) 79142b15cb3dSCy Schubert fi # test -n "$compiler" 79152b15cb3dSCy Schubert 79162b15cb3dSCy Schubert GCC=$lt_save_GCC 79172b15cb3dSCy Schubert CC=$lt_save_CC 79182b15cb3dSCy Schubert CFLAGS=$lt_save_CFLAGS 7919*f0574f5cSXin LIfi # test yes != "$_lt_disable_FC" 79202b15cb3dSCy Schubert 79212b15cb3dSCy SchubertAC_LANG_POP 79222b15cb3dSCy Schubert])# _LT_LANG_FC_CONFIG 79232b15cb3dSCy Schubert 79242b15cb3dSCy Schubert 79252b15cb3dSCy Schubert# _LT_LANG_GCJ_CONFIG([TAG]) 79262b15cb3dSCy Schubert# -------------------------- 79272b15cb3dSCy Schubert# Ensure that the configuration variables for the GNU Java Compiler compiler 79282b15cb3dSCy Schubert# are suitably defined. These variables are subsequently used by _LT_CONFIG 7929*f0574f5cSXin LI# to write the compiler configuration to 'libtool'. 79302b15cb3dSCy Schubertm4_defun([_LT_LANG_GCJ_CONFIG], 79312b15cb3dSCy Schubert[AC_REQUIRE([LT_PROG_GCJ])dnl 79322b15cb3dSCy SchubertAC_LANG_SAVE 79332b15cb3dSCy Schubert 79342b15cb3dSCy Schubert# Source file extension for Java test sources. 79352b15cb3dSCy Schubertac_ext=java 79362b15cb3dSCy Schubert 79372b15cb3dSCy Schubert# Object file extension for compiled Java test sources. 79382b15cb3dSCy Schubertobjext=o 79392b15cb3dSCy Schubert_LT_TAGVAR(objext, $1)=$objext 79402b15cb3dSCy Schubert 79412b15cb3dSCy Schubert# Code to be used in simple compile tests 79422b15cb3dSCy Schubertlt_simple_compile_test_code="class foo {}" 79432b15cb3dSCy Schubert 79442b15cb3dSCy Schubert# Code to be used in simple link tests 79452b15cb3dSCy Schubertlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 79462b15cb3dSCy Schubert 79472b15cb3dSCy Schubert# ltmain only uses $CC for tagged configurations so make sure $CC is set. 79482b15cb3dSCy Schubert_LT_TAG_COMPILER 79492b15cb3dSCy Schubert 79502b15cb3dSCy Schubert# save warnings/boilerplate of simple test code 79512b15cb3dSCy Schubert_LT_COMPILER_BOILERPLATE 79522b15cb3dSCy Schubert_LT_LINKER_BOILERPLATE 79532b15cb3dSCy Schubert 79542b15cb3dSCy Schubert# Allow CC to be a program name with arguments. 79552b15cb3dSCy Schubertlt_save_CC=$CC 79562b15cb3dSCy Schubertlt_save_CFLAGS=$CFLAGS 79572b15cb3dSCy Schubertlt_save_GCC=$GCC 79582b15cb3dSCy SchubertGCC=yes 79592b15cb3dSCy SchubertCC=${GCJ-"gcj"} 79602b15cb3dSCy SchubertCFLAGS=$GCJFLAGS 79612b15cb3dSCy Schubertcompiler=$CC 79622b15cb3dSCy Schubert_LT_TAGVAR(compiler, $1)=$CC 7963*f0574f5cSXin LI_LT_TAGVAR(LD, $1)=$LD 79642b15cb3dSCy Schubert_LT_CC_BASENAME([$compiler]) 79652b15cb3dSCy Schubert 79662b15cb3dSCy Schubert# GCJ did not exist at the time GCC didn't implicitly link libc in. 79672b15cb3dSCy Schubert_LT_TAGVAR(archive_cmds_need_lc, $1)=no 79682b15cb3dSCy Schubert 79692b15cb3dSCy Schubert_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 79702b15cb3dSCy Schubert_LT_TAGVAR(reload_flag, $1)=$reload_flag 79712b15cb3dSCy Schubert_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 79722b15cb3dSCy Schubert 79732b15cb3dSCy Schubert## CAVEAT EMPTOR: 79742b15cb3dSCy Schubert## There is no encapsulation within the following macros, do not change 79752b15cb3dSCy Schubert## the running order or otherwise move them around unless you know exactly 79762b15cb3dSCy Schubert## what you are doing... 79772b15cb3dSCy Schubertif test -n "$compiler"; then 79782b15cb3dSCy Schubert _LT_COMPILER_NO_RTTI($1) 79792b15cb3dSCy Schubert _LT_COMPILER_PIC($1) 79802b15cb3dSCy Schubert _LT_COMPILER_C_O($1) 79812b15cb3dSCy Schubert _LT_COMPILER_FILE_LOCKS($1) 79822b15cb3dSCy Schubert _LT_LINKER_SHLIBS($1) 79832b15cb3dSCy Schubert _LT_LINKER_HARDCODE_LIBPATH($1) 79842b15cb3dSCy Schubert 79852b15cb3dSCy Schubert _LT_CONFIG($1) 79862b15cb3dSCy Schubertfi 79872b15cb3dSCy Schubert 79882b15cb3dSCy SchubertAC_LANG_RESTORE 79892b15cb3dSCy Schubert 79902b15cb3dSCy SchubertGCC=$lt_save_GCC 79912b15cb3dSCy SchubertCC=$lt_save_CC 79922b15cb3dSCy SchubertCFLAGS=$lt_save_CFLAGS 79932b15cb3dSCy Schubert])# _LT_LANG_GCJ_CONFIG 79942b15cb3dSCy Schubert 79952b15cb3dSCy Schubert 7996*f0574f5cSXin LI# _LT_LANG_GO_CONFIG([TAG]) 7997*f0574f5cSXin LI# -------------------------- 7998*f0574f5cSXin LI# Ensure that the configuration variables for the GNU Go compiler 7999*f0574f5cSXin LI# are suitably defined. These variables are subsequently used by _LT_CONFIG 8000*f0574f5cSXin LI# to write the compiler configuration to 'libtool'. 8001*f0574f5cSXin LIm4_defun([_LT_LANG_GO_CONFIG], 8002*f0574f5cSXin LI[AC_REQUIRE([LT_PROG_GO])dnl 8003*f0574f5cSXin LIAC_LANG_SAVE 8004*f0574f5cSXin LI 8005*f0574f5cSXin LI# Source file extension for Go test sources. 8006*f0574f5cSXin LIac_ext=go 8007*f0574f5cSXin LI 8008*f0574f5cSXin LI# Object file extension for compiled Go test sources. 8009*f0574f5cSXin LIobjext=o 8010*f0574f5cSXin LI_LT_TAGVAR(objext, $1)=$objext 8011*f0574f5cSXin LI 8012*f0574f5cSXin LI# Code to be used in simple compile tests 8013*f0574f5cSXin LIlt_simple_compile_test_code="package main; func main() { }" 8014*f0574f5cSXin LI 8015*f0574f5cSXin LI# Code to be used in simple link tests 8016*f0574f5cSXin LIlt_simple_link_test_code='package main; func main() { }' 8017*f0574f5cSXin LI 8018*f0574f5cSXin LI# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8019*f0574f5cSXin LI_LT_TAG_COMPILER 8020*f0574f5cSXin LI 8021*f0574f5cSXin LI# save warnings/boilerplate of simple test code 8022*f0574f5cSXin LI_LT_COMPILER_BOILERPLATE 8023*f0574f5cSXin LI_LT_LINKER_BOILERPLATE 8024*f0574f5cSXin LI 8025*f0574f5cSXin LI# Allow CC to be a program name with arguments. 8026*f0574f5cSXin LIlt_save_CC=$CC 8027*f0574f5cSXin LIlt_save_CFLAGS=$CFLAGS 8028*f0574f5cSXin LIlt_save_GCC=$GCC 8029*f0574f5cSXin LIGCC=yes 8030*f0574f5cSXin LICC=${GOC-"gccgo"} 8031*f0574f5cSXin LICFLAGS=$GOFLAGS 8032*f0574f5cSXin LIcompiler=$CC 8033*f0574f5cSXin LI_LT_TAGVAR(compiler, $1)=$CC 8034*f0574f5cSXin LI_LT_TAGVAR(LD, $1)=$LD 8035*f0574f5cSXin LI_LT_CC_BASENAME([$compiler]) 8036*f0574f5cSXin LI 8037*f0574f5cSXin LI# Go did not exist at the time GCC didn't implicitly link libc in. 8038*f0574f5cSXin LI_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8039*f0574f5cSXin LI 8040*f0574f5cSXin LI_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8041*f0574f5cSXin LI_LT_TAGVAR(reload_flag, $1)=$reload_flag 8042*f0574f5cSXin LI_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8043*f0574f5cSXin LI 8044*f0574f5cSXin LI## CAVEAT EMPTOR: 8045*f0574f5cSXin LI## There is no encapsulation within the following macros, do not change 8046*f0574f5cSXin LI## the running order or otherwise move them around unless you know exactly 8047*f0574f5cSXin LI## what you are doing... 8048*f0574f5cSXin LIif test -n "$compiler"; then 8049*f0574f5cSXin LI _LT_COMPILER_NO_RTTI($1) 8050*f0574f5cSXin LI _LT_COMPILER_PIC($1) 8051*f0574f5cSXin LI _LT_COMPILER_C_O($1) 8052*f0574f5cSXin LI _LT_COMPILER_FILE_LOCKS($1) 8053*f0574f5cSXin LI _LT_LINKER_SHLIBS($1) 8054*f0574f5cSXin LI _LT_LINKER_HARDCODE_LIBPATH($1) 8055*f0574f5cSXin LI 8056*f0574f5cSXin LI _LT_CONFIG($1) 8057*f0574f5cSXin LIfi 8058*f0574f5cSXin LI 8059*f0574f5cSXin LIAC_LANG_RESTORE 8060*f0574f5cSXin LI 8061*f0574f5cSXin LIGCC=$lt_save_GCC 8062*f0574f5cSXin LICC=$lt_save_CC 8063*f0574f5cSXin LICFLAGS=$lt_save_CFLAGS 8064*f0574f5cSXin LI])# _LT_LANG_GO_CONFIG 8065*f0574f5cSXin LI 8066*f0574f5cSXin LI 80672b15cb3dSCy Schubert# _LT_LANG_RC_CONFIG([TAG]) 80682b15cb3dSCy Schubert# ------------------------- 80692b15cb3dSCy Schubert# Ensure that the configuration variables for the Windows resource compiler 80702b15cb3dSCy Schubert# are suitably defined. These variables are subsequently used by _LT_CONFIG 8071*f0574f5cSXin LI# to write the compiler configuration to 'libtool'. 80722b15cb3dSCy Schubertm4_defun([_LT_LANG_RC_CONFIG], 80732b15cb3dSCy Schubert[AC_REQUIRE([LT_PROG_RC])dnl 80742b15cb3dSCy SchubertAC_LANG_SAVE 80752b15cb3dSCy Schubert 80762b15cb3dSCy Schubert# Source file extension for RC test sources. 80772b15cb3dSCy Schubertac_ext=rc 80782b15cb3dSCy Schubert 80792b15cb3dSCy Schubert# Object file extension for compiled RC test sources. 80802b15cb3dSCy Schubertobjext=o 80812b15cb3dSCy Schubert_LT_TAGVAR(objext, $1)=$objext 80822b15cb3dSCy Schubert 80832b15cb3dSCy Schubert# Code to be used in simple compile tests 80842b15cb3dSCy Schubertlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 80852b15cb3dSCy Schubert 80862b15cb3dSCy Schubert# Code to be used in simple link tests 8087*f0574f5cSXin LIlt_simple_link_test_code=$lt_simple_compile_test_code 80882b15cb3dSCy Schubert 80892b15cb3dSCy Schubert# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80902b15cb3dSCy Schubert_LT_TAG_COMPILER 80912b15cb3dSCy Schubert 80922b15cb3dSCy Schubert# save warnings/boilerplate of simple test code 80932b15cb3dSCy Schubert_LT_COMPILER_BOILERPLATE 80942b15cb3dSCy Schubert_LT_LINKER_BOILERPLATE 80952b15cb3dSCy Schubert 80962b15cb3dSCy Schubert# Allow CC to be a program name with arguments. 8097*f0574f5cSXin LIlt_save_CC=$CC 80982b15cb3dSCy Schubertlt_save_CFLAGS=$CFLAGS 80992b15cb3dSCy Schubertlt_save_GCC=$GCC 81002b15cb3dSCy SchubertGCC= 81012b15cb3dSCy SchubertCC=${RC-"windres"} 81022b15cb3dSCy SchubertCFLAGS= 81032b15cb3dSCy Schubertcompiler=$CC 81042b15cb3dSCy Schubert_LT_TAGVAR(compiler, $1)=$CC 81052b15cb3dSCy Schubert_LT_CC_BASENAME([$compiler]) 81062b15cb3dSCy Schubert_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81072b15cb3dSCy Schubert 81082b15cb3dSCy Schubertif test -n "$compiler"; then 81092b15cb3dSCy Schubert : 81102b15cb3dSCy Schubert _LT_CONFIG($1) 81112b15cb3dSCy Schubertfi 81122b15cb3dSCy Schubert 81132b15cb3dSCy SchubertGCC=$lt_save_GCC 81142b15cb3dSCy SchubertAC_LANG_RESTORE 81152b15cb3dSCy SchubertCC=$lt_save_CC 81162b15cb3dSCy SchubertCFLAGS=$lt_save_CFLAGS 81172b15cb3dSCy Schubert])# _LT_LANG_RC_CONFIG 81182b15cb3dSCy Schubert 81192b15cb3dSCy Schubert 81202b15cb3dSCy Schubert# LT_PROG_GCJ 81212b15cb3dSCy Schubert# ----------- 81222b15cb3dSCy SchubertAC_DEFUN([LT_PROG_GCJ], 81232b15cb3dSCy Schubert[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81242b15cb3dSCy Schubert [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81252b15cb3dSCy Schubert [AC_CHECK_TOOL(GCJ, gcj,) 8126*f0574f5cSXin LI test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81272b15cb3dSCy Schubert AC_SUBST(GCJFLAGS)])])[]dnl 81282b15cb3dSCy Schubert]) 81292b15cb3dSCy Schubert 81302b15cb3dSCy Schubert# Old name: 81312b15cb3dSCy SchubertAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81322b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 81332b15cb3dSCy Schubertdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81342b15cb3dSCy Schubert 81352b15cb3dSCy Schubert 8136*f0574f5cSXin LI# LT_PROG_GO 8137*f0574f5cSXin LI# ---------- 8138*f0574f5cSXin LIAC_DEFUN([LT_PROG_GO], 8139*f0574f5cSXin LI[AC_CHECK_TOOL(GOC, gccgo,) 8140*f0574f5cSXin LI]) 8141*f0574f5cSXin LI 8142*f0574f5cSXin LI 81432b15cb3dSCy Schubert# LT_PROG_RC 81442b15cb3dSCy Schubert# ---------- 81452b15cb3dSCy SchubertAC_DEFUN([LT_PROG_RC], 81462b15cb3dSCy Schubert[AC_CHECK_TOOL(RC, windres,) 81472b15cb3dSCy Schubert]) 81482b15cb3dSCy Schubert 81492b15cb3dSCy Schubert# Old name: 81502b15cb3dSCy SchubertAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 81512b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 81522b15cb3dSCy Schubertdnl AC_DEFUN([LT_AC_PROG_RC], []) 81532b15cb3dSCy Schubert 81542b15cb3dSCy Schubert 81552b15cb3dSCy Schubert# _LT_DECL_EGREP 81562b15cb3dSCy Schubert# -------------- 81572b15cb3dSCy Schubert# If we don't have a new enough Autoconf to choose the best grep 81582b15cb3dSCy Schubert# available, choose the one first in the user's PATH. 81592b15cb3dSCy Schubertm4_defun([_LT_DECL_EGREP], 81602b15cb3dSCy Schubert[AC_REQUIRE([AC_PROG_EGREP])dnl 81612b15cb3dSCy SchubertAC_REQUIRE([AC_PROG_FGREP])dnl 81622b15cb3dSCy Schuberttest -z "$GREP" && GREP=grep 81632b15cb3dSCy Schubert_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 81642b15cb3dSCy Schubert_LT_DECL([], [EGREP], [1], [An ERE matcher]) 81652b15cb3dSCy Schubert_LT_DECL([], [FGREP], [1], [A literal string matcher]) 81662b15cb3dSCy Schubertdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 81672b15cb3dSCy SchubertAC_SUBST([GREP]) 81682b15cb3dSCy Schubert]) 81692b15cb3dSCy Schubert 81702b15cb3dSCy Schubert 81712b15cb3dSCy Schubert# _LT_DECL_OBJDUMP 81722b15cb3dSCy Schubert# -------------- 81732b15cb3dSCy Schubert# If we don't have a new enough Autoconf to choose the best objdump 81742b15cb3dSCy Schubert# available, choose the one first in the user's PATH. 81752b15cb3dSCy Schubertm4_defun([_LT_DECL_OBJDUMP], 81762b15cb3dSCy Schubert[AC_CHECK_TOOL(OBJDUMP, objdump, false) 81772b15cb3dSCy Schuberttest -z "$OBJDUMP" && OBJDUMP=objdump 81782b15cb3dSCy Schubert_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 81792b15cb3dSCy SchubertAC_SUBST([OBJDUMP]) 81802b15cb3dSCy Schubert]) 81812b15cb3dSCy Schubert 81822b15cb3dSCy Schubert# _LT_DECL_DLLTOOL 81832b15cb3dSCy Schubert# ---------------- 81842b15cb3dSCy Schubert# Ensure DLLTOOL variable is set. 81852b15cb3dSCy Schubertm4_defun([_LT_DECL_DLLTOOL], 81862b15cb3dSCy Schubert[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 81872b15cb3dSCy Schuberttest -z "$DLLTOOL" && DLLTOOL=dlltool 81882b15cb3dSCy Schubert_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 81892b15cb3dSCy SchubertAC_SUBST([DLLTOOL]) 81902b15cb3dSCy Schubert]) 81912b15cb3dSCy Schubert 81922b15cb3dSCy Schubert# _LT_DECL_SED 81932b15cb3dSCy Schubert# ------------ 81942b15cb3dSCy Schubert# Check for a fully-functional sed program, that truncates 81952b15cb3dSCy Schubert# as few characters as possible. Prefer GNU sed if found. 81962b15cb3dSCy Schubertm4_defun([_LT_DECL_SED], 81972b15cb3dSCy Schubert[AC_PROG_SED 81982b15cb3dSCy Schuberttest -z "$SED" && SED=sed 81992b15cb3dSCy SchubertXsed="$SED -e 1s/^X//" 82002b15cb3dSCy Schubert_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82012b15cb3dSCy Schubert_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82022b15cb3dSCy Schubert [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82032b15cb3dSCy Schubert])# _LT_DECL_SED 82042b15cb3dSCy Schubert 82052b15cb3dSCy Schubertm4_ifndef([AC_PROG_SED], [ 82062b15cb3dSCy Schubert############################################################ 82072b15cb3dSCy Schubert# NOTE: This macro has been submitted for inclusion into # 82082b15cb3dSCy Schubert# GNU Autoconf as AC_PROG_SED. When it is available in # 82092b15cb3dSCy Schubert# a released version of Autoconf we should remove this # 82102b15cb3dSCy Schubert# macro and use it instead. # 82112b15cb3dSCy Schubert############################################################ 82122b15cb3dSCy Schubert 82132b15cb3dSCy Schubertm4_defun([AC_PROG_SED], 82142b15cb3dSCy Schubert[AC_MSG_CHECKING([for a sed that does not truncate output]) 82152b15cb3dSCy SchubertAC_CACHE_VAL(lt_cv_path_SED, 82162b15cb3dSCy Schubert[# Loop through the user's path and test for sed and gsed. 82172b15cb3dSCy Schubert# Then use that list of sed's as ones to test for truncation. 82182b15cb3dSCy Schubertas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82192b15cb3dSCy Schubertfor as_dir in $PATH 82202b15cb3dSCy Schubertdo 82212b15cb3dSCy Schubert IFS=$as_save_IFS 82222b15cb3dSCy Schubert test -z "$as_dir" && as_dir=. 82232b15cb3dSCy Schubert for lt_ac_prog in sed gsed; do 82242b15cb3dSCy Schubert for ac_exec_ext in '' $ac_executable_extensions; do 82252b15cb3dSCy Schubert if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82262b15cb3dSCy Schubert lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 82272b15cb3dSCy Schubert fi 82282b15cb3dSCy Schubert done 82292b15cb3dSCy Schubert done 82302b15cb3dSCy Schubertdone 82312b15cb3dSCy SchubertIFS=$as_save_IFS 82322b15cb3dSCy Schubertlt_ac_max=0 82332b15cb3dSCy Schubertlt_ac_count=0 82342b15cb3dSCy Schubert# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82352b15cb3dSCy Schubert# along with /bin/sed that truncates output. 82362b15cb3dSCy Schubertfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8237*f0574f5cSXin LI test ! -f "$lt_ac_sed" && continue 82382b15cb3dSCy Schubert cat /dev/null > conftest.in 82392b15cb3dSCy Schubert lt_ac_count=0 82402b15cb3dSCy Schubert echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82412b15cb3dSCy Schubert # Check for GNU sed and select it if it is found. 82422b15cb3dSCy Schubert if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 82432b15cb3dSCy Schubert lt_cv_path_SED=$lt_ac_sed 82442b15cb3dSCy Schubert break 82452b15cb3dSCy Schubert fi 82462b15cb3dSCy Schubert while true; do 82472b15cb3dSCy Schubert cat conftest.in conftest.in >conftest.tmp 82482b15cb3dSCy Schubert mv conftest.tmp conftest.in 82492b15cb3dSCy Schubert cp conftest.in conftest.nl 82502b15cb3dSCy Schubert echo >>conftest.nl 82512b15cb3dSCy Schubert $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 82522b15cb3dSCy Schubert cmp -s conftest.out conftest.nl || break 82532b15cb3dSCy Schubert # 10000 chars as input seems more than enough 8254*f0574f5cSXin LI test 10 -lt "$lt_ac_count" && break 82552b15cb3dSCy Schubert lt_ac_count=`expr $lt_ac_count + 1` 8256*f0574f5cSXin LI if test "$lt_ac_count" -gt "$lt_ac_max"; then 82572b15cb3dSCy Schubert lt_ac_max=$lt_ac_count 82582b15cb3dSCy Schubert lt_cv_path_SED=$lt_ac_sed 82592b15cb3dSCy Schubert fi 82602b15cb3dSCy Schubert done 82612b15cb3dSCy Schubertdone 82622b15cb3dSCy Schubert]) 82632b15cb3dSCy SchubertSED=$lt_cv_path_SED 82642b15cb3dSCy SchubertAC_SUBST([SED]) 82652b15cb3dSCy SchubertAC_MSG_RESULT([$SED]) 82662b15cb3dSCy Schubert])#AC_PROG_SED 82672b15cb3dSCy Schubert])#m4_ifndef 82682b15cb3dSCy Schubert 82692b15cb3dSCy Schubert# Old name: 82702b15cb3dSCy SchubertAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 82712b15cb3dSCy Schubertdnl aclocal-1.4 backwards compatibility: 82722b15cb3dSCy Schubertdnl AC_DEFUN([LT_AC_PROG_SED], []) 82732b15cb3dSCy Schubert 82742b15cb3dSCy Schubert 82752b15cb3dSCy Schubert# _LT_CHECK_SHELL_FEATURES 82762b15cb3dSCy Schubert# ------------------------ 82772b15cb3dSCy Schubert# Find out whether the shell is Bourne or XSI compatible, 82782b15cb3dSCy Schubert# or has some other useful features. 82792b15cb3dSCy Schubertm4_defun([_LT_CHECK_SHELL_FEATURES], 8280*f0574f5cSXin LI[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 82812b15cb3dSCy Schubert lt_unset=unset 82822b15cb3dSCy Schubertelse 82832b15cb3dSCy Schubert lt_unset=false 82842b15cb3dSCy Schubertfi 82852b15cb3dSCy Schubert_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 82862b15cb3dSCy Schubert 82872b15cb3dSCy Schubert# test EBCDIC or ASCII 82882b15cb3dSCy Schubertcase `echo X|tr X '\101'` in 82892b15cb3dSCy Schubert A) # ASCII based system 82902b15cb3dSCy Schubert # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 82912b15cb3dSCy Schubert lt_SP2NL='tr \040 \012' 82922b15cb3dSCy Schubert lt_NL2SP='tr \015\012 \040\040' 82932b15cb3dSCy Schubert ;; 82942b15cb3dSCy Schubert *) # EBCDIC based system 82952b15cb3dSCy Schubert lt_SP2NL='tr \100 \n' 82962b15cb3dSCy Schubert lt_NL2SP='tr \r\n \100\100' 82972b15cb3dSCy Schubert ;; 82982b15cb3dSCy Schubertesac 82992b15cb3dSCy Schubert_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83002b15cb3dSCy Schubert_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83012b15cb3dSCy Schubert])# _LT_CHECK_SHELL_FEATURES 83022b15cb3dSCy Schubert 83032b15cb3dSCy Schubert 83042b15cb3dSCy Schubert# _LT_PATH_CONVERSION_FUNCTIONS 83052b15cb3dSCy Schubert# ----------------------------- 8306*f0574f5cSXin LI# Determine what file name conversion functions should be used by 83072b15cb3dSCy Schubert# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 83082b15cb3dSCy Schubert# for certain cross-compile configurations and native mingw. 83092b15cb3dSCy Schubertm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 83102b15cb3dSCy Schubert[AC_REQUIRE([AC_CANONICAL_HOST])dnl 83112b15cb3dSCy SchubertAC_REQUIRE([AC_CANONICAL_BUILD])dnl 83122b15cb3dSCy SchubertAC_MSG_CHECKING([how to convert $build file names to $host format]) 83132b15cb3dSCy SchubertAC_CACHE_VAL(lt_cv_to_host_file_cmd, 83142b15cb3dSCy Schubert[case $host in 83152b15cb3dSCy Schubert *-*-mingw* ) 83162b15cb3dSCy Schubert case $build in 83172b15cb3dSCy Schubert *-*-mingw* ) # actually msys 83182b15cb3dSCy Schubert lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 83192b15cb3dSCy Schubert ;; 83202b15cb3dSCy Schubert *-*-cygwin* ) 83212b15cb3dSCy Schubert lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 83222b15cb3dSCy Schubert ;; 83232b15cb3dSCy Schubert * ) # otherwise, assume *nix 83242b15cb3dSCy Schubert lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 83252b15cb3dSCy Schubert ;; 83262b15cb3dSCy Schubert esac 83272b15cb3dSCy Schubert ;; 83282b15cb3dSCy Schubert *-*-cygwin* ) 83292b15cb3dSCy Schubert case $build in 83302b15cb3dSCy Schubert *-*-mingw* ) # actually msys 83312b15cb3dSCy Schubert lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 83322b15cb3dSCy Schubert ;; 83332b15cb3dSCy Schubert *-*-cygwin* ) 83342b15cb3dSCy Schubert lt_cv_to_host_file_cmd=func_convert_file_noop 83352b15cb3dSCy Schubert ;; 83362b15cb3dSCy Schubert * ) # otherwise, assume *nix 83372b15cb3dSCy Schubert lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 83382b15cb3dSCy Schubert ;; 83392b15cb3dSCy Schubert esac 83402b15cb3dSCy Schubert ;; 83412b15cb3dSCy Schubert * ) # unhandled hosts (and "normal" native builds) 83422b15cb3dSCy Schubert lt_cv_to_host_file_cmd=func_convert_file_noop 83432b15cb3dSCy Schubert ;; 83442b15cb3dSCy Schubertesac 83452b15cb3dSCy Schubert]) 83462b15cb3dSCy Schubertto_host_file_cmd=$lt_cv_to_host_file_cmd 83472b15cb3dSCy SchubertAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 83482b15cb3dSCy Schubert_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 83492b15cb3dSCy Schubert [0], [convert $build file names to $host format])dnl 83502b15cb3dSCy Schubert 83512b15cb3dSCy SchubertAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 83522b15cb3dSCy SchubertAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 83532b15cb3dSCy Schubert[#assume ordinary cross tools, or native build. 83542b15cb3dSCy Schubertlt_cv_to_tool_file_cmd=func_convert_file_noop 83552b15cb3dSCy Schubertcase $host in 83562b15cb3dSCy Schubert *-*-mingw* ) 83572b15cb3dSCy Schubert case $build in 83582b15cb3dSCy Schubert *-*-mingw* ) # actually msys 83592b15cb3dSCy Schubert lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 83602b15cb3dSCy Schubert ;; 83612b15cb3dSCy Schubert esac 83622b15cb3dSCy Schubert ;; 83632b15cb3dSCy Schubertesac 83642b15cb3dSCy Schubert]) 83652b15cb3dSCy Schubertto_tool_file_cmd=$lt_cv_to_tool_file_cmd 83662b15cb3dSCy SchubertAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 83672b15cb3dSCy Schubert_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 83682b15cb3dSCy Schubert [0], [convert $build files to toolchain format])dnl 83692b15cb3dSCy Schubert])# _LT_PATH_CONVERSION_FUNCTIONS 8370