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