1b6cee71dSXin LI# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2b6cee71dSXin LI# 3*ae316d1dSXin LI# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 4*ae316d1dSXin LI# Foundation, Inc. 5b6cee71dSXin LI# Written by Gordon Matzigkeit, 1996 6b6cee71dSXin LI# 7b6cee71dSXin LI# This file is free software; the Free Software Foundation gives 8b6cee71dSXin LI# unlimited permission to copy and/or distribute it, with or without 9b6cee71dSXin LI# modifications, as long as this notice is preserved. 10b6cee71dSXin LI 11b6cee71dSXin LIm4_define([_LT_COPYING], [dnl 12d38c30c0SXin LI# Copyright (C) 2014 Free Software Foundation, Inc. 13d38c30c0SXin LI# This is free software; see the source for copying conditions. There is NO 14d38c30c0SXin LI# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15d38c30c0SXin LI 16d38c30c0SXin LI# GNU Libtool is free software; you can redistribute it and/or modify 17d38c30c0SXin LI# it under the terms of the GNU General Public License as published by 18d38c30c0SXin LI# the Free Software Foundation; either version 2 of of the License, or 19d38c30c0SXin LI# (at your option) any later version. 20b6cee71dSXin LI# 21d38c30c0SXin LI# As a special exception to the GNU General Public License, if you 22d38c30c0SXin LI# distribute this file as part of a program or library that is built 23d38c30c0SXin LI# using GNU Libtool, you may include this file under the same 24d38c30c0SXin LI# distribution terms that you use for the rest of that program. 25b6cee71dSXin LI# 26d38c30c0SXin LI# GNU Libtool is distributed in the hope that it will be useful, but 27d38c30c0SXin LI# WITHOUT ANY WARRANTY; without even the implied warranty of 28b6cee71dSXin LI# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29b6cee71dSXin LI# GNU General Public License for more details. 30b6cee71dSXin LI# 31b6cee71dSXin LI# You should have received a copy of the GNU General Public License 32d38c30c0SXin LI# along with this program. If not, see <http://www.gnu.org/licenses/>. 33b6cee71dSXin LI]) 34b6cee71dSXin LI 35*ae316d1dSXin LI# serial 59 LT_INIT 36b6cee71dSXin LI 37b6cee71dSXin LI 38b6cee71dSXin LI# LT_PREREQ(VERSION) 39b6cee71dSXin LI# ------------------ 40b6cee71dSXin LI# Complain and exit if this libtool version is less that VERSION. 41b6cee71dSXin LIm4_defun([LT_PREREQ], 42b6cee71dSXin LI[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 43b6cee71dSXin LI [m4_default([$3], 44b6cee71dSXin LI [m4_fatal([Libtool version $1 or higher is required], 45b6cee71dSXin LI 63)])], 46b6cee71dSXin LI [$2])]) 47b6cee71dSXin LI 48b6cee71dSXin LI 49b6cee71dSXin LI# _LT_CHECK_BUILDDIR 50b6cee71dSXin LI# ------------------ 51b6cee71dSXin LI# Complain if the absolute build directory name contains unusual characters 52b6cee71dSXin LIm4_defun([_LT_CHECK_BUILDDIR], 53b6cee71dSXin LI[case `pwd` in 54b6cee71dSXin LI *\ * | *\ *) 55b6cee71dSXin LI AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 56b6cee71dSXin LIesac 57b6cee71dSXin LI]) 58b6cee71dSXin LI 59b6cee71dSXin LI 60b6cee71dSXin LI# LT_INIT([OPTIONS]) 61b6cee71dSXin LI# ------------------ 62b6cee71dSXin LIAC_DEFUN([LT_INIT], 63d38c30c0SXin LI[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 64b6cee71dSXin LIAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 65b6cee71dSXin LIAC_BEFORE([$0], [LT_LANG])dnl 66b6cee71dSXin LIAC_BEFORE([$0], [LT_OUTPUT])dnl 67b6cee71dSXin LIAC_BEFORE([$0], [LTDL_INIT])dnl 68b6cee71dSXin LIm4_require([_LT_CHECK_BUILDDIR])dnl 69b6cee71dSXin LI 70b6cee71dSXin LIdnl Autoconf doesn't catch unexpanded LT_ macros by default: 71b6cee71dSXin LIm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 72b6cee71dSXin LIm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 73b6cee71dSXin LIdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 74b6cee71dSXin LIdnl unless we require an AC_DEFUNed macro: 75b6cee71dSXin LIAC_REQUIRE([LTOPTIONS_VERSION])dnl 76b6cee71dSXin LIAC_REQUIRE([LTSUGAR_VERSION])dnl 77b6cee71dSXin LIAC_REQUIRE([LTVERSION_VERSION])dnl 78b6cee71dSXin LIAC_REQUIRE([LTOBSOLETE_VERSION])dnl 79b6cee71dSXin LIm4_require([_LT_PROG_LTMAIN])dnl 80b6cee71dSXin LI 81b6cee71dSXin LI_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 82b6cee71dSXin LI 83b6cee71dSXin LIdnl Parse OPTIONS 84b6cee71dSXin LI_LT_SET_OPTIONS([$0], [$1]) 85b6cee71dSXin LI 86b6cee71dSXin LI# This can be used to rebuild libtool when needed 87d38c30c0SXin LILIBTOOL_DEPS=$ltmain 88b6cee71dSXin LI 89b6cee71dSXin LI# Always use our own libtool. 90b6cee71dSXin LILIBTOOL='$(SHELL) $(top_builddir)/libtool' 91b6cee71dSXin LIAC_SUBST(LIBTOOL)dnl 92b6cee71dSXin LI 93b6cee71dSXin LI_LT_SETUP 94b6cee71dSXin LI 95b6cee71dSXin LI# Only expand once: 96b6cee71dSXin LIm4_define([LT_INIT]) 97b6cee71dSXin LI])# LT_INIT 98b6cee71dSXin LI 99b6cee71dSXin LI# Old names: 100b6cee71dSXin LIAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 101b6cee71dSXin LIAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 102b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 103b6cee71dSXin LIdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 104b6cee71dSXin LIdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 105b6cee71dSXin LI 106b6cee71dSXin LI 107d38c30c0SXin LI# _LT_PREPARE_CC_BASENAME 108d38c30c0SXin LI# ----------------------- 109d38c30c0SXin LIm4_defun([_LT_PREPARE_CC_BASENAME], [ 110b6cee71dSXin LI# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 111d38c30c0SXin LIfunc_cc_basename () 112d38c30c0SXin LI{ 113d38c30c0SXin LI for cc_temp in @S|@*""; do 114b6cee71dSXin LI case $cc_temp in 115b6cee71dSXin LI compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 116b6cee71dSXin LI distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 117b6cee71dSXin LI \-*) ;; 118b6cee71dSXin LI *) break;; 119b6cee71dSXin LI esac 120b6cee71dSXin LI done 121d38c30c0SXin LI func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 122d38c30c0SXin LI} 123d38c30c0SXin LI])# _LT_PREPARE_CC_BASENAME 124d38c30c0SXin LI 125d38c30c0SXin LI 126d38c30c0SXin LI# _LT_CC_BASENAME(CC) 127d38c30c0SXin LI# ------------------- 128d38c30c0SXin LI# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 129d38c30c0SXin LI# but that macro is also expanded into generated libtool script, which 130d38c30c0SXin LI# arranges for $SED and $ECHO to be set by different means. 131d38c30c0SXin LIm4_defun([_LT_CC_BASENAME], 132d38c30c0SXin LI[m4_require([_LT_PREPARE_CC_BASENAME])dnl 133d38c30c0SXin LIAC_REQUIRE([_LT_DECL_SED])dnl 134d38c30c0SXin LIAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 135d38c30c0SXin LIfunc_cc_basename $1 136d38c30c0SXin LIcc_basename=$func_cc_basename_result 137b6cee71dSXin LI]) 138b6cee71dSXin LI 139b6cee71dSXin LI 140b6cee71dSXin LI# _LT_FILEUTILS_DEFAULTS 141b6cee71dSXin LI# ---------------------- 142b6cee71dSXin LI# It is okay to use these file commands and assume they have been set 143d38c30c0SXin LI# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 144b6cee71dSXin LIm4_defun([_LT_FILEUTILS_DEFAULTS], 145b6cee71dSXin LI[: ${CP="cp -f"} 146b6cee71dSXin LI: ${MV="mv -f"} 147b6cee71dSXin LI: ${RM="rm -f"} 148b6cee71dSXin LI])# _LT_FILEUTILS_DEFAULTS 149b6cee71dSXin LI 150b6cee71dSXin LI 151b6cee71dSXin LI# _LT_SETUP 152b6cee71dSXin LI# --------- 153b6cee71dSXin LIm4_defun([_LT_SETUP], 154b6cee71dSXin LI[AC_REQUIRE([AC_CANONICAL_HOST])dnl 155b6cee71dSXin LIAC_REQUIRE([AC_CANONICAL_BUILD])dnl 156b6cee71dSXin LIAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 157b6cee71dSXin LIAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 158b6cee71dSXin LI 159b6cee71dSXin LI_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 160b6cee71dSXin LIdnl 161b6cee71dSXin LI_LT_DECL([], [host_alias], [0], [The host system])dnl 162b6cee71dSXin LI_LT_DECL([], [host], [0])dnl 163b6cee71dSXin LI_LT_DECL([], [host_os], [0])dnl 164b6cee71dSXin LIdnl 165b6cee71dSXin LI_LT_DECL([], [build_alias], [0], [The build system])dnl 166b6cee71dSXin LI_LT_DECL([], [build], [0])dnl 167b6cee71dSXin LI_LT_DECL([], [build_os], [0])dnl 168b6cee71dSXin LIdnl 169b6cee71dSXin LIAC_REQUIRE([AC_PROG_CC])dnl 170b6cee71dSXin LIAC_REQUIRE([LT_PATH_LD])dnl 171b6cee71dSXin LIAC_REQUIRE([LT_PATH_NM])dnl 172b6cee71dSXin LIdnl 173b6cee71dSXin LIAC_REQUIRE([AC_PROG_LN_S])dnl 174b6cee71dSXin LItest -z "$LN_S" && LN_S="ln -s" 175b6cee71dSXin LI_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 176b6cee71dSXin LIdnl 177b6cee71dSXin LIAC_REQUIRE([LT_CMD_MAX_LEN])dnl 178b6cee71dSXin LI_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 179b6cee71dSXin LI_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 180b6cee71dSXin LIdnl 181b6cee71dSXin LIm4_require([_LT_FILEUTILS_DEFAULTS])dnl 182b6cee71dSXin LIm4_require([_LT_CHECK_SHELL_FEATURES])dnl 183b6cee71dSXin LIm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 184b6cee71dSXin LIm4_require([_LT_CMD_RELOAD])dnl 185*ae316d1dSXin LIm4_require([_LT_DECL_FILECMD])dnl 186b6cee71dSXin LIm4_require([_LT_CHECK_MAGIC_METHOD])dnl 187b6cee71dSXin LIm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 188b6cee71dSXin LIm4_require([_LT_CMD_OLD_ARCHIVE])dnl 189b6cee71dSXin LIm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 190b6cee71dSXin LIm4_require([_LT_WITH_SYSROOT])dnl 191d38c30c0SXin LIm4_require([_LT_CMD_TRUNCATE])dnl 192b6cee71dSXin LI 193b6cee71dSXin LI_LT_CONFIG_LIBTOOL_INIT([ 194d38c30c0SXin LI# See if we are running on zsh, and set the options that allow our 195b6cee71dSXin LI# commands through without removal of \ escapes INIT. 196b6cee71dSXin LIif test -n "\${ZSH_VERSION+set}"; then 197b6cee71dSXin LI setopt NO_GLOB_SUBST 198b6cee71dSXin LIfi 199b6cee71dSXin LI]) 200b6cee71dSXin LIif test -n "${ZSH_VERSION+set}"; then 201b6cee71dSXin LI setopt NO_GLOB_SUBST 202b6cee71dSXin LIfi 203b6cee71dSXin LI 204b6cee71dSXin LI_LT_CHECK_OBJDIR 205b6cee71dSXin LI 206b6cee71dSXin LIm4_require([_LT_TAG_COMPILER])dnl 207b6cee71dSXin LI 208b6cee71dSXin LIcase $host_os in 209b6cee71dSXin LIaix3*) 210b6cee71dSXin LI # AIX sometimes has problems with the GCC collect2 program. For some 211b6cee71dSXin LI # reason, if we set the COLLECT_NAMES environment variable, the problems 212b6cee71dSXin LI # vanish in a puff of smoke. 213d38c30c0SXin LI if test set != "${COLLECT_NAMES+set}"; then 214b6cee71dSXin LI COLLECT_NAMES= 215b6cee71dSXin LI export COLLECT_NAMES 216b6cee71dSXin LI fi 217b6cee71dSXin LI ;; 218b6cee71dSXin LIesac 219b6cee71dSXin LI 220b6cee71dSXin LI# Global variables: 221b6cee71dSXin LIofile=libtool 222b6cee71dSXin LIcan_build_shared=yes 223b6cee71dSXin LI 224*ae316d1dSXin LI# All known linkers require a '.a' archive for static linking (except MSVC and 225*ae316d1dSXin LI# ICC, which need '.lib'). 226b6cee71dSXin LIlibext=a 227b6cee71dSXin LI 228d38c30c0SXin LIwith_gnu_ld=$lt_cv_prog_gnu_ld 229b6cee71dSXin LI 230d38c30c0SXin LIold_CC=$CC 231d38c30c0SXin LIold_CFLAGS=$CFLAGS 232b6cee71dSXin LI 233b6cee71dSXin LI# Set sane defaults for various variables 234b6cee71dSXin LItest -z "$CC" && CC=cc 235b6cee71dSXin LItest -z "$LTCC" && LTCC=$CC 236b6cee71dSXin LItest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 237b6cee71dSXin LItest -z "$LD" && LD=ld 238b6cee71dSXin LItest -z "$ac_objext" && ac_objext=o 239b6cee71dSXin LI 240b6cee71dSXin LI_LT_CC_BASENAME([$compiler]) 241b6cee71dSXin LI 242b6cee71dSXin LI# Only perform the check for file, if the check method requires it 243b6cee71dSXin LItest -z "$MAGIC_CMD" && MAGIC_CMD=file 244b6cee71dSXin LIcase $deplibs_check_method in 245b6cee71dSXin LIfile_magic*) 246b6cee71dSXin LI if test "$file_magic_cmd" = '$MAGIC_CMD'; then 247b6cee71dSXin LI _LT_PATH_MAGIC 248b6cee71dSXin LI fi 249b6cee71dSXin LI ;; 250b6cee71dSXin LIesac 251b6cee71dSXin LI 252b6cee71dSXin LI# Use C for the default configuration in the libtool script 253b6cee71dSXin LILT_SUPPORTED_TAG([CC]) 254b6cee71dSXin LI_LT_LANG_C_CONFIG 255b6cee71dSXin LI_LT_LANG_DEFAULT_CONFIG 256b6cee71dSXin LI_LT_CONFIG_COMMANDS 257b6cee71dSXin LI])# _LT_SETUP 258b6cee71dSXin LI 259b6cee71dSXin LI 260b6cee71dSXin LI# _LT_PREPARE_SED_QUOTE_VARS 261b6cee71dSXin LI# -------------------------- 262b6cee71dSXin LI# Define a few sed substitution that help us do robust quoting. 263b6cee71dSXin LIm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 264b6cee71dSXin LI[# Backslashify metacharacters that are still active within 265b6cee71dSXin LI# double-quoted strings. 266b6cee71dSXin LIsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 267b6cee71dSXin LI 268b6cee71dSXin LI# Same as above, but do not quote variable references. 269b6cee71dSXin LIdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 270b6cee71dSXin LI 271b6cee71dSXin LI# Sed substitution to delay expansion of an escaped shell variable in a 272b6cee71dSXin LI# double_quote_subst'ed string. 273b6cee71dSXin LIdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 274b6cee71dSXin LI 275b6cee71dSXin LI# Sed substitution to delay expansion of an escaped single quote. 276b6cee71dSXin LIdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 277b6cee71dSXin LI 278b6cee71dSXin LI# Sed substitution to avoid accidental globbing in evaled expressions 279b6cee71dSXin LIno_glob_subst='s/\*/\\\*/g' 280b6cee71dSXin LI]) 281b6cee71dSXin LI 282b6cee71dSXin LI# _LT_PROG_LTMAIN 283b6cee71dSXin LI# --------------- 284d38c30c0SXin LI# Note that this code is called both from 'configure', and 'config.status' 285b6cee71dSXin LI# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 286d38c30c0SXin LI# 'config.status' has no value for ac_aux_dir unless we are using Automake, 287b6cee71dSXin LI# so we pass a copy along to make sure it has a sensible value anyway. 288b6cee71dSXin LIm4_defun([_LT_PROG_LTMAIN], 289b6cee71dSXin LI[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 290b6cee71dSXin LI_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 291d38c30c0SXin LIltmain=$ac_aux_dir/ltmain.sh 292b6cee71dSXin LI])# _LT_PROG_LTMAIN 293b6cee71dSXin LI 294b6cee71dSXin LI 295b6cee71dSXin LI## ------------------------------------- ## 296b6cee71dSXin LI## Accumulate code for creating libtool. ## 297b6cee71dSXin LI## ------------------------------------- ## 298b6cee71dSXin LI 299b6cee71dSXin LI# So that we can recreate a full libtool script including additional 300b6cee71dSXin LI# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 301d38c30c0SXin LI# in macros and then make a single call at the end using the 'libtool' 302b6cee71dSXin LI# label. 303b6cee71dSXin LI 304b6cee71dSXin LI 305b6cee71dSXin LI# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 306b6cee71dSXin LI# ---------------------------------------- 307b6cee71dSXin LI# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 308b6cee71dSXin LIm4_define([_LT_CONFIG_LIBTOOL_INIT], 309b6cee71dSXin LI[m4_ifval([$1], 310b6cee71dSXin LI [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 311b6cee71dSXin LI [$1 312b6cee71dSXin LI])])]) 313b6cee71dSXin LI 314b6cee71dSXin LI# Initialize. 315b6cee71dSXin LIm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 316b6cee71dSXin LI 317b6cee71dSXin LI 318b6cee71dSXin LI# _LT_CONFIG_LIBTOOL([COMMANDS]) 319b6cee71dSXin LI# ------------------------------ 320b6cee71dSXin LI# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 321b6cee71dSXin LIm4_define([_LT_CONFIG_LIBTOOL], 322b6cee71dSXin LI[m4_ifval([$1], 323b6cee71dSXin LI [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 324b6cee71dSXin LI [$1 325b6cee71dSXin LI])])]) 326b6cee71dSXin LI 327b6cee71dSXin LI# Initialize. 328b6cee71dSXin LIm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 329b6cee71dSXin LI 330b6cee71dSXin LI 331b6cee71dSXin LI# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 332b6cee71dSXin LI# ----------------------------------------------------- 333b6cee71dSXin LIm4_defun([_LT_CONFIG_SAVE_COMMANDS], 334b6cee71dSXin LI[_LT_CONFIG_LIBTOOL([$1]) 335b6cee71dSXin LI_LT_CONFIG_LIBTOOL_INIT([$2]) 336b6cee71dSXin LI]) 337b6cee71dSXin LI 338b6cee71dSXin LI 339b6cee71dSXin LI# _LT_FORMAT_COMMENT([COMMENT]) 340b6cee71dSXin LI# ----------------------------- 341b6cee71dSXin LI# Add leading comment marks to the start of each line, and a trailing 342b6cee71dSXin LI# full-stop to the whole comment if one is not present already. 343b6cee71dSXin LIm4_define([_LT_FORMAT_COMMENT], 344b6cee71dSXin LI[m4_ifval([$1], [ 345b6cee71dSXin LIm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 346b6cee71dSXin LI [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 347b6cee71dSXin LI)]) 348b6cee71dSXin LI 349b6cee71dSXin LI 350b6cee71dSXin LI 351b6cee71dSXin LI## ------------------------ ## 352b6cee71dSXin LI## FIXME: Eliminate VARNAME ## 353b6cee71dSXin LI## ------------------------ ## 354b6cee71dSXin LI 355b6cee71dSXin LI 356b6cee71dSXin LI# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 357b6cee71dSXin LI# ------------------------------------------------------------------- 358b6cee71dSXin LI# CONFIGNAME is the name given to the value in the libtool script. 359b6cee71dSXin LI# VARNAME is the (base) name used in the configure script. 360b6cee71dSXin LI# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 361b6cee71dSXin LI# VARNAME. Any other value will be used directly. 362b6cee71dSXin LIm4_define([_LT_DECL], 363b6cee71dSXin LI[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 364b6cee71dSXin LI [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 365b6cee71dSXin LI [m4_ifval([$1], [$1], [$2])]) 366b6cee71dSXin LI lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 367b6cee71dSXin LI m4_ifval([$4], 368b6cee71dSXin LI [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 369b6cee71dSXin LI lt_dict_add_subkey([lt_decl_dict], [$2], 370b6cee71dSXin LI [tagged?], [m4_ifval([$5], [yes], [no])])]) 371b6cee71dSXin LI]) 372b6cee71dSXin LI 373b6cee71dSXin LI 374b6cee71dSXin LI# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 375b6cee71dSXin LI# -------------------------------------------------------- 376b6cee71dSXin LIm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 377b6cee71dSXin LI 378b6cee71dSXin LI 379b6cee71dSXin LI# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 380b6cee71dSXin LI# ------------------------------------------------ 381b6cee71dSXin LIm4_define([lt_decl_tag_varnames], 382b6cee71dSXin LI[_lt_decl_filter([tagged?], [yes], $@)]) 383b6cee71dSXin LI 384b6cee71dSXin LI 385b6cee71dSXin LI# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 386b6cee71dSXin LI# --------------------------------------------------------- 387b6cee71dSXin LIm4_define([_lt_decl_filter], 388b6cee71dSXin LI[m4_case([$#], 389b6cee71dSXin LI [0], [m4_fatal([$0: too few arguments: $#])], 390b6cee71dSXin LI [1], [m4_fatal([$0: too few arguments: $#: $1])], 391b6cee71dSXin LI [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 392b6cee71dSXin LI [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 393b6cee71dSXin LI [lt_dict_filter([lt_decl_dict], $@)])[]dnl 394b6cee71dSXin LI]) 395b6cee71dSXin LI 396b6cee71dSXin LI 397b6cee71dSXin LI# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 398b6cee71dSXin LI# -------------------------------------------------- 399b6cee71dSXin LIm4_define([lt_decl_quote_varnames], 400b6cee71dSXin LI[_lt_decl_filter([value], [1], $@)]) 401b6cee71dSXin LI 402b6cee71dSXin LI 403b6cee71dSXin LI# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 404b6cee71dSXin LI# --------------------------------------------------- 405b6cee71dSXin LIm4_define([lt_decl_dquote_varnames], 406b6cee71dSXin LI[_lt_decl_filter([value], [2], $@)]) 407b6cee71dSXin LI 408b6cee71dSXin LI 409b6cee71dSXin LI# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 410b6cee71dSXin LI# --------------------------------------------------- 411b6cee71dSXin LIm4_define([lt_decl_varnames_tagged], 412b6cee71dSXin LI[m4_assert([$# <= 2])dnl 413b6cee71dSXin LI_$0(m4_quote(m4_default([$1], [[, ]])), 414b6cee71dSXin LI m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 415b6cee71dSXin LI m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 416b6cee71dSXin LIm4_define([_lt_decl_varnames_tagged], 417b6cee71dSXin LI[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 418b6cee71dSXin LI 419b6cee71dSXin LI 420b6cee71dSXin LI# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 421b6cee71dSXin LI# ------------------------------------------------ 422b6cee71dSXin LIm4_define([lt_decl_all_varnames], 423b6cee71dSXin LI[_$0(m4_quote(m4_default([$1], [[, ]])), 424b6cee71dSXin LI m4_if([$2], [], 425b6cee71dSXin LI m4_quote(lt_decl_varnames), 426b6cee71dSXin LI m4_quote(m4_shift($@))))[]dnl 427b6cee71dSXin LI]) 428b6cee71dSXin LIm4_define([_lt_decl_all_varnames], 429b6cee71dSXin LI[lt_join($@, lt_decl_varnames_tagged([$1], 430b6cee71dSXin LI lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 431b6cee71dSXin LI]) 432b6cee71dSXin LI 433b6cee71dSXin LI 434b6cee71dSXin LI# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 435b6cee71dSXin LI# ------------------------------------ 436d38c30c0SXin LI# Quote a variable value, and forward it to 'config.status' so that its 437d38c30c0SXin LI# declaration there will have the same value as in 'configure'. VARNAME 438b6cee71dSXin LI# must have a single quote delimited value for this to work. 439b6cee71dSXin LIm4_define([_LT_CONFIG_STATUS_DECLARE], 440b6cee71dSXin LI[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 441b6cee71dSXin LI 442b6cee71dSXin LI 443b6cee71dSXin LI# _LT_CONFIG_STATUS_DECLARATIONS 444b6cee71dSXin LI# ------------------------------ 445b6cee71dSXin LI# We delimit libtool config variables with single quotes, so when 446b6cee71dSXin LI# we write them to config.status, we have to be sure to quote all 447b6cee71dSXin LI# embedded single quotes properly. In configure, this macro expands 448b6cee71dSXin LI# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 449b6cee71dSXin LI# 450b6cee71dSXin LI# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 451b6cee71dSXin LIm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 452b6cee71dSXin LI[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 453b6cee71dSXin LI [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 454b6cee71dSXin LI 455b6cee71dSXin LI 456b6cee71dSXin LI# _LT_LIBTOOL_TAGS 457b6cee71dSXin LI# ---------------- 458b6cee71dSXin LI# Output comment and list of tags supported by the script 459b6cee71dSXin LIm4_defun([_LT_LIBTOOL_TAGS], 460b6cee71dSXin LI[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 461d38c30c0SXin LIavailable_tags='_LT_TAGS'dnl 462b6cee71dSXin LI]) 463b6cee71dSXin LI 464b6cee71dSXin LI 465b6cee71dSXin LI# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 466b6cee71dSXin LI# ----------------------------------- 467b6cee71dSXin LI# Extract the dictionary values for VARNAME (optionally with TAG) and 468b6cee71dSXin LI# expand to a commented shell variable setting: 469b6cee71dSXin LI# 470b6cee71dSXin LI# # Some comment about what VAR is for. 471b6cee71dSXin LI# visible_name=$lt_internal_name 472b6cee71dSXin LIm4_define([_LT_LIBTOOL_DECLARE], 473b6cee71dSXin LI[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 474b6cee71dSXin LI [description])))[]dnl 475b6cee71dSXin LIm4_pushdef([_libtool_name], 476b6cee71dSXin LI m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 477b6cee71dSXin LIm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 478b6cee71dSXin LI [0], [_libtool_name=[$]$1], 479b6cee71dSXin LI [1], [_libtool_name=$lt_[]$1], 480b6cee71dSXin LI [2], [_libtool_name=$lt_[]$1], 481b6cee71dSXin LI [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 482b6cee71dSXin LIm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 483b6cee71dSXin LI]) 484b6cee71dSXin LI 485b6cee71dSXin LI 486b6cee71dSXin LI# _LT_LIBTOOL_CONFIG_VARS 487b6cee71dSXin LI# ----------------------- 488b6cee71dSXin LI# Produce commented declarations of non-tagged libtool config variables 489d38c30c0SXin LI# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 490b6cee71dSXin LI# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 491b6cee71dSXin LI# section) are produced by _LT_LIBTOOL_TAG_VARS. 492b6cee71dSXin LIm4_defun([_LT_LIBTOOL_CONFIG_VARS], 493b6cee71dSXin LI[m4_foreach([_lt_var], 494b6cee71dSXin LI m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 495b6cee71dSXin LI [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 496b6cee71dSXin LI 497b6cee71dSXin LI 498b6cee71dSXin LI# _LT_LIBTOOL_TAG_VARS(TAG) 499b6cee71dSXin LI# ------------------------- 500b6cee71dSXin LIm4_define([_LT_LIBTOOL_TAG_VARS], 501b6cee71dSXin LI[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 502b6cee71dSXin LI [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 503b6cee71dSXin LI 504b6cee71dSXin LI 505b6cee71dSXin LI# _LT_TAGVAR(VARNAME, [TAGNAME]) 506b6cee71dSXin LI# ------------------------------ 507b6cee71dSXin LIm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 508b6cee71dSXin LI 509b6cee71dSXin LI 510b6cee71dSXin LI# _LT_CONFIG_COMMANDS 511b6cee71dSXin LI# ------------------- 512b6cee71dSXin LI# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 513b6cee71dSXin LI# variables for single and double quote escaping we saved from calls 514b6cee71dSXin LI# to _LT_DECL, we can put quote escaped variables declarations 515d38c30c0SXin LI# into 'config.status', and then the shell code to quote escape them in 516d38c30c0SXin LI# for loops in 'config.status'. Finally, any additional code accumulated 517b6cee71dSXin LI# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 518b6cee71dSXin LIm4_defun([_LT_CONFIG_COMMANDS], 519b6cee71dSXin LI[AC_PROVIDE_IFELSE([LT_OUTPUT], 520b6cee71dSXin LI dnl If the libtool generation code has been placed in $CONFIG_LT, 521b6cee71dSXin LI dnl instead of duplicating it all over again into config.status, 522b6cee71dSXin LI dnl then we will have config.status run $CONFIG_LT later, so it 523b6cee71dSXin LI dnl needs to know what name is stored there: 524b6cee71dSXin LI [AC_CONFIG_COMMANDS([libtool], 525b6cee71dSXin LI [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 526b6cee71dSXin LI dnl If the libtool generation code is destined for config.status, 527b6cee71dSXin LI dnl expand the accumulated commands and init code now: 528b6cee71dSXin LI [AC_CONFIG_COMMANDS([libtool], 529b6cee71dSXin LI [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 530b6cee71dSXin LI])#_LT_CONFIG_COMMANDS 531b6cee71dSXin LI 532b6cee71dSXin LI 533b6cee71dSXin LI# Initialize. 534b6cee71dSXin LIm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 535b6cee71dSXin LI[ 536b6cee71dSXin LI 537b6cee71dSXin LI# The HP-UX ksh and POSIX shell print the target directory to stdout 538b6cee71dSXin LI# if CDPATH is set. 539b6cee71dSXin LI(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 540b6cee71dSXin LI 541b6cee71dSXin LIsed_quote_subst='$sed_quote_subst' 542b6cee71dSXin LIdouble_quote_subst='$double_quote_subst' 543b6cee71dSXin LIdelay_variable_subst='$delay_variable_subst' 544b6cee71dSXin LI_LT_CONFIG_STATUS_DECLARATIONS 545b6cee71dSXin LILTCC='$LTCC' 546b6cee71dSXin LILTCFLAGS='$LTCFLAGS' 547b6cee71dSXin LIcompiler='$compiler_DEFAULT' 548b6cee71dSXin LI 549b6cee71dSXin LI# A function that is used when there is no print builtin or printf. 550b6cee71dSXin LIfunc_fallback_echo () 551b6cee71dSXin LI{ 552b6cee71dSXin LI eval 'cat <<_LTECHO_EOF 553b6cee71dSXin LI\$[]1 554b6cee71dSXin LI_LTECHO_EOF' 555b6cee71dSXin LI} 556b6cee71dSXin LI 557b6cee71dSXin LI# Quote evaled strings. 558b6cee71dSXin LIfor var in lt_decl_all_varnames([[ \ 559b6cee71dSXin LI]], lt_decl_quote_varnames); do 560b6cee71dSXin LI case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 561b6cee71dSXin LI *[[\\\\\\\`\\"\\\$]]*) 562d38c30c0SXin LI eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 563b6cee71dSXin LI ;; 564b6cee71dSXin LI *) 565b6cee71dSXin LI eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 566b6cee71dSXin LI ;; 567b6cee71dSXin LI esac 568b6cee71dSXin LIdone 569b6cee71dSXin LI 570b6cee71dSXin LI# Double-quote double-evaled strings. 571b6cee71dSXin LIfor var in lt_decl_all_varnames([[ \ 572b6cee71dSXin LI]], lt_decl_dquote_varnames); do 573b6cee71dSXin LI case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 574b6cee71dSXin LI *[[\\\\\\\`\\"\\\$]]*) 575d38c30c0SXin 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 576b6cee71dSXin LI ;; 577b6cee71dSXin LI *) 578b6cee71dSXin LI eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 579b6cee71dSXin LI ;; 580b6cee71dSXin LI esac 581b6cee71dSXin LIdone 582b6cee71dSXin LI 583b6cee71dSXin LI_LT_OUTPUT_LIBTOOL_INIT 584b6cee71dSXin LI]) 585b6cee71dSXin LI 586b6cee71dSXin LI# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 587b6cee71dSXin LI# ------------------------------------ 588b6cee71dSXin LI# Generate a child script FILE with all initialization necessary to 589b6cee71dSXin LI# reuse the environment learned by the parent script, and make the 590b6cee71dSXin LI# file executable. If COMMENT is supplied, it is inserted after the 591d38c30c0SXin LI# '#!' sequence but before initialization text begins. After this 592b6cee71dSXin LI# macro, additional text can be appended to FILE to form the body of 593b6cee71dSXin LI# the child script. The macro ends with non-zero status if the 594b6cee71dSXin LI# file could not be fully written (such as if the disk is full). 595b6cee71dSXin LIm4_ifdef([AS_INIT_GENERATED], 596b6cee71dSXin LI[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 597b6cee71dSXin LI[m4_defun([_LT_GENERATED_FILE_INIT], 598b6cee71dSXin LI[m4_require([AS_PREPARE])]dnl 599b6cee71dSXin LI[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 600b6cee71dSXin LI[lt_write_fail=0 601b6cee71dSXin LIcat >$1 <<_ASEOF || lt_write_fail=1 602b6cee71dSXin LI#! $SHELL 603b6cee71dSXin LI# Generated by $as_me. 604b6cee71dSXin LI$2 605b6cee71dSXin LISHELL=\${CONFIG_SHELL-$SHELL} 606b6cee71dSXin LIexport SHELL 607b6cee71dSXin LI_ASEOF 608b6cee71dSXin LIcat >>$1 <<\_ASEOF || lt_write_fail=1 609b6cee71dSXin LIAS_SHELL_SANITIZE 610b6cee71dSXin LI_AS_PREPARE 611b6cee71dSXin LIexec AS_MESSAGE_FD>&1 612b6cee71dSXin LI_ASEOF 613d38c30c0SXin LItest 0 = "$lt_write_fail" && chmod +x $1[]dnl 614b6cee71dSXin LIm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 615b6cee71dSXin LI 616b6cee71dSXin LI# LT_OUTPUT 617b6cee71dSXin LI# --------- 618b6cee71dSXin LI# This macro allows early generation of the libtool script (before 619b6cee71dSXin LI# AC_OUTPUT is called), incase it is used in configure for compilation 620b6cee71dSXin LI# tests. 621b6cee71dSXin LIAC_DEFUN([LT_OUTPUT], 622b6cee71dSXin LI[: ${CONFIG_LT=./config.lt} 623b6cee71dSXin LIAC_MSG_NOTICE([creating $CONFIG_LT]) 624b6cee71dSXin LI_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 625b6cee71dSXin LI[# Run this file to recreate a libtool stub with the current configuration.]) 626b6cee71dSXin LI 627b6cee71dSXin LIcat >>"$CONFIG_LT" <<\_LTEOF 628b6cee71dSXin LIlt_cl_silent=false 629b6cee71dSXin LIexec AS_MESSAGE_LOG_FD>>config.log 630b6cee71dSXin LI{ 631b6cee71dSXin LI echo 632b6cee71dSXin LI AS_BOX([Running $as_me.]) 633b6cee71dSXin LI} >&AS_MESSAGE_LOG_FD 634b6cee71dSXin LI 635b6cee71dSXin LIlt_cl_help="\ 636d38c30c0SXin LI'$as_me' creates a local libtool stub from the current configuration, 637b6cee71dSXin LIfor use in further configure time tests before the real libtool is 638b6cee71dSXin LIgenerated. 639b6cee71dSXin LI 640b6cee71dSXin LIUsage: $[0] [[OPTIONS]] 641b6cee71dSXin LI 642b6cee71dSXin LI -h, --help print this help, then exit 643b6cee71dSXin LI -V, --version print version number, then exit 644b6cee71dSXin LI -q, --quiet do not print progress messages 645b6cee71dSXin LI -d, --debug don't remove temporary files 646b6cee71dSXin LI 647b6cee71dSXin LIReport bugs to <bug-libtool@gnu.org>." 648b6cee71dSXin LI 649b6cee71dSXin LIlt_cl_version="\ 650b6cee71dSXin LIm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 651b6cee71dSXin LIm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 652b6cee71dSXin LIconfigured by $[0], generated by m4_PACKAGE_STRING. 653b6cee71dSXin LI 654b6cee71dSXin LICopyright (C) 2011 Free Software Foundation, Inc. 655b6cee71dSXin LIThis config.lt script is free software; the Free Software Foundation 656b6cee71dSXin LIgives unlimited permision to copy, distribute and modify it." 657b6cee71dSXin LI 658d38c30c0SXin LIwhile test 0 != $[#] 659b6cee71dSXin LIdo 660b6cee71dSXin LI case $[1] in 661b6cee71dSXin LI --version | --v* | -V ) 662b6cee71dSXin LI echo "$lt_cl_version"; exit 0 ;; 663b6cee71dSXin LI --help | --h* | -h ) 664b6cee71dSXin LI echo "$lt_cl_help"; exit 0 ;; 665b6cee71dSXin LI --debug | --d* | -d ) 666b6cee71dSXin LI debug=: ;; 667b6cee71dSXin LI --quiet | --q* | --silent | --s* | -q ) 668b6cee71dSXin LI lt_cl_silent=: ;; 669b6cee71dSXin LI 670b6cee71dSXin LI -*) AC_MSG_ERROR([unrecognized option: $[1] 671d38c30c0SXin LITry '$[0] --help' for more information.]) ;; 672b6cee71dSXin LI 673b6cee71dSXin LI *) AC_MSG_ERROR([unrecognized argument: $[1] 674d38c30c0SXin LITry '$[0] --help' for more information.]) ;; 675b6cee71dSXin LI esac 676b6cee71dSXin LI shift 677b6cee71dSXin LIdone 678b6cee71dSXin LI 679b6cee71dSXin LIif $lt_cl_silent; then 680b6cee71dSXin LI exec AS_MESSAGE_FD>/dev/null 681b6cee71dSXin LIfi 682b6cee71dSXin LI_LTEOF 683b6cee71dSXin LI 684b6cee71dSXin LIcat >>"$CONFIG_LT" <<_LTEOF 685b6cee71dSXin LI_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 686b6cee71dSXin LI_LTEOF 687b6cee71dSXin LI 688b6cee71dSXin LIcat >>"$CONFIG_LT" <<\_LTEOF 689b6cee71dSXin LIAC_MSG_NOTICE([creating $ofile]) 690b6cee71dSXin LI_LT_OUTPUT_LIBTOOL_COMMANDS 691b6cee71dSXin LIAS_EXIT(0) 692b6cee71dSXin LI_LTEOF 693b6cee71dSXin LIchmod +x "$CONFIG_LT" 694b6cee71dSXin LI 695b6cee71dSXin LI# configure is writing to config.log, but config.lt does its own redirection, 696b6cee71dSXin LI# appending to config.log, which fails on DOS, as config.log is still kept 697b6cee71dSXin LI# open by configure. Here we exec the FD to /dev/null, effectively closing 698b6cee71dSXin LI# config.log, so it can be properly (re)opened and appended to by config.lt. 699b6cee71dSXin LIlt_cl_success=: 700d38c30c0SXin LItest yes = "$silent" && 701b6cee71dSXin LI lt_config_lt_args="$lt_config_lt_args --quiet" 702b6cee71dSXin LIexec AS_MESSAGE_LOG_FD>/dev/null 703b6cee71dSXin LI$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 704b6cee71dSXin LIexec AS_MESSAGE_LOG_FD>>config.log 705b6cee71dSXin LI$lt_cl_success || AS_EXIT(1) 706b6cee71dSXin LI])# LT_OUTPUT 707b6cee71dSXin LI 708b6cee71dSXin LI 709b6cee71dSXin LI# _LT_CONFIG(TAG) 710b6cee71dSXin LI# --------------- 711b6cee71dSXin LI# If TAG is the built-in tag, create an initial libtool script with a 712b6cee71dSXin LI# default configuration from the untagged config vars. Otherwise add code 713b6cee71dSXin LI# to config.status for appending the configuration named by TAG from the 714b6cee71dSXin LI# matching tagged config vars. 715b6cee71dSXin LIm4_defun([_LT_CONFIG], 716b6cee71dSXin LI[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 717b6cee71dSXin LI_LT_CONFIG_SAVE_COMMANDS([ 718b6cee71dSXin LI m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 719b6cee71dSXin LI m4_if(_LT_TAG, [C], [ 720d38c30c0SXin LI # See if we are running on zsh, and set the options that allow our 721b6cee71dSXin LI # commands through without removal of \ escapes. 722b6cee71dSXin LI if test -n "${ZSH_VERSION+set}"; then 723b6cee71dSXin LI setopt NO_GLOB_SUBST 724b6cee71dSXin LI fi 725b6cee71dSXin LI 726d38c30c0SXin LI cfgfile=${ofile}T 727b6cee71dSXin LI trap "$RM \"$cfgfile\"; exit 1" 1 2 15 728b6cee71dSXin LI $RM "$cfgfile" 729b6cee71dSXin LI 730b6cee71dSXin LI cat <<_LT_EOF >> "$cfgfile" 731b6cee71dSXin LI#! $SHELL 732d38c30c0SXin LI# Generated automatically by $as_me ($PACKAGE) $VERSION 733b6cee71dSXin LI# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 734b6cee71dSXin LI# NOTE: Changes made to this file will be lost: look at ltmain.sh. 735d38c30c0SXin LI 736d38c30c0SXin LI# Provide generalized library-building support services. 737d38c30c0SXin LI# Written by Gordon Matzigkeit, 1996 738d38c30c0SXin LI 739b6cee71dSXin LI_LT_COPYING 740b6cee71dSXin LI_LT_LIBTOOL_TAGS 741b6cee71dSXin LI 742d38c30c0SXin LI# Configured defaults for sys_lib_dlsearch_path munging. 743d38c30c0SXin LI: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 744d38c30c0SXin LI 745b6cee71dSXin LI# ### BEGIN LIBTOOL CONFIG 746b6cee71dSXin LI_LT_LIBTOOL_CONFIG_VARS 747b6cee71dSXin LI_LT_LIBTOOL_TAG_VARS 748b6cee71dSXin LI# ### END LIBTOOL CONFIG 749b6cee71dSXin LI 750b6cee71dSXin LI_LT_EOF 751b6cee71dSXin LI 752d38c30c0SXin LI cat <<'_LT_EOF' >> "$cfgfile" 753d38c30c0SXin LI 754d38c30c0SXin LI# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 755d38c30c0SXin LI 756d38c30c0SXin LI_LT_PREPARE_MUNGE_PATH_LIST 757d38c30c0SXin LI_LT_PREPARE_CC_BASENAME 758d38c30c0SXin LI 759d38c30c0SXin LI# ### END FUNCTIONS SHARED WITH CONFIGURE 760d38c30c0SXin LI 761d38c30c0SXin LI_LT_EOF 762d38c30c0SXin LI 763b6cee71dSXin LI case $host_os in 764b6cee71dSXin LI aix3*) 765b6cee71dSXin LI cat <<\_LT_EOF >> "$cfgfile" 766b6cee71dSXin LI# AIX sometimes has problems with the GCC collect2 program. For some 767b6cee71dSXin LI# reason, if we set the COLLECT_NAMES environment variable, the problems 768b6cee71dSXin LI# vanish in a puff of smoke. 769d38c30c0SXin LIif test set != "${COLLECT_NAMES+set}"; then 770b6cee71dSXin LI COLLECT_NAMES= 771b6cee71dSXin LI export COLLECT_NAMES 772b6cee71dSXin LIfi 773b6cee71dSXin LI_LT_EOF 774b6cee71dSXin LI ;; 775b6cee71dSXin LI esac 776b6cee71dSXin LI 777b6cee71dSXin LI _LT_PROG_LTMAIN 778b6cee71dSXin LI 779b6cee71dSXin LI # We use sed instead of cat because bash on DJGPP gets confused if 780b6cee71dSXin LI # if finds mixed CR/LF and LF-only lines. Since sed operates in 781b6cee71dSXin LI # text mode, it properly converts lines to CR/LF. This bash problem 782b6cee71dSXin LI # is reportedly fixed, but why not run on old versions too? 783*ae316d1dSXin LI $SED '$q' "$ltmain" >> "$cfgfile" \ 784b6cee71dSXin LI || (rm -f "$cfgfile"; exit 1) 785b6cee71dSXin LI 786b6cee71dSXin LI mv -f "$cfgfile" "$ofile" || 787b6cee71dSXin LI (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 788b6cee71dSXin LI chmod +x "$ofile" 789b6cee71dSXin LI], 790b6cee71dSXin LI[cat <<_LT_EOF >> "$ofile" 791b6cee71dSXin LI 792b6cee71dSXin LIdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 793b6cee71dSXin LIdnl in a comment (ie after a #). 794b6cee71dSXin LI# ### BEGIN LIBTOOL TAG CONFIG: $1 795b6cee71dSXin LI_LT_LIBTOOL_TAG_VARS(_LT_TAG) 796b6cee71dSXin LI# ### END LIBTOOL TAG CONFIG: $1 797b6cee71dSXin LI_LT_EOF 798b6cee71dSXin LI])dnl /m4_if 799b6cee71dSXin LI], 800b6cee71dSXin LI[m4_if([$1], [], [ 801b6cee71dSXin LI PACKAGE='$PACKAGE' 802b6cee71dSXin LI VERSION='$VERSION' 803b6cee71dSXin LI RM='$RM' 804b6cee71dSXin LI ofile='$ofile'], []) 805b6cee71dSXin LI])dnl /_LT_CONFIG_SAVE_COMMANDS 806b6cee71dSXin LI])# _LT_CONFIG 807b6cee71dSXin LI 808b6cee71dSXin LI 809b6cee71dSXin LI# LT_SUPPORTED_TAG(TAG) 810b6cee71dSXin LI# --------------------- 811b6cee71dSXin LI# Trace this macro to discover what tags are supported by the libtool 812b6cee71dSXin LI# --tag option, using: 813b6cee71dSXin LI# autoconf --trace 'LT_SUPPORTED_TAG:$1' 814b6cee71dSXin LIAC_DEFUN([LT_SUPPORTED_TAG], []) 815b6cee71dSXin LI 816b6cee71dSXin LI 817b6cee71dSXin LI# C support is built-in for now 818b6cee71dSXin LIm4_define([_LT_LANG_C_enabled], []) 819b6cee71dSXin LIm4_define([_LT_TAGS], []) 820b6cee71dSXin LI 821b6cee71dSXin LI 822b6cee71dSXin LI# LT_LANG(LANG) 823b6cee71dSXin LI# ------------- 824b6cee71dSXin LI# Enable libtool support for the given language if not already enabled. 825b6cee71dSXin LIAC_DEFUN([LT_LANG], 826b6cee71dSXin LI[AC_BEFORE([$0], [LT_OUTPUT])dnl 827b6cee71dSXin LIm4_case([$1], 828b6cee71dSXin LI [C], [_LT_LANG(C)], 829b6cee71dSXin LI [C++], [_LT_LANG(CXX)], 830b6cee71dSXin LI [Go], [_LT_LANG(GO)], 831b6cee71dSXin LI [Java], [_LT_LANG(GCJ)], 832b6cee71dSXin LI [Fortran 77], [_LT_LANG(F77)], 833b6cee71dSXin LI [Fortran], [_LT_LANG(FC)], 834b6cee71dSXin LI [Windows Resource], [_LT_LANG(RC)], 835b6cee71dSXin LI [m4_ifdef([_LT_LANG_]$1[_CONFIG], 836b6cee71dSXin LI [_LT_LANG($1)], 837b6cee71dSXin LI [m4_fatal([$0: unsupported language: "$1"])])])dnl 838b6cee71dSXin LI])# LT_LANG 839b6cee71dSXin LI 840b6cee71dSXin LI 841b6cee71dSXin LI# _LT_LANG(LANGNAME) 842b6cee71dSXin LI# ------------------ 843b6cee71dSXin LIm4_defun([_LT_LANG], 844b6cee71dSXin LI[m4_ifdef([_LT_LANG_]$1[_enabled], [], 845b6cee71dSXin LI [LT_SUPPORTED_TAG([$1])dnl 846b6cee71dSXin LI m4_append([_LT_TAGS], [$1 ])dnl 847b6cee71dSXin LI m4_define([_LT_LANG_]$1[_enabled], [])dnl 848b6cee71dSXin LI _LT_LANG_$1_CONFIG($1)])dnl 849b6cee71dSXin LI])# _LT_LANG 850b6cee71dSXin LI 851b6cee71dSXin LI 852b6cee71dSXin LIm4_ifndef([AC_PROG_GO], [ 853b6cee71dSXin LI############################################################ 854b6cee71dSXin LI# NOTE: This macro has been submitted for inclusion into # 855b6cee71dSXin LI# GNU Autoconf as AC_PROG_GO. When it is available in # 856b6cee71dSXin LI# a released version of Autoconf we should remove this # 857b6cee71dSXin LI# macro and use it instead. # 858b6cee71dSXin LI############################################################ 859b6cee71dSXin LIm4_defun([AC_PROG_GO], 860b6cee71dSXin LI[AC_LANG_PUSH(Go)dnl 861b6cee71dSXin LIAC_ARG_VAR([GOC], [Go compiler command])dnl 862b6cee71dSXin LIAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 863b6cee71dSXin LI_AC_ARG_VAR_LDFLAGS()dnl 864b6cee71dSXin LIAC_CHECK_TOOL(GOC, gccgo) 865b6cee71dSXin LIif test -z "$GOC"; then 866b6cee71dSXin LI if test -n "$ac_tool_prefix"; then 867b6cee71dSXin LI AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 868b6cee71dSXin LI fi 869b6cee71dSXin LIfi 870b6cee71dSXin LIif test -z "$GOC"; then 871b6cee71dSXin LI AC_CHECK_PROG(GOC, gccgo, gccgo, false) 872b6cee71dSXin LIfi 873b6cee71dSXin LI])#m4_defun 874b6cee71dSXin LI])#m4_ifndef 875b6cee71dSXin LI 876b6cee71dSXin LI 877b6cee71dSXin LI# _LT_LANG_DEFAULT_CONFIG 878b6cee71dSXin LI# ----------------------- 879b6cee71dSXin LIm4_defun([_LT_LANG_DEFAULT_CONFIG], 880b6cee71dSXin LI[AC_PROVIDE_IFELSE([AC_PROG_CXX], 881b6cee71dSXin LI [LT_LANG(CXX)], 882b6cee71dSXin LI [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 883b6cee71dSXin LI 884b6cee71dSXin LIAC_PROVIDE_IFELSE([AC_PROG_F77], 885b6cee71dSXin LI [LT_LANG(F77)], 886b6cee71dSXin LI [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 887b6cee71dSXin LI 888b6cee71dSXin LIAC_PROVIDE_IFELSE([AC_PROG_FC], 889b6cee71dSXin LI [LT_LANG(FC)], 890b6cee71dSXin LI [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 891b6cee71dSXin LI 892b6cee71dSXin LIdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 893b6cee71dSXin LIdnl pulling things in needlessly. 894b6cee71dSXin LIAC_PROVIDE_IFELSE([AC_PROG_GCJ], 895b6cee71dSXin LI [LT_LANG(GCJ)], 896b6cee71dSXin LI [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 897b6cee71dSXin LI [LT_LANG(GCJ)], 898b6cee71dSXin LI [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 899b6cee71dSXin LI [LT_LANG(GCJ)], 900b6cee71dSXin LI [m4_ifdef([AC_PROG_GCJ], 901b6cee71dSXin LI [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 902b6cee71dSXin LI m4_ifdef([A][M_PROG_GCJ], 903b6cee71dSXin LI [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 904b6cee71dSXin LI m4_ifdef([LT_PROG_GCJ], 905b6cee71dSXin LI [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 906b6cee71dSXin LI 907b6cee71dSXin LIAC_PROVIDE_IFELSE([AC_PROG_GO], 908b6cee71dSXin LI [LT_LANG(GO)], 909b6cee71dSXin LI [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 910b6cee71dSXin LI 911b6cee71dSXin LIAC_PROVIDE_IFELSE([LT_PROG_RC], 912b6cee71dSXin LI [LT_LANG(RC)], 913b6cee71dSXin LI [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 914b6cee71dSXin LI])# _LT_LANG_DEFAULT_CONFIG 915b6cee71dSXin LI 916b6cee71dSXin LI# Obsolete macros: 917b6cee71dSXin LIAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 918b6cee71dSXin LIAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 919b6cee71dSXin LIAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 920b6cee71dSXin LIAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 921b6cee71dSXin LIAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 922b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 923b6cee71dSXin LIdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 924b6cee71dSXin LIdnl AC_DEFUN([AC_LIBTOOL_F77], []) 925b6cee71dSXin LIdnl AC_DEFUN([AC_LIBTOOL_FC], []) 926b6cee71dSXin LIdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 927b6cee71dSXin LIdnl AC_DEFUN([AC_LIBTOOL_RC], []) 928b6cee71dSXin LI 929b6cee71dSXin LI 930b6cee71dSXin LI# _LT_TAG_COMPILER 931b6cee71dSXin LI# ---------------- 932b6cee71dSXin LIm4_defun([_LT_TAG_COMPILER], 933b6cee71dSXin LI[AC_REQUIRE([AC_PROG_CC])dnl 934b6cee71dSXin LI 935b6cee71dSXin LI_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 936b6cee71dSXin LI_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 937b6cee71dSXin LI_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 938b6cee71dSXin LI_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 939b6cee71dSXin LI 940b6cee71dSXin LI# If no C compiler was specified, use CC. 941b6cee71dSXin LILTCC=${LTCC-"$CC"} 942b6cee71dSXin LI 943b6cee71dSXin LI# If no C compiler flags were specified, use CFLAGS. 944b6cee71dSXin LILTCFLAGS=${LTCFLAGS-"$CFLAGS"} 945b6cee71dSXin LI 946b6cee71dSXin LI# Allow CC to be a program name with arguments. 947b6cee71dSXin LIcompiler=$CC 948b6cee71dSXin LI])# _LT_TAG_COMPILER 949b6cee71dSXin LI 950b6cee71dSXin LI 951b6cee71dSXin LI# _LT_COMPILER_BOILERPLATE 952b6cee71dSXin LI# ------------------------ 953b6cee71dSXin LI# Check for compiler boilerplate output or warnings with 954b6cee71dSXin LI# the simple compiler test code. 955b6cee71dSXin LIm4_defun([_LT_COMPILER_BOILERPLATE], 956b6cee71dSXin LI[m4_require([_LT_DECL_SED])dnl 957b6cee71dSXin LIac_outfile=conftest.$ac_objext 958b6cee71dSXin LIecho "$lt_simple_compile_test_code" >conftest.$ac_ext 959b6cee71dSXin LIeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 960b6cee71dSXin LI_lt_compiler_boilerplate=`cat conftest.err` 961b6cee71dSXin LI$RM conftest* 962b6cee71dSXin LI])# _LT_COMPILER_BOILERPLATE 963b6cee71dSXin LI 964b6cee71dSXin LI 965b6cee71dSXin LI# _LT_LINKER_BOILERPLATE 966b6cee71dSXin LI# ---------------------- 967b6cee71dSXin LI# Check for linker boilerplate output or warnings with 968b6cee71dSXin LI# the simple link test code. 969b6cee71dSXin LIm4_defun([_LT_LINKER_BOILERPLATE], 970b6cee71dSXin LI[m4_require([_LT_DECL_SED])dnl 971b6cee71dSXin LIac_outfile=conftest.$ac_objext 972b6cee71dSXin LIecho "$lt_simple_link_test_code" >conftest.$ac_ext 973b6cee71dSXin LIeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 974b6cee71dSXin LI_lt_linker_boilerplate=`cat conftest.err` 975b6cee71dSXin LI$RM -r conftest* 976b6cee71dSXin LI])# _LT_LINKER_BOILERPLATE 977b6cee71dSXin LI 978b6cee71dSXin LI# _LT_REQUIRED_DARWIN_CHECKS 979b6cee71dSXin LI# ------------------------- 980b6cee71dSXin LIm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 981b6cee71dSXin LI case $host_os in 982b6cee71dSXin LI rhapsody* | darwin*) 983b6cee71dSXin LI AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 984b6cee71dSXin LI AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 985b6cee71dSXin LI AC_CHECK_TOOL([LIPO], [lipo], [:]) 986b6cee71dSXin LI AC_CHECK_TOOL([OTOOL], [otool], [:]) 987b6cee71dSXin LI AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 988b6cee71dSXin LI _LT_DECL([], [DSYMUTIL], [1], 989b6cee71dSXin LI [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 990b6cee71dSXin LI _LT_DECL([], [NMEDIT], [1], 991b6cee71dSXin LI [Tool to change global to local symbols on Mac OS X]) 992b6cee71dSXin LI _LT_DECL([], [LIPO], [1], 993b6cee71dSXin LI [Tool to manipulate fat objects and archives on Mac OS X]) 994b6cee71dSXin LI _LT_DECL([], [OTOOL], [1], 995b6cee71dSXin LI [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 996b6cee71dSXin LI _LT_DECL([], [OTOOL64], [1], 997b6cee71dSXin LI [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 998b6cee71dSXin LI 999b6cee71dSXin LI AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1000b6cee71dSXin LI [lt_cv_apple_cc_single_mod=no 1001d38c30c0SXin LI if test -z "$LT_MULTI_MODULE"; then 1002b6cee71dSXin LI # By default we will add the -single_module flag. You can override 1003b6cee71dSXin LI # by either setting the environment variable LT_MULTI_MODULE 1004b6cee71dSXin LI # non-empty at configure time, or by adding -multi_module to the 1005b6cee71dSXin LI # link flags. 1006b6cee71dSXin LI rm -rf libconftest.dylib* 1007b6cee71dSXin LI echo "int foo(void){return 1;}" > conftest.c 1008b6cee71dSXin LI echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1009b6cee71dSXin LI-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1010b6cee71dSXin LI $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1011b6cee71dSXin LI -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1012b6cee71dSXin LI _lt_result=$? 1013b6cee71dSXin LI # If there is a non-empty error log, and "single_module" 1014b6cee71dSXin LI # appears in it, assume the flag caused a linker warning 1015b6cee71dSXin LI if test -s conftest.err && $GREP single_module conftest.err; then 1016b6cee71dSXin LI cat conftest.err >&AS_MESSAGE_LOG_FD 1017b6cee71dSXin LI # Otherwise, if the output was created with a 0 exit code from 1018b6cee71dSXin LI # the compiler, it worked. 1019d38c30c0SXin LI elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1020b6cee71dSXin LI lt_cv_apple_cc_single_mod=yes 1021b6cee71dSXin LI else 1022b6cee71dSXin LI cat conftest.err >&AS_MESSAGE_LOG_FD 1023b6cee71dSXin LI fi 1024b6cee71dSXin LI rm -rf libconftest.dylib* 1025b6cee71dSXin LI rm -f conftest.* 1026b6cee71dSXin LI fi]) 1027b6cee71dSXin LI 1028b6cee71dSXin LI AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1029b6cee71dSXin LI [lt_cv_ld_exported_symbols_list], 1030b6cee71dSXin LI [lt_cv_ld_exported_symbols_list=no 1031b6cee71dSXin LI save_LDFLAGS=$LDFLAGS 1032b6cee71dSXin LI echo "_main" > conftest.sym 1033b6cee71dSXin LI LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1034b6cee71dSXin LI AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1035b6cee71dSXin LI [lt_cv_ld_exported_symbols_list=yes], 1036b6cee71dSXin LI [lt_cv_ld_exported_symbols_list=no]) 1037d38c30c0SXin LI LDFLAGS=$save_LDFLAGS 1038b6cee71dSXin LI ]) 1039b6cee71dSXin LI 1040b6cee71dSXin LI AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1041b6cee71dSXin LI [lt_cv_ld_force_load=no 1042b6cee71dSXin LI cat > conftest.c << _LT_EOF 1043b6cee71dSXin LIint forced_loaded() { return 2;} 1044b6cee71dSXin LI_LT_EOF 1045b6cee71dSXin LI echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1046b6cee71dSXin LI $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1047*ae316d1dSXin LI echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1048*ae316d1dSXin LI $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1049b6cee71dSXin LI echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1050b6cee71dSXin LI $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1051b6cee71dSXin LI cat > conftest.c << _LT_EOF 1052b6cee71dSXin LIint main() { return 0;} 1053b6cee71dSXin LI_LT_EOF 1054b6cee71dSXin LI echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1055b6cee71dSXin LI $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1056b6cee71dSXin LI _lt_result=$? 1057b6cee71dSXin LI if test -s conftest.err && $GREP force_load conftest.err; then 1058b6cee71dSXin LI cat conftest.err >&AS_MESSAGE_LOG_FD 1059d38c30c0SXin LI elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1060b6cee71dSXin LI lt_cv_ld_force_load=yes 1061b6cee71dSXin LI else 1062b6cee71dSXin LI cat conftest.err >&AS_MESSAGE_LOG_FD 1063b6cee71dSXin LI fi 1064b6cee71dSXin LI rm -f conftest.err libconftest.a conftest conftest.c 1065b6cee71dSXin LI rm -rf conftest.dSYM 1066b6cee71dSXin LI ]) 1067b6cee71dSXin LI case $host_os in 1068b6cee71dSXin LI rhapsody* | darwin1.[[012]]) 1069d38c30c0SXin LI _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1070b6cee71dSXin LI darwin1.*) 1071d38c30c0SXin LI _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1072*ae316d1dSXin LI darwin*) 1073*ae316d1dSXin LI case $MACOSX_DEPLOYMENT_TARGET,$host in 1074*ae316d1dSXin LI 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 1075d38c30c0SXin LI _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1076*ae316d1dSXin LI *) 1077d38c30c0SXin LI _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1078b6cee71dSXin LI esac 1079b6cee71dSXin LI ;; 1080b6cee71dSXin LI esac 1081d38c30c0SXin LI if test yes = "$lt_cv_apple_cc_single_mod"; then 1082b6cee71dSXin LI _lt_dar_single_mod='$single_module' 1083b6cee71dSXin LI fi 1084d38c30c0SXin LI if test yes = "$lt_cv_ld_exported_symbols_list"; then 1085d38c30c0SXin LI _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1086b6cee71dSXin LI else 1087d38c30c0SXin LI _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1088b6cee71dSXin LI fi 1089d38c30c0SXin LI if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1090b6cee71dSXin LI _lt_dsymutil='~$DSYMUTIL $lib || :' 1091b6cee71dSXin LI else 1092b6cee71dSXin LI _lt_dsymutil= 1093b6cee71dSXin LI fi 1094b6cee71dSXin LI ;; 1095b6cee71dSXin LI esac 1096b6cee71dSXin LI]) 1097b6cee71dSXin LI 1098b6cee71dSXin LI 1099b6cee71dSXin LI# _LT_DARWIN_LINKER_FEATURES([TAG]) 1100b6cee71dSXin LI# --------------------------------- 1101b6cee71dSXin LI# Checks for linker and compiler features on darwin 1102b6cee71dSXin LIm4_defun([_LT_DARWIN_LINKER_FEATURES], 1103b6cee71dSXin LI[ 1104b6cee71dSXin LI m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1105b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1106b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=no 1107b6cee71dSXin LI _LT_TAGVAR(hardcode_automatic, $1)=yes 1108b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1109d38c30c0SXin LI if test yes = "$lt_cv_ld_force_load"; then 1110d38c30c0SXin 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\"`' 1111b6cee71dSXin LI m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1112b6cee71dSXin LI [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1113b6cee71dSXin LI else 1114b6cee71dSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1115b6cee71dSXin LI fi 1116b6cee71dSXin LI _LT_TAGVAR(link_all_deplibs, $1)=yes 1117d38c30c0SXin LI _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1118b6cee71dSXin LI case $cc_basename in 1119d38c30c0SXin LI ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1120b6cee71dSXin LI *) _lt_dar_can_shared=$GCC ;; 1121b6cee71dSXin LI esac 1122d38c30c0SXin LI if test yes = "$_lt_dar_can_shared"; then 1123b6cee71dSXin LI output_verbose_link_cmd=func_echo_all 1124d38c30c0SXin 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" 1125d38c30c0SXin LI _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1126*ae316d1dSXin 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" 1127*ae316d1dSXin 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" 1128b6cee71dSXin LI m4_if([$1], [CXX], 1129d38c30c0SXin LI[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1130d38c30c0SXin 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" 1131*ae316d1dSXin 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" 1132b6cee71dSXin LI fi 1133b6cee71dSXin LI],[]) 1134b6cee71dSXin LI else 1135b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 1136b6cee71dSXin LI fi 1137b6cee71dSXin LI]) 1138b6cee71dSXin LI 1139b6cee71dSXin LI# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1140b6cee71dSXin LI# ---------------------------------- 1141b6cee71dSXin LI# Links a minimal program and checks the executable 1142b6cee71dSXin LI# for the system default hardcoded library path. In most cases, 1143b6cee71dSXin LI# this is /usr/lib:/lib, but when the MPI compilers are used 1144b6cee71dSXin LI# the location of the communication and MPI libs are included too. 1145b6cee71dSXin LI# If we don't find anything, use the default library path according 1146b6cee71dSXin LI# to the aix ld manual. 1147b6cee71dSXin LI# Store the results from the different compilers for each TAGNAME. 1148b6cee71dSXin LI# Allow to override them for all tags through lt_cv_aix_libpath. 1149b6cee71dSXin LIm4_defun([_LT_SYS_MODULE_PATH_AIX], 1150b6cee71dSXin LI[m4_require([_LT_DECL_SED])dnl 1151d38c30c0SXin LIif test set = "${lt_cv_aix_libpath+set}"; then 1152b6cee71dSXin LI aix_libpath=$lt_cv_aix_libpath 1153b6cee71dSXin LIelse 1154b6cee71dSXin LI AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1155b6cee71dSXin LI [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1156b6cee71dSXin LI lt_aix_libpath_sed='[ 1157b6cee71dSXin LI /Import File Strings/,/^$/ { 1158b6cee71dSXin LI /^0/ { 1159b6cee71dSXin LI s/^0 *\([^ ]*\) *$/\1/ 1160b6cee71dSXin LI p 1161b6cee71dSXin LI } 1162b6cee71dSXin LI }]' 1163b6cee71dSXin LI _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1164b6cee71dSXin LI # Check for a 64-bit object if we didn't find anything. 1165b6cee71dSXin LI if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1166b6cee71dSXin LI _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1167b6cee71dSXin LI fi],[]) 1168b6cee71dSXin LI if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1169d38c30c0SXin LI _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1170b6cee71dSXin LI fi 1171b6cee71dSXin LI ]) 1172b6cee71dSXin LI aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1173b6cee71dSXin LIfi 1174b6cee71dSXin LI])# _LT_SYS_MODULE_PATH_AIX 1175b6cee71dSXin LI 1176b6cee71dSXin LI 1177b6cee71dSXin LI# _LT_SHELL_INIT(ARG) 1178b6cee71dSXin LI# ------------------- 1179b6cee71dSXin LIm4_define([_LT_SHELL_INIT], 1180b6cee71dSXin LI[m4_divert_text([M4SH-INIT], [$1 1181b6cee71dSXin LI])])# _LT_SHELL_INIT 1182b6cee71dSXin LI 1183b6cee71dSXin LI 1184b6cee71dSXin LI 1185b6cee71dSXin LI# _LT_PROG_ECHO_BACKSLASH 1186b6cee71dSXin LI# ----------------------- 1187b6cee71dSXin LI# Find how we can fake an echo command that does not interpret backslash. 1188b6cee71dSXin LI# In particular, with Autoconf 2.60 or later we add some code to the start 1189d38c30c0SXin LI# of the generated configure script that will find a shell with a builtin 1190d38c30c0SXin LI# printf (that we can use as an echo command). 1191b6cee71dSXin LIm4_defun([_LT_PROG_ECHO_BACKSLASH], 1192b6cee71dSXin LI[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1193b6cee71dSXin LIECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1194b6cee71dSXin LIECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1195b6cee71dSXin LI 1196b6cee71dSXin LIAC_MSG_CHECKING([how to print strings]) 1197b6cee71dSXin LI# Test print first, because it will be a builtin if present. 1198b6cee71dSXin LIif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1199b6cee71dSXin LI test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1200b6cee71dSXin LI ECHO='print -r --' 1201b6cee71dSXin LIelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1202b6cee71dSXin LI ECHO='printf %s\n' 1203b6cee71dSXin LIelse 1204b6cee71dSXin LI # Use this function as a fallback that always works. 1205b6cee71dSXin LI func_fallback_echo () 1206b6cee71dSXin LI { 1207b6cee71dSXin LI eval 'cat <<_LTECHO_EOF 1208b6cee71dSXin LI$[]1 1209b6cee71dSXin LI_LTECHO_EOF' 1210b6cee71dSXin LI } 1211b6cee71dSXin LI ECHO='func_fallback_echo' 1212b6cee71dSXin LIfi 1213b6cee71dSXin LI 1214b6cee71dSXin LI# func_echo_all arg... 1215b6cee71dSXin LI# Invoke $ECHO with all args, space-separated. 1216b6cee71dSXin LIfunc_echo_all () 1217b6cee71dSXin LI{ 1218b6cee71dSXin LI $ECHO "$*" 1219b6cee71dSXin LI} 1220b6cee71dSXin LI 1221d38c30c0SXin LIcase $ECHO in 1222b6cee71dSXin LI printf*) AC_MSG_RESULT([printf]) ;; 1223b6cee71dSXin LI print*) AC_MSG_RESULT([print -r]) ;; 1224b6cee71dSXin LI *) AC_MSG_RESULT([cat]) ;; 1225b6cee71dSXin LIesac 1226b6cee71dSXin LI 1227b6cee71dSXin LIm4_ifdef([_AS_DETECT_SUGGESTED], 1228b6cee71dSXin LI[_AS_DETECT_SUGGESTED([ 1229b6cee71dSXin LI test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1230b6cee71dSXin LI ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1231b6cee71dSXin LI ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1232b6cee71dSXin LI ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1233b6cee71dSXin LI PATH=/empty FPATH=/empty; export PATH FPATH 1234b6cee71dSXin LI test "X`printf %s $ECHO`" = "X$ECHO" \ 1235b6cee71dSXin LI || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1236b6cee71dSXin LI 1237b6cee71dSXin LI_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1238b6cee71dSXin LI_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1239b6cee71dSXin LI])# _LT_PROG_ECHO_BACKSLASH 1240b6cee71dSXin LI 1241b6cee71dSXin LI 1242b6cee71dSXin LI# _LT_WITH_SYSROOT 1243b6cee71dSXin LI# ---------------- 1244b6cee71dSXin LIAC_DEFUN([_LT_WITH_SYSROOT], 1245*ae316d1dSXin LI[m4_require([_LT_DECL_SED])dnl 1246*ae316d1dSXin LIAC_MSG_CHECKING([for sysroot]) 1247b6cee71dSXin LIAC_ARG_WITH([sysroot], 1248d38c30c0SXin LI[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1249d38c30c0SXin LI [Search for dependent libraries within DIR (or the compiler's sysroot 1250d38c30c0SXin LI if not specified).])], 1251b6cee71dSXin LI[], [with_sysroot=no]) 1252b6cee71dSXin LI 1253b6cee71dSXin LIdnl lt_sysroot will always be passed unquoted. We quote it here 1254b6cee71dSXin LIdnl in case the user passed a directory name. 1255b6cee71dSXin LIlt_sysroot= 1256d38c30c0SXin LIcase $with_sysroot in #( 1257b6cee71dSXin LI yes) 1258d38c30c0SXin LI if test yes = "$GCC"; then 1259b6cee71dSXin LI lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1260b6cee71dSXin LI fi 1261b6cee71dSXin LI ;; #( 1262b6cee71dSXin LI /*) 1263*ae316d1dSXin LI lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 1264b6cee71dSXin LI ;; #( 1265b6cee71dSXin LI no|'') 1266b6cee71dSXin LI ;; #( 1267b6cee71dSXin LI *) 1268d38c30c0SXin LI AC_MSG_RESULT([$with_sysroot]) 1269b6cee71dSXin LI AC_MSG_ERROR([The sysroot must be an absolute path.]) 1270b6cee71dSXin LI ;; 1271b6cee71dSXin LIesac 1272b6cee71dSXin LI 1273b6cee71dSXin LI AC_MSG_RESULT([${lt_sysroot:-no}]) 1274b6cee71dSXin LI_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1275d38c30c0SXin LI[dependent libraries, and where our libraries should be installed.])]) 1276b6cee71dSXin LI 1277b6cee71dSXin LI# _LT_ENABLE_LOCK 1278b6cee71dSXin LI# --------------- 1279b6cee71dSXin LIm4_defun([_LT_ENABLE_LOCK], 1280b6cee71dSXin LI[AC_ARG_ENABLE([libtool-lock], 1281b6cee71dSXin LI [AS_HELP_STRING([--disable-libtool-lock], 1282b6cee71dSXin LI [avoid locking (might break parallel builds)])]) 1283d38c30c0SXin LItest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1284b6cee71dSXin LI 1285b6cee71dSXin LI# Some flags need to be propagated to the compiler or linker for good 1286b6cee71dSXin LI# libtool support. 1287b6cee71dSXin LIcase $host in 1288b6cee71dSXin LIia64-*-hpux*) 1289d38c30c0SXin LI # Find out what ABI is being produced by ac_compile, and set mode 1290d38c30c0SXin LI # options accordingly. 1291b6cee71dSXin LI echo 'int i;' > conftest.$ac_ext 1292b6cee71dSXin LI if AC_TRY_EVAL(ac_compile); then 1293*ae316d1dSXin LI case `$FILECMD conftest.$ac_objext` in 1294b6cee71dSXin LI *ELF-32*) 1295d38c30c0SXin LI HPUX_IA64_MODE=32 1296b6cee71dSXin LI ;; 1297b6cee71dSXin LI *ELF-64*) 1298d38c30c0SXin LI HPUX_IA64_MODE=64 1299b6cee71dSXin LI ;; 1300b6cee71dSXin LI esac 1301b6cee71dSXin LI fi 1302b6cee71dSXin LI rm -rf conftest* 1303b6cee71dSXin LI ;; 1304b6cee71dSXin LI*-*-irix6*) 1305d38c30c0SXin LI # Find out what ABI is being produced by ac_compile, and set linker 1306d38c30c0SXin LI # options accordingly. 1307b6cee71dSXin LI echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1308b6cee71dSXin LI if AC_TRY_EVAL(ac_compile); then 1309d38c30c0SXin LI if test yes = "$lt_cv_prog_gnu_ld"; then 1310*ae316d1dSXin LI case `$FILECMD conftest.$ac_objext` in 1311b6cee71dSXin LI *32-bit*) 1312b6cee71dSXin LI LD="${LD-ld} -melf32bsmip" 1313b6cee71dSXin LI ;; 1314b6cee71dSXin LI *N32*) 1315b6cee71dSXin LI LD="${LD-ld} -melf32bmipn32" 1316b6cee71dSXin LI ;; 1317b6cee71dSXin LI *64-bit*) 1318b6cee71dSXin LI LD="${LD-ld} -melf64bmip" 1319b6cee71dSXin LI ;; 1320b6cee71dSXin LI esac 1321b6cee71dSXin LI else 1322*ae316d1dSXin LI case `$FILECMD conftest.$ac_objext` in 1323b6cee71dSXin LI *32-bit*) 1324b6cee71dSXin LI LD="${LD-ld} -32" 1325b6cee71dSXin LI ;; 1326b6cee71dSXin LI *N32*) 1327b6cee71dSXin LI LD="${LD-ld} -n32" 1328b6cee71dSXin LI ;; 1329b6cee71dSXin LI *64-bit*) 1330b6cee71dSXin LI LD="${LD-ld} -64" 1331b6cee71dSXin LI ;; 1332b6cee71dSXin LI esac 1333b6cee71dSXin LI fi 1334b6cee71dSXin LI fi 1335b6cee71dSXin LI rm -rf conftest* 1336b6cee71dSXin LI ;; 1337b6cee71dSXin LI 1338d38c30c0SXin LImips64*-*linux*) 1339d38c30c0SXin LI # Find out what ABI is being produced by ac_compile, and set linker 1340d38c30c0SXin LI # options accordingly. 1341d38c30c0SXin LI echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1342d38c30c0SXin LI if AC_TRY_EVAL(ac_compile); then 1343d38c30c0SXin LI emul=elf 1344*ae316d1dSXin LI case `$FILECMD conftest.$ac_objext` in 1345d38c30c0SXin LI *32-bit*) 1346d38c30c0SXin LI emul="${emul}32" 1347d38c30c0SXin LI ;; 1348d38c30c0SXin LI *64-bit*) 1349d38c30c0SXin LI emul="${emul}64" 1350d38c30c0SXin LI ;; 1351d38c30c0SXin LI esac 1352*ae316d1dSXin LI case `$FILECMD conftest.$ac_objext` in 1353d38c30c0SXin LI *MSB*) 1354d38c30c0SXin LI emul="${emul}btsmip" 1355d38c30c0SXin LI ;; 1356d38c30c0SXin LI *LSB*) 1357d38c30c0SXin LI emul="${emul}ltsmip" 1358d38c30c0SXin LI ;; 1359d38c30c0SXin LI esac 1360*ae316d1dSXin LI case `$FILECMD conftest.$ac_objext` in 1361d38c30c0SXin LI *N32*) 1362d38c30c0SXin LI emul="${emul}n32" 1363d38c30c0SXin LI ;; 1364d38c30c0SXin LI esac 1365d38c30c0SXin LI LD="${LD-ld} -m $emul" 1366d38c30c0SXin LI fi 1367d38c30c0SXin LI rm -rf conftest* 1368d38c30c0SXin LI ;; 1369d38c30c0SXin LI 1370d38c30c0SXin LIx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1371b6cee71dSXin LIs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1372d38c30c0SXin LI # Find out what ABI is being produced by ac_compile, and set linker 1373d38c30c0SXin LI # options accordingly. Note that the listed cases only cover the 1374d38c30c0SXin LI # situations where additional linker options are needed (such as when 1375d38c30c0SXin LI # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1376d38c30c0SXin LI # vice versa); the common cases where no linker options are needed do 1377d38c30c0SXin LI # not appear in the list. 1378b6cee71dSXin LI echo 'int i;' > conftest.$ac_ext 1379b6cee71dSXin LI if AC_TRY_EVAL(ac_compile); then 1380*ae316d1dSXin LI case `$FILECMD conftest.o` in 1381b6cee71dSXin LI *32-bit*) 1382b6cee71dSXin LI case $host in 1383b6cee71dSXin LI x86_64-*kfreebsd*-gnu) 1384b6cee71dSXin LI LD="${LD-ld} -m elf_i386_fbsd" 1385b6cee71dSXin LI ;; 1386b6cee71dSXin LI x86_64-*linux*) 1387*ae316d1dSXin LI case `$FILECMD conftest.o` in 1388d38c30c0SXin LI *x86-64*) 1389d38c30c0SXin LI LD="${LD-ld} -m elf32_x86_64" 1390d38c30c0SXin LI ;; 1391d38c30c0SXin LI *) 1392b6cee71dSXin LI LD="${LD-ld} -m elf_i386" 1393b6cee71dSXin LI ;; 1394d38c30c0SXin LI esac 1395d38c30c0SXin LI ;; 1396d38c30c0SXin LI powerpc64le-*linux*) 1397d38c30c0SXin LI LD="${LD-ld} -m elf32lppclinux" 1398d38c30c0SXin LI ;; 1399d38c30c0SXin LI powerpc64-*linux*) 1400b6cee71dSXin LI LD="${LD-ld} -m elf32ppclinux" 1401b6cee71dSXin LI ;; 1402b6cee71dSXin LI s390x-*linux*) 1403b6cee71dSXin LI LD="${LD-ld} -m elf_s390" 1404b6cee71dSXin LI ;; 1405b6cee71dSXin LI sparc64-*linux*) 1406b6cee71dSXin LI LD="${LD-ld} -m elf32_sparc" 1407b6cee71dSXin LI ;; 1408b6cee71dSXin LI esac 1409b6cee71dSXin LI ;; 1410b6cee71dSXin LI *64-bit*) 1411b6cee71dSXin LI case $host in 1412b6cee71dSXin LI x86_64-*kfreebsd*-gnu) 1413b6cee71dSXin LI LD="${LD-ld} -m elf_x86_64_fbsd" 1414b6cee71dSXin LI ;; 1415b6cee71dSXin LI x86_64-*linux*) 1416b6cee71dSXin LI LD="${LD-ld} -m elf_x86_64" 1417b6cee71dSXin LI ;; 1418d38c30c0SXin LI powerpcle-*linux*) 1419d38c30c0SXin LI LD="${LD-ld} -m elf64lppc" 1420d38c30c0SXin LI ;; 1421d38c30c0SXin LI powerpc-*linux*) 1422b6cee71dSXin LI LD="${LD-ld} -m elf64ppc" 1423b6cee71dSXin LI ;; 1424b6cee71dSXin LI s390*-*linux*|s390*-*tpf*) 1425b6cee71dSXin LI LD="${LD-ld} -m elf64_s390" 1426b6cee71dSXin LI ;; 1427b6cee71dSXin LI sparc*-*linux*) 1428b6cee71dSXin LI LD="${LD-ld} -m elf64_sparc" 1429b6cee71dSXin LI ;; 1430b6cee71dSXin LI esac 1431b6cee71dSXin LI ;; 1432b6cee71dSXin LI esac 1433b6cee71dSXin LI fi 1434b6cee71dSXin LI rm -rf conftest* 1435b6cee71dSXin LI ;; 1436b6cee71dSXin LI 1437b6cee71dSXin LI*-*-sco3.2v5*) 1438b6cee71dSXin LI # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1439d38c30c0SXin LI SAVE_CFLAGS=$CFLAGS 1440b6cee71dSXin LI CFLAGS="$CFLAGS -belf" 1441b6cee71dSXin LI AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1442b6cee71dSXin LI [AC_LANG_PUSH(C) 1443b6cee71dSXin LI AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1444b6cee71dSXin LI AC_LANG_POP]) 1445d38c30c0SXin LI if test yes != "$lt_cv_cc_needs_belf"; then 1446b6cee71dSXin LI # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1447d38c30c0SXin LI CFLAGS=$SAVE_CFLAGS 1448b6cee71dSXin LI fi 1449b6cee71dSXin LI ;; 1450b6cee71dSXin LI*-*solaris*) 1451d38c30c0SXin LI # Find out what ABI is being produced by ac_compile, and set linker 1452d38c30c0SXin LI # options accordingly. 1453b6cee71dSXin LI echo 'int i;' > conftest.$ac_ext 1454b6cee71dSXin LI if AC_TRY_EVAL(ac_compile); then 1455*ae316d1dSXin LI case `$FILECMD conftest.o` in 1456b6cee71dSXin LI *64-bit*) 1457b6cee71dSXin LI case $lt_cv_prog_gnu_ld in 1458b6cee71dSXin LI yes*) 1459b6cee71dSXin LI case $host in 1460d38c30c0SXin LI i?86-*-solaris*|x86_64-*-solaris*) 1461b6cee71dSXin LI LD="${LD-ld} -m elf_x86_64" 1462b6cee71dSXin LI ;; 1463b6cee71dSXin LI sparc*-*-solaris*) 1464b6cee71dSXin LI LD="${LD-ld} -m elf64_sparc" 1465b6cee71dSXin LI ;; 1466b6cee71dSXin LI esac 1467b6cee71dSXin LI # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1468b6cee71dSXin LI if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1469d38c30c0SXin LI LD=${LD-ld}_sol2 1470b6cee71dSXin LI fi 1471b6cee71dSXin LI ;; 1472b6cee71dSXin LI *) 1473b6cee71dSXin LI if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1474b6cee71dSXin LI LD="${LD-ld} -64" 1475b6cee71dSXin LI fi 1476b6cee71dSXin LI ;; 1477b6cee71dSXin LI esac 1478b6cee71dSXin LI ;; 1479b6cee71dSXin LI esac 1480b6cee71dSXin LI fi 1481b6cee71dSXin LI rm -rf conftest* 1482b6cee71dSXin LI ;; 1483b6cee71dSXin LIesac 1484b6cee71dSXin LI 1485d38c30c0SXin LIneed_locks=$enable_libtool_lock 1486b6cee71dSXin LI])# _LT_ENABLE_LOCK 1487b6cee71dSXin LI 1488b6cee71dSXin LI 1489b6cee71dSXin LI# _LT_PROG_AR 1490b6cee71dSXin LI# ----------- 1491b6cee71dSXin LIm4_defun([_LT_PROG_AR], 1492b6cee71dSXin LI[AC_CHECK_TOOLS(AR, [ar], false) 1493b6cee71dSXin LI: ${AR=ar} 1494b6cee71dSXin LI_LT_DECL([], [AR], [1], [The archiver]) 1495*ae316d1dSXin LI 1496*ae316d1dSXin LI# Use ARFLAGS variable as AR's operation code to sync the variable naming with 1497*ae316d1dSXin LI# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 1498*ae316d1dSXin LI# higher priority because thats what people were doing historically (setting 1499*ae316d1dSXin LI# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 1500*ae316d1dSXin LI# variable obsoleted/removed. 1501*ae316d1dSXin LI 1502*ae316d1dSXin LItest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 1503*ae316d1dSXin LIlt_ar_flags=$AR_FLAGS 1504*ae316d1dSXin LI_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 1505*ae316d1dSXin LI 1506*ae316d1dSXin LI# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 1507*ae316d1dSXin LI# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 1508*ae316d1dSXin LI_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 1509*ae316d1dSXin LI [Flags to create an archive]) 1510b6cee71dSXin LI 1511b6cee71dSXin LIAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1512b6cee71dSXin LI [lt_cv_ar_at_file=no 1513b6cee71dSXin LI AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1514b6cee71dSXin LI [echo conftest.$ac_objext > conftest.lst 1515b6cee71dSXin LI lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1516b6cee71dSXin LI AC_TRY_EVAL([lt_ar_try]) 1517d38c30c0SXin LI if test 0 -eq "$ac_status"; then 1518b6cee71dSXin LI # Ensure the archiver fails upon bogus file names. 1519b6cee71dSXin LI rm -f conftest.$ac_objext libconftest.a 1520b6cee71dSXin LI AC_TRY_EVAL([lt_ar_try]) 1521d38c30c0SXin LI if test 0 -ne "$ac_status"; then 1522b6cee71dSXin LI lt_cv_ar_at_file=@ 1523b6cee71dSXin LI fi 1524b6cee71dSXin LI fi 1525b6cee71dSXin LI rm -f conftest.* libconftest.a 1526b6cee71dSXin LI ]) 1527b6cee71dSXin LI ]) 1528b6cee71dSXin LI 1529d38c30c0SXin LIif test no = "$lt_cv_ar_at_file"; then 1530b6cee71dSXin LI archiver_list_spec= 1531b6cee71dSXin LIelse 1532b6cee71dSXin LI archiver_list_spec=$lt_cv_ar_at_file 1533b6cee71dSXin LIfi 1534b6cee71dSXin LI_LT_DECL([], [archiver_list_spec], [1], 1535b6cee71dSXin LI [How to feed a file listing to the archiver]) 1536b6cee71dSXin LI])# _LT_PROG_AR 1537b6cee71dSXin LI 1538b6cee71dSXin LI 1539b6cee71dSXin LI# _LT_CMD_OLD_ARCHIVE 1540b6cee71dSXin LI# ------------------- 1541b6cee71dSXin LIm4_defun([_LT_CMD_OLD_ARCHIVE], 1542b6cee71dSXin LI[_LT_PROG_AR 1543b6cee71dSXin LI 1544b6cee71dSXin LIAC_CHECK_TOOL(STRIP, strip, :) 1545b6cee71dSXin LItest -z "$STRIP" && STRIP=: 1546b6cee71dSXin LI_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1547b6cee71dSXin LI 1548b6cee71dSXin LIAC_CHECK_TOOL(RANLIB, ranlib, :) 1549b6cee71dSXin LItest -z "$RANLIB" && RANLIB=: 1550b6cee71dSXin LI_LT_DECL([], [RANLIB], [1], 1551b6cee71dSXin LI [Commands used to install an old-style archive]) 1552b6cee71dSXin LI 1553b6cee71dSXin LI# Determine commands to create old-style static archives. 1554b6cee71dSXin LIold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1555b6cee71dSXin LIold_postinstall_cmds='chmod 644 $oldlib' 1556b6cee71dSXin LIold_postuninstall_cmds= 1557b6cee71dSXin LI 1558b6cee71dSXin LIif test -n "$RANLIB"; then 1559b6cee71dSXin LI case $host_os in 1560d38c30c0SXin LI bitrig* | openbsd*) 1561b6cee71dSXin LI old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1562b6cee71dSXin LI ;; 1563b6cee71dSXin LI *) 1564b6cee71dSXin LI old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1565b6cee71dSXin LI ;; 1566b6cee71dSXin LI esac 1567b6cee71dSXin LI old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1568b6cee71dSXin LIfi 1569b6cee71dSXin LI 1570b6cee71dSXin LIcase $host_os in 1571b6cee71dSXin LI darwin*) 1572b6cee71dSXin LI lock_old_archive_extraction=yes ;; 1573b6cee71dSXin LI *) 1574b6cee71dSXin LI lock_old_archive_extraction=no ;; 1575b6cee71dSXin LIesac 1576b6cee71dSXin LI_LT_DECL([], [old_postinstall_cmds], [2]) 1577b6cee71dSXin LI_LT_DECL([], [old_postuninstall_cmds], [2]) 1578b6cee71dSXin LI_LT_TAGDECL([], [old_archive_cmds], [2], 1579b6cee71dSXin LI [Commands used to build an old-style archive]) 1580b6cee71dSXin LI_LT_DECL([], [lock_old_archive_extraction], [0], 1581b6cee71dSXin LI [Whether to use a lock for old archive extraction]) 1582b6cee71dSXin LI])# _LT_CMD_OLD_ARCHIVE 1583b6cee71dSXin LI 1584b6cee71dSXin LI 1585b6cee71dSXin LI# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1586b6cee71dSXin LI# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1587b6cee71dSXin LI# ---------------------------------------------------------------- 1588b6cee71dSXin LI# Check whether the given compiler option works 1589b6cee71dSXin LIAC_DEFUN([_LT_COMPILER_OPTION], 1590b6cee71dSXin LI[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1591b6cee71dSXin LIm4_require([_LT_DECL_SED])dnl 1592b6cee71dSXin LIAC_CACHE_CHECK([$1], [$2], 1593b6cee71dSXin LI [$2=no 1594b6cee71dSXin LI m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1595b6cee71dSXin LI echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1596d38c30c0SXin LI lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1597b6cee71dSXin LI # Insert the option either (1) after the last *FLAGS variable, or 1598b6cee71dSXin LI # (2) before a word containing "conftest.", or (3) at the end. 1599b6cee71dSXin LI # Note that $ac_compile itself does not contain backslashes and begins 1600b6cee71dSXin LI # with a dollar sign (not a hyphen), so the echo should work correctly. 1601b6cee71dSXin LI # The option is referenced via a variable to avoid confusing sed. 1602b6cee71dSXin LI lt_compile=`echo "$ac_compile" | $SED \ 1603b6cee71dSXin LI -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1604b6cee71dSXin LI -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1605b6cee71dSXin LI -e 's:$: $lt_compiler_flag:'` 1606b6cee71dSXin LI (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1607b6cee71dSXin LI (eval "$lt_compile" 2>conftest.err) 1608b6cee71dSXin LI ac_status=$? 1609b6cee71dSXin LI cat conftest.err >&AS_MESSAGE_LOG_FD 1610b6cee71dSXin LI echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1611b6cee71dSXin LI if (exit $ac_status) && test -s "$ac_outfile"; then 1612b6cee71dSXin LI # The compiler can only warn and ignore the option if not recognized 1613b6cee71dSXin LI # So say no if there are warnings other than the usual output. 1614b6cee71dSXin LI $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1615b6cee71dSXin LI $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1616b6cee71dSXin LI if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1617b6cee71dSXin LI $2=yes 1618b6cee71dSXin LI fi 1619b6cee71dSXin LI fi 1620b6cee71dSXin LI $RM conftest* 1621b6cee71dSXin LI]) 1622b6cee71dSXin LI 1623d38c30c0SXin LIif test yes = "[$]$2"; then 1624b6cee71dSXin LI m4_if([$5], , :, [$5]) 1625b6cee71dSXin LIelse 1626b6cee71dSXin LI m4_if([$6], , :, [$6]) 1627b6cee71dSXin LIfi 1628b6cee71dSXin LI])# _LT_COMPILER_OPTION 1629b6cee71dSXin LI 1630b6cee71dSXin LI# Old name: 1631b6cee71dSXin LIAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1632b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 1633b6cee71dSXin LIdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1634b6cee71dSXin LI 1635b6cee71dSXin LI 1636b6cee71dSXin LI# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1637b6cee71dSXin LI# [ACTION-SUCCESS], [ACTION-FAILURE]) 1638b6cee71dSXin LI# ---------------------------------------------------- 1639b6cee71dSXin LI# Check whether the given linker option works 1640b6cee71dSXin LIAC_DEFUN([_LT_LINKER_OPTION], 1641b6cee71dSXin LI[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1642b6cee71dSXin LIm4_require([_LT_DECL_SED])dnl 1643b6cee71dSXin LIAC_CACHE_CHECK([$1], [$2], 1644b6cee71dSXin LI [$2=no 1645d38c30c0SXin LI save_LDFLAGS=$LDFLAGS 1646b6cee71dSXin LI LDFLAGS="$LDFLAGS $3" 1647b6cee71dSXin LI echo "$lt_simple_link_test_code" > conftest.$ac_ext 1648b6cee71dSXin LI if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1649b6cee71dSXin LI # The linker can only warn and ignore the option if not recognized 1650b6cee71dSXin LI # So say no if there are warnings 1651b6cee71dSXin LI if test -s conftest.err; then 1652b6cee71dSXin LI # Append any errors to the config.log. 1653b6cee71dSXin LI cat conftest.err 1>&AS_MESSAGE_LOG_FD 1654b6cee71dSXin LI $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1655b6cee71dSXin LI $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1656b6cee71dSXin LI if diff conftest.exp conftest.er2 >/dev/null; then 1657b6cee71dSXin LI $2=yes 1658b6cee71dSXin LI fi 1659b6cee71dSXin LI else 1660b6cee71dSXin LI $2=yes 1661b6cee71dSXin LI fi 1662b6cee71dSXin LI fi 1663b6cee71dSXin LI $RM -r conftest* 1664d38c30c0SXin LI LDFLAGS=$save_LDFLAGS 1665b6cee71dSXin LI]) 1666b6cee71dSXin LI 1667d38c30c0SXin LIif test yes = "[$]$2"; then 1668b6cee71dSXin LI m4_if([$4], , :, [$4]) 1669b6cee71dSXin LIelse 1670b6cee71dSXin LI m4_if([$5], , :, [$5]) 1671b6cee71dSXin LIfi 1672b6cee71dSXin LI])# _LT_LINKER_OPTION 1673b6cee71dSXin LI 1674b6cee71dSXin LI# Old name: 1675b6cee71dSXin LIAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1676b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 1677b6cee71dSXin LIdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1678b6cee71dSXin LI 1679b6cee71dSXin LI 1680b6cee71dSXin LI# LT_CMD_MAX_LEN 1681b6cee71dSXin LI#--------------- 1682b6cee71dSXin LIAC_DEFUN([LT_CMD_MAX_LEN], 1683b6cee71dSXin LI[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1684b6cee71dSXin LI# find the maximum length of command line arguments 1685b6cee71dSXin LIAC_MSG_CHECKING([the maximum length of command line arguments]) 1686b6cee71dSXin LIAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1687b6cee71dSXin LI i=0 1688d38c30c0SXin LI teststring=ABCD 1689b6cee71dSXin LI 1690b6cee71dSXin LI case $build_os in 1691b6cee71dSXin LI msdosdjgpp*) 1692b6cee71dSXin LI # On DJGPP, this test can blow up pretty badly due to problems in libc 1693b6cee71dSXin LI # (any single argument exceeding 2000 bytes causes a buffer overrun 1694b6cee71dSXin LI # during glob expansion). Even if it were fixed, the result of this 1695b6cee71dSXin LI # check would be larger than it should be. 1696b6cee71dSXin LI lt_cv_sys_max_cmd_len=12288; # 12K is about right 1697b6cee71dSXin LI ;; 1698b6cee71dSXin LI 1699b6cee71dSXin LI gnu*) 1700b6cee71dSXin LI # Under GNU Hurd, this test is not required because there is 1701b6cee71dSXin LI # no limit to the length of command line arguments. 1702b6cee71dSXin LI # Libtool will interpret -1 as no limit whatsoever 1703b6cee71dSXin LI lt_cv_sys_max_cmd_len=-1; 1704b6cee71dSXin LI ;; 1705b6cee71dSXin LI 1706b6cee71dSXin LI cygwin* | mingw* | cegcc*) 1707b6cee71dSXin LI # On Win9x/ME, this test blows up -- it succeeds, but takes 1708b6cee71dSXin LI # about 5 minutes as the teststring grows exponentially. 1709b6cee71dSXin LI # Worse, since 9x/ME are not pre-emptively multitasking, 1710b6cee71dSXin LI # you end up with a "frozen" computer, even though with patience 1711b6cee71dSXin LI # the test eventually succeeds (with a max line length of 256k). 1712b6cee71dSXin LI # Instead, let's just punt: use the minimum linelength reported by 1713b6cee71dSXin LI # all of the supported platforms: 8192 (on NT/2K/XP). 1714b6cee71dSXin LI lt_cv_sys_max_cmd_len=8192; 1715b6cee71dSXin LI ;; 1716b6cee71dSXin LI 1717b6cee71dSXin LI mint*) 1718b6cee71dSXin LI # On MiNT this can take a long time and run out of memory. 1719b6cee71dSXin LI lt_cv_sys_max_cmd_len=8192; 1720b6cee71dSXin LI ;; 1721b6cee71dSXin LI 1722b6cee71dSXin LI amigaos*) 1723b6cee71dSXin LI # On AmigaOS with pdksh, this test takes hours, literally. 1724b6cee71dSXin LI # So we just punt and use a minimum line length of 8192. 1725b6cee71dSXin LI lt_cv_sys_max_cmd_len=8192; 1726b6cee71dSXin LI ;; 1727b6cee71dSXin LI 1728*ae316d1dSXin LI bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 1729b6cee71dSXin LI # This has been around since 386BSD, at least. Likely further. 1730b6cee71dSXin LI if test -x /sbin/sysctl; then 1731b6cee71dSXin LI lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1732b6cee71dSXin LI elif test -x /usr/sbin/sysctl; then 1733b6cee71dSXin LI lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1734b6cee71dSXin LI else 1735b6cee71dSXin LI lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1736b6cee71dSXin LI fi 1737b6cee71dSXin LI # And add a safety zone 1738b6cee71dSXin LI lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1739b6cee71dSXin LI lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1740b6cee71dSXin LI ;; 1741b6cee71dSXin LI 1742b6cee71dSXin LI interix*) 1743b6cee71dSXin LI # We know the value 262144 and hardcode it with a safety zone (like BSD) 1744b6cee71dSXin LI lt_cv_sys_max_cmd_len=196608 1745b6cee71dSXin LI ;; 1746b6cee71dSXin LI 1747b6cee71dSXin LI os2*) 1748b6cee71dSXin LI # The test takes a long time on OS/2. 1749b6cee71dSXin LI lt_cv_sys_max_cmd_len=8192 1750b6cee71dSXin LI ;; 1751b6cee71dSXin LI 1752b6cee71dSXin LI osf*) 1753b6cee71dSXin LI # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1754b6cee71dSXin LI # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1755b6cee71dSXin LI # nice to cause kernel panics so lets avoid the loop below. 1756b6cee71dSXin LI # First set a reasonable default. 1757b6cee71dSXin LI lt_cv_sys_max_cmd_len=16384 1758b6cee71dSXin LI # 1759b6cee71dSXin LI if test -x /sbin/sysconfig; then 1760b6cee71dSXin LI case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1761b6cee71dSXin LI *1*) lt_cv_sys_max_cmd_len=-1 ;; 1762b6cee71dSXin LI esac 1763b6cee71dSXin LI fi 1764b6cee71dSXin LI ;; 1765b6cee71dSXin LI sco3.2v5*) 1766b6cee71dSXin LI lt_cv_sys_max_cmd_len=102400 1767b6cee71dSXin LI ;; 1768b6cee71dSXin LI sysv5* | sco5v6* | sysv4.2uw2*) 1769b6cee71dSXin LI kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1770b6cee71dSXin LI if test -n "$kargmax"; then 1771*ae316d1dSXin LI lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 1772b6cee71dSXin LI else 1773b6cee71dSXin LI lt_cv_sys_max_cmd_len=32768 1774b6cee71dSXin LI fi 1775b6cee71dSXin LI ;; 1776b6cee71dSXin LI *) 1777b6cee71dSXin LI lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1778d38c30c0SXin LI if test -n "$lt_cv_sys_max_cmd_len" && \ 1779d38c30c0SXin LI test undefined != "$lt_cv_sys_max_cmd_len"; then 1780b6cee71dSXin LI lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1781b6cee71dSXin LI lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1782b6cee71dSXin LI else 1783b6cee71dSXin LI # Make teststring a little bigger before we do anything with it. 1784b6cee71dSXin LI # a 1K string should be a reasonable start. 1785b6cee71dSXin LI for i in 1 2 3 4 5 6 7 8; do 1786b6cee71dSXin LI teststring=$teststring$teststring 1787b6cee71dSXin LI done 1788b6cee71dSXin LI SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1789b6cee71dSXin LI # If test is not a shell built-in, we'll probably end up computing a 1790b6cee71dSXin LI # maximum length that is only half of the actual maximum length, but 1791b6cee71dSXin LI # we can't tell. 1792d38c30c0SXin LI while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1793b6cee71dSXin LI = "X$teststring$teststring"; } >/dev/null 2>&1 && 1794d38c30c0SXin LI test 17 != "$i" # 1/2 MB should be enough 1795b6cee71dSXin LI do 1796b6cee71dSXin LI i=`expr $i + 1` 1797b6cee71dSXin LI teststring=$teststring$teststring 1798b6cee71dSXin LI done 1799b6cee71dSXin LI # Only check the string length outside the loop. 1800b6cee71dSXin LI lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1801b6cee71dSXin LI teststring= 1802b6cee71dSXin LI # Add a significant safety factor because C++ compilers can tack on 1803b6cee71dSXin LI # massive amounts of additional arguments before passing them to the 1804b6cee71dSXin LI # linker. It appears as though 1/2 is a usable value. 1805b6cee71dSXin LI lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1806b6cee71dSXin LI fi 1807b6cee71dSXin LI ;; 1808b6cee71dSXin LI esac 1809b6cee71dSXin LI]) 1810d38c30c0SXin LIif test -n "$lt_cv_sys_max_cmd_len"; then 1811b6cee71dSXin LI AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1812b6cee71dSXin LIelse 1813b6cee71dSXin LI AC_MSG_RESULT(none) 1814b6cee71dSXin LIfi 1815b6cee71dSXin LImax_cmd_len=$lt_cv_sys_max_cmd_len 1816b6cee71dSXin LI_LT_DECL([], [max_cmd_len], [0], 1817b6cee71dSXin LI [What is the maximum length of a command?]) 1818b6cee71dSXin LI])# LT_CMD_MAX_LEN 1819b6cee71dSXin LI 1820b6cee71dSXin LI# Old name: 1821b6cee71dSXin LIAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1822b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 1823b6cee71dSXin LIdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1824b6cee71dSXin LI 1825b6cee71dSXin LI 1826b6cee71dSXin LI# _LT_HEADER_DLFCN 1827b6cee71dSXin LI# ---------------- 1828b6cee71dSXin LIm4_defun([_LT_HEADER_DLFCN], 1829b6cee71dSXin LI[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1830b6cee71dSXin LI])# _LT_HEADER_DLFCN 1831b6cee71dSXin LI 1832b6cee71dSXin LI 1833b6cee71dSXin LI# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1834b6cee71dSXin LI# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1835b6cee71dSXin LI# ---------------------------------------------------------------- 1836b6cee71dSXin LIm4_defun([_LT_TRY_DLOPEN_SELF], 1837b6cee71dSXin LI[m4_require([_LT_HEADER_DLFCN])dnl 1838d38c30c0SXin LIif test yes = "$cross_compiling"; then : 1839b6cee71dSXin LI [$4] 1840b6cee71dSXin LIelse 1841b6cee71dSXin LI lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1842b6cee71dSXin LI lt_status=$lt_dlunknown 1843b6cee71dSXin LI cat > conftest.$ac_ext <<_LT_EOF 1844b6cee71dSXin LI[#line $LINENO "configure" 1845b6cee71dSXin LI#include "confdefs.h" 1846b6cee71dSXin LI 1847b6cee71dSXin LI#if HAVE_DLFCN_H 1848b6cee71dSXin LI#include <dlfcn.h> 1849b6cee71dSXin LI#endif 1850b6cee71dSXin LI 1851b6cee71dSXin LI#include <stdio.h> 1852b6cee71dSXin LI 1853b6cee71dSXin LI#ifdef RTLD_GLOBAL 1854b6cee71dSXin LI# define LT_DLGLOBAL RTLD_GLOBAL 1855b6cee71dSXin LI#else 1856b6cee71dSXin LI# ifdef DL_GLOBAL 1857b6cee71dSXin LI# define LT_DLGLOBAL DL_GLOBAL 1858b6cee71dSXin LI# else 1859b6cee71dSXin LI# define LT_DLGLOBAL 0 1860b6cee71dSXin LI# endif 1861b6cee71dSXin LI#endif 1862b6cee71dSXin LI 1863b6cee71dSXin LI/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1864b6cee71dSXin LI find out it does not work in some platform. */ 1865b6cee71dSXin LI#ifndef LT_DLLAZY_OR_NOW 1866b6cee71dSXin LI# ifdef RTLD_LAZY 1867b6cee71dSXin LI# define LT_DLLAZY_OR_NOW RTLD_LAZY 1868b6cee71dSXin LI# else 1869b6cee71dSXin LI# ifdef DL_LAZY 1870b6cee71dSXin LI# define LT_DLLAZY_OR_NOW DL_LAZY 1871b6cee71dSXin LI# else 1872b6cee71dSXin LI# ifdef RTLD_NOW 1873b6cee71dSXin LI# define LT_DLLAZY_OR_NOW RTLD_NOW 1874b6cee71dSXin LI# else 1875b6cee71dSXin LI# ifdef DL_NOW 1876b6cee71dSXin LI# define LT_DLLAZY_OR_NOW DL_NOW 1877b6cee71dSXin LI# else 1878b6cee71dSXin LI# define LT_DLLAZY_OR_NOW 0 1879b6cee71dSXin LI# endif 1880b6cee71dSXin LI# endif 1881b6cee71dSXin LI# endif 1882b6cee71dSXin LI# endif 1883b6cee71dSXin LI#endif 1884b6cee71dSXin LI 1885d38c30c0SXin LI/* When -fvisibility=hidden is used, assume the code has been annotated 1886b6cee71dSXin LI correspondingly for the symbols needed. */ 1887d38c30c0SXin LI#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1888b6cee71dSXin LIint fnord () __attribute__((visibility("default"))); 1889b6cee71dSXin LI#endif 1890b6cee71dSXin LI 1891b6cee71dSXin LIint fnord () { return 42; } 1892b6cee71dSXin LIint main () 1893b6cee71dSXin LI{ 1894b6cee71dSXin LI void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1895b6cee71dSXin LI int status = $lt_dlunknown; 1896b6cee71dSXin LI 1897b6cee71dSXin LI if (self) 1898b6cee71dSXin LI { 1899b6cee71dSXin LI if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1900b6cee71dSXin LI else 1901b6cee71dSXin LI { 1902b6cee71dSXin LI if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1903b6cee71dSXin LI else puts (dlerror ()); 1904b6cee71dSXin LI } 1905b6cee71dSXin LI /* dlclose (self); */ 1906b6cee71dSXin LI } 1907b6cee71dSXin LI else 1908b6cee71dSXin LI puts (dlerror ()); 1909b6cee71dSXin LI 1910b6cee71dSXin LI return status; 1911b6cee71dSXin LI}] 1912b6cee71dSXin LI_LT_EOF 1913d38c30c0SXin LI if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1914b6cee71dSXin LI (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1915b6cee71dSXin LI lt_status=$? 1916b6cee71dSXin LI case x$lt_status in 1917b6cee71dSXin LI x$lt_dlno_uscore) $1 ;; 1918b6cee71dSXin LI x$lt_dlneed_uscore) $2 ;; 1919b6cee71dSXin LI x$lt_dlunknown|x*) $3 ;; 1920b6cee71dSXin LI esac 1921b6cee71dSXin LI else : 1922b6cee71dSXin LI # compilation failed 1923b6cee71dSXin LI $3 1924b6cee71dSXin LI fi 1925b6cee71dSXin LIfi 1926b6cee71dSXin LIrm -fr conftest* 1927b6cee71dSXin LI])# _LT_TRY_DLOPEN_SELF 1928b6cee71dSXin LI 1929b6cee71dSXin LI 1930b6cee71dSXin LI# LT_SYS_DLOPEN_SELF 1931b6cee71dSXin LI# ------------------ 1932b6cee71dSXin LIAC_DEFUN([LT_SYS_DLOPEN_SELF], 1933b6cee71dSXin LI[m4_require([_LT_HEADER_DLFCN])dnl 1934d38c30c0SXin LIif test yes != "$enable_dlopen"; then 1935b6cee71dSXin LI enable_dlopen=unknown 1936b6cee71dSXin LI enable_dlopen_self=unknown 1937b6cee71dSXin LI enable_dlopen_self_static=unknown 1938b6cee71dSXin LIelse 1939b6cee71dSXin LI lt_cv_dlopen=no 1940b6cee71dSXin LI lt_cv_dlopen_libs= 1941b6cee71dSXin LI 1942b6cee71dSXin LI case $host_os in 1943b6cee71dSXin LI beos*) 1944d38c30c0SXin LI lt_cv_dlopen=load_add_on 1945b6cee71dSXin LI lt_cv_dlopen_libs= 1946b6cee71dSXin LI lt_cv_dlopen_self=yes 1947b6cee71dSXin LI ;; 1948b6cee71dSXin LI 1949b6cee71dSXin LI mingw* | pw32* | cegcc*) 1950d38c30c0SXin LI lt_cv_dlopen=LoadLibrary 1951b6cee71dSXin LI lt_cv_dlopen_libs= 1952b6cee71dSXin LI ;; 1953b6cee71dSXin LI 1954b6cee71dSXin LI cygwin*) 1955d38c30c0SXin LI lt_cv_dlopen=dlopen 1956b6cee71dSXin LI lt_cv_dlopen_libs= 1957b6cee71dSXin LI ;; 1958b6cee71dSXin LI 1959b6cee71dSXin LI darwin*) 1960b6cee71dSXin LI # if libdl is installed we need to link against it 1961b6cee71dSXin LI AC_CHECK_LIB([dl], [dlopen], 1962d38c30c0SXin LI [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1963d38c30c0SXin LI lt_cv_dlopen=dyld 1964b6cee71dSXin LI lt_cv_dlopen_libs= 1965b6cee71dSXin LI lt_cv_dlopen_self=yes 1966b6cee71dSXin LI ]) 1967b6cee71dSXin LI ;; 1968b6cee71dSXin LI 1969d38c30c0SXin LI tpf*) 1970d38c30c0SXin LI # Don't try to run any link tests for TPF. We know it's impossible 1971d38c30c0SXin LI # because TPF is a cross-compiler, and we know how we open DSOs. 1972d38c30c0SXin LI lt_cv_dlopen=dlopen 1973d38c30c0SXin LI lt_cv_dlopen_libs= 1974d38c30c0SXin LI lt_cv_dlopen_self=no 1975d38c30c0SXin LI ;; 1976d38c30c0SXin LI 1977b6cee71dSXin LI *) 1978b6cee71dSXin LI AC_CHECK_FUNC([shl_load], 1979d38c30c0SXin LI [lt_cv_dlopen=shl_load], 1980b6cee71dSXin LI [AC_CHECK_LIB([dld], [shl_load], 1981d38c30c0SXin LI [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1982b6cee71dSXin LI [AC_CHECK_FUNC([dlopen], 1983d38c30c0SXin LI [lt_cv_dlopen=dlopen], 1984b6cee71dSXin LI [AC_CHECK_LIB([dl], [dlopen], 1985d38c30c0SXin LI [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1986b6cee71dSXin LI [AC_CHECK_LIB([svld], [dlopen], 1987d38c30c0SXin LI [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1988b6cee71dSXin LI [AC_CHECK_LIB([dld], [dld_link], 1989d38c30c0SXin LI [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1990b6cee71dSXin LI ]) 1991b6cee71dSXin LI ]) 1992b6cee71dSXin LI ]) 1993b6cee71dSXin LI ]) 1994b6cee71dSXin LI ]) 1995b6cee71dSXin LI ;; 1996b6cee71dSXin LI esac 1997b6cee71dSXin LI 1998d38c30c0SXin LI if test no = "$lt_cv_dlopen"; then 1999b6cee71dSXin LI enable_dlopen=no 2000d38c30c0SXin LI else 2001d38c30c0SXin LI enable_dlopen=yes 2002b6cee71dSXin LI fi 2003b6cee71dSXin LI 2004b6cee71dSXin LI case $lt_cv_dlopen in 2005b6cee71dSXin LI dlopen) 2006d38c30c0SXin LI save_CPPFLAGS=$CPPFLAGS 2007d38c30c0SXin LI test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2008b6cee71dSXin LI 2009d38c30c0SXin LI save_LDFLAGS=$LDFLAGS 2010b6cee71dSXin LI wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2011b6cee71dSXin LI 2012d38c30c0SXin LI save_LIBS=$LIBS 2013b6cee71dSXin LI LIBS="$lt_cv_dlopen_libs $LIBS" 2014b6cee71dSXin LI 2015b6cee71dSXin LI AC_CACHE_CHECK([whether a program can dlopen itself], 2016b6cee71dSXin LI lt_cv_dlopen_self, [dnl 2017b6cee71dSXin LI _LT_TRY_DLOPEN_SELF( 2018b6cee71dSXin LI lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2019b6cee71dSXin LI lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2020b6cee71dSXin LI ]) 2021b6cee71dSXin LI 2022d38c30c0SXin LI if test yes = "$lt_cv_dlopen_self"; then 2023b6cee71dSXin LI wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2024b6cee71dSXin LI AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2025b6cee71dSXin LI lt_cv_dlopen_self_static, [dnl 2026b6cee71dSXin LI _LT_TRY_DLOPEN_SELF( 2027b6cee71dSXin LI lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2028b6cee71dSXin LI lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2029b6cee71dSXin LI ]) 2030b6cee71dSXin LI fi 2031b6cee71dSXin LI 2032d38c30c0SXin LI CPPFLAGS=$save_CPPFLAGS 2033d38c30c0SXin LI LDFLAGS=$save_LDFLAGS 2034d38c30c0SXin LI LIBS=$save_LIBS 2035b6cee71dSXin LI ;; 2036b6cee71dSXin LI esac 2037b6cee71dSXin LI 2038b6cee71dSXin LI case $lt_cv_dlopen_self in 2039b6cee71dSXin LI yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2040b6cee71dSXin LI *) enable_dlopen_self=unknown ;; 2041b6cee71dSXin LI esac 2042b6cee71dSXin LI 2043b6cee71dSXin LI case $lt_cv_dlopen_self_static in 2044b6cee71dSXin LI yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2045b6cee71dSXin LI *) enable_dlopen_self_static=unknown ;; 2046b6cee71dSXin LI esac 2047b6cee71dSXin LIfi 2048b6cee71dSXin LI_LT_DECL([dlopen_support], [enable_dlopen], [0], 2049b6cee71dSXin LI [Whether dlopen is supported]) 2050b6cee71dSXin LI_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2051b6cee71dSXin LI [Whether dlopen of programs is supported]) 2052b6cee71dSXin LI_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2053b6cee71dSXin LI [Whether dlopen of statically linked programs is supported]) 2054b6cee71dSXin LI])# LT_SYS_DLOPEN_SELF 2055b6cee71dSXin LI 2056b6cee71dSXin LI# Old name: 2057b6cee71dSXin LIAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2058b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 2059b6cee71dSXin LIdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2060b6cee71dSXin LI 2061b6cee71dSXin LI 2062b6cee71dSXin LI# _LT_COMPILER_C_O([TAGNAME]) 2063b6cee71dSXin LI# --------------------------- 2064b6cee71dSXin LI# Check to see if options -c and -o are simultaneously supported by compiler. 2065b6cee71dSXin LI# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2066b6cee71dSXin LIm4_defun([_LT_COMPILER_C_O], 2067b6cee71dSXin LI[m4_require([_LT_DECL_SED])dnl 2068b6cee71dSXin LIm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2069b6cee71dSXin LIm4_require([_LT_TAG_COMPILER])dnl 2070b6cee71dSXin LIAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2071b6cee71dSXin LI [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2072b6cee71dSXin LI [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2073b6cee71dSXin LI $RM -r conftest 2>/dev/null 2074b6cee71dSXin LI mkdir conftest 2075b6cee71dSXin LI cd conftest 2076b6cee71dSXin LI mkdir out 2077b6cee71dSXin LI echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2078b6cee71dSXin LI 2079b6cee71dSXin LI lt_compiler_flag="-o out/conftest2.$ac_objext" 2080b6cee71dSXin LI # Insert the option either (1) after the last *FLAGS variable, or 2081b6cee71dSXin LI # (2) before a word containing "conftest.", or (3) at the end. 2082b6cee71dSXin LI # Note that $ac_compile itself does not contain backslashes and begins 2083b6cee71dSXin LI # with a dollar sign (not a hyphen), so the echo should work correctly. 2084b6cee71dSXin LI lt_compile=`echo "$ac_compile" | $SED \ 2085b6cee71dSXin LI -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2086b6cee71dSXin LI -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2087b6cee71dSXin LI -e 's:$: $lt_compiler_flag:'` 2088b6cee71dSXin LI (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2089b6cee71dSXin LI (eval "$lt_compile" 2>out/conftest.err) 2090b6cee71dSXin LI ac_status=$? 2091b6cee71dSXin LI cat out/conftest.err >&AS_MESSAGE_LOG_FD 2092b6cee71dSXin LI echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2093b6cee71dSXin LI if (exit $ac_status) && test -s out/conftest2.$ac_objext 2094b6cee71dSXin LI then 2095b6cee71dSXin LI # The compiler can only warn and ignore the option if not recognized 2096b6cee71dSXin LI # So say no if there are warnings 2097b6cee71dSXin LI $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2098b6cee71dSXin LI $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2099b6cee71dSXin LI if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2100b6cee71dSXin LI _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2101b6cee71dSXin LI fi 2102b6cee71dSXin LI fi 2103b6cee71dSXin LI chmod u+w . 2>&AS_MESSAGE_LOG_FD 2104b6cee71dSXin LI $RM conftest* 2105b6cee71dSXin LI # SGI C++ compiler will create directory out/ii_files/ for 2106b6cee71dSXin LI # template instantiation 2107b6cee71dSXin LI test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2108b6cee71dSXin LI $RM out/* && rmdir out 2109b6cee71dSXin LI cd .. 2110b6cee71dSXin LI $RM -r conftest 2111b6cee71dSXin LI $RM conftest* 2112b6cee71dSXin LI]) 2113b6cee71dSXin LI_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2114b6cee71dSXin LI [Does compiler simultaneously support -c and -o options?]) 2115b6cee71dSXin LI])# _LT_COMPILER_C_O 2116b6cee71dSXin LI 2117b6cee71dSXin LI 2118b6cee71dSXin LI# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2119b6cee71dSXin LI# ---------------------------------- 2120b6cee71dSXin LI# Check to see if we can do hard links to lock some files if needed 2121b6cee71dSXin LIm4_defun([_LT_COMPILER_FILE_LOCKS], 2122b6cee71dSXin LI[m4_require([_LT_ENABLE_LOCK])dnl 2123b6cee71dSXin LIm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2124b6cee71dSXin LI_LT_COMPILER_C_O([$1]) 2125b6cee71dSXin LI 2126d38c30c0SXin LIhard_links=nottested 2127d38c30c0SXin LIif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2128b6cee71dSXin LI # do not overwrite the value of need_locks provided by the user 2129b6cee71dSXin LI AC_MSG_CHECKING([if we can lock with hard links]) 2130b6cee71dSXin LI hard_links=yes 2131b6cee71dSXin LI $RM conftest* 2132b6cee71dSXin LI ln conftest.a conftest.b 2>/dev/null && hard_links=no 2133b6cee71dSXin LI touch conftest.a 2134b6cee71dSXin LI ln conftest.a conftest.b 2>&5 || hard_links=no 2135b6cee71dSXin LI ln conftest.a conftest.b 2>/dev/null && hard_links=no 2136b6cee71dSXin LI AC_MSG_RESULT([$hard_links]) 2137d38c30c0SXin LI if test no = "$hard_links"; then 2138d38c30c0SXin LI AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2139b6cee71dSXin LI need_locks=warn 2140b6cee71dSXin LI fi 2141b6cee71dSXin LIelse 2142b6cee71dSXin LI need_locks=no 2143b6cee71dSXin LIfi 2144b6cee71dSXin LI_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2145b6cee71dSXin LI])# _LT_COMPILER_FILE_LOCKS 2146b6cee71dSXin LI 2147b6cee71dSXin LI 2148b6cee71dSXin LI# _LT_CHECK_OBJDIR 2149b6cee71dSXin LI# ---------------- 2150b6cee71dSXin LIm4_defun([_LT_CHECK_OBJDIR], 2151b6cee71dSXin LI[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2152b6cee71dSXin LI[rm -f .libs 2>/dev/null 2153b6cee71dSXin LImkdir .libs 2>/dev/null 2154b6cee71dSXin LIif test -d .libs; then 2155b6cee71dSXin LI lt_cv_objdir=.libs 2156b6cee71dSXin LIelse 2157b6cee71dSXin LI # MS-DOS does not allow filenames that begin with a dot. 2158b6cee71dSXin LI lt_cv_objdir=_libs 2159b6cee71dSXin LIfi 2160b6cee71dSXin LIrmdir .libs 2>/dev/null]) 2161b6cee71dSXin LIobjdir=$lt_cv_objdir 2162b6cee71dSXin LI_LT_DECL([], [objdir], [0], 2163b6cee71dSXin LI [The name of the directory that contains temporary libtool files])dnl 2164b6cee71dSXin LIm4_pattern_allow([LT_OBJDIR])dnl 2165d38c30c0SXin LIAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2166d38c30c0SXin LI [Define to the sub-directory where libtool stores uninstalled libraries.]) 2167b6cee71dSXin LI])# _LT_CHECK_OBJDIR 2168b6cee71dSXin LI 2169b6cee71dSXin LI 2170b6cee71dSXin LI# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2171b6cee71dSXin LI# -------------------------------------- 2172b6cee71dSXin LI# Check hardcoding attributes. 2173b6cee71dSXin LIm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2174b6cee71dSXin LI[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2175b6cee71dSXin LI_LT_TAGVAR(hardcode_action, $1)= 2176b6cee71dSXin LIif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2177b6cee71dSXin LI test -n "$_LT_TAGVAR(runpath_var, $1)" || 2178d38c30c0SXin LI test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2179b6cee71dSXin LI 2180b6cee71dSXin LI # We can hardcode non-existent directories. 2181d38c30c0SXin LI if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2182b6cee71dSXin LI # If the only mechanism to avoid hardcoding is shlibpath_var, we 2183b6cee71dSXin LI # have to relink, otherwise we might link with an installed library 2184b6cee71dSXin LI # when we should be linking with a yet-to-be-installed one 2185d38c30c0SXin LI ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2186d38c30c0SXin LI test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2187b6cee71dSXin LI # Linking always hardcodes the temporary library directory. 2188b6cee71dSXin LI _LT_TAGVAR(hardcode_action, $1)=relink 2189b6cee71dSXin LI else 2190b6cee71dSXin LI # We can link without hardcoding, and we can hardcode nonexisting dirs. 2191b6cee71dSXin LI _LT_TAGVAR(hardcode_action, $1)=immediate 2192b6cee71dSXin LI fi 2193b6cee71dSXin LIelse 2194b6cee71dSXin LI # We cannot hardcode anything, or else we can only hardcode existing 2195b6cee71dSXin LI # directories. 2196b6cee71dSXin LI _LT_TAGVAR(hardcode_action, $1)=unsupported 2197b6cee71dSXin LIfi 2198b6cee71dSXin LIAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2199b6cee71dSXin LI 2200d38c30c0SXin LIif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2201d38c30c0SXin LI test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2202b6cee71dSXin LI # Fast installation is not supported 2203b6cee71dSXin LI enable_fast_install=no 2204d38c30c0SXin LIelif test yes = "$shlibpath_overrides_runpath" || 2205d38c30c0SXin LI test no = "$enable_shared"; then 2206b6cee71dSXin LI # Fast installation is not necessary 2207b6cee71dSXin LI enable_fast_install=needless 2208b6cee71dSXin LIfi 2209b6cee71dSXin LI_LT_TAGDECL([], [hardcode_action], [0], 2210b6cee71dSXin LI [How to hardcode a shared library path into an executable]) 2211b6cee71dSXin LI])# _LT_LINKER_HARDCODE_LIBPATH 2212b6cee71dSXin LI 2213b6cee71dSXin LI 2214b6cee71dSXin LI# _LT_CMD_STRIPLIB 2215b6cee71dSXin LI# ---------------- 2216b6cee71dSXin LIm4_defun([_LT_CMD_STRIPLIB], 2217b6cee71dSXin LI[m4_require([_LT_DECL_EGREP]) 2218b6cee71dSXin LIstriplib= 2219b6cee71dSXin LIold_striplib= 2220b6cee71dSXin LIAC_MSG_CHECKING([whether stripping libraries is possible]) 2221*ae316d1dSXin LIif test -z "$STRIP"; then 2222*ae316d1dSXin LI AC_MSG_RESULT([no]) 2223*ae316d1dSXin LIelse 2224*ae316d1dSXin LI if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2225*ae316d1dSXin LI old_striplib="$STRIP --strip-debug" 2226*ae316d1dSXin LI striplib="$STRIP --strip-unneeded" 2227b6cee71dSXin LI AC_MSG_RESULT([yes]) 2228b6cee71dSXin LI else 2229b6cee71dSXin LI case $host_os in 2230b6cee71dSXin LI darwin*) 2231*ae316d1dSXin LI # FIXME - insert some real tests, host_os isn't really good enough 2232b6cee71dSXin LI striplib="$STRIP -x" 2233b6cee71dSXin LI old_striplib="$STRIP -S" 2234b6cee71dSXin LI AC_MSG_RESULT([yes]) 2235*ae316d1dSXin LI ;; 2236*ae316d1dSXin LI freebsd*) 2237*ae316d1dSXin LI if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 2238*ae316d1dSXin LI old_striplib="$STRIP --strip-debug" 2239*ae316d1dSXin LI striplib="$STRIP --strip-unneeded" 2240*ae316d1dSXin LI AC_MSG_RESULT([yes]) 2241b6cee71dSXin LI else 2242b6cee71dSXin LI AC_MSG_RESULT([no]) 2243b6cee71dSXin LI fi 2244b6cee71dSXin LI ;; 2245b6cee71dSXin LI *) 2246b6cee71dSXin LI AC_MSG_RESULT([no]) 2247b6cee71dSXin LI ;; 2248b6cee71dSXin LI esac 2249b6cee71dSXin LI fi 2250*ae316d1dSXin LIfi 2251b6cee71dSXin LI_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2252b6cee71dSXin LI_LT_DECL([], [striplib], [1]) 2253b6cee71dSXin LI])# _LT_CMD_STRIPLIB 2254b6cee71dSXin LI 2255b6cee71dSXin LI 2256d38c30c0SXin LI# _LT_PREPARE_MUNGE_PATH_LIST 2257d38c30c0SXin LI# --------------------------- 2258d38c30c0SXin LI# Make sure func_munge_path_list() is defined correctly. 2259d38c30c0SXin LIm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2260d38c30c0SXin LI[[# func_munge_path_list VARIABLE PATH 2261d38c30c0SXin LI# ----------------------------------- 2262d38c30c0SXin LI# VARIABLE is name of variable containing _space_ separated list of 2263d38c30c0SXin LI# directories to be munged by the contents of PATH, which is string 2264d38c30c0SXin LI# having a format: 2265d38c30c0SXin LI# "DIR[:DIR]:" 2266d38c30c0SXin LI# string "DIR[ DIR]" will be prepended to VARIABLE 2267d38c30c0SXin LI# ":DIR[:DIR]" 2268d38c30c0SXin LI# string "DIR[ DIR]" will be appended to VARIABLE 2269d38c30c0SXin LI# "DIRP[:DIRP]::[DIRA:]DIRA" 2270d38c30c0SXin LI# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2271d38c30c0SXin LI# "DIRA[ DIRA]" will be appended to VARIABLE 2272d38c30c0SXin LI# "DIR[:DIR]" 2273d38c30c0SXin LI# VARIABLE will be replaced by "DIR[ DIR]" 2274d38c30c0SXin LIfunc_munge_path_list () 2275d38c30c0SXin LI{ 2276d38c30c0SXin LI case x@S|@2 in 2277d38c30c0SXin LI x) 2278d38c30c0SXin LI ;; 2279d38c30c0SXin LI *:) 2280d38c30c0SXin LI eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2281d38c30c0SXin LI ;; 2282d38c30c0SXin LI x:*) 2283d38c30c0SXin LI eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2284d38c30c0SXin LI ;; 2285d38c30c0SXin LI *::*) 2286d38c30c0SXin LI eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2287d38c30c0SXin LI eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2288d38c30c0SXin LI ;; 2289d38c30c0SXin LI *) 2290d38c30c0SXin LI eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2291d38c30c0SXin LI ;; 2292d38c30c0SXin LI esac 2293d38c30c0SXin LI} 2294d38c30c0SXin LI]])# _LT_PREPARE_PATH_LIST 2295d38c30c0SXin LI 2296d38c30c0SXin LI 2297b6cee71dSXin LI# _LT_SYS_DYNAMIC_LINKER([TAG]) 2298b6cee71dSXin LI# ----------------------------- 2299b6cee71dSXin LI# PORTME Fill in your ld.so characteristics 2300b6cee71dSXin LIm4_defun([_LT_SYS_DYNAMIC_LINKER], 2301b6cee71dSXin LI[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2302b6cee71dSXin LIm4_require([_LT_DECL_EGREP])dnl 2303b6cee71dSXin LIm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2304b6cee71dSXin LIm4_require([_LT_DECL_OBJDUMP])dnl 2305b6cee71dSXin LIm4_require([_LT_DECL_SED])dnl 2306b6cee71dSXin LIm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2307d38c30c0SXin LIm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2308b6cee71dSXin LIAC_MSG_CHECKING([dynamic linker characteristics]) 2309b6cee71dSXin LIm4_if([$1], 2310b6cee71dSXin LI [], [ 2311d38c30c0SXin LIif test yes = "$GCC"; then 2312b6cee71dSXin LI case $host_os in 2313d38c30c0SXin LI darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2314d38c30c0SXin LI *) lt_awk_arg='/^libraries:/' ;; 2315b6cee71dSXin LI esac 2316b6cee71dSXin LI case $host_os in 2317d38c30c0SXin LI mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2318d38c30c0SXin LI *) lt_sed_strip_eq='s|=/|/|g' ;; 2319b6cee71dSXin LI esac 2320b6cee71dSXin LI lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2321b6cee71dSXin LI case $lt_search_path_spec in 2322b6cee71dSXin LI *\;*) 2323b6cee71dSXin LI # if the path contains ";" then we assume it to be the separator 2324b6cee71dSXin LI # otherwise default to the standard path separator (i.e. ":") - it is 2325b6cee71dSXin LI # assumed that no part of a normal pathname contains ";" but that should 2326b6cee71dSXin LI # okay in the real world where ";" in dirpaths is itself problematic. 2327b6cee71dSXin LI lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2328b6cee71dSXin LI ;; 2329b6cee71dSXin LI *) 2330b6cee71dSXin LI lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2331b6cee71dSXin LI ;; 2332b6cee71dSXin LI esac 2333b6cee71dSXin LI # Ok, now we have the path, separated by spaces, we can step through it 2334d38c30c0SXin LI # and add multilib dir if necessary... 2335b6cee71dSXin LI lt_tmp_lt_search_path_spec= 2336d38c30c0SXin LI lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2337d38c30c0SXin LI # ...but if some path component already ends with the multilib dir we assume 2338d38c30c0SXin LI # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2339d38c30c0SXin LI case "$lt_multi_os_dir; $lt_search_path_spec " in 2340d38c30c0SXin LI "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2341d38c30c0SXin LI lt_multi_os_dir= 2342d38c30c0SXin LI ;; 2343d38c30c0SXin LI esac 2344b6cee71dSXin LI for lt_sys_path in $lt_search_path_spec; do 2345d38c30c0SXin LI if test -d "$lt_sys_path$lt_multi_os_dir"; then 2346d38c30c0SXin LI lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2347d38c30c0SXin LI elif test -n "$lt_multi_os_dir"; then 2348b6cee71dSXin LI test -d "$lt_sys_path" && \ 2349b6cee71dSXin LI lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2350b6cee71dSXin LI fi 2351b6cee71dSXin LI done 2352b6cee71dSXin LI lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2353b6cee71dSXin LIBEGIN {RS = " "; FS = "/|\n";} { 2354b6cee71dSXin LI lt_foo = ""; 2355b6cee71dSXin LI lt_count = 0; 2356b6cee71dSXin LI for (lt_i = NF; lt_i > 0; lt_i--) { 2357b6cee71dSXin LI if ($lt_i != "" && $lt_i != ".") { 2358b6cee71dSXin LI if ($lt_i == "..") { 2359b6cee71dSXin LI lt_count++; 2360b6cee71dSXin LI } else { 2361b6cee71dSXin LI if (lt_count == 0) { 2362b6cee71dSXin LI lt_foo = "/" $lt_i lt_foo; 2363b6cee71dSXin LI } else { 2364b6cee71dSXin LI lt_count--; 2365b6cee71dSXin LI } 2366b6cee71dSXin LI } 2367b6cee71dSXin LI } 2368b6cee71dSXin LI } 2369b6cee71dSXin LI if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2370b6cee71dSXin LI if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2371b6cee71dSXin LI}'` 2372b6cee71dSXin LI # AWK program above erroneously prepends '/' to C:/dos/paths 2373b6cee71dSXin LI # for these hosts. 2374b6cee71dSXin LI case $host_os in 2375b6cee71dSXin LI mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2376d38c30c0SXin LI $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2377b6cee71dSXin LI esac 2378b6cee71dSXin LI sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2379b6cee71dSXin LIelse 2380b6cee71dSXin LI sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2381b6cee71dSXin LIfi]) 2382b6cee71dSXin LIlibrary_names_spec= 2383b6cee71dSXin LIlibname_spec='lib$name' 2384b6cee71dSXin LIsoname_spec= 2385d38c30c0SXin LIshrext_cmds=.so 2386b6cee71dSXin LIpostinstall_cmds= 2387b6cee71dSXin LIpostuninstall_cmds= 2388b6cee71dSXin LIfinish_cmds= 2389b6cee71dSXin LIfinish_eval= 2390b6cee71dSXin LIshlibpath_var= 2391b6cee71dSXin LIshlibpath_overrides_runpath=unknown 2392b6cee71dSXin LIversion_type=none 2393b6cee71dSXin LIdynamic_linker="$host_os ld.so" 2394b6cee71dSXin LIsys_lib_dlsearch_path_spec="/lib /usr/lib" 2395b6cee71dSXin LIneed_lib_prefix=unknown 2396b6cee71dSXin LIhardcode_into_libs=no 2397b6cee71dSXin LI 2398b6cee71dSXin LI# when you set need_version to no, make sure it does not cause -set_version 2399b6cee71dSXin LI# flags to be left without arguments 2400b6cee71dSXin LIneed_version=unknown 2401b6cee71dSXin LI 2402d38c30c0SXin LIAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2403d38c30c0SXin LI[User-defined run-time library search path.]) 2404d38c30c0SXin LI 2405b6cee71dSXin LIcase $host_os in 2406b6cee71dSXin LIaix3*) 2407b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 2408d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2409b6cee71dSXin LI shlibpath_var=LIBPATH 2410b6cee71dSXin LI 2411b6cee71dSXin LI # AIX 3 has no versioning support, so we append a major version to the name. 2412d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2413b6cee71dSXin LI ;; 2414b6cee71dSXin LI 2415b6cee71dSXin LIaix[[4-9]]*) 2416b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 2417b6cee71dSXin LI need_lib_prefix=no 2418b6cee71dSXin LI need_version=no 2419b6cee71dSXin LI hardcode_into_libs=yes 2420d38c30c0SXin LI if test ia64 = "$host_cpu"; then 2421b6cee71dSXin LI # AIX 5 supports IA64 2422d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2423b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 2424b6cee71dSXin LI else 2425b6cee71dSXin LI # With GCC up to 2.95.x, collect2 would create an import file 2426b6cee71dSXin LI # for dependence libraries. The import file would start with 2427d38c30c0SXin LI # the line '#! .'. This would cause the generated library to 2428d38c30c0SXin LI # depend on '.', always an invalid library. This was fixed in 2429b6cee71dSXin LI # development snapshots of GCC prior to 3.0. 2430b6cee71dSXin LI case $host_os in 2431b6cee71dSXin LI aix4 | aix4.[[01]] | aix4.[[01]].*) 2432b6cee71dSXin LI if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2433b6cee71dSXin LI echo ' yes ' 2434d38c30c0SXin LI echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2435b6cee71dSXin LI : 2436b6cee71dSXin LI else 2437b6cee71dSXin LI can_build_shared=no 2438b6cee71dSXin LI fi 2439b6cee71dSXin LI ;; 2440b6cee71dSXin LI esac 2441d38c30c0SXin LI # Using Import Files as archive members, it is possible to support 2442d38c30c0SXin LI # filename-based versioning of shared library archives on AIX. While 2443d38c30c0SXin LI # this would work for both with and without runtime linking, it will 2444d38c30c0SXin LI # prevent static linking of such archives. So we do filename-based 2445d38c30c0SXin LI # shared library versioning with .so extension only, which is used 2446d38c30c0SXin LI # when both runtime linking and shared linking is enabled. 2447d38c30c0SXin LI # Unfortunately, runtime linking may impact performance, so we do 2448d38c30c0SXin LI # not want this to be the default eventually. Also, we use the 2449d38c30c0SXin LI # versioned .so libs for executables only if there is the -brtl 2450d38c30c0SXin LI # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2451d38c30c0SXin LI # To allow for filename-based versioning support, we need to create 2452d38c30c0SXin LI # libNAME.so.V as an archive file, containing: 2453d38c30c0SXin LI # *) an Import File, referring to the versioned filename of the 2454d38c30c0SXin LI # archive as well as the shared archive member, telling the 2455d38c30c0SXin LI # bitwidth (32 or 64) of that shared object, and providing the 2456d38c30c0SXin LI # list of exported symbols of that shared object, eventually 2457d38c30c0SXin LI # decorated with the 'weak' keyword 2458d38c30c0SXin LI # *) the shared object with the F_LOADONLY flag set, to really avoid 2459d38c30c0SXin LI # it being seen by the linker. 2460d38c30c0SXin LI # At run time we better use the real file rather than another symlink, 2461d38c30c0SXin LI # but for link time we create the symlink libNAME.so -> libNAME.so.V 2462d38c30c0SXin LI 2463d38c30c0SXin LI case $with_aix_soname,$aix_use_runtimelinking in 2464b6cee71dSXin LI # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2465b6cee71dSXin LI # soname into executable. Probably we can add versioning support to 2466b6cee71dSXin LI # collect2, so additional links can be useful in future. 2467d38c30c0SXin LI aix,yes) # traditional libtool 2468d38c30c0SXin LI dynamic_linker='AIX unversionable lib.so' 2469b6cee71dSXin LI # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2470b6cee71dSXin LI # instead of lib<name>.a to let people know that these are not 2471b6cee71dSXin LI # typical AIX shared libraries. 2472d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2473d38c30c0SXin LI ;; 2474d38c30c0SXin LI aix,no) # traditional AIX only 2475d38c30c0SXin LI dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2476b6cee71dSXin LI # We preserve .a as extension for shared libraries through AIX4.2 2477b6cee71dSXin LI # and later when we are not doing run time linking. 2478d38c30c0SXin LI library_names_spec='$libname$release.a $libname.a' 2479d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2480d38c30c0SXin LI ;; 2481d38c30c0SXin LI svr4,*) # full svr4 only 2482d38c30c0SXin LI dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2483d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2484d38c30c0SXin LI # We do not specify a path in Import Files, so LIBPATH fires. 2485d38c30c0SXin LI shlibpath_overrides_runpath=yes 2486d38c30c0SXin LI ;; 2487d38c30c0SXin LI *,yes) # both, prefer svr4 2488d38c30c0SXin LI dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2489d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2490d38c30c0SXin LI # unpreferred sharedlib libNAME.a needs extra handling 2491d38c30c0SXin 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"' 2492d38c30c0SXin 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"' 2493d38c30c0SXin LI # We do not specify a path in Import Files, so LIBPATH fires. 2494d38c30c0SXin LI shlibpath_overrides_runpath=yes 2495d38c30c0SXin LI ;; 2496d38c30c0SXin LI *,no) # both, prefer aix 2497d38c30c0SXin LI dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2498d38c30c0SXin LI library_names_spec='$libname$release.a $libname.a' 2499d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2500d38c30c0SXin LI # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2501d38c30c0SXin 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)' 2502d38c30c0SXin 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"' 2503d38c30c0SXin LI ;; 2504d38c30c0SXin LI esac 2505b6cee71dSXin LI shlibpath_var=LIBPATH 2506b6cee71dSXin LI fi 2507b6cee71dSXin LI ;; 2508b6cee71dSXin LI 2509b6cee71dSXin LIamigaos*) 2510b6cee71dSXin LI case $host_cpu in 2511b6cee71dSXin LI powerpc) 2512b6cee71dSXin LI # Since July 2007 AmigaOS4 officially supports .so libraries. 2513b6cee71dSXin LI # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2514d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2515b6cee71dSXin LI ;; 2516b6cee71dSXin LI m68k) 2517b6cee71dSXin LI library_names_spec='$libname.ixlibrary $libname.a' 2518b6cee71dSXin LI # Create ${libname}_ixlibrary.a entries in /sys/libs. 2519d38c30c0SXin 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' 2520b6cee71dSXin LI ;; 2521b6cee71dSXin LI esac 2522b6cee71dSXin LI ;; 2523b6cee71dSXin LI 2524b6cee71dSXin LIbeos*) 2525d38c30c0SXin LI library_names_spec='$libname$shared_ext' 2526b6cee71dSXin LI dynamic_linker="$host_os ld.so" 2527b6cee71dSXin LI shlibpath_var=LIBRARY_PATH 2528b6cee71dSXin LI ;; 2529b6cee71dSXin LI 2530b6cee71dSXin LIbsdi[[45]]*) 2531b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 2532b6cee71dSXin LI need_version=no 2533d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2534d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2535b6cee71dSXin LI finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2536b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 2537b6cee71dSXin LI sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2538b6cee71dSXin LI sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2539b6cee71dSXin LI # the default ld.so.conf also contains /usr/contrib/lib and 2540b6cee71dSXin LI # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2541b6cee71dSXin LI # libtool to hard-code these into programs 2542b6cee71dSXin LI ;; 2543b6cee71dSXin LI 2544b6cee71dSXin LIcygwin* | mingw* | pw32* | cegcc*) 2545b6cee71dSXin LI version_type=windows 2546d38c30c0SXin LI shrext_cmds=.dll 2547b6cee71dSXin LI need_version=no 2548b6cee71dSXin LI need_lib_prefix=no 2549b6cee71dSXin LI 2550b6cee71dSXin LI case $GCC,$cc_basename in 2551b6cee71dSXin LI yes,*) 2552b6cee71dSXin LI # gcc 2553b6cee71dSXin LI library_names_spec='$libname.dll.a' 2554b6cee71dSXin LI # DLL is installed to $(libdir)/../bin by postinstall_cmds 2555d38c30c0SXin LI postinstall_cmds='base_file=`basename \$file`~ 2556d38c30c0SXin LI dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2557b6cee71dSXin LI dldir=$destdir/`dirname \$dlpath`~ 2558b6cee71dSXin LI test -d \$dldir || mkdir -p \$dldir~ 2559b6cee71dSXin LI $install_prog $dir/$dlname \$dldir/$dlname~ 2560b6cee71dSXin LI chmod a+x \$dldir/$dlname~ 2561b6cee71dSXin LI if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2562b6cee71dSXin LI eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2563b6cee71dSXin LI fi' 2564b6cee71dSXin LI postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2565b6cee71dSXin LI dlpath=$dir/\$dldll~ 2566b6cee71dSXin LI $RM \$dlpath' 2567b6cee71dSXin LI shlibpath_overrides_runpath=yes 2568b6cee71dSXin LI 2569b6cee71dSXin LI case $host_os in 2570b6cee71dSXin LI cygwin*) 2571b6cee71dSXin LI # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2572*ae316d1dSXin LI soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2573b6cee71dSXin LIm4_if([$1], [],[ 2574b6cee71dSXin LI sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2575b6cee71dSXin LI ;; 2576b6cee71dSXin LI mingw* | cegcc*) 2577b6cee71dSXin LI # MinGW DLLs use traditional 'lib' prefix 2578d38c30c0SXin LI soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2579b6cee71dSXin LI ;; 2580b6cee71dSXin LI pw32*) 2581b6cee71dSXin LI # pw32 DLLs use 'pw' prefix rather than 'lib' 2582*ae316d1dSXin LI library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2583b6cee71dSXin LI ;; 2584b6cee71dSXin LI esac 2585b6cee71dSXin LI dynamic_linker='Win32 ld.exe' 2586b6cee71dSXin LI ;; 2587b6cee71dSXin LI 2588*ae316d1dSXin LI *,cl* | *,icl*) 2589*ae316d1dSXin LI # Native MSVC or ICC 2590b6cee71dSXin LI libname_spec='$name' 2591d38c30c0SXin LI soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2592d38c30c0SXin LI library_names_spec='$libname.dll.lib' 2593b6cee71dSXin LI 2594b6cee71dSXin LI case $build_os in 2595b6cee71dSXin LI mingw*) 2596b6cee71dSXin LI sys_lib_search_path_spec= 2597b6cee71dSXin LI lt_save_ifs=$IFS 2598b6cee71dSXin LI IFS=';' 2599b6cee71dSXin LI for lt_path in $LIB 2600b6cee71dSXin LI do 2601b6cee71dSXin LI IFS=$lt_save_ifs 2602b6cee71dSXin LI # Let DOS variable expansion print the short 8.3 style file name. 2603b6cee71dSXin LI lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2604b6cee71dSXin LI sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2605b6cee71dSXin LI done 2606b6cee71dSXin LI IFS=$lt_save_ifs 2607b6cee71dSXin LI # Convert to MSYS style. 2608*ae316d1dSXin LI sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2609b6cee71dSXin LI ;; 2610b6cee71dSXin LI cygwin*) 2611b6cee71dSXin LI # Convert to unix form, then to dos form, then back to unix form 2612b6cee71dSXin LI # but this time dos style (no spaces!) so that the unix form looks 2613b6cee71dSXin LI # like /cygdrive/c/PROGRA~1:/cygdr... 2614b6cee71dSXin LI sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2615b6cee71dSXin LI sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2616b6cee71dSXin LI sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2617b6cee71dSXin LI ;; 2618b6cee71dSXin LI *) 2619d38c30c0SXin LI sys_lib_search_path_spec=$LIB 2620b6cee71dSXin LI if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2621b6cee71dSXin LI # It is most probably a Windows format PATH. 2622b6cee71dSXin LI sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2623b6cee71dSXin LI else 2624b6cee71dSXin LI sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2625b6cee71dSXin LI fi 2626b6cee71dSXin LI # FIXME: find the short name or the path components, as spaces are 2627b6cee71dSXin LI # common. (e.g. "Program Files" -> "PROGRA~1") 2628b6cee71dSXin LI ;; 2629b6cee71dSXin LI esac 2630b6cee71dSXin LI 2631b6cee71dSXin LI # DLL is installed to $(libdir)/../bin by postinstall_cmds 2632d38c30c0SXin LI postinstall_cmds='base_file=`basename \$file`~ 2633d38c30c0SXin LI dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2634b6cee71dSXin LI dldir=$destdir/`dirname \$dlpath`~ 2635b6cee71dSXin LI test -d \$dldir || mkdir -p \$dldir~ 2636b6cee71dSXin LI $install_prog $dir/$dlname \$dldir/$dlname' 2637b6cee71dSXin LI postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2638b6cee71dSXin LI dlpath=$dir/\$dldll~ 2639b6cee71dSXin LI $RM \$dlpath' 2640b6cee71dSXin LI shlibpath_overrides_runpath=yes 2641b6cee71dSXin LI dynamic_linker='Win32 link.exe' 2642b6cee71dSXin LI ;; 2643b6cee71dSXin LI 2644b6cee71dSXin LI *) 2645*ae316d1dSXin LI # Assume MSVC and ICC wrapper 2646d38c30c0SXin LI library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2647b6cee71dSXin LI dynamic_linker='Win32 ld.exe' 2648b6cee71dSXin LI ;; 2649b6cee71dSXin LI esac 2650b6cee71dSXin LI # FIXME: first we should search . and the directory the executable is in 2651b6cee71dSXin LI shlibpath_var=PATH 2652b6cee71dSXin LI ;; 2653b6cee71dSXin LI 2654b6cee71dSXin LIdarwin* | rhapsody*) 2655b6cee71dSXin LI dynamic_linker="$host_os dyld" 2656b6cee71dSXin LI version_type=darwin 2657b6cee71dSXin LI need_lib_prefix=no 2658b6cee71dSXin LI need_version=no 2659d38c30c0SXin LI library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2660d38c30c0SXin LI soname_spec='$libname$release$major$shared_ext' 2661b6cee71dSXin LI shlibpath_overrides_runpath=yes 2662b6cee71dSXin LI shlibpath_var=DYLD_LIBRARY_PATH 2663b6cee71dSXin LI shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2664b6cee71dSXin LIm4_if([$1], [],[ 2665b6cee71dSXin LI sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2666b6cee71dSXin LI sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2667b6cee71dSXin LI ;; 2668b6cee71dSXin LI 2669b6cee71dSXin LIdgux*) 2670b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 2671b6cee71dSXin LI need_lib_prefix=no 2672b6cee71dSXin LI need_version=no 2673d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2674d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2675b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 2676b6cee71dSXin LI ;; 2677b6cee71dSXin LI 2678*ae316d1dSXin LIfreebsd* | dragonfly* | midnightbsd*) 2679b6cee71dSXin LI # DragonFly does not have aout. When/if they implement a new 2680b6cee71dSXin LI # versioning mechanism, adjust this. 2681b6cee71dSXin LI if test -x /usr/bin/objformat; then 2682b6cee71dSXin LI objformat=`/usr/bin/objformat` 2683b6cee71dSXin LI else 2684b6cee71dSXin LI case $host_os in 2685b6cee71dSXin LI freebsd[[23]].*) objformat=aout ;; 2686b6cee71dSXin LI *) objformat=elf ;; 2687b6cee71dSXin LI esac 2688b6cee71dSXin LI fi 2689b6cee71dSXin LI version_type=freebsd-$objformat 2690b6cee71dSXin LI case $version_type in 2691b6cee71dSXin LI freebsd-elf*) 2692d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2693d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2694b6cee71dSXin LI need_version=no 2695b6cee71dSXin LI need_lib_prefix=no 2696b6cee71dSXin LI ;; 2697b6cee71dSXin LI freebsd-*) 2698d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2699b6cee71dSXin LI need_version=yes 2700b6cee71dSXin LI ;; 2701b6cee71dSXin LI esac 2702b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 2703b6cee71dSXin LI case $host_os in 2704b6cee71dSXin LI freebsd2.*) 2705b6cee71dSXin LI shlibpath_overrides_runpath=yes 2706b6cee71dSXin LI ;; 2707b6cee71dSXin LI freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2708b6cee71dSXin LI shlibpath_overrides_runpath=yes 2709b6cee71dSXin LI hardcode_into_libs=yes 2710b6cee71dSXin LI ;; 2711b6cee71dSXin LI freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2712b6cee71dSXin LI freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2713b6cee71dSXin LI shlibpath_overrides_runpath=no 2714b6cee71dSXin LI hardcode_into_libs=yes 2715b6cee71dSXin LI ;; 2716b6cee71dSXin LI *) # from 4.6 on, and DragonFly 2717b6cee71dSXin LI shlibpath_overrides_runpath=yes 2718b6cee71dSXin LI hardcode_into_libs=yes 2719b6cee71dSXin LI ;; 2720b6cee71dSXin LI esac 2721b6cee71dSXin LI ;; 2722b6cee71dSXin LI 2723b6cee71dSXin LIhaiku*) 2724b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 2725b6cee71dSXin LI need_lib_prefix=no 2726b6cee71dSXin LI need_version=no 2727b6cee71dSXin LI dynamic_linker="$host_os runtime_loader" 2728d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2729d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2730b6cee71dSXin LI shlibpath_var=LIBRARY_PATH 2731d38c30c0SXin LI shlibpath_overrides_runpath=no 2732b6cee71dSXin LI sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2733b6cee71dSXin LI hardcode_into_libs=yes 2734b6cee71dSXin LI ;; 2735b6cee71dSXin LI 2736b6cee71dSXin LIhpux9* | hpux10* | hpux11*) 2737b6cee71dSXin LI # Give a soname corresponding to the major version so that dld.sl refuses to 2738b6cee71dSXin LI # link against other versions. 2739b6cee71dSXin LI version_type=sunos 2740b6cee71dSXin LI need_lib_prefix=no 2741b6cee71dSXin LI need_version=no 2742b6cee71dSXin LI case $host_cpu in 2743b6cee71dSXin LI ia64*) 2744b6cee71dSXin LI shrext_cmds='.so' 2745b6cee71dSXin LI hardcode_into_libs=yes 2746b6cee71dSXin LI dynamic_linker="$host_os dld.so" 2747b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 2748b6cee71dSXin LI shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2749d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2750d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2751d38c30c0SXin LI if test 32 = "$HPUX_IA64_MODE"; then 2752b6cee71dSXin LI sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2753d38c30c0SXin LI sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2754b6cee71dSXin LI else 2755b6cee71dSXin LI sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2756d38c30c0SXin LI sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2757b6cee71dSXin LI fi 2758b6cee71dSXin LI ;; 2759b6cee71dSXin LI hppa*64*) 2760b6cee71dSXin LI shrext_cmds='.sl' 2761b6cee71dSXin LI hardcode_into_libs=yes 2762b6cee71dSXin LI dynamic_linker="$host_os dld.sl" 2763b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2764b6cee71dSXin LI shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2765d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2766d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2767b6cee71dSXin LI sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2768b6cee71dSXin LI sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2769b6cee71dSXin LI ;; 2770b6cee71dSXin LI *) 2771b6cee71dSXin LI shrext_cmds='.sl' 2772b6cee71dSXin LI dynamic_linker="$host_os dld.sl" 2773b6cee71dSXin LI shlibpath_var=SHLIB_PATH 2774b6cee71dSXin LI shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2775d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2776d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2777b6cee71dSXin LI ;; 2778b6cee71dSXin LI esac 2779b6cee71dSXin LI # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2780b6cee71dSXin LI postinstall_cmds='chmod 555 $lib' 2781b6cee71dSXin LI # or fails outright, so override atomically: 2782b6cee71dSXin LI install_override_mode=555 2783b6cee71dSXin LI ;; 2784b6cee71dSXin LI 2785b6cee71dSXin LIinterix[[3-9]]*) 2786b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 2787b6cee71dSXin LI need_lib_prefix=no 2788b6cee71dSXin LI need_version=no 2789d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2790d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2791b6cee71dSXin LI dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2792b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 2793b6cee71dSXin LI shlibpath_overrides_runpath=no 2794b6cee71dSXin LI hardcode_into_libs=yes 2795b6cee71dSXin LI ;; 2796b6cee71dSXin LI 2797b6cee71dSXin LIirix5* | irix6* | nonstopux*) 2798b6cee71dSXin LI case $host_os in 2799b6cee71dSXin LI nonstopux*) version_type=nonstopux ;; 2800b6cee71dSXin LI *) 2801d38c30c0SXin LI if test yes = "$lt_cv_prog_gnu_ld"; then 2802b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 2803b6cee71dSXin LI else 2804b6cee71dSXin LI version_type=irix 2805b6cee71dSXin LI fi ;; 2806b6cee71dSXin LI esac 2807b6cee71dSXin LI need_lib_prefix=no 2808b6cee71dSXin LI need_version=no 2809d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2810d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2811b6cee71dSXin LI case $host_os in 2812b6cee71dSXin LI irix5* | nonstopux*) 2813b6cee71dSXin LI libsuff= shlibsuff= 2814b6cee71dSXin LI ;; 2815b6cee71dSXin LI *) 2816b6cee71dSXin LI case $LD in # libtool.m4 will add one of these switches to LD 2817b6cee71dSXin LI *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2818b6cee71dSXin LI libsuff= shlibsuff= libmagic=32-bit;; 2819b6cee71dSXin LI *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2820b6cee71dSXin LI libsuff=32 shlibsuff=N32 libmagic=N32;; 2821b6cee71dSXin LI *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2822b6cee71dSXin LI libsuff=64 shlibsuff=64 libmagic=64-bit;; 2823b6cee71dSXin LI *) libsuff= shlibsuff= libmagic=never-match;; 2824b6cee71dSXin LI esac 2825b6cee71dSXin LI ;; 2826b6cee71dSXin LI esac 2827b6cee71dSXin LI shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2828b6cee71dSXin LI shlibpath_overrides_runpath=no 2829d38c30c0SXin LI sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2830d38c30c0SXin LI sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2831b6cee71dSXin LI hardcode_into_libs=yes 2832b6cee71dSXin LI ;; 2833b6cee71dSXin LI 2834b6cee71dSXin LI# No shared lib support for Linux oldld, aout, or coff. 2835b6cee71dSXin LIlinux*oldld* | linux*aout* | linux*coff*) 2836b6cee71dSXin LI dynamic_linker=no 2837b6cee71dSXin LI ;; 2838b6cee71dSXin LI 2839d38c30c0SXin LIlinux*android*) 2840d38c30c0SXin LI version_type=none # Android doesn't support versioned libraries. 2841d38c30c0SXin LI need_lib_prefix=no 2842d38c30c0SXin LI need_version=no 2843d38c30c0SXin LI library_names_spec='$libname$release$shared_ext' 2844d38c30c0SXin LI soname_spec='$libname$release$shared_ext' 2845d38c30c0SXin LI finish_cmds= 2846d38c30c0SXin LI shlibpath_var=LD_LIBRARY_PATH 2847d38c30c0SXin LI shlibpath_overrides_runpath=yes 2848d38c30c0SXin LI 2849d38c30c0SXin LI # This implies no fast_install, which is unacceptable. 2850d38c30c0SXin LI # Some rework will be needed to allow for fast_install 2851d38c30c0SXin LI # before this can be enabled. 2852d38c30c0SXin LI hardcode_into_libs=yes 2853d38c30c0SXin LI 2854d38c30c0SXin LI dynamic_linker='Android linker' 2855d38c30c0SXin LI # Don't embed -rpath directories since the linker doesn't support them. 2856d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2857d38c30c0SXin LI ;; 2858d38c30c0SXin LI 2859b6cee71dSXin LI# This must be glibc/ELF. 2860d38c30c0SXin LIlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2861b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 2862b6cee71dSXin LI need_lib_prefix=no 2863b6cee71dSXin LI need_version=no 2864d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2865d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2866b6cee71dSXin LI finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2867b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 2868b6cee71dSXin LI shlibpath_overrides_runpath=no 2869b6cee71dSXin LI 2870b6cee71dSXin LI # Some binutils ld are patched to set DT_RUNPATH 2871b6cee71dSXin LI AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2872b6cee71dSXin LI [lt_cv_shlibpath_overrides_runpath=no 2873b6cee71dSXin LI save_LDFLAGS=$LDFLAGS 2874b6cee71dSXin LI save_libdir=$libdir 2875b6cee71dSXin LI eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2876b6cee71dSXin LI LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2877b6cee71dSXin LI AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2878b6cee71dSXin LI [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2879b6cee71dSXin LI [lt_cv_shlibpath_overrides_runpath=yes])]) 2880b6cee71dSXin LI LDFLAGS=$save_LDFLAGS 2881b6cee71dSXin LI libdir=$save_libdir 2882b6cee71dSXin LI ]) 2883b6cee71dSXin LI shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2884b6cee71dSXin LI 2885b6cee71dSXin LI # This implies no fast_install, which is unacceptable. 2886b6cee71dSXin LI # Some rework will be needed to allow for fast_install 2887b6cee71dSXin LI # before this can be enabled. 2888b6cee71dSXin LI hardcode_into_libs=yes 2889b6cee71dSXin LI 2890d38c30c0SXin LI # Ideally, we could use ldconfig to report *all* directores which are 2891d38c30c0SXin LI # searched for libraries, however this is still not possible. Aside from not 2892d38c30c0SXin LI # being certain /sbin/ldconfig is available, command 2893d38c30c0SXin LI # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2894d38c30c0SXin LI # even though it is searched at run-time. Try to do the best guess by 2895d38c30c0SXin LI # appending ld.so.conf contents (and includes) to the search path. 2896b6cee71dSXin LI if test -f /etc/ld.so.conf; then 2897b6cee71dSXin LI 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' ' '` 2898b6cee71dSXin LI sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2899b6cee71dSXin LI fi 2900b6cee71dSXin LI 2901b6cee71dSXin LI # We used to test for /lib/ld.so.1 and disable shared libraries on 2902b6cee71dSXin LI # powerpc, because MkLinux only supported shared libraries with the 2903b6cee71dSXin LI # GNU dynamic linker. Since this was broken with cross compilers, 2904b6cee71dSXin LI # most powerpc-linux boxes support dynamic linking these days and 2905b6cee71dSXin LI # people can always --disable-shared, the test was removed, and we 2906b6cee71dSXin LI # assume the GNU/Linux dynamic linker is in use. 2907b6cee71dSXin LI dynamic_linker='GNU/Linux ld.so' 2908b6cee71dSXin LI ;; 2909b6cee71dSXin LI 2910b6cee71dSXin LInetbsd*) 2911b6cee71dSXin LI version_type=sunos 2912b6cee71dSXin LI need_lib_prefix=no 2913b6cee71dSXin LI need_version=no 2914b6cee71dSXin LI if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2915d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2916b6cee71dSXin LI finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2917b6cee71dSXin LI dynamic_linker='NetBSD (a.out) ld.so' 2918b6cee71dSXin LI else 2919d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2920d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2921b6cee71dSXin LI dynamic_linker='NetBSD ld.elf_so' 2922b6cee71dSXin LI fi 2923b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 2924b6cee71dSXin LI shlibpath_overrides_runpath=yes 2925b6cee71dSXin LI hardcode_into_libs=yes 2926b6cee71dSXin LI ;; 2927b6cee71dSXin LI 2928b6cee71dSXin LInewsos6) 2929b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 2930d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2931b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 2932b6cee71dSXin LI shlibpath_overrides_runpath=yes 2933b6cee71dSXin LI ;; 2934b6cee71dSXin LI 2935b6cee71dSXin LI*nto* | *qnx*) 2936b6cee71dSXin LI version_type=qnx 2937b6cee71dSXin LI need_lib_prefix=no 2938b6cee71dSXin LI need_version=no 2939d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2940d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2941b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 2942b6cee71dSXin LI shlibpath_overrides_runpath=no 2943b6cee71dSXin LI hardcode_into_libs=yes 2944b6cee71dSXin LI dynamic_linker='ldqnx.so' 2945b6cee71dSXin LI ;; 2946b6cee71dSXin LI 2947d38c30c0SXin LIopenbsd* | bitrig*) 2948b6cee71dSXin LI version_type=sunos 2949d38c30c0SXin LI sys_lib_dlsearch_path_spec=/usr/lib 2950b6cee71dSXin LI need_lib_prefix=no 2951d38c30c0SXin LI if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2952d38c30c0SXin LI need_version=no 2953d38c30c0SXin LI else 2954d38c30c0SXin LI need_version=yes 2955d38c30c0SXin LI fi 2956d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2957b6cee71dSXin LI finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2958b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 2959b6cee71dSXin LI shlibpath_overrides_runpath=yes 2960b6cee71dSXin LI ;; 2961b6cee71dSXin LI 2962b6cee71dSXin LIos2*) 2963b6cee71dSXin LI libname_spec='$name' 2964d38c30c0SXin LI version_type=windows 2965d38c30c0SXin LI shrext_cmds=.dll 2966d38c30c0SXin LI need_version=no 2967b6cee71dSXin LI need_lib_prefix=no 2968d38c30c0SXin LI # OS/2 can only load a DLL with a base name of 8 characters or less. 2969d38c30c0SXin LI soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2970d38c30c0SXin LI v=$($ECHO $release$versuffix | tr -d .-); 2971d38c30c0SXin LI n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2972d38c30c0SXin LI $ECHO $n$v`$shared_ext' 2973d38c30c0SXin LI library_names_spec='${libname}_dll.$libext' 2974b6cee71dSXin LI dynamic_linker='OS/2 ld.exe' 2975d38c30c0SXin LI shlibpath_var=BEGINLIBPATH 2976d38c30c0SXin LI sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2977d38c30c0SXin LI sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2978d38c30c0SXin LI postinstall_cmds='base_file=`basename \$file`~ 2979d38c30c0SXin LI dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2980d38c30c0SXin LI dldir=$destdir/`dirname \$dlpath`~ 2981d38c30c0SXin LI test -d \$dldir || mkdir -p \$dldir~ 2982d38c30c0SXin LI $install_prog $dir/$dlname \$dldir/$dlname~ 2983d38c30c0SXin LI chmod a+x \$dldir/$dlname~ 2984d38c30c0SXin LI if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2985d38c30c0SXin LI eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2986d38c30c0SXin LI fi' 2987d38c30c0SXin LI postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2988d38c30c0SXin LI dlpath=$dir/\$dldll~ 2989d38c30c0SXin LI $RM \$dlpath' 2990b6cee71dSXin LI ;; 2991b6cee71dSXin LI 2992b6cee71dSXin LIosf3* | osf4* | osf5*) 2993b6cee71dSXin LI version_type=osf 2994b6cee71dSXin LI need_lib_prefix=no 2995b6cee71dSXin LI need_version=no 2996d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 2997d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2998b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 2999b6cee71dSXin LI sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3000d38c30c0SXin LI sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3001b6cee71dSXin LI ;; 3002b6cee71dSXin LI 3003b6cee71dSXin LIrdos*) 3004b6cee71dSXin LI dynamic_linker=no 3005b6cee71dSXin LI ;; 3006b6cee71dSXin LI 3007b6cee71dSXin LIsolaris*) 3008b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 3009b6cee71dSXin LI need_lib_prefix=no 3010b6cee71dSXin LI need_version=no 3011d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3012d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 3013b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 3014b6cee71dSXin LI shlibpath_overrides_runpath=yes 3015b6cee71dSXin LI hardcode_into_libs=yes 3016b6cee71dSXin LI # ldd complains unless libraries are executable 3017b6cee71dSXin LI postinstall_cmds='chmod +x $lib' 3018b6cee71dSXin LI ;; 3019b6cee71dSXin LI 3020b6cee71dSXin LIsunos4*) 3021b6cee71dSXin LI version_type=sunos 3022d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3023b6cee71dSXin LI finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3024b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 3025b6cee71dSXin LI shlibpath_overrides_runpath=yes 3026d38c30c0SXin LI if test yes = "$with_gnu_ld"; then 3027b6cee71dSXin LI need_lib_prefix=no 3028b6cee71dSXin LI fi 3029b6cee71dSXin LI need_version=yes 3030b6cee71dSXin LI ;; 3031b6cee71dSXin LI 3032b6cee71dSXin LIsysv4 | sysv4.3*) 3033b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 3034d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3035d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 3036b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 3037b6cee71dSXin LI case $host_vendor in 3038b6cee71dSXin LI sni) 3039b6cee71dSXin LI shlibpath_overrides_runpath=no 3040b6cee71dSXin LI need_lib_prefix=no 3041b6cee71dSXin LI runpath_var=LD_RUN_PATH 3042b6cee71dSXin LI ;; 3043b6cee71dSXin LI siemens) 3044b6cee71dSXin LI need_lib_prefix=no 3045b6cee71dSXin LI ;; 3046b6cee71dSXin LI motorola) 3047b6cee71dSXin LI need_lib_prefix=no 3048b6cee71dSXin LI need_version=no 3049b6cee71dSXin LI shlibpath_overrides_runpath=no 3050b6cee71dSXin LI sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3051b6cee71dSXin LI ;; 3052b6cee71dSXin LI esac 3053b6cee71dSXin LI ;; 3054b6cee71dSXin LI 3055b6cee71dSXin LIsysv4*MP*) 3056b6cee71dSXin LI if test -d /usr/nec; then 3057b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 3058d38c30c0SXin LI library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3059d38c30c0SXin LI soname_spec='$libname$shared_ext.$major' 3060b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 3061b6cee71dSXin LI fi 3062b6cee71dSXin LI ;; 3063b6cee71dSXin LI 3064b6cee71dSXin LIsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3065d38c30c0SXin LI version_type=sco 3066b6cee71dSXin LI need_lib_prefix=no 3067b6cee71dSXin LI need_version=no 3068d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3069d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 3070b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 3071b6cee71dSXin LI shlibpath_overrides_runpath=yes 3072b6cee71dSXin LI hardcode_into_libs=yes 3073d38c30c0SXin LI if test yes = "$with_gnu_ld"; then 3074b6cee71dSXin LI sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3075b6cee71dSXin LI else 3076b6cee71dSXin LI sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3077b6cee71dSXin LI case $host_os in 3078b6cee71dSXin LI sco3.2v5*) 3079b6cee71dSXin LI sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3080b6cee71dSXin LI ;; 3081b6cee71dSXin LI esac 3082b6cee71dSXin LI fi 3083b6cee71dSXin LI sys_lib_dlsearch_path_spec='/usr/lib' 3084b6cee71dSXin LI ;; 3085b6cee71dSXin LI 3086b6cee71dSXin LItpf*) 3087b6cee71dSXin LI # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3088b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 3089b6cee71dSXin LI need_lib_prefix=no 3090b6cee71dSXin LI need_version=no 3091d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3092b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 3093b6cee71dSXin LI shlibpath_overrides_runpath=no 3094b6cee71dSXin LI hardcode_into_libs=yes 3095b6cee71dSXin LI ;; 3096b6cee71dSXin LI 3097b6cee71dSXin LIuts4*) 3098b6cee71dSXin LI version_type=linux # correct to gnu/linux during the next big refactor 3099d38c30c0SXin LI library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3100d38c30c0SXin LI soname_spec='$libname$release$shared_ext$major' 3101b6cee71dSXin LI shlibpath_var=LD_LIBRARY_PATH 3102b6cee71dSXin LI ;; 3103b6cee71dSXin LI 3104b6cee71dSXin LI*) 3105b6cee71dSXin LI dynamic_linker=no 3106b6cee71dSXin LI ;; 3107b6cee71dSXin LIesac 3108b6cee71dSXin LIAC_MSG_RESULT([$dynamic_linker]) 3109d38c30c0SXin LItest no = "$dynamic_linker" && can_build_shared=no 3110b6cee71dSXin LI 3111b6cee71dSXin LIvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3112d38c30c0SXin LIif test yes = "$GCC"; then 3113b6cee71dSXin LI variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3114b6cee71dSXin LIfi 3115b6cee71dSXin LI 3116d38c30c0SXin LIif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3117d38c30c0SXin LI sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3118b6cee71dSXin LIfi 3119d38c30c0SXin LI 3120d38c30c0SXin LIif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3121d38c30c0SXin LI sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3122b6cee71dSXin LIfi 3123b6cee71dSXin LI 3124d38c30c0SXin LI# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3125d38c30c0SXin LIconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3126d38c30c0SXin LI 3127d38c30c0SXin LI# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3128d38c30c0SXin LIfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3129d38c30c0SXin LI 3130d38c30c0SXin LI# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3131d38c30c0SXin LIconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3132d38c30c0SXin LI 3133b6cee71dSXin LI_LT_DECL([], [variables_saved_for_relink], [1], 3134b6cee71dSXin LI [Variables whose values should be saved in libtool wrapper scripts and 3135b6cee71dSXin LI restored at link time]) 3136b6cee71dSXin LI_LT_DECL([], [need_lib_prefix], [0], 3137b6cee71dSXin LI [Do we need the "lib" prefix for modules?]) 3138b6cee71dSXin LI_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3139b6cee71dSXin LI_LT_DECL([], [version_type], [0], [Library versioning type]) 3140b6cee71dSXin LI_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3141b6cee71dSXin LI_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3142b6cee71dSXin LI_LT_DECL([], [shlibpath_overrides_runpath], [0], 3143b6cee71dSXin LI [Is shlibpath searched before the hard-coded library search path?]) 3144b6cee71dSXin LI_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3145b6cee71dSXin LI_LT_DECL([], [library_names_spec], [1], 3146b6cee71dSXin LI [[List of archive names. First name is the real one, the rest are links. 3147b6cee71dSXin LI The last name is the one that the linker finds with -lNAME]]) 3148b6cee71dSXin LI_LT_DECL([], [soname_spec], [1], 3149b6cee71dSXin LI [[The coded name of the library, if different from the real name]]) 3150b6cee71dSXin LI_LT_DECL([], [install_override_mode], [1], 3151b6cee71dSXin LI [Permission mode override for installation of shared libraries]) 3152b6cee71dSXin LI_LT_DECL([], [postinstall_cmds], [2], 3153b6cee71dSXin LI [Command to use after installation of a shared archive]) 3154b6cee71dSXin LI_LT_DECL([], [postuninstall_cmds], [2], 3155b6cee71dSXin LI [Command to use after uninstallation of a shared archive]) 3156b6cee71dSXin LI_LT_DECL([], [finish_cmds], [2], 3157b6cee71dSXin LI [Commands used to finish a libtool library installation in a directory]) 3158b6cee71dSXin LI_LT_DECL([], [finish_eval], [1], 3159b6cee71dSXin LI [[As "finish_cmds", except a single script fragment to be evaled but 3160b6cee71dSXin LI not shown]]) 3161b6cee71dSXin LI_LT_DECL([], [hardcode_into_libs], [0], 3162b6cee71dSXin LI [Whether we should hardcode library paths into libraries]) 3163b6cee71dSXin LI_LT_DECL([], [sys_lib_search_path_spec], [2], 3164b6cee71dSXin LI [Compile-time system search path for libraries]) 3165d38c30c0SXin LI_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3166d38c30c0SXin LI [Detected run-time system search path for libraries]) 3167d38c30c0SXin LI_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3168d38c30c0SXin LI [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3169b6cee71dSXin LI])# _LT_SYS_DYNAMIC_LINKER 3170b6cee71dSXin LI 3171b6cee71dSXin LI 3172b6cee71dSXin LI# _LT_PATH_TOOL_PREFIX(TOOL) 3173b6cee71dSXin LI# -------------------------- 3174d38c30c0SXin LI# find a file program that can recognize shared library 3175b6cee71dSXin LIAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3176b6cee71dSXin LI[m4_require([_LT_DECL_EGREP])dnl 3177b6cee71dSXin LIAC_MSG_CHECKING([for $1]) 3178b6cee71dSXin LIAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3179b6cee71dSXin LI[case $MAGIC_CMD in 3180b6cee71dSXin LI[[\\/*] | ?:[\\/]*]) 3181d38c30c0SXin LI lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3182b6cee71dSXin LI ;; 3183b6cee71dSXin LI*) 3184d38c30c0SXin LI lt_save_MAGIC_CMD=$MAGIC_CMD 3185d38c30c0SXin LI lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3186b6cee71dSXin LIdnl $ac_dummy forces splitting on constant user-supplied paths. 3187b6cee71dSXin LIdnl POSIX.2 word splitting is done only on the output of word expansions, 3188b6cee71dSXin LIdnl not every word. This closes a longstanding sh security hole. 3189b6cee71dSXin LI ac_dummy="m4_if([$2], , $PATH, [$2])" 3190b6cee71dSXin LI for ac_dir in $ac_dummy; do 3191d38c30c0SXin LI IFS=$lt_save_ifs 3192b6cee71dSXin LI test -z "$ac_dir" && ac_dir=. 3193d38c30c0SXin LI if test -f "$ac_dir/$1"; then 3194d38c30c0SXin LI lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3195b6cee71dSXin LI if test -n "$file_magic_test_file"; then 3196b6cee71dSXin LI case $deplibs_check_method in 3197b6cee71dSXin LI "file_magic "*) 3198b6cee71dSXin LI file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3199d38c30c0SXin LI MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3200b6cee71dSXin LI if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3201b6cee71dSXin LI $EGREP "$file_magic_regex" > /dev/null; then 3202b6cee71dSXin LI : 3203b6cee71dSXin LI else 3204b6cee71dSXin LI cat <<_LT_EOF 1>&2 3205b6cee71dSXin LI 3206b6cee71dSXin LI*** Warning: the command libtool uses to detect shared libraries, 3207b6cee71dSXin LI*** $file_magic_cmd, produces output that libtool cannot recognize. 3208b6cee71dSXin LI*** The result is that libtool may fail to recognize shared libraries 3209b6cee71dSXin LI*** as such. This will affect the creation of libtool libraries that 3210b6cee71dSXin LI*** depend on shared libraries, but programs linked with such libtool 3211b6cee71dSXin LI*** libraries will work regardless of this problem. Nevertheless, you 3212b6cee71dSXin LI*** may want to report the problem to your system manager and/or to 3213b6cee71dSXin LI*** bug-libtool@gnu.org 3214b6cee71dSXin LI 3215b6cee71dSXin LI_LT_EOF 3216b6cee71dSXin LI fi ;; 3217b6cee71dSXin LI esac 3218b6cee71dSXin LI fi 3219b6cee71dSXin LI break 3220b6cee71dSXin LI fi 3221b6cee71dSXin LI done 3222d38c30c0SXin LI IFS=$lt_save_ifs 3223d38c30c0SXin LI MAGIC_CMD=$lt_save_MAGIC_CMD 3224b6cee71dSXin LI ;; 3225b6cee71dSXin LIesac]) 3226d38c30c0SXin LIMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3227b6cee71dSXin LIif test -n "$MAGIC_CMD"; then 3228b6cee71dSXin LI AC_MSG_RESULT($MAGIC_CMD) 3229b6cee71dSXin LIelse 3230b6cee71dSXin LI AC_MSG_RESULT(no) 3231b6cee71dSXin LIfi 3232b6cee71dSXin LI_LT_DECL([], [MAGIC_CMD], [0], 3233b6cee71dSXin LI [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3234b6cee71dSXin LI])# _LT_PATH_TOOL_PREFIX 3235b6cee71dSXin LI 3236b6cee71dSXin LI# Old name: 3237b6cee71dSXin LIAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3238b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 3239b6cee71dSXin LIdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3240b6cee71dSXin LI 3241b6cee71dSXin LI 3242b6cee71dSXin LI# _LT_PATH_MAGIC 3243b6cee71dSXin LI# -------------- 3244d38c30c0SXin LI# find a file program that can recognize a shared library 3245b6cee71dSXin LIm4_defun([_LT_PATH_MAGIC], 3246b6cee71dSXin LI[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3247b6cee71dSXin LIif test -z "$lt_cv_path_MAGIC_CMD"; then 3248b6cee71dSXin LI if test -n "$ac_tool_prefix"; then 3249b6cee71dSXin LI _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3250b6cee71dSXin LI else 3251b6cee71dSXin LI MAGIC_CMD=: 3252b6cee71dSXin LI fi 3253b6cee71dSXin LIfi 3254b6cee71dSXin LI])# _LT_PATH_MAGIC 3255b6cee71dSXin LI 3256b6cee71dSXin LI 3257b6cee71dSXin LI# LT_PATH_LD 3258b6cee71dSXin LI# ---------- 3259b6cee71dSXin LI# find the pathname to the GNU or non-GNU linker 3260b6cee71dSXin LIAC_DEFUN([LT_PATH_LD], 3261b6cee71dSXin LI[AC_REQUIRE([AC_PROG_CC])dnl 3262b6cee71dSXin LIAC_REQUIRE([AC_CANONICAL_HOST])dnl 3263b6cee71dSXin LIAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3264b6cee71dSXin LIm4_require([_LT_DECL_SED])dnl 3265b6cee71dSXin LIm4_require([_LT_DECL_EGREP])dnl 3266b6cee71dSXin LIm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3267b6cee71dSXin LI 3268b6cee71dSXin LIAC_ARG_WITH([gnu-ld], 3269b6cee71dSXin LI [AS_HELP_STRING([--with-gnu-ld], 3270b6cee71dSXin LI [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3271d38c30c0SXin LI [test no = "$withval" || with_gnu_ld=yes], 3272b6cee71dSXin LI [with_gnu_ld=no])dnl 3273b6cee71dSXin LI 3274b6cee71dSXin LIac_prog=ld 3275d38c30c0SXin LIif test yes = "$GCC"; then 3276b6cee71dSXin LI # Check if gcc -print-prog-name=ld gives a path. 3277b6cee71dSXin LI AC_MSG_CHECKING([for ld used by $CC]) 3278b6cee71dSXin LI case $host in 3279b6cee71dSXin LI *-*-mingw*) 3280d38c30c0SXin LI # gcc leaves a trailing carriage return, which upsets mingw 3281b6cee71dSXin LI ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3282b6cee71dSXin LI *) 3283b6cee71dSXin LI ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3284b6cee71dSXin LI esac 3285b6cee71dSXin LI case $ac_prog in 3286b6cee71dSXin LI # Accept absolute paths. 3287b6cee71dSXin LI [[\\/]]* | ?:[[\\/]]*) 3288b6cee71dSXin LI re_direlt='/[[^/]][[^/]]*/\.\./' 3289b6cee71dSXin LI # Canonicalize the pathname of ld 3290b6cee71dSXin LI ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3291b6cee71dSXin LI while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3292b6cee71dSXin LI ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3293b6cee71dSXin LI done 3294d38c30c0SXin LI test -z "$LD" && LD=$ac_prog 3295b6cee71dSXin LI ;; 3296b6cee71dSXin LI "") 3297b6cee71dSXin LI # If it fails, then pretend we aren't using GCC. 3298b6cee71dSXin LI ac_prog=ld 3299b6cee71dSXin LI ;; 3300b6cee71dSXin LI *) 3301b6cee71dSXin LI # If it is relative, then search for the first ld in PATH. 3302b6cee71dSXin LI with_gnu_ld=unknown 3303b6cee71dSXin LI ;; 3304b6cee71dSXin LI esac 3305d38c30c0SXin LIelif test yes = "$with_gnu_ld"; then 3306b6cee71dSXin LI AC_MSG_CHECKING([for GNU ld]) 3307b6cee71dSXin LIelse 3308b6cee71dSXin LI AC_MSG_CHECKING([for non-GNU ld]) 3309b6cee71dSXin LIfi 3310b6cee71dSXin LIAC_CACHE_VAL(lt_cv_path_LD, 3311b6cee71dSXin LI[if test -z "$LD"; then 3312d38c30c0SXin LI lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3313b6cee71dSXin LI for ac_dir in $PATH; do 3314d38c30c0SXin LI IFS=$lt_save_ifs 3315b6cee71dSXin LI test -z "$ac_dir" && ac_dir=. 3316b6cee71dSXin LI if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3317d38c30c0SXin LI lt_cv_path_LD=$ac_dir/$ac_prog 3318b6cee71dSXin LI # Check to see if the program is GNU ld. I'd rather use --version, 3319b6cee71dSXin LI # but apparently some variants of GNU ld only accept -v. 3320b6cee71dSXin LI # Break only if it was the GNU/non-GNU ld that we prefer. 3321b6cee71dSXin LI case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3322b6cee71dSXin LI *GNU* | *'with BFD'*) 3323d38c30c0SXin LI test no != "$with_gnu_ld" && break 3324b6cee71dSXin LI ;; 3325b6cee71dSXin LI *) 3326d38c30c0SXin LI test yes != "$with_gnu_ld" && break 3327b6cee71dSXin LI ;; 3328b6cee71dSXin LI esac 3329b6cee71dSXin LI fi 3330b6cee71dSXin LI done 3331d38c30c0SXin LI IFS=$lt_save_ifs 3332b6cee71dSXin LIelse 3333d38c30c0SXin LI lt_cv_path_LD=$LD # Let the user override the test with a path. 3334b6cee71dSXin LIfi]) 3335d38c30c0SXin LILD=$lt_cv_path_LD 3336b6cee71dSXin LIif test -n "$LD"; then 3337b6cee71dSXin LI AC_MSG_RESULT($LD) 3338b6cee71dSXin LIelse 3339b6cee71dSXin LI AC_MSG_RESULT(no) 3340b6cee71dSXin LIfi 3341b6cee71dSXin LItest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3342b6cee71dSXin LI_LT_PATH_LD_GNU 3343b6cee71dSXin LIAC_SUBST([LD]) 3344b6cee71dSXin LI 3345b6cee71dSXin LI_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3346b6cee71dSXin LI])# LT_PATH_LD 3347b6cee71dSXin LI 3348b6cee71dSXin LI# Old names: 3349b6cee71dSXin LIAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3350b6cee71dSXin LIAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3351b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 3352b6cee71dSXin LIdnl AC_DEFUN([AM_PROG_LD], []) 3353b6cee71dSXin LIdnl AC_DEFUN([AC_PROG_LD], []) 3354b6cee71dSXin LI 3355b6cee71dSXin LI 3356b6cee71dSXin LI# _LT_PATH_LD_GNU 3357b6cee71dSXin LI#- -------------- 3358b6cee71dSXin LIm4_defun([_LT_PATH_LD_GNU], 3359b6cee71dSXin LI[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3360b6cee71dSXin LI[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3361b6cee71dSXin LIcase `$LD -v 2>&1 </dev/null` in 3362b6cee71dSXin LI*GNU* | *'with BFD'*) 3363b6cee71dSXin LI lt_cv_prog_gnu_ld=yes 3364b6cee71dSXin LI ;; 3365b6cee71dSXin LI*) 3366b6cee71dSXin LI lt_cv_prog_gnu_ld=no 3367b6cee71dSXin LI ;; 3368b6cee71dSXin LIesac]) 3369b6cee71dSXin LIwith_gnu_ld=$lt_cv_prog_gnu_ld 3370b6cee71dSXin LI])# _LT_PATH_LD_GNU 3371b6cee71dSXin LI 3372b6cee71dSXin LI 3373b6cee71dSXin LI# _LT_CMD_RELOAD 3374b6cee71dSXin LI# -------------- 3375b6cee71dSXin LI# find reload flag for linker 3376b6cee71dSXin LI# -- PORTME Some linkers may need a different reload flag. 3377b6cee71dSXin LIm4_defun([_LT_CMD_RELOAD], 3378b6cee71dSXin LI[AC_CACHE_CHECK([for $LD option to reload object files], 3379b6cee71dSXin LI lt_cv_ld_reload_flag, 3380b6cee71dSXin LI [lt_cv_ld_reload_flag='-r']) 3381b6cee71dSXin LIreload_flag=$lt_cv_ld_reload_flag 3382b6cee71dSXin LIcase $reload_flag in 3383b6cee71dSXin LI"" | " "*) ;; 3384b6cee71dSXin LI*) reload_flag=" $reload_flag" ;; 3385b6cee71dSXin LIesac 3386b6cee71dSXin LIreload_cmds='$LD$reload_flag -o $output$reload_objs' 3387b6cee71dSXin LIcase $host_os in 3388b6cee71dSXin LI cygwin* | mingw* | pw32* | cegcc*) 3389d38c30c0SXin LI if test yes != "$GCC"; then 3390b6cee71dSXin LI reload_cmds=false 3391b6cee71dSXin LI fi 3392b6cee71dSXin LI ;; 3393b6cee71dSXin LI darwin*) 3394d38c30c0SXin LI if test yes = "$GCC"; then 3395d38c30c0SXin LI reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3396b6cee71dSXin LI else 3397b6cee71dSXin LI reload_cmds='$LD$reload_flag -o $output$reload_objs' 3398b6cee71dSXin LI fi 3399b6cee71dSXin LI ;; 3400b6cee71dSXin LIesac 3401b6cee71dSXin LI_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3402b6cee71dSXin LI_LT_TAGDECL([], [reload_cmds], [2])dnl 3403b6cee71dSXin LI])# _LT_CMD_RELOAD 3404b6cee71dSXin LI 3405b6cee71dSXin LI 3406d38c30c0SXin LI# _LT_PATH_DD 3407d38c30c0SXin LI# ----------- 3408d38c30c0SXin LI# find a working dd 3409d38c30c0SXin LIm4_defun([_LT_PATH_DD], 3410d38c30c0SXin LI[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3411d38c30c0SXin LI[printf 0123456789abcdef0123456789abcdef >conftest.i 3412d38c30c0SXin LIcat conftest.i conftest.i >conftest2.i 3413d38c30c0SXin LI: ${lt_DD:=$DD} 3414d38c30c0SXin LIAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3415d38c30c0SXin LI[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3416d38c30c0SXin LI cmp -s conftest.i conftest.out \ 3417d38c30c0SXin LI && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3418d38c30c0SXin LIfi]) 3419d38c30c0SXin LIrm -f conftest.i conftest2.i conftest.out]) 3420d38c30c0SXin LI])# _LT_PATH_DD 3421d38c30c0SXin LI 3422d38c30c0SXin LI 3423d38c30c0SXin LI# _LT_CMD_TRUNCATE 3424d38c30c0SXin LI# ---------------- 3425d38c30c0SXin LI# find command to truncate a binary pipe 3426d38c30c0SXin LIm4_defun([_LT_CMD_TRUNCATE], 3427d38c30c0SXin LI[m4_require([_LT_PATH_DD]) 3428d38c30c0SXin LIAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3429d38c30c0SXin LI[printf 0123456789abcdef0123456789abcdef >conftest.i 3430d38c30c0SXin LIcat conftest.i conftest.i >conftest2.i 3431d38c30c0SXin LIlt_cv_truncate_bin= 3432d38c30c0SXin LIif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3433d38c30c0SXin LI cmp -s conftest.i conftest.out \ 3434d38c30c0SXin LI && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3435d38c30c0SXin LIfi 3436d38c30c0SXin LIrm -f conftest.i conftest2.i conftest.out 3437d38c30c0SXin LItest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3438d38c30c0SXin LI_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3439d38c30c0SXin LI [Command to truncate a binary pipe]) 3440d38c30c0SXin LI])# _LT_CMD_TRUNCATE 3441d38c30c0SXin LI 3442d38c30c0SXin LI 3443b6cee71dSXin LI# _LT_CHECK_MAGIC_METHOD 3444b6cee71dSXin LI# ---------------------- 3445b6cee71dSXin LI# how to check for library dependencies 3446b6cee71dSXin LI# -- PORTME fill in with the dynamic library characteristics 3447b6cee71dSXin LIm4_defun([_LT_CHECK_MAGIC_METHOD], 3448b6cee71dSXin LI[m4_require([_LT_DECL_EGREP]) 3449b6cee71dSXin LIm4_require([_LT_DECL_OBJDUMP]) 3450b6cee71dSXin LIAC_CACHE_CHECK([how to recognize dependent libraries], 3451b6cee71dSXin LIlt_cv_deplibs_check_method, 3452b6cee71dSXin LI[lt_cv_file_magic_cmd='$MAGIC_CMD' 3453b6cee71dSXin LIlt_cv_file_magic_test_file= 3454b6cee71dSXin LIlt_cv_deplibs_check_method='unknown' 3455b6cee71dSXin LI# Need to set the preceding variable on all platforms that support 3456b6cee71dSXin LI# interlibrary dependencies. 3457b6cee71dSXin LI# 'none' -- dependencies not supported. 3458d38c30c0SXin LI# 'unknown' -- same as none, but documents that we really don't know. 3459b6cee71dSXin LI# 'pass_all' -- all dependencies passed with no checks. 3460b6cee71dSXin LI# 'test_compile' -- check by making test program. 3461b6cee71dSXin LI# 'file_magic [[regex]]' -- check by looking for files in library path 3462d38c30c0SXin LI# that responds to the $file_magic_cmd with a given extended regex. 3463d38c30c0SXin LI# If you have 'file' or equivalent on your system and you're not sure 3464d38c30c0SXin LI# whether 'pass_all' will *always* work, you probably want this one. 3465b6cee71dSXin LI 3466b6cee71dSXin LIcase $host_os in 3467b6cee71dSXin LIaix[[4-9]]*) 3468b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3469b6cee71dSXin LI ;; 3470b6cee71dSXin LI 3471b6cee71dSXin LIbeos*) 3472b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3473b6cee71dSXin LI ;; 3474b6cee71dSXin LI 3475b6cee71dSXin LIbsdi[[45]]*) 3476b6cee71dSXin LI lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3477*ae316d1dSXin LI lt_cv_file_magic_cmd='$FILECMD -L' 3478b6cee71dSXin LI lt_cv_file_magic_test_file=/shlib/libc.so 3479b6cee71dSXin LI ;; 3480b6cee71dSXin LI 3481b6cee71dSXin LIcygwin*) 3482b6cee71dSXin LI # func_win32_libid is a shell function defined in ltmain.sh 3483b6cee71dSXin LI lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3484b6cee71dSXin LI lt_cv_file_magic_cmd='func_win32_libid' 3485b6cee71dSXin LI ;; 3486b6cee71dSXin LI 3487b6cee71dSXin LImingw* | pw32*) 3488b6cee71dSXin LI # Base MSYS/MinGW do not provide the 'file' command needed by 3489b6cee71dSXin LI # func_win32_libid shell function, so use a weaker test based on 'objdump', 3490b6cee71dSXin LI # unless we find 'file', for example because we are cross-compiling. 3491d38c30c0SXin LI if ( file / ) >/dev/null 2>&1; then 3492b6cee71dSXin LI lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3493b6cee71dSXin LI lt_cv_file_magic_cmd='func_win32_libid' 3494b6cee71dSXin LI else 3495b6cee71dSXin LI # Keep this pattern in sync with the one in func_win32_libid. 3496b6cee71dSXin LI lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3497b6cee71dSXin LI lt_cv_file_magic_cmd='$OBJDUMP -f' 3498b6cee71dSXin LI fi 3499b6cee71dSXin LI ;; 3500b6cee71dSXin LI 3501b6cee71dSXin LIcegcc*) 3502b6cee71dSXin LI # use the weaker test based on 'objdump'. See mingw*. 3503b6cee71dSXin LI lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3504b6cee71dSXin LI lt_cv_file_magic_cmd='$OBJDUMP -f' 3505b6cee71dSXin LI ;; 3506b6cee71dSXin LI 3507b6cee71dSXin LIdarwin* | rhapsody*) 3508b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3509b6cee71dSXin LI ;; 3510b6cee71dSXin LI 3511*ae316d1dSXin LIfreebsd* | dragonfly* | midnightbsd*) 3512b6cee71dSXin LI if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3513b6cee71dSXin LI case $host_cpu in 3514b6cee71dSXin LI i*86 ) 3515b6cee71dSXin LI # Not sure whether the presence of OpenBSD here was a mistake. 3516b6cee71dSXin LI # Let's accept both of them until this is cleared up. 3517b6cee71dSXin LI lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3518*ae316d1dSXin LI lt_cv_file_magic_cmd=$FILECMD 3519b6cee71dSXin LI lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3520b6cee71dSXin LI ;; 3521b6cee71dSXin LI esac 3522b6cee71dSXin LI else 3523b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3524b6cee71dSXin LI fi 3525b6cee71dSXin LI ;; 3526b6cee71dSXin LI 3527b6cee71dSXin LIhaiku*) 3528b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3529b6cee71dSXin LI ;; 3530b6cee71dSXin LI 3531b6cee71dSXin LIhpux10.20* | hpux11*) 3532*ae316d1dSXin LI lt_cv_file_magic_cmd=$FILECMD 3533b6cee71dSXin LI case $host_cpu in 3534b6cee71dSXin LI ia64*) 3535b6cee71dSXin LI lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3536b6cee71dSXin LI lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3537b6cee71dSXin LI ;; 3538b6cee71dSXin LI hppa*64*) 3539b6cee71dSXin LI [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]'] 3540b6cee71dSXin LI lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3541b6cee71dSXin LI ;; 3542b6cee71dSXin LI *) 3543b6cee71dSXin LI lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3544b6cee71dSXin LI lt_cv_file_magic_test_file=/usr/lib/libc.sl 3545b6cee71dSXin LI ;; 3546b6cee71dSXin LI esac 3547b6cee71dSXin LI ;; 3548b6cee71dSXin LI 3549b6cee71dSXin LIinterix[[3-9]]*) 3550b6cee71dSXin LI # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3551b6cee71dSXin LI lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3552b6cee71dSXin LI ;; 3553b6cee71dSXin LI 3554b6cee71dSXin LIirix5* | irix6* | nonstopux*) 3555b6cee71dSXin LI case $LD in 3556b6cee71dSXin LI *-32|*"-32 ") libmagic=32-bit;; 3557b6cee71dSXin LI *-n32|*"-n32 ") libmagic=N32;; 3558b6cee71dSXin LI *-64|*"-64 ") libmagic=64-bit;; 3559b6cee71dSXin LI *) libmagic=never-match;; 3560b6cee71dSXin LI esac 3561b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3562b6cee71dSXin LI ;; 3563b6cee71dSXin LI 3564b6cee71dSXin LI# This must be glibc/ELF. 3565d38c30c0SXin LIlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3566b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3567b6cee71dSXin LI ;; 3568b6cee71dSXin LI 3569b6cee71dSXin LInetbsd*) 3570b6cee71dSXin LI if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3571b6cee71dSXin LI lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3572b6cee71dSXin LI else 3573b6cee71dSXin LI lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3574b6cee71dSXin LI fi 3575b6cee71dSXin LI ;; 3576b6cee71dSXin LI 3577b6cee71dSXin LInewos6*) 3578b6cee71dSXin LI lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3579*ae316d1dSXin LI lt_cv_file_magic_cmd=$FILECMD 3580b6cee71dSXin LI lt_cv_file_magic_test_file=/usr/lib/libnls.so 3581b6cee71dSXin LI ;; 3582b6cee71dSXin LI 3583b6cee71dSXin LI*nto* | *qnx*) 3584b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3585b6cee71dSXin LI ;; 3586b6cee71dSXin LI 3587d38c30c0SXin LIopenbsd* | bitrig*) 3588d38c30c0SXin LI if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3589b6cee71dSXin LI lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3590b6cee71dSXin LI else 3591b6cee71dSXin LI lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3592b6cee71dSXin LI fi 3593b6cee71dSXin LI ;; 3594b6cee71dSXin LI 3595b6cee71dSXin LIosf3* | osf4* | osf5*) 3596b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3597b6cee71dSXin LI ;; 3598b6cee71dSXin LI 3599b6cee71dSXin LIrdos*) 3600b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3601b6cee71dSXin LI ;; 3602b6cee71dSXin LI 3603b6cee71dSXin LIsolaris*) 3604b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3605b6cee71dSXin LI ;; 3606b6cee71dSXin LI 3607b6cee71dSXin LIsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3608b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3609b6cee71dSXin LI ;; 3610b6cee71dSXin LI 3611b6cee71dSXin LIsysv4 | sysv4.3*) 3612b6cee71dSXin LI case $host_vendor in 3613b6cee71dSXin LI motorola) 3614b6cee71dSXin LI 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]]' 3615b6cee71dSXin LI lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3616b6cee71dSXin LI ;; 3617b6cee71dSXin LI ncr) 3618b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3619b6cee71dSXin LI ;; 3620b6cee71dSXin LI sequent) 3621b6cee71dSXin LI lt_cv_file_magic_cmd='/bin/file' 3622b6cee71dSXin LI lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3623b6cee71dSXin LI ;; 3624b6cee71dSXin LI sni) 3625b6cee71dSXin LI lt_cv_file_magic_cmd='/bin/file' 3626b6cee71dSXin LI lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3627b6cee71dSXin LI lt_cv_file_magic_test_file=/lib/libc.so 3628b6cee71dSXin LI ;; 3629b6cee71dSXin LI siemens) 3630b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3631b6cee71dSXin LI ;; 3632b6cee71dSXin LI pc) 3633b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3634b6cee71dSXin LI ;; 3635b6cee71dSXin LI esac 3636b6cee71dSXin LI ;; 3637b6cee71dSXin LI 3638b6cee71dSXin LItpf*) 3639b6cee71dSXin LI lt_cv_deplibs_check_method=pass_all 3640b6cee71dSXin LI ;; 3641d38c30c0SXin LIos2*) 3642d38c30c0SXin LI lt_cv_deplibs_check_method=pass_all 3643d38c30c0SXin LI ;; 3644b6cee71dSXin LIesac 3645b6cee71dSXin LI]) 3646b6cee71dSXin LI 3647b6cee71dSXin LIfile_magic_glob= 3648b6cee71dSXin LIwant_nocaseglob=no 3649b6cee71dSXin LIif test "$build" = "$host"; then 3650b6cee71dSXin LI case $host_os in 3651b6cee71dSXin LI mingw* | pw32*) 3652b6cee71dSXin LI if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3653b6cee71dSXin LI want_nocaseglob=yes 3654b6cee71dSXin LI else 3655b6cee71dSXin LI file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3656b6cee71dSXin LI fi 3657b6cee71dSXin LI ;; 3658b6cee71dSXin LI esac 3659b6cee71dSXin LIfi 3660b6cee71dSXin LI 3661b6cee71dSXin LIfile_magic_cmd=$lt_cv_file_magic_cmd 3662b6cee71dSXin LIdeplibs_check_method=$lt_cv_deplibs_check_method 3663b6cee71dSXin LItest -z "$deplibs_check_method" && deplibs_check_method=unknown 3664b6cee71dSXin LI 3665b6cee71dSXin LI_LT_DECL([], [deplibs_check_method], [1], 3666b6cee71dSXin LI [Method to check whether dependent libraries are shared objects]) 3667b6cee71dSXin LI_LT_DECL([], [file_magic_cmd], [1], 3668b6cee71dSXin LI [Command to use when deplibs_check_method = "file_magic"]) 3669b6cee71dSXin LI_LT_DECL([], [file_magic_glob], [1], 3670b6cee71dSXin LI [How to find potential files when deplibs_check_method = "file_magic"]) 3671b6cee71dSXin LI_LT_DECL([], [want_nocaseglob], [1], 3672b6cee71dSXin LI [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3673b6cee71dSXin LI])# _LT_CHECK_MAGIC_METHOD 3674b6cee71dSXin LI 3675b6cee71dSXin LI 3676b6cee71dSXin LI# LT_PATH_NM 3677b6cee71dSXin LI# ---------- 3678b6cee71dSXin LI# find the pathname to a BSD- or MS-compatible name lister 3679b6cee71dSXin LIAC_DEFUN([LT_PATH_NM], 3680b6cee71dSXin LI[AC_REQUIRE([AC_PROG_CC])dnl 3681b6cee71dSXin LIAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3682b6cee71dSXin LI[if test -n "$NM"; then 3683b6cee71dSXin LI # Let the user override the test. 3684d38c30c0SXin LI lt_cv_path_NM=$NM 3685b6cee71dSXin LIelse 3686d38c30c0SXin LI lt_nm_to_check=${ac_tool_prefix}nm 3687b6cee71dSXin LI if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3688b6cee71dSXin LI lt_nm_to_check="$lt_nm_to_check nm" 3689b6cee71dSXin LI fi 3690b6cee71dSXin LI for lt_tmp_nm in $lt_nm_to_check; do 3691d38c30c0SXin LI lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3692b6cee71dSXin LI for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3693d38c30c0SXin LI IFS=$lt_save_ifs 3694b6cee71dSXin LI test -z "$ac_dir" && ac_dir=. 3695d38c30c0SXin LI tmp_nm=$ac_dir/$lt_tmp_nm 3696b6cee71dSXin LI if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3697b6cee71dSXin LI # Check to see if the nm accepts a BSD-compat flag. 3698d38c30c0SXin LI # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3699b6cee71dSXin LI # nm: unknown option "B" ignored 3700b6cee71dSXin LI # Tru64's nm complains that /dev/null is an invalid object file 3701d38c30c0SXin LI # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3702d38c30c0SXin LI case $build_os in 3703d38c30c0SXin LI mingw*) lt_bad_file=conftest.nm/nofile ;; 3704d38c30c0SXin LI *) lt_bad_file=/dev/null ;; 3705d38c30c0SXin LI esac 3706*ae316d1dSXin LI case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 3707d38c30c0SXin LI *$lt_bad_file* | *'Invalid file or object type'*) 3708b6cee71dSXin LI lt_cv_path_NM="$tmp_nm -B" 3709d38c30c0SXin LI break 2 3710b6cee71dSXin LI ;; 3711b6cee71dSXin LI *) 3712*ae316d1dSXin LI case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 3713b6cee71dSXin LI */dev/null*) 3714b6cee71dSXin LI lt_cv_path_NM="$tmp_nm -p" 3715d38c30c0SXin LI break 2 3716b6cee71dSXin LI ;; 3717b6cee71dSXin LI *) 3718b6cee71dSXin LI lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3719b6cee71dSXin LI continue # so that we can try to find one that supports BSD flags 3720b6cee71dSXin LI ;; 3721b6cee71dSXin LI esac 3722b6cee71dSXin LI ;; 3723b6cee71dSXin LI esac 3724b6cee71dSXin LI fi 3725b6cee71dSXin LI done 3726d38c30c0SXin LI IFS=$lt_save_ifs 3727b6cee71dSXin LI done 3728b6cee71dSXin LI : ${lt_cv_path_NM=no} 3729b6cee71dSXin LIfi]) 3730d38c30c0SXin LIif test no != "$lt_cv_path_NM"; then 3731d38c30c0SXin LI NM=$lt_cv_path_NM 3732b6cee71dSXin LIelse 3733b6cee71dSXin LI # Didn't find any BSD compatible name lister, look for dumpbin. 3734b6cee71dSXin LI if test -n "$DUMPBIN"; then : 3735b6cee71dSXin LI # Let the user override the test. 3736b6cee71dSXin LI else 3737b6cee71dSXin LI AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3738*ae316d1dSXin LI case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 3739b6cee71dSXin LI *COFF*) 3740d38c30c0SXin LI DUMPBIN="$DUMPBIN -symbols -headers" 3741b6cee71dSXin LI ;; 3742b6cee71dSXin LI *) 3743b6cee71dSXin LI DUMPBIN=: 3744b6cee71dSXin LI ;; 3745b6cee71dSXin LI esac 3746b6cee71dSXin LI fi 3747b6cee71dSXin LI AC_SUBST([DUMPBIN]) 3748d38c30c0SXin LI if test : != "$DUMPBIN"; then 3749d38c30c0SXin LI NM=$DUMPBIN 3750b6cee71dSXin LI fi 3751b6cee71dSXin LIfi 3752b6cee71dSXin LItest -z "$NM" && NM=nm 3753b6cee71dSXin LIAC_SUBST([NM]) 3754b6cee71dSXin LI_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3755b6cee71dSXin LI 3756b6cee71dSXin LIAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3757b6cee71dSXin LI [lt_cv_nm_interface="BSD nm" 3758b6cee71dSXin LI echo "int some_variable = 0;" > conftest.$ac_ext 3759b6cee71dSXin LI (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3760b6cee71dSXin LI (eval "$ac_compile" 2>conftest.err) 3761b6cee71dSXin LI cat conftest.err >&AS_MESSAGE_LOG_FD 3762b6cee71dSXin LI (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3763b6cee71dSXin LI (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3764b6cee71dSXin LI cat conftest.err >&AS_MESSAGE_LOG_FD 3765b6cee71dSXin LI (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3766b6cee71dSXin LI cat conftest.out >&AS_MESSAGE_LOG_FD 3767b6cee71dSXin LI if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3768b6cee71dSXin LI lt_cv_nm_interface="MS dumpbin" 3769b6cee71dSXin LI fi 3770b6cee71dSXin LI rm -f conftest*]) 3771b6cee71dSXin LI])# LT_PATH_NM 3772b6cee71dSXin LI 3773b6cee71dSXin LI# Old names: 3774b6cee71dSXin LIAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3775b6cee71dSXin LIAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3776b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 3777b6cee71dSXin LIdnl AC_DEFUN([AM_PROG_NM], []) 3778b6cee71dSXin LIdnl AC_DEFUN([AC_PROG_NM], []) 3779b6cee71dSXin LI 3780b6cee71dSXin LI# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3781b6cee71dSXin LI# -------------------------------- 3782b6cee71dSXin LI# how to determine the name of the shared library 3783b6cee71dSXin LI# associated with a specific link library. 3784b6cee71dSXin LI# -- PORTME fill in with the dynamic library characteristics 3785b6cee71dSXin LIm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3786b6cee71dSXin LI[m4_require([_LT_DECL_EGREP]) 3787b6cee71dSXin LIm4_require([_LT_DECL_OBJDUMP]) 3788b6cee71dSXin LIm4_require([_LT_DECL_DLLTOOL]) 3789b6cee71dSXin LIAC_CACHE_CHECK([how to associate runtime and link libraries], 3790b6cee71dSXin LIlt_cv_sharedlib_from_linklib_cmd, 3791b6cee71dSXin LI[lt_cv_sharedlib_from_linklib_cmd='unknown' 3792b6cee71dSXin LI 3793b6cee71dSXin LIcase $host_os in 3794b6cee71dSXin LIcygwin* | mingw* | pw32* | cegcc*) 3795d38c30c0SXin LI # two different shell functions defined in ltmain.sh; 3796d38c30c0SXin LI # decide which one to use based on capabilities of $DLLTOOL 3797b6cee71dSXin LI case `$DLLTOOL --help 2>&1` in 3798b6cee71dSXin LI *--identify-strict*) 3799b6cee71dSXin LI lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3800b6cee71dSXin LI ;; 3801b6cee71dSXin LI *) 3802b6cee71dSXin LI lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3803b6cee71dSXin LI ;; 3804b6cee71dSXin LI esac 3805b6cee71dSXin LI ;; 3806b6cee71dSXin LI*) 3807b6cee71dSXin LI # fallback: assume linklib IS sharedlib 3808d38c30c0SXin LI lt_cv_sharedlib_from_linklib_cmd=$ECHO 3809b6cee71dSXin LI ;; 3810b6cee71dSXin LIesac 3811b6cee71dSXin LI]) 3812b6cee71dSXin LIsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3813b6cee71dSXin LItest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3814b6cee71dSXin LI 3815b6cee71dSXin LI_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3816b6cee71dSXin LI [Command to associate shared and link libraries]) 3817b6cee71dSXin LI])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3818b6cee71dSXin LI 3819b6cee71dSXin LI 3820b6cee71dSXin LI# _LT_PATH_MANIFEST_TOOL 3821b6cee71dSXin LI# ---------------------- 3822b6cee71dSXin LI# locate the manifest tool 3823b6cee71dSXin LIm4_defun([_LT_PATH_MANIFEST_TOOL], 3824b6cee71dSXin LI[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3825b6cee71dSXin LItest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3826b6cee71dSXin LIAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3827b6cee71dSXin LI [lt_cv_path_mainfest_tool=no 3828b6cee71dSXin LI echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3829b6cee71dSXin LI $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3830b6cee71dSXin LI cat conftest.err >&AS_MESSAGE_LOG_FD 3831b6cee71dSXin LI if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3832b6cee71dSXin LI lt_cv_path_mainfest_tool=yes 3833b6cee71dSXin LI fi 3834b6cee71dSXin LI rm -f conftest*]) 3835d38c30c0SXin LIif test yes != "$lt_cv_path_mainfest_tool"; then 3836b6cee71dSXin LI MANIFEST_TOOL=: 3837b6cee71dSXin LIfi 3838b6cee71dSXin LI_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3839b6cee71dSXin LI])# _LT_PATH_MANIFEST_TOOL 3840b6cee71dSXin LI 3841b6cee71dSXin LI 3842d38c30c0SXin LI# _LT_DLL_DEF_P([FILE]) 3843d38c30c0SXin LI# --------------------- 3844d38c30c0SXin LI# True iff FILE is a Windows DLL '.def' file. 3845d38c30c0SXin LI# Keep in sync with func_dll_def_p in the libtool script 3846d38c30c0SXin LIAC_DEFUN([_LT_DLL_DEF_P], 3847d38c30c0SXin LI[dnl 3848d38c30c0SXin LI test DEF = "`$SED -n dnl 3849d38c30c0SXin LI -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3850d38c30c0SXin LI -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3851d38c30c0SXin LI -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3852d38c30c0SXin LI -e q dnl Only consider the first "real" line 3853d38c30c0SXin LI $1`" dnl 3854d38c30c0SXin LI])# _LT_DLL_DEF_P 3855d38c30c0SXin LI 3856d38c30c0SXin LI 3857b6cee71dSXin LI# LT_LIB_M 3858b6cee71dSXin LI# -------- 3859b6cee71dSXin LI# check for math library 3860b6cee71dSXin LIAC_DEFUN([LT_LIB_M], 3861b6cee71dSXin LI[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3862b6cee71dSXin LILIBM= 3863b6cee71dSXin LIcase $host in 3864b6cee71dSXin LI*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3865b6cee71dSXin LI # These system don't have libm, or don't need it 3866b6cee71dSXin LI ;; 3867b6cee71dSXin LI*-ncr-sysv4.3*) 3868d38c30c0SXin LI AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3869b6cee71dSXin LI AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3870b6cee71dSXin LI ;; 3871b6cee71dSXin LI*) 3872d38c30c0SXin LI AC_CHECK_LIB(m, cos, LIBM=-lm) 3873b6cee71dSXin LI ;; 3874b6cee71dSXin LIesac 3875b6cee71dSXin LIAC_SUBST([LIBM]) 3876b6cee71dSXin LI])# LT_LIB_M 3877b6cee71dSXin LI 3878b6cee71dSXin LI# Old name: 3879b6cee71dSXin LIAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3880b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 3881b6cee71dSXin LIdnl AC_DEFUN([AC_CHECK_LIBM], []) 3882b6cee71dSXin LI 3883b6cee71dSXin LI 3884b6cee71dSXin LI# _LT_COMPILER_NO_RTTI([TAGNAME]) 3885b6cee71dSXin LI# ------------------------------- 3886b6cee71dSXin LIm4_defun([_LT_COMPILER_NO_RTTI], 3887b6cee71dSXin LI[m4_require([_LT_TAG_COMPILER])dnl 3888b6cee71dSXin LI 3889b6cee71dSXin LI_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3890b6cee71dSXin LI 3891d38c30c0SXin LIif test yes = "$GCC"; then 3892b6cee71dSXin LI case $cc_basename in 3893b6cee71dSXin LI nvcc*) 3894b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3895b6cee71dSXin LI *) 3896b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3897b6cee71dSXin LI esac 3898b6cee71dSXin LI 3899b6cee71dSXin LI _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3900b6cee71dSXin LI lt_cv_prog_compiler_rtti_exceptions, 3901b6cee71dSXin LI [-fno-rtti -fno-exceptions], [], 3902b6cee71dSXin LI [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3903b6cee71dSXin LIfi 3904b6cee71dSXin LI_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3905b6cee71dSXin LI [Compiler flag to turn off builtin functions]) 3906b6cee71dSXin LI])# _LT_COMPILER_NO_RTTI 3907b6cee71dSXin LI 3908b6cee71dSXin LI 3909b6cee71dSXin LI# _LT_CMD_GLOBAL_SYMBOLS 3910b6cee71dSXin LI# ---------------------- 3911b6cee71dSXin LIm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3912b6cee71dSXin LI[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3913b6cee71dSXin LIAC_REQUIRE([AC_PROG_CC])dnl 3914b6cee71dSXin LIAC_REQUIRE([AC_PROG_AWK])dnl 3915b6cee71dSXin LIAC_REQUIRE([LT_PATH_NM])dnl 3916b6cee71dSXin LIAC_REQUIRE([LT_PATH_LD])dnl 3917b6cee71dSXin LIm4_require([_LT_DECL_SED])dnl 3918b6cee71dSXin LIm4_require([_LT_DECL_EGREP])dnl 3919b6cee71dSXin LIm4_require([_LT_TAG_COMPILER])dnl 3920b6cee71dSXin LI 3921b6cee71dSXin LI# Check for command to grab the raw symbol name followed by C symbol from nm. 3922b6cee71dSXin LIAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3923b6cee71dSXin LIAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3924b6cee71dSXin LI[ 3925b6cee71dSXin LI# These are sane defaults that work on at least a few old systems. 3926b6cee71dSXin LI# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3927b6cee71dSXin LI 3928b6cee71dSXin LI# Character class describing NM global symbol codes. 3929b6cee71dSXin LIsymcode='[[BCDEGRST]]' 3930b6cee71dSXin LI 3931b6cee71dSXin LI# Regexp to match symbols that can be accessed directly from C. 3932b6cee71dSXin LIsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3933b6cee71dSXin LI 3934b6cee71dSXin LI# Define system-specific variables. 3935b6cee71dSXin LIcase $host_os in 3936b6cee71dSXin LIaix*) 3937b6cee71dSXin LI symcode='[[BCDT]]' 3938b6cee71dSXin LI ;; 3939b6cee71dSXin LIcygwin* | mingw* | pw32* | cegcc*) 3940b6cee71dSXin LI symcode='[[ABCDGISTW]]' 3941b6cee71dSXin LI ;; 3942b6cee71dSXin LIhpux*) 3943d38c30c0SXin LI if test ia64 = "$host_cpu"; then 3944b6cee71dSXin LI symcode='[[ABCDEGRST]]' 3945b6cee71dSXin LI fi 3946b6cee71dSXin LI ;; 3947b6cee71dSXin LIirix* | nonstopux*) 3948b6cee71dSXin LI symcode='[[BCDEGRST]]' 3949b6cee71dSXin LI ;; 3950b6cee71dSXin LIosf*) 3951b6cee71dSXin LI symcode='[[BCDEGQRST]]' 3952b6cee71dSXin LI ;; 3953b6cee71dSXin LIsolaris*) 3954b6cee71dSXin LI symcode='[[BDRT]]' 3955b6cee71dSXin LI ;; 3956b6cee71dSXin LIsco3.2v5*) 3957b6cee71dSXin LI symcode='[[DT]]' 3958b6cee71dSXin LI ;; 3959b6cee71dSXin LIsysv4.2uw2*) 3960b6cee71dSXin LI symcode='[[DT]]' 3961b6cee71dSXin LI ;; 3962b6cee71dSXin LIsysv5* | sco5v6* | unixware* | OpenUNIX*) 3963b6cee71dSXin LI symcode='[[ABDT]]' 3964b6cee71dSXin LI ;; 3965b6cee71dSXin LIsysv4) 3966b6cee71dSXin LI symcode='[[DFNSTU]]' 3967b6cee71dSXin LI ;; 3968b6cee71dSXin LIesac 3969b6cee71dSXin LI 3970b6cee71dSXin LI# If we're using GNU nm, then use its standard symbol codes. 3971b6cee71dSXin LIcase `$NM -V 2>&1` in 3972b6cee71dSXin LI*GNU* | *'with BFD'*) 3973b6cee71dSXin LI symcode='[[ABCDGIRSTW]]' ;; 3974b6cee71dSXin LIesac 3975b6cee71dSXin LI 3976d38c30c0SXin LIif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3977d38c30c0SXin LI # Gets list of data symbols to import. 3978*ae316d1dSXin LI lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 3979d38c30c0SXin LI # Adjust the below global symbol transforms to fixup imported variables. 3980d38c30c0SXin LI lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3981d38c30c0SXin LI lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3982d38c30c0SXin LI lt_c_name_lib_hook="\ 3983d38c30c0SXin LI -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3984d38c30c0SXin LI -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3985d38c30c0SXin LIelse 3986d38c30c0SXin LI # Disable hooks by default. 3987d38c30c0SXin LI lt_cv_sys_global_symbol_to_import= 3988d38c30c0SXin LI lt_cdecl_hook= 3989d38c30c0SXin LI lt_c_name_hook= 3990d38c30c0SXin LI lt_c_name_lib_hook= 3991d38c30c0SXin LIfi 3992d38c30c0SXin LI 3993b6cee71dSXin LI# Transform an extracted symbol line into a proper C declaration. 3994b6cee71dSXin LI# Some systems (esp. on ia64) link data and code symbols differently, 3995b6cee71dSXin LI# so use this general approach. 3996*ae316d1dSXin LIlt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 3997d38c30c0SXin LI$lt_cdecl_hook\ 3998d38c30c0SXin LI" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 3999d38c30c0SXin LI" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4000b6cee71dSXin LI 4001b6cee71dSXin LI# Transform an extracted symbol line into symbol name and symbol address 4002*ae316d1dSXin LIlt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 4003d38c30c0SXin LI$lt_c_name_hook\ 4004d38c30c0SXin LI" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4005d38c30c0SXin LI" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4006d38c30c0SXin LI 4007d38c30c0SXin LI# Transform an extracted symbol line into symbol name with lib prefix and 4008d38c30c0SXin LI# symbol address. 4009*ae316d1dSXin LIlt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 4010d38c30c0SXin LI$lt_c_name_lib_hook\ 4011d38c30c0SXin LI" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4012d38c30c0SXin LI" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4013d38c30c0SXin LI" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4014b6cee71dSXin LI 4015b6cee71dSXin LI# Handle CRLF in mingw tool chain 4016b6cee71dSXin LIopt_cr= 4017b6cee71dSXin LIcase $build_os in 4018b6cee71dSXin LImingw*) 4019b6cee71dSXin LI opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4020b6cee71dSXin LI ;; 4021b6cee71dSXin LIesac 4022b6cee71dSXin LI 4023b6cee71dSXin LI# Try without a prefix underscore, then with it. 4024b6cee71dSXin LIfor ac_symprfx in "" "_"; do 4025b6cee71dSXin LI 4026b6cee71dSXin LI # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4027b6cee71dSXin LI symxfrm="\\1 $ac_symprfx\\2 \\2" 4028b6cee71dSXin LI 4029b6cee71dSXin LI # Write the raw and C identifiers. 4030b6cee71dSXin LI if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4031d38c30c0SXin LI # Fake it for dumpbin and say T for any non-static function, 4032d38c30c0SXin LI # D for any global variable and I for any imported variable. 4033*ae316d1dSXin LI # Also find C++ and __fastcall symbols from MSVC++ or ICC, 4034b6cee71dSXin LI # which start with @ or ?. 4035b6cee71dSXin LI lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4036b6cee71dSXin LI" {last_section=section; section=\$ 3};"\ 4037b6cee71dSXin LI" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4038b6cee71dSXin LI" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4039d38c30c0SXin LI" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4040d38c30c0SXin LI" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4041d38c30c0SXin LI" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4042b6cee71dSXin LI" \$ 0!~/External *\|/{next};"\ 4043b6cee71dSXin LI" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4044b6cee71dSXin LI" {if(hide[section]) next};"\ 4045d38c30c0SXin LI" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4046b6cee71dSXin LI" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4047d38c30c0SXin LI" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4048d38c30c0SXin LI" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4049b6cee71dSXin LI" ' prfx=^$ac_symprfx]" 4050b6cee71dSXin LI else 4051*ae316d1dSXin LI lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4052b6cee71dSXin LI fi 4053*ae316d1dSXin LI lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 4054b6cee71dSXin LI 4055b6cee71dSXin LI # Check to see that the pipe works correctly. 4056b6cee71dSXin LI pipe_works=no 4057b6cee71dSXin LI 4058b6cee71dSXin LI rm -f conftest* 4059b6cee71dSXin LI cat > conftest.$ac_ext <<_LT_EOF 4060b6cee71dSXin LI#ifdef __cplusplus 4061b6cee71dSXin LIextern "C" { 4062b6cee71dSXin LI#endif 4063b6cee71dSXin LIchar nm_test_var; 4064b6cee71dSXin LIvoid nm_test_func(void); 4065b6cee71dSXin LIvoid nm_test_func(void){} 4066b6cee71dSXin LI#ifdef __cplusplus 4067b6cee71dSXin LI} 4068b6cee71dSXin LI#endif 4069b6cee71dSXin LIint main(){nm_test_var='a';nm_test_func();return(0);} 4070b6cee71dSXin LI_LT_EOF 4071b6cee71dSXin LI 4072b6cee71dSXin LI if AC_TRY_EVAL(ac_compile); then 4073b6cee71dSXin LI # Now try to grab the symbols. 4074b6cee71dSXin LI nlist=conftest.nm 4075b6cee71dSXin LI if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4076b6cee71dSXin LI # Try sorting and uniquifying the output. 4077b6cee71dSXin LI if sort "$nlist" | uniq > "$nlist"T; then 4078b6cee71dSXin LI mv -f "$nlist"T "$nlist" 4079b6cee71dSXin LI else 4080b6cee71dSXin LI rm -f "$nlist"T 4081b6cee71dSXin LI fi 4082b6cee71dSXin LI 4083b6cee71dSXin LI # Make sure that we snagged all the symbols we need. 4084b6cee71dSXin LI if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4085b6cee71dSXin LI if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4086b6cee71dSXin LI cat <<_LT_EOF > conftest.$ac_ext 4087b6cee71dSXin LI/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4088d38c30c0SXin LI#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4089d38c30c0SXin LI/* DATA imports from DLLs on WIN32 can't be const, because runtime 4090b6cee71dSXin LI relocations are performed -- see ld's documentation on pseudo-relocs. */ 4091b6cee71dSXin LI# define LT@&t@_DLSYM_CONST 4092d38c30c0SXin LI#elif defined __osf__ 4093b6cee71dSXin LI/* This system does not cope well with relocations in const data. */ 4094b6cee71dSXin LI# define LT@&t@_DLSYM_CONST 4095b6cee71dSXin LI#else 4096b6cee71dSXin LI# define LT@&t@_DLSYM_CONST const 4097b6cee71dSXin LI#endif 4098b6cee71dSXin LI 4099b6cee71dSXin LI#ifdef __cplusplus 4100b6cee71dSXin LIextern "C" { 4101b6cee71dSXin LI#endif 4102b6cee71dSXin LI 4103b6cee71dSXin LI_LT_EOF 4104b6cee71dSXin LI # Now generate the symbol file. 4105b6cee71dSXin LI eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4106b6cee71dSXin LI 4107b6cee71dSXin LI cat <<_LT_EOF >> conftest.$ac_ext 4108b6cee71dSXin LI 4109b6cee71dSXin LI/* The mapping between symbol names and symbols. */ 4110b6cee71dSXin LILT@&t@_DLSYM_CONST struct { 4111b6cee71dSXin LI const char *name; 4112b6cee71dSXin LI void *address; 4113b6cee71dSXin LI} 4114b6cee71dSXin LIlt__PROGRAM__LTX_preloaded_symbols[[]] = 4115b6cee71dSXin LI{ 4116b6cee71dSXin LI { "@PROGRAM@", (void *) 0 }, 4117b6cee71dSXin LI_LT_EOF 4118d38c30c0SXin LI $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4119b6cee71dSXin LI cat <<\_LT_EOF >> conftest.$ac_ext 4120b6cee71dSXin LI {0, (void *) 0} 4121b6cee71dSXin LI}; 4122b6cee71dSXin LI 4123b6cee71dSXin LI/* This works around a problem in FreeBSD linker */ 4124b6cee71dSXin LI#ifdef FREEBSD_WORKAROUND 4125b6cee71dSXin LIstatic const void *lt_preloaded_setup() { 4126b6cee71dSXin LI return lt__PROGRAM__LTX_preloaded_symbols; 4127b6cee71dSXin LI} 4128b6cee71dSXin LI#endif 4129b6cee71dSXin LI 4130b6cee71dSXin LI#ifdef __cplusplus 4131b6cee71dSXin LI} 4132b6cee71dSXin LI#endif 4133b6cee71dSXin LI_LT_EOF 4134b6cee71dSXin LI # Now try linking the two files. 4135b6cee71dSXin LI mv conftest.$ac_objext conftstm.$ac_objext 4136b6cee71dSXin LI lt_globsym_save_LIBS=$LIBS 4137b6cee71dSXin LI lt_globsym_save_CFLAGS=$CFLAGS 4138d38c30c0SXin LI LIBS=conftstm.$ac_objext 4139b6cee71dSXin LI CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4140d38c30c0SXin LI if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4141b6cee71dSXin LI pipe_works=yes 4142b6cee71dSXin LI fi 4143b6cee71dSXin LI LIBS=$lt_globsym_save_LIBS 4144b6cee71dSXin LI CFLAGS=$lt_globsym_save_CFLAGS 4145b6cee71dSXin LI else 4146b6cee71dSXin LI echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4147b6cee71dSXin LI fi 4148b6cee71dSXin LI else 4149b6cee71dSXin LI echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4150b6cee71dSXin LI fi 4151b6cee71dSXin LI else 4152b6cee71dSXin LI echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4153b6cee71dSXin LI fi 4154b6cee71dSXin LI else 4155b6cee71dSXin LI echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4156b6cee71dSXin LI cat conftest.$ac_ext >&5 4157b6cee71dSXin LI fi 4158b6cee71dSXin LI rm -rf conftest* conftst* 4159b6cee71dSXin LI 4160b6cee71dSXin LI # Do not use the global_symbol_pipe unless it works. 4161d38c30c0SXin LI if test yes = "$pipe_works"; then 4162b6cee71dSXin LI break 4163b6cee71dSXin LI else 4164b6cee71dSXin LI lt_cv_sys_global_symbol_pipe= 4165b6cee71dSXin LI fi 4166b6cee71dSXin LIdone 4167b6cee71dSXin LI]) 4168b6cee71dSXin LIif test -z "$lt_cv_sys_global_symbol_pipe"; then 4169b6cee71dSXin LI lt_cv_sys_global_symbol_to_cdecl= 4170b6cee71dSXin LIfi 4171b6cee71dSXin LIif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4172b6cee71dSXin LI AC_MSG_RESULT(failed) 4173b6cee71dSXin LIelse 4174b6cee71dSXin LI AC_MSG_RESULT(ok) 4175b6cee71dSXin LIfi 4176b6cee71dSXin LI 4177b6cee71dSXin LI# Response file support. 4178b6cee71dSXin LIif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4179b6cee71dSXin LI nm_file_list_spec='@' 4180b6cee71dSXin LIelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4181b6cee71dSXin LI nm_file_list_spec='@' 4182b6cee71dSXin LIfi 4183b6cee71dSXin LI 4184b6cee71dSXin LI_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4185b6cee71dSXin LI [Take the output of nm and produce a listing of raw symbols and C names]) 4186b6cee71dSXin LI_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4187b6cee71dSXin LI [Transform the output of nm in a proper C declaration]) 4188d38c30c0SXin LI_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4189d38c30c0SXin LI [Transform the output of nm into a list of symbols to manually relocate]) 4190b6cee71dSXin LI_LT_DECL([global_symbol_to_c_name_address], 4191b6cee71dSXin LI [lt_cv_sys_global_symbol_to_c_name_address], [1], 4192b6cee71dSXin LI [Transform the output of nm in a C name address pair]) 4193b6cee71dSXin LI_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4194b6cee71dSXin LI [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4195b6cee71dSXin LI [Transform the output of nm in a C name address pair when lib prefix is needed]) 4196d38c30c0SXin LI_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4197d38c30c0SXin LI [The name lister interface]) 4198b6cee71dSXin LI_LT_DECL([], [nm_file_list_spec], [1], 4199b6cee71dSXin LI [Specify filename containing input files for $NM]) 4200b6cee71dSXin LI]) # _LT_CMD_GLOBAL_SYMBOLS 4201b6cee71dSXin LI 4202b6cee71dSXin LI 4203b6cee71dSXin LI# _LT_COMPILER_PIC([TAGNAME]) 4204b6cee71dSXin LI# --------------------------- 4205b6cee71dSXin LIm4_defun([_LT_COMPILER_PIC], 4206b6cee71dSXin LI[m4_require([_LT_TAG_COMPILER])dnl 4207b6cee71dSXin LI_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4208b6cee71dSXin LI_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4209b6cee71dSXin LI_LT_TAGVAR(lt_prog_compiler_static, $1)= 4210b6cee71dSXin LI 4211b6cee71dSXin LIm4_if([$1], [CXX], [ 4212b6cee71dSXin LI # C++ specific cases for pic, static, wl, etc. 4213d38c30c0SXin LI if test yes = "$GXX"; then 4214b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4215b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4216b6cee71dSXin LI 4217b6cee71dSXin LI case $host_os in 4218b6cee71dSXin LI aix*) 4219b6cee71dSXin LI # All AIX code is PIC. 4220d38c30c0SXin LI if test ia64 = "$host_cpu"; then 4221b6cee71dSXin LI # AIX 5 now supports IA64 processor 4222b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4223b6cee71dSXin LI fi 4224d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4225b6cee71dSXin LI ;; 4226b6cee71dSXin LI 4227b6cee71dSXin LI amigaos*) 4228b6cee71dSXin LI case $host_cpu in 4229b6cee71dSXin LI powerpc) 4230b6cee71dSXin LI # see comment about AmigaOS4 .so support 4231b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4232b6cee71dSXin LI ;; 4233b6cee71dSXin LI m68k) 4234b6cee71dSXin LI # FIXME: we need at least 68020 code to build shared libraries, but 4235d38c30c0SXin LI # adding the '-m68020' flag to GCC prevents building anything better, 4236d38c30c0SXin LI # like '-m68040'. 4237b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4238b6cee71dSXin LI ;; 4239b6cee71dSXin LI esac 4240b6cee71dSXin LI ;; 4241b6cee71dSXin LI 4242b6cee71dSXin LI beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4243b6cee71dSXin LI # PIC is the default for these OSes. 4244b6cee71dSXin LI ;; 4245b6cee71dSXin LI mingw* | cygwin* | os2* | pw32* | cegcc*) 4246b6cee71dSXin LI # This hack is so that the source file can tell whether it is being 4247b6cee71dSXin LI # built for inclusion in a dll (and should export symbols for example). 4248b6cee71dSXin LI # Although the cygwin gcc ignores -fPIC, still need this for old-style 4249b6cee71dSXin LI # (--disable-auto-import) libraries 4250b6cee71dSXin LI m4_if([$1], [GCJ], [], 4251b6cee71dSXin LI [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4252d38c30c0SXin LI case $host_os in 4253d38c30c0SXin LI os2*) 4254d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4255d38c30c0SXin LI ;; 4256d38c30c0SXin LI esac 4257b6cee71dSXin LI ;; 4258b6cee71dSXin LI darwin* | rhapsody*) 4259b6cee71dSXin LI # PIC is the default on this platform 4260b6cee71dSXin LI # Common symbols not allowed in MH_DYLIB files 4261b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4262b6cee71dSXin LI ;; 4263b6cee71dSXin LI *djgpp*) 4264b6cee71dSXin LI # DJGPP does not support shared libraries at all 4265b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4266b6cee71dSXin LI ;; 4267b6cee71dSXin LI haiku*) 4268b6cee71dSXin LI # PIC is the default for Haiku. 4269b6cee71dSXin LI # The "-static" flag exists, but is broken. 4270b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)= 4271b6cee71dSXin LI ;; 4272b6cee71dSXin LI interix[[3-9]]*) 4273b6cee71dSXin LI # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4274b6cee71dSXin LI # Instead, we relocate shared libraries at runtime. 4275b6cee71dSXin LI ;; 4276b6cee71dSXin LI sysv4*MP*) 4277b6cee71dSXin LI if test -d /usr/nec; then 4278b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4279b6cee71dSXin LI fi 4280b6cee71dSXin LI ;; 4281b6cee71dSXin LI hpux*) 4282b6cee71dSXin LI # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4283b6cee71dSXin LI # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4284b6cee71dSXin LI # sets the default TLS model and affects inlining. 4285b6cee71dSXin LI case $host_cpu in 4286b6cee71dSXin LI hppa*64*) 4287b6cee71dSXin LI ;; 4288b6cee71dSXin LI *) 4289b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4290b6cee71dSXin LI ;; 4291b6cee71dSXin LI esac 4292b6cee71dSXin LI ;; 4293b6cee71dSXin LI *qnx* | *nto*) 4294b6cee71dSXin LI # QNX uses GNU C++, but need to define -shared option too, otherwise 4295b6cee71dSXin LI # it will coredump. 4296b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4297b6cee71dSXin LI ;; 4298b6cee71dSXin LI *) 4299b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4300b6cee71dSXin LI ;; 4301b6cee71dSXin LI esac 4302b6cee71dSXin LI else 4303b6cee71dSXin LI case $host_os in 4304b6cee71dSXin LI aix[[4-9]]*) 4305b6cee71dSXin LI # All AIX code is PIC. 4306d38c30c0SXin LI if test ia64 = "$host_cpu"; then 4307b6cee71dSXin LI # AIX 5 now supports IA64 processor 4308b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4309b6cee71dSXin LI else 4310b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4311b6cee71dSXin LI fi 4312b6cee71dSXin LI ;; 4313b6cee71dSXin LI chorus*) 4314b6cee71dSXin LI case $cc_basename in 4315b6cee71dSXin LI cxch68*) 4316b6cee71dSXin LI # Green Hills C++ Compiler 4317b6cee71dSXin LI # _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" 4318b6cee71dSXin LI ;; 4319b6cee71dSXin LI esac 4320b6cee71dSXin LI ;; 4321b6cee71dSXin LI mingw* | cygwin* | os2* | pw32* | cegcc*) 4322b6cee71dSXin LI # This hack is so that the source file can tell whether it is being 4323b6cee71dSXin LI # built for inclusion in a dll (and should export symbols for example). 4324b6cee71dSXin LI m4_if([$1], [GCJ], [], 4325b6cee71dSXin LI [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4326b6cee71dSXin LI ;; 4327b6cee71dSXin LI dgux*) 4328b6cee71dSXin LI case $cc_basename in 4329b6cee71dSXin LI ec++*) 4330b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4331b6cee71dSXin LI ;; 4332b6cee71dSXin LI ghcx*) 4333b6cee71dSXin LI # Green Hills C++ Compiler 4334b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4335b6cee71dSXin LI ;; 4336b6cee71dSXin LI *) 4337b6cee71dSXin LI ;; 4338b6cee71dSXin LI esac 4339b6cee71dSXin LI ;; 4340*ae316d1dSXin LI freebsd* | dragonfly* | midnightbsd*) 4341b6cee71dSXin LI # FreeBSD uses GNU C++ 4342b6cee71dSXin LI ;; 4343b6cee71dSXin LI hpux9* | hpux10* | hpux11*) 4344b6cee71dSXin LI case $cc_basename in 4345b6cee71dSXin LI CC*) 4346b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4347d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4348d38c30c0SXin LI if test ia64 != "$host_cpu"; then 4349b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4350b6cee71dSXin LI fi 4351b6cee71dSXin LI ;; 4352b6cee71dSXin LI aCC*) 4353b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4354d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4355b6cee71dSXin LI case $host_cpu in 4356b6cee71dSXin LI hppa*64*|ia64*) 4357b6cee71dSXin LI # +Z the default 4358b6cee71dSXin LI ;; 4359b6cee71dSXin LI *) 4360b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4361b6cee71dSXin LI ;; 4362b6cee71dSXin LI esac 4363b6cee71dSXin LI ;; 4364b6cee71dSXin LI *) 4365b6cee71dSXin LI ;; 4366b6cee71dSXin LI esac 4367b6cee71dSXin LI ;; 4368b6cee71dSXin LI interix*) 4369b6cee71dSXin LI # This is c89, which is MS Visual C++ (no shared libs) 4370b6cee71dSXin LI # Anyone wants to do a port? 4371b6cee71dSXin LI ;; 4372b6cee71dSXin LI irix5* | irix6* | nonstopux*) 4373b6cee71dSXin LI case $cc_basename in 4374b6cee71dSXin LI CC*) 4375b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4376b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4377b6cee71dSXin LI # CC pic flag -KPIC is the default. 4378b6cee71dSXin LI ;; 4379b6cee71dSXin LI *) 4380b6cee71dSXin LI ;; 4381b6cee71dSXin LI esac 4382b6cee71dSXin LI ;; 4383d38c30c0SXin LI linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4384b6cee71dSXin LI case $cc_basename in 4385b6cee71dSXin LI KCC*) 4386b6cee71dSXin LI # KAI C++ Compiler 4387b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4388b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4389b6cee71dSXin LI ;; 4390b6cee71dSXin LI ecpc* ) 4391d38c30c0SXin LI # old Intel C++ for x86_64, which still supported -KPIC. 4392b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4393b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4394b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4395b6cee71dSXin LI ;; 4396b6cee71dSXin LI icpc* ) 4397b6cee71dSXin LI # Intel C++, used to be incompatible with GCC. 4398b6cee71dSXin LI # ICC 10 doesn't accept -KPIC any more. 4399b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4400b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4401b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4402b6cee71dSXin LI ;; 4403b6cee71dSXin LI pgCC* | pgcpp*) 4404b6cee71dSXin LI # Portland Group C++ compiler 4405b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4406b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4407b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408b6cee71dSXin LI ;; 4409b6cee71dSXin LI cxx*) 4410b6cee71dSXin LI # Compaq C++ 4411b6cee71dSXin LI # Make sure the PIC flag is empty. It appears that all Alpha 4412b6cee71dSXin LI # Linux and Compaq Tru64 Unix objects are PIC. 4413b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4414b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4415b6cee71dSXin LI ;; 4416b6cee71dSXin LI xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4417b6cee71dSXin LI # IBM XL 8.0, 9.0 on PPC and BlueGene 4418b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4419b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4420b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4421b6cee71dSXin LI ;; 4422b6cee71dSXin LI *) 4423*ae316d1dSXin LI case `$CC -V 2>&1 | $SED 5q` in 4424b6cee71dSXin LI *Sun\ C*) 4425b6cee71dSXin LI # Sun C++ 5.9 4426b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4427b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4428b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4429b6cee71dSXin LI ;; 4430b6cee71dSXin LI esac 4431b6cee71dSXin LI ;; 4432b6cee71dSXin LI esac 4433b6cee71dSXin LI ;; 4434b6cee71dSXin LI lynxos*) 4435b6cee71dSXin LI ;; 4436b6cee71dSXin LI m88k*) 4437b6cee71dSXin LI ;; 4438b6cee71dSXin LI mvs*) 4439b6cee71dSXin LI case $cc_basename in 4440b6cee71dSXin LI cxx*) 4441b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4442b6cee71dSXin LI ;; 4443b6cee71dSXin LI *) 4444b6cee71dSXin LI ;; 4445b6cee71dSXin LI esac 4446b6cee71dSXin LI ;; 4447b6cee71dSXin LI netbsd*) 4448b6cee71dSXin LI ;; 4449b6cee71dSXin LI *qnx* | *nto*) 4450b6cee71dSXin LI # QNX uses GNU C++, but need to define -shared option too, otherwise 4451b6cee71dSXin LI # it will coredump. 4452b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4453b6cee71dSXin LI ;; 4454b6cee71dSXin LI osf3* | osf4* | osf5*) 4455b6cee71dSXin LI case $cc_basename in 4456b6cee71dSXin LI KCC*) 4457b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4458b6cee71dSXin LI ;; 4459b6cee71dSXin LI RCC*) 4460b6cee71dSXin LI # Rational C++ 2.4.1 4461b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4462b6cee71dSXin LI ;; 4463b6cee71dSXin LI cxx*) 4464b6cee71dSXin LI # Digital/Compaq C++ 4465b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4466b6cee71dSXin LI # Make sure the PIC flag is empty. It appears that all Alpha 4467b6cee71dSXin LI # Linux and Compaq Tru64 Unix objects are PIC. 4468b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4469b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4470b6cee71dSXin LI ;; 4471b6cee71dSXin LI *) 4472b6cee71dSXin LI ;; 4473b6cee71dSXin LI esac 4474b6cee71dSXin LI ;; 4475b6cee71dSXin LI psos*) 4476b6cee71dSXin LI ;; 4477b6cee71dSXin LI solaris*) 4478b6cee71dSXin LI case $cc_basename in 4479b6cee71dSXin LI CC* | sunCC*) 4480b6cee71dSXin LI # Sun C++ 4.2, 5.x and Centerline C++ 4481b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4482b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4483b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4484b6cee71dSXin LI ;; 4485b6cee71dSXin LI gcx*) 4486b6cee71dSXin LI # Green Hills C++ Compiler 4487b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4488b6cee71dSXin LI ;; 4489b6cee71dSXin LI *) 4490b6cee71dSXin LI ;; 4491b6cee71dSXin LI esac 4492b6cee71dSXin LI ;; 4493b6cee71dSXin LI sunos4*) 4494b6cee71dSXin LI case $cc_basename in 4495b6cee71dSXin LI CC*) 4496b6cee71dSXin LI # Sun C++ 4.x 4497b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4498b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4499b6cee71dSXin LI ;; 4500b6cee71dSXin LI lcc*) 4501b6cee71dSXin LI # Lucid 4502b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4503b6cee71dSXin LI ;; 4504b6cee71dSXin LI *) 4505b6cee71dSXin LI ;; 4506b6cee71dSXin LI esac 4507b6cee71dSXin LI ;; 4508b6cee71dSXin LI sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4509b6cee71dSXin LI case $cc_basename in 4510b6cee71dSXin LI CC*) 4511b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4512b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4513b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4514b6cee71dSXin LI ;; 4515b6cee71dSXin LI esac 4516b6cee71dSXin LI ;; 4517b6cee71dSXin LI tandem*) 4518b6cee71dSXin LI case $cc_basename in 4519b6cee71dSXin LI NCC*) 4520b6cee71dSXin LI # NonStop-UX NCC 3.20 4521b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4522b6cee71dSXin LI ;; 4523b6cee71dSXin LI *) 4524b6cee71dSXin LI ;; 4525b6cee71dSXin LI esac 4526b6cee71dSXin LI ;; 4527b6cee71dSXin LI vxworks*) 4528b6cee71dSXin LI ;; 4529b6cee71dSXin LI *) 4530b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4531b6cee71dSXin LI ;; 4532b6cee71dSXin LI esac 4533b6cee71dSXin LI fi 4534b6cee71dSXin LI], 4535b6cee71dSXin LI[ 4536d38c30c0SXin LI if test yes = "$GCC"; then 4537b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4538b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4539b6cee71dSXin LI 4540b6cee71dSXin LI case $host_os in 4541b6cee71dSXin LI aix*) 4542b6cee71dSXin LI # All AIX code is PIC. 4543d38c30c0SXin LI if test ia64 = "$host_cpu"; then 4544b6cee71dSXin LI # AIX 5 now supports IA64 processor 4545b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4546b6cee71dSXin LI fi 4547d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4548b6cee71dSXin LI ;; 4549b6cee71dSXin LI 4550b6cee71dSXin LI amigaos*) 4551b6cee71dSXin LI case $host_cpu in 4552b6cee71dSXin LI powerpc) 4553b6cee71dSXin LI # see comment about AmigaOS4 .so support 4554b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4555b6cee71dSXin LI ;; 4556b6cee71dSXin LI m68k) 4557b6cee71dSXin LI # FIXME: we need at least 68020 code to build shared libraries, but 4558d38c30c0SXin LI # adding the '-m68020' flag to GCC prevents building anything better, 4559d38c30c0SXin LI # like '-m68040'. 4560b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4561b6cee71dSXin LI ;; 4562b6cee71dSXin LI esac 4563b6cee71dSXin LI ;; 4564b6cee71dSXin LI 4565b6cee71dSXin LI beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4566b6cee71dSXin LI # PIC is the default for these OSes. 4567b6cee71dSXin LI ;; 4568b6cee71dSXin LI 4569b6cee71dSXin LI mingw* | cygwin* | pw32* | os2* | cegcc*) 4570b6cee71dSXin LI # This hack is so that the source file can tell whether it is being 4571b6cee71dSXin LI # built for inclusion in a dll (and should export symbols for example). 4572b6cee71dSXin LI # Although the cygwin gcc ignores -fPIC, still need this for old-style 4573b6cee71dSXin LI # (--disable-auto-import) libraries 4574b6cee71dSXin LI m4_if([$1], [GCJ], [], 4575b6cee71dSXin LI [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4576d38c30c0SXin LI case $host_os in 4577d38c30c0SXin LI os2*) 4578d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4579d38c30c0SXin LI ;; 4580d38c30c0SXin LI esac 4581b6cee71dSXin LI ;; 4582b6cee71dSXin LI 4583b6cee71dSXin LI darwin* | rhapsody*) 4584b6cee71dSXin LI # PIC is the default on this platform 4585b6cee71dSXin LI # Common symbols not allowed in MH_DYLIB files 4586b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4587b6cee71dSXin LI ;; 4588b6cee71dSXin LI 4589b6cee71dSXin LI haiku*) 4590b6cee71dSXin LI # PIC is the default for Haiku. 4591b6cee71dSXin LI # The "-static" flag exists, but is broken. 4592b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)= 4593b6cee71dSXin LI ;; 4594b6cee71dSXin LI 4595b6cee71dSXin LI hpux*) 4596b6cee71dSXin LI # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4597b6cee71dSXin LI # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4598b6cee71dSXin LI # sets the default TLS model and affects inlining. 4599b6cee71dSXin LI case $host_cpu in 4600b6cee71dSXin LI hppa*64*) 4601b6cee71dSXin LI # +Z the default 4602b6cee71dSXin LI ;; 4603b6cee71dSXin LI *) 4604b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4605b6cee71dSXin LI ;; 4606b6cee71dSXin LI esac 4607b6cee71dSXin LI ;; 4608b6cee71dSXin LI 4609b6cee71dSXin LI interix[[3-9]]*) 4610b6cee71dSXin LI # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4611b6cee71dSXin LI # Instead, we relocate shared libraries at runtime. 4612b6cee71dSXin LI ;; 4613b6cee71dSXin LI 4614b6cee71dSXin LI msdosdjgpp*) 4615b6cee71dSXin LI # Just because we use GCC doesn't mean we suddenly get shared libraries 4616b6cee71dSXin LI # on systems that don't support them. 4617b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4618b6cee71dSXin LI enable_shared=no 4619b6cee71dSXin LI ;; 4620b6cee71dSXin LI 4621b6cee71dSXin LI *nto* | *qnx*) 4622b6cee71dSXin LI # QNX uses GNU C++, but need to define -shared option too, otherwise 4623b6cee71dSXin LI # it will coredump. 4624b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4625b6cee71dSXin LI ;; 4626b6cee71dSXin LI 4627b6cee71dSXin LI sysv4*MP*) 4628b6cee71dSXin LI if test -d /usr/nec; then 4629b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4630b6cee71dSXin LI fi 4631b6cee71dSXin LI ;; 4632b6cee71dSXin LI 4633b6cee71dSXin LI *) 4634b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4635b6cee71dSXin LI ;; 4636b6cee71dSXin LI esac 4637b6cee71dSXin LI 4638b6cee71dSXin LI case $cc_basename in 4639b6cee71dSXin LI nvcc*) # Cuda Compiler Driver 2.2 4640b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4641b6cee71dSXin LI if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4642b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4643b6cee71dSXin LI fi 4644b6cee71dSXin LI ;; 4645b6cee71dSXin LI esac 4646b6cee71dSXin LI else 4647b6cee71dSXin LI # PORTME Check for flag to pass linker flags through the system compiler. 4648b6cee71dSXin LI case $host_os in 4649b6cee71dSXin LI aix*) 4650b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4651d38c30c0SXin LI if test ia64 = "$host_cpu"; then 4652b6cee71dSXin LI # AIX 5 now supports IA64 processor 4653b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4654b6cee71dSXin LI else 4655b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4656b6cee71dSXin LI fi 4657b6cee71dSXin LI ;; 4658b6cee71dSXin LI 4659d38c30c0SXin LI darwin* | rhapsody*) 4660d38c30c0SXin LI # PIC is the default on this platform 4661d38c30c0SXin LI # Common symbols not allowed in MH_DYLIB files 4662d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4663d38c30c0SXin LI case $cc_basename in 4664d38c30c0SXin LI nagfor*) 4665d38c30c0SXin LI # NAG Fortran compiler 4666d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4667d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4668d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4669d38c30c0SXin LI ;; 4670d38c30c0SXin LI esac 4671d38c30c0SXin LI ;; 4672d38c30c0SXin LI 4673b6cee71dSXin LI mingw* | cygwin* | pw32* | os2* | cegcc*) 4674b6cee71dSXin LI # This hack is so that the source file can tell whether it is being 4675b6cee71dSXin LI # built for inclusion in a dll (and should export symbols for example). 4676b6cee71dSXin LI m4_if([$1], [GCJ], [], 4677b6cee71dSXin LI [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4678d38c30c0SXin LI case $host_os in 4679d38c30c0SXin LI os2*) 4680d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4681d38c30c0SXin LI ;; 4682d38c30c0SXin LI esac 4683b6cee71dSXin LI ;; 4684b6cee71dSXin LI 4685b6cee71dSXin LI hpux9* | hpux10* | hpux11*) 4686b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4687b6cee71dSXin LI # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4688b6cee71dSXin LI # not for PA HP-UX. 4689b6cee71dSXin LI case $host_cpu in 4690b6cee71dSXin LI hppa*64*|ia64*) 4691b6cee71dSXin LI # +Z the default 4692b6cee71dSXin LI ;; 4693b6cee71dSXin LI *) 4694b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4695b6cee71dSXin LI ;; 4696b6cee71dSXin LI esac 4697b6cee71dSXin LI # Is there a better lt_prog_compiler_static that works with the bundled CC? 4698d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4699b6cee71dSXin LI ;; 4700b6cee71dSXin LI 4701b6cee71dSXin LI irix5* | irix6* | nonstopux*) 4702b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4703b6cee71dSXin LI # PIC (with -KPIC) is the default. 4704b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4705b6cee71dSXin LI ;; 4706b6cee71dSXin LI 4707d38c30c0SXin LI linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4708b6cee71dSXin LI case $cc_basename in 4709d38c30c0SXin LI # old Intel for x86_64, which still supported -KPIC. 4710b6cee71dSXin LI ecc*) 4711b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4712b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4713b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4714b6cee71dSXin LI ;; 4715b6cee71dSXin LI # icc used to be incompatible with GCC. 4716b6cee71dSXin LI # ICC 10 doesn't accept -KPIC any more. 4717b6cee71dSXin LI icc* | ifort*) 4718b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4719b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4720b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4721b6cee71dSXin LI ;; 4722b6cee71dSXin LI # Lahey Fortran 8.1. 4723b6cee71dSXin LI lf95*) 4724b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4725b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4726b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4727b6cee71dSXin LI ;; 4728b6cee71dSXin LI nagfor*) 4729b6cee71dSXin LI # NAG Fortran compiler 4730b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4731b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4732b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4733b6cee71dSXin LI ;; 4734d38c30c0SXin LI tcc*) 4735d38c30c0SXin LI # Fabrice Bellard et al's Tiny C Compiler 4736d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4737d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4738d38c30c0SXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4739d38c30c0SXin LI ;; 4740b6cee71dSXin LI pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4741b6cee71dSXin LI # Portland Group compilers (*not* the Pentium gcc compiler, 4742b6cee71dSXin LI # which looks to be a dead project) 4743b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4744b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4745b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4746b6cee71dSXin LI ;; 4747b6cee71dSXin LI ccc*) 4748b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4749b6cee71dSXin LI # All Alpha code is PIC. 4750b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4751b6cee71dSXin LI ;; 4752b6cee71dSXin LI xl* | bgxl* | bgf* | mpixl*) 4753b6cee71dSXin LI # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4754b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4755b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4756b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4757b6cee71dSXin LI ;; 4758b6cee71dSXin LI *) 4759*ae316d1dSXin LI case `$CC -V 2>&1 | $SED 5q` in 4760b6cee71dSXin LI *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4761b6cee71dSXin LI # Sun Fortran 8.3 passes all unrecognized flags to the linker 4762b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4763b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4764b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4765b6cee71dSXin LI ;; 4766b6cee71dSXin LI *Sun\ F* | *Sun*Fortran*) 4767b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4768b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4769b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4770b6cee71dSXin LI ;; 4771b6cee71dSXin LI *Sun\ C*) 4772b6cee71dSXin LI # Sun C 5.9 4773b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4774b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4775b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4776b6cee71dSXin LI ;; 4777b6cee71dSXin LI *Intel*\ [[CF]]*Compiler*) 4778b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4779b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4780b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4781b6cee71dSXin LI ;; 4782b6cee71dSXin LI *Portland\ Group*) 4783b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4784b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4785b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4786b6cee71dSXin LI ;; 4787b6cee71dSXin LI esac 4788b6cee71dSXin LI ;; 4789b6cee71dSXin LI esac 4790b6cee71dSXin LI ;; 4791b6cee71dSXin LI 4792b6cee71dSXin LI newsos6) 4793b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4794b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4795b6cee71dSXin LI ;; 4796b6cee71dSXin LI 4797b6cee71dSXin LI *nto* | *qnx*) 4798b6cee71dSXin LI # QNX uses GNU C++, but need to define -shared option too, otherwise 4799b6cee71dSXin LI # it will coredump. 4800b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4801b6cee71dSXin LI ;; 4802b6cee71dSXin LI 4803b6cee71dSXin LI osf3* | osf4* | osf5*) 4804b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4805b6cee71dSXin LI # All OSF/1 code is PIC. 4806b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4807b6cee71dSXin LI ;; 4808b6cee71dSXin LI 4809b6cee71dSXin LI rdos*) 4810b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4811b6cee71dSXin LI ;; 4812b6cee71dSXin LI 4813b6cee71dSXin LI solaris*) 4814b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4815b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4816b6cee71dSXin LI case $cc_basename in 4817b6cee71dSXin LI f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4818b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4819b6cee71dSXin LI *) 4820b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4821b6cee71dSXin LI esac 4822b6cee71dSXin LI ;; 4823b6cee71dSXin LI 4824b6cee71dSXin LI sunos4*) 4825b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4826b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4827b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4828b6cee71dSXin LI ;; 4829b6cee71dSXin LI 4830b6cee71dSXin LI sysv4 | sysv4.2uw2* | sysv4.3*) 4831b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4832b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4833b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4834b6cee71dSXin LI ;; 4835b6cee71dSXin LI 4836b6cee71dSXin LI sysv4*MP*) 4837b6cee71dSXin LI if test -d /usr/nec; then 4838b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4839b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4840b6cee71dSXin LI fi 4841b6cee71dSXin LI ;; 4842b6cee71dSXin LI 4843b6cee71dSXin LI sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4844b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4845b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4846b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4847b6cee71dSXin LI ;; 4848b6cee71dSXin LI 4849b6cee71dSXin LI unicos*) 4850b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4851b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4852b6cee71dSXin LI ;; 4853b6cee71dSXin LI 4854b6cee71dSXin LI uts4*) 4855b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4856b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4857b6cee71dSXin LI ;; 4858b6cee71dSXin LI 4859b6cee71dSXin LI *) 4860b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4861b6cee71dSXin LI ;; 4862b6cee71dSXin LI esac 4863b6cee71dSXin LI fi 4864b6cee71dSXin LI]) 4865b6cee71dSXin LIcase $host_os in 4866d38c30c0SXin LI # For platforms that do not support PIC, -DPIC is meaningless: 4867b6cee71dSXin LI *djgpp*) 4868b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4869b6cee71dSXin LI ;; 4870b6cee71dSXin LI *) 4871b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4872b6cee71dSXin LI ;; 4873b6cee71dSXin LIesac 4874b6cee71dSXin LI 4875b6cee71dSXin LIAC_CACHE_CHECK([for $compiler option to produce PIC], 4876b6cee71dSXin LI [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4877b6cee71dSXin LI [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4878b6cee71dSXin LI_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4879b6cee71dSXin LI 4880b6cee71dSXin LI# 4881b6cee71dSXin LI# Check to make sure the PIC flag actually works. 4882b6cee71dSXin LI# 4883b6cee71dSXin LIif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4884b6cee71dSXin LI _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4885b6cee71dSXin LI [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4886b6cee71dSXin LI [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4887b6cee71dSXin LI [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4888b6cee71dSXin LI "" | " "*) ;; 4889b6cee71dSXin LI *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4890b6cee71dSXin LI esac], 4891b6cee71dSXin LI [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4892b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4893b6cee71dSXin LIfi 4894b6cee71dSXin LI_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4895b6cee71dSXin LI [Additional compiler flags for building library objects]) 4896b6cee71dSXin LI 4897b6cee71dSXin LI_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4898b6cee71dSXin LI [How to pass a linker flag through the compiler]) 4899b6cee71dSXin LI# 4900b6cee71dSXin LI# Check to make sure the static flag actually works. 4901b6cee71dSXin LI# 4902b6cee71dSXin LIwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4903b6cee71dSXin LI_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4904b6cee71dSXin LI _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4905b6cee71dSXin LI $lt_tmp_static_flag, 4906b6cee71dSXin LI [], 4907b6cee71dSXin LI [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4908b6cee71dSXin LI_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4909b6cee71dSXin LI [Compiler flag to prevent dynamic linking]) 4910b6cee71dSXin LI])# _LT_COMPILER_PIC 4911b6cee71dSXin LI 4912b6cee71dSXin LI 4913b6cee71dSXin LI# _LT_LINKER_SHLIBS([TAGNAME]) 4914b6cee71dSXin LI# ---------------------------- 4915b6cee71dSXin LI# See if the linker supports building shared libraries. 4916b6cee71dSXin LIm4_defun([_LT_LINKER_SHLIBS], 4917b6cee71dSXin LI[AC_REQUIRE([LT_PATH_LD])dnl 4918b6cee71dSXin LIAC_REQUIRE([LT_PATH_NM])dnl 4919b6cee71dSXin LIm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4920b6cee71dSXin LIm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4921b6cee71dSXin LIm4_require([_LT_DECL_EGREP])dnl 4922b6cee71dSXin LIm4_require([_LT_DECL_SED])dnl 4923b6cee71dSXin LIm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4924b6cee71dSXin LIm4_require([_LT_TAG_COMPILER])dnl 4925b6cee71dSXin LIAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4926b6cee71dSXin LIm4_if([$1], [CXX], [ 4927b6cee71dSXin LI _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4928b6cee71dSXin LI _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4929b6cee71dSXin LI case $host_os in 4930b6cee71dSXin LI aix[[4-9]]*) 4931b6cee71dSXin LI # If we're using GNU nm, then we don't want the "-C" option. 4932d38c30c0SXin LI # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4933d38c30c0SXin LI # Without the "-l" option, or with the "-B" option, AIX nm treats 4934d38c30c0SXin LI # weak defined symbols like other global defined symbols, whereas 4935d38c30c0SXin LI # GNU nm marks them as "W". 4936d38c30c0SXin LI # While the 'weak' keyword is ignored in the Export File, we need 4937d38c30c0SXin LI # it in the Import File for the 'aix-soname' feature, so we have 4938d38c30c0SXin LI # to replace the "-B" option with "-P" for AIX nm. 4939b6cee71dSXin LI if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4940d38c30c0SXin 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' 4941b6cee71dSXin LI else 4942*ae316d1dSXin 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 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 4943b6cee71dSXin LI fi 4944b6cee71dSXin LI ;; 4945b6cee71dSXin LI pw32*) 4946d38c30c0SXin LI _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4947b6cee71dSXin LI ;; 4948b6cee71dSXin LI cygwin* | mingw* | cegcc*) 4949b6cee71dSXin LI case $cc_basename in 4950*ae316d1dSXin LI cl* | icl*) 4951b6cee71dSXin LI _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4952b6cee71dSXin LI ;; 4953b6cee71dSXin LI *) 4954b6cee71dSXin LI _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' 4955b6cee71dSXin LI _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4956b6cee71dSXin LI ;; 4957b6cee71dSXin LI esac 4958b6cee71dSXin LI ;; 4959b6cee71dSXin LI *) 4960b6cee71dSXin LI _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4961b6cee71dSXin LI ;; 4962b6cee71dSXin LI esac 4963b6cee71dSXin LI], [ 4964b6cee71dSXin LI runpath_var= 4965b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)= 4966b6cee71dSXin LI _LT_TAGVAR(always_export_symbols, $1)=no 4967b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)= 4968b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)= 4969b6cee71dSXin LI _LT_TAGVAR(compiler_needs_object, $1)=no 4970b6cee71dSXin LI _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4971b6cee71dSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4972b6cee71dSXin LI _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4973b6cee71dSXin LI _LT_TAGVAR(hardcode_automatic, $1)=no 4974b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=no 4975b6cee71dSXin LI _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4976b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4977b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)= 4978b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=no 4979b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4980b6cee71dSXin LI _LT_TAGVAR(inherit_rpath, $1)=no 4981b6cee71dSXin LI _LT_TAGVAR(link_all_deplibs, $1)=unknown 4982b6cee71dSXin LI _LT_TAGVAR(module_cmds, $1)= 4983b6cee71dSXin LI _LT_TAGVAR(module_expsym_cmds, $1)= 4984b6cee71dSXin LI _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4985b6cee71dSXin LI _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4986b6cee71dSXin LI _LT_TAGVAR(thread_safe_flag_spec, $1)= 4987b6cee71dSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)= 4988b6cee71dSXin LI # include_expsyms should be a list of space-separated symbols to be *always* 4989b6cee71dSXin LI # included in the symbol list 4990b6cee71dSXin LI _LT_TAGVAR(include_expsyms, $1)= 4991b6cee71dSXin LI # exclude_expsyms can be an extended regexp of symbols to exclude 4992d38c30c0SXin LI # it will be wrapped by ' (' and ')$', so one must not match beginning or 4993d38c30c0SXin LI # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4994d38c30c0SXin LI # as well as any symbol that contains 'd'. 4995b6cee71dSXin LI _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4996b6cee71dSXin LI # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4997b6cee71dSXin LI # platforms (ab)use it in PIC code, but their linkers get confused if 4998b6cee71dSXin LI # the symbol is explicitly referenced. Since portable code cannot 4999b6cee71dSXin LI # rely on this symbol name, it's probably fine to never include it in 5000b6cee71dSXin LI # preloaded symbol tables. 5001b6cee71dSXin LI # Exclude shared library initialization/finalization symbols. 5002b6cee71dSXin LIdnl Note also adjust exclude_expsyms for C++ above. 5003b6cee71dSXin LI extract_expsyms_cmds= 5004b6cee71dSXin LI 5005b6cee71dSXin LI case $host_os in 5006b6cee71dSXin LI cygwin* | mingw* | pw32* | cegcc*) 5007*ae316d1dSXin LI # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 5008b6cee71dSXin LI # When not using gcc, we currently assume that we are using 5009*ae316d1dSXin LI # Microsoft Visual C++ or Intel C++ Compiler. 5010d38c30c0SXin LI if test yes != "$GCC"; then 5011b6cee71dSXin LI with_gnu_ld=no 5012b6cee71dSXin LI fi 5013b6cee71dSXin LI ;; 5014b6cee71dSXin LI interix*) 5015*ae316d1dSXin LI # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 5016b6cee71dSXin LI with_gnu_ld=yes 5017b6cee71dSXin LI ;; 5018d38c30c0SXin LI openbsd* | bitrig*) 5019b6cee71dSXin LI with_gnu_ld=no 5020b6cee71dSXin LI ;; 5021b6cee71dSXin LI esac 5022b6cee71dSXin LI 5023b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=yes 5024b6cee71dSXin LI 5025b6cee71dSXin LI # On some targets, GNU ld is compatible enough with the native linker 5026b6cee71dSXin LI # that we're better off using the native interface for both. 5027b6cee71dSXin LI lt_use_gnu_ld_interface=no 5028d38c30c0SXin LI if test yes = "$with_gnu_ld"; then 5029b6cee71dSXin LI case $host_os in 5030b6cee71dSXin LI aix*) 5031b6cee71dSXin LI # The AIX port of GNU ld has always aspired to compatibility 5032b6cee71dSXin LI # with the native linker. However, as the warning in the GNU ld 5033b6cee71dSXin LI # block says, versions before 2.19.5* couldn't really create working 5034b6cee71dSXin LI # shared libraries, regardless of the interface used. 5035b6cee71dSXin LI case `$LD -v 2>&1` in 5036b6cee71dSXin LI *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5037b6cee71dSXin LI *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5038b6cee71dSXin LI *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5039b6cee71dSXin LI *) 5040b6cee71dSXin LI lt_use_gnu_ld_interface=yes 5041b6cee71dSXin LI ;; 5042b6cee71dSXin LI esac 5043b6cee71dSXin LI ;; 5044b6cee71dSXin LI *) 5045b6cee71dSXin LI lt_use_gnu_ld_interface=yes 5046b6cee71dSXin LI ;; 5047b6cee71dSXin LI esac 5048b6cee71dSXin LI fi 5049b6cee71dSXin LI 5050d38c30c0SXin LI if test yes = "$lt_use_gnu_ld_interface"; then 5051b6cee71dSXin LI # If archive_cmds runs LD, not CC, wlarc should be empty 5052d38c30c0SXin LI wlarc='$wl' 5053b6cee71dSXin LI 5054b6cee71dSXin LI # Set some defaults for GNU ld with shared library support. These 5055b6cee71dSXin LI # are reset later if shared libraries are not supported. Putting them 5056b6cee71dSXin LI # here allows them to be overridden if necessary. 5057b6cee71dSXin LI runpath_var=LD_RUN_PATH 5058d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5059d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5060b6cee71dSXin LI # ancient GNU ld didn't support --whole-archive et. al. 5061b6cee71dSXin LI if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5062d38c30c0SXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5063b6cee71dSXin LI else 5064b6cee71dSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)= 5065b6cee71dSXin LI fi 5066b6cee71dSXin LI supports_anon_versioning=no 5067*ae316d1dSXin LI case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 5068b6cee71dSXin LI *GNU\ gold*) supports_anon_versioning=yes ;; 5069b6cee71dSXin LI *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5070b6cee71dSXin LI *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5071b6cee71dSXin LI *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5072b6cee71dSXin LI *\ 2.11.*) ;; # other 2.11 versions 5073b6cee71dSXin LI *) supports_anon_versioning=yes ;; 5074b6cee71dSXin LI esac 5075b6cee71dSXin LI 5076b6cee71dSXin LI # See if GNU ld supports shared libraries. 5077b6cee71dSXin LI case $host_os in 5078b6cee71dSXin LI aix[[3-9]]*) 5079b6cee71dSXin LI # On AIX/PPC, the GNU linker is very broken 5080d38c30c0SXin LI if test ia64 != "$host_cpu"; then 5081b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 5082b6cee71dSXin LI cat <<_LT_EOF 1>&2 5083b6cee71dSXin LI 5084b6cee71dSXin LI*** Warning: the GNU linker, at least up to release 2.19, is reported 5085b6cee71dSXin LI*** to be unable to reliably create shared libraries on AIX. 5086b6cee71dSXin LI*** Therefore, libtool is disabling shared libraries support. If you 5087b6cee71dSXin LI*** really care for shared libraries, you may want to install binutils 5088b6cee71dSXin LI*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5089b6cee71dSXin LI*** You will then need to restart the configuration process. 5090b6cee71dSXin LI 5091b6cee71dSXin LI_LT_EOF 5092b6cee71dSXin LI fi 5093b6cee71dSXin LI ;; 5094b6cee71dSXin LI 5095b6cee71dSXin LI amigaos*) 5096b6cee71dSXin LI case $host_cpu in 5097b6cee71dSXin LI powerpc) 5098b6cee71dSXin LI # see comment about AmigaOS4 .so support 5099d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5100b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='' 5101b6cee71dSXin LI ;; 5102b6cee71dSXin LI m68k) 5103b6cee71dSXin LI _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)' 5104b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5105b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 5106b6cee71dSXin LI ;; 5107b6cee71dSXin LI esac 5108b6cee71dSXin LI ;; 5109b6cee71dSXin LI 5110b6cee71dSXin LI beos*) 5111b6cee71dSXin LI if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5112b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5113b6cee71dSXin LI # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5114b6cee71dSXin LI # support --undefined. This deserves some investigation. FIXME 5115d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5116b6cee71dSXin LI else 5117b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 5118b6cee71dSXin LI fi 5119b6cee71dSXin LI ;; 5120b6cee71dSXin LI 5121b6cee71dSXin LI cygwin* | mingw* | pw32* | cegcc*) 5122b6cee71dSXin LI # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5123b6cee71dSXin LI # as there is no search path for DLLs. 5124b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5125d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5126b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5127b6cee71dSXin LI _LT_TAGVAR(always_export_symbols, $1)=no 5128b6cee71dSXin LI _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5129b6cee71dSXin LI _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' 5130b6cee71dSXin LI _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5131b6cee71dSXin LI 5132b6cee71dSXin LI if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5133d38c30c0SXin 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' 5134d38c30c0SXin LI # If the export-symbols file already is a .def file, use it as 5135d38c30c0SXin LI # is; otherwise, prepend EXPORTS... 5136d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5137b6cee71dSXin LI cp $export_symbols $output_objdir/$soname.def; 5138b6cee71dSXin LI else 5139b6cee71dSXin LI echo EXPORTS > $output_objdir/$soname.def; 5140b6cee71dSXin LI cat $export_symbols >> $output_objdir/$soname.def; 5141b6cee71dSXin LI fi~ 5142d38c30c0SXin 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' 5143b6cee71dSXin LI else 5144b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 5145b6cee71dSXin LI fi 5146b6cee71dSXin LI ;; 5147b6cee71dSXin LI 5148b6cee71dSXin LI haiku*) 5149d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5150b6cee71dSXin LI _LT_TAGVAR(link_all_deplibs, $1)=yes 5151b6cee71dSXin LI ;; 5152b6cee71dSXin LI 5153d38c30c0SXin LI os2*) 5154d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5155d38c30c0SXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 5156d38c30c0SXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5157d38c30c0SXin LI shrext_cmds=.dll 5158d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5159d38c30c0SXin LI $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5160d38c30c0SXin LI $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5161d38c30c0SXin LI $ECHO EXPORTS >> $output_objdir/$libname.def~ 5162d38c30c0SXin LI emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5163d38c30c0SXin LI $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5164d38c30c0SXin LI emximp -o $lib $output_objdir/$libname.def' 5165d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5166d38c30c0SXin LI $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5167d38c30c0SXin LI $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5168d38c30c0SXin LI $ECHO EXPORTS >> $output_objdir/$libname.def~ 5169d38c30c0SXin LI prefix_cmds="$SED"~ 5170d38c30c0SXin LI if test EXPORTS = "`$SED 1q $export_symbols`"; then 5171d38c30c0SXin LI prefix_cmds="$prefix_cmds -e 1d"; 5172d38c30c0SXin LI fi~ 5173d38c30c0SXin LI prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5174d38c30c0SXin LI cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5175d38c30c0SXin LI $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5176d38c30c0SXin LI emximp -o $lib $output_objdir/$libname.def' 5177d38c30c0SXin LI _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5178d38c30c0SXin LI _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5179*ae316d1dSXin LI _LT_TAGVAR(file_list_spec, $1)='@' 5180d38c30c0SXin LI ;; 5181d38c30c0SXin LI 5182b6cee71dSXin LI interix[[3-9]]*) 5183b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=no 5184b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5185d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5186d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5187b6cee71dSXin LI # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5188b6cee71dSXin LI # Instead, shared libraries are loaded at an image base (0x10000000 by 5189b6cee71dSXin LI # default) and relocated if they conflict, which is a slow very memory 5190b6cee71dSXin LI # consuming and fragmenting process. To avoid this, we pick a random, 5191b6cee71dSXin LI # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5192b6cee71dSXin LI # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5193d38c30c0SXin 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' 5194*ae316d1dSXin 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' 5195b6cee71dSXin LI ;; 5196b6cee71dSXin LI 5197b6cee71dSXin LI gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5198b6cee71dSXin LI tmp_diet=no 5199d38c30c0SXin LI if test linux-dietlibc = "$host_os"; then 5200b6cee71dSXin LI case $cc_basename in 5201b6cee71dSXin LI diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5202b6cee71dSXin LI esac 5203b6cee71dSXin LI fi 5204b6cee71dSXin LI if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5205d38c30c0SXin LI && test no = "$tmp_diet" 5206b6cee71dSXin LI then 5207b6cee71dSXin LI tmp_addflag=' $pic_flag' 5208b6cee71dSXin LI tmp_sharedflag='-shared' 5209b6cee71dSXin LI case $cc_basename,$host_cpu in 5210b6cee71dSXin LI pgcc*) # Portland Group C compiler 5211d38c30c0SXin 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' 5212b6cee71dSXin LI tmp_addflag=' $pic_flag' 5213b6cee71dSXin LI ;; 5214b6cee71dSXin LI pgf77* | pgf90* | pgf95* | pgfortran*) 5215b6cee71dSXin LI # Portland Group f77 and f90 compilers 5216d38c30c0SXin 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' 5217b6cee71dSXin LI tmp_addflag=' $pic_flag -Mnomain' ;; 5218b6cee71dSXin LI ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5219b6cee71dSXin LI tmp_addflag=' -i_dynamic' ;; 5220b6cee71dSXin LI efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5221b6cee71dSXin LI tmp_addflag=' -i_dynamic -nofor_main' ;; 5222b6cee71dSXin LI ifc* | ifort*) # Intel Fortran compiler 5223b6cee71dSXin LI tmp_addflag=' -nofor_main' ;; 5224b6cee71dSXin LI lf95*) # Lahey Fortran 8.1 5225b6cee71dSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)= 5226b6cee71dSXin LI tmp_sharedflag='--shared' ;; 5227d38c30c0SXin LI nagfor*) # NAGFOR 5.3 5228d38c30c0SXin LI tmp_sharedflag='-Wl,-shared' ;; 5229b6cee71dSXin LI xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5230b6cee71dSXin LI tmp_sharedflag='-qmkshrobj' 5231b6cee71dSXin LI tmp_addflag= ;; 5232b6cee71dSXin LI nvcc*) # Cuda Compiler Driver 2.2 5233d38c30c0SXin 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' 5234b6cee71dSXin LI _LT_TAGVAR(compiler_needs_object, $1)=yes 5235b6cee71dSXin LI ;; 5236b6cee71dSXin LI esac 5237*ae316d1dSXin LI case `$CC -V 2>&1 | $SED 5q` in 5238b6cee71dSXin LI *Sun\ C*) # Sun C 5.9 5239d38c30c0SXin 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' 5240b6cee71dSXin LI _LT_TAGVAR(compiler_needs_object, $1)=yes 5241b6cee71dSXin LI tmp_sharedflag='-G' ;; 5242b6cee71dSXin LI *Sun\ F*) # Sun Fortran 8.3 5243b6cee71dSXin LI tmp_sharedflag='-G' ;; 5244b6cee71dSXin LI esac 5245d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5246b6cee71dSXin LI 5247d38c30c0SXin LI if test yes = "$supports_anon_versioning"; then 5248b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5249*ae316d1dSXin LI cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5250b6cee71dSXin LI echo "local: *; };" >> $output_objdir/$libname.ver~ 5251d38c30c0SXin LI $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5252b6cee71dSXin LI fi 5253b6cee71dSXin LI 5254b6cee71dSXin LI case $cc_basename in 5255d38c30c0SXin LI tcc*) 5256d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5257d38c30c0SXin LI ;; 5258b6cee71dSXin LI xlf* | bgf* | bgxlf* | mpixlf*) 5259b6cee71dSXin LI # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5260b6cee71dSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5261d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5262b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5263d38c30c0SXin LI if test yes = "$supports_anon_versioning"; then 5264b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5265*ae316d1dSXin LI cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5266b6cee71dSXin LI echo "local: *; };" >> $output_objdir/$libname.ver~ 5267b6cee71dSXin LI $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5268b6cee71dSXin LI fi 5269b6cee71dSXin LI ;; 5270b6cee71dSXin LI esac 5271b6cee71dSXin LI else 5272b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 5273b6cee71dSXin LI fi 5274b6cee71dSXin LI ;; 5275b6cee71dSXin LI 5276b6cee71dSXin LI netbsd*) 5277b6cee71dSXin LI if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5278b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5279b6cee71dSXin LI wlarc= 5280b6cee71dSXin LI else 5281d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5282d38c30c0SXin 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' 5283b6cee71dSXin LI fi 5284b6cee71dSXin LI ;; 5285b6cee71dSXin LI 5286b6cee71dSXin LI solaris*) 5287b6cee71dSXin LI if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5288b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 5289b6cee71dSXin LI cat <<_LT_EOF 1>&2 5290b6cee71dSXin LI 5291b6cee71dSXin LI*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5292b6cee71dSXin LI*** create shared libraries on Solaris systems. Therefore, libtool 5293b6cee71dSXin LI*** is disabling shared libraries support. We urge you to upgrade GNU 5294b6cee71dSXin LI*** binutils to release 2.9.1 or newer. Another option is to modify 5295b6cee71dSXin LI*** your PATH or compiler configuration so that the native linker is 5296b6cee71dSXin LI*** used, and then restart. 5297b6cee71dSXin LI 5298b6cee71dSXin LI_LT_EOF 5299b6cee71dSXin LI elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5300d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5301d38c30c0SXin 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' 5302b6cee71dSXin LI else 5303b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 5304b6cee71dSXin LI fi 5305b6cee71dSXin LI ;; 5306b6cee71dSXin LI 5307b6cee71dSXin LI sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5308b6cee71dSXin LI case `$LD -v 2>&1` in 5309b6cee71dSXin LI *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5310b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 5311b6cee71dSXin LI cat <<_LT_EOF 1>&2 5312b6cee71dSXin LI 5313b6cee71dSXin LI*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5314b6cee71dSXin LI*** reliably create shared libraries on SCO systems. Therefore, libtool 5315b6cee71dSXin LI*** is disabling shared libraries support. We urge you to upgrade GNU 5316b6cee71dSXin LI*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5317b6cee71dSXin LI*** your PATH or compiler configuration so that the native linker is 5318b6cee71dSXin LI*** used, and then restart. 5319b6cee71dSXin LI 5320b6cee71dSXin LI_LT_EOF 5321b6cee71dSXin LI ;; 5322b6cee71dSXin LI *) 5323b6cee71dSXin LI # For security reasons, it is highly recommended that you always 5324b6cee71dSXin LI # use absolute paths for naming shared libraries, and exclude the 5325b6cee71dSXin LI # DT_RUNPATH tag from executables and libraries. But doing so 5326b6cee71dSXin LI # requires that you compile everything twice, which is a pain. 5327b6cee71dSXin LI if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5328d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5329d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5330d38c30c0SXin 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' 5331b6cee71dSXin LI else 5332b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 5333b6cee71dSXin LI fi 5334b6cee71dSXin LI ;; 5335b6cee71dSXin LI esac 5336b6cee71dSXin LI ;; 5337b6cee71dSXin LI 5338b6cee71dSXin LI sunos4*) 5339b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5340b6cee71dSXin LI wlarc= 5341b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 5342b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5343b6cee71dSXin LI ;; 5344b6cee71dSXin LI 5345b6cee71dSXin LI *) 5346b6cee71dSXin LI if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5347d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5348d38c30c0SXin 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' 5349b6cee71dSXin LI else 5350b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 5351b6cee71dSXin LI fi 5352b6cee71dSXin LI ;; 5353b6cee71dSXin LI esac 5354b6cee71dSXin LI 5355d38c30c0SXin LI if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5356b6cee71dSXin LI runpath_var= 5357b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5358b6cee71dSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5359b6cee71dSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)= 5360b6cee71dSXin LI fi 5361b6cee71dSXin LI else 5362b6cee71dSXin LI # PORTME fill in a description of your system's linker (not GNU ld) 5363b6cee71dSXin LI case $host_os in 5364b6cee71dSXin LI aix3*) 5365b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5366b6cee71dSXin LI _LT_TAGVAR(always_export_symbols, $1)=yes 5367b6cee71dSXin LI _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' 5368b6cee71dSXin LI # Note: this linker hardcodes the directories in LIBPATH if there 5369b6cee71dSXin LI # are no directories specified by -L. 5370b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 5371d38c30c0SXin LI if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5372b6cee71dSXin LI # Neither direct hardcoding nor static linking is supported with a 5373b6cee71dSXin LI # broken collect2. 5374b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=unsupported 5375b6cee71dSXin LI fi 5376b6cee71dSXin LI ;; 5377b6cee71dSXin LI 5378b6cee71dSXin LI aix[[4-9]]*) 5379d38c30c0SXin LI if test ia64 = "$host_cpu"; then 5380b6cee71dSXin LI # On IA64, the linker does run time linking by default, so we don't 5381b6cee71dSXin LI # have to do anything special. 5382b6cee71dSXin LI aix_use_runtimelinking=no 5383b6cee71dSXin LI exp_sym_flag='-Bexport' 5384d38c30c0SXin LI no_entry_flag= 5385b6cee71dSXin LI else 5386b6cee71dSXin LI # If we're using GNU nm, then we don't want the "-C" option. 5387d38c30c0SXin LI # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5388d38c30c0SXin LI # Without the "-l" option, or with the "-B" option, AIX nm treats 5389d38c30c0SXin LI # weak defined symbols like other global defined symbols, whereas 5390d38c30c0SXin LI # GNU nm marks them as "W". 5391d38c30c0SXin LI # While the 'weak' keyword is ignored in the Export File, we need 5392d38c30c0SXin LI # it in the Import File for the 'aix-soname' feature, so we have 5393d38c30c0SXin LI # to replace the "-B" option with "-P" for AIX nm. 5394b6cee71dSXin LI if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5395d38c30c0SXin 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' 5396b6cee71dSXin LI else 5397*ae316d1dSXin 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 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 5398b6cee71dSXin LI fi 5399b6cee71dSXin LI aix_use_runtimelinking=no 5400b6cee71dSXin LI 5401b6cee71dSXin LI # Test if we are trying to use run time linking or normal 5402b6cee71dSXin LI # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5403d38c30c0SXin LI # have runtime linking enabled, and use it for executables. 5404d38c30c0SXin LI # For shared libraries, we enable/disable runtime linking 5405d38c30c0SXin LI # depending on the kind of the shared library created - 5406d38c30c0SXin LI # when "with_aix_soname,aix_use_runtimelinking" is: 5407d38c30c0SXin LI # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5408d38c30c0SXin LI # "aix,yes" lib.so shared, rtl:yes, for executables 5409d38c30c0SXin LI # lib.a static archive 5410d38c30c0SXin LI # "both,no" lib.so.V(shr.o) shared, rtl:yes 5411d38c30c0SXin LI # lib.a(lib.so.V) shared, rtl:no, for executables 5412d38c30c0SXin LI # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5413d38c30c0SXin LI # lib.a(lib.so.V) shared, rtl:no 5414d38c30c0SXin LI # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5415d38c30c0SXin LI # lib.a static archive 5416b6cee71dSXin LI case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5417b6cee71dSXin LI for ld_flag in $LDFLAGS; do 5418d38c30c0SXin LI if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5419b6cee71dSXin LI aix_use_runtimelinking=yes 5420b6cee71dSXin LI break 5421b6cee71dSXin LI fi 5422b6cee71dSXin LI done 5423d38c30c0SXin LI if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5424d38c30c0SXin LI # With aix-soname=svr4, we create the lib.so.V shared archives only, 5425d38c30c0SXin LI # so we don't have lib.a shared libs to link our executables. 5426d38c30c0SXin LI # We have to force runtime linking in this case. 5427d38c30c0SXin LI aix_use_runtimelinking=yes 5428d38c30c0SXin LI LDFLAGS="$LDFLAGS -Wl,-brtl" 5429d38c30c0SXin LI fi 5430b6cee71dSXin LI ;; 5431b6cee71dSXin LI esac 5432b6cee71dSXin LI 5433b6cee71dSXin LI exp_sym_flag='-bexport' 5434b6cee71dSXin LI no_entry_flag='-bnoentry' 5435b6cee71dSXin LI fi 5436b6cee71dSXin LI 5437b6cee71dSXin LI # When large executables or shared objects are built, AIX ld can 5438b6cee71dSXin LI # have problems creating the table of contents. If linking a library 5439b6cee71dSXin LI # or program results in "error TOC overflow" add -mminimal-toc to 5440b6cee71dSXin LI # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5441b6cee71dSXin LI # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5442b6cee71dSXin LI 5443b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='' 5444b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 5445b6cee71dSXin LI _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5446b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5447b6cee71dSXin LI _LT_TAGVAR(link_all_deplibs, $1)=yes 5448d38c30c0SXin LI _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5449d38c30c0SXin LI case $with_aix_soname,$aix_use_runtimelinking in 5450d38c30c0SXin LI aix,*) ;; # traditional, no import file 5451d38c30c0SXin LI svr4,* | *,yes) # use import file 5452d38c30c0SXin LI # The Import File defines what to hardcode. 5453d38c30c0SXin LI _LT_TAGVAR(hardcode_direct, $1)=no 5454d38c30c0SXin LI _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5455d38c30c0SXin LI ;; 5456d38c30c0SXin LI esac 5457b6cee71dSXin LI 5458d38c30c0SXin LI if test yes = "$GCC"; then 5459b6cee71dSXin LI case $host_os in aix4.[[012]]|aix4.[[012]].*) 5460b6cee71dSXin LI # We only want to do this on AIX 4.2 and lower, the check 5461b6cee71dSXin LI # below for broken collect2 doesn't work under 4.3+ 5462d38c30c0SXin LI collect2name=`$CC -print-prog-name=collect2` 5463b6cee71dSXin LI if test -f "$collect2name" && 5464b6cee71dSXin LI strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5465b6cee71dSXin LI then 5466b6cee71dSXin LI # We have reworked collect2 5467b6cee71dSXin LI : 5468b6cee71dSXin LI else 5469b6cee71dSXin LI # We have old collect2 5470b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=unsupported 5471b6cee71dSXin LI # It fails to find uninstalled libraries when the uninstalled 5472b6cee71dSXin LI # path is not listed in the libpath. Setting hardcode_minus_L 5473b6cee71dSXin LI # to unsupported forces relinking 5474b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 5475b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5476b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)= 5477b6cee71dSXin LI fi 5478b6cee71dSXin LI ;; 5479b6cee71dSXin LI esac 5480b6cee71dSXin LI shared_flag='-shared' 5481d38c30c0SXin LI if test yes = "$aix_use_runtimelinking"; then 5482d38c30c0SXin LI shared_flag="$shared_flag "'$wl-G' 5483b6cee71dSXin LI fi 5484d38c30c0SXin LI # Need to ensure runtime linking is disabled for the traditional 5485d38c30c0SXin LI # shared library, or the linker may eventually find shared libraries 5486d38c30c0SXin LI # /with/ Import File - we do not want to mix them. 5487d38c30c0SXin LI shared_flag_aix='-shared' 5488d38c30c0SXin LI shared_flag_svr4='-shared $wl-G' 5489b6cee71dSXin LI else 5490b6cee71dSXin LI # not using gcc 5491d38c30c0SXin LI if test ia64 = "$host_cpu"; then 5492b6cee71dSXin LI # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5493b6cee71dSXin LI # chokes on -Wl,-G. The following line is correct: 5494b6cee71dSXin LI shared_flag='-G' 5495b6cee71dSXin LI else 5496d38c30c0SXin LI if test yes = "$aix_use_runtimelinking"; then 5497d38c30c0SXin LI shared_flag='$wl-G' 5498b6cee71dSXin LI else 5499d38c30c0SXin LI shared_flag='$wl-bM:SRE' 5500b6cee71dSXin LI fi 5501d38c30c0SXin LI shared_flag_aix='$wl-bM:SRE' 5502d38c30c0SXin LI shared_flag_svr4='$wl-G' 5503b6cee71dSXin LI fi 5504b6cee71dSXin LI fi 5505b6cee71dSXin LI 5506d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5507b6cee71dSXin LI # It seems that -bexpall does not export symbols beginning with 5508b6cee71dSXin LI # underscore (_), so it is better to generate a list of symbols to export. 5509b6cee71dSXin LI _LT_TAGVAR(always_export_symbols, $1)=yes 5510d38c30c0SXin LI if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5511b6cee71dSXin LI # Warning - without using the other runtime loading flags (-brtl), 5512b6cee71dSXin LI # -berok will link without error, but may produce a broken library. 5513b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5514b6cee71dSXin LI # Determine the default libpath from the value encoded in an 5515b6cee71dSXin LI # empty executable. 5516b6cee71dSXin LI _LT_SYS_MODULE_PATH_AIX([$1]) 5517d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5518d38c30c0SXin 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 5519b6cee71dSXin LI else 5520d38c30c0SXin LI if test ia64 = "$host_cpu"; then 5521d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5522b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5523d38c30c0SXin 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" 5524b6cee71dSXin LI else 5525b6cee71dSXin LI # Determine the default libpath from the value encoded in an 5526b6cee71dSXin LI # empty executable. 5527b6cee71dSXin LI _LT_SYS_MODULE_PATH_AIX([$1]) 5528d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5529b6cee71dSXin LI # Warning - without using the other run time loading flags, 5530b6cee71dSXin LI # -berok will link without error, but may produce a broken library. 5531d38c30c0SXin LI _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5532d38c30c0SXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5533d38c30c0SXin LI if test yes = "$with_gnu_ld"; then 5534b6cee71dSXin LI # We only use this code for GNU lds that support --whole-archive. 5535d38c30c0SXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5536b6cee71dSXin LI else 5537b6cee71dSXin LI # Exported symbols can be pulled into shared objects from archives 5538b6cee71dSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5539b6cee71dSXin LI fi 5540b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5541d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5542d38c30c0SXin LI # -brtl affects multiple linker settings, -berok does not and is overridden later 5543d38c30c0SXin LI compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5544d38c30c0SXin LI if test svr4 != "$with_aix_soname"; then 5545b6cee71dSXin LI # This is similar to how AIX traditionally builds its shared libraries. 5546d38c30c0SXin 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' 5547d38c30c0SXin LI fi 5548d38c30c0SXin LI if test aix != "$with_aix_soname"; then 5549d38c30c0SXin 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' 5550d38c30c0SXin LI else 5551d38c30c0SXin LI # used by -dlpreopen to get the symbols 5552d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5553d38c30c0SXin LI fi 5554d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5555b6cee71dSXin LI fi 5556b6cee71dSXin LI fi 5557b6cee71dSXin LI ;; 5558b6cee71dSXin LI 5559b6cee71dSXin LI amigaos*) 5560b6cee71dSXin LI case $host_cpu in 5561b6cee71dSXin LI powerpc) 5562b6cee71dSXin LI # see comment about AmigaOS4 .so support 5563d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5564b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='' 5565b6cee71dSXin LI ;; 5566b6cee71dSXin LI m68k) 5567b6cee71dSXin LI _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)' 5568b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5569b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 5570b6cee71dSXin LI ;; 5571b6cee71dSXin LI esac 5572b6cee71dSXin LI ;; 5573b6cee71dSXin LI 5574b6cee71dSXin LI bsdi[[45]]*) 5575b6cee71dSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5576b6cee71dSXin LI ;; 5577b6cee71dSXin LI 5578b6cee71dSXin LI cygwin* | mingw* | pw32* | cegcc*) 5579b6cee71dSXin LI # When not using gcc, we currently assume that we are using 5580*ae316d1dSXin LI # Microsoft Visual C++ or Intel C++ Compiler. 5581b6cee71dSXin LI # hardcode_libdir_flag_spec is actually meaningless, as there is 5582b6cee71dSXin LI # no search path for DLLs. 5583b6cee71dSXin LI case $cc_basename in 5584*ae316d1dSXin LI cl* | icl*) 5585*ae316d1dSXin LI # Native MSVC or ICC 5586b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5587b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5588b6cee71dSXin LI _LT_TAGVAR(always_export_symbols, $1)=yes 5589b6cee71dSXin LI _LT_TAGVAR(file_list_spec, $1)='@' 5590b6cee71dSXin LI # Tell ltmain to make .lib files, not .a files. 5591b6cee71dSXin LI libext=lib 5592b6cee71dSXin LI # Tell ltmain to make .dll files, not .so files. 5593d38c30c0SXin LI shrext_cmds=.dll 5594b6cee71dSXin LI # FIXME: Setting linknames here is a bad hack. 5595d38c30c0SXin 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=' 5596d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5597d38c30c0SXin LI cp "$export_symbols" "$output_objdir/$soname.def"; 5598d38c30c0SXin LI echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5599b6cee71dSXin LI else 5600d38c30c0SXin LI $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5601b6cee71dSXin LI fi~ 5602b6cee71dSXin LI $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5603b6cee71dSXin LI linknames=' 5604b6cee71dSXin LI # The linker will not automatically build a static lib if we build a DLL. 5605b6cee71dSXin LI # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5606b6cee71dSXin LI _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5607b6cee71dSXin LI _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5608b6cee71dSXin LI _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' 5609b6cee71dSXin LI # Don't use ranlib 5610b6cee71dSXin LI _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5611b6cee71dSXin LI _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5612b6cee71dSXin LI lt_tool_outputfile="@TOOL_OUTPUT@"~ 5613b6cee71dSXin LI case $lt_outputfile in 5614b6cee71dSXin LI *.exe|*.EXE) ;; 5615b6cee71dSXin LI *) 5616d38c30c0SXin LI lt_outputfile=$lt_outputfile.exe 5617d38c30c0SXin LI lt_tool_outputfile=$lt_tool_outputfile.exe 5618b6cee71dSXin LI ;; 5619b6cee71dSXin LI esac~ 5620d38c30c0SXin LI if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5621b6cee71dSXin LI $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5622b6cee71dSXin LI $RM "$lt_outputfile.manifest"; 5623b6cee71dSXin LI fi' 5624b6cee71dSXin LI ;; 5625b6cee71dSXin LI *) 5626*ae316d1dSXin LI # Assume MSVC and ICC wrapper 5627b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5628b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5629b6cee71dSXin LI # Tell ltmain to make .lib files, not .a files. 5630b6cee71dSXin LI libext=lib 5631b6cee71dSXin LI # Tell ltmain to make .dll files, not .so files. 5632d38c30c0SXin LI shrext_cmds=.dll 5633b6cee71dSXin LI # FIXME: Setting linknames here is a bad hack. 5634b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5635b6cee71dSXin LI # The linker will automatically build a .lib file if we build a DLL. 5636b6cee71dSXin LI _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5637b6cee71dSXin LI # FIXME: Should let the user specify the lib program. 5638b6cee71dSXin LI _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5639b6cee71dSXin LI _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5640b6cee71dSXin LI ;; 5641b6cee71dSXin LI esac 5642b6cee71dSXin LI ;; 5643b6cee71dSXin LI 5644b6cee71dSXin LI darwin* | rhapsody*) 5645b6cee71dSXin LI _LT_DARWIN_LINKER_FEATURES($1) 5646b6cee71dSXin LI ;; 5647b6cee71dSXin LI 5648b6cee71dSXin LI dgux*) 5649b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5650b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5651b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5652b6cee71dSXin LI ;; 5653b6cee71dSXin LI 5654b6cee71dSXin LI # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5655b6cee71dSXin LI # support. Future versions do this automatically, but an explicit c++rt0.o 5656b6cee71dSXin LI # does not break anything, and helps significantly (at the cost of a little 5657b6cee71dSXin LI # extra space). 5658b6cee71dSXin LI freebsd2.2*) 5659b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5660b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5661b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 5662b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5663b6cee71dSXin LI ;; 5664b6cee71dSXin LI 5665b6cee71dSXin LI # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5666b6cee71dSXin LI freebsd2.*) 5667b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5668b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 5669b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 5670b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5671b6cee71dSXin LI ;; 5672b6cee71dSXin LI 5673b6cee71dSXin LI # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5674*ae316d1dSXin LI freebsd* | dragonfly* | midnightbsd*) 5675b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5676b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5677b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 5678b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5679b6cee71dSXin LI ;; 5680b6cee71dSXin LI 5681b6cee71dSXin LI hpux9*) 5682d38c30c0SXin LI if test yes = "$GCC"; then 5683d38c30c0SXin 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' 5684b6cee71dSXin LI else 5685d38c30c0SXin 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' 5686b6cee71dSXin LI fi 5687d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5688b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5689b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 5690b6cee71dSXin LI 5691b6cee71dSXin LI # hardcode_minus_L: Not really in the search PATH, 5692b6cee71dSXin LI # but as the default location of the library. 5693b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 5694d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5695b6cee71dSXin LI ;; 5696b6cee71dSXin LI 5697b6cee71dSXin LI hpux10*) 5698d38c30c0SXin LI if test yes,no = "$GCC,$with_gnu_ld"; then 5699d38c30c0SXin 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' 5700b6cee71dSXin LI else 5701b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5702b6cee71dSXin LI fi 5703d38c30c0SXin LI if test no = "$with_gnu_ld"; then 5704d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5705b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5706b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 5707b6cee71dSXin LI _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5708d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5709b6cee71dSXin LI # hardcode_minus_L: Not really in the search PATH, 5710b6cee71dSXin LI # but as the default location of the library. 5711b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 5712b6cee71dSXin LI fi 5713b6cee71dSXin LI ;; 5714b6cee71dSXin LI 5715b6cee71dSXin LI hpux11*) 5716d38c30c0SXin LI if test yes,no = "$GCC,$with_gnu_ld"; then 5717b6cee71dSXin LI case $host_cpu in 5718b6cee71dSXin LI hppa*64*) 5719d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5720b6cee71dSXin LI ;; 5721b6cee71dSXin LI ia64*) 5722d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5723b6cee71dSXin LI ;; 5724b6cee71dSXin LI *) 5725d38c30c0SXin 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' 5726b6cee71dSXin LI ;; 5727b6cee71dSXin LI esac 5728b6cee71dSXin LI else 5729b6cee71dSXin LI case $host_cpu in 5730b6cee71dSXin LI hppa*64*) 5731d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5732b6cee71dSXin LI ;; 5733b6cee71dSXin LI ia64*) 5734d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5735b6cee71dSXin LI ;; 5736b6cee71dSXin LI *) 5737b6cee71dSXin LI m4_if($1, [], [ 5738b6cee71dSXin LI # Older versions of the 11.00 compiler do not understand -b yet 5739b6cee71dSXin LI # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5740b6cee71dSXin LI _LT_LINKER_OPTION([if $CC understands -b], 5741b6cee71dSXin LI _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5742d38c30c0SXin LI [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5743b6cee71dSXin LI [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5744d38c30c0SXin LI [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5745b6cee71dSXin LI ;; 5746b6cee71dSXin LI esac 5747b6cee71dSXin LI fi 5748d38c30c0SXin LI if test no = "$with_gnu_ld"; then 5749d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5750b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5751b6cee71dSXin LI 5752b6cee71dSXin LI case $host_cpu in 5753b6cee71dSXin LI hppa*64*|ia64*) 5754b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=no 5755b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5756b6cee71dSXin LI ;; 5757b6cee71dSXin LI *) 5758b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 5759b6cee71dSXin LI _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5760d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5761b6cee71dSXin LI 5762b6cee71dSXin LI # hardcode_minus_L: Not really in the search PATH, 5763b6cee71dSXin LI # but as the default location of the library. 5764b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 5765b6cee71dSXin LI ;; 5766b6cee71dSXin LI esac 5767b6cee71dSXin LI fi 5768b6cee71dSXin LI ;; 5769b6cee71dSXin LI 5770b6cee71dSXin LI irix5* | irix6* | nonstopux*) 5771d38c30c0SXin LI if test yes = "$GCC"; then 5772d38c30c0SXin 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' 5773b6cee71dSXin LI # Try to use the -exported_symbol ld option, if it does not 5774b6cee71dSXin LI # work, assume that -exports_file does not work either and 5775b6cee71dSXin LI # implicitly export all symbols. 5776b6cee71dSXin LI # This should be the same for all languages, so no per-tag cache variable. 5777b6cee71dSXin LI AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5778b6cee71dSXin LI [lt_cv_irix_exported_symbol], 5779d38c30c0SXin LI [save_LDFLAGS=$LDFLAGS 5780d38c30c0SXin LI LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5781b6cee71dSXin LI AC_LINK_IFELSE( 5782b6cee71dSXin LI [AC_LANG_SOURCE( 5783b6cee71dSXin LI [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5784b6cee71dSXin LI [C++], [[int foo (void) { return 0; }]], 5785b6cee71dSXin LI [Fortran 77], [[ 5786b6cee71dSXin LI subroutine foo 5787b6cee71dSXin LI end]], 5788b6cee71dSXin LI [Fortran], [[ 5789b6cee71dSXin LI subroutine foo 5790b6cee71dSXin LI end]])])], 5791b6cee71dSXin LI [lt_cv_irix_exported_symbol=yes], 5792b6cee71dSXin LI [lt_cv_irix_exported_symbol=no]) 5793d38c30c0SXin LI LDFLAGS=$save_LDFLAGS]) 5794d38c30c0SXin LI if test yes = "$lt_cv_irix_exported_symbol"; then 5795d38c30c0SXin 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' 5796b6cee71dSXin LI fi 5797b6cee71dSXin LI else 5798d38c30c0SXin 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' 5799d38c30c0SXin 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' 5800b6cee71dSXin LI fi 5801b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5802d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5803b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5804b6cee71dSXin LI _LT_TAGVAR(inherit_rpath, $1)=yes 5805b6cee71dSXin LI _LT_TAGVAR(link_all_deplibs, $1)=yes 5806b6cee71dSXin LI ;; 5807b6cee71dSXin LI 5808d38c30c0SXin LI linux*) 5809d38c30c0SXin LI case $cc_basename in 5810d38c30c0SXin LI tcc*) 5811d38c30c0SXin LI # Fabrice Bellard et al's Tiny C Compiler 5812d38c30c0SXin LI _LT_TAGVAR(ld_shlibs, $1)=yes 5813d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5814d38c30c0SXin LI ;; 5815d38c30c0SXin LI esac 5816d38c30c0SXin LI ;; 5817d38c30c0SXin LI 5818b6cee71dSXin LI netbsd*) 5819b6cee71dSXin LI if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5820b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5821b6cee71dSXin LI else 5822b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5823b6cee71dSXin LI fi 5824b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5825b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 5826b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5827b6cee71dSXin LI ;; 5828b6cee71dSXin LI 5829b6cee71dSXin LI newsos6) 5830b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5831b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 5832d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5833b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5834b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5835b6cee71dSXin LI ;; 5836b6cee71dSXin LI 5837b6cee71dSXin LI *nto* | *qnx*) 5838b6cee71dSXin LI ;; 5839b6cee71dSXin LI 5840d38c30c0SXin LI openbsd* | bitrig*) 5841b6cee71dSXin LI if test -f /usr/libexec/ld.so; then 5842b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 5843b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5844b6cee71dSXin LI _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5845d38c30c0SXin LI if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5846b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5847d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5848d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5849d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5850b6cee71dSXin LI else 5851b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5852d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5853b6cee71dSXin LI fi 5854b6cee71dSXin LI else 5855b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 5856b6cee71dSXin LI fi 5857b6cee71dSXin LI ;; 5858b6cee71dSXin LI 5859b6cee71dSXin LI os2*) 5860b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5861b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 5862b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5863d38c30c0SXin LI shrext_cmds=.dll 5864d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5865d38c30c0SXin LI $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5866d38c30c0SXin LI $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5867d38c30c0SXin LI $ECHO EXPORTS >> $output_objdir/$libname.def~ 5868d38c30c0SXin LI emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5869d38c30c0SXin LI $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5870d38c30c0SXin LI emximp -o $lib $output_objdir/$libname.def' 5871d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5872d38c30c0SXin LI $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5873d38c30c0SXin LI $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5874d38c30c0SXin LI $ECHO EXPORTS >> $output_objdir/$libname.def~ 5875d38c30c0SXin LI prefix_cmds="$SED"~ 5876d38c30c0SXin LI if test EXPORTS = "`$SED 1q $export_symbols`"; then 5877d38c30c0SXin LI prefix_cmds="$prefix_cmds -e 1d"; 5878d38c30c0SXin LI fi~ 5879d38c30c0SXin LI prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5880d38c30c0SXin LI cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5881d38c30c0SXin LI $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5882d38c30c0SXin LI emximp -o $lib $output_objdir/$libname.def' 5883d38c30c0SXin LI _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5884d38c30c0SXin LI _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5885*ae316d1dSXin LI _LT_TAGVAR(file_list_spec, $1)='@' 5886b6cee71dSXin LI ;; 5887b6cee71dSXin LI 5888b6cee71dSXin LI osf3*) 5889d38c30c0SXin LI if test yes = "$GCC"; then 5890d38c30c0SXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5891d38c30c0SXin 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' 5892b6cee71dSXin LI else 5893b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5894d38c30c0SXin 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' 5895b6cee71dSXin LI fi 5896b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5897d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5898b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5899b6cee71dSXin LI ;; 5900b6cee71dSXin LI 5901b6cee71dSXin LI osf4* | osf5*) # as osf3* with the addition of -msym flag 5902d38c30c0SXin LI if test yes = "$GCC"; then 5903d38c30c0SXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5904d38c30c0SXin 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' 5905d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5906b6cee71dSXin LI else 5907b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5908d38c30c0SXin 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' 5909b6cee71dSXin LI _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~ 5910d38c30c0SXin 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' 5911b6cee71dSXin LI 5912b6cee71dSXin LI # Both c and cxx compiler support -rpath directly 5913b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5914b6cee71dSXin LI fi 5915b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5916b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5917b6cee71dSXin LI ;; 5918b6cee71dSXin LI 5919b6cee71dSXin LI solaris*) 5920b6cee71dSXin LI _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5921d38c30c0SXin LI if test yes = "$GCC"; then 5922d38c30c0SXin LI wlarc='$wl' 5923d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5924b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5925d38c30c0SXin 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' 5926b6cee71dSXin LI else 5927b6cee71dSXin LI case `$CC -V 2>&1` in 5928b6cee71dSXin LI *"Compilers 5.0"*) 5929b6cee71dSXin LI wlarc='' 5930d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5931b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5932d38c30c0SXin LI $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5933b6cee71dSXin LI ;; 5934b6cee71dSXin LI *) 5935d38c30c0SXin LI wlarc='$wl' 5936d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5937b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5938d38c30c0SXin LI $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5939b6cee71dSXin LI ;; 5940b6cee71dSXin LI esac 5941b6cee71dSXin LI fi 5942b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5943b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5944b6cee71dSXin LI case $host_os in 5945b6cee71dSXin LI solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5946b6cee71dSXin LI *) 5947b6cee71dSXin LI # The compiler driver will combine and reorder linker options, 5948d38c30c0SXin LI # but understands '-z linker_flag'. GCC discards it without '$wl', 5949b6cee71dSXin LI # but is careful enough not to reorder. 5950b6cee71dSXin LI # Supported since Solaris 2.6 (maybe 2.5.1?) 5951d38c30c0SXin LI if test yes = "$GCC"; then 5952d38c30c0SXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5953b6cee71dSXin LI else 5954b6cee71dSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5955b6cee71dSXin LI fi 5956b6cee71dSXin LI ;; 5957b6cee71dSXin LI esac 5958b6cee71dSXin LI _LT_TAGVAR(link_all_deplibs, $1)=yes 5959b6cee71dSXin LI ;; 5960b6cee71dSXin LI 5961b6cee71dSXin LI sunos4*) 5962d38c30c0SXin LI if test sequent = "$host_vendor"; then 5963b6cee71dSXin LI # Use $CC to link under sequent, because it throws in some extra .o 5964b6cee71dSXin LI # files that make .init and .fini sections work. 5965d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5966b6cee71dSXin LI else 5967b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5968b6cee71dSXin LI fi 5969b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5970b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 5971b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 5972b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5973b6cee71dSXin LI ;; 5974b6cee71dSXin LI 5975b6cee71dSXin LI sysv4) 5976b6cee71dSXin LI case $host_vendor in 5977b6cee71dSXin LI sni) 5978b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5979b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5980b6cee71dSXin LI ;; 5981b6cee71dSXin LI siemens) 5982b6cee71dSXin LI ## LD is ld it makes a PLAMLIB 5983b6cee71dSXin LI ## CC just makes a GrossModule. 5984b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5985b6cee71dSXin LI _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5986b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=no 5987b6cee71dSXin LI ;; 5988b6cee71dSXin LI motorola) 5989b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5990b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5991b6cee71dSXin LI ;; 5992b6cee71dSXin LI esac 5993b6cee71dSXin LI runpath_var='LD_RUN_PATH' 5994b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5995b6cee71dSXin LI ;; 5996b6cee71dSXin LI 5997b6cee71dSXin LI sysv4.3*) 5998b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5999b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6000b6cee71dSXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6001b6cee71dSXin LI ;; 6002b6cee71dSXin LI 6003b6cee71dSXin LI sysv4*MP*) 6004b6cee71dSXin LI if test -d /usr/nec; then 6005b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6006b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6007b6cee71dSXin LI runpath_var=LD_RUN_PATH 6008b6cee71dSXin LI hardcode_runpath_var=yes 6009b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=yes 6010b6cee71dSXin LI fi 6011b6cee71dSXin LI ;; 6012b6cee71dSXin LI 6013b6cee71dSXin LI sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6014d38c30c0SXin LI _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6015b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6016b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6017b6cee71dSXin LI runpath_var='LD_RUN_PATH' 6018b6cee71dSXin LI 6019d38c30c0SXin LI if test yes = "$GCC"; then 6020d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6021d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6022b6cee71dSXin LI else 6023d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6024d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6025b6cee71dSXin LI fi 6026b6cee71dSXin LI ;; 6027b6cee71dSXin LI 6028b6cee71dSXin LI sysv5* | sco3.2v5* | sco5v6*) 6029d38c30c0SXin LI # Note: We CANNOT use -z defs as we might desire, because we do not 6030b6cee71dSXin LI # link with -lc, and that would cause any symbols used from libc to 6031b6cee71dSXin LI # always be unresolved, which means just about no library would 6032b6cee71dSXin LI # ever link correctly. If we're not using GNU ld we use -z text 6033b6cee71dSXin LI # though, which does catch some bad symbols but isn't as heavy-handed 6034b6cee71dSXin LI # as -z defs. 6035d38c30c0SXin LI _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6036d38c30c0SXin LI _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6037b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6038b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6039d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6040b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6041b6cee71dSXin LI _LT_TAGVAR(link_all_deplibs, $1)=yes 6042d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6043b6cee71dSXin LI runpath_var='LD_RUN_PATH' 6044b6cee71dSXin LI 6045d38c30c0SXin LI if test yes = "$GCC"; then 6046d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6047d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6048b6cee71dSXin LI else 6049d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6050d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6051b6cee71dSXin LI fi 6052b6cee71dSXin LI ;; 6053b6cee71dSXin LI 6054b6cee71dSXin LI uts4*) 6055b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6056b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6057b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6058b6cee71dSXin LI ;; 6059b6cee71dSXin LI 6060b6cee71dSXin LI *) 6061b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6062b6cee71dSXin LI ;; 6063b6cee71dSXin LI esac 6064b6cee71dSXin LI 6065d38c30c0SXin LI if test sni = "$host_vendor"; then 6066b6cee71dSXin LI case $host in 6067b6cee71dSXin LI sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6068d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6069b6cee71dSXin LI ;; 6070b6cee71dSXin LI esac 6071b6cee71dSXin LI fi 6072b6cee71dSXin LI fi 6073b6cee71dSXin LI]) 6074b6cee71dSXin LIAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6075d38c30c0SXin LItest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6076b6cee71dSXin LI 6077b6cee71dSXin LI_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6078b6cee71dSXin LI 6079b6cee71dSXin LI_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6080b6cee71dSXin LI_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6081b6cee71dSXin LI_LT_DECL([], [extract_expsyms_cmds], [2], 6082b6cee71dSXin LI [The commands to extract the exported symbol list from a shared archive]) 6083b6cee71dSXin LI 6084b6cee71dSXin LI# 6085b6cee71dSXin LI# Do we need to explicitly link libc? 6086b6cee71dSXin LI# 6087b6cee71dSXin LIcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6088b6cee71dSXin LIx|xyes) 6089b6cee71dSXin LI # Assume -lc should be added 6090b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6091b6cee71dSXin LI 6092d38c30c0SXin LI if test yes,yes = "$GCC,$enable_shared"; then 6093b6cee71dSXin LI case $_LT_TAGVAR(archive_cmds, $1) in 6094b6cee71dSXin LI *'~'*) 6095b6cee71dSXin LI # FIXME: we may have to deal with multi-command sequences. 6096b6cee71dSXin LI ;; 6097b6cee71dSXin LI '$CC '*) 6098b6cee71dSXin LI # Test whether the compiler implicitly links with -lc since on some 6099b6cee71dSXin LI # systems, -lgcc has to come before -lc. If gcc already passes -lc 6100b6cee71dSXin LI # to ld, don't add -lc before -lgcc. 6101b6cee71dSXin LI AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6102b6cee71dSXin LI [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6103b6cee71dSXin LI [$RM conftest* 6104b6cee71dSXin LI echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6105b6cee71dSXin LI 6106b6cee71dSXin LI if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6107b6cee71dSXin LI soname=conftest 6108b6cee71dSXin LI lib=conftest 6109b6cee71dSXin LI libobjs=conftest.$ac_objext 6110b6cee71dSXin LI deplibs= 6111b6cee71dSXin LI wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6112b6cee71dSXin LI pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6113b6cee71dSXin LI compiler_flags=-v 6114b6cee71dSXin LI linker_flags=-v 6115b6cee71dSXin LI verstring= 6116b6cee71dSXin LI output_objdir=. 6117b6cee71dSXin LI libname=conftest 6118b6cee71dSXin LI lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6119b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)= 6120b6cee71dSXin LI if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6121b6cee71dSXin LI then 6122b6cee71dSXin LI lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6123b6cee71dSXin LI else 6124b6cee71dSXin LI lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6125b6cee71dSXin LI fi 6126b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6127b6cee71dSXin LI else 6128b6cee71dSXin LI cat conftest.err 1>&5 6129b6cee71dSXin LI fi 6130b6cee71dSXin LI $RM conftest* 6131b6cee71dSXin LI ]) 6132b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6133b6cee71dSXin LI ;; 6134b6cee71dSXin LI esac 6135b6cee71dSXin LI fi 6136b6cee71dSXin LI ;; 6137b6cee71dSXin LIesac 6138b6cee71dSXin LI 6139b6cee71dSXin LI_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6140b6cee71dSXin LI [Whether or not to add -lc for building shared libraries]) 6141b6cee71dSXin LI_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6142b6cee71dSXin LI [enable_shared_with_static_runtimes], [0], 6143b6cee71dSXin LI [Whether or not to disallow shared libs when runtime libs are static]) 6144b6cee71dSXin LI_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6145b6cee71dSXin LI [Compiler flag to allow reflexive dlopens]) 6146b6cee71dSXin LI_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6147b6cee71dSXin LI [Compiler flag to generate shared objects directly from archives]) 6148b6cee71dSXin LI_LT_TAGDECL([], [compiler_needs_object], [1], 6149b6cee71dSXin LI [Whether the compiler copes with passing no objects directly]) 6150b6cee71dSXin LI_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6151b6cee71dSXin LI [Create an old-style archive from a shared archive]) 6152b6cee71dSXin LI_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6153b6cee71dSXin LI [Create a temporary old-style archive to link instead of a shared archive]) 6154b6cee71dSXin LI_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6155b6cee71dSXin LI_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6156b6cee71dSXin LI_LT_TAGDECL([], [module_cmds], [2], 6157b6cee71dSXin LI [Commands used to build a loadable module if different from building 6158b6cee71dSXin LI a shared archive.]) 6159b6cee71dSXin LI_LT_TAGDECL([], [module_expsym_cmds], [2]) 6160b6cee71dSXin LI_LT_TAGDECL([], [with_gnu_ld], [1], 6161b6cee71dSXin LI [Whether we are building with GNU ld or not]) 6162b6cee71dSXin LI_LT_TAGDECL([], [allow_undefined_flag], [1], 6163b6cee71dSXin LI [Flag that allows shared libraries with undefined symbols to be built]) 6164b6cee71dSXin LI_LT_TAGDECL([], [no_undefined_flag], [1], 6165b6cee71dSXin LI [Flag that enforces no undefined symbols]) 6166b6cee71dSXin LI_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6167b6cee71dSXin LI [Flag to hardcode $libdir into a binary during linking. 6168b6cee71dSXin LI This must work even if $libdir does not exist]) 6169b6cee71dSXin LI_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6170b6cee71dSXin LI [Whether we need a single "-rpath" flag with a separated argument]) 6171b6cee71dSXin LI_LT_TAGDECL([], [hardcode_direct], [0], 6172d38c30c0SXin LI [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6173b6cee71dSXin LI DIR into the resulting binary]) 6174b6cee71dSXin LI_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6175d38c30c0SXin LI [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6176b6cee71dSXin LI DIR into the resulting binary and the resulting library dependency is 6177d38c30c0SXin LI "absolute", i.e impossible to change by setting $shlibpath_var if the 6178b6cee71dSXin LI library is relocated]) 6179b6cee71dSXin LI_LT_TAGDECL([], [hardcode_minus_L], [0], 6180b6cee71dSXin LI [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6181b6cee71dSXin LI into the resulting binary]) 6182b6cee71dSXin LI_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6183b6cee71dSXin LI [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6184b6cee71dSXin LI into the resulting binary]) 6185b6cee71dSXin LI_LT_TAGDECL([], [hardcode_automatic], [0], 6186b6cee71dSXin LI [Set to "yes" if building a shared library automatically hardcodes DIR 6187b6cee71dSXin LI into the library and all subsequent libraries and executables linked 6188b6cee71dSXin LI against it]) 6189b6cee71dSXin LI_LT_TAGDECL([], [inherit_rpath], [0], 6190b6cee71dSXin LI [Set to yes if linker adds runtime paths of dependent libraries 6191b6cee71dSXin LI to runtime path list]) 6192b6cee71dSXin LI_LT_TAGDECL([], [link_all_deplibs], [0], 6193b6cee71dSXin LI [Whether libtool must link a program against all its dependency libraries]) 6194b6cee71dSXin LI_LT_TAGDECL([], [always_export_symbols], [0], 6195b6cee71dSXin LI [Set to "yes" if exported symbols are required]) 6196b6cee71dSXin LI_LT_TAGDECL([], [export_symbols_cmds], [2], 6197b6cee71dSXin LI [The commands to list exported symbols]) 6198b6cee71dSXin LI_LT_TAGDECL([], [exclude_expsyms], [1], 6199b6cee71dSXin LI [Symbols that should not be listed in the preloaded symbols]) 6200b6cee71dSXin LI_LT_TAGDECL([], [include_expsyms], [1], 6201b6cee71dSXin LI [Symbols that must always be exported]) 6202b6cee71dSXin LI_LT_TAGDECL([], [prelink_cmds], [2], 6203b6cee71dSXin LI [Commands necessary for linking programs (against libraries) with templates]) 6204b6cee71dSXin LI_LT_TAGDECL([], [postlink_cmds], [2], 6205b6cee71dSXin LI [Commands necessary for finishing linking programs]) 6206b6cee71dSXin LI_LT_TAGDECL([], [file_list_spec], [1], 6207b6cee71dSXin LI [Specify filename containing input files]) 6208b6cee71dSXin LIdnl FIXME: Not yet implemented 6209b6cee71dSXin LIdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6210b6cee71dSXin LIdnl [Compiler flag to generate thread safe objects]) 6211b6cee71dSXin LI])# _LT_LINKER_SHLIBS 6212b6cee71dSXin LI 6213b6cee71dSXin LI 6214b6cee71dSXin LI# _LT_LANG_C_CONFIG([TAG]) 6215b6cee71dSXin LI# ------------------------ 6216b6cee71dSXin LI# Ensure that the configuration variables for a C compiler are suitably 6217b6cee71dSXin LI# defined. These variables are subsequently used by _LT_CONFIG to write 6218d38c30c0SXin LI# the compiler configuration to 'libtool'. 6219b6cee71dSXin LIm4_defun([_LT_LANG_C_CONFIG], 6220b6cee71dSXin LI[m4_require([_LT_DECL_EGREP])dnl 6221d38c30c0SXin LIlt_save_CC=$CC 6222b6cee71dSXin LIAC_LANG_PUSH(C) 6223b6cee71dSXin LI 6224b6cee71dSXin LI# Source file extension for C test sources. 6225b6cee71dSXin LIac_ext=c 6226b6cee71dSXin LI 6227b6cee71dSXin LI# Object file extension for compiled C test sources. 6228b6cee71dSXin LIobjext=o 6229b6cee71dSXin LI_LT_TAGVAR(objext, $1)=$objext 6230b6cee71dSXin LI 6231b6cee71dSXin LI# Code to be used in simple compile tests 6232b6cee71dSXin LIlt_simple_compile_test_code="int some_variable = 0;" 6233b6cee71dSXin LI 6234b6cee71dSXin LI# Code to be used in simple link tests 6235b6cee71dSXin LIlt_simple_link_test_code='int main(){return(0);}' 6236b6cee71dSXin LI 6237b6cee71dSXin LI_LT_TAG_COMPILER 6238b6cee71dSXin LI# Save the default compiler, since it gets overwritten when the other 6239b6cee71dSXin LI# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6240b6cee71dSXin LIcompiler_DEFAULT=$CC 6241b6cee71dSXin LI 6242b6cee71dSXin LI# save warnings/boilerplate of simple test code 6243b6cee71dSXin LI_LT_COMPILER_BOILERPLATE 6244b6cee71dSXin LI_LT_LINKER_BOILERPLATE 6245b6cee71dSXin LI 6246b6cee71dSXin LI## CAVEAT EMPTOR: 6247b6cee71dSXin LI## There is no encapsulation within the following macros, do not change 6248b6cee71dSXin LI## the running order or otherwise move them around unless you know exactly 6249b6cee71dSXin LI## what you are doing... 6250b6cee71dSXin LIif test -n "$compiler"; then 6251b6cee71dSXin LI _LT_COMPILER_NO_RTTI($1) 6252b6cee71dSXin LI _LT_COMPILER_PIC($1) 6253b6cee71dSXin LI _LT_COMPILER_C_O($1) 6254b6cee71dSXin LI _LT_COMPILER_FILE_LOCKS($1) 6255b6cee71dSXin LI _LT_LINKER_SHLIBS($1) 6256b6cee71dSXin LI _LT_SYS_DYNAMIC_LINKER($1) 6257b6cee71dSXin LI _LT_LINKER_HARDCODE_LIBPATH($1) 6258b6cee71dSXin LI LT_SYS_DLOPEN_SELF 6259b6cee71dSXin LI _LT_CMD_STRIPLIB 6260b6cee71dSXin LI 6261d38c30c0SXin LI # Report what library types will actually be built 6262b6cee71dSXin LI AC_MSG_CHECKING([if libtool supports shared libraries]) 6263b6cee71dSXin LI AC_MSG_RESULT([$can_build_shared]) 6264b6cee71dSXin LI 6265b6cee71dSXin LI AC_MSG_CHECKING([whether to build shared libraries]) 6266d38c30c0SXin LI test no = "$can_build_shared" && enable_shared=no 6267b6cee71dSXin LI 6268b6cee71dSXin LI # On AIX, shared libraries and static libraries use the same namespace, and 6269b6cee71dSXin LI # are all built from PIC. 6270b6cee71dSXin LI case $host_os in 6271b6cee71dSXin LI aix3*) 6272d38c30c0SXin LI test yes = "$enable_shared" && enable_static=no 6273b6cee71dSXin LI if test -n "$RANLIB"; then 6274b6cee71dSXin LI archive_cmds="$archive_cmds~\$RANLIB \$lib" 6275b6cee71dSXin LI postinstall_cmds='$RANLIB $lib' 6276b6cee71dSXin LI fi 6277b6cee71dSXin LI ;; 6278b6cee71dSXin LI 6279b6cee71dSXin LI aix[[4-9]]*) 6280d38c30c0SXin LI if test ia64 != "$host_cpu"; then 6281d38c30c0SXin LI case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6282d38c30c0SXin LI yes,aix,yes) ;; # shared object as lib.so file only 6283d38c30c0SXin LI yes,svr4,*) ;; # shared object as lib.so archive member only 6284d38c30c0SXin LI yes,*) enable_static=no ;; # shared object in lib.a archive as well 6285d38c30c0SXin LI esac 6286b6cee71dSXin LI fi 6287b6cee71dSXin LI ;; 6288b6cee71dSXin LI esac 6289b6cee71dSXin LI AC_MSG_RESULT([$enable_shared]) 6290b6cee71dSXin LI 6291b6cee71dSXin LI AC_MSG_CHECKING([whether to build static libraries]) 6292b6cee71dSXin LI # Make sure either enable_shared or enable_static is yes. 6293d38c30c0SXin LI test yes = "$enable_shared" || enable_static=yes 6294b6cee71dSXin LI AC_MSG_RESULT([$enable_static]) 6295b6cee71dSXin LI 6296b6cee71dSXin LI _LT_CONFIG($1) 6297b6cee71dSXin LIfi 6298b6cee71dSXin LIAC_LANG_POP 6299d38c30c0SXin LICC=$lt_save_CC 6300b6cee71dSXin LI])# _LT_LANG_C_CONFIG 6301b6cee71dSXin LI 6302b6cee71dSXin LI 6303b6cee71dSXin LI# _LT_LANG_CXX_CONFIG([TAG]) 6304b6cee71dSXin LI# -------------------------- 6305b6cee71dSXin LI# Ensure that the configuration variables for a C++ compiler are suitably 6306b6cee71dSXin LI# defined. These variables are subsequently used by _LT_CONFIG to write 6307d38c30c0SXin LI# the compiler configuration to 'libtool'. 6308b6cee71dSXin LIm4_defun([_LT_LANG_CXX_CONFIG], 6309b6cee71dSXin LI[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6310b6cee71dSXin LIm4_require([_LT_DECL_EGREP])dnl 6311b6cee71dSXin LIm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6312d38c30c0SXin LIif test -n "$CXX" && ( test no != "$CXX" && 6313d38c30c0SXin LI ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6314d38c30c0SXin LI (test g++ != "$CXX"))); then 6315b6cee71dSXin LI AC_PROG_CXXCPP 6316b6cee71dSXin LIelse 6317b6cee71dSXin LI _lt_caught_CXX_error=yes 6318b6cee71dSXin LIfi 6319b6cee71dSXin LI 6320b6cee71dSXin LIAC_LANG_PUSH(C++) 6321b6cee71dSXin LI_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6322b6cee71dSXin LI_LT_TAGVAR(allow_undefined_flag, $1)= 6323b6cee71dSXin LI_LT_TAGVAR(always_export_symbols, $1)=no 6324b6cee71dSXin LI_LT_TAGVAR(archive_expsym_cmds, $1)= 6325b6cee71dSXin LI_LT_TAGVAR(compiler_needs_object, $1)=no 6326b6cee71dSXin LI_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6327b6cee71dSXin LI_LT_TAGVAR(hardcode_direct, $1)=no 6328b6cee71dSXin LI_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6329b6cee71dSXin LI_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6330b6cee71dSXin LI_LT_TAGVAR(hardcode_libdir_separator, $1)= 6331b6cee71dSXin LI_LT_TAGVAR(hardcode_minus_L, $1)=no 6332b6cee71dSXin LI_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6333b6cee71dSXin LI_LT_TAGVAR(hardcode_automatic, $1)=no 6334b6cee71dSXin LI_LT_TAGVAR(inherit_rpath, $1)=no 6335b6cee71dSXin LI_LT_TAGVAR(module_cmds, $1)= 6336b6cee71dSXin LI_LT_TAGVAR(module_expsym_cmds, $1)= 6337b6cee71dSXin LI_LT_TAGVAR(link_all_deplibs, $1)=unknown 6338b6cee71dSXin LI_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6339b6cee71dSXin LI_LT_TAGVAR(reload_flag, $1)=$reload_flag 6340b6cee71dSXin LI_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6341b6cee71dSXin LI_LT_TAGVAR(no_undefined_flag, $1)= 6342b6cee71dSXin LI_LT_TAGVAR(whole_archive_flag_spec, $1)= 6343b6cee71dSXin LI_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6344b6cee71dSXin LI 6345b6cee71dSXin LI# Source file extension for C++ test sources. 6346b6cee71dSXin LIac_ext=cpp 6347b6cee71dSXin LI 6348b6cee71dSXin LI# Object file extension for compiled C++ test sources. 6349b6cee71dSXin LIobjext=o 6350b6cee71dSXin LI_LT_TAGVAR(objext, $1)=$objext 6351b6cee71dSXin LI 6352b6cee71dSXin LI# No sense in running all these tests if we already determined that 6353b6cee71dSXin LI# the CXX compiler isn't working. Some variables (like enable_shared) 6354b6cee71dSXin LI# are currently assumed to apply to all compilers on this platform, 6355b6cee71dSXin LI# and will be corrupted by setting them based on a non-working compiler. 6356d38c30c0SXin LIif test yes != "$_lt_caught_CXX_error"; then 6357b6cee71dSXin LI # Code to be used in simple compile tests 6358b6cee71dSXin LI lt_simple_compile_test_code="int some_variable = 0;" 6359b6cee71dSXin LI 6360b6cee71dSXin LI # Code to be used in simple link tests 6361b6cee71dSXin LI lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6362b6cee71dSXin LI 6363b6cee71dSXin LI # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6364b6cee71dSXin LI _LT_TAG_COMPILER 6365b6cee71dSXin LI 6366b6cee71dSXin LI # save warnings/boilerplate of simple test code 6367b6cee71dSXin LI _LT_COMPILER_BOILERPLATE 6368b6cee71dSXin LI _LT_LINKER_BOILERPLATE 6369b6cee71dSXin LI 6370b6cee71dSXin LI # Allow CC to be a program name with arguments. 6371b6cee71dSXin LI lt_save_CC=$CC 6372b6cee71dSXin LI lt_save_CFLAGS=$CFLAGS 6373b6cee71dSXin LI lt_save_LD=$LD 6374b6cee71dSXin LI lt_save_GCC=$GCC 6375b6cee71dSXin LI GCC=$GXX 6376b6cee71dSXin LI lt_save_with_gnu_ld=$with_gnu_ld 6377b6cee71dSXin LI lt_save_path_LD=$lt_cv_path_LD 6378b6cee71dSXin LI if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6379b6cee71dSXin LI lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6380b6cee71dSXin LI else 6381b6cee71dSXin LI $as_unset lt_cv_prog_gnu_ld 6382b6cee71dSXin LI fi 6383b6cee71dSXin LI if test -n "${lt_cv_path_LDCXX+set}"; then 6384b6cee71dSXin LI lt_cv_path_LD=$lt_cv_path_LDCXX 6385b6cee71dSXin LI else 6386b6cee71dSXin LI $as_unset lt_cv_path_LD 6387b6cee71dSXin LI fi 6388b6cee71dSXin LI test -z "${LDCXX+set}" || LD=$LDCXX 6389b6cee71dSXin LI CC=${CXX-"c++"} 6390b6cee71dSXin LI CFLAGS=$CXXFLAGS 6391b6cee71dSXin LI compiler=$CC 6392b6cee71dSXin LI _LT_TAGVAR(compiler, $1)=$CC 6393b6cee71dSXin LI _LT_CC_BASENAME([$compiler]) 6394b6cee71dSXin LI 6395b6cee71dSXin LI if test -n "$compiler"; then 6396b6cee71dSXin LI # We don't want -fno-exception when compiling C++ code, so set the 6397b6cee71dSXin LI # no_builtin_flag separately 6398d38c30c0SXin LI if test yes = "$GXX"; then 6399b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6400b6cee71dSXin LI else 6401b6cee71dSXin LI _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6402b6cee71dSXin LI fi 6403b6cee71dSXin LI 6404d38c30c0SXin LI if test yes = "$GXX"; then 6405b6cee71dSXin LI # Set up default GNU C++ configuration 6406b6cee71dSXin LI 6407b6cee71dSXin LI LT_PATH_LD 6408b6cee71dSXin LI 6409b6cee71dSXin LI # Check if GNU C++ uses GNU ld as the underlying linker, since the 6410b6cee71dSXin LI # archiving commands below assume that GNU ld is being used. 6411d38c30c0SXin LI if test yes = "$with_gnu_ld"; then 6412d38c30c0SXin 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' 6413d38c30c0SXin 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' 6414b6cee71dSXin LI 6415d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6416d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6417b6cee71dSXin LI 6418b6cee71dSXin LI # If archive_cmds runs LD, not CC, wlarc should be empty 6419b6cee71dSXin LI # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6420b6cee71dSXin LI # investigate it a little bit more. (MM) 6421d38c30c0SXin LI wlarc='$wl' 6422b6cee71dSXin LI 6423b6cee71dSXin LI # ancient GNU ld didn't support --whole-archive et. al. 6424b6cee71dSXin LI if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6425b6cee71dSXin LI $GREP 'no-whole-archive' > /dev/null; then 6426d38c30c0SXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6427b6cee71dSXin LI else 6428b6cee71dSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)= 6429b6cee71dSXin LI fi 6430b6cee71dSXin LI else 6431b6cee71dSXin LI with_gnu_ld=no 6432b6cee71dSXin LI wlarc= 6433b6cee71dSXin LI 6434b6cee71dSXin LI # A generic and very simple default shared library creation 6435b6cee71dSXin LI # command for GNU C++ for the case where it uses the native 6436b6cee71dSXin LI # linker, instead of GNU ld. If possible, this setting should 6437b6cee71dSXin LI # overridden to take advantage of the native linker features on 6438b6cee71dSXin LI # the platform it is being used on. 6439b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6440b6cee71dSXin LI fi 6441b6cee71dSXin LI 6442b6cee71dSXin LI # Commands to make compiler produce verbose output that lists 6443b6cee71dSXin LI # what "hidden" libraries, object files and flags are used when 6444b6cee71dSXin LI # linking a shared library. 6445b6cee71dSXin LI output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6446b6cee71dSXin LI 6447b6cee71dSXin LI else 6448b6cee71dSXin LI GXX=no 6449b6cee71dSXin LI with_gnu_ld=no 6450b6cee71dSXin LI wlarc= 6451b6cee71dSXin LI fi 6452b6cee71dSXin LI 6453b6cee71dSXin LI # PORTME: fill in a description of your system's C++ link characteristics 6454b6cee71dSXin LI AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6455b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=yes 6456b6cee71dSXin LI case $host_os in 6457b6cee71dSXin LI aix3*) 6458b6cee71dSXin LI # FIXME: insert proper C++ library support 6459b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6460b6cee71dSXin LI ;; 6461b6cee71dSXin LI aix[[4-9]]*) 6462d38c30c0SXin LI if test ia64 = "$host_cpu"; then 6463b6cee71dSXin LI # On IA64, the linker does run time linking by default, so we don't 6464b6cee71dSXin LI # have to do anything special. 6465b6cee71dSXin LI aix_use_runtimelinking=no 6466b6cee71dSXin LI exp_sym_flag='-Bexport' 6467d38c30c0SXin LI no_entry_flag= 6468b6cee71dSXin LI else 6469b6cee71dSXin LI aix_use_runtimelinking=no 6470b6cee71dSXin LI 6471b6cee71dSXin LI # Test if we are trying to use run time linking or normal 6472b6cee71dSXin LI # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6473d38c30c0SXin LI # have runtime linking enabled, and use it for executables. 6474d38c30c0SXin LI # For shared libraries, we enable/disable runtime linking 6475d38c30c0SXin LI # depending on the kind of the shared library created - 6476d38c30c0SXin LI # when "with_aix_soname,aix_use_runtimelinking" is: 6477d38c30c0SXin LI # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6478d38c30c0SXin LI # "aix,yes" lib.so shared, rtl:yes, for executables 6479d38c30c0SXin LI # lib.a static archive 6480d38c30c0SXin LI # "both,no" lib.so.V(shr.o) shared, rtl:yes 6481d38c30c0SXin LI # lib.a(lib.so.V) shared, rtl:no, for executables 6482d38c30c0SXin LI # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6483d38c30c0SXin LI # lib.a(lib.so.V) shared, rtl:no 6484d38c30c0SXin LI # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6485d38c30c0SXin LI # lib.a static archive 6486b6cee71dSXin LI case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6487b6cee71dSXin LI for ld_flag in $LDFLAGS; do 6488b6cee71dSXin LI case $ld_flag in 6489b6cee71dSXin LI *-brtl*) 6490b6cee71dSXin LI aix_use_runtimelinking=yes 6491b6cee71dSXin LI break 6492b6cee71dSXin LI ;; 6493b6cee71dSXin LI esac 6494b6cee71dSXin LI done 6495d38c30c0SXin LI if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6496d38c30c0SXin LI # With aix-soname=svr4, we create the lib.so.V shared archives only, 6497d38c30c0SXin LI # so we don't have lib.a shared libs to link our executables. 6498d38c30c0SXin LI # We have to force runtime linking in this case. 6499d38c30c0SXin LI aix_use_runtimelinking=yes 6500d38c30c0SXin LI LDFLAGS="$LDFLAGS -Wl,-brtl" 6501d38c30c0SXin LI fi 6502b6cee71dSXin LI ;; 6503b6cee71dSXin LI esac 6504b6cee71dSXin LI 6505b6cee71dSXin LI exp_sym_flag='-bexport' 6506b6cee71dSXin LI no_entry_flag='-bnoentry' 6507b6cee71dSXin LI fi 6508b6cee71dSXin LI 6509b6cee71dSXin LI # When large executables or shared objects are built, AIX ld can 6510b6cee71dSXin LI # have problems creating the table of contents. If linking a library 6511b6cee71dSXin LI # or program results in "error TOC overflow" add -mminimal-toc to 6512b6cee71dSXin LI # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6513b6cee71dSXin LI # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6514b6cee71dSXin LI 6515b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='' 6516b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 6517b6cee71dSXin LI _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6518b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6519b6cee71dSXin LI _LT_TAGVAR(link_all_deplibs, $1)=yes 6520d38c30c0SXin LI _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6521d38c30c0SXin LI case $with_aix_soname,$aix_use_runtimelinking in 6522d38c30c0SXin LI aix,*) ;; # no import file 6523d38c30c0SXin LI svr4,* | *,yes) # use import file 6524d38c30c0SXin LI # The Import File defines what to hardcode. 6525d38c30c0SXin LI _LT_TAGVAR(hardcode_direct, $1)=no 6526d38c30c0SXin LI _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6527d38c30c0SXin LI ;; 6528d38c30c0SXin LI esac 6529b6cee71dSXin LI 6530d38c30c0SXin LI if test yes = "$GXX"; then 6531b6cee71dSXin LI case $host_os in aix4.[[012]]|aix4.[[012]].*) 6532b6cee71dSXin LI # We only want to do this on AIX 4.2 and lower, the check 6533b6cee71dSXin LI # below for broken collect2 doesn't work under 4.3+ 6534d38c30c0SXin LI collect2name=`$CC -print-prog-name=collect2` 6535b6cee71dSXin LI if test -f "$collect2name" && 6536b6cee71dSXin LI strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6537b6cee71dSXin LI then 6538b6cee71dSXin LI # We have reworked collect2 6539b6cee71dSXin LI : 6540b6cee71dSXin LI else 6541b6cee71dSXin LI # We have old collect2 6542b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=unsupported 6543b6cee71dSXin LI # It fails to find uninstalled libraries when the uninstalled 6544b6cee71dSXin LI # path is not listed in the libpath. Setting hardcode_minus_L 6545b6cee71dSXin LI # to unsupported forces relinking 6546b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 6547b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6548b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)= 6549b6cee71dSXin LI fi 6550b6cee71dSXin LI esac 6551b6cee71dSXin LI shared_flag='-shared' 6552d38c30c0SXin LI if test yes = "$aix_use_runtimelinking"; then 6553d38c30c0SXin LI shared_flag=$shared_flag' $wl-G' 6554b6cee71dSXin LI fi 6555d38c30c0SXin LI # Need to ensure runtime linking is disabled for the traditional 6556d38c30c0SXin LI # shared library, or the linker may eventually find shared libraries 6557d38c30c0SXin LI # /with/ Import File - we do not want to mix them. 6558d38c30c0SXin LI shared_flag_aix='-shared' 6559d38c30c0SXin LI shared_flag_svr4='-shared $wl-G' 6560b6cee71dSXin LI else 6561b6cee71dSXin LI # not using gcc 6562d38c30c0SXin LI if test ia64 = "$host_cpu"; then 6563b6cee71dSXin LI # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6564b6cee71dSXin LI # chokes on -Wl,-G. The following line is correct: 6565b6cee71dSXin LI shared_flag='-G' 6566b6cee71dSXin LI else 6567d38c30c0SXin LI if test yes = "$aix_use_runtimelinking"; then 6568d38c30c0SXin LI shared_flag='$wl-G' 6569b6cee71dSXin LI else 6570d38c30c0SXin LI shared_flag='$wl-bM:SRE' 6571b6cee71dSXin LI fi 6572d38c30c0SXin LI shared_flag_aix='$wl-bM:SRE' 6573d38c30c0SXin LI shared_flag_svr4='$wl-G' 6574b6cee71dSXin LI fi 6575b6cee71dSXin LI fi 6576b6cee71dSXin LI 6577d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6578b6cee71dSXin LI # It seems that -bexpall does not export symbols beginning with 6579b6cee71dSXin LI # underscore (_), so it is better to generate a list of symbols to 6580b6cee71dSXin LI # export. 6581b6cee71dSXin LI _LT_TAGVAR(always_export_symbols, $1)=yes 6582d38c30c0SXin LI if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6583b6cee71dSXin LI # Warning - without using the other runtime loading flags (-brtl), 6584b6cee71dSXin LI # -berok will link without error, but may produce a broken library. 6585d38c30c0SXin LI # The "-G" linker flag allows undefined symbols. 6586d38c30c0SXin LI _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6587b6cee71dSXin LI # Determine the default libpath from the value encoded in an empty 6588b6cee71dSXin LI # executable. 6589b6cee71dSXin LI _LT_SYS_MODULE_PATH_AIX([$1]) 6590d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6591b6cee71dSXin LI 6592d38c30c0SXin 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 6593b6cee71dSXin LI else 6594d38c30c0SXin LI if test ia64 = "$host_cpu"; then 6595d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6596b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6597d38c30c0SXin 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" 6598b6cee71dSXin LI else 6599b6cee71dSXin LI # Determine the default libpath from the value encoded in an 6600b6cee71dSXin LI # empty executable. 6601b6cee71dSXin LI _LT_SYS_MODULE_PATH_AIX([$1]) 6602d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6603b6cee71dSXin LI # Warning - without using the other run time loading flags, 6604b6cee71dSXin LI # -berok will link without error, but may produce a broken library. 6605d38c30c0SXin LI _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6606d38c30c0SXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6607d38c30c0SXin LI if test yes = "$with_gnu_ld"; then 6608b6cee71dSXin LI # We only use this code for GNU lds that support --whole-archive. 6609d38c30c0SXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6610b6cee71dSXin LI else 6611b6cee71dSXin LI # Exported symbols can be pulled into shared objects from archives 6612b6cee71dSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6613b6cee71dSXin LI fi 6614b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6615d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6616d38c30c0SXin LI # -brtl affects multiple linker settings, -berok does not and is overridden later 6617d38c30c0SXin LI compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6618d38c30c0SXin LI if test svr4 != "$with_aix_soname"; then 6619b6cee71dSXin LI # This is similar to how AIX traditionally builds its shared 6620d38c30c0SXin LI # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6621d38c30c0SXin 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' 6622d38c30c0SXin LI fi 6623d38c30c0SXin LI if test aix != "$with_aix_soname"; then 6624d38c30c0SXin 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' 6625d38c30c0SXin LI else 6626d38c30c0SXin LI # used by -dlpreopen to get the symbols 6627d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6628d38c30c0SXin LI fi 6629d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6630b6cee71dSXin LI fi 6631b6cee71dSXin LI fi 6632b6cee71dSXin LI ;; 6633b6cee71dSXin LI 6634b6cee71dSXin LI beos*) 6635b6cee71dSXin LI if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6636b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6637b6cee71dSXin LI # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6638b6cee71dSXin LI # support --undefined. This deserves some investigation. FIXME 6639d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6640b6cee71dSXin LI else 6641b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6642b6cee71dSXin LI fi 6643b6cee71dSXin LI ;; 6644b6cee71dSXin LI 6645b6cee71dSXin LI chorus*) 6646b6cee71dSXin LI case $cc_basename in 6647b6cee71dSXin LI *) 6648b6cee71dSXin LI # FIXME: insert proper C++ library support 6649b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6650b6cee71dSXin LI ;; 6651b6cee71dSXin LI esac 6652b6cee71dSXin LI ;; 6653b6cee71dSXin LI 6654b6cee71dSXin LI cygwin* | mingw* | pw32* | cegcc*) 6655b6cee71dSXin LI case $GXX,$cc_basename in 6656*ae316d1dSXin LI ,cl* | no,cl* | ,icl* | no,icl*) 6657*ae316d1dSXin LI # Native MSVC or ICC 6658b6cee71dSXin LI # hardcode_libdir_flag_spec is actually meaningless, as there is 6659b6cee71dSXin LI # no search path for DLLs. 6660b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6661b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6662b6cee71dSXin LI _LT_TAGVAR(always_export_symbols, $1)=yes 6663b6cee71dSXin LI _LT_TAGVAR(file_list_spec, $1)='@' 6664b6cee71dSXin LI # Tell ltmain to make .lib files, not .a files. 6665b6cee71dSXin LI libext=lib 6666b6cee71dSXin LI # Tell ltmain to make .dll files, not .so files. 6667d38c30c0SXin LI shrext_cmds=.dll 6668b6cee71dSXin LI # FIXME: Setting linknames here is a bad hack. 6669d38c30c0SXin 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=' 6670d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6671d38c30c0SXin LI cp "$export_symbols" "$output_objdir/$soname.def"; 6672d38c30c0SXin LI echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6673b6cee71dSXin LI else 6674d38c30c0SXin LI $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6675b6cee71dSXin LI fi~ 6676b6cee71dSXin LI $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6677b6cee71dSXin LI linknames=' 6678b6cee71dSXin LI # The linker will not automatically build a static lib if we build a DLL. 6679b6cee71dSXin LI # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6680b6cee71dSXin LI _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6681b6cee71dSXin LI # Don't use ranlib 6682b6cee71dSXin LI _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6683b6cee71dSXin LI _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6684b6cee71dSXin LI lt_tool_outputfile="@TOOL_OUTPUT@"~ 6685b6cee71dSXin LI case $lt_outputfile in 6686b6cee71dSXin LI *.exe|*.EXE) ;; 6687b6cee71dSXin LI *) 6688d38c30c0SXin LI lt_outputfile=$lt_outputfile.exe 6689d38c30c0SXin LI lt_tool_outputfile=$lt_tool_outputfile.exe 6690b6cee71dSXin LI ;; 6691b6cee71dSXin LI esac~ 6692b6cee71dSXin LI func_to_tool_file "$lt_outputfile"~ 6693d38c30c0SXin LI if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6694b6cee71dSXin LI $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6695b6cee71dSXin LI $RM "$lt_outputfile.manifest"; 6696b6cee71dSXin LI fi' 6697b6cee71dSXin LI ;; 6698b6cee71dSXin LI *) 6699b6cee71dSXin LI # g++ 6700b6cee71dSXin LI # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6701b6cee71dSXin LI # as there is no search path for DLLs. 6702b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6703d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6704b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6705b6cee71dSXin LI _LT_TAGVAR(always_export_symbols, $1)=no 6706b6cee71dSXin LI _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6707b6cee71dSXin LI 6708b6cee71dSXin LI if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6709d38c30c0SXin 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' 6710d38c30c0SXin LI # If the export-symbols file already is a .def file, use it as 6711d38c30c0SXin LI # is; otherwise, prepend EXPORTS... 6712d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6713b6cee71dSXin LI cp $export_symbols $output_objdir/$soname.def; 6714b6cee71dSXin LI else 6715b6cee71dSXin LI echo EXPORTS > $output_objdir/$soname.def; 6716b6cee71dSXin LI cat $export_symbols >> $output_objdir/$soname.def; 6717b6cee71dSXin LI fi~ 6718d38c30c0SXin 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' 6719b6cee71dSXin LI else 6720b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6721b6cee71dSXin LI fi 6722b6cee71dSXin LI ;; 6723b6cee71dSXin LI esac 6724b6cee71dSXin LI ;; 6725b6cee71dSXin LI darwin* | rhapsody*) 6726b6cee71dSXin LI _LT_DARWIN_LINKER_FEATURES($1) 6727b6cee71dSXin LI ;; 6728b6cee71dSXin LI 6729d38c30c0SXin LI os2*) 6730d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6731d38c30c0SXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes 6732d38c30c0SXin LI _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6733d38c30c0SXin LI shrext_cmds=.dll 6734d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6735d38c30c0SXin LI $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6736d38c30c0SXin LI $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6737d38c30c0SXin LI $ECHO EXPORTS >> $output_objdir/$libname.def~ 6738d38c30c0SXin LI emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6739d38c30c0SXin LI $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6740d38c30c0SXin LI emximp -o $lib $output_objdir/$libname.def' 6741d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6742d38c30c0SXin LI $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6743d38c30c0SXin LI $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6744d38c30c0SXin LI $ECHO EXPORTS >> $output_objdir/$libname.def~ 6745d38c30c0SXin LI prefix_cmds="$SED"~ 6746d38c30c0SXin LI if test EXPORTS = "`$SED 1q $export_symbols`"; then 6747d38c30c0SXin LI prefix_cmds="$prefix_cmds -e 1d"; 6748d38c30c0SXin LI fi~ 6749d38c30c0SXin LI prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6750d38c30c0SXin LI cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6751d38c30c0SXin LI $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6752d38c30c0SXin LI emximp -o $lib $output_objdir/$libname.def' 6753d38c30c0SXin LI _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6754d38c30c0SXin LI _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6755*ae316d1dSXin LI _LT_TAGVAR(file_list_spec, $1)='@' 6756d38c30c0SXin LI ;; 6757d38c30c0SXin LI 6758b6cee71dSXin LI dgux*) 6759b6cee71dSXin LI case $cc_basename in 6760b6cee71dSXin LI ec++*) 6761b6cee71dSXin LI # FIXME: insert proper C++ library support 6762b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6763b6cee71dSXin LI ;; 6764b6cee71dSXin LI ghcx*) 6765b6cee71dSXin LI # Green Hills C++ Compiler 6766b6cee71dSXin LI # FIXME: insert proper C++ library support 6767b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6768b6cee71dSXin LI ;; 6769b6cee71dSXin LI *) 6770b6cee71dSXin LI # FIXME: insert proper C++ library support 6771b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6772b6cee71dSXin LI ;; 6773b6cee71dSXin LI esac 6774b6cee71dSXin LI ;; 6775b6cee71dSXin LI 6776b6cee71dSXin LI freebsd2.*) 6777b6cee71dSXin LI # C++ shared libraries reported to be fairly broken before 6778b6cee71dSXin LI # switch to ELF 6779b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6780b6cee71dSXin LI ;; 6781b6cee71dSXin LI 6782b6cee71dSXin LI freebsd-elf*) 6783b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6784b6cee71dSXin LI ;; 6785b6cee71dSXin LI 6786*ae316d1dSXin LI freebsd* | dragonfly* | midnightbsd*) 6787b6cee71dSXin LI # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6788b6cee71dSXin LI # conventions 6789b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=yes 6790b6cee71dSXin LI ;; 6791b6cee71dSXin LI 6792b6cee71dSXin LI haiku*) 6793d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6794b6cee71dSXin LI _LT_TAGVAR(link_all_deplibs, $1)=yes 6795b6cee71dSXin LI ;; 6796b6cee71dSXin LI 6797b6cee71dSXin LI hpux9*) 6798d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6799b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6800d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6801b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 6802b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6803b6cee71dSXin LI # but as the default 6804b6cee71dSXin LI # location of the library. 6805b6cee71dSXin LI 6806b6cee71dSXin LI case $cc_basename in 6807b6cee71dSXin LI CC*) 6808b6cee71dSXin LI # FIXME: insert proper C++ library support 6809b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6810b6cee71dSXin LI ;; 6811b6cee71dSXin LI aCC*) 6812d38c30c0SXin 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' 6813b6cee71dSXin LI # Commands to make compiler produce verbose output that lists 6814b6cee71dSXin LI # what "hidden" libraries, object files and flags are used when 6815b6cee71dSXin LI # linking a shared library. 6816b6cee71dSXin LI # 6817b6cee71dSXin LI # There doesn't appear to be a way to prevent this compiler from 6818b6cee71dSXin LI # explicitly linking system object files so we need to strip them 6819b6cee71dSXin LI # from the output so that they don't get included in the library 6820b6cee71dSXin LI # dependencies. 6821d38c30c0SXin 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"' 6822b6cee71dSXin LI ;; 6823b6cee71dSXin LI *) 6824d38c30c0SXin LI if test yes = "$GXX"; then 6825d38c30c0SXin 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' 6826b6cee71dSXin LI else 6827b6cee71dSXin LI # FIXME: insert proper C++ library support 6828b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6829b6cee71dSXin LI fi 6830b6cee71dSXin LI ;; 6831b6cee71dSXin LI esac 6832b6cee71dSXin LI ;; 6833b6cee71dSXin LI 6834b6cee71dSXin LI hpux10*|hpux11*) 6835d38c30c0SXin LI if test no = "$with_gnu_ld"; then 6836d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6837b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6838b6cee71dSXin LI 6839b6cee71dSXin LI case $host_cpu in 6840b6cee71dSXin LI hppa*64*|ia64*) 6841b6cee71dSXin LI ;; 6842b6cee71dSXin LI *) 6843d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6844b6cee71dSXin LI ;; 6845b6cee71dSXin LI esac 6846b6cee71dSXin LI fi 6847b6cee71dSXin LI case $host_cpu in 6848b6cee71dSXin LI hppa*64*|ia64*) 6849b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=no 6850b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6851b6cee71dSXin LI ;; 6852b6cee71dSXin LI *) 6853b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 6854b6cee71dSXin LI _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6855b6cee71dSXin LI _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6856b6cee71dSXin LI # but as the default 6857b6cee71dSXin LI # location of the library. 6858b6cee71dSXin LI ;; 6859b6cee71dSXin LI esac 6860b6cee71dSXin LI 6861b6cee71dSXin LI case $cc_basename in 6862b6cee71dSXin LI CC*) 6863b6cee71dSXin LI # FIXME: insert proper C++ library support 6864b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6865b6cee71dSXin LI ;; 6866b6cee71dSXin LI aCC*) 6867b6cee71dSXin LI case $host_cpu in 6868b6cee71dSXin LI hppa*64*) 6869d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6870b6cee71dSXin LI ;; 6871b6cee71dSXin LI ia64*) 6872d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6873b6cee71dSXin LI ;; 6874b6cee71dSXin LI *) 6875d38c30c0SXin 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' 6876b6cee71dSXin LI ;; 6877b6cee71dSXin LI esac 6878b6cee71dSXin LI # Commands to make compiler produce verbose output that lists 6879b6cee71dSXin LI # what "hidden" libraries, object files and flags are used when 6880b6cee71dSXin LI # linking a shared library. 6881b6cee71dSXin LI # 6882b6cee71dSXin LI # There doesn't appear to be a way to prevent this compiler from 6883b6cee71dSXin LI # explicitly linking system object files so we need to strip them 6884b6cee71dSXin LI # from the output so that they don't get included in the library 6885b6cee71dSXin LI # dependencies. 6886d38c30c0SXin 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"' 6887b6cee71dSXin LI ;; 6888b6cee71dSXin LI *) 6889d38c30c0SXin LI if test yes = "$GXX"; then 6890d38c30c0SXin LI if test no = "$with_gnu_ld"; then 6891b6cee71dSXin LI case $host_cpu in 6892b6cee71dSXin LI hppa*64*) 6893d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6894b6cee71dSXin LI ;; 6895b6cee71dSXin LI ia64*) 6896d38c30c0SXin 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' 6897b6cee71dSXin LI ;; 6898b6cee71dSXin LI *) 6899d38c30c0SXin 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' 6900b6cee71dSXin LI ;; 6901b6cee71dSXin LI esac 6902b6cee71dSXin LI fi 6903b6cee71dSXin LI else 6904b6cee71dSXin LI # FIXME: insert proper C++ library support 6905b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 6906b6cee71dSXin LI fi 6907b6cee71dSXin LI ;; 6908b6cee71dSXin LI esac 6909b6cee71dSXin LI ;; 6910b6cee71dSXin LI 6911b6cee71dSXin LI interix[[3-9]]*) 6912b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=no 6913b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6914d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6915d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6916b6cee71dSXin LI # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6917b6cee71dSXin LI # Instead, shared libraries are loaded at an image base (0x10000000 by 6918b6cee71dSXin LI # default) and relocated if they conflict, which is a slow very memory 6919b6cee71dSXin LI # consuming and fragmenting process. To avoid this, we pick a random, 6920b6cee71dSXin LI # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6921b6cee71dSXin LI # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6922d38c30c0SXin 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' 6923*ae316d1dSXin 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' 6924b6cee71dSXin LI ;; 6925b6cee71dSXin LI irix5* | irix6*) 6926b6cee71dSXin LI case $cc_basename in 6927b6cee71dSXin LI CC*) 6928b6cee71dSXin LI # SGI C++ 6929d38c30c0SXin 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' 6930b6cee71dSXin LI 6931b6cee71dSXin LI # Archives containing C++ object files must be created using 6932b6cee71dSXin LI # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6933b6cee71dSXin LI # necessary to make sure instantiated templates are included 6934b6cee71dSXin LI # in the archive. 6935b6cee71dSXin LI _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6936b6cee71dSXin LI ;; 6937b6cee71dSXin LI *) 6938d38c30c0SXin LI if test yes = "$GXX"; then 6939d38c30c0SXin LI if test no = "$with_gnu_ld"; then 6940d38c30c0SXin 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' 6941b6cee71dSXin LI else 6942d38c30c0SXin 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' 6943b6cee71dSXin LI fi 6944b6cee71dSXin LI fi 6945b6cee71dSXin LI _LT_TAGVAR(link_all_deplibs, $1)=yes 6946b6cee71dSXin LI ;; 6947b6cee71dSXin LI esac 6948d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6949b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6950b6cee71dSXin LI _LT_TAGVAR(inherit_rpath, $1)=yes 6951b6cee71dSXin LI ;; 6952b6cee71dSXin LI 6953d38c30c0SXin LI linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6954b6cee71dSXin LI case $cc_basename in 6955b6cee71dSXin LI KCC*) 6956b6cee71dSXin LI # Kuck and Associates, Inc. (KAI) C++ Compiler 6957b6cee71dSXin LI 6958b6cee71dSXin LI # KCC will only create a shared library if the output file 6959b6cee71dSXin LI # ends with ".so" (or ".sl" for HP-UX), so rename the library 6960b6cee71dSXin LI # to its proper name (with version) after linking. 6961d38c30c0SXin 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' 6962d38c30c0SXin 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' 6963b6cee71dSXin LI # Commands to make compiler produce verbose output that lists 6964b6cee71dSXin LI # what "hidden" libraries, object files and flags are used when 6965b6cee71dSXin LI # linking a shared library. 6966b6cee71dSXin LI # 6967b6cee71dSXin LI # There doesn't appear to be a way to prevent this compiler from 6968b6cee71dSXin LI # explicitly linking system object files so we need to strip them 6969b6cee71dSXin LI # from the output so that they don't get included in the library 6970b6cee71dSXin LI # dependencies. 6971d38c30c0SXin 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"' 6972b6cee71dSXin LI 6973d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6974d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6975b6cee71dSXin LI 6976b6cee71dSXin LI # Archives containing C++ object files must be created using 6977b6cee71dSXin LI # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6978b6cee71dSXin LI _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6979b6cee71dSXin LI ;; 6980b6cee71dSXin LI icpc* | ecpc* ) 6981b6cee71dSXin LI # Intel C++ 6982b6cee71dSXin LI with_gnu_ld=yes 6983b6cee71dSXin LI # version 8.0 and above of icpc choke on multiply defined symbols 6984b6cee71dSXin LI # if we add $predep_objects and $postdep_objects, however 7.1 and 6985b6cee71dSXin LI # earlier do not add the objects themselves. 6986b6cee71dSXin LI case `$CC -V 2>&1` in 6987b6cee71dSXin LI *"Version 7."*) 6988d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6989d38c30c0SXin 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' 6990b6cee71dSXin LI ;; 6991b6cee71dSXin LI *) # Version 8.0 or newer 6992b6cee71dSXin LI tmp_idyn= 6993b6cee71dSXin LI case $host_cpu in 6994b6cee71dSXin LI ia64*) tmp_idyn=' -i_dynamic';; 6995b6cee71dSXin LI esac 6996d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6997d38c30c0SXin 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' 6998b6cee71dSXin LI ;; 6999b6cee71dSXin LI esac 7000b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7001d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7002d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7003d38c30c0SXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7004b6cee71dSXin LI ;; 7005b6cee71dSXin LI pgCC* | pgcpp*) 7006b6cee71dSXin LI # Portland Group C++ compiler 7007b6cee71dSXin LI case `$CC -V` in 7008b6cee71dSXin LI *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7009b6cee71dSXin LI _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7010b6cee71dSXin LI rm -rf $tpldir~ 7011b6cee71dSXin LI $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7012b6cee71dSXin LI compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7013b6cee71dSXin LI _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7014b6cee71dSXin LI rm -rf $tpldir~ 7015b6cee71dSXin LI $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7016b6cee71dSXin LI $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7017b6cee71dSXin LI $RANLIB $oldlib' 7018b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7019b6cee71dSXin LI rm -rf $tpldir~ 7020b6cee71dSXin LI $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7021d38c30c0SXin 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' 7022b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7023b6cee71dSXin LI rm -rf $tpldir~ 7024b6cee71dSXin LI $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7025d38c30c0SXin 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' 7026b6cee71dSXin LI ;; 7027b6cee71dSXin LI *) # Version 6 and above use weak symbols 7028d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7029d38c30c0SXin 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' 7030b6cee71dSXin LI ;; 7031b6cee71dSXin LI esac 7032b6cee71dSXin LI 7033d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7034d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7035d38c30c0SXin 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' 7036b6cee71dSXin LI ;; 7037b6cee71dSXin LI cxx*) 7038b6cee71dSXin LI # Compaq C++ 7039d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7040d38c30c0SXin 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' 7041b6cee71dSXin LI 7042b6cee71dSXin LI runpath_var=LD_RUN_PATH 7043b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7044b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7045b6cee71dSXin LI 7046b6cee71dSXin LI # Commands to make compiler produce verbose output that lists 7047b6cee71dSXin LI # what "hidden" libraries, object files and flags are used when 7048b6cee71dSXin LI # linking a shared library. 7049b6cee71dSXin LI # 7050b6cee71dSXin LI # There doesn't appear to be a way to prevent this compiler from 7051b6cee71dSXin LI # explicitly linking system object files so we need to strip them 7052b6cee71dSXin LI # from the output so that they don't get included in the library 7053b6cee71dSXin LI # dependencies. 7054d38c30c0SXin 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' 7055b6cee71dSXin LI ;; 7056b6cee71dSXin LI xl* | mpixl* | bgxl*) 7057b6cee71dSXin LI # IBM XL 8.0 on PPC, with GNU ld 7058d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7059d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7060d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7061d38c30c0SXin LI if test yes = "$supports_anon_versioning"; then 7062b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7063*ae316d1dSXin LI cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7064b6cee71dSXin LI echo "local: *; };" >> $output_objdir/$libname.ver~ 7065d38c30c0SXin LI $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7066b6cee71dSXin LI fi 7067b6cee71dSXin LI ;; 7068b6cee71dSXin LI *) 7069*ae316d1dSXin LI case `$CC -V 2>&1 | $SED 5q` in 7070b6cee71dSXin LI *Sun\ C*) 7071b6cee71dSXin LI # Sun C++ 5.9 7072b6cee71dSXin LI _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7073d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7074d38c30c0SXin 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' 7075b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7076d38c30c0SXin 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' 7077b6cee71dSXin LI _LT_TAGVAR(compiler_needs_object, $1)=yes 7078b6cee71dSXin LI 7079b6cee71dSXin LI # Not sure whether something based on 7080b6cee71dSXin LI # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7081b6cee71dSXin LI # would be better. 7082b6cee71dSXin LI output_verbose_link_cmd='func_echo_all' 7083b6cee71dSXin LI 7084b6cee71dSXin LI # Archives containing C++ object files must be created using 7085b6cee71dSXin LI # "CC -xar", where "CC" is the Sun C++ compiler. This is 7086b6cee71dSXin LI # necessary to make sure instantiated templates are included 7087b6cee71dSXin LI # in the archive. 7088b6cee71dSXin LI _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7089b6cee71dSXin LI ;; 7090b6cee71dSXin LI esac 7091b6cee71dSXin LI ;; 7092b6cee71dSXin LI esac 7093b6cee71dSXin LI ;; 7094b6cee71dSXin LI 7095b6cee71dSXin LI lynxos*) 7096b6cee71dSXin LI # FIXME: insert proper C++ library support 7097b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7098b6cee71dSXin LI ;; 7099b6cee71dSXin LI 7100b6cee71dSXin LI m88k*) 7101b6cee71dSXin LI # FIXME: insert proper C++ library support 7102b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7103b6cee71dSXin LI ;; 7104b6cee71dSXin LI 7105b6cee71dSXin LI mvs*) 7106b6cee71dSXin LI case $cc_basename in 7107b6cee71dSXin LI cxx*) 7108b6cee71dSXin LI # FIXME: insert proper C++ library support 7109b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7110b6cee71dSXin LI ;; 7111b6cee71dSXin LI *) 7112b6cee71dSXin LI # FIXME: insert proper C++ library support 7113b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7114b6cee71dSXin LI ;; 7115b6cee71dSXin LI esac 7116b6cee71dSXin LI ;; 7117b6cee71dSXin LI 7118b6cee71dSXin LI netbsd*) 7119b6cee71dSXin LI if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7120b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7121b6cee71dSXin LI wlarc= 7122b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7123b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 7124b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7125b6cee71dSXin LI fi 7126b6cee71dSXin LI # Workaround some broken pre-1.5 toolchains 7127b6cee71dSXin LI output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7128b6cee71dSXin LI ;; 7129b6cee71dSXin LI 7130b6cee71dSXin LI *nto* | *qnx*) 7131b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=yes 7132b6cee71dSXin LI ;; 7133b6cee71dSXin LI 7134d38c30c0SXin LI openbsd* | bitrig*) 7135b6cee71dSXin LI if test -f /usr/libexec/ld.so; then 7136b6cee71dSXin LI _LT_TAGVAR(hardcode_direct, $1)=yes 7137b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7138b6cee71dSXin LI _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7139b6cee71dSXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7140d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7141d38c30c0SXin LI if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7142d38c30c0SXin 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' 7143d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7144d38c30c0SXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7145b6cee71dSXin LI fi 7146b6cee71dSXin LI output_verbose_link_cmd=func_echo_all 7147b6cee71dSXin LI else 7148b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7149b6cee71dSXin LI fi 7150b6cee71dSXin LI ;; 7151b6cee71dSXin LI 7152b6cee71dSXin LI osf3* | osf4* | osf5*) 7153b6cee71dSXin LI case $cc_basename in 7154b6cee71dSXin LI KCC*) 7155b6cee71dSXin LI # Kuck and Associates, Inc. (KAI) C++ Compiler 7156b6cee71dSXin LI 7157b6cee71dSXin LI # KCC will only create a shared library if the output file 7158b6cee71dSXin LI # ends with ".so" (or ".sl" for HP-UX), so rename the library 7159b6cee71dSXin LI # to its proper name (with version) after linking. 7160d38c30c0SXin 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' 7161b6cee71dSXin LI 7162d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7163b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7164b6cee71dSXin LI 7165b6cee71dSXin LI # Archives containing C++ object files must be created using 7166b6cee71dSXin LI # the KAI C++ compiler. 7167b6cee71dSXin LI case $host in 7168b6cee71dSXin LI osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7169b6cee71dSXin LI *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7170b6cee71dSXin LI esac 7171b6cee71dSXin LI ;; 7172b6cee71dSXin LI RCC*) 7173b6cee71dSXin LI # Rational C++ 2.4.1 7174b6cee71dSXin LI # FIXME: insert proper C++ library support 7175b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7176b6cee71dSXin LI ;; 7177b6cee71dSXin LI cxx*) 7178b6cee71dSXin LI case $host in 7179b6cee71dSXin LI osf3*) 7180d38c30c0SXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7181d38c30c0SXin 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' 7182d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7183b6cee71dSXin LI ;; 7184b6cee71dSXin LI *) 7185b6cee71dSXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7186d38c30c0SXin 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' 7187b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7188b6cee71dSXin LI echo "-hidden">> $lib.exp~ 7189d38c30c0SXin 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~ 7190b6cee71dSXin LI $RM $lib.exp' 7191b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7192b6cee71dSXin LI ;; 7193b6cee71dSXin LI esac 7194b6cee71dSXin LI 7195b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7196b6cee71dSXin LI 7197b6cee71dSXin LI # Commands to make compiler produce verbose output that lists 7198b6cee71dSXin LI # what "hidden" libraries, object files and flags are used when 7199b6cee71dSXin LI # linking a shared library. 7200b6cee71dSXin LI # 7201b6cee71dSXin LI # There doesn't appear to be a way to prevent this compiler from 7202b6cee71dSXin LI # explicitly linking system object files so we need to strip them 7203b6cee71dSXin LI # from the output so that they don't get included in the library 7204b6cee71dSXin LI # dependencies. 7205d38c30c0SXin 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"' 7206b6cee71dSXin LI ;; 7207b6cee71dSXin LI *) 7208d38c30c0SXin LI if test yes,no = "$GXX,$with_gnu_ld"; then 7209d38c30c0SXin LI _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7210b6cee71dSXin LI case $host in 7211b6cee71dSXin LI osf3*) 7212d38c30c0SXin 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' 7213b6cee71dSXin LI ;; 7214b6cee71dSXin LI *) 7215d38c30c0SXin 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' 7216b6cee71dSXin LI ;; 7217b6cee71dSXin LI esac 7218b6cee71dSXin LI 7219d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7220b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7221b6cee71dSXin LI 7222b6cee71dSXin LI # Commands to make compiler produce verbose output that lists 7223b6cee71dSXin LI # what "hidden" libraries, object files and flags are used when 7224b6cee71dSXin LI # linking a shared library. 7225b6cee71dSXin LI output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7226b6cee71dSXin LI 7227b6cee71dSXin LI else 7228b6cee71dSXin LI # FIXME: insert proper C++ library support 7229b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7230b6cee71dSXin LI fi 7231b6cee71dSXin LI ;; 7232b6cee71dSXin LI esac 7233b6cee71dSXin LI ;; 7234b6cee71dSXin LI 7235b6cee71dSXin LI psos*) 7236b6cee71dSXin LI # FIXME: insert proper C++ library support 7237b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7238b6cee71dSXin LI ;; 7239b6cee71dSXin LI 7240b6cee71dSXin LI sunos4*) 7241b6cee71dSXin LI case $cc_basename in 7242b6cee71dSXin LI CC*) 7243b6cee71dSXin LI # Sun C++ 4.x 7244b6cee71dSXin LI # FIXME: insert proper C++ library support 7245b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7246b6cee71dSXin LI ;; 7247b6cee71dSXin LI lcc*) 7248b6cee71dSXin LI # Lucid 7249b6cee71dSXin LI # FIXME: insert proper C++ library support 7250b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7251b6cee71dSXin LI ;; 7252b6cee71dSXin LI *) 7253b6cee71dSXin LI # FIXME: insert proper C++ library support 7254b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7255b6cee71dSXin LI ;; 7256b6cee71dSXin LI esac 7257b6cee71dSXin LI ;; 7258b6cee71dSXin LI 7259b6cee71dSXin LI solaris*) 7260b6cee71dSXin LI case $cc_basename in 7261b6cee71dSXin LI CC* | sunCC*) 7262b6cee71dSXin LI # Sun C++ 4.2, 5.x and Centerline C++ 7263b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7264b6cee71dSXin LI _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7265d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7266b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7267d38c30c0SXin 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' 7268b6cee71dSXin LI 7269b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7270b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7271b6cee71dSXin LI case $host_os in 7272b6cee71dSXin LI solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7273b6cee71dSXin LI *) 7274b6cee71dSXin LI # The compiler driver will combine and reorder linker options, 7275d38c30c0SXin LI # but understands '-z linker_flag'. 7276b6cee71dSXin LI # Supported since Solaris 2.6 (maybe 2.5.1?) 7277b6cee71dSXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7278b6cee71dSXin LI ;; 7279b6cee71dSXin LI esac 7280b6cee71dSXin LI _LT_TAGVAR(link_all_deplibs, $1)=yes 7281b6cee71dSXin LI 7282b6cee71dSXin LI output_verbose_link_cmd='func_echo_all' 7283b6cee71dSXin LI 7284b6cee71dSXin LI # Archives containing C++ object files must be created using 7285b6cee71dSXin LI # "CC -xar", where "CC" is the Sun C++ compiler. This is 7286b6cee71dSXin LI # necessary to make sure instantiated templates are included 7287b6cee71dSXin LI # in the archive. 7288b6cee71dSXin LI _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7289b6cee71dSXin LI ;; 7290b6cee71dSXin LI gcx*) 7291b6cee71dSXin LI # Green Hills C++ Compiler 7292d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7293b6cee71dSXin LI 7294b6cee71dSXin LI # The C++ compiler must be used to create the archive. 7295b6cee71dSXin LI _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7296b6cee71dSXin LI ;; 7297b6cee71dSXin LI *) 7298b6cee71dSXin LI # GNU C++ compiler with Solaris linker 7299d38c30c0SXin LI if test yes,no = "$GXX,$with_gnu_ld"; then 7300d38c30c0SXin LI _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7301b6cee71dSXin LI if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7302d38c30c0SXin 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' 7303b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7304d38c30c0SXin 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' 7305b6cee71dSXin LI 7306b6cee71dSXin LI # Commands to make compiler produce verbose output that lists 7307b6cee71dSXin LI # what "hidden" libraries, object files and flags are used when 7308b6cee71dSXin LI # linking a shared library. 7309b6cee71dSXin LI output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7310b6cee71dSXin LI else 7311d38c30c0SXin LI # g++ 2.7 appears to require '-G' NOT '-shared' on this 7312b6cee71dSXin LI # platform. 7313d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7314b6cee71dSXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7315d38c30c0SXin 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' 7316b6cee71dSXin LI 7317b6cee71dSXin LI # Commands to make compiler produce verbose output that lists 7318b6cee71dSXin LI # what "hidden" libraries, object files and flags are used when 7319b6cee71dSXin LI # linking a shared library. 7320b6cee71dSXin LI output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7321b6cee71dSXin LI fi 7322b6cee71dSXin LI 7323d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7324b6cee71dSXin LI case $host_os in 7325b6cee71dSXin LI solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7326b6cee71dSXin LI *) 7327d38c30c0SXin LI _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7328b6cee71dSXin LI ;; 7329b6cee71dSXin LI esac 7330b6cee71dSXin LI fi 7331b6cee71dSXin LI ;; 7332b6cee71dSXin LI esac 7333b6cee71dSXin LI ;; 7334b6cee71dSXin LI 7335b6cee71dSXin LI sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7336d38c30c0SXin LI _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7337b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7338b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7339b6cee71dSXin LI runpath_var='LD_RUN_PATH' 7340b6cee71dSXin LI 7341b6cee71dSXin LI case $cc_basename in 7342b6cee71dSXin LI CC*) 7343d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7344d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7345b6cee71dSXin LI ;; 7346b6cee71dSXin LI *) 7347d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7348d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7349b6cee71dSXin LI ;; 7350b6cee71dSXin LI esac 7351b6cee71dSXin LI ;; 7352b6cee71dSXin LI 7353b6cee71dSXin LI sysv5* | sco3.2v5* | sco5v6*) 7354d38c30c0SXin LI # Note: We CANNOT use -z defs as we might desire, because we do not 7355b6cee71dSXin LI # link with -lc, and that would cause any symbols used from libc to 7356b6cee71dSXin LI # always be unresolved, which means just about no library would 7357b6cee71dSXin LI # ever link correctly. If we're not using GNU ld we use -z text 7358b6cee71dSXin LI # though, which does catch some bad symbols but isn't as heavy-handed 7359b6cee71dSXin LI # as -z defs. 7360d38c30c0SXin LI _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7361d38c30c0SXin LI _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7362b6cee71dSXin LI _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7363b6cee71dSXin LI _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7364d38c30c0SXin LI _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7365b6cee71dSXin LI _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7366b6cee71dSXin LI _LT_TAGVAR(link_all_deplibs, $1)=yes 7367d38c30c0SXin LI _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7368b6cee71dSXin LI runpath_var='LD_RUN_PATH' 7369b6cee71dSXin LI 7370b6cee71dSXin LI case $cc_basename in 7371b6cee71dSXin LI CC*) 7372d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7373d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7374b6cee71dSXin LI _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7375b6cee71dSXin LI '"$_LT_TAGVAR(old_archive_cmds, $1)" 7376b6cee71dSXin LI _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7377b6cee71dSXin LI '"$_LT_TAGVAR(reload_cmds, $1)" 7378b6cee71dSXin LI ;; 7379b6cee71dSXin LI *) 7380d38c30c0SXin LI _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7381d38c30c0SXin LI _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7382b6cee71dSXin LI ;; 7383b6cee71dSXin LI esac 7384b6cee71dSXin LI ;; 7385b6cee71dSXin LI 7386b6cee71dSXin LI tandem*) 7387b6cee71dSXin LI case $cc_basename in 7388b6cee71dSXin LI NCC*) 7389b6cee71dSXin LI # NonStop-UX NCC 3.20 7390b6cee71dSXin LI # FIXME: insert proper C++ library support 7391b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7392b6cee71dSXin LI ;; 7393b6cee71dSXin LI *) 7394b6cee71dSXin LI # FIXME: insert proper C++ library support 7395b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7396b6cee71dSXin LI ;; 7397b6cee71dSXin LI esac 7398b6cee71dSXin LI ;; 7399b6cee71dSXin LI 7400b6cee71dSXin LI vxworks*) 7401b6cee71dSXin LI # FIXME: insert proper C++ library support 7402b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7403b6cee71dSXin LI ;; 7404b6cee71dSXin LI 7405b6cee71dSXin LI *) 7406b6cee71dSXin LI # FIXME: insert proper C++ library support 7407b6cee71dSXin LI _LT_TAGVAR(ld_shlibs, $1)=no 7408b6cee71dSXin LI ;; 7409b6cee71dSXin LI esac 7410b6cee71dSXin LI 7411b6cee71dSXin LI AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7412d38c30c0SXin LI test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7413b6cee71dSXin LI 7414d38c30c0SXin LI _LT_TAGVAR(GCC, $1)=$GXX 7415d38c30c0SXin LI _LT_TAGVAR(LD, $1)=$LD 7416b6cee71dSXin LI 7417b6cee71dSXin LI ## CAVEAT EMPTOR: 7418b6cee71dSXin LI ## There is no encapsulation within the following macros, do not change 7419b6cee71dSXin LI ## the running order or otherwise move them around unless you know exactly 7420b6cee71dSXin LI ## what you are doing... 7421b6cee71dSXin LI _LT_SYS_HIDDEN_LIBDEPS($1) 7422b6cee71dSXin LI _LT_COMPILER_PIC($1) 7423b6cee71dSXin LI _LT_COMPILER_C_O($1) 7424b6cee71dSXin LI _LT_COMPILER_FILE_LOCKS($1) 7425b6cee71dSXin LI _LT_LINKER_SHLIBS($1) 7426b6cee71dSXin LI _LT_SYS_DYNAMIC_LINKER($1) 7427b6cee71dSXin LI _LT_LINKER_HARDCODE_LIBPATH($1) 7428b6cee71dSXin LI 7429b6cee71dSXin LI _LT_CONFIG($1) 7430b6cee71dSXin LI fi # test -n "$compiler" 7431b6cee71dSXin LI 7432b6cee71dSXin LI CC=$lt_save_CC 7433b6cee71dSXin LI CFLAGS=$lt_save_CFLAGS 7434b6cee71dSXin LI LDCXX=$LD 7435b6cee71dSXin LI LD=$lt_save_LD 7436b6cee71dSXin LI GCC=$lt_save_GCC 7437b6cee71dSXin LI with_gnu_ld=$lt_save_with_gnu_ld 7438b6cee71dSXin LI lt_cv_path_LDCXX=$lt_cv_path_LD 7439b6cee71dSXin LI lt_cv_path_LD=$lt_save_path_LD 7440b6cee71dSXin LI lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7441b6cee71dSXin LI lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7442d38c30c0SXin LIfi # test yes != "$_lt_caught_CXX_error" 7443b6cee71dSXin LI 7444b6cee71dSXin LIAC_LANG_POP 7445b6cee71dSXin LI])# _LT_LANG_CXX_CONFIG 7446b6cee71dSXin LI 7447b6cee71dSXin LI 7448b6cee71dSXin LI# _LT_FUNC_STRIPNAME_CNF 7449b6cee71dSXin LI# ---------------------- 7450b6cee71dSXin LI# func_stripname_cnf prefix suffix name 7451b6cee71dSXin LI# strip PREFIX and SUFFIX off of NAME. 7452b6cee71dSXin LI# PREFIX and SUFFIX must not contain globbing or regex special 7453b6cee71dSXin LI# characters, hashes, percent signs, but SUFFIX may contain a leading 7454b6cee71dSXin LI# dot (in which case that matches only a dot). 7455b6cee71dSXin LI# 7456b6cee71dSXin LI# This function is identical to the (non-XSI) version of func_stripname, 7457b6cee71dSXin LI# except this one can be used by m4 code that may be executed by configure, 7458b6cee71dSXin LI# rather than the libtool script. 7459b6cee71dSXin LIm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7460b6cee71dSXin LIAC_REQUIRE([_LT_DECL_SED]) 7461b6cee71dSXin LIAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7462b6cee71dSXin LIfunc_stripname_cnf () 7463b6cee71dSXin LI{ 7464d38c30c0SXin LI case @S|@2 in 7465d38c30c0SXin LI .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7466d38c30c0SXin LI *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7467b6cee71dSXin LI esac 7468b6cee71dSXin LI} # func_stripname_cnf 7469b6cee71dSXin LI])# _LT_FUNC_STRIPNAME_CNF 7470b6cee71dSXin LI 7471d38c30c0SXin LI 7472b6cee71dSXin LI# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7473b6cee71dSXin LI# --------------------------------- 7474b6cee71dSXin LI# Figure out "hidden" library dependencies from verbose 7475b6cee71dSXin LI# compiler output when linking a shared library. 7476b6cee71dSXin LI# Parse the compiler output and extract the necessary 7477b6cee71dSXin LI# objects, libraries and library flags. 7478b6cee71dSXin LIm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7479b6cee71dSXin LI[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7480b6cee71dSXin LIAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7481b6cee71dSXin LI# Dependencies to place before and after the object being linked: 7482b6cee71dSXin LI_LT_TAGVAR(predep_objects, $1)= 7483b6cee71dSXin LI_LT_TAGVAR(postdep_objects, $1)= 7484b6cee71dSXin LI_LT_TAGVAR(predeps, $1)= 7485b6cee71dSXin LI_LT_TAGVAR(postdeps, $1)= 7486b6cee71dSXin LI_LT_TAGVAR(compiler_lib_search_path, $1)= 7487b6cee71dSXin LI 7488b6cee71dSXin LIdnl we can't use the lt_simple_compile_test_code here, 7489b6cee71dSXin LIdnl because it contains code intended for an executable, 7490b6cee71dSXin LIdnl not a library. It's possible we should let each 7491b6cee71dSXin LIdnl tag define a new lt_????_link_test_code variable, 7492b6cee71dSXin LIdnl but it's only used here... 7493b6cee71dSXin LIm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7494b6cee71dSXin LIint a; 7495b6cee71dSXin LIvoid foo (void) { a = 0; } 7496b6cee71dSXin LI_LT_EOF 7497b6cee71dSXin LI], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7498b6cee71dSXin LIclass Foo 7499b6cee71dSXin LI{ 7500b6cee71dSXin LIpublic: 7501b6cee71dSXin LI Foo (void) { a = 0; } 7502b6cee71dSXin LIprivate: 7503b6cee71dSXin LI int a; 7504b6cee71dSXin LI}; 7505b6cee71dSXin LI_LT_EOF 7506b6cee71dSXin LI], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7507b6cee71dSXin LI subroutine foo 7508b6cee71dSXin LI implicit none 7509b6cee71dSXin LI integer*4 a 7510b6cee71dSXin LI a=0 7511b6cee71dSXin LI return 7512b6cee71dSXin LI end 7513b6cee71dSXin LI_LT_EOF 7514b6cee71dSXin LI], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7515b6cee71dSXin LI subroutine foo 7516b6cee71dSXin LI implicit none 7517b6cee71dSXin LI integer a 7518b6cee71dSXin LI a=0 7519b6cee71dSXin LI return 7520b6cee71dSXin LI end 7521b6cee71dSXin LI_LT_EOF 7522b6cee71dSXin LI], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7523b6cee71dSXin LIpublic class foo { 7524b6cee71dSXin LI private int a; 7525b6cee71dSXin LI public void bar (void) { 7526b6cee71dSXin LI a = 0; 7527b6cee71dSXin LI } 7528b6cee71dSXin LI}; 7529b6cee71dSXin LI_LT_EOF 7530b6cee71dSXin LI], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7531b6cee71dSXin LIpackage foo 7532b6cee71dSXin LIfunc foo() { 7533b6cee71dSXin LI} 7534b6cee71dSXin LI_LT_EOF 7535b6cee71dSXin LI]) 7536b6cee71dSXin LI 7537b6cee71dSXin LI_lt_libdeps_save_CFLAGS=$CFLAGS 7538b6cee71dSXin LIcase "$CC $CFLAGS " in #( 7539b6cee71dSXin LI*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7540b6cee71dSXin LI*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7541b6cee71dSXin LI*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7542b6cee71dSXin LIesac 7543b6cee71dSXin LI 7544b6cee71dSXin LIdnl Parse the compiler output and extract the necessary 7545b6cee71dSXin LIdnl objects, libraries and library flags. 7546b6cee71dSXin LIif AC_TRY_EVAL(ac_compile); then 7547b6cee71dSXin LI # Parse the compiler output and extract the necessary 7548b6cee71dSXin LI # objects, libraries and library flags. 7549b6cee71dSXin LI 7550b6cee71dSXin LI # Sentinel used to keep track of whether or not we are before 7551b6cee71dSXin LI # the conftest object file. 7552b6cee71dSXin LI pre_test_object_deps_done=no 7553b6cee71dSXin LI 7554b6cee71dSXin LI for p in `eval "$output_verbose_link_cmd"`; do 7555d38c30c0SXin LI case $prev$p in 7556b6cee71dSXin LI 7557b6cee71dSXin LI -L* | -R* | -l*) 7558b6cee71dSXin LI # Some compilers place space between "-{L,R}" and the path. 7559b6cee71dSXin LI # Remove the space. 7560d38c30c0SXin LI if test x-L = "$p" || 7561d38c30c0SXin LI test x-R = "$p"; then 7562b6cee71dSXin LI prev=$p 7563b6cee71dSXin LI continue 7564b6cee71dSXin LI fi 7565b6cee71dSXin LI 7566b6cee71dSXin LI # Expand the sysroot to ease extracting the directories later. 7567b6cee71dSXin LI if test -z "$prev"; then 7568b6cee71dSXin LI case $p in 7569b6cee71dSXin LI -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7570b6cee71dSXin LI -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7571b6cee71dSXin LI -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7572b6cee71dSXin LI esac 7573b6cee71dSXin LI fi 7574b6cee71dSXin LI case $p in 7575b6cee71dSXin LI =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7576b6cee71dSXin LI esac 7577d38c30c0SXin LI if test no = "$pre_test_object_deps_done"; then 7578d38c30c0SXin LI case $prev in 7579b6cee71dSXin LI -L | -R) 7580b6cee71dSXin LI # Internal compiler library paths should come after those 7581b6cee71dSXin LI # provided the user. The postdeps already come after the 7582b6cee71dSXin LI # user supplied libs so there is no need to process them. 7583b6cee71dSXin LI if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7584d38c30c0SXin LI _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7585b6cee71dSXin LI else 7586d38c30c0SXin LI _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7587b6cee71dSXin LI fi 7588b6cee71dSXin LI ;; 7589b6cee71dSXin LI # The "-l" case would never come before the object being 7590b6cee71dSXin LI # linked, so don't bother handling this case. 7591b6cee71dSXin LI esac 7592b6cee71dSXin LI else 7593b6cee71dSXin LI if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7594d38c30c0SXin LI _LT_TAGVAR(postdeps, $1)=$prev$p 7595b6cee71dSXin LI else 7596d38c30c0SXin LI _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7597b6cee71dSXin LI fi 7598b6cee71dSXin LI fi 7599b6cee71dSXin LI prev= 7600b6cee71dSXin LI ;; 7601b6cee71dSXin LI 7602b6cee71dSXin LI *.lto.$objext) ;; # Ignore GCC LTO objects 7603b6cee71dSXin LI *.$objext) 7604b6cee71dSXin LI # This assumes that the test object file only shows up 7605b6cee71dSXin LI # once in the compiler output. 7606b6cee71dSXin LI if test "$p" = "conftest.$objext"; then 7607b6cee71dSXin LI pre_test_object_deps_done=yes 7608b6cee71dSXin LI continue 7609b6cee71dSXin LI fi 7610b6cee71dSXin LI 7611d38c30c0SXin LI if test no = "$pre_test_object_deps_done"; then 7612b6cee71dSXin LI if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7613d38c30c0SXin LI _LT_TAGVAR(predep_objects, $1)=$p 7614b6cee71dSXin LI else 7615b6cee71dSXin LI _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7616b6cee71dSXin LI fi 7617b6cee71dSXin LI else 7618b6cee71dSXin LI if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7619d38c30c0SXin LI _LT_TAGVAR(postdep_objects, $1)=$p 7620b6cee71dSXin LI else 7621b6cee71dSXin LI _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7622b6cee71dSXin LI fi 7623b6cee71dSXin LI fi 7624b6cee71dSXin LI ;; 7625b6cee71dSXin LI 7626b6cee71dSXin LI *) ;; # Ignore the rest. 7627b6cee71dSXin LI 7628b6cee71dSXin LI esac 7629b6cee71dSXin LI done 7630b6cee71dSXin LI 7631b6cee71dSXin LI # Clean up. 7632b6cee71dSXin LI rm -f a.out a.exe 7633b6cee71dSXin LIelse 7634b6cee71dSXin LI echo "libtool.m4: error: problem compiling $1 test program" 7635b6cee71dSXin LIfi 7636b6cee71dSXin LI 7637b6cee71dSXin LI$RM -f confest.$objext 7638b6cee71dSXin LICFLAGS=$_lt_libdeps_save_CFLAGS 7639b6cee71dSXin LI 7640b6cee71dSXin LI# PORTME: override above test on systems where it is broken 7641b6cee71dSXin LIm4_if([$1], [CXX], 7642b6cee71dSXin LI[case $host_os in 7643b6cee71dSXin LIinterix[[3-9]]*) 7644b6cee71dSXin LI # Interix 3.5 installs completely hosed .la files for C++, so rather than 7645b6cee71dSXin LI # hack all around it, let's just trust "g++" to DTRT. 7646b6cee71dSXin LI _LT_TAGVAR(predep_objects,$1)= 7647b6cee71dSXin LI _LT_TAGVAR(postdep_objects,$1)= 7648b6cee71dSXin LI _LT_TAGVAR(postdeps,$1)= 7649b6cee71dSXin LI ;; 7650b6cee71dSXin LIesac 7651b6cee71dSXin LI]) 7652b6cee71dSXin LI 7653b6cee71dSXin LIcase " $_LT_TAGVAR(postdeps, $1) " in 7654b6cee71dSXin LI*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7655b6cee71dSXin LIesac 7656b6cee71dSXin LI _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7657b6cee71dSXin LIif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7658d38c30c0SXin LI _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7659b6cee71dSXin LIfi 7660b6cee71dSXin LI_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7661b6cee71dSXin LI [The directories searched by this compiler when creating a shared library]) 7662b6cee71dSXin LI_LT_TAGDECL([], [predep_objects], [1], 7663b6cee71dSXin LI [Dependencies to place before and after the objects being linked to 7664b6cee71dSXin LI create a shared library]) 7665b6cee71dSXin LI_LT_TAGDECL([], [postdep_objects], [1]) 7666b6cee71dSXin LI_LT_TAGDECL([], [predeps], [1]) 7667b6cee71dSXin LI_LT_TAGDECL([], [postdeps], [1]) 7668b6cee71dSXin LI_LT_TAGDECL([], [compiler_lib_search_path], [1], 7669b6cee71dSXin LI [The library search path used internally by the compiler when linking 7670b6cee71dSXin LI a shared library]) 7671b6cee71dSXin LI])# _LT_SYS_HIDDEN_LIBDEPS 7672b6cee71dSXin LI 7673b6cee71dSXin LI 7674b6cee71dSXin LI# _LT_LANG_F77_CONFIG([TAG]) 7675b6cee71dSXin LI# -------------------------- 7676b6cee71dSXin LI# Ensure that the configuration variables for a Fortran 77 compiler are 7677b6cee71dSXin LI# suitably defined. These variables are subsequently used by _LT_CONFIG 7678d38c30c0SXin LI# to write the compiler configuration to 'libtool'. 7679b6cee71dSXin LIm4_defun([_LT_LANG_F77_CONFIG], 7680b6cee71dSXin LI[AC_LANG_PUSH(Fortran 77) 7681d38c30c0SXin LIif test -z "$F77" || test no = "$F77"; then 7682b6cee71dSXin LI _lt_disable_F77=yes 7683b6cee71dSXin LIfi 7684b6cee71dSXin LI 7685b6cee71dSXin LI_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7686b6cee71dSXin LI_LT_TAGVAR(allow_undefined_flag, $1)= 7687b6cee71dSXin LI_LT_TAGVAR(always_export_symbols, $1)=no 7688b6cee71dSXin LI_LT_TAGVAR(archive_expsym_cmds, $1)= 7689b6cee71dSXin LI_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7690b6cee71dSXin LI_LT_TAGVAR(hardcode_direct, $1)=no 7691b6cee71dSXin LI_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7692b6cee71dSXin LI_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7693b6cee71dSXin LI_LT_TAGVAR(hardcode_libdir_separator, $1)= 7694b6cee71dSXin LI_LT_TAGVAR(hardcode_minus_L, $1)=no 7695b6cee71dSXin LI_LT_TAGVAR(hardcode_automatic, $1)=no 7696b6cee71dSXin LI_LT_TAGVAR(inherit_rpath, $1)=no 7697b6cee71dSXin LI_LT_TAGVAR(module_cmds, $1)= 7698b6cee71dSXin LI_LT_TAGVAR(module_expsym_cmds, $1)= 7699b6cee71dSXin LI_LT_TAGVAR(link_all_deplibs, $1)=unknown 7700b6cee71dSXin LI_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7701b6cee71dSXin LI_LT_TAGVAR(reload_flag, $1)=$reload_flag 7702b6cee71dSXin LI_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7703b6cee71dSXin LI_LT_TAGVAR(no_undefined_flag, $1)= 7704b6cee71dSXin LI_LT_TAGVAR(whole_archive_flag_spec, $1)= 7705b6cee71dSXin LI_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7706b6cee71dSXin LI 7707b6cee71dSXin LI# Source file extension for f77 test sources. 7708b6cee71dSXin LIac_ext=f 7709b6cee71dSXin LI 7710b6cee71dSXin LI# Object file extension for compiled f77 test sources. 7711b6cee71dSXin LIobjext=o 7712b6cee71dSXin LI_LT_TAGVAR(objext, $1)=$objext 7713b6cee71dSXin LI 7714b6cee71dSXin LI# No sense in running all these tests if we already determined that 7715b6cee71dSXin LI# the F77 compiler isn't working. Some variables (like enable_shared) 7716b6cee71dSXin LI# are currently assumed to apply to all compilers on this platform, 7717b6cee71dSXin LI# and will be corrupted by setting them based on a non-working compiler. 7718d38c30c0SXin LIif test yes != "$_lt_disable_F77"; then 7719b6cee71dSXin LI # Code to be used in simple compile tests 7720b6cee71dSXin LI lt_simple_compile_test_code="\ 7721b6cee71dSXin LI subroutine t 7722b6cee71dSXin LI return 7723b6cee71dSXin LI end 7724b6cee71dSXin LI" 7725b6cee71dSXin LI 7726b6cee71dSXin LI # Code to be used in simple link tests 7727b6cee71dSXin LI lt_simple_link_test_code="\ 7728b6cee71dSXin LI program t 7729b6cee71dSXin LI end 7730b6cee71dSXin LI" 7731b6cee71dSXin LI 7732b6cee71dSXin LI # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7733b6cee71dSXin LI _LT_TAG_COMPILER 7734b6cee71dSXin LI 7735b6cee71dSXin LI # save warnings/boilerplate of simple test code 7736b6cee71dSXin LI _LT_COMPILER_BOILERPLATE 7737b6cee71dSXin LI _LT_LINKER_BOILERPLATE 7738b6cee71dSXin LI 7739b6cee71dSXin LI # Allow CC to be a program name with arguments. 7740d38c30c0SXin LI lt_save_CC=$CC 7741b6cee71dSXin LI lt_save_GCC=$GCC 7742b6cee71dSXin LI lt_save_CFLAGS=$CFLAGS 7743b6cee71dSXin LI CC=${F77-"f77"} 7744b6cee71dSXin LI CFLAGS=$FFLAGS 7745b6cee71dSXin LI compiler=$CC 7746b6cee71dSXin LI _LT_TAGVAR(compiler, $1)=$CC 7747b6cee71dSXin LI _LT_CC_BASENAME([$compiler]) 7748b6cee71dSXin LI GCC=$G77 7749b6cee71dSXin LI if test -n "$compiler"; then 7750b6cee71dSXin LI AC_MSG_CHECKING([if libtool supports shared libraries]) 7751b6cee71dSXin LI AC_MSG_RESULT([$can_build_shared]) 7752b6cee71dSXin LI 7753b6cee71dSXin LI AC_MSG_CHECKING([whether to build shared libraries]) 7754d38c30c0SXin LI test no = "$can_build_shared" && enable_shared=no 7755b6cee71dSXin LI 7756b6cee71dSXin LI # On AIX, shared libraries and static libraries use the same namespace, and 7757b6cee71dSXin LI # are all built from PIC. 7758b6cee71dSXin LI case $host_os in 7759b6cee71dSXin LI aix3*) 7760d38c30c0SXin LI test yes = "$enable_shared" && enable_static=no 7761b6cee71dSXin LI if test -n "$RANLIB"; then 7762b6cee71dSXin LI archive_cmds="$archive_cmds~\$RANLIB \$lib" 7763b6cee71dSXin LI postinstall_cmds='$RANLIB $lib' 7764b6cee71dSXin LI fi 7765b6cee71dSXin LI ;; 7766b6cee71dSXin LI aix[[4-9]]*) 7767d38c30c0SXin LI if test ia64 != "$host_cpu"; then 7768d38c30c0SXin LI case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7769d38c30c0SXin LI yes,aix,yes) ;; # shared object as lib.so file only 7770d38c30c0SXin LI yes,svr4,*) ;; # shared object as lib.so archive member only 7771d38c30c0SXin LI yes,*) enable_static=no ;; # shared object in lib.a archive as well 7772d38c30c0SXin LI esac 7773b6cee71dSXin LI fi 7774b6cee71dSXin LI ;; 7775b6cee71dSXin LI esac 7776b6cee71dSXin LI AC_MSG_RESULT([$enable_shared]) 7777b6cee71dSXin LI 7778b6cee71dSXin LI AC_MSG_CHECKING([whether to build static libraries]) 7779b6cee71dSXin LI # Make sure either enable_shared or enable_static is yes. 7780d38c30c0SXin LI test yes = "$enable_shared" || enable_static=yes 7781b6cee71dSXin LI AC_MSG_RESULT([$enable_static]) 7782b6cee71dSXin LI 7783d38c30c0SXin LI _LT_TAGVAR(GCC, $1)=$G77 7784d38c30c0SXin LI _LT_TAGVAR(LD, $1)=$LD 7785b6cee71dSXin LI 7786b6cee71dSXin LI ## CAVEAT EMPTOR: 7787b6cee71dSXin LI ## There is no encapsulation within the following macros, do not change 7788b6cee71dSXin LI ## the running order or otherwise move them around unless you know exactly 7789b6cee71dSXin LI ## what you are doing... 7790b6cee71dSXin LI _LT_COMPILER_PIC($1) 7791b6cee71dSXin LI _LT_COMPILER_C_O($1) 7792b6cee71dSXin LI _LT_COMPILER_FILE_LOCKS($1) 7793b6cee71dSXin LI _LT_LINKER_SHLIBS($1) 7794b6cee71dSXin LI _LT_SYS_DYNAMIC_LINKER($1) 7795b6cee71dSXin LI _LT_LINKER_HARDCODE_LIBPATH($1) 7796b6cee71dSXin LI 7797b6cee71dSXin LI _LT_CONFIG($1) 7798b6cee71dSXin LI fi # test -n "$compiler" 7799b6cee71dSXin LI 7800b6cee71dSXin LI GCC=$lt_save_GCC 7801d38c30c0SXin LI CC=$lt_save_CC 7802d38c30c0SXin LI CFLAGS=$lt_save_CFLAGS 7803d38c30c0SXin LIfi # test yes != "$_lt_disable_F77" 7804b6cee71dSXin LI 7805b6cee71dSXin LIAC_LANG_POP 7806b6cee71dSXin LI])# _LT_LANG_F77_CONFIG 7807b6cee71dSXin LI 7808b6cee71dSXin LI 7809b6cee71dSXin LI# _LT_LANG_FC_CONFIG([TAG]) 7810b6cee71dSXin LI# ------------------------- 7811b6cee71dSXin LI# Ensure that the configuration variables for a Fortran compiler are 7812b6cee71dSXin LI# suitably defined. These variables are subsequently used by _LT_CONFIG 7813d38c30c0SXin LI# to write the compiler configuration to 'libtool'. 7814b6cee71dSXin LIm4_defun([_LT_LANG_FC_CONFIG], 7815b6cee71dSXin LI[AC_LANG_PUSH(Fortran) 7816b6cee71dSXin LI 7817d38c30c0SXin LIif test -z "$FC" || test no = "$FC"; then 7818b6cee71dSXin LI _lt_disable_FC=yes 7819b6cee71dSXin LIfi 7820b6cee71dSXin LI 7821b6cee71dSXin LI_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7822b6cee71dSXin LI_LT_TAGVAR(allow_undefined_flag, $1)= 7823b6cee71dSXin LI_LT_TAGVAR(always_export_symbols, $1)=no 7824b6cee71dSXin LI_LT_TAGVAR(archive_expsym_cmds, $1)= 7825b6cee71dSXin LI_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7826b6cee71dSXin LI_LT_TAGVAR(hardcode_direct, $1)=no 7827b6cee71dSXin LI_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7828b6cee71dSXin LI_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7829b6cee71dSXin LI_LT_TAGVAR(hardcode_libdir_separator, $1)= 7830b6cee71dSXin LI_LT_TAGVAR(hardcode_minus_L, $1)=no 7831b6cee71dSXin LI_LT_TAGVAR(hardcode_automatic, $1)=no 7832b6cee71dSXin LI_LT_TAGVAR(inherit_rpath, $1)=no 7833b6cee71dSXin LI_LT_TAGVAR(module_cmds, $1)= 7834b6cee71dSXin LI_LT_TAGVAR(module_expsym_cmds, $1)= 7835b6cee71dSXin LI_LT_TAGVAR(link_all_deplibs, $1)=unknown 7836b6cee71dSXin LI_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7837b6cee71dSXin LI_LT_TAGVAR(reload_flag, $1)=$reload_flag 7838b6cee71dSXin LI_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7839b6cee71dSXin LI_LT_TAGVAR(no_undefined_flag, $1)= 7840b6cee71dSXin LI_LT_TAGVAR(whole_archive_flag_spec, $1)= 7841b6cee71dSXin LI_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7842b6cee71dSXin LI 7843b6cee71dSXin LI# Source file extension for fc test sources. 7844b6cee71dSXin LIac_ext=${ac_fc_srcext-f} 7845b6cee71dSXin LI 7846b6cee71dSXin LI# Object file extension for compiled fc test sources. 7847b6cee71dSXin LIobjext=o 7848b6cee71dSXin LI_LT_TAGVAR(objext, $1)=$objext 7849b6cee71dSXin LI 7850b6cee71dSXin LI# No sense in running all these tests if we already determined that 7851b6cee71dSXin LI# the FC compiler isn't working. Some variables (like enable_shared) 7852b6cee71dSXin LI# are currently assumed to apply to all compilers on this platform, 7853b6cee71dSXin LI# and will be corrupted by setting them based on a non-working compiler. 7854d38c30c0SXin LIif test yes != "$_lt_disable_FC"; then 7855b6cee71dSXin LI # Code to be used in simple compile tests 7856b6cee71dSXin LI lt_simple_compile_test_code="\ 7857b6cee71dSXin LI subroutine t 7858b6cee71dSXin LI return 7859b6cee71dSXin LI end 7860b6cee71dSXin LI" 7861b6cee71dSXin LI 7862b6cee71dSXin LI # Code to be used in simple link tests 7863b6cee71dSXin LI lt_simple_link_test_code="\ 7864b6cee71dSXin LI program t 7865b6cee71dSXin LI end 7866b6cee71dSXin LI" 7867b6cee71dSXin LI 7868b6cee71dSXin LI # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7869b6cee71dSXin LI _LT_TAG_COMPILER 7870b6cee71dSXin LI 7871b6cee71dSXin LI # save warnings/boilerplate of simple test code 7872b6cee71dSXin LI _LT_COMPILER_BOILERPLATE 7873b6cee71dSXin LI _LT_LINKER_BOILERPLATE 7874b6cee71dSXin LI 7875b6cee71dSXin LI # Allow CC to be a program name with arguments. 7876d38c30c0SXin LI lt_save_CC=$CC 7877b6cee71dSXin LI lt_save_GCC=$GCC 7878b6cee71dSXin LI lt_save_CFLAGS=$CFLAGS 7879b6cee71dSXin LI CC=${FC-"f95"} 7880b6cee71dSXin LI CFLAGS=$FCFLAGS 7881b6cee71dSXin LI compiler=$CC 7882b6cee71dSXin LI GCC=$ac_cv_fc_compiler_gnu 7883b6cee71dSXin LI 7884b6cee71dSXin LI _LT_TAGVAR(compiler, $1)=$CC 7885b6cee71dSXin LI _LT_CC_BASENAME([$compiler]) 7886b6cee71dSXin LI 7887b6cee71dSXin LI if test -n "$compiler"; then 7888b6cee71dSXin LI AC_MSG_CHECKING([if libtool supports shared libraries]) 7889b6cee71dSXin LI AC_MSG_RESULT([$can_build_shared]) 7890b6cee71dSXin LI 7891b6cee71dSXin LI AC_MSG_CHECKING([whether to build shared libraries]) 7892d38c30c0SXin LI test no = "$can_build_shared" && enable_shared=no 7893b6cee71dSXin LI 7894b6cee71dSXin LI # On AIX, shared libraries and static libraries use the same namespace, and 7895b6cee71dSXin LI # are all built from PIC. 7896b6cee71dSXin LI case $host_os in 7897b6cee71dSXin LI aix3*) 7898d38c30c0SXin LI test yes = "$enable_shared" && enable_static=no 7899b6cee71dSXin LI if test -n "$RANLIB"; then 7900b6cee71dSXin LI archive_cmds="$archive_cmds~\$RANLIB \$lib" 7901b6cee71dSXin LI postinstall_cmds='$RANLIB $lib' 7902b6cee71dSXin LI fi 7903b6cee71dSXin LI ;; 7904b6cee71dSXin LI aix[[4-9]]*) 7905d38c30c0SXin LI if test ia64 != "$host_cpu"; then 7906d38c30c0SXin LI case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7907d38c30c0SXin LI yes,aix,yes) ;; # shared object as lib.so file only 7908d38c30c0SXin LI yes,svr4,*) ;; # shared object as lib.so archive member only 7909d38c30c0SXin LI yes,*) enable_static=no ;; # shared object in lib.a archive as well 7910d38c30c0SXin LI esac 7911b6cee71dSXin LI fi 7912b6cee71dSXin LI ;; 7913b6cee71dSXin LI esac 7914b6cee71dSXin LI AC_MSG_RESULT([$enable_shared]) 7915b6cee71dSXin LI 7916b6cee71dSXin LI AC_MSG_CHECKING([whether to build static libraries]) 7917b6cee71dSXin LI # Make sure either enable_shared or enable_static is yes. 7918d38c30c0SXin LI test yes = "$enable_shared" || enable_static=yes 7919b6cee71dSXin LI AC_MSG_RESULT([$enable_static]) 7920b6cee71dSXin LI 7921d38c30c0SXin LI _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7922d38c30c0SXin LI _LT_TAGVAR(LD, $1)=$LD 7923b6cee71dSXin LI 7924b6cee71dSXin LI ## CAVEAT EMPTOR: 7925b6cee71dSXin LI ## There is no encapsulation within the following macros, do not change 7926b6cee71dSXin LI ## the running order or otherwise move them around unless you know exactly 7927b6cee71dSXin LI ## what you are doing... 7928b6cee71dSXin LI _LT_SYS_HIDDEN_LIBDEPS($1) 7929b6cee71dSXin LI _LT_COMPILER_PIC($1) 7930b6cee71dSXin LI _LT_COMPILER_C_O($1) 7931b6cee71dSXin LI _LT_COMPILER_FILE_LOCKS($1) 7932b6cee71dSXin LI _LT_LINKER_SHLIBS($1) 7933b6cee71dSXin LI _LT_SYS_DYNAMIC_LINKER($1) 7934b6cee71dSXin LI _LT_LINKER_HARDCODE_LIBPATH($1) 7935b6cee71dSXin LI 7936b6cee71dSXin LI _LT_CONFIG($1) 7937b6cee71dSXin LI fi # test -n "$compiler" 7938b6cee71dSXin LI 7939b6cee71dSXin LI GCC=$lt_save_GCC 7940b6cee71dSXin LI CC=$lt_save_CC 7941b6cee71dSXin LI CFLAGS=$lt_save_CFLAGS 7942d38c30c0SXin LIfi # test yes != "$_lt_disable_FC" 7943b6cee71dSXin LI 7944b6cee71dSXin LIAC_LANG_POP 7945b6cee71dSXin LI])# _LT_LANG_FC_CONFIG 7946b6cee71dSXin LI 7947b6cee71dSXin LI 7948b6cee71dSXin LI# _LT_LANG_GCJ_CONFIG([TAG]) 7949b6cee71dSXin LI# -------------------------- 7950b6cee71dSXin LI# Ensure that the configuration variables for the GNU Java Compiler compiler 7951b6cee71dSXin LI# are suitably defined. These variables are subsequently used by _LT_CONFIG 7952d38c30c0SXin LI# to write the compiler configuration to 'libtool'. 7953b6cee71dSXin LIm4_defun([_LT_LANG_GCJ_CONFIG], 7954b6cee71dSXin LI[AC_REQUIRE([LT_PROG_GCJ])dnl 7955b6cee71dSXin LIAC_LANG_SAVE 7956b6cee71dSXin LI 7957b6cee71dSXin LI# Source file extension for Java test sources. 7958b6cee71dSXin LIac_ext=java 7959b6cee71dSXin LI 7960b6cee71dSXin LI# Object file extension for compiled Java test sources. 7961b6cee71dSXin LIobjext=o 7962b6cee71dSXin LI_LT_TAGVAR(objext, $1)=$objext 7963b6cee71dSXin LI 7964b6cee71dSXin LI# Code to be used in simple compile tests 7965b6cee71dSXin LIlt_simple_compile_test_code="class foo {}" 7966b6cee71dSXin LI 7967b6cee71dSXin LI# Code to be used in simple link tests 7968b6cee71dSXin LIlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7969b6cee71dSXin LI 7970b6cee71dSXin LI# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7971b6cee71dSXin LI_LT_TAG_COMPILER 7972b6cee71dSXin LI 7973b6cee71dSXin LI# save warnings/boilerplate of simple test code 7974b6cee71dSXin LI_LT_COMPILER_BOILERPLATE 7975b6cee71dSXin LI_LT_LINKER_BOILERPLATE 7976b6cee71dSXin LI 7977b6cee71dSXin LI# Allow CC to be a program name with arguments. 7978b6cee71dSXin LIlt_save_CC=$CC 7979b6cee71dSXin LIlt_save_CFLAGS=$CFLAGS 7980b6cee71dSXin LIlt_save_GCC=$GCC 7981b6cee71dSXin LIGCC=yes 7982b6cee71dSXin LICC=${GCJ-"gcj"} 7983b6cee71dSXin LICFLAGS=$GCJFLAGS 7984b6cee71dSXin LIcompiler=$CC 7985b6cee71dSXin LI_LT_TAGVAR(compiler, $1)=$CC 7986d38c30c0SXin LI_LT_TAGVAR(LD, $1)=$LD 7987b6cee71dSXin LI_LT_CC_BASENAME([$compiler]) 7988b6cee71dSXin LI 7989b6cee71dSXin LI# GCJ did not exist at the time GCC didn't implicitly link libc in. 7990b6cee71dSXin LI_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7991b6cee71dSXin LI 7992b6cee71dSXin LI_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7993b6cee71dSXin LI_LT_TAGVAR(reload_flag, $1)=$reload_flag 7994b6cee71dSXin LI_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7995b6cee71dSXin LI 7996b6cee71dSXin LI## CAVEAT EMPTOR: 7997b6cee71dSXin LI## There is no encapsulation within the following macros, do not change 7998b6cee71dSXin LI## the running order or otherwise move them around unless you know exactly 7999b6cee71dSXin LI## what you are doing... 8000b6cee71dSXin LIif test -n "$compiler"; then 8001b6cee71dSXin LI _LT_COMPILER_NO_RTTI($1) 8002b6cee71dSXin LI _LT_COMPILER_PIC($1) 8003b6cee71dSXin LI _LT_COMPILER_C_O($1) 8004b6cee71dSXin LI _LT_COMPILER_FILE_LOCKS($1) 8005b6cee71dSXin LI _LT_LINKER_SHLIBS($1) 8006b6cee71dSXin LI _LT_LINKER_HARDCODE_LIBPATH($1) 8007b6cee71dSXin LI 8008b6cee71dSXin LI _LT_CONFIG($1) 8009b6cee71dSXin LIfi 8010b6cee71dSXin LI 8011b6cee71dSXin LIAC_LANG_RESTORE 8012b6cee71dSXin LI 8013b6cee71dSXin LIGCC=$lt_save_GCC 8014b6cee71dSXin LICC=$lt_save_CC 8015b6cee71dSXin LICFLAGS=$lt_save_CFLAGS 8016b6cee71dSXin LI])# _LT_LANG_GCJ_CONFIG 8017b6cee71dSXin LI 8018b6cee71dSXin LI 8019b6cee71dSXin LI# _LT_LANG_GO_CONFIG([TAG]) 8020b6cee71dSXin LI# -------------------------- 8021b6cee71dSXin LI# Ensure that the configuration variables for the GNU Go compiler 8022b6cee71dSXin LI# are suitably defined. These variables are subsequently used by _LT_CONFIG 8023d38c30c0SXin LI# to write the compiler configuration to 'libtool'. 8024b6cee71dSXin LIm4_defun([_LT_LANG_GO_CONFIG], 8025b6cee71dSXin LI[AC_REQUIRE([LT_PROG_GO])dnl 8026b6cee71dSXin LIAC_LANG_SAVE 8027b6cee71dSXin LI 8028b6cee71dSXin LI# Source file extension for Go test sources. 8029b6cee71dSXin LIac_ext=go 8030b6cee71dSXin LI 8031b6cee71dSXin LI# Object file extension for compiled Go test sources. 8032b6cee71dSXin LIobjext=o 8033b6cee71dSXin LI_LT_TAGVAR(objext, $1)=$objext 8034b6cee71dSXin LI 8035b6cee71dSXin LI# Code to be used in simple compile tests 8036b6cee71dSXin LIlt_simple_compile_test_code="package main; func main() { }" 8037b6cee71dSXin LI 8038b6cee71dSXin LI# Code to be used in simple link tests 8039b6cee71dSXin LIlt_simple_link_test_code='package main; func main() { }' 8040b6cee71dSXin LI 8041b6cee71dSXin LI# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8042b6cee71dSXin LI_LT_TAG_COMPILER 8043b6cee71dSXin LI 8044b6cee71dSXin LI# save warnings/boilerplate of simple test code 8045b6cee71dSXin LI_LT_COMPILER_BOILERPLATE 8046b6cee71dSXin LI_LT_LINKER_BOILERPLATE 8047b6cee71dSXin LI 8048b6cee71dSXin LI# Allow CC to be a program name with arguments. 8049b6cee71dSXin LIlt_save_CC=$CC 8050b6cee71dSXin LIlt_save_CFLAGS=$CFLAGS 8051b6cee71dSXin LIlt_save_GCC=$GCC 8052b6cee71dSXin LIGCC=yes 8053b6cee71dSXin LICC=${GOC-"gccgo"} 8054b6cee71dSXin LICFLAGS=$GOFLAGS 8055b6cee71dSXin LIcompiler=$CC 8056b6cee71dSXin LI_LT_TAGVAR(compiler, $1)=$CC 8057d38c30c0SXin LI_LT_TAGVAR(LD, $1)=$LD 8058b6cee71dSXin LI_LT_CC_BASENAME([$compiler]) 8059b6cee71dSXin LI 8060b6cee71dSXin LI# Go did not exist at the time GCC didn't implicitly link libc in. 8061b6cee71dSXin LI_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8062b6cee71dSXin LI 8063b6cee71dSXin LI_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8064b6cee71dSXin LI_LT_TAGVAR(reload_flag, $1)=$reload_flag 8065b6cee71dSXin LI_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8066b6cee71dSXin LI 8067b6cee71dSXin LI## CAVEAT EMPTOR: 8068b6cee71dSXin LI## There is no encapsulation within the following macros, do not change 8069b6cee71dSXin LI## the running order or otherwise move them around unless you know exactly 8070b6cee71dSXin LI## what you are doing... 8071b6cee71dSXin LIif test -n "$compiler"; then 8072b6cee71dSXin LI _LT_COMPILER_NO_RTTI($1) 8073b6cee71dSXin LI _LT_COMPILER_PIC($1) 8074b6cee71dSXin LI _LT_COMPILER_C_O($1) 8075b6cee71dSXin LI _LT_COMPILER_FILE_LOCKS($1) 8076b6cee71dSXin LI _LT_LINKER_SHLIBS($1) 8077b6cee71dSXin LI _LT_LINKER_HARDCODE_LIBPATH($1) 8078b6cee71dSXin LI 8079b6cee71dSXin LI _LT_CONFIG($1) 8080b6cee71dSXin LIfi 8081b6cee71dSXin LI 8082b6cee71dSXin LIAC_LANG_RESTORE 8083b6cee71dSXin LI 8084b6cee71dSXin LIGCC=$lt_save_GCC 8085b6cee71dSXin LICC=$lt_save_CC 8086b6cee71dSXin LICFLAGS=$lt_save_CFLAGS 8087b6cee71dSXin LI])# _LT_LANG_GO_CONFIG 8088b6cee71dSXin LI 8089b6cee71dSXin LI 8090b6cee71dSXin LI# _LT_LANG_RC_CONFIG([TAG]) 8091b6cee71dSXin LI# ------------------------- 8092b6cee71dSXin LI# Ensure that the configuration variables for the Windows resource compiler 8093b6cee71dSXin LI# are suitably defined. These variables are subsequently used by _LT_CONFIG 8094d38c30c0SXin LI# to write the compiler configuration to 'libtool'. 8095b6cee71dSXin LIm4_defun([_LT_LANG_RC_CONFIG], 8096b6cee71dSXin LI[AC_REQUIRE([LT_PROG_RC])dnl 8097b6cee71dSXin LIAC_LANG_SAVE 8098b6cee71dSXin LI 8099b6cee71dSXin LI# Source file extension for RC test sources. 8100b6cee71dSXin LIac_ext=rc 8101b6cee71dSXin LI 8102b6cee71dSXin LI# Object file extension for compiled RC test sources. 8103b6cee71dSXin LIobjext=o 8104b6cee71dSXin LI_LT_TAGVAR(objext, $1)=$objext 8105b6cee71dSXin LI 8106b6cee71dSXin LI# Code to be used in simple compile tests 8107b6cee71dSXin LIlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8108b6cee71dSXin LI 8109b6cee71dSXin LI# Code to be used in simple link tests 8110d38c30c0SXin LIlt_simple_link_test_code=$lt_simple_compile_test_code 8111b6cee71dSXin LI 8112b6cee71dSXin LI# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8113b6cee71dSXin LI_LT_TAG_COMPILER 8114b6cee71dSXin LI 8115b6cee71dSXin LI# save warnings/boilerplate of simple test code 8116b6cee71dSXin LI_LT_COMPILER_BOILERPLATE 8117b6cee71dSXin LI_LT_LINKER_BOILERPLATE 8118b6cee71dSXin LI 8119b6cee71dSXin LI# Allow CC to be a program name with arguments. 8120d38c30c0SXin LIlt_save_CC=$CC 8121b6cee71dSXin LIlt_save_CFLAGS=$CFLAGS 8122b6cee71dSXin LIlt_save_GCC=$GCC 8123b6cee71dSXin LIGCC= 8124b6cee71dSXin LICC=${RC-"windres"} 8125b6cee71dSXin LICFLAGS= 8126b6cee71dSXin LIcompiler=$CC 8127b6cee71dSXin LI_LT_TAGVAR(compiler, $1)=$CC 8128b6cee71dSXin LI_LT_CC_BASENAME([$compiler]) 8129b6cee71dSXin LI_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8130b6cee71dSXin LI 8131b6cee71dSXin LIif test -n "$compiler"; then 8132b6cee71dSXin LI : 8133b6cee71dSXin LI _LT_CONFIG($1) 8134b6cee71dSXin LIfi 8135b6cee71dSXin LI 8136b6cee71dSXin LIGCC=$lt_save_GCC 8137b6cee71dSXin LIAC_LANG_RESTORE 8138b6cee71dSXin LICC=$lt_save_CC 8139b6cee71dSXin LICFLAGS=$lt_save_CFLAGS 8140b6cee71dSXin LI])# _LT_LANG_RC_CONFIG 8141b6cee71dSXin LI 8142b6cee71dSXin LI 8143b6cee71dSXin LI# LT_PROG_GCJ 8144b6cee71dSXin LI# ----------- 8145b6cee71dSXin LIAC_DEFUN([LT_PROG_GCJ], 8146b6cee71dSXin LI[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8147b6cee71dSXin LI [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8148b6cee71dSXin LI [AC_CHECK_TOOL(GCJ, gcj,) 8149d38c30c0SXin LI test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8150b6cee71dSXin LI AC_SUBST(GCJFLAGS)])])[]dnl 8151b6cee71dSXin LI]) 8152b6cee71dSXin LI 8153b6cee71dSXin LI# Old name: 8154b6cee71dSXin LIAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8155b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 8156b6cee71dSXin LIdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8157b6cee71dSXin LI 8158b6cee71dSXin LI 8159b6cee71dSXin LI# LT_PROG_GO 8160b6cee71dSXin LI# ---------- 8161b6cee71dSXin LIAC_DEFUN([LT_PROG_GO], 8162b6cee71dSXin LI[AC_CHECK_TOOL(GOC, gccgo,) 8163b6cee71dSXin LI]) 8164b6cee71dSXin LI 8165b6cee71dSXin LI 8166b6cee71dSXin LI# LT_PROG_RC 8167b6cee71dSXin LI# ---------- 8168b6cee71dSXin LIAC_DEFUN([LT_PROG_RC], 8169b6cee71dSXin LI[AC_CHECK_TOOL(RC, windres,) 8170b6cee71dSXin LI]) 8171b6cee71dSXin LI 8172b6cee71dSXin LI# Old name: 8173b6cee71dSXin LIAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8174b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 8175b6cee71dSXin LIdnl AC_DEFUN([LT_AC_PROG_RC], []) 8176b6cee71dSXin LI 8177b6cee71dSXin LI 8178b6cee71dSXin LI# _LT_DECL_EGREP 8179b6cee71dSXin LI# -------------- 8180b6cee71dSXin LI# If we don't have a new enough Autoconf to choose the best grep 8181b6cee71dSXin LI# available, choose the one first in the user's PATH. 8182b6cee71dSXin LIm4_defun([_LT_DECL_EGREP], 8183b6cee71dSXin LI[AC_REQUIRE([AC_PROG_EGREP])dnl 8184b6cee71dSXin LIAC_REQUIRE([AC_PROG_FGREP])dnl 8185b6cee71dSXin LItest -z "$GREP" && GREP=grep 8186b6cee71dSXin LI_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8187b6cee71dSXin LI_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8188b6cee71dSXin LI_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8189b6cee71dSXin LIdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8190b6cee71dSXin LIAC_SUBST([GREP]) 8191b6cee71dSXin LI]) 8192b6cee71dSXin LI 8193b6cee71dSXin LI 8194b6cee71dSXin LI# _LT_DECL_OBJDUMP 8195b6cee71dSXin LI# -------------- 8196b6cee71dSXin LI# If we don't have a new enough Autoconf to choose the best objdump 8197b6cee71dSXin LI# available, choose the one first in the user's PATH. 8198b6cee71dSXin LIm4_defun([_LT_DECL_OBJDUMP], 8199b6cee71dSXin LI[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8200b6cee71dSXin LItest -z "$OBJDUMP" && OBJDUMP=objdump 8201b6cee71dSXin LI_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8202b6cee71dSXin LIAC_SUBST([OBJDUMP]) 8203b6cee71dSXin LI]) 8204b6cee71dSXin LI 8205b6cee71dSXin LI# _LT_DECL_DLLTOOL 8206b6cee71dSXin LI# ---------------- 8207b6cee71dSXin LI# Ensure DLLTOOL variable is set. 8208b6cee71dSXin LIm4_defun([_LT_DECL_DLLTOOL], 8209b6cee71dSXin LI[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8210b6cee71dSXin LItest -z "$DLLTOOL" && DLLTOOL=dlltool 8211b6cee71dSXin LI_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8212b6cee71dSXin LIAC_SUBST([DLLTOOL]) 8213b6cee71dSXin LI]) 8214b6cee71dSXin LI 8215*ae316d1dSXin LI# _LT_DECL_FILECMD 8216*ae316d1dSXin LI# ---------------- 8217*ae316d1dSXin LI# Check for a file(cmd) program that can be used to detect file type and magic 8218*ae316d1dSXin LIm4_defun([_LT_DECL_FILECMD], 8219*ae316d1dSXin LI[AC_CHECK_TOOL([FILECMD], [file], [:]) 8220*ae316d1dSXin LI_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 8221*ae316d1dSXin LI])# _LD_DECL_FILECMD 8222*ae316d1dSXin LI 8223b6cee71dSXin LI# _LT_DECL_SED 8224b6cee71dSXin LI# ------------ 8225b6cee71dSXin LI# Check for a fully-functional sed program, that truncates 8226b6cee71dSXin LI# as few characters as possible. Prefer GNU sed if found. 8227b6cee71dSXin LIm4_defun([_LT_DECL_SED], 8228b6cee71dSXin LI[AC_PROG_SED 8229b6cee71dSXin LItest -z "$SED" && SED=sed 8230b6cee71dSXin LIXsed="$SED -e 1s/^X//" 8231b6cee71dSXin LI_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8232b6cee71dSXin LI_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8233b6cee71dSXin LI [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8234b6cee71dSXin LI])# _LT_DECL_SED 8235b6cee71dSXin LI 8236b6cee71dSXin LIm4_ifndef([AC_PROG_SED], [ 8237b6cee71dSXin LI############################################################ 8238b6cee71dSXin LI# NOTE: This macro has been submitted for inclusion into # 8239b6cee71dSXin LI# GNU Autoconf as AC_PROG_SED. When it is available in # 8240b6cee71dSXin LI# a released version of Autoconf we should remove this # 8241b6cee71dSXin LI# macro and use it instead. # 8242b6cee71dSXin LI############################################################ 8243b6cee71dSXin LI 8244b6cee71dSXin LIm4_defun([AC_PROG_SED], 8245b6cee71dSXin LI[AC_MSG_CHECKING([for a sed that does not truncate output]) 8246b6cee71dSXin LIAC_CACHE_VAL(lt_cv_path_SED, 8247b6cee71dSXin LI[# Loop through the user's path and test for sed and gsed. 8248b6cee71dSXin LI# Then use that list of sed's as ones to test for truncation. 8249b6cee71dSXin LIas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8250b6cee71dSXin LIfor as_dir in $PATH 8251b6cee71dSXin LIdo 8252b6cee71dSXin LI IFS=$as_save_IFS 8253b6cee71dSXin LI test -z "$as_dir" && as_dir=. 8254b6cee71dSXin LI for lt_ac_prog in sed gsed; do 8255b6cee71dSXin LI for ac_exec_ext in '' $ac_executable_extensions; do 8256b6cee71dSXin LI if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8257b6cee71dSXin LI lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8258b6cee71dSXin LI fi 8259b6cee71dSXin LI done 8260b6cee71dSXin LI done 8261b6cee71dSXin LIdone 8262b6cee71dSXin LIIFS=$as_save_IFS 8263b6cee71dSXin LIlt_ac_max=0 8264b6cee71dSXin LIlt_ac_count=0 8265b6cee71dSXin LI# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8266b6cee71dSXin LI# along with /bin/sed that truncates output. 8267b6cee71dSXin LIfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8268d38c30c0SXin LI test ! -f "$lt_ac_sed" && continue 8269b6cee71dSXin LI cat /dev/null > conftest.in 8270b6cee71dSXin LI lt_ac_count=0 8271b6cee71dSXin LI echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8272b6cee71dSXin LI # Check for GNU sed and select it if it is found. 8273b6cee71dSXin LI if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8274b6cee71dSXin LI lt_cv_path_SED=$lt_ac_sed 8275b6cee71dSXin LI break 8276b6cee71dSXin LI fi 8277b6cee71dSXin LI while true; do 8278b6cee71dSXin LI cat conftest.in conftest.in >conftest.tmp 8279b6cee71dSXin LI mv conftest.tmp conftest.in 8280b6cee71dSXin LI cp conftest.in conftest.nl 8281b6cee71dSXin LI echo >>conftest.nl 8282b6cee71dSXin LI $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8283b6cee71dSXin LI cmp -s conftest.out conftest.nl || break 8284b6cee71dSXin LI # 10000 chars as input seems more than enough 8285d38c30c0SXin LI test 10 -lt "$lt_ac_count" && break 8286b6cee71dSXin LI lt_ac_count=`expr $lt_ac_count + 1` 8287d38c30c0SXin LI if test "$lt_ac_count" -gt "$lt_ac_max"; then 8288b6cee71dSXin LI lt_ac_max=$lt_ac_count 8289b6cee71dSXin LI lt_cv_path_SED=$lt_ac_sed 8290b6cee71dSXin LI fi 8291b6cee71dSXin LI done 8292b6cee71dSXin LIdone 8293b6cee71dSXin LI]) 8294b6cee71dSXin LISED=$lt_cv_path_SED 8295b6cee71dSXin LIAC_SUBST([SED]) 8296b6cee71dSXin LIAC_MSG_RESULT([$SED]) 8297b6cee71dSXin LI])#AC_PROG_SED 8298b6cee71dSXin LI])#m4_ifndef 8299b6cee71dSXin LI 8300b6cee71dSXin LI# Old name: 8301b6cee71dSXin LIAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8302b6cee71dSXin LIdnl aclocal-1.4 backwards compatibility: 8303b6cee71dSXin LIdnl AC_DEFUN([LT_AC_PROG_SED], []) 8304b6cee71dSXin LI 8305b6cee71dSXin LI 8306b6cee71dSXin LI# _LT_CHECK_SHELL_FEATURES 8307b6cee71dSXin LI# ------------------------ 8308b6cee71dSXin LI# Find out whether the shell is Bourne or XSI compatible, 8309b6cee71dSXin LI# or has some other useful features. 8310b6cee71dSXin LIm4_defun([_LT_CHECK_SHELL_FEATURES], 8311d38c30c0SXin LI[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8312b6cee71dSXin LI lt_unset=unset 8313b6cee71dSXin LIelse 8314b6cee71dSXin LI lt_unset=false 8315b6cee71dSXin LIfi 8316b6cee71dSXin LI_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8317b6cee71dSXin LI 8318b6cee71dSXin LI# test EBCDIC or ASCII 8319b6cee71dSXin LIcase `echo X|tr X '\101'` in 8320b6cee71dSXin LI A) # ASCII based system 8321b6cee71dSXin LI # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8322b6cee71dSXin LI lt_SP2NL='tr \040 \012' 8323b6cee71dSXin LI lt_NL2SP='tr \015\012 \040\040' 8324b6cee71dSXin LI ;; 8325b6cee71dSXin LI *) # EBCDIC based system 8326b6cee71dSXin LI lt_SP2NL='tr \100 \n' 8327b6cee71dSXin LI lt_NL2SP='tr \r\n \100\100' 8328b6cee71dSXin LI ;; 8329b6cee71dSXin LIesac 8330b6cee71dSXin LI_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8331b6cee71dSXin LI_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8332b6cee71dSXin LI])# _LT_CHECK_SHELL_FEATURES 8333b6cee71dSXin LI 8334b6cee71dSXin LI 8335b6cee71dSXin LI# _LT_PATH_CONVERSION_FUNCTIONS 8336b6cee71dSXin LI# ----------------------------- 8337d38c30c0SXin LI# Determine what file name conversion functions should be used by 8338b6cee71dSXin LI# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8339b6cee71dSXin LI# for certain cross-compile configurations and native mingw. 8340b6cee71dSXin LIm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8341b6cee71dSXin LI[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8342b6cee71dSXin LIAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8343b6cee71dSXin LIAC_MSG_CHECKING([how to convert $build file names to $host format]) 8344b6cee71dSXin LIAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8345b6cee71dSXin LI[case $host in 8346b6cee71dSXin LI *-*-mingw* ) 8347b6cee71dSXin LI case $build in 8348b6cee71dSXin LI *-*-mingw* ) # actually msys 8349b6cee71dSXin LI lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8350b6cee71dSXin LI ;; 8351b6cee71dSXin LI *-*-cygwin* ) 8352b6cee71dSXin LI lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8353b6cee71dSXin LI ;; 8354b6cee71dSXin LI * ) # otherwise, assume *nix 8355b6cee71dSXin LI lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8356b6cee71dSXin LI ;; 8357b6cee71dSXin LI esac 8358b6cee71dSXin LI ;; 8359b6cee71dSXin LI *-*-cygwin* ) 8360b6cee71dSXin LI case $build in 8361b6cee71dSXin LI *-*-mingw* ) # actually msys 8362b6cee71dSXin LI lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8363b6cee71dSXin LI ;; 8364b6cee71dSXin LI *-*-cygwin* ) 8365b6cee71dSXin LI lt_cv_to_host_file_cmd=func_convert_file_noop 8366b6cee71dSXin LI ;; 8367b6cee71dSXin LI * ) # otherwise, assume *nix 8368b6cee71dSXin LI lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8369b6cee71dSXin LI ;; 8370b6cee71dSXin LI esac 8371b6cee71dSXin LI ;; 8372b6cee71dSXin LI * ) # unhandled hosts (and "normal" native builds) 8373b6cee71dSXin LI lt_cv_to_host_file_cmd=func_convert_file_noop 8374b6cee71dSXin LI ;; 8375b6cee71dSXin LIesac 8376b6cee71dSXin LI]) 8377b6cee71dSXin LIto_host_file_cmd=$lt_cv_to_host_file_cmd 8378b6cee71dSXin LIAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8379b6cee71dSXin LI_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8380b6cee71dSXin LI [0], [convert $build file names to $host format])dnl 8381b6cee71dSXin LI 8382b6cee71dSXin LIAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8383b6cee71dSXin LIAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8384b6cee71dSXin LI[#assume ordinary cross tools, or native build. 8385b6cee71dSXin LIlt_cv_to_tool_file_cmd=func_convert_file_noop 8386b6cee71dSXin LIcase $host in 8387b6cee71dSXin LI *-*-mingw* ) 8388b6cee71dSXin LI case $build in 8389b6cee71dSXin LI *-*-mingw* ) # actually msys 8390b6cee71dSXin LI lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8391b6cee71dSXin LI ;; 8392b6cee71dSXin LI esac 8393b6cee71dSXin LI ;; 8394b6cee71dSXin LIesac 8395b6cee71dSXin LI]) 8396b6cee71dSXin LIto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8397b6cee71dSXin LIAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8398b6cee71dSXin LI_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8399b6cee71dSXin LI [0], [convert $build files to toolchain format])dnl 8400b6cee71dSXin LI])# _LT_PATH_CONVERSION_FUNCTIONS 8401