1*663afb9bSAndroid Build Coastguard Worker# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2*663afb9bSAndroid Build Coastguard Worker# 3*663afb9bSAndroid Build Coastguard Worker# Copyright (C) 1996-2001, 2003-2018 Free Software Foundation, Inc. 4*663afb9bSAndroid Build Coastguard Worker# Written by Gordon Matzigkeit, 1996 5*663afb9bSAndroid Build Coastguard Worker# 6*663afb9bSAndroid Build Coastguard Worker# This file is free software; the Free Software Foundation gives 7*663afb9bSAndroid Build Coastguard Worker# unlimited permission to copy and/or distribute it, with or without 8*663afb9bSAndroid Build Coastguard Worker# modifications, as long as this notice is preserved. 9*663afb9bSAndroid Build Coastguard Worker 10*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_COPYING], [dnl 11*663afb9bSAndroid Build Coastguard Worker# Copyright (C) 2014 Free Software Foundation, Inc. 12*663afb9bSAndroid Build Coastguard Worker# This is free software; see the source for copying conditions. There is NO 13*663afb9bSAndroid Build Coastguard Worker# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14*663afb9bSAndroid Build Coastguard Worker 15*663afb9bSAndroid Build Coastguard Worker# GNU Libtool is free software; you can redistribute it and/or modify 16*663afb9bSAndroid Build Coastguard Worker# it under the terms of the GNU General Public License as published by 17*663afb9bSAndroid Build Coastguard Worker# the Free Software Foundation; either version 2 of of the License, or 18*663afb9bSAndroid Build Coastguard Worker# (at your option) any later version. 19*663afb9bSAndroid Build Coastguard Worker# 20*663afb9bSAndroid Build Coastguard Worker# As a special exception to the GNU General Public License, if you 21*663afb9bSAndroid Build Coastguard Worker# distribute this file as part of a program or library that is built 22*663afb9bSAndroid Build Coastguard Worker# using GNU Libtool, you may include this file under the same 23*663afb9bSAndroid Build Coastguard Worker# distribution terms that you use for the rest of that program. 24*663afb9bSAndroid Build Coastguard Worker# 25*663afb9bSAndroid Build Coastguard Worker# GNU Libtool is distributed in the hope that it will be useful, but 26*663afb9bSAndroid Build Coastguard Worker# WITHOUT ANY WARRANTY; without even the implied warranty of 27*663afb9bSAndroid Build Coastguard Worker# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28*663afb9bSAndroid Build Coastguard Worker# GNU General Public License for more details. 29*663afb9bSAndroid Build Coastguard Worker# 30*663afb9bSAndroid Build Coastguard Worker# You should have received a copy of the GNU General Public License 31*663afb9bSAndroid Build Coastguard Worker# along with this program. If not, see <http://www.gnu.org/licenses/>. 32*663afb9bSAndroid Build Coastguard Worker]) 33*663afb9bSAndroid Build Coastguard Worker 34*663afb9bSAndroid Build Coastguard Worker# serial 58 LT_INIT 35*663afb9bSAndroid Build Coastguard Worker 36*663afb9bSAndroid Build Coastguard Worker 37*663afb9bSAndroid Build Coastguard Worker# LT_PREREQ(VERSION) 38*663afb9bSAndroid Build Coastguard Worker# ------------------ 39*663afb9bSAndroid Build Coastguard Worker# Complain and exit if this libtool version is less that VERSION. 40*663afb9bSAndroid Build Coastguard Workerm4_defun([LT_PREREQ], 41*663afb9bSAndroid Build Coastguard Worker[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 42*663afb9bSAndroid Build Coastguard Worker [m4_default([$3], 43*663afb9bSAndroid Build Coastguard Worker [m4_fatal([Libtool version $1 or higher is required], 44*663afb9bSAndroid Build Coastguard Worker 63)])], 45*663afb9bSAndroid Build Coastguard Worker [$2])]) 46*663afb9bSAndroid Build Coastguard Worker 47*663afb9bSAndroid Build Coastguard Worker 48*663afb9bSAndroid Build Coastguard Worker# _LT_CHECK_BUILDDIR 49*663afb9bSAndroid Build Coastguard Worker# ------------------ 50*663afb9bSAndroid Build Coastguard Worker# Complain if the absolute build directory name contains unusual characters 51*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CHECK_BUILDDIR], 52*663afb9bSAndroid Build Coastguard Worker[case `pwd` in 53*663afb9bSAndroid Build Coastguard Worker *\ * | *\ *) 54*663afb9bSAndroid Build Coastguard Worker AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 55*663afb9bSAndroid Build Coastguard Workeresac 56*663afb9bSAndroid Build Coastguard Worker]) 57*663afb9bSAndroid Build Coastguard Worker 58*663afb9bSAndroid Build Coastguard Worker 59*663afb9bSAndroid Build Coastguard Worker# LT_INIT([OPTIONS]) 60*663afb9bSAndroid Build Coastguard Worker# ------------------ 61*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([LT_INIT], 62*663afb9bSAndroid Build Coastguard Worker[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 63*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 64*663afb9bSAndroid Build Coastguard WorkerAC_BEFORE([$0], [LT_LANG])dnl 65*663afb9bSAndroid Build Coastguard WorkerAC_BEFORE([$0], [LT_OUTPUT])dnl 66*663afb9bSAndroid Build Coastguard WorkerAC_BEFORE([$0], [LTDL_INIT])dnl 67*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_CHECK_BUILDDIR])dnl 68*663afb9bSAndroid Build Coastguard Worker 69*663afb9bSAndroid Build Coastguard Workerdnl Autoconf doesn't catch unexpanded LT_ macros by default: 70*663afb9bSAndroid Build Coastguard Workerm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 71*663afb9bSAndroid Build Coastguard Workerm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 72*663afb9bSAndroid Build Coastguard Workerdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 73*663afb9bSAndroid Build Coastguard Workerdnl unless we require an AC_DEFUNed macro: 74*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([LTOPTIONS_VERSION])dnl 75*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([LTSUGAR_VERSION])dnl 76*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([LTVERSION_VERSION])dnl 77*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([LTOBSOLETE_VERSION])dnl 78*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_PROG_LTMAIN])dnl 79*663afb9bSAndroid Build Coastguard Worker 80*663afb9bSAndroid Build Coastguard Worker_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 81*663afb9bSAndroid Build Coastguard Worker 82*663afb9bSAndroid Build Coastguard Workerdnl Parse OPTIONS 83*663afb9bSAndroid Build Coastguard Worker_LT_SET_OPTIONS([$0], [$1]) 84*663afb9bSAndroid Build Coastguard Worker 85*663afb9bSAndroid Build Coastguard Worker# This can be used to rebuild libtool when needed 86*663afb9bSAndroid Build Coastguard WorkerLIBTOOL_DEPS=$ltmain 87*663afb9bSAndroid Build Coastguard Worker 88*663afb9bSAndroid Build Coastguard Worker# Always use our own libtool. 89*663afb9bSAndroid Build Coastguard WorkerLIBTOOL='$(SHELL) $(top_builddir)/libtool' 90*663afb9bSAndroid Build Coastguard WorkerAC_SUBST(LIBTOOL)dnl 91*663afb9bSAndroid Build Coastguard Worker 92*663afb9bSAndroid Build Coastguard Worker_LT_SETUP 93*663afb9bSAndroid Build Coastguard Worker 94*663afb9bSAndroid Build Coastguard Worker# Only expand once: 95*663afb9bSAndroid Build Coastguard Workerm4_define([LT_INIT]) 96*663afb9bSAndroid Build Coastguard Worker])# LT_INIT 97*663afb9bSAndroid Build Coastguard Worker 98*663afb9bSAndroid Build Coastguard Worker# Old names: 99*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 100*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 101*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 102*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 103*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 104*663afb9bSAndroid Build Coastguard Worker 105*663afb9bSAndroid Build Coastguard Worker 106*663afb9bSAndroid Build Coastguard Worker# _LT_PREPARE_CC_BASENAME 107*663afb9bSAndroid Build Coastguard Worker# ----------------------- 108*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_PREPARE_CC_BASENAME], [ 109*663afb9bSAndroid Build Coastguard Worker# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 110*663afb9bSAndroid Build Coastguard Workerfunc_cc_basename () 111*663afb9bSAndroid Build Coastguard Worker{ 112*663afb9bSAndroid Build Coastguard Worker for cc_temp in @S|@*""; do 113*663afb9bSAndroid Build Coastguard Worker case $cc_temp in 114*663afb9bSAndroid Build Coastguard Worker compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 115*663afb9bSAndroid Build Coastguard Worker distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 116*663afb9bSAndroid Build Coastguard Worker \-*) ;; 117*663afb9bSAndroid Build Coastguard Worker *) break;; 118*663afb9bSAndroid Build Coastguard Worker esac 119*663afb9bSAndroid Build Coastguard Worker done 120*663afb9bSAndroid Build Coastguard Worker func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 121*663afb9bSAndroid Build Coastguard Worker} 122*663afb9bSAndroid Build Coastguard Worker])# _LT_PREPARE_CC_BASENAME 123*663afb9bSAndroid Build Coastguard Worker 124*663afb9bSAndroid Build Coastguard Worker 125*663afb9bSAndroid Build Coastguard Worker# _LT_CC_BASENAME(CC) 126*663afb9bSAndroid Build Coastguard Worker# ------------------- 127*663afb9bSAndroid Build Coastguard Worker# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 128*663afb9bSAndroid Build Coastguard Worker# but that macro is also expanded into generated libtool script, which 129*663afb9bSAndroid Build Coastguard Worker# arranges for $SED and $ECHO to be set by different means. 130*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CC_BASENAME], 131*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_PREPARE_CC_BASENAME])dnl 132*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_DECL_SED])dnl 133*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 134*663afb9bSAndroid Build Coastguard Workerfunc_cc_basename $1 135*663afb9bSAndroid Build Coastguard Workercc_basename=$func_cc_basename_result 136*663afb9bSAndroid Build Coastguard Worker]) 137*663afb9bSAndroid Build Coastguard Worker 138*663afb9bSAndroid Build Coastguard Worker 139*663afb9bSAndroid Build Coastguard Worker# _LT_FILEUTILS_DEFAULTS 140*663afb9bSAndroid Build Coastguard Worker# ---------------------- 141*663afb9bSAndroid Build Coastguard Worker# It is okay to use these file commands and assume they have been set 142*663afb9bSAndroid Build Coastguard Worker# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 143*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_FILEUTILS_DEFAULTS], 144*663afb9bSAndroid Build Coastguard Worker[: ${CP="cp -f"} 145*663afb9bSAndroid Build Coastguard Worker: ${MV="mv -f"} 146*663afb9bSAndroid Build Coastguard Worker: ${RM="rm -f"} 147*663afb9bSAndroid Build Coastguard Worker])# _LT_FILEUTILS_DEFAULTS 148*663afb9bSAndroid Build Coastguard Worker 149*663afb9bSAndroid Build Coastguard Worker 150*663afb9bSAndroid Build Coastguard Worker# _LT_SETUP 151*663afb9bSAndroid Build Coastguard Worker# --------- 152*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_SETUP], 153*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl 154*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_BUILD])dnl 155*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 156*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 157*663afb9bSAndroid Build Coastguard Worker 158*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 159*663afb9bSAndroid Build Coastguard Workerdnl 160*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [host_alias], [0], [The host system])dnl 161*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [host], [0])dnl 162*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [host_os], [0])dnl 163*663afb9bSAndroid Build Coastguard Workerdnl 164*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [build_alias], [0], [The build system])dnl 165*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [build], [0])dnl 166*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [build_os], [0])dnl 167*663afb9bSAndroid Build Coastguard Workerdnl 168*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_CC])dnl 169*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_LD])dnl 170*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_NM])dnl 171*663afb9bSAndroid Build Coastguard Workerdnl 172*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_LN_S])dnl 173*663afb9bSAndroid Build Coastguard Workertest -z "$LN_S" && LN_S="ln -s" 174*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 175*663afb9bSAndroid Build Coastguard Workerdnl 176*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([LT_CMD_MAX_LEN])dnl 177*663afb9bSAndroid Build Coastguard Worker_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 178*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 179*663afb9bSAndroid Build Coastguard Workerdnl 180*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl 181*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_CHECK_SHELL_FEATURES])dnl 182*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 183*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_CMD_RELOAD])dnl 184*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_CHECK_MAGIC_METHOD])dnl 185*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 186*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_CMD_OLD_ARCHIVE])dnl 187*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 188*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_WITH_SYSROOT])dnl 189*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_CMD_TRUNCATE])dnl 190*663afb9bSAndroid Build Coastguard Worker 191*663afb9bSAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([ 192*663afb9bSAndroid Build Coastguard Worker# See if we are running on zsh, and set the options that allow our 193*663afb9bSAndroid Build Coastguard Worker# commands through without removal of \ escapes INIT. 194*663afb9bSAndroid Build Coastguard Workerif test -n "\${ZSH_VERSION+set}"; then 195*663afb9bSAndroid Build Coastguard Worker setopt NO_GLOB_SUBST 196*663afb9bSAndroid Build Coastguard Workerfi 197*663afb9bSAndroid Build Coastguard Worker]) 198*663afb9bSAndroid Build Coastguard Workerif test -n "${ZSH_VERSION+set}"; then 199*663afb9bSAndroid Build Coastguard Worker setopt NO_GLOB_SUBST 200*663afb9bSAndroid Build Coastguard Workerfi 201*663afb9bSAndroid Build Coastguard Worker 202*663afb9bSAndroid Build Coastguard Worker_LT_CHECK_OBJDIR 203*663afb9bSAndroid Build Coastguard Worker 204*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl 205*663afb9bSAndroid Build Coastguard Worker 206*663afb9bSAndroid Build Coastguard Workercase $host_os in 207*663afb9bSAndroid Build Coastguard Workeraix3*) 208*663afb9bSAndroid Build Coastguard Worker # AIX sometimes has problems with the GCC collect2 program. For some 209*663afb9bSAndroid Build Coastguard Worker # reason, if we set the COLLECT_NAMES environment variable, the problems 210*663afb9bSAndroid Build Coastguard Worker # vanish in a puff of smoke. 211*663afb9bSAndroid Build Coastguard Worker if test set != "${COLLECT_NAMES+set}"; then 212*663afb9bSAndroid Build Coastguard Worker COLLECT_NAMES= 213*663afb9bSAndroid Build Coastguard Worker export COLLECT_NAMES 214*663afb9bSAndroid Build Coastguard Worker fi 215*663afb9bSAndroid Build Coastguard Worker ;; 216*663afb9bSAndroid Build Coastguard Workeresac 217*663afb9bSAndroid Build Coastguard Worker 218*663afb9bSAndroid Build Coastguard Worker# Global variables: 219*663afb9bSAndroid Build Coastguard Workerofile=libtool 220*663afb9bSAndroid Build Coastguard Workercan_build_shared=yes 221*663afb9bSAndroid Build Coastguard Worker 222*663afb9bSAndroid Build Coastguard Worker# All known linkers require a '.a' archive for static linking (except MSVC and 223*663afb9bSAndroid Build Coastguard Worker# ICC, which need '.lib'). 224*663afb9bSAndroid Build Coastguard Workerlibext=a 225*663afb9bSAndroid Build Coastguard Worker 226*663afb9bSAndroid Build Coastguard Workerwith_gnu_ld=$lt_cv_prog_gnu_ld 227*663afb9bSAndroid Build Coastguard Worker 228*663afb9bSAndroid Build Coastguard Workerold_CC=$CC 229*663afb9bSAndroid Build Coastguard Workerold_CFLAGS=$CFLAGS 230*663afb9bSAndroid Build Coastguard Worker 231*663afb9bSAndroid Build Coastguard Worker# Set sane defaults for various variables 232*663afb9bSAndroid Build Coastguard Workertest -z "$CC" && CC=cc 233*663afb9bSAndroid Build Coastguard Workertest -z "$LTCC" && LTCC=$CC 234*663afb9bSAndroid Build Coastguard Workertest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 235*663afb9bSAndroid Build Coastguard Workertest -z "$LD" && LD=ld 236*663afb9bSAndroid Build Coastguard Workertest -z "$ac_objext" && ac_objext=o 237*663afb9bSAndroid Build Coastguard Worker 238*663afb9bSAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler]) 239*663afb9bSAndroid Build Coastguard Worker 240*663afb9bSAndroid Build Coastguard Worker# Only perform the check for file, if the check method requires it 241*663afb9bSAndroid Build Coastguard Workertest -z "$MAGIC_CMD" && MAGIC_CMD=file 242*663afb9bSAndroid Build Coastguard Workercase $deplibs_check_method in 243*663afb9bSAndroid Build Coastguard Workerfile_magic*) 244*663afb9bSAndroid Build Coastguard Worker if test "$file_magic_cmd" = '$MAGIC_CMD'; then 245*663afb9bSAndroid Build Coastguard Worker _LT_PATH_MAGIC 246*663afb9bSAndroid Build Coastguard Worker fi 247*663afb9bSAndroid Build Coastguard Worker ;; 248*663afb9bSAndroid Build Coastguard Workeresac 249*663afb9bSAndroid Build Coastguard Worker 250*663afb9bSAndroid Build Coastguard Worker# Use C for the default configuration in the libtool script 251*663afb9bSAndroid Build Coastguard WorkerLT_SUPPORTED_TAG([CC]) 252*663afb9bSAndroid Build Coastguard Worker_LT_LANG_C_CONFIG 253*663afb9bSAndroid Build Coastguard Worker_LT_LANG_DEFAULT_CONFIG 254*663afb9bSAndroid Build Coastguard Worker_LT_CONFIG_COMMANDS 255*663afb9bSAndroid Build Coastguard Worker])# _LT_SETUP 256*663afb9bSAndroid Build Coastguard Worker 257*663afb9bSAndroid Build Coastguard Worker 258*663afb9bSAndroid Build Coastguard Worker# _LT_PREPARE_SED_QUOTE_VARS 259*663afb9bSAndroid Build Coastguard Worker# -------------------------- 260*663afb9bSAndroid Build Coastguard Worker# Define a few sed substitution that help us do robust quoting. 261*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 262*663afb9bSAndroid Build Coastguard Worker[# Backslashify metacharacters that are still active within 263*663afb9bSAndroid Build Coastguard Worker# double-quoted strings. 264*663afb9bSAndroid Build Coastguard Workersed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 265*663afb9bSAndroid Build Coastguard Worker 266*663afb9bSAndroid Build Coastguard Worker# Same as above, but do not quote variable references. 267*663afb9bSAndroid Build Coastguard Workerdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 268*663afb9bSAndroid Build Coastguard Worker 269*663afb9bSAndroid Build Coastguard Worker# Sed substitution to delay expansion of an escaped shell variable in a 270*663afb9bSAndroid Build Coastguard Worker# double_quote_subst'ed string. 271*663afb9bSAndroid Build Coastguard Workerdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 272*663afb9bSAndroid Build Coastguard Worker 273*663afb9bSAndroid Build Coastguard Worker# Sed substitution to delay expansion of an escaped single quote. 274*663afb9bSAndroid Build Coastguard Workerdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 275*663afb9bSAndroid Build Coastguard Worker 276*663afb9bSAndroid Build Coastguard Worker# Sed substitution to avoid accidental globbing in evaled expressions 277*663afb9bSAndroid Build Coastguard Workerno_glob_subst='s/\*/\\\*/g' 278*663afb9bSAndroid Build Coastguard Worker]) 279*663afb9bSAndroid Build Coastguard Worker 280*663afb9bSAndroid Build Coastguard Worker# _LT_PROG_LTMAIN 281*663afb9bSAndroid Build Coastguard Worker# --------------- 282*663afb9bSAndroid Build Coastguard Worker# Note that this code is called both from 'configure', and 'config.status' 283*663afb9bSAndroid Build Coastguard Worker# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 284*663afb9bSAndroid Build Coastguard Worker# 'config.status' has no value for ac_aux_dir unless we are using Automake, 285*663afb9bSAndroid Build Coastguard Worker# so we pass a copy along to make sure it has a sensible value anyway. 286*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_PROG_LTMAIN], 287*663afb9bSAndroid Build Coastguard Worker[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 288*663afb9bSAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 289*663afb9bSAndroid Build Coastguard Workerltmain=$ac_aux_dir/ltmain.sh 290*663afb9bSAndroid Build Coastguard Worker])# _LT_PROG_LTMAIN 291*663afb9bSAndroid Build Coastguard Worker 292*663afb9bSAndroid Build Coastguard Worker 293*663afb9bSAndroid Build Coastguard Worker## ------------------------------------- ## 294*663afb9bSAndroid Build Coastguard Worker## Accumulate code for creating libtool. ## 295*663afb9bSAndroid Build Coastguard Worker## ------------------------------------- ## 296*663afb9bSAndroid Build Coastguard Worker 297*663afb9bSAndroid Build Coastguard Worker# So that we can recreate a full libtool script including additional 298*663afb9bSAndroid Build Coastguard Worker# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 299*663afb9bSAndroid Build Coastguard Worker# in macros and then make a single call at the end using the 'libtool' 300*663afb9bSAndroid Build Coastguard Worker# label. 301*663afb9bSAndroid Build Coastguard Worker 302*663afb9bSAndroid Build Coastguard Worker 303*663afb9bSAndroid Build Coastguard Worker# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 304*663afb9bSAndroid Build Coastguard Worker# ---------------------------------------- 305*663afb9bSAndroid Build Coastguard Worker# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 306*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_CONFIG_LIBTOOL_INIT], 307*663afb9bSAndroid Build Coastguard Worker[m4_ifval([$1], 308*663afb9bSAndroid Build Coastguard Worker [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 309*663afb9bSAndroid Build Coastguard Worker [$1 310*663afb9bSAndroid Build Coastguard Worker])])]) 311*663afb9bSAndroid Build Coastguard Worker 312*663afb9bSAndroid Build Coastguard Worker# Initialize. 313*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 314*663afb9bSAndroid Build Coastguard Worker 315*663afb9bSAndroid Build Coastguard Worker 316*663afb9bSAndroid Build Coastguard Worker# _LT_CONFIG_LIBTOOL([COMMANDS]) 317*663afb9bSAndroid Build Coastguard Worker# ------------------------------ 318*663afb9bSAndroid Build Coastguard Worker# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 319*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_CONFIG_LIBTOOL], 320*663afb9bSAndroid Build Coastguard Worker[m4_ifval([$1], 321*663afb9bSAndroid Build Coastguard Worker [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 322*663afb9bSAndroid Build Coastguard Worker [$1 323*663afb9bSAndroid Build Coastguard Worker])])]) 324*663afb9bSAndroid Build Coastguard Worker 325*663afb9bSAndroid Build Coastguard Worker# Initialize. 326*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 327*663afb9bSAndroid Build Coastguard Worker 328*663afb9bSAndroid Build Coastguard Worker 329*663afb9bSAndroid Build Coastguard Worker# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 330*663afb9bSAndroid Build Coastguard Worker# ----------------------------------------------------- 331*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CONFIG_SAVE_COMMANDS], 332*663afb9bSAndroid Build Coastguard Worker[_LT_CONFIG_LIBTOOL([$1]) 333*663afb9bSAndroid Build Coastguard Worker_LT_CONFIG_LIBTOOL_INIT([$2]) 334*663afb9bSAndroid Build Coastguard Worker]) 335*663afb9bSAndroid Build Coastguard Worker 336*663afb9bSAndroid Build Coastguard Worker 337*663afb9bSAndroid Build Coastguard Worker# _LT_FORMAT_COMMENT([COMMENT]) 338*663afb9bSAndroid Build Coastguard Worker# ----------------------------- 339*663afb9bSAndroid Build Coastguard Worker# Add leading comment marks to the start of each line, and a trailing 340*663afb9bSAndroid Build Coastguard Worker# full-stop to the whole comment if one is not present already. 341*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_FORMAT_COMMENT], 342*663afb9bSAndroid Build Coastguard Worker[m4_ifval([$1], [ 343*663afb9bSAndroid Build Coastguard Workerm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 344*663afb9bSAndroid Build Coastguard Worker [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 345*663afb9bSAndroid Build Coastguard Worker)]) 346*663afb9bSAndroid Build Coastguard Worker 347*663afb9bSAndroid Build Coastguard Worker 348*663afb9bSAndroid Build Coastguard Worker 349*663afb9bSAndroid Build Coastguard Worker## ------------------------ ## 350*663afb9bSAndroid Build Coastguard Worker## FIXME: Eliminate VARNAME ## 351*663afb9bSAndroid Build Coastguard Worker## ------------------------ ## 352*663afb9bSAndroid Build Coastguard Worker 353*663afb9bSAndroid Build Coastguard Worker 354*663afb9bSAndroid Build Coastguard Worker# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 355*663afb9bSAndroid Build Coastguard Worker# ------------------------------------------------------------------- 356*663afb9bSAndroid Build Coastguard Worker# CONFIGNAME is the name given to the value in the libtool script. 357*663afb9bSAndroid Build Coastguard Worker# VARNAME is the (base) name used in the configure script. 358*663afb9bSAndroid Build Coastguard Worker# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 359*663afb9bSAndroid Build Coastguard Worker# VARNAME. Any other value will be used directly. 360*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_DECL], 361*663afb9bSAndroid Build Coastguard Worker[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 362*663afb9bSAndroid Build Coastguard Worker [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 363*663afb9bSAndroid Build Coastguard Worker [m4_ifval([$1], [$1], [$2])]) 364*663afb9bSAndroid Build Coastguard Worker lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 365*663afb9bSAndroid Build Coastguard Worker m4_ifval([$4], 366*663afb9bSAndroid Build Coastguard Worker [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 367*663afb9bSAndroid Build Coastguard Worker lt_dict_add_subkey([lt_decl_dict], [$2], 368*663afb9bSAndroid Build Coastguard Worker [tagged?], [m4_ifval([$5], [yes], [no])])]) 369*663afb9bSAndroid Build Coastguard Worker]) 370*663afb9bSAndroid Build Coastguard Worker 371*663afb9bSAndroid Build Coastguard Worker 372*663afb9bSAndroid Build Coastguard Worker# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 373*663afb9bSAndroid Build Coastguard Worker# -------------------------------------------------------- 374*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 375*663afb9bSAndroid Build Coastguard Worker 376*663afb9bSAndroid Build Coastguard Worker 377*663afb9bSAndroid Build Coastguard Worker# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 378*663afb9bSAndroid Build Coastguard Worker# ------------------------------------------------ 379*663afb9bSAndroid Build Coastguard Workerm4_define([lt_decl_tag_varnames], 380*663afb9bSAndroid Build Coastguard Worker[_lt_decl_filter([tagged?], [yes], $@)]) 381*663afb9bSAndroid Build Coastguard Worker 382*663afb9bSAndroid Build Coastguard Worker 383*663afb9bSAndroid Build Coastguard Worker# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 384*663afb9bSAndroid Build Coastguard Worker# --------------------------------------------------------- 385*663afb9bSAndroid Build Coastguard Workerm4_define([_lt_decl_filter], 386*663afb9bSAndroid Build Coastguard Worker[m4_case([$#], 387*663afb9bSAndroid Build Coastguard Worker [0], [m4_fatal([$0: too few arguments: $#])], 388*663afb9bSAndroid Build Coastguard Worker [1], [m4_fatal([$0: too few arguments: $#: $1])], 389*663afb9bSAndroid Build Coastguard Worker [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 390*663afb9bSAndroid Build Coastguard Worker [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 391*663afb9bSAndroid Build Coastguard Worker [lt_dict_filter([lt_decl_dict], $@)])[]dnl 392*663afb9bSAndroid Build Coastguard Worker]) 393*663afb9bSAndroid Build Coastguard Worker 394*663afb9bSAndroid Build Coastguard Worker 395*663afb9bSAndroid Build Coastguard Worker# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 396*663afb9bSAndroid Build Coastguard Worker# -------------------------------------------------- 397*663afb9bSAndroid Build Coastguard Workerm4_define([lt_decl_quote_varnames], 398*663afb9bSAndroid Build Coastguard Worker[_lt_decl_filter([value], [1], $@)]) 399*663afb9bSAndroid Build Coastguard Worker 400*663afb9bSAndroid Build Coastguard Worker 401*663afb9bSAndroid Build Coastguard Worker# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 402*663afb9bSAndroid Build Coastguard Worker# --------------------------------------------------- 403*663afb9bSAndroid Build Coastguard Workerm4_define([lt_decl_dquote_varnames], 404*663afb9bSAndroid Build Coastguard Worker[_lt_decl_filter([value], [2], $@)]) 405*663afb9bSAndroid Build Coastguard Worker 406*663afb9bSAndroid Build Coastguard Worker 407*663afb9bSAndroid Build Coastguard Worker# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 408*663afb9bSAndroid Build Coastguard Worker# --------------------------------------------------- 409*663afb9bSAndroid Build Coastguard Workerm4_define([lt_decl_varnames_tagged], 410*663afb9bSAndroid Build Coastguard Worker[m4_assert([$# <= 2])dnl 411*663afb9bSAndroid Build Coastguard Worker_$0(m4_quote(m4_default([$1], [[, ]])), 412*663afb9bSAndroid Build Coastguard Worker m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 413*663afb9bSAndroid Build Coastguard Worker m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 414*663afb9bSAndroid Build Coastguard Workerm4_define([_lt_decl_varnames_tagged], 415*663afb9bSAndroid Build Coastguard Worker[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 416*663afb9bSAndroid Build Coastguard Worker 417*663afb9bSAndroid Build Coastguard Worker 418*663afb9bSAndroid Build Coastguard Worker# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 419*663afb9bSAndroid Build Coastguard Worker# ------------------------------------------------ 420*663afb9bSAndroid Build Coastguard Workerm4_define([lt_decl_all_varnames], 421*663afb9bSAndroid Build Coastguard Worker[_$0(m4_quote(m4_default([$1], [[, ]])), 422*663afb9bSAndroid Build Coastguard Worker m4_if([$2], [], 423*663afb9bSAndroid Build Coastguard Worker m4_quote(lt_decl_varnames), 424*663afb9bSAndroid Build Coastguard Worker m4_quote(m4_shift($@))))[]dnl 425*663afb9bSAndroid Build Coastguard Worker]) 426*663afb9bSAndroid Build Coastguard Workerm4_define([_lt_decl_all_varnames], 427*663afb9bSAndroid Build Coastguard Worker[lt_join($@, lt_decl_varnames_tagged([$1], 428*663afb9bSAndroid Build Coastguard Worker lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 429*663afb9bSAndroid Build Coastguard Worker]) 430*663afb9bSAndroid Build Coastguard Worker 431*663afb9bSAndroid Build Coastguard Worker 432*663afb9bSAndroid Build Coastguard Worker# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 433*663afb9bSAndroid Build Coastguard Worker# ------------------------------------ 434*663afb9bSAndroid Build Coastguard Worker# Quote a variable value, and forward it to 'config.status' so that its 435*663afb9bSAndroid Build Coastguard Worker# declaration there will have the same value as in 'configure'. VARNAME 436*663afb9bSAndroid Build Coastguard Worker# must have a single quote delimited value for this to work. 437*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_CONFIG_STATUS_DECLARE], 438*663afb9bSAndroid Build Coastguard Worker[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 439*663afb9bSAndroid Build Coastguard Worker 440*663afb9bSAndroid Build Coastguard Worker 441*663afb9bSAndroid Build Coastguard Worker# _LT_CONFIG_STATUS_DECLARATIONS 442*663afb9bSAndroid Build Coastguard Worker# ------------------------------ 443*663afb9bSAndroid Build Coastguard Worker# We delimit libtool config variables with single quotes, so when 444*663afb9bSAndroid Build Coastguard Worker# we write them to config.status, we have to be sure to quote all 445*663afb9bSAndroid Build Coastguard Worker# embedded single quotes properly. In configure, this macro expands 446*663afb9bSAndroid Build Coastguard Worker# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 447*663afb9bSAndroid Build Coastguard Worker# 448*663afb9bSAndroid Build Coastguard Worker# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 449*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 450*663afb9bSAndroid Build Coastguard Worker[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 451*663afb9bSAndroid Build Coastguard Worker [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 452*663afb9bSAndroid Build Coastguard Worker 453*663afb9bSAndroid Build Coastguard Worker 454*663afb9bSAndroid Build Coastguard Worker# _LT_LIBTOOL_TAGS 455*663afb9bSAndroid Build Coastguard Worker# ---------------- 456*663afb9bSAndroid Build Coastguard Worker# Output comment and list of tags supported by the script 457*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LIBTOOL_TAGS], 458*663afb9bSAndroid Build Coastguard Worker[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 459*663afb9bSAndroid Build Coastguard Workeravailable_tags='_LT_TAGS'dnl 460*663afb9bSAndroid Build Coastguard Worker]) 461*663afb9bSAndroid Build Coastguard Worker 462*663afb9bSAndroid Build Coastguard Worker 463*663afb9bSAndroid Build Coastguard Worker# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 464*663afb9bSAndroid Build Coastguard Worker# ----------------------------------- 465*663afb9bSAndroid Build Coastguard Worker# Extract the dictionary values for VARNAME (optionally with TAG) and 466*663afb9bSAndroid Build Coastguard Worker# expand to a commented shell variable setting: 467*663afb9bSAndroid Build Coastguard Worker# 468*663afb9bSAndroid Build Coastguard Worker# # Some comment about what VAR is for. 469*663afb9bSAndroid Build Coastguard Worker# visible_name=$lt_internal_name 470*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_LIBTOOL_DECLARE], 471*663afb9bSAndroid Build Coastguard Worker[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 472*663afb9bSAndroid Build Coastguard Worker [description])))[]dnl 473*663afb9bSAndroid Build Coastguard Workerm4_pushdef([_libtool_name], 474*663afb9bSAndroid Build Coastguard Worker m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 475*663afb9bSAndroid Build Coastguard Workerm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 476*663afb9bSAndroid Build Coastguard Worker [0], [_libtool_name=[$]$1], 477*663afb9bSAndroid Build Coastguard Worker [1], [_libtool_name=$lt_[]$1], 478*663afb9bSAndroid Build Coastguard Worker [2], [_libtool_name=$lt_[]$1], 479*663afb9bSAndroid Build Coastguard Worker [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 480*663afb9bSAndroid Build Coastguard Workerm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 481*663afb9bSAndroid Build Coastguard Worker]) 482*663afb9bSAndroid Build Coastguard Worker 483*663afb9bSAndroid Build Coastguard Worker 484*663afb9bSAndroid Build Coastguard Worker# _LT_LIBTOOL_CONFIG_VARS 485*663afb9bSAndroid Build Coastguard Worker# ----------------------- 486*663afb9bSAndroid Build Coastguard Worker# Produce commented declarations of non-tagged libtool config variables 487*663afb9bSAndroid Build Coastguard Worker# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 488*663afb9bSAndroid Build Coastguard Worker# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 489*663afb9bSAndroid Build Coastguard Worker# section) are produced by _LT_LIBTOOL_TAG_VARS. 490*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LIBTOOL_CONFIG_VARS], 491*663afb9bSAndroid Build Coastguard Worker[m4_foreach([_lt_var], 492*663afb9bSAndroid Build Coastguard Worker m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 493*663afb9bSAndroid Build Coastguard Worker [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 494*663afb9bSAndroid Build Coastguard Worker 495*663afb9bSAndroid Build Coastguard Worker 496*663afb9bSAndroid Build Coastguard Worker# _LT_LIBTOOL_TAG_VARS(TAG) 497*663afb9bSAndroid Build Coastguard Worker# ------------------------- 498*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_LIBTOOL_TAG_VARS], 499*663afb9bSAndroid Build Coastguard Worker[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 500*663afb9bSAndroid Build Coastguard Worker [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 501*663afb9bSAndroid Build Coastguard Worker 502*663afb9bSAndroid Build Coastguard Worker 503*663afb9bSAndroid Build Coastguard Worker# _LT_TAGVAR(VARNAME, [TAGNAME]) 504*663afb9bSAndroid Build Coastguard Worker# ------------------------------ 505*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 506*663afb9bSAndroid Build Coastguard Worker 507*663afb9bSAndroid Build Coastguard Worker 508*663afb9bSAndroid Build Coastguard Worker# _LT_CONFIG_COMMANDS 509*663afb9bSAndroid Build Coastguard Worker# ------------------- 510*663afb9bSAndroid Build Coastguard Worker# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 511*663afb9bSAndroid Build Coastguard Worker# variables for single and double quote escaping we saved from calls 512*663afb9bSAndroid Build Coastguard Worker# to _LT_DECL, we can put quote escaped variables declarations 513*663afb9bSAndroid Build Coastguard Worker# into 'config.status', and then the shell code to quote escape them in 514*663afb9bSAndroid Build Coastguard Worker# for loops in 'config.status'. Finally, any additional code accumulated 515*663afb9bSAndroid Build Coastguard Worker# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 516*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CONFIG_COMMANDS], 517*663afb9bSAndroid Build Coastguard Worker[AC_PROVIDE_IFELSE([LT_OUTPUT], 518*663afb9bSAndroid Build Coastguard Worker dnl If the libtool generation code has been placed in $CONFIG_LT, 519*663afb9bSAndroid Build Coastguard Worker dnl instead of duplicating it all over again into config.status, 520*663afb9bSAndroid Build Coastguard Worker dnl then we will have config.status run $CONFIG_LT later, so it 521*663afb9bSAndroid Build Coastguard Worker dnl needs to know what name is stored there: 522*663afb9bSAndroid Build Coastguard Worker [AC_CONFIG_COMMANDS([libtool], 523*663afb9bSAndroid Build Coastguard Worker [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 524*663afb9bSAndroid Build Coastguard Worker dnl If the libtool generation code is destined for config.status, 525*663afb9bSAndroid Build Coastguard Worker dnl expand the accumulated commands and init code now: 526*663afb9bSAndroid Build Coastguard Worker [AC_CONFIG_COMMANDS([libtool], 527*663afb9bSAndroid Build Coastguard Worker [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 528*663afb9bSAndroid Build Coastguard Worker])#_LT_CONFIG_COMMANDS 529*663afb9bSAndroid Build Coastguard Worker 530*663afb9bSAndroid Build Coastguard Worker 531*663afb9bSAndroid Build Coastguard Worker# Initialize. 532*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 533*663afb9bSAndroid Build Coastguard Worker[ 534*663afb9bSAndroid Build Coastguard Worker 535*663afb9bSAndroid Build Coastguard Worker# The HP-UX ksh and POSIX shell print the target directory to stdout 536*663afb9bSAndroid Build Coastguard Worker# if CDPATH is set. 537*663afb9bSAndroid Build Coastguard Worker(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 538*663afb9bSAndroid Build Coastguard Worker 539*663afb9bSAndroid Build Coastguard Workersed_quote_subst='$sed_quote_subst' 540*663afb9bSAndroid Build Coastguard Workerdouble_quote_subst='$double_quote_subst' 541*663afb9bSAndroid Build Coastguard Workerdelay_variable_subst='$delay_variable_subst' 542*663afb9bSAndroid Build Coastguard Worker_LT_CONFIG_STATUS_DECLARATIONS 543*663afb9bSAndroid Build Coastguard WorkerLTCC='$LTCC' 544*663afb9bSAndroid Build Coastguard WorkerLTCFLAGS='$LTCFLAGS' 545*663afb9bSAndroid Build Coastguard Workercompiler='$compiler_DEFAULT' 546*663afb9bSAndroid Build Coastguard Worker 547*663afb9bSAndroid Build Coastguard Worker# A function that is used when there is no print builtin or printf. 548*663afb9bSAndroid Build Coastguard Workerfunc_fallback_echo () 549*663afb9bSAndroid Build Coastguard Worker{ 550*663afb9bSAndroid Build Coastguard Worker eval 'cat <<_LTECHO_EOF 551*663afb9bSAndroid Build Coastguard Worker\$[]1 552*663afb9bSAndroid Build Coastguard Worker_LTECHO_EOF' 553*663afb9bSAndroid Build Coastguard Worker} 554*663afb9bSAndroid Build Coastguard Worker 555*663afb9bSAndroid Build Coastguard Worker# Quote evaled strings. 556*663afb9bSAndroid Build Coastguard Workerfor var in lt_decl_all_varnames([[ \ 557*663afb9bSAndroid Build Coastguard Worker]], lt_decl_quote_varnames); do 558*663afb9bSAndroid Build Coastguard Worker case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 559*663afb9bSAndroid Build Coastguard Worker *[[\\\\\\\`\\"\\\$]]*) 560*663afb9bSAndroid Build Coastguard Worker eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 561*663afb9bSAndroid Build Coastguard Worker ;; 562*663afb9bSAndroid Build Coastguard Worker *) 563*663afb9bSAndroid Build Coastguard Worker eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 564*663afb9bSAndroid Build Coastguard Worker ;; 565*663afb9bSAndroid Build Coastguard Worker esac 566*663afb9bSAndroid Build Coastguard Workerdone 567*663afb9bSAndroid Build Coastguard Worker 568*663afb9bSAndroid Build Coastguard Worker# Double-quote double-evaled strings. 569*663afb9bSAndroid Build Coastguard Workerfor var in lt_decl_all_varnames([[ \ 570*663afb9bSAndroid Build Coastguard Worker]], lt_decl_dquote_varnames); do 571*663afb9bSAndroid Build Coastguard Worker case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 572*663afb9bSAndroid Build Coastguard Worker *[[\\\\\\\`\\"\\\$]]*) 573*663afb9bSAndroid Build Coastguard Worker eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 574*663afb9bSAndroid Build Coastguard Worker ;; 575*663afb9bSAndroid Build Coastguard Worker *) 576*663afb9bSAndroid Build Coastguard Worker eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 577*663afb9bSAndroid Build Coastguard Worker ;; 578*663afb9bSAndroid Build Coastguard Worker esac 579*663afb9bSAndroid Build Coastguard Workerdone 580*663afb9bSAndroid Build Coastguard Worker 581*663afb9bSAndroid Build Coastguard Worker_LT_OUTPUT_LIBTOOL_INIT 582*663afb9bSAndroid Build Coastguard Worker]) 583*663afb9bSAndroid Build Coastguard Worker 584*663afb9bSAndroid Build Coastguard Worker# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 585*663afb9bSAndroid Build Coastguard Worker# ------------------------------------ 586*663afb9bSAndroid Build Coastguard Worker# Generate a child script FILE with all initialization necessary to 587*663afb9bSAndroid Build Coastguard Worker# reuse the environment learned by the parent script, and make the 588*663afb9bSAndroid Build Coastguard Worker# file executable. If COMMENT is supplied, it is inserted after the 589*663afb9bSAndroid Build Coastguard Worker# '#!' sequence but before initialization text begins. After this 590*663afb9bSAndroid Build Coastguard Worker# macro, additional text can be appended to FILE to form the body of 591*663afb9bSAndroid Build Coastguard Worker# the child script. The macro ends with non-zero status if the 592*663afb9bSAndroid Build Coastguard Worker# file could not be fully written (such as if the disk is full). 593*663afb9bSAndroid Build Coastguard Workerm4_ifdef([AS_INIT_GENERATED], 594*663afb9bSAndroid Build Coastguard Worker[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 595*663afb9bSAndroid Build Coastguard Worker[m4_defun([_LT_GENERATED_FILE_INIT], 596*663afb9bSAndroid Build Coastguard Worker[m4_require([AS_PREPARE])]dnl 597*663afb9bSAndroid Build Coastguard Worker[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 598*663afb9bSAndroid Build Coastguard Worker[lt_write_fail=0 599*663afb9bSAndroid Build Coastguard Workercat >$1 <<_ASEOF || lt_write_fail=1 600*663afb9bSAndroid Build Coastguard Worker#! $SHELL 601*663afb9bSAndroid Build Coastguard Worker# Generated by $as_me. 602*663afb9bSAndroid Build Coastguard Worker$2 603*663afb9bSAndroid Build Coastguard WorkerSHELL=\${CONFIG_SHELL-$SHELL} 604*663afb9bSAndroid Build Coastguard Workerexport SHELL 605*663afb9bSAndroid Build Coastguard Worker_ASEOF 606*663afb9bSAndroid Build Coastguard Workercat >>$1 <<\_ASEOF || lt_write_fail=1 607*663afb9bSAndroid Build Coastguard WorkerAS_SHELL_SANITIZE 608*663afb9bSAndroid Build Coastguard Worker_AS_PREPARE 609*663afb9bSAndroid Build Coastguard Workerexec AS_MESSAGE_FD>&1 610*663afb9bSAndroid Build Coastguard Worker_ASEOF 611*663afb9bSAndroid Build Coastguard Workertest 0 = "$lt_write_fail" && chmod +x $1[]dnl 612*663afb9bSAndroid Build Coastguard Workerm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 613*663afb9bSAndroid Build Coastguard Worker 614*663afb9bSAndroid Build Coastguard Worker# LT_OUTPUT 615*663afb9bSAndroid Build Coastguard Worker# --------- 616*663afb9bSAndroid Build Coastguard Worker# This macro allows early generation of the libtool script (before 617*663afb9bSAndroid Build Coastguard Worker# AC_OUTPUT is called), incase it is used in configure for compilation 618*663afb9bSAndroid Build Coastguard Worker# tests. 619*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([LT_OUTPUT], 620*663afb9bSAndroid Build Coastguard Worker[: ${CONFIG_LT=./config.lt} 621*663afb9bSAndroid Build Coastguard WorkerAC_MSG_NOTICE([creating $CONFIG_LT]) 622*663afb9bSAndroid Build Coastguard Worker_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 623*663afb9bSAndroid Build Coastguard Worker[# Run this file to recreate a libtool stub with the current configuration.]) 624*663afb9bSAndroid Build Coastguard Worker 625*663afb9bSAndroid Build Coastguard Workercat >>"$CONFIG_LT" <<\_LTEOF 626*663afb9bSAndroid Build Coastguard Workerlt_cl_silent=false 627*663afb9bSAndroid Build Coastguard Workerexec AS_MESSAGE_LOG_FD>>config.log 628*663afb9bSAndroid Build Coastguard Worker{ 629*663afb9bSAndroid Build Coastguard Worker echo 630*663afb9bSAndroid Build Coastguard Worker AS_BOX([Running $as_me.]) 631*663afb9bSAndroid Build Coastguard Worker} >&AS_MESSAGE_LOG_FD 632*663afb9bSAndroid Build Coastguard Worker 633*663afb9bSAndroid Build Coastguard Workerlt_cl_help="\ 634*663afb9bSAndroid Build Coastguard Worker'$as_me' creates a local libtool stub from the current configuration, 635*663afb9bSAndroid Build Coastguard Workerfor use in further configure time tests before the real libtool is 636*663afb9bSAndroid Build Coastguard Workergenerated. 637*663afb9bSAndroid Build Coastguard Worker 638*663afb9bSAndroid Build Coastguard WorkerUsage: $[0] [[OPTIONS]] 639*663afb9bSAndroid Build Coastguard Worker 640*663afb9bSAndroid Build Coastguard Worker -h, --help print this help, then exit 641*663afb9bSAndroid Build Coastguard Worker -V, --version print version number, then exit 642*663afb9bSAndroid Build Coastguard Worker -q, --quiet do not print progress messages 643*663afb9bSAndroid Build Coastguard Worker -d, --debug don't remove temporary files 644*663afb9bSAndroid Build Coastguard Worker 645*663afb9bSAndroid Build Coastguard WorkerReport bugs to <[email protected]>." 646*663afb9bSAndroid Build Coastguard Worker 647*663afb9bSAndroid Build Coastguard Workerlt_cl_version="\ 648*663afb9bSAndroid Build Coastguard Workerm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 649*663afb9bSAndroid Build Coastguard Workerm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 650*663afb9bSAndroid Build Coastguard Workerconfigured by $[0], generated by m4_PACKAGE_STRING. 651*663afb9bSAndroid Build Coastguard Worker 652*663afb9bSAndroid Build Coastguard WorkerCopyright (C) 2011 Free Software Foundation, Inc. 653*663afb9bSAndroid Build Coastguard WorkerThis config.lt script is free software; the Free Software Foundation 654*663afb9bSAndroid Build Coastguard Workergives unlimited permision to copy, distribute and modify it." 655*663afb9bSAndroid Build Coastguard Worker 656*663afb9bSAndroid Build Coastguard Workerwhile test 0 != $[#] 657*663afb9bSAndroid Build Coastguard Workerdo 658*663afb9bSAndroid Build Coastguard Worker case $[1] in 659*663afb9bSAndroid Build Coastguard Worker --version | --v* | -V ) 660*663afb9bSAndroid Build Coastguard Worker echo "$lt_cl_version"; exit 0 ;; 661*663afb9bSAndroid Build Coastguard Worker --help | --h* | -h ) 662*663afb9bSAndroid Build Coastguard Worker echo "$lt_cl_help"; exit 0 ;; 663*663afb9bSAndroid Build Coastguard Worker --debug | --d* | -d ) 664*663afb9bSAndroid Build Coastguard Worker debug=: ;; 665*663afb9bSAndroid Build Coastguard Worker --quiet | --q* | --silent | --s* | -q ) 666*663afb9bSAndroid Build Coastguard Worker lt_cl_silent=: ;; 667*663afb9bSAndroid Build Coastguard Worker 668*663afb9bSAndroid Build Coastguard Worker -*) AC_MSG_ERROR([unrecognized option: $[1] 669*663afb9bSAndroid Build Coastguard WorkerTry '$[0] --help' for more information.]) ;; 670*663afb9bSAndroid Build Coastguard Worker 671*663afb9bSAndroid Build Coastguard Worker *) AC_MSG_ERROR([unrecognized argument: $[1] 672*663afb9bSAndroid Build Coastguard WorkerTry '$[0] --help' for more information.]) ;; 673*663afb9bSAndroid Build Coastguard Worker esac 674*663afb9bSAndroid Build Coastguard Worker shift 675*663afb9bSAndroid Build Coastguard Workerdone 676*663afb9bSAndroid Build Coastguard Worker 677*663afb9bSAndroid Build Coastguard Workerif $lt_cl_silent; then 678*663afb9bSAndroid Build Coastguard Worker exec AS_MESSAGE_FD>/dev/null 679*663afb9bSAndroid Build Coastguard Workerfi 680*663afb9bSAndroid Build Coastguard Worker_LTEOF 681*663afb9bSAndroid Build Coastguard Worker 682*663afb9bSAndroid Build Coastguard Workercat >>"$CONFIG_LT" <<_LTEOF 683*663afb9bSAndroid Build Coastguard Worker_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 684*663afb9bSAndroid Build Coastguard Worker_LTEOF 685*663afb9bSAndroid Build Coastguard Worker 686*663afb9bSAndroid Build Coastguard Workercat >>"$CONFIG_LT" <<\_LTEOF 687*663afb9bSAndroid Build Coastguard WorkerAC_MSG_NOTICE([creating $ofile]) 688*663afb9bSAndroid Build Coastguard Worker_LT_OUTPUT_LIBTOOL_COMMANDS 689*663afb9bSAndroid Build Coastguard WorkerAS_EXIT(0) 690*663afb9bSAndroid Build Coastguard Worker_LTEOF 691*663afb9bSAndroid Build Coastguard Workerchmod +x "$CONFIG_LT" 692*663afb9bSAndroid Build Coastguard Worker 693*663afb9bSAndroid Build Coastguard Worker# configure is writing to config.log, but config.lt does its own redirection, 694*663afb9bSAndroid Build Coastguard Worker# appending to config.log, which fails on DOS, as config.log is still kept 695*663afb9bSAndroid Build Coastguard Worker# open by configure. Here we exec the FD to /dev/null, effectively closing 696*663afb9bSAndroid Build Coastguard Worker# config.log, so it can be properly (re)opened and appended to by config.lt. 697*663afb9bSAndroid Build Coastguard Workerlt_cl_success=: 698*663afb9bSAndroid Build Coastguard Workertest yes = "$silent" && 699*663afb9bSAndroid Build Coastguard Worker lt_config_lt_args="$lt_config_lt_args --quiet" 700*663afb9bSAndroid Build Coastguard Workerexec AS_MESSAGE_LOG_FD>/dev/null 701*663afb9bSAndroid Build Coastguard Worker$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 702*663afb9bSAndroid Build Coastguard Workerexec AS_MESSAGE_LOG_FD>>config.log 703*663afb9bSAndroid Build Coastguard Worker$lt_cl_success || AS_EXIT(1) 704*663afb9bSAndroid Build Coastguard Worker])# LT_OUTPUT 705*663afb9bSAndroid Build Coastguard Worker 706*663afb9bSAndroid Build Coastguard Worker 707*663afb9bSAndroid Build Coastguard Worker# _LT_CONFIG(TAG) 708*663afb9bSAndroid Build Coastguard Worker# --------------- 709*663afb9bSAndroid Build Coastguard Worker# If TAG is the built-in tag, create an initial libtool script with a 710*663afb9bSAndroid Build Coastguard Worker# default configuration from the untagged config vars. Otherwise add code 711*663afb9bSAndroid Build Coastguard Worker# to config.status for appending the configuration named by TAG from the 712*663afb9bSAndroid Build Coastguard Worker# matching tagged config vars. 713*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CONFIG], 714*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 715*663afb9bSAndroid Build Coastguard Worker_LT_CONFIG_SAVE_COMMANDS([ 716*663afb9bSAndroid Build Coastguard Worker m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 717*663afb9bSAndroid Build Coastguard Worker m4_if(_LT_TAG, [C], [ 718*663afb9bSAndroid Build Coastguard Worker # See if we are running on zsh, and set the options that allow our 719*663afb9bSAndroid Build Coastguard Worker # commands through without removal of \ escapes. 720*663afb9bSAndroid Build Coastguard Worker if test -n "${ZSH_VERSION+set}"; then 721*663afb9bSAndroid Build Coastguard Worker setopt NO_GLOB_SUBST 722*663afb9bSAndroid Build Coastguard Worker fi 723*663afb9bSAndroid Build Coastguard Worker 724*663afb9bSAndroid Build Coastguard Worker cfgfile=${ofile}T 725*663afb9bSAndroid Build Coastguard Worker trap "$RM \"$cfgfile\"; exit 1" 1 2 15 726*663afb9bSAndroid Build Coastguard Worker $RM "$cfgfile" 727*663afb9bSAndroid Build Coastguard Worker 728*663afb9bSAndroid Build Coastguard Worker cat <<_LT_EOF >> "$cfgfile" 729*663afb9bSAndroid Build Coastguard Worker#! $SHELL 730*663afb9bSAndroid Build Coastguard Worker# Generated automatically by $as_me ($PACKAGE) $VERSION 731*663afb9bSAndroid Build Coastguard Worker# NOTE: Changes made to this file will be lost: look at ltmain.sh. 732*663afb9bSAndroid Build Coastguard Worker 733*663afb9bSAndroid Build Coastguard Worker# Provide generalized library-building support services. 734*663afb9bSAndroid Build Coastguard Worker# Written by Gordon Matzigkeit, 1996 735*663afb9bSAndroid Build Coastguard Worker 736*663afb9bSAndroid Build Coastguard Worker_LT_COPYING 737*663afb9bSAndroid Build Coastguard Worker_LT_LIBTOOL_TAGS 738*663afb9bSAndroid Build Coastguard Worker 739*663afb9bSAndroid Build Coastguard Worker# Configured defaults for sys_lib_dlsearch_path munging. 740*663afb9bSAndroid Build Coastguard Worker: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 741*663afb9bSAndroid Build Coastguard Worker 742*663afb9bSAndroid Build Coastguard Worker# ### BEGIN LIBTOOL CONFIG 743*663afb9bSAndroid Build Coastguard Worker_LT_LIBTOOL_CONFIG_VARS 744*663afb9bSAndroid Build Coastguard Worker_LT_LIBTOOL_TAG_VARS 745*663afb9bSAndroid Build Coastguard Worker# ### END LIBTOOL CONFIG 746*663afb9bSAndroid Build Coastguard Worker 747*663afb9bSAndroid Build Coastguard Worker_LT_EOF 748*663afb9bSAndroid Build Coastguard Worker 749*663afb9bSAndroid Build Coastguard Worker cat <<'_LT_EOF' >> "$cfgfile" 750*663afb9bSAndroid Build Coastguard Worker 751*663afb9bSAndroid Build Coastguard Worker# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 752*663afb9bSAndroid Build Coastguard Worker 753*663afb9bSAndroid Build Coastguard Worker_LT_PREPARE_MUNGE_PATH_LIST 754*663afb9bSAndroid Build Coastguard Worker_LT_PREPARE_CC_BASENAME 755*663afb9bSAndroid Build Coastguard Worker 756*663afb9bSAndroid Build Coastguard Worker# ### END FUNCTIONS SHARED WITH CONFIGURE 757*663afb9bSAndroid Build Coastguard Worker 758*663afb9bSAndroid Build Coastguard Worker_LT_EOF 759*663afb9bSAndroid Build Coastguard Worker 760*663afb9bSAndroid Build Coastguard Worker case $host_os in 761*663afb9bSAndroid Build Coastguard Worker aix3*) 762*663afb9bSAndroid Build Coastguard Worker cat <<\_LT_EOF >> "$cfgfile" 763*663afb9bSAndroid Build Coastguard Worker# AIX sometimes has problems with the GCC collect2 program. For some 764*663afb9bSAndroid Build Coastguard Worker# reason, if we set the COLLECT_NAMES environment variable, the problems 765*663afb9bSAndroid Build Coastguard Worker# vanish in a puff of smoke. 766*663afb9bSAndroid Build Coastguard Workerif test set != "${COLLECT_NAMES+set}"; then 767*663afb9bSAndroid Build Coastguard Worker COLLECT_NAMES= 768*663afb9bSAndroid Build Coastguard Worker export COLLECT_NAMES 769*663afb9bSAndroid Build Coastguard Workerfi 770*663afb9bSAndroid Build Coastguard Worker_LT_EOF 771*663afb9bSAndroid Build Coastguard Worker ;; 772*663afb9bSAndroid Build Coastguard Worker esac 773*663afb9bSAndroid Build Coastguard Worker 774*663afb9bSAndroid Build Coastguard Worker _LT_PROG_LTMAIN 775*663afb9bSAndroid Build Coastguard Worker 776*663afb9bSAndroid Build Coastguard Worker # We use sed instead of cat because bash on DJGPP gets confused if 777*663afb9bSAndroid Build Coastguard Worker # if finds mixed CR/LF and LF-only lines. Since sed operates in 778*663afb9bSAndroid Build Coastguard Worker # text mode, it properly converts lines to CR/LF. This bash problem 779*663afb9bSAndroid Build Coastguard Worker # is reportedly fixed, but why not run on old versions too? 780*663afb9bSAndroid Build Coastguard Worker sed '$q' "$ltmain" >> "$cfgfile" \ 781*663afb9bSAndroid Build Coastguard Worker || (rm -f "$cfgfile"; exit 1) 782*663afb9bSAndroid Build Coastguard Worker 783*663afb9bSAndroid Build Coastguard Worker mv -f "$cfgfile" "$ofile" || 784*663afb9bSAndroid Build Coastguard Worker (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 785*663afb9bSAndroid Build Coastguard Worker chmod +x "$ofile" 786*663afb9bSAndroid Build Coastguard Worker], 787*663afb9bSAndroid Build Coastguard Worker[cat <<_LT_EOF >> "$ofile" 788*663afb9bSAndroid Build Coastguard Worker 789*663afb9bSAndroid Build Coastguard Workerdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 790*663afb9bSAndroid Build Coastguard Workerdnl in a comment (ie after a #). 791*663afb9bSAndroid Build Coastguard Worker# ### BEGIN LIBTOOL TAG CONFIG: $1 792*663afb9bSAndroid Build Coastguard Worker_LT_LIBTOOL_TAG_VARS(_LT_TAG) 793*663afb9bSAndroid Build Coastguard Worker# ### END LIBTOOL TAG CONFIG: $1 794*663afb9bSAndroid Build Coastguard Worker_LT_EOF 795*663afb9bSAndroid Build Coastguard Worker])dnl /m4_if 796*663afb9bSAndroid Build Coastguard Worker], 797*663afb9bSAndroid Build Coastguard Worker[m4_if([$1], [], [ 798*663afb9bSAndroid Build Coastguard Worker PACKAGE='$PACKAGE' 799*663afb9bSAndroid Build Coastguard Worker VERSION='$VERSION' 800*663afb9bSAndroid Build Coastguard Worker RM='$RM' 801*663afb9bSAndroid Build Coastguard Worker ofile='$ofile'], []) 802*663afb9bSAndroid Build Coastguard Worker])dnl /_LT_CONFIG_SAVE_COMMANDS 803*663afb9bSAndroid Build Coastguard Worker])# _LT_CONFIG 804*663afb9bSAndroid Build Coastguard Worker 805*663afb9bSAndroid Build Coastguard Worker 806*663afb9bSAndroid Build Coastguard Worker# LT_SUPPORTED_TAG(TAG) 807*663afb9bSAndroid Build Coastguard Worker# --------------------- 808*663afb9bSAndroid Build Coastguard Worker# Trace this macro to discover what tags are supported by the libtool 809*663afb9bSAndroid Build Coastguard Worker# --tag option, using: 810*663afb9bSAndroid Build Coastguard Worker# autoconf --trace 'LT_SUPPORTED_TAG:$1' 811*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([LT_SUPPORTED_TAG], []) 812*663afb9bSAndroid Build Coastguard Worker 813*663afb9bSAndroid Build Coastguard Worker 814*663afb9bSAndroid Build Coastguard Worker# C support is built-in for now 815*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_LANG_C_enabled], []) 816*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_TAGS], []) 817*663afb9bSAndroid Build Coastguard Worker 818*663afb9bSAndroid Build Coastguard Worker 819*663afb9bSAndroid Build Coastguard Worker# LT_LANG(LANG) 820*663afb9bSAndroid Build Coastguard Worker# ------------- 821*663afb9bSAndroid Build Coastguard Worker# Enable libtool support for the given language if not already enabled. 822*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([LT_LANG], 823*663afb9bSAndroid Build Coastguard Worker[AC_BEFORE([$0], [LT_OUTPUT])dnl 824*663afb9bSAndroid Build Coastguard Workerm4_case([$1], 825*663afb9bSAndroid Build Coastguard Worker [C], [_LT_LANG(C)], 826*663afb9bSAndroid Build Coastguard Worker [C++], [_LT_LANG(CXX)], 827*663afb9bSAndroid Build Coastguard Worker [Go], [_LT_LANG(GO)], 828*663afb9bSAndroid Build Coastguard Worker [Java], [_LT_LANG(GCJ)], 829*663afb9bSAndroid Build Coastguard Worker [Fortran 77], [_LT_LANG(F77)], 830*663afb9bSAndroid Build Coastguard Worker [Fortran], [_LT_LANG(FC)], 831*663afb9bSAndroid Build Coastguard Worker [Windows Resource], [_LT_LANG(RC)], 832*663afb9bSAndroid Build Coastguard Worker [m4_ifdef([_LT_LANG_]$1[_CONFIG], 833*663afb9bSAndroid Build Coastguard Worker [_LT_LANG($1)], 834*663afb9bSAndroid Build Coastguard Worker [m4_fatal([$0: unsupported language: "$1"])])])dnl 835*663afb9bSAndroid Build Coastguard Worker])# LT_LANG 836*663afb9bSAndroid Build Coastguard Worker 837*663afb9bSAndroid Build Coastguard Worker 838*663afb9bSAndroid Build Coastguard Worker# _LT_LANG(LANGNAME) 839*663afb9bSAndroid Build Coastguard Worker# ------------------ 840*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LANG], 841*663afb9bSAndroid Build Coastguard Worker[m4_ifdef([_LT_LANG_]$1[_enabled], [], 842*663afb9bSAndroid Build Coastguard Worker [LT_SUPPORTED_TAG([$1])dnl 843*663afb9bSAndroid Build Coastguard Worker m4_append([_LT_TAGS], [$1 ])dnl 844*663afb9bSAndroid Build Coastguard Worker m4_define([_LT_LANG_]$1[_enabled], [])dnl 845*663afb9bSAndroid Build Coastguard Worker _LT_LANG_$1_CONFIG($1)])dnl 846*663afb9bSAndroid Build Coastguard Worker])# _LT_LANG 847*663afb9bSAndroid Build Coastguard Worker 848*663afb9bSAndroid Build Coastguard Worker 849*663afb9bSAndroid Build Coastguard Workerm4_ifndef([AC_PROG_GO], [ 850*663afb9bSAndroid Build Coastguard Worker############################################################ 851*663afb9bSAndroid Build Coastguard Worker# NOTE: This macro has been submitted for inclusion into # 852*663afb9bSAndroid Build Coastguard Worker# GNU Autoconf as AC_PROG_GO. When it is available in # 853*663afb9bSAndroid Build Coastguard Worker# a released version of Autoconf we should remove this # 854*663afb9bSAndroid Build Coastguard Worker# macro and use it instead. # 855*663afb9bSAndroid Build Coastguard Worker############################################################ 856*663afb9bSAndroid Build Coastguard Workerm4_defun([AC_PROG_GO], 857*663afb9bSAndroid Build Coastguard Worker[AC_LANG_PUSH(Go)dnl 858*663afb9bSAndroid Build Coastguard WorkerAC_ARG_VAR([GOC], [Go compiler command])dnl 859*663afb9bSAndroid Build Coastguard WorkerAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 860*663afb9bSAndroid Build Coastguard Worker_AC_ARG_VAR_LDFLAGS()dnl 861*663afb9bSAndroid Build Coastguard WorkerAC_CHECK_TOOL(GOC, gccgo) 862*663afb9bSAndroid Build Coastguard Workerif test -z "$GOC"; then 863*663afb9bSAndroid Build Coastguard Worker if test -n "$ac_tool_prefix"; then 864*663afb9bSAndroid Build Coastguard Worker AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 865*663afb9bSAndroid Build Coastguard Worker fi 866*663afb9bSAndroid Build Coastguard Workerfi 867*663afb9bSAndroid Build Coastguard Workerif test -z "$GOC"; then 868*663afb9bSAndroid Build Coastguard Worker AC_CHECK_PROG(GOC, gccgo, gccgo, false) 869*663afb9bSAndroid Build Coastguard Workerfi 870*663afb9bSAndroid Build Coastguard Worker])#m4_defun 871*663afb9bSAndroid Build Coastguard Worker])#m4_ifndef 872*663afb9bSAndroid Build Coastguard Worker 873*663afb9bSAndroid Build Coastguard Worker 874*663afb9bSAndroid Build Coastguard Worker# _LT_LANG_DEFAULT_CONFIG 875*663afb9bSAndroid Build Coastguard Worker# ----------------------- 876*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LANG_DEFAULT_CONFIG], 877*663afb9bSAndroid Build Coastguard Worker[AC_PROVIDE_IFELSE([AC_PROG_CXX], 878*663afb9bSAndroid Build Coastguard Worker [LT_LANG(CXX)], 879*663afb9bSAndroid Build Coastguard Worker [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 880*663afb9bSAndroid Build Coastguard Worker 881*663afb9bSAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_F77], 882*663afb9bSAndroid Build Coastguard Worker [LT_LANG(F77)], 883*663afb9bSAndroid Build Coastguard Worker [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 884*663afb9bSAndroid Build Coastguard Worker 885*663afb9bSAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_FC], 886*663afb9bSAndroid Build Coastguard Worker [LT_LANG(FC)], 887*663afb9bSAndroid Build Coastguard Worker [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 888*663afb9bSAndroid Build Coastguard Worker 889*663afb9bSAndroid Build Coastguard Workerdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 890*663afb9bSAndroid Build Coastguard Workerdnl pulling things in needlessly. 891*663afb9bSAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_GCJ], 892*663afb9bSAndroid Build Coastguard Worker [LT_LANG(GCJ)], 893*663afb9bSAndroid Build Coastguard Worker [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 894*663afb9bSAndroid Build Coastguard Worker [LT_LANG(GCJ)], 895*663afb9bSAndroid Build Coastguard Worker [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 896*663afb9bSAndroid Build Coastguard Worker [LT_LANG(GCJ)], 897*663afb9bSAndroid Build Coastguard Worker [m4_ifdef([AC_PROG_GCJ], 898*663afb9bSAndroid Build Coastguard Worker [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 899*663afb9bSAndroid Build Coastguard Worker m4_ifdef([A][M_PROG_GCJ], 900*663afb9bSAndroid Build Coastguard Worker [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 901*663afb9bSAndroid Build Coastguard Worker m4_ifdef([LT_PROG_GCJ], 902*663afb9bSAndroid Build Coastguard Worker [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 903*663afb9bSAndroid Build Coastguard Worker 904*663afb9bSAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([AC_PROG_GO], 905*663afb9bSAndroid Build Coastguard Worker [LT_LANG(GO)], 906*663afb9bSAndroid Build Coastguard Worker [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 907*663afb9bSAndroid Build Coastguard Worker 908*663afb9bSAndroid Build Coastguard WorkerAC_PROVIDE_IFELSE([LT_PROG_RC], 909*663afb9bSAndroid Build Coastguard Worker [LT_LANG(RC)], 910*663afb9bSAndroid Build Coastguard Worker [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 911*663afb9bSAndroid Build Coastguard Worker])# _LT_LANG_DEFAULT_CONFIG 912*663afb9bSAndroid Build Coastguard Worker 913*663afb9bSAndroid Build Coastguard Worker# Obsolete macros: 914*663afb9bSAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 915*663afb9bSAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 916*663afb9bSAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 917*663afb9bSAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 918*663afb9bSAndroid Build Coastguard WorkerAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 919*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 920*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 921*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_F77], []) 922*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_FC], []) 923*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 924*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_RC], []) 925*663afb9bSAndroid Build Coastguard Worker 926*663afb9bSAndroid Build Coastguard Worker 927*663afb9bSAndroid Build Coastguard Worker# _LT_TAG_COMPILER 928*663afb9bSAndroid Build Coastguard Worker# ---------------- 929*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_TAG_COMPILER], 930*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_CC])dnl 931*663afb9bSAndroid Build Coastguard Worker 932*663afb9bSAndroid Build Coastguard Worker_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 933*663afb9bSAndroid Build Coastguard Worker_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 934*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 935*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 936*663afb9bSAndroid Build Coastguard Worker 937*663afb9bSAndroid Build Coastguard Worker# If no C compiler was specified, use CC. 938*663afb9bSAndroid Build Coastguard WorkerLTCC=${LTCC-"$CC"} 939*663afb9bSAndroid Build Coastguard Worker 940*663afb9bSAndroid Build Coastguard Worker# If no C compiler flags were specified, use CFLAGS. 941*663afb9bSAndroid Build Coastguard WorkerLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 942*663afb9bSAndroid Build Coastguard Worker 943*663afb9bSAndroid Build Coastguard Worker# Allow CC to be a program name with arguments. 944*663afb9bSAndroid Build Coastguard Workercompiler=$CC 945*663afb9bSAndroid Build Coastguard Worker])# _LT_TAG_COMPILER 946*663afb9bSAndroid Build Coastguard Worker 947*663afb9bSAndroid Build Coastguard Worker 948*663afb9bSAndroid Build Coastguard Worker# _LT_COMPILER_BOILERPLATE 949*663afb9bSAndroid Build Coastguard Worker# ------------------------ 950*663afb9bSAndroid Build Coastguard Worker# Check for compiler boilerplate output or warnings with 951*663afb9bSAndroid Build Coastguard Worker# the simple compiler test code. 952*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_BOILERPLATE], 953*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl 954*663afb9bSAndroid Build Coastguard Workerac_outfile=conftest.$ac_objext 955*663afb9bSAndroid Build Coastguard Workerecho "$lt_simple_compile_test_code" >conftest.$ac_ext 956*663afb9bSAndroid Build Coastguard Workereval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 957*663afb9bSAndroid Build Coastguard Worker_lt_compiler_boilerplate=`cat conftest.err` 958*663afb9bSAndroid Build Coastguard Worker$RM conftest* 959*663afb9bSAndroid Build Coastguard Worker])# _LT_COMPILER_BOILERPLATE 960*663afb9bSAndroid Build Coastguard Worker 961*663afb9bSAndroid Build Coastguard Worker 962*663afb9bSAndroid Build Coastguard Worker# _LT_LINKER_BOILERPLATE 963*663afb9bSAndroid Build Coastguard Worker# ---------------------- 964*663afb9bSAndroid Build Coastguard Worker# Check for linker boilerplate output or warnings with 965*663afb9bSAndroid Build Coastguard Worker# the simple link test code. 966*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LINKER_BOILERPLATE], 967*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl 968*663afb9bSAndroid Build Coastguard Workerac_outfile=conftest.$ac_objext 969*663afb9bSAndroid Build Coastguard Workerecho "$lt_simple_link_test_code" >conftest.$ac_ext 970*663afb9bSAndroid Build Coastguard Workereval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 971*663afb9bSAndroid Build Coastguard Worker_lt_linker_boilerplate=`cat conftest.err` 972*663afb9bSAndroid Build Coastguard Worker$RM -r conftest* 973*663afb9bSAndroid Build Coastguard Worker])# _LT_LINKER_BOILERPLATE 974*663afb9bSAndroid Build Coastguard Worker 975*663afb9bSAndroid Build Coastguard Worker# _LT_REQUIRED_DARWIN_CHECKS 976*663afb9bSAndroid Build Coastguard Worker# ------------------------- 977*663afb9bSAndroid Build Coastguard Workerm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 978*663afb9bSAndroid Build Coastguard Worker case $host_os in 979*663afb9bSAndroid Build Coastguard Worker rhapsody* | darwin*) 980*663afb9bSAndroid Build Coastguard Worker AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 981*663afb9bSAndroid Build Coastguard Worker AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 982*663afb9bSAndroid Build Coastguard Worker AC_CHECK_TOOL([LIPO], [lipo], [:]) 983*663afb9bSAndroid Build Coastguard Worker AC_CHECK_TOOL([OTOOL], [otool], [:]) 984*663afb9bSAndroid Build Coastguard Worker AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 985*663afb9bSAndroid Build Coastguard Worker _LT_DECL([], [DSYMUTIL], [1], 986*663afb9bSAndroid Build Coastguard Worker [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 987*663afb9bSAndroid Build Coastguard Worker _LT_DECL([], [NMEDIT], [1], 988*663afb9bSAndroid Build Coastguard Worker [Tool to change global to local symbols on Mac OS X]) 989*663afb9bSAndroid Build Coastguard Worker _LT_DECL([], [LIPO], [1], 990*663afb9bSAndroid Build Coastguard Worker [Tool to manipulate fat objects and archives on Mac OS X]) 991*663afb9bSAndroid Build Coastguard Worker _LT_DECL([], [OTOOL], [1], 992*663afb9bSAndroid Build Coastguard Worker [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 993*663afb9bSAndroid Build Coastguard Worker _LT_DECL([], [OTOOL64], [1], 994*663afb9bSAndroid Build Coastguard Worker [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 995*663afb9bSAndroid Build Coastguard Worker 996*663afb9bSAndroid Build Coastguard Worker AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 997*663afb9bSAndroid Build Coastguard Worker [lt_cv_apple_cc_single_mod=no 998*663afb9bSAndroid Build Coastguard Worker if test -z "$LT_MULTI_MODULE"; then 999*663afb9bSAndroid Build Coastguard Worker # By default we will add the -single_module flag. You can override 1000*663afb9bSAndroid Build Coastguard Worker # by either setting the environment variable LT_MULTI_MODULE 1001*663afb9bSAndroid Build Coastguard Worker # non-empty at configure time, or by adding -multi_module to the 1002*663afb9bSAndroid Build Coastguard Worker # link flags. 1003*663afb9bSAndroid Build Coastguard Worker rm -rf libconftest.dylib* 1004*663afb9bSAndroid Build Coastguard Worker echo "int foo(void){return 1;}" > conftest.c 1005*663afb9bSAndroid Build Coastguard Worker echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1006*663afb9bSAndroid Build Coastguard Worker-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1007*663afb9bSAndroid Build Coastguard Worker $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1008*663afb9bSAndroid Build Coastguard Worker -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1009*663afb9bSAndroid Build Coastguard Worker _lt_result=$? 1010*663afb9bSAndroid Build Coastguard Worker # If there is a non-empty error log, and "single_module" 1011*663afb9bSAndroid Build Coastguard Worker # appears in it, assume the flag caused a linker warning 1012*663afb9bSAndroid Build Coastguard Worker if test -s conftest.err && $GREP single_module conftest.err; then 1013*663afb9bSAndroid Build Coastguard Worker cat conftest.err >&AS_MESSAGE_LOG_FD 1014*663afb9bSAndroid Build Coastguard Worker # Otherwise, if the output was created with a 0 exit code from 1015*663afb9bSAndroid Build Coastguard Worker # the compiler, it worked. 1016*663afb9bSAndroid Build Coastguard Worker elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1017*663afb9bSAndroid Build Coastguard Worker lt_cv_apple_cc_single_mod=yes 1018*663afb9bSAndroid Build Coastguard Worker else 1019*663afb9bSAndroid Build Coastguard Worker cat conftest.err >&AS_MESSAGE_LOG_FD 1020*663afb9bSAndroid Build Coastguard Worker fi 1021*663afb9bSAndroid Build Coastguard Worker rm -rf libconftest.dylib* 1022*663afb9bSAndroid Build Coastguard Worker rm -f conftest.* 1023*663afb9bSAndroid Build Coastguard Worker fi]) 1024*663afb9bSAndroid Build Coastguard Worker 1025*663afb9bSAndroid Build Coastguard Worker AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1026*663afb9bSAndroid Build Coastguard Worker [lt_cv_ld_exported_symbols_list], 1027*663afb9bSAndroid Build Coastguard Worker [lt_cv_ld_exported_symbols_list=no 1028*663afb9bSAndroid Build Coastguard Worker save_LDFLAGS=$LDFLAGS 1029*663afb9bSAndroid Build Coastguard Worker echo "_main" > conftest.sym 1030*663afb9bSAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1031*663afb9bSAndroid Build Coastguard Worker AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1032*663afb9bSAndroid Build Coastguard Worker [lt_cv_ld_exported_symbols_list=yes], 1033*663afb9bSAndroid Build Coastguard Worker [lt_cv_ld_exported_symbols_list=no]) 1034*663afb9bSAndroid Build Coastguard Worker LDFLAGS=$save_LDFLAGS 1035*663afb9bSAndroid Build Coastguard Worker ]) 1036*663afb9bSAndroid Build Coastguard Worker 1037*663afb9bSAndroid Build Coastguard Worker AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1038*663afb9bSAndroid Build Coastguard Worker [lt_cv_ld_force_load=no 1039*663afb9bSAndroid Build Coastguard Worker cat > conftest.c << _LT_EOF 1040*663afb9bSAndroid Build Coastguard Workerint forced_loaded() { return 2;} 1041*663afb9bSAndroid Build Coastguard Worker_LT_EOF 1042*663afb9bSAndroid Build Coastguard Worker echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1043*663afb9bSAndroid Build Coastguard Worker $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1044*663afb9bSAndroid Build Coastguard Worker echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1045*663afb9bSAndroid Build Coastguard Worker $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1046*663afb9bSAndroid Build Coastguard Worker echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1047*663afb9bSAndroid Build Coastguard Worker $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1048*663afb9bSAndroid Build Coastguard Worker cat > conftest.c << _LT_EOF 1049*663afb9bSAndroid Build Coastguard Workerint main() { return 0;} 1050*663afb9bSAndroid Build Coastguard Worker_LT_EOF 1051*663afb9bSAndroid Build Coastguard Worker echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1052*663afb9bSAndroid Build Coastguard Worker $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1053*663afb9bSAndroid Build Coastguard Worker _lt_result=$? 1054*663afb9bSAndroid Build Coastguard Worker if test -s conftest.err && $GREP force_load conftest.err; then 1055*663afb9bSAndroid Build Coastguard Worker cat conftest.err >&AS_MESSAGE_LOG_FD 1056*663afb9bSAndroid Build Coastguard Worker elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1057*663afb9bSAndroid Build Coastguard Worker lt_cv_ld_force_load=yes 1058*663afb9bSAndroid Build Coastguard Worker else 1059*663afb9bSAndroid Build Coastguard Worker cat conftest.err >&AS_MESSAGE_LOG_FD 1060*663afb9bSAndroid Build Coastguard Worker fi 1061*663afb9bSAndroid Build Coastguard Worker rm -f conftest.err libconftest.a conftest conftest.c 1062*663afb9bSAndroid Build Coastguard Worker rm -rf conftest.dSYM 1063*663afb9bSAndroid Build Coastguard Worker ]) 1064*663afb9bSAndroid Build Coastguard Worker case $host_os in 1065*663afb9bSAndroid Build Coastguard Worker rhapsody* | darwin1.[[012]]) 1066*663afb9bSAndroid Build Coastguard Worker _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1067*663afb9bSAndroid Build Coastguard Worker darwin1.*) 1068*663afb9bSAndroid Build Coastguard Worker _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1069*663afb9bSAndroid Build Coastguard Worker darwin*) # darwin 5.x on 1070*663afb9bSAndroid Build Coastguard Worker # if running on 10.5 or later, the deployment target defaults 1071*663afb9bSAndroid Build Coastguard Worker # to the OS version, if on x86, and 10.4, the deployment 1072*663afb9bSAndroid Build Coastguard Worker # target defaults to 10.4. Don't you love it? 1073*663afb9bSAndroid Build Coastguard Worker case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1074*663afb9bSAndroid Build Coastguard Worker 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1075*663afb9bSAndroid Build Coastguard Worker _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1076*663afb9bSAndroid Build Coastguard Worker 10.[[012]][[,.]]*) 1077*663afb9bSAndroid Build Coastguard Worker _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1078*663afb9bSAndroid Build Coastguard Worker 10.*) 1079*663afb9bSAndroid Build Coastguard Worker _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1080*663afb9bSAndroid Build Coastguard Worker esac 1081*663afb9bSAndroid Build Coastguard Worker ;; 1082*663afb9bSAndroid Build Coastguard Worker esac 1083*663afb9bSAndroid Build Coastguard Worker if test yes = "$lt_cv_apple_cc_single_mod"; then 1084*663afb9bSAndroid Build Coastguard Worker _lt_dar_single_mod='$single_module' 1085*663afb9bSAndroid Build Coastguard Worker fi 1086*663afb9bSAndroid Build Coastguard Worker if test yes = "$lt_cv_ld_exported_symbols_list"; then 1087*663afb9bSAndroid Build Coastguard Worker _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1088*663afb9bSAndroid Build Coastguard Worker else 1089*663afb9bSAndroid Build Coastguard Worker _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1090*663afb9bSAndroid Build Coastguard Worker fi 1091*663afb9bSAndroid Build Coastguard Worker if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1092*663afb9bSAndroid Build Coastguard Worker _lt_dsymutil='~$DSYMUTIL $lib || :' 1093*663afb9bSAndroid Build Coastguard Worker else 1094*663afb9bSAndroid Build Coastguard Worker _lt_dsymutil= 1095*663afb9bSAndroid Build Coastguard Worker fi 1096*663afb9bSAndroid Build Coastguard Worker ;; 1097*663afb9bSAndroid Build Coastguard Worker esac 1098*663afb9bSAndroid Build Coastguard Worker]) 1099*663afb9bSAndroid Build Coastguard Worker 1100*663afb9bSAndroid Build Coastguard Worker 1101*663afb9bSAndroid Build Coastguard Worker# _LT_DARWIN_LINKER_FEATURES([TAG]) 1102*663afb9bSAndroid Build Coastguard Worker# --------------------------------- 1103*663afb9bSAndroid Build Coastguard Worker# Checks for linker and compiler features on darwin 1104*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_DARWIN_LINKER_FEATURES], 1105*663afb9bSAndroid Build Coastguard Worker[ 1106*663afb9bSAndroid Build Coastguard Worker m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1107*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1108*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=no 1109*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_automatic, $1)=yes 1110*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1111*663afb9bSAndroid Build Coastguard Worker if test yes = "$lt_cv_ld_force_load"; then 1112*663afb9bSAndroid Build Coastguard Worker _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\"`' 1113*663afb9bSAndroid Build Coastguard Worker m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1114*663afb9bSAndroid Build Coastguard Worker [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1115*663afb9bSAndroid Build Coastguard Worker else 1116*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1117*663afb9bSAndroid Build Coastguard Worker fi 1118*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(link_all_deplibs, $1)=yes 1119*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1120*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 1121*663afb9bSAndroid Build Coastguard Worker ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1122*663afb9bSAndroid Build Coastguard Worker *) _lt_dar_can_shared=$GCC ;; 1123*663afb9bSAndroid Build Coastguard Worker esac 1124*663afb9bSAndroid Build Coastguard Worker if test yes = "$_lt_dar_can_shared"; then 1125*663afb9bSAndroid Build Coastguard Worker output_verbose_link_cmd=func_echo_all 1126*663afb9bSAndroid Build Coastguard Worker _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" 1127*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1128*663afb9bSAndroid Build Coastguard Worker _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" 1129*663afb9bSAndroid Build Coastguard Worker _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" 1130*663afb9bSAndroid Build Coastguard Worker m4_if([$1], [CXX], 1131*663afb9bSAndroid Build Coastguard Worker[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1132*663afb9bSAndroid Build Coastguard Worker _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" 1133*663afb9bSAndroid Build Coastguard Worker _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" 1134*663afb9bSAndroid Build Coastguard Worker fi 1135*663afb9bSAndroid Build Coastguard Worker],[]) 1136*663afb9bSAndroid Build Coastguard Worker else 1137*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 1138*663afb9bSAndroid Build Coastguard Worker fi 1139*663afb9bSAndroid Build Coastguard Worker]) 1140*663afb9bSAndroid Build Coastguard Worker 1141*663afb9bSAndroid Build Coastguard Worker# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1142*663afb9bSAndroid Build Coastguard Worker# ---------------------------------- 1143*663afb9bSAndroid Build Coastguard Worker# Links a minimal program and checks the executable 1144*663afb9bSAndroid Build Coastguard Worker# for the system default hardcoded library path. In most cases, 1145*663afb9bSAndroid Build Coastguard Worker# this is /usr/lib:/lib, but when the MPI compilers are used 1146*663afb9bSAndroid Build Coastguard Worker# the location of the communication and MPI libs are included too. 1147*663afb9bSAndroid Build Coastguard Worker# If we don't find anything, use the default library path according 1148*663afb9bSAndroid Build Coastguard Worker# to the aix ld manual. 1149*663afb9bSAndroid Build Coastguard Worker# Store the results from the different compilers for each TAGNAME. 1150*663afb9bSAndroid Build Coastguard Worker# Allow to override them for all tags through lt_cv_aix_libpath. 1151*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_SYS_MODULE_PATH_AIX], 1152*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl 1153*663afb9bSAndroid Build Coastguard Workerif test set = "${lt_cv_aix_libpath+set}"; then 1154*663afb9bSAndroid Build Coastguard Worker aix_libpath=$lt_cv_aix_libpath 1155*663afb9bSAndroid Build Coastguard Workerelse 1156*663afb9bSAndroid Build Coastguard Worker AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1157*663afb9bSAndroid Build Coastguard Worker [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1158*663afb9bSAndroid Build Coastguard Worker lt_aix_libpath_sed='[ 1159*663afb9bSAndroid Build Coastguard Worker /Import File Strings/,/^$/ { 1160*663afb9bSAndroid Build Coastguard Worker /^0/ { 1161*663afb9bSAndroid Build Coastguard Worker s/^0 *\([^ ]*\) *$/\1/ 1162*663afb9bSAndroid Build Coastguard Worker p 1163*663afb9bSAndroid Build Coastguard Worker } 1164*663afb9bSAndroid Build Coastguard Worker }]' 1165*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1166*663afb9bSAndroid Build Coastguard Worker # Check for a 64-bit object if we didn't find anything. 1167*663afb9bSAndroid Build Coastguard Worker if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1168*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1169*663afb9bSAndroid Build Coastguard Worker fi],[]) 1170*663afb9bSAndroid Build Coastguard Worker if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1171*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1172*663afb9bSAndroid Build Coastguard Worker fi 1173*663afb9bSAndroid Build Coastguard Worker ]) 1174*663afb9bSAndroid Build Coastguard Worker aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1175*663afb9bSAndroid Build Coastguard Workerfi 1176*663afb9bSAndroid Build Coastguard Worker])# _LT_SYS_MODULE_PATH_AIX 1177*663afb9bSAndroid Build Coastguard Worker 1178*663afb9bSAndroid Build Coastguard Worker 1179*663afb9bSAndroid Build Coastguard Worker# _LT_SHELL_INIT(ARG) 1180*663afb9bSAndroid Build Coastguard Worker# ------------------- 1181*663afb9bSAndroid Build Coastguard Workerm4_define([_LT_SHELL_INIT], 1182*663afb9bSAndroid Build Coastguard Worker[m4_divert_text([M4SH-INIT], [$1 1183*663afb9bSAndroid Build Coastguard Worker])])# _LT_SHELL_INIT 1184*663afb9bSAndroid Build Coastguard Worker 1185*663afb9bSAndroid Build Coastguard Worker 1186*663afb9bSAndroid Build Coastguard Worker 1187*663afb9bSAndroid Build Coastguard Worker# _LT_PROG_ECHO_BACKSLASH 1188*663afb9bSAndroid Build Coastguard Worker# ----------------------- 1189*663afb9bSAndroid Build Coastguard Worker# Find how we can fake an echo command that does not interpret backslash. 1190*663afb9bSAndroid Build Coastguard Worker# In particular, with Autoconf 2.60 or later we add some code to the start 1191*663afb9bSAndroid Build Coastguard Worker# of the generated configure script that will find a shell with a builtin 1192*663afb9bSAndroid Build Coastguard Worker# printf (that we can use as an echo command). 1193*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_PROG_ECHO_BACKSLASH], 1194*663afb9bSAndroid Build Coastguard Worker[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1195*663afb9bSAndroid Build Coastguard WorkerECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1196*663afb9bSAndroid Build Coastguard WorkerECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1197*663afb9bSAndroid Build Coastguard Worker 1198*663afb9bSAndroid Build Coastguard WorkerAC_MSG_CHECKING([how to print strings]) 1199*663afb9bSAndroid Build Coastguard Worker# Test print first, because it will be a builtin if present. 1200*663afb9bSAndroid Build Coastguard Workerif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1201*663afb9bSAndroid Build Coastguard Worker test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1202*663afb9bSAndroid Build Coastguard Worker ECHO='print -r --' 1203*663afb9bSAndroid Build Coastguard Workerelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1204*663afb9bSAndroid Build Coastguard Worker ECHO='printf %s\n' 1205*663afb9bSAndroid Build Coastguard Workerelse 1206*663afb9bSAndroid Build Coastguard Worker # Use this function as a fallback that always works. 1207*663afb9bSAndroid Build Coastguard Worker func_fallback_echo () 1208*663afb9bSAndroid Build Coastguard Worker { 1209*663afb9bSAndroid Build Coastguard Worker eval 'cat <<_LTECHO_EOF 1210*663afb9bSAndroid Build Coastguard Worker$[]1 1211*663afb9bSAndroid Build Coastguard Worker_LTECHO_EOF' 1212*663afb9bSAndroid Build Coastguard Worker } 1213*663afb9bSAndroid Build Coastguard Worker ECHO='func_fallback_echo' 1214*663afb9bSAndroid Build Coastguard Workerfi 1215*663afb9bSAndroid Build Coastguard Worker 1216*663afb9bSAndroid Build Coastguard Worker# func_echo_all arg... 1217*663afb9bSAndroid Build Coastguard Worker# Invoke $ECHO with all args, space-separated. 1218*663afb9bSAndroid Build Coastguard Workerfunc_echo_all () 1219*663afb9bSAndroid Build Coastguard Worker{ 1220*663afb9bSAndroid Build Coastguard Worker $ECHO "$*" 1221*663afb9bSAndroid Build Coastguard Worker} 1222*663afb9bSAndroid Build Coastguard Worker 1223*663afb9bSAndroid Build Coastguard Workercase $ECHO in 1224*663afb9bSAndroid Build Coastguard Worker printf*) AC_MSG_RESULT([printf]) ;; 1225*663afb9bSAndroid Build Coastguard Worker print*) AC_MSG_RESULT([print -r]) ;; 1226*663afb9bSAndroid Build Coastguard Worker *) AC_MSG_RESULT([cat]) ;; 1227*663afb9bSAndroid Build Coastguard Workeresac 1228*663afb9bSAndroid Build Coastguard Worker 1229*663afb9bSAndroid Build Coastguard Workerm4_ifdef([_AS_DETECT_SUGGESTED], 1230*663afb9bSAndroid Build Coastguard Worker[_AS_DETECT_SUGGESTED([ 1231*663afb9bSAndroid Build Coastguard Worker test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1232*663afb9bSAndroid Build Coastguard Worker ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1233*663afb9bSAndroid Build Coastguard Worker ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1234*663afb9bSAndroid Build Coastguard Worker ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1235*663afb9bSAndroid Build Coastguard Worker PATH=/empty FPATH=/empty; export PATH FPATH 1236*663afb9bSAndroid Build Coastguard Worker test "X`printf %s $ECHO`" = "X$ECHO" \ 1237*663afb9bSAndroid Build Coastguard Worker || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1238*663afb9bSAndroid Build Coastguard Worker 1239*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1240*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1241*663afb9bSAndroid Build Coastguard Worker])# _LT_PROG_ECHO_BACKSLASH 1242*663afb9bSAndroid Build Coastguard Worker 1243*663afb9bSAndroid Build Coastguard Worker 1244*663afb9bSAndroid Build Coastguard Worker# _LT_WITH_SYSROOT 1245*663afb9bSAndroid Build Coastguard Worker# ---------------- 1246*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([_LT_WITH_SYSROOT], 1247*663afb9bSAndroid Build Coastguard Worker[AC_MSG_CHECKING([for sysroot]) 1248*663afb9bSAndroid Build Coastguard WorkerAC_ARG_WITH([sysroot], 1249*663afb9bSAndroid Build Coastguard Worker[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1250*663afb9bSAndroid Build Coastguard Worker [Search for dependent libraries within DIR (or the compiler's sysroot 1251*663afb9bSAndroid Build Coastguard Worker if not specified).])], 1252*663afb9bSAndroid Build Coastguard Worker[], [with_sysroot=no]) 1253*663afb9bSAndroid Build Coastguard Worker 1254*663afb9bSAndroid Build Coastguard Workerdnl lt_sysroot will always be passed unquoted. We quote it here 1255*663afb9bSAndroid Build Coastguard Workerdnl in case the user passed a directory name. 1256*663afb9bSAndroid Build Coastguard Workerlt_sysroot= 1257*663afb9bSAndroid Build Coastguard Workercase $with_sysroot in #( 1258*663afb9bSAndroid Build Coastguard Worker yes) 1259*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC"; then 1260*663afb9bSAndroid Build Coastguard Worker lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1261*663afb9bSAndroid Build Coastguard Worker fi 1262*663afb9bSAndroid Build Coastguard Worker ;; #( 1263*663afb9bSAndroid Build Coastguard Worker /*) 1264*663afb9bSAndroid Build Coastguard Worker lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1265*663afb9bSAndroid Build Coastguard Worker ;; #( 1266*663afb9bSAndroid Build Coastguard Worker no|'') 1267*663afb9bSAndroid Build Coastguard Worker ;; #( 1268*663afb9bSAndroid Build Coastguard Worker *) 1269*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([$with_sysroot]) 1270*663afb9bSAndroid Build Coastguard Worker AC_MSG_ERROR([The sysroot must be an absolute path.]) 1271*663afb9bSAndroid Build Coastguard Worker ;; 1272*663afb9bSAndroid Build Coastguard Workeresac 1273*663afb9bSAndroid Build Coastguard Worker 1274*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([${lt_sysroot:-no}]) 1275*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1276*663afb9bSAndroid Build Coastguard Worker[dependent libraries, and where our libraries should be installed.])]) 1277*663afb9bSAndroid Build Coastguard Worker 1278*663afb9bSAndroid Build Coastguard Worker# _LT_ENABLE_LOCK 1279*663afb9bSAndroid Build Coastguard Worker# --------------- 1280*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_ENABLE_LOCK], 1281*663afb9bSAndroid Build Coastguard Worker[AC_ARG_ENABLE([libtool-lock], 1282*663afb9bSAndroid Build Coastguard Worker [AS_HELP_STRING([--disable-libtool-lock], 1283*663afb9bSAndroid Build Coastguard Worker [avoid locking (might break parallel builds)])]) 1284*663afb9bSAndroid Build Coastguard Workertest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1285*663afb9bSAndroid Build Coastguard Worker 1286*663afb9bSAndroid Build Coastguard Worker# Some flags need to be propagated to the compiler or linker for good 1287*663afb9bSAndroid Build Coastguard Worker# libtool support. 1288*663afb9bSAndroid Build Coastguard Workercase $host in 1289*663afb9bSAndroid Build Coastguard Workeria64-*-hpux*) 1290*663afb9bSAndroid Build Coastguard Worker # Find out what ABI is being produced by ac_compile, and set mode 1291*663afb9bSAndroid Build Coastguard Worker # options accordingly. 1292*663afb9bSAndroid Build Coastguard Worker echo 'int i;' > conftest.$ac_ext 1293*663afb9bSAndroid Build Coastguard Worker if AC_TRY_EVAL(ac_compile); then 1294*663afb9bSAndroid Build Coastguard Worker case `/usr/bin/file conftest.$ac_objext` in 1295*663afb9bSAndroid Build Coastguard Worker *ELF-32*) 1296*663afb9bSAndroid Build Coastguard Worker HPUX_IA64_MODE=32 1297*663afb9bSAndroid Build Coastguard Worker ;; 1298*663afb9bSAndroid Build Coastguard Worker *ELF-64*) 1299*663afb9bSAndroid Build Coastguard Worker HPUX_IA64_MODE=64 1300*663afb9bSAndroid Build Coastguard Worker ;; 1301*663afb9bSAndroid Build Coastguard Worker esac 1302*663afb9bSAndroid Build Coastguard Worker fi 1303*663afb9bSAndroid Build Coastguard Worker rm -rf conftest* 1304*663afb9bSAndroid Build Coastguard Worker ;; 1305*663afb9bSAndroid Build Coastguard Worker*-*-irix6*) 1306*663afb9bSAndroid Build Coastguard Worker # Find out what ABI is being produced by ac_compile, and set linker 1307*663afb9bSAndroid Build Coastguard Worker # options accordingly. 1308*663afb9bSAndroid Build Coastguard Worker echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1309*663afb9bSAndroid Build Coastguard Worker if AC_TRY_EVAL(ac_compile); then 1310*663afb9bSAndroid Build Coastguard Worker if test yes = "$lt_cv_prog_gnu_ld"; then 1311*663afb9bSAndroid Build Coastguard Worker case `/usr/bin/file conftest.$ac_objext` in 1312*663afb9bSAndroid Build Coastguard Worker *32-bit*) 1313*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -melf32bsmip" 1314*663afb9bSAndroid Build Coastguard Worker ;; 1315*663afb9bSAndroid Build Coastguard Worker *N32*) 1316*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -melf32bmipn32" 1317*663afb9bSAndroid Build Coastguard Worker ;; 1318*663afb9bSAndroid Build Coastguard Worker *64-bit*) 1319*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -melf64bmip" 1320*663afb9bSAndroid Build Coastguard Worker ;; 1321*663afb9bSAndroid Build Coastguard Worker esac 1322*663afb9bSAndroid Build Coastguard Worker else 1323*663afb9bSAndroid Build Coastguard Worker case `/usr/bin/file conftest.$ac_objext` in 1324*663afb9bSAndroid Build Coastguard Worker *32-bit*) 1325*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -32" 1326*663afb9bSAndroid Build Coastguard Worker ;; 1327*663afb9bSAndroid Build Coastguard Worker *N32*) 1328*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -n32" 1329*663afb9bSAndroid Build Coastguard Worker ;; 1330*663afb9bSAndroid Build Coastguard Worker *64-bit*) 1331*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -64" 1332*663afb9bSAndroid Build Coastguard Worker ;; 1333*663afb9bSAndroid Build Coastguard Worker esac 1334*663afb9bSAndroid Build Coastguard Worker fi 1335*663afb9bSAndroid Build Coastguard Worker fi 1336*663afb9bSAndroid Build Coastguard Worker rm -rf conftest* 1337*663afb9bSAndroid Build Coastguard Worker ;; 1338*663afb9bSAndroid Build Coastguard Worker 1339*663afb9bSAndroid Build Coastguard Workermips64*-*linux*) 1340*663afb9bSAndroid Build Coastguard Worker # Find out what ABI is being produced by ac_compile, and set linker 1341*663afb9bSAndroid Build Coastguard Worker # options accordingly. 1342*663afb9bSAndroid Build Coastguard Worker echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1343*663afb9bSAndroid Build Coastguard Worker if AC_TRY_EVAL(ac_compile); then 1344*663afb9bSAndroid Build Coastguard Worker emul=elf 1345*663afb9bSAndroid Build Coastguard Worker case `/usr/bin/file conftest.$ac_objext` in 1346*663afb9bSAndroid Build Coastguard Worker *32-bit*) 1347*663afb9bSAndroid Build Coastguard Worker emul="${emul}32" 1348*663afb9bSAndroid Build Coastguard Worker ;; 1349*663afb9bSAndroid Build Coastguard Worker *64-bit*) 1350*663afb9bSAndroid Build Coastguard Worker emul="${emul}64" 1351*663afb9bSAndroid Build Coastguard Worker ;; 1352*663afb9bSAndroid Build Coastguard Worker esac 1353*663afb9bSAndroid Build Coastguard Worker case `/usr/bin/file conftest.$ac_objext` in 1354*663afb9bSAndroid Build Coastguard Worker *MSB*) 1355*663afb9bSAndroid Build Coastguard Worker emul="${emul}btsmip" 1356*663afb9bSAndroid Build Coastguard Worker ;; 1357*663afb9bSAndroid Build Coastguard Worker *LSB*) 1358*663afb9bSAndroid Build Coastguard Worker emul="${emul}ltsmip" 1359*663afb9bSAndroid Build Coastguard Worker ;; 1360*663afb9bSAndroid Build Coastguard Worker esac 1361*663afb9bSAndroid Build Coastguard Worker case `/usr/bin/file conftest.$ac_objext` in 1362*663afb9bSAndroid Build Coastguard Worker *N32*) 1363*663afb9bSAndroid Build Coastguard Worker emul="${emul}n32" 1364*663afb9bSAndroid Build Coastguard Worker ;; 1365*663afb9bSAndroid Build Coastguard Worker esac 1366*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m $emul" 1367*663afb9bSAndroid Build Coastguard Worker fi 1368*663afb9bSAndroid Build Coastguard Worker rm -rf conftest* 1369*663afb9bSAndroid Build Coastguard Worker ;; 1370*663afb9bSAndroid Build Coastguard Worker 1371*663afb9bSAndroid Build Coastguard Workerx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1372*663afb9bSAndroid Build Coastguard Workers390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1373*663afb9bSAndroid Build Coastguard Worker # Find out what ABI is being produced by ac_compile, and set linker 1374*663afb9bSAndroid Build Coastguard Worker # options accordingly. Note that the listed cases only cover the 1375*663afb9bSAndroid Build Coastguard Worker # situations where additional linker options are needed (such as when 1376*663afb9bSAndroid Build Coastguard Worker # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1377*663afb9bSAndroid Build Coastguard Worker # vice versa); the common cases where no linker options are needed do 1378*663afb9bSAndroid Build Coastguard Worker # not appear in the list. 1379*663afb9bSAndroid Build Coastguard Worker echo 'int i;' > conftest.$ac_ext 1380*663afb9bSAndroid Build Coastguard Worker if AC_TRY_EVAL(ac_compile); then 1381*663afb9bSAndroid Build Coastguard Worker case `/usr/bin/file conftest.o` in 1382*663afb9bSAndroid Build Coastguard Worker *32-bit*) 1383*663afb9bSAndroid Build Coastguard Worker case $host in 1384*663afb9bSAndroid Build Coastguard Worker x86_64-*kfreebsd*-gnu) 1385*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf_i386_fbsd" 1386*663afb9bSAndroid Build Coastguard Worker ;; 1387*663afb9bSAndroid Build Coastguard Worker x86_64-*linux*) 1388*663afb9bSAndroid Build Coastguard Worker case `/usr/bin/file conftest.o` in 1389*663afb9bSAndroid Build Coastguard Worker *x86-64*) 1390*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf32_x86_64" 1391*663afb9bSAndroid Build Coastguard Worker ;; 1392*663afb9bSAndroid Build Coastguard Worker *) 1393*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf_i386" 1394*663afb9bSAndroid Build Coastguard Worker ;; 1395*663afb9bSAndroid Build Coastguard Worker esac 1396*663afb9bSAndroid Build Coastguard Worker ;; 1397*663afb9bSAndroid Build Coastguard Worker powerpc64le-*linux*) 1398*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf32lppclinux" 1399*663afb9bSAndroid Build Coastguard Worker ;; 1400*663afb9bSAndroid Build Coastguard Worker powerpc64-*linux*) 1401*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf32ppclinux" 1402*663afb9bSAndroid Build Coastguard Worker ;; 1403*663afb9bSAndroid Build Coastguard Worker s390x-*linux*) 1404*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf_s390" 1405*663afb9bSAndroid Build Coastguard Worker ;; 1406*663afb9bSAndroid Build Coastguard Worker sparc64-*linux*) 1407*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf32_sparc" 1408*663afb9bSAndroid Build Coastguard Worker ;; 1409*663afb9bSAndroid Build Coastguard Worker esac 1410*663afb9bSAndroid Build Coastguard Worker ;; 1411*663afb9bSAndroid Build Coastguard Worker *64-bit*) 1412*663afb9bSAndroid Build Coastguard Worker case $host in 1413*663afb9bSAndroid Build Coastguard Worker x86_64-*kfreebsd*-gnu) 1414*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf_x86_64_fbsd" 1415*663afb9bSAndroid Build Coastguard Worker ;; 1416*663afb9bSAndroid Build Coastguard Worker x86_64-*linux*) 1417*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf_x86_64" 1418*663afb9bSAndroid Build Coastguard Worker ;; 1419*663afb9bSAndroid Build Coastguard Worker powerpcle-*linux*) 1420*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf64lppc" 1421*663afb9bSAndroid Build Coastguard Worker ;; 1422*663afb9bSAndroid Build Coastguard Worker powerpc-*linux*) 1423*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf64ppc" 1424*663afb9bSAndroid Build Coastguard Worker ;; 1425*663afb9bSAndroid Build Coastguard Worker s390*-*linux*|s390*-*tpf*) 1426*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf64_s390" 1427*663afb9bSAndroid Build Coastguard Worker ;; 1428*663afb9bSAndroid Build Coastguard Worker sparc*-*linux*) 1429*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf64_sparc" 1430*663afb9bSAndroid Build Coastguard Worker ;; 1431*663afb9bSAndroid Build Coastguard Worker esac 1432*663afb9bSAndroid Build Coastguard Worker ;; 1433*663afb9bSAndroid Build Coastguard Worker esac 1434*663afb9bSAndroid Build Coastguard Worker fi 1435*663afb9bSAndroid Build Coastguard Worker rm -rf conftest* 1436*663afb9bSAndroid Build Coastguard Worker ;; 1437*663afb9bSAndroid Build Coastguard Worker 1438*663afb9bSAndroid Build Coastguard Worker*-*-sco3.2v5*) 1439*663afb9bSAndroid Build Coastguard Worker # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1440*663afb9bSAndroid Build Coastguard Worker SAVE_CFLAGS=$CFLAGS 1441*663afb9bSAndroid Build Coastguard Worker CFLAGS="$CFLAGS -belf" 1442*663afb9bSAndroid Build Coastguard Worker AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1443*663afb9bSAndroid Build Coastguard Worker [AC_LANG_PUSH(C) 1444*663afb9bSAndroid Build Coastguard Worker AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1445*663afb9bSAndroid Build Coastguard Worker AC_LANG_POP]) 1446*663afb9bSAndroid Build Coastguard Worker if test yes != "$lt_cv_cc_needs_belf"; then 1447*663afb9bSAndroid Build Coastguard Worker # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1448*663afb9bSAndroid Build Coastguard Worker CFLAGS=$SAVE_CFLAGS 1449*663afb9bSAndroid Build Coastguard Worker fi 1450*663afb9bSAndroid Build Coastguard Worker ;; 1451*663afb9bSAndroid Build Coastguard Worker*-*solaris*) 1452*663afb9bSAndroid Build Coastguard Worker # Find out what ABI is being produced by ac_compile, and set linker 1453*663afb9bSAndroid Build Coastguard Worker # options accordingly. 1454*663afb9bSAndroid Build Coastguard Worker echo 'int i;' > conftest.$ac_ext 1455*663afb9bSAndroid Build Coastguard Worker if AC_TRY_EVAL(ac_compile); then 1456*663afb9bSAndroid Build Coastguard Worker case `/usr/bin/file conftest.o` in 1457*663afb9bSAndroid Build Coastguard Worker *64-bit*) 1458*663afb9bSAndroid Build Coastguard Worker case $lt_cv_prog_gnu_ld in 1459*663afb9bSAndroid Build Coastguard Worker yes*) 1460*663afb9bSAndroid Build Coastguard Worker case $host in 1461*663afb9bSAndroid Build Coastguard Worker i?86-*-solaris*|x86_64-*-solaris*) 1462*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf_x86_64" 1463*663afb9bSAndroid Build Coastguard Worker ;; 1464*663afb9bSAndroid Build Coastguard Worker sparc*-*-solaris*) 1465*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -m elf64_sparc" 1466*663afb9bSAndroid Build Coastguard Worker ;; 1467*663afb9bSAndroid Build Coastguard Worker esac 1468*663afb9bSAndroid Build Coastguard Worker # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1469*663afb9bSAndroid Build Coastguard Worker if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1470*663afb9bSAndroid Build Coastguard Worker LD=${LD-ld}_sol2 1471*663afb9bSAndroid Build Coastguard Worker fi 1472*663afb9bSAndroid Build Coastguard Worker ;; 1473*663afb9bSAndroid Build Coastguard Worker *) 1474*663afb9bSAndroid Build Coastguard Worker if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1475*663afb9bSAndroid Build Coastguard Worker LD="${LD-ld} -64" 1476*663afb9bSAndroid Build Coastguard Worker fi 1477*663afb9bSAndroid Build Coastguard Worker ;; 1478*663afb9bSAndroid Build Coastguard Worker esac 1479*663afb9bSAndroid Build Coastguard Worker ;; 1480*663afb9bSAndroid Build Coastguard Worker esac 1481*663afb9bSAndroid Build Coastguard Worker fi 1482*663afb9bSAndroid Build Coastguard Worker rm -rf conftest* 1483*663afb9bSAndroid Build Coastguard Worker ;; 1484*663afb9bSAndroid Build Coastguard Workeresac 1485*663afb9bSAndroid Build Coastguard Worker 1486*663afb9bSAndroid Build Coastguard Workerneed_locks=$enable_libtool_lock 1487*663afb9bSAndroid Build Coastguard Worker])# _LT_ENABLE_LOCK 1488*663afb9bSAndroid Build Coastguard Worker 1489*663afb9bSAndroid Build Coastguard Worker 1490*663afb9bSAndroid Build Coastguard Worker# _LT_PROG_AR 1491*663afb9bSAndroid Build Coastguard Worker# ----------- 1492*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_PROG_AR], 1493*663afb9bSAndroid Build Coastguard Worker[AC_CHECK_TOOLS(AR, [ar], false) 1494*663afb9bSAndroid Build Coastguard Worker: ${AR=ar} 1495*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [AR], [1], [The archiver]) 1496*663afb9bSAndroid Build Coastguard Worker 1497*663afb9bSAndroid Build Coastguard Worker# Use ARFLAGS variable as AR's operation code to sync the variable naming with 1498*663afb9bSAndroid Build Coastguard Worker# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 1499*663afb9bSAndroid Build Coastguard Worker# higher priority because thats what people were doing historically (setting 1500*663afb9bSAndroid Build Coastguard Worker# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 1501*663afb9bSAndroid Build Coastguard Worker# variable obsoleted/removed. 1502*663afb9bSAndroid Build Coastguard Worker 1503*663afb9bSAndroid Build Coastguard Workertest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 1504*663afb9bSAndroid Build Coastguard Workerlt_ar_flags=$AR_FLAGS 1505*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 1506*663afb9bSAndroid Build Coastguard Worker 1507*663afb9bSAndroid Build Coastguard Worker# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 1508*663afb9bSAndroid Build Coastguard Worker# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 1509*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 1510*663afb9bSAndroid Build Coastguard Worker [Flags to create an archive]) 1511*663afb9bSAndroid Build Coastguard Worker 1512*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1513*663afb9bSAndroid Build Coastguard Worker [lt_cv_ar_at_file=no 1514*663afb9bSAndroid Build Coastguard Worker AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1515*663afb9bSAndroid Build Coastguard Worker [echo conftest.$ac_objext > conftest.lst 1516*663afb9bSAndroid Build Coastguard Worker lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1517*663afb9bSAndroid Build Coastguard Worker AC_TRY_EVAL([lt_ar_try]) 1518*663afb9bSAndroid Build Coastguard Worker if test 0 -eq "$ac_status"; then 1519*663afb9bSAndroid Build Coastguard Worker # Ensure the archiver fails upon bogus file names. 1520*663afb9bSAndroid Build Coastguard Worker rm -f conftest.$ac_objext libconftest.a 1521*663afb9bSAndroid Build Coastguard Worker AC_TRY_EVAL([lt_ar_try]) 1522*663afb9bSAndroid Build Coastguard Worker if test 0 -ne "$ac_status"; then 1523*663afb9bSAndroid Build Coastguard Worker lt_cv_ar_at_file=@ 1524*663afb9bSAndroid Build Coastguard Worker fi 1525*663afb9bSAndroid Build Coastguard Worker fi 1526*663afb9bSAndroid Build Coastguard Worker rm -f conftest.* libconftest.a 1527*663afb9bSAndroid Build Coastguard Worker ]) 1528*663afb9bSAndroid Build Coastguard Worker ]) 1529*663afb9bSAndroid Build Coastguard Worker 1530*663afb9bSAndroid Build Coastguard Workerif test no = "$lt_cv_ar_at_file"; then 1531*663afb9bSAndroid Build Coastguard Worker archiver_list_spec= 1532*663afb9bSAndroid Build Coastguard Workerelse 1533*663afb9bSAndroid Build Coastguard Worker archiver_list_spec=$lt_cv_ar_at_file 1534*663afb9bSAndroid Build Coastguard Workerfi 1535*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [archiver_list_spec], [1], 1536*663afb9bSAndroid Build Coastguard Worker [How to feed a file listing to the archiver]) 1537*663afb9bSAndroid Build Coastguard Worker])# _LT_PROG_AR 1538*663afb9bSAndroid Build Coastguard Worker 1539*663afb9bSAndroid Build Coastguard Worker 1540*663afb9bSAndroid Build Coastguard Worker# _LT_CMD_OLD_ARCHIVE 1541*663afb9bSAndroid Build Coastguard Worker# ------------------- 1542*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CMD_OLD_ARCHIVE], 1543*663afb9bSAndroid Build Coastguard Worker[_LT_PROG_AR 1544*663afb9bSAndroid Build Coastguard Worker 1545*663afb9bSAndroid Build Coastguard WorkerAC_CHECK_TOOL(STRIP, strip, :) 1546*663afb9bSAndroid Build Coastguard Workertest -z "$STRIP" && STRIP=: 1547*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1548*663afb9bSAndroid Build Coastguard Worker 1549*663afb9bSAndroid Build Coastguard WorkerAC_CHECK_TOOL(RANLIB, ranlib, :) 1550*663afb9bSAndroid Build Coastguard Workertest -z "$RANLIB" && RANLIB=: 1551*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [RANLIB], [1], 1552*663afb9bSAndroid Build Coastguard Worker [Commands used to install an old-style archive]) 1553*663afb9bSAndroid Build Coastguard Worker 1554*663afb9bSAndroid Build Coastguard Worker# Determine commands to create old-style static archives. 1555*663afb9bSAndroid Build Coastguard Workerold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1556*663afb9bSAndroid Build Coastguard Workerold_postinstall_cmds='chmod 644 $oldlib' 1557*663afb9bSAndroid Build Coastguard Workerold_postuninstall_cmds= 1558*663afb9bSAndroid Build Coastguard Worker 1559*663afb9bSAndroid Build Coastguard Workerif test -n "$RANLIB"; then 1560*663afb9bSAndroid Build Coastguard Worker case $host_os in 1561*663afb9bSAndroid Build Coastguard Worker bitrig* | openbsd*) 1562*663afb9bSAndroid Build Coastguard Worker old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1563*663afb9bSAndroid Build Coastguard Worker ;; 1564*663afb9bSAndroid Build Coastguard Worker *) 1565*663afb9bSAndroid Build Coastguard Worker old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1566*663afb9bSAndroid Build Coastguard Worker ;; 1567*663afb9bSAndroid Build Coastguard Worker esac 1568*663afb9bSAndroid Build Coastguard Worker old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1569*663afb9bSAndroid Build Coastguard Workerfi 1570*663afb9bSAndroid Build Coastguard Worker 1571*663afb9bSAndroid Build Coastguard Workercase $host_os in 1572*663afb9bSAndroid Build Coastguard Worker darwin*) 1573*663afb9bSAndroid Build Coastguard Worker lock_old_archive_extraction=yes ;; 1574*663afb9bSAndroid Build Coastguard Worker *) 1575*663afb9bSAndroid Build Coastguard Worker lock_old_archive_extraction=no ;; 1576*663afb9bSAndroid Build Coastguard Workeresac 1577*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [old_postinstall_cmds], [2]) 1578*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [old_postuninstall_cmds], [2]) 1579*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [old_archive_cmds], [2], 1580*663afb9bSAndroid Build Coastguard Worker [Commands used to build an old-style archive]) 1581*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [lock_old_archive_extraction], [0], 1582*663afb9bSAndroid Build Coastguard Worker [Whether to use a lock for old archive extraction]) 1583*663afb9bSAndroid Build Coastguard Worker])# _LT_CMD_OLD_ARCHIVE 1584*663afb9bSAndroid Build Coastguard Worker 1585*663afb9bSAndroid Build Coastguard Worker 1586*663afb9bSAndroid Build Coastguard Worker# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1587*663afb9bSAndroid Build Coastguard Worker# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1588*663afb9bSAndroid Build Coastguard Worker# ---------------------------------------------------------------- 1589*663afb9bSAndroid Build Coastguard Worker# Check whether the given compiler option works 1590*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([_LT_COMPILER_OPTION], 1591*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1592*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl 1593*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_CHECK([$1], [$2], 1594*663afb9bSAndroid Build Coastguard Worker [$2=no 1595*663afb9bSAndroid Build Coastguard Worker m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1596*663afb9bSAndroid Build Coastguard Worker echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1597*663afb9bSAndroid Build Coastguard Worker lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1598*663afb9bSAndroid Build Coastguard Worker # Insert the option either (1) after the last *FLAGS variable, or 1599*663afb9bSAndroid Build Coastguard Worker # (2) before a word containing "conftest.", or (3) at the end. 1600*663afb9bSAndroid Build Coastguard Worker # Note that $ac_compile itself does not contain backslashes and begins 1601*663afb9bSAndroid Build Coastguard Worker # with a dollar sign (not a hyphen), so the echo should work correctly. 1602*663afb9bSAndroid Build Coastguard Worker # The option is referenced via a variable to avoid confusing sed. 1603*663afb9bSAndroid Build Coastguard Worker lt_compile=`echo "$ac_compile" | $SED \ 1604*663afb9bSAndroid Build Coastguard Worker -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1605*663afb9bSAndroid Build Coastguard Worker -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1606*663afb9bSAndroid Build Coastguard Worker -e 's:$: $lt_compiler_flag:'` 1607*663afb9bSAndroid Build Coastguard Worker (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1608*663afb9bSAndroid Build Coastguard Worker (eval "$lt_compile" 2>conftest.err) 1609*663afb9bSAndroid Build Coastguard Worker ac_status=$? 1610*663afb9bSAndroid Build Coastguard Worker cat conftest.err >&AS_MESSAGE_LOG_FD 1611*663afb9bSAndroid Build Coastguard Worker echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1612*663afb9bSAndroid Build Coastguard Worker if (exit $ac_status) && test -s "$ac_outfile"; then 1613*663afb9bSAndroid Build Coastguard Worker # The compiler can only warn and ignore the option if not recognized 1614*663afb9bSAndroid Build Coastguard Worker # So say no if there are warnings other than the usual output. 1615*663afb9bSAndroid Build Coastguard Worker $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1616*663afb9bSAndroid Build Coastguard Worker $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1617*663afb9bSAndroid Build Coastguard Worker if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1618*663afb9bSAndroid Build Coastguard Worker $2=yes 1619*663afb9bSAndroid Build Coastguard Worker fi 1620*663afb9bSAndroid Build Coastguard Worker fi 1621*663afb9bSAndroid Build Coastguard Worker $RM conftest* 1622*663afb9bSAndroid Build Coastguard Worker]) 1623*663afb9bSAndroid Build Coastguard Worker 1624*663afb9bSAndroid Build Coastguard Workerif test yes = "[$]$2"; then 1625*663afb9bSAndroid Build Coastguard Worker m4_if([$5], , :, [$5]) 1626*663afb9bSAndroid Build Coastguard Workerelse 1627*663afb9bSAndroid Build Coastguard Worker m4_if([$6], , :, [$6]) 1628*663afb9bSAndroid Build Coastguard Workerfi 1629*663afb9bSAndroid Build Coastguard Worker])# _LT_COMPILER_OPTION 1630*663afb9bSAndroid Build Coastguard Worker 1631*663afb9bSAndroid Build Coastguard Worker# Old name: 1632*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1633*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 1634*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1635*663afb9bSAndroid Build Coastguard Worker 1636*663afb9bSAndroid Build Coastguard Worker 1637*663afb9bSAndroid Build Coastguard Worker# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1638*663afb9bSAndroid Build Coastguard Worker# [ACTION-SUCCESS], [ACTION-FAILURE]) 1639*663afb9bSAndroid Build Coastguard Worker# ---------------------------------------------------- 1640*663afb9bSAndroid Build Coastguard Worker# Check whether the given linker option works 1641*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([_LT_LINKER_OPTION], 1642*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1643*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl 1644*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_CHECK([$1], [$2], 1645*663afb9bSAndroid Build Coastguard Worker [$2=no 1646*663afb9bSAndroid Build Coastguard Worker save_LDFLAGS=$LDFLAGS 1647*663afb9bSAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS $3" 1648*663afb9bSAndroid Build Coastguard Worker echo "$lt_simple_link_test_code" > conftest.$ac_ext 1649*663afb9bSAndroid Build Coastguard Worker if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1650*663afb9bSAndroid Build Coastguard Worker # The linker can only warn and ignore the option if not recognized 1651*663afb9bSAndroid Build Coastguard Worker # So say no if there are warnings 1652*663afb9bSAndroid Build Coastguard Worker if test -s conftest.err; then 1653*663afb9bSAndroid Build Coastguard Worker # Append any errors to the config.log. 1654*663afb9bSAndroid Build Coastguard Worker cat conftest.err 1>&AS_MESSAGE_LOG_FD 1655*663afb9bSAndroid Build Coastguard Worker $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1656*663afb9bSAndroid Build Coastguard Worker $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1657*663afb9bSAndroid Build Coastguard Worker if diff conftest.exp conftest.er2 >/dev/null; then 1658*663afb9bSAndroid Build Coastguard Worker $2=yes 1659*663afb9bSAndroid Build Coastguard Worker fi 1660*663afb9bSAndroid Build Coastguard Worker else 1661*663afb9bSAndroid Build Coastguard Worker $2=yes 1662*663afb9bSAndroid Build Coastguard Worker fi 1663*663afb9bSAndroid Build Coastguard Worker fi 1664*663afb9bSAndroid Build Coastguard Worker $RM -r conftest* 1665*663afb9bSAndroid Build Coastguard Worker LDFLAGS=$save_LDFLAGS 1666*663afb9bSAndroid Build Coastguard Worker]) 1667*663afb9bSAndroid Build Coastguard Worker 1668*663afb9bSAndroid Build Coastguard Workerif test yes = "[$]$2"; then 1669*663afb9bSAndroid Build Coastguard Worker m4_if([$4], , :, [$4]) 1670*663afb9bSAndroid Build Coastguard Workerelse 1671*663afb9bSAndroid Build Coastguard Worker m4_if([$5], , :, [$5]) 1672*663afb9bSAndroid Build Coastguard Workerfi 1673*663afb9bSAndroid Build Coastguard Worker])# _LT_LINKER_OPTION 1674*663afb9bSAndroid Build Coastguard Worker 1675*663afb9bSAndroid Build Coastguard Worker# Old name: 1676*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1677*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 1678*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1679*663afb9bSAndroid Build Coastguard Worker 1680*663afb9bSAndroid Build Coastguard Worker 1681*663afb9bSAndroid Build Coastguard Worker# LT_CMD_MAX_LEN 1682*663afb9bSAndroid Build Coastguard Worker#--------------- 1683*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([LT_CMD_MAX_LEN], 1684*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1685*663afb9bSAndroid Build Coastguard Worker# find the maximum length of command line arguments 1686*663afb9bSAndroid Build Coastguard WorkerAC_MSG_CHECKING([the maximum length of command line arguments]) 1687*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1688*663afb9bSAndroid Build Coastguard Worker i=0 1689*663afb9bSAndroid Build Coastguard Worker teststring=ABCD 1690*663afb9bSAndroid Build Coastguard Worker 1691*663afb9bSAndroid Build Coastguard Worker case $build_os in 1692*663afb9bSAndroid Build Coastguard Worker msdosdjgpp*) 1693*663afb9bSAndroid Build Coastguard Worker # On DJGPP, this test can blow up pretty badly due to problems in libc 1694*663afb9bSAndroid Build Coastguard Worker # (any single argument exceeding 2000 bytes causes a buffer overrun 1695*663afb9bSAndroid Build Coastguard Worker # during glob expansion). Even if it were fixed, the result of this 1696*663afb9bSAndroid Build Coastguard Worker # check would be larger than it should be. 1697*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=12288; # 12K is about right 1698*663afb9bSAndroid Build Coastguard Worker ;; 1699*663afb9bSAndroid Build Coastguard Worker 1700*663afb9bSAndroid Build Coastguard Worker gnu*) 1701*663afb9bSAndroid Build Coastguard Worker # Under GNU Hurd, this test is not required because there is 1702*663afb9bSAndroid Build Coastguard Worker # no limit to the length of command line arguments. 1703*663afb9bSAndroid Build Coastguard Worker # Libtool will interpret -1 as no limit whatsoever 1704*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=-1; 1705*663afb9bSAndroid Build Coastguard Worker ;; 1706*663afb9bSAndroid Build Coastguard Worker 1707*663afb9bSAndroid Build Coastguard Worker cygwin* | mingw* | cegcc*) 1708*663afb9bSAndroid Build Coastguard Worker # On Win9x/ME, this test blows up -- it succeeds, but takes 1709*663afb9bSAndroid Build Coastguard Worker # about 5 minutes as the teststring grows exponentially. 1710*663afb9bSAndroid Build Coastguard Worker # Worse, since 9x/ME are not pre-emptively multitasking, 1711*663afb9bSAndroid Build Coastguard Worker # you end up with a "frozen" computer, even though with patience 1712*663afb9bSAndroid Build Coastguard Worker # the test eventually succeeds (with a max line length of 256k). 1713*663afb9bSAndroid Build Coastguard Worker # Instead, let's just punt: use the minimum linelength reported by 1714*663afb9bSAndroid Build Coastguard Worker # all of the supported platforms: 8192 (on NT/2K/XP). 1715*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=8192; 1716*663afb9bSAndroid Build Coastguard Worker ;; 1717*663afb9bSAndroid Build Coastguard Worker 1718*663afb9bSAndroid Build Coastguard Worker mint*) 1719*663afb9bSAndroid Build Coastguard Worker # On MiNT this can take a long time and run out of memory. 1720*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=8192; 1721*663afb9bSAndroid Build Coastguard Worker ;; 1722*663afb9bSAndroid Build Coastguard Worker 1723*663afb9bSAndroid Build Coastguard Worker amigaos*) 1724*663afb9bSAndroid Build Coastguard Worker # On AmigaOS with pdksh, this test takes hours, literally. 1725*663afb9bSAndroid Build Coastguard Worker # So we just punt and use a minimum line length of 8192. 1726*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=8192; 1727*663afb9bSAndroid Build Coastguard Worker ;; 1728*663afb9bSAndroid Build Coastguard Worker 1729*663afb9bSAndroid Build Coastguard Worker bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1730*663afb9bSAndroid Build Coastguard Worker # This has been around since 386BSD, at least. Likely further. 1731*663afb9bSAndroid Build Coastguard Worker if test -x /sbin/sysctl; then 1732*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1733*663afb9bSAndroid Build Coastguard Worker elif test -x /usr/sbin/sysctl; then 1734*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1735*663afb9bSAndroid Build Coastguard Worker else 1736*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1737*663afb9bSAndroid Build Coastguard Worker fi 1738*663afb9bSAndroid Build Coastguard Worker # And add a safety zone 1739*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1740*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1741*663afb9bSAndroid Build Coastguard Worker ;; 1742*663afb9bSAndroid Build Coastguard Worker 1743*663afb9bSAndroid Build Coastguard Worker interix*) 1744*663afb9bSAndroid Build Coastguard Worker # We know the value 262144 and hardcode it with a safety zone (like BSD) 1745*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=196608 1746*663afb9bSAndroid Build Coastguard Worker ;; 1747*663afb9bSAndroid Build Coastguard Worker 1748*663afb9bSAndroid Build Coastguard Worker os2*) 1749*663afb9bSAndroid Build Coastguard Worker # The test takes a long time on OS/2. 1750*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=8192 1751*663afb9bSAndroid Build Coastguard Worker ;; 1752*663afb9bSAndroid Build Coastguard Worker 1753*663afb9bSAndroid Build Coastguard Worker osf*) 1754*663afb9bSAndroid Build Coastguard Worker # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1755*663afb9bSAndroid Build Coastguard Worker # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1756*663afb9bSAndroid Build Coastguard Worker # nice to cause kernel panics so lets avoid the loop below. 1757*663afb9bSAndroid Build Coastguard Worker # First set a reasonable default. 1758*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=16384 1759*663afb9bSAndroid Build Coastguard Worker # 1760*663afb9bSAndroid Build Coastguard Worker if test -x /sbin/sysconfig; then 1761*663afb9bSAndroid Build Coastguard Worker case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1762*663afb9bSAndroid Build Coastguard Worker *1*) lt_cv_sys_max_cmd_len=-1 ;; 1763*663afb9bSAndroid Build Coastguard Worker esac 1764*663afb9bSAndroid Build Coastguard Worker fi 1765*663afb9bSAndroid Build Coastguard Worker ;; 1766*663afb9bSAndroid Build Coastguard Worker sco3.2v5*) 1767*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=102400 1768*663afb9bSAndroid Build Coastguard Worker ;; 1769*663afb9bSAndroid Build Coastguard Worker sysv5* | sco5v6* | sysv4.2uw2*) 1770*663afb9bSAndroid Build Coastguard Worker kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1771*663afb9bSAndroid Build Coastguard Worker if test -n "$kargmax"; then 1772*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1773*663afb9bSAndroid Build Coastguard Worker else 1774*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=32768 1775*663afb9bSAndroid Build Coastguard Worker fi 1776*663afb9bSAndroid Build Coastguard Worker ;; 1777*663afb9bSAndroid Build Coastguard Worker *) 1778*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1779*663afb9bSAndroid Build Coastguard Worker if test -n "$lt_cv_sys_max_cmd_len" && \ 1780*663afb9bSAndroid Build Coastguard Worker test undefined != "$lt_cv_sys_max_cmd_len"; then 1781*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1782*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1783*663afb9bSAndroid Build Coastguard Worker else 1784*663afb9bSAndroid Build Coastguard Worker # Make teststring a little bigger before we do anything with it. 1785*663afb9bSAndroid Build Coastguard Worker # a 1K string should be a reasonable start. 1786*663afb9bSAndroid Build Coastguard Worker for i in 1 2 3 4 5 6 7 8; do 1787*663afb9bSAndroid Build Coastguard Worker teststring=$teststring$teststring 1788*663afb9bSAndroid Build Coastguard Worker done 1789*663afb9bSAndroid Build Coastguard Worker SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1790*663afb9bSAndroid Build Coastguard Worker # If test is not a shell built-in, we'll probably end up computing a 1791*663afb9bSAndroid Build Coastguard Worker # maximum length that is only half of the actual maximum length, but 1792*663afb9bSAndroid Build Coastguard Worker # we can't tell. 1793*663afb9bSAndroid Build Coastguard Worker while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1794*663afb9bSAndroid Build Coastguard Worker = "X$teststring$teststring"; } >/dev/null 2>&1 && 1795*663afb9bSAndroid Build Coastguard Worker test 17 != "$i" # 1/2 MB should be enough 1796*663afb9bSAndroid Build Coastguard Worker do 1797*663afb9bSAndroid Build Coastguard Worker i=`expr $i + 1` 1798*663afb9bSAndroid Build Coastguard Worker teststring=$teststring$teststring 1799*663afb9bSAndroid Build Coastguard Worker done 1800*663afb9bSAndroid Build Coastguard Worker # Only check the string length outside the loop. 1801*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1802*663afb9bSAndroid Build Coastguard Worker teststring= 1803*663afb9bSAndroid Build Coastguard Worker # Add a significant safety factor because C++ compilers can tack on 1804*663afb9bSAndroid Build Coastguard Worker # massive amounts of additional arguments before passing them to the 1805*663afb9bSAndroid Build Coastguard Worker # linker. It appears as though 1/2 is a usable value. 1806*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1807*663afb9bSAndroid Build Coastguard Worker fi 1808*663afb9bSAndroid Build Coastguard Worker ;; 1809*663afb9bSAndroid Build Coastguard Worker esac 1810*663afb9bSAndroid Build Coastguard Worker]) 1811*663afb9bSAndroid Build Coastguard Workerif test -n "$lt_cv_sys_max_cmd_len"; then 1812*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1813*663afb9bSAndroid Build Coastguard Workerelse 1814*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT(none) 1815*663afb9bSAndroid Build Coastguard Workerfi 1816*663afb9bSAndroid Build Coastguard Workermax_cmd_len=$lt_cv_sys_max_cmd_len 1817*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [max_cmd_len], [0], 1818*663afb9bSAndroid Build Coastguard Worker [What is the maximum length of a command?]) 1819*663afb9bSAndroid Build Coastguard Worker])# LT_CMD_MAX_LEN 1820*663afb9bSAndroid Build Coastguard Worker 1821*663afb9bSAndroid Build Coastguard Worker# Old name: 1822*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1823*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 1824*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1825*663afb9bSAndroid Build Coastguard Worker 1826*663afb9bSAndroid Build Coastguard Worker 1827*663afb9bSAndroid Build Coastguard Worker# _LT_HEADER_DLFCN 1828*663afb9bSAndroid Build Coastguard Worker# ---------------- 1829*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_HEADER_DLFCN], 1830*663afb9bSAndroid Build Coastguard Worker[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1831*663afb9bSAndroid Build Coastguard Worker])# _LT_HEADER_DLFCN 1832*663afb9bSAndroid Build Coastguard Worker 1833*663afb9bSAndroid Build Coastguard Worker 1834*663afb9bSAndroid Build Coastguard Worker# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1835*663afb9bSAndroid Build Coastguard Worker# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1836*663afb9bSAndroid Build Coastguard Worker# ---------------------------------------------------------------- 1837*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_TRY_DLOPEN_SELF], 1838*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_HEADER_DLFCN])dnl 1839*663afb9bSAndroid Build Coastguard Workerif test yes = "$cross_compiling"; then : 1840*663afb9bSAndroid Build Coastguard Worker [$4] 1841*663afb9bSAndroid Build Coastguard Workerelse 1842*663afb9bSAndroid Build Coastguard Worker lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1843*663afb9bSAndroid Build Coastguard Worker lt_status=$lt_dlunknown 1844*663afb9bSAndroid Build Coastguard Worker cat > conftest.$ac_ext <<_LT_EOF 1845*663afb9bSAndroid Build Coastguard Worker[#line $LINENO "configure" 1846*663afb9bSAndroid Build Coastguard Worker#include "confdefs.h" 1847*663afb9bSAndroid Build Coastguard Worker 1848*663afb9bSAndroid Build Coastguard Worker#if HAVE_DLFCN_H 1849*663afb9bSAndroid Build Coastguard Worker#include <dlfcn.h> 1850*663afb9bSAndroid Build Coastguard Worker#endif 1851*663afb9bSAndroid Build Coastguard Worker 1852*663afb9bSAndroid Build Coastguard Worker#include <stdio.h> 1853*663afb9bSAndroid Build Coastguard Worker 1854*663afb9bSAndroid Build Coastguard Worker#ifdef RTLD_GLOBAL 1855*663afb9bSAndroid Build Coastguard Worker# define LT_DLGLOBAL RTLD_GLOBAL 1856*663afb9bSAndroid Build Coastguard Worker#else 1857*663afb9bSAndroid Build Coastguard Worker# ifdef DL_GLOBAL 1858*663afb9bSAndroid Build Coastguard Worker# define LT_DLGLOBAL DL_GLOBAL 1859*663afb9bSAndroid Build Coastguard Worker# else 1860*663afb9bSAndroid Build Coastguard Worker# define LT_DLGLOBAL 0 1861*663afb9bSAndroid Build Coastguard Worker# endif 1862*663afb9bSAndroid Build Coastguard Worker#endif 1863*663afb9bSAndroid Build Coastguard Worker 1864*663afb9bSAndroid Build Coastguard Worker/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1865*663afb9bSAndroid Build Coastguard Worker find out it does not work in some platform. */ 1866*663afb9bSAndroid Build Coastguard Worker#ifndef LT_DLLAZY_OR_NOW 1867*663afb9bSAndroid Build Coastguard Worker# ifdef RTLD_LAZY 1868*663afb9bSAndroid Build Coastguard Worker# define LT_DLLAZY_OR_NOW RTLD_LAZY 1869*663afb9bSAndroid Build Coastguard Worker# else 1870*663afb9bSAndroid Build Coastguard Worker# ifdef DL_LAZY 1871*663afb9bSAndroid Build Coastguard Worker# define LT_DLLAZY_OR_NOW DL_LAZY 1872*663afb9bSAndroid Build Coastguard Worker# else 1873*663afb9bSAndroid Build Coastguard Worker# ifdef RTLD_NOW 1874*663afb9bSAndroid Build Coastguard Worker# define LT_DLLAZY_OR_NOW RTLD_NOW 1875*663afb9bSAndroid Build Coastguard Worker# else 1876*663afb9bSAndroid Build Coastguard Worker# ifdef DL_NOW 1877*663afb9bSAndroid Build Coastguard Worker# define LT_DLLAZY_OR_NOW DL_NOW 1878*663afb9bSAndroid Build Coastguard Worker# else 1879*663afb9bSAndroid Build Coastguard Worker# define LT_DLLAZY_OR_NOW 0 1880*663afb9bSAndroid Build Coastguard Worker# endif 1881*663afb9bSAndroid Build Coastguard Worker# endif 1882*663afb9bSAndroid Build Coastguard Worker# endif 1883*663afb9bSAndroid Build Coastguard Worker# endif 1884*663afb9bSAndroid Build Coastguard Worker#endif 1885*663afb9bSAndroid Build Coastguard Worker 1886*663afb9bSAndroid Build Coastguard Worker/* When -fvisibility=hidden is used, assume the code has been annotated 1887*663afb9bSAndroid Build Coastguard Worker correspondingly for the symbols needed. */ 1888*663afb9bSAndroid Build Coastguard Worker#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1889*663afb9bSAndroid Build Coastguard Workerint fnord () __attribute__((visibility("default"))); 1890*663afb9bSAndroid Build Coastguard Worker#endif 1891*663afb9bSAndroid Build Coastguard Worker 1892*663afb9bSAndroid Build Coastguard Workerint fnord () { return 42; } 1893*663afb9bSAndroid Build Coastguard Workerint main () 1894*663afb9bSAndroid Build Coastguard Worker{ 1895*663afb9bSAndroid Build Coastguard Worker void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1896*663afb9bSAndroid Build Coastguard Worker int status = $lt_dlunknown; 1897*663afb9bSAndroid Build Coastguard Worker 1898*663afb9bSAndroid Build Coastguard Worker if (self) 1899*663afb9bSAndroid Build Coastguard Worker { 1900*663afb9bSAndroid Build Coastguard Worker if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1901*663afb9bSAndroid Build Coastguard Worker else 1902*663afb9bSAndroid Build Coastguard Worker { 1903*663afb9bSAndroid Build Coastguard Worker if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1904*663afb9bSAndroid Build Coastguard Worker else puts (dlerror ()); 1905*663afb9bSAndroid Build Coastguard Worker } 1906*663afb9bSAndroid Build Coastguard Worker /* dlclose (self); */ 1907*663afb9bSAndroid Build Coastguard Worker } 1908*663afb9bSAndroid Build Coastguard Worker else 1909*663afb9bSAndroid Build Coastguard Worker puts (dlerror ()); 1910*663afb9bSAndroid Build Coastguard Worker 1911*663afb9bSAndroid Build Coastguard Worker return status; 1912*663afb9bSAndroid Build Coastguard Worker}] 1913*663afb9bSAndroid Build Coastguard Worker_LT_EOF 1914*663afb9bSAndroid Build Coastguard Worker if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1915*663afb9bSAndroid Build Coastguard Worker (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1916*663afb9bSAndroid Build Coastguard Worker lt_status=$? 1917*663afb9bSAndroid Build Coastguard Worker case x$lt_status in 1918*663afb9bSAndroid Build Coastguard Worker x$lt_dlno_uscore) $1 ;; 1919*663afb9bSAndroid Build Coastguard Worker x$lt_dlneed_uscore) $2 ;; 1920*663afb9bSAndroid Build Coastguard Worker x$lt_dlunknown|x*) $3 ;; 1921*663afb9bSAndroid Build Coastguard Worker esac 1922*663afb9bSAndroid Build Coastguard Worker else : 1923*663afb9bSAndroid Build Coastguard Worker # compilation failed 1924*663afb9bSAndroid Build Coastguard Worker $3 1925*663afb9bSAndroid Build Coastguard Worker fi 1926*663afb9bSAndroid Build Coastguard Workerfi 1927*663afb9bSAndroid Build Coastguard Workerrm -fr conftest* 1928*663afb9bSAndroid Build Coastguard Worker])# _LT_TRY_DLOPEN_SELF 1929*663afb9bSAndroid Build Coastguard Worker 1930*663afb9bSAndroid Build Coastguard Worker 1931*663afb9bSAndroid Build Coastguard Worker# LT_SYS_DLOPEN_SELF 1932*663afb9bSAndroid Build Coastguard Worker# ------------------ 1933*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([LT_SYS_DLOPEN_SELF], 1934*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_HEADER_DLFCN])dnl 1935*663afb9bSAndroid Build Coastguard Workerif test yes != "$enable_dlopen"; then 1936*663afb9bSAndroid Build Coastguard Worker enable_dlopen=unknown 1937*663afb9bSAndroid Build Coastguard Worker enable_dlopen_self=unknown 1938*663afb9bSAndroid Build Coastguard Worker enable_dlopen_self_static=unknown 1939*663afb9bSAndroid Build Coastguard Workerelse 1940*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen=no 1941*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_libs= 1942*663afb9bSAndroid Build Coastguard Worker 1943*663afb9bSAndroid Build Coastguard Worker case $host_os in 1944*663afb9bSAndroid Build Coastguard Worker beos*) 1945*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen=load_add_on 1946*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_libs= 1947*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_self=yes 1948*663afb9bSAndroid Build Coastguard Worker ;; 1949*663afb9bSAndroid Build Coastguard Worker 1950*663afb9bSAndroid Build Coastguard Worker mingw* | pw32* | cegcc*) 1951*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen=LoadLibrary 1952*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_libs= 1953*663afb9bSAndroid Build Coastguard Worker ;; 1954*663afb9bSAndroid Build Coastguard Worker 1955*663afb9bSAndroid Build Coastguard Worker cygwin*) 1956*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen=dlopen 1957*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_libs= 1958*663afb9bSAndroid Build Coastguard Worker ;; 1959*663afb9bSAndroid Build Coastguard Worker 1960*663afb9bSAndroid Build Coastguard Worker darwin*) 1961*663afb9bSAndroid Build Coastguard Worker # if libdl is installed we need to link against it 1962*663afb9bSAndroid Build Coastguard Worker AC_CHECK_LIB([dl], [dlopen], 1963*663afb9bSAndroid Build Coastguard Worker [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1964*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen=dyld 1965*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_libs= 1966*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_self=yes 1967*663afb9bSAndroid Build Coastguard Worker ]) 1968*663afb9bSAndroid Build Coastguard Worker ;; 1969*663afb9bSAndroid Build Coastguard Worker 1970*663afb9bSAndroid Build Coastguard Worker tpf*) 1971*663afb9bSAndroid Build Coastguard Worker # Don't try to run any link tests for TPF. We know it's impossible 1972*663afb9bSAndroid Build Coastguard Worker # because TPF is a cross-compiler, and we know how we open DSOs. 1973*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen=dlopen 1974*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_libs= 1975*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_self=no 1976*663afb9bSAndroid Build Coastguard Worker ;; 1977*663afb9bSAndroid Build Coastguard Worker 1978*663afb9bSAndroid Build Coastguard Worker *) 1979*663afb9bSAndroid Build Coastguard Worker AC_CHECK_FUNC([shl_load], 1980*663afb9bSAndroid Build Coastguard Worker [lt_cv_dlopen=shl_load], 1981*663afb9bSAndroid Build Coastguard Worker [AC_CHECK_LIB([dld], [shl_load], 1982*663afb9bSAndroid Build Coastguard Worker [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1983*663afb9bSAndroid Build Coastguard Worker [AC_CHECK_FUNC([dlopen], 1984*663afb9bSAndroid Build Coastguard Worker [lt_cv_dlopen=dlopen], 1985*663afb9bSAndroid Build Coastguard Worker [AC_CHECK_LIB([dl], [dlopen], 1986*663afb9bSAndroid Build Coastguard Worker [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1987*663afb9bSAndroid Build Coastguard Worker [AC_CHECK_LIB([svld], [dlopen], 1988*663afb9bSAndroid Build Coastguard Worker [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1989*663afb9bSAndroid Build Coastguard Worker [AC_CHECK_LIB([dld], [dld_link], 1990*663afb9bSAndroid Build Coastguard Worker [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1991*663afb9bSAndroid Build Coastguard Worker ]) 1992*663afb9bSAndroid Build Coastguard Worker ]) 1993*663afb9bSAndroid Build Coastguard Worker ]) 1994*663afb9bSAndroid Build Coastguard Worker ]) 1995*663afb9bSAndroid Build Coastguard Worker ]) 1996*663afb9bSAndroid Build Coastguard Worker ;; 1997*663afb9bSAndroid Build Coastguard Worker esac 1998*663afb9bSAndroid Build Coastguard Worker 1999*663afb9bSAndroid Build Coastguard Worker if test no = "$lt_cv_dlopen"; then 2000*663afb9bSAndroid Build Coastguard Worker enable_dlopen=no 2001*663afb9bSAndroid Build Coastguard Worker else 2002*663afb9bSAndroid Build Coastguard Worker enable_dlopen=yes 2003*663afb9bSAndroid Build Coastguard Worker fi 2004*663afb9bSAndroid Build Coastguard Worker 2005*663afb9bSAndroid Build Coastguard Worker case $lt_cv_dlopen in 2006*663afb9bSAndroid Build Coastguard Worker dlopen) 2007*663afb9bSAndroid Build Coastguard Worker save_CPPFLAGS=$CPPFLAGS 2008*663afb9bSAndroid Build Coastguard Worker test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2009*663afb9bSAndroid Build Coastguard Worker 2010*663afb9bSAndroid Build Coastguard Worker save_LDFLAGS=$LDFLAGS 2011*663afb9bSAndroid Build Coastguard Worker wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2012*663afb9bSAndroid Build Coastguard Worker 2013*663afb9bSAndroid Build Coastguard Worker save_LIBS=$LIBS 2014*663afb9bSAndroid Build Coastguard Worker LIBS="$lt_cv_dlopen_libs $LIBS" 2015*663afb9bSAndroid Build Coastguard Worker 2016*663afb9bSAndroid Build Coastguard Worker AC_CACHE_CHECK([whether a program can dlopen itself], 2017*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_self, [dnl 2018*663afb9bSAndroid Build Coastguard Worker _LT_TRY_DLOPEN_SELF( 2019*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2020*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2021*663afb9bSAndroid Build Coastguard Worker ]) 2022*663afb9bSAndroid Build Coastguard Worker 2023*663afb9bSAndroid Build Coastguard Worker if test yes = "$lt_cv_dlopen_self"; then 2024*663afb9bSAndroid Build Coastguard Worker wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2025*663afb9bSAndroid Build Coastguard Worker AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2026*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_self_static, [dnl 2027*663afb9bSAndroid Build Coastguard Worker _LT_TRY_DLOPEN_SELF( 2028*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2029*663afb9bSAndroid Build Coastguard Worker lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2030*663afb9bSAndroid Build Coastguard Worker ]) 2031*663afb9bSAndroid Build Coastguard Worker fi 2032*663afb9bSAndroid Build Coastguard Worker 2033*663afb9bSAndroid Build Coastguard Worker CPPFLAGS=$save_CPPFLAGS 2034*663afb9bSAndroid Build Coastguard Worker LDFLAGS=$save_LDFLAGS 2035*663afb9bSAndroid Build Coastguard Worker LIBS=$save_LIBS 2036*663afb9bSAndroid Build Coastguard Worker ;; 2037*663afb9bSAndroid Build Coastguard Worker esac 2038*663afb9bSAndroid Build Coastguard Worker 2039*663afb9bSAndroid Build Coastguard Worker case $lt_cv_dlopen_self in 2040*663afb9bSAndroid Build Coastguard Worker yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2041*663afb9bSAndroid Build Coastguard Worker *) enable_dlopen_self=unknown ;; 2042*663afb9bSAndroid Build Coastguard Worker esac 2043*663afb9bSAndroid Build Coastguard Worker 2044*663afb9bSAndroid Build Coastguard Worker case $lt_cv_dlopen_self_static in 2045*663afb9bSAndroid Build Coastguard Worker yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2046*663afb9bSAndroid Build Coastguard Worker *) enable_dlopen_self_static=unknown ;; 2047*663afb9bSAndroid Build Coastguard Worker esac 2048*663afb9bSAndroid Build Coastguard Workerfi 2049*663afb9bSAndroid Build Coastguard Worker_LT_DECL([dlopen_support], [enable_dlopen], [0], 2050*663afb9bSAndroid Build Coastguard Worker [Whether dlopen is supported]) 2051*663afb9bSAndroid Build Coastguard Worker_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2052*663afb9bSAndroid Build Coastguard Worker [Whether dlopen of programs is supported]) 2053*663afb9bSAndroid Build Coastguard Worker_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2054*663afb9bSAndroid Build Coastguard Worker [Whether dlopen of statically linked programs is supported]) 2055*663afb9bSAndroid Build Coastguard Worker])# LT_SYS_DLOPEN_SELF 2056*663afb9bSAndroid Build Coastguard Worker 2057*663afb9bSAndroid Build Coastguard Worker# Old name: 2058*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2059*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 2060*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2061*663afb9bSAndroid Build Coastguard Worker 2062*663afb9bSAndroid Build Coastguard Worker 2063*663afb9bSAndroid Build Coastguard Worker# _LT_COMPILER_C_O([TAGNAME]) 2064*663afb9bSAndroid Build Coastguard Worker# --------------------------- 2065*663afb9bSAndroid Build Coastguard Worker# Check to see if options -c and -o are simultaneously supported by compiler. 2066*663afb9bSAndroid Build Coastguard Worker# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2067*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_C_O], 2068*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_DECL_SED])dnl 2069*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2070*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl 2071*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2072*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2073*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2074*663afb9bSAndroid Build Coastguard Worker $RM -r conftest 2>/dev/null 2075*663afb9bSAndroid Build Coastguard Worker mkdir conftest 2076*663afb9bSAndroid Build Coastguard Worker cd conftest 2077*663afb9bSAndroid Build Coastguard Worker mkdir out 2078*663afb9bSAndroid Build Coastguard Worker echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2079*663afb9bSAndroid Build Coastguard Worker 2080*663afb9bSAndroid Build Coastguard Worker lt_compiler_flag="-o out/conftest2.$ac_objext" 2081*663afb9bSAndroid Build Coastguard Worker # Insert the option either (1) after the last *FLAGS variable, or 2082*663afb9bSAndroid Build Coastguard Worker # (2) before a word containing "conftest.", or (3) at the end. 2083*663afb9bSAndroid Build Coastguard Worker # Note that $ac_compile itself does not contain backslashes and begins 2084*663afb9bSAndroid Build Coastguard Worker # with a dollar sign (not a hyphen), so the echo should work correctly. 2085*663afb9bSAndroid Build Coastguard Worker lt_compile=`echo "$ac_compile" | $SED \ 2086*663afb9bSAndroid Build Coastguard Worker -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2087*663afb9bSAndroid Build Coastguard Worker -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2088*663afb9bSAndroid Build Coastguard Worker -e 's:$: $lt_compiler_flag:'` 2089*663afb9bSAndroid Build Coastguard Worker (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2090*663afb9bSAndroid Build Coastguard Worker (eval "$lt_compile" 2>out/conftest.err) 2091*663afb9bSAndroid Build Coastguard Worker ac_status=$? 2092*663afb9bSAndroid Build Coastguard Worker cat out/conftest.err >&AS_MESSAGE_LOG_FD 2093*663afb9bSAndroid Build Coastguard Worker echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2094*663afb9bSAndroid Build Coastguard Worker if (exit $ac_status) && test -s out/conftest2.$ac_objext 2095*663afb9bSAndroid Build Coastguard Worker then 2096*663afb9bSAndroid Build Coastguard Worker # The compiler can only warn and ignore the option if not recognized 2097*663afb9bSAndroid Build Coastguard Worker # So say no if there are warnings 2098*663afb9bSAndroid Build Coastguard Worker $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2099*663afb9bSAndroid Build Coastguard Worker $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2100*663afb9bSAndroid Build Coastguard Worker if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2101*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2102*663afb9bSAndroid Build Coastguard Worker fi 2103*663afb9bSAndroid Build Coastguard Worker fi 2104*663afb9bSAndroid Build Coastguard Worker chmod u+w . 2>&AS_MESSAGE_LOG_FD 2105*663afb9bSAndroid Build Coastguard Worker $RM conftest* 2106*663afb9bSAndroid Build Coastguard Worker # SGI C++ compiler will create directory out/ii_files/ for 2107*663afb9bSAndroid Build Coastguard Worker # template instantiation 2108*663afb9bSAndroid Build Coastguard Worker test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2109*663afb9bSAndroid Build Coastguard Worker $RM out/* && rmdir out 2110*663afb9bSAndroid Build Coastguard Worker cd .. 2111*663afb9bSAndroid Build Coastguard Worker $RM -r conftest 2112*663afb9bSAndroid Build Coastguard Worker $RM conftest* 2113*663afb9bSAndroid Build Coastguard Worker]) 2114*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2115*663afb9bSAndroid Build Coastguard Worker [Does compiler simultaneously support -c and -o options?]) 2116*663afb9bSAndroid Build Coastguard Worker])# _LT_COMPILER_C_O 2117*663afb9bSAndroid Build Coastguard Worker 2118*663afb9bSAndroid Build Coastguard Worker 2119*663afb9bSAndroid Build Coastguard Worker# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2120*663afb9bSAndroid Build Coastguard Worker# ---------------------------------- 2121*663afb9bSAndroid Build Coastguard Worker# Check to see if we can do hard links to lock some files if needed 2122*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_FILE_LOCKS], 2123*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_ENABLE_LOCK])dnl 2124*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2125*663afb9bSAndroid Build Coastguard Worker_LT_COMPILER_C_O([$1]) 2126*663afb9bSAndroid Build Coastguard Worker 2127*663afb9bSAndroid Build Coastguard Workerhard_links=nottested 2128*663afb9bSAndroid Build Coastguard Workerif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2129*663afb9bSAndroid Build Coastguard Worker # do not overwrite the value of need_locks provided by the user 2130*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([if we can lock with hard links]) 2131*663afb9bSAndroid Build Coastguard Worker hard_links=yes 2132*663afb9bSAndroid Build Coastguard Worker $RM conftest* 2133*663afb9bSAndroid Build Coastguard Worker ln conftest.a conftest.b 2>/dev/null && hard_links=no 2134*663afb9bSAndroid Build Coastguard Worker touch conftest.a 2135*663afb9bSAndroid Build Coastguard Worker ln conftest.a conftest.b 2>&5 || hard_links=no 2136*663afb9bSAndroid Build Coastguard Worker ln conftest.a conftest.b 2>/dev/null && hard_links=no 2137*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([$hard_links]) 2138*663afb9bSAndroid Build Coastguard Worker if test no = "$hard_links"; then 2139*663afb9bSAndroid Build Coastguard Worker AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2140*663afb9bSAndroid Build Coastguard Worker need_locks=warn 2141*663afb9bSAndroid Build Coastguard Worker fi 2142*663afb9bSAndroid Build Coastguard Workerelse 2143*663afb9bSAndroid Build Coastguard Worker need_locks=no 2144*663afb9bSAndroid Build Coastguard Workerfi 2145*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2146*663afb9bSAndroid Build Coastguard Worker])# _LT_COMPILER_FILE_LOCKS 2147*663afb9bSAndroid Build Coastguard Worker 2148*663afb9bSAndroid Build Coastguard Worker 2149*663afb9bSAndroid Build Coastguard Worker# _LT_CHECK_OBJDIR 2150*663afb9bSAndroid Build Coastguard Worker# ---------------- 2151*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CHECK_OBJDIR], 2152*663afb9bSAndroid Build Coastguard Worker[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2153*663afb9bSAndroid Build Coastguard Worker[rm -f .libs 2>/dev/null 2154*663afb9bSAndroid Build Coastguard Workermkdir .libs 2>/dev/null 2155*663afb9bSAndroid Build Coastguard Workerif test -d .libs; then 2156*663afb9bSAndroid Build Coastguard Worker lt_cv_objdir=.libs 2157*663afb9bSAndroid Build Coastguard Workerelse 2158*663afb9bSAndroid Build Coastguard Worker # MS-DOS does not allow filenames that begin with a dot. 2159*663afb9bSAndroid Build Coastguard Worker lt_cv_objdir=_libs 2160*663afb9bSAndroid Build Coastguard Workerfi 2161*663afb9bSAndroid Build Coastguard Workerrmdir .libs 2>/dev/null]) 2162*663afb9bSAndroid Build Coastguard Workerobjdir=$lt_cv_objdir 2163*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [objdir], [0], 2164*663afb9bSAndroid Build Coastguard Worker [The name of the directory that contains temporary libtool files])dnl 2165*663afb9bSAndroid Build Coastguard Workerm4_pattern_allow([LT_OBJDIR])dnl 2166*663afb9bSAndroid Build Coastguard WorkerAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2167*663afb9bSAndroid Build Coastguard Worker [Define to the sub-directory where libtool stores uninstalled libraries.]) 2168*663afb9bSAndroid Build Coastguard Worker])# _LT_CHECK_OBJDIR 2169*663afb9bSAndroid Build Coastguard Worker 2170*663afb9bSAndroid Build Coastguard Worker 2171*663afb9bSAndroid Build Coastguard Worker# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2172*663afb9bSAndroid Build Coastguard Worker# -------------------------------------- 2173*663afb9bSAndroid Build Coastguard Worker# Check hardcoding attributes. 2174*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2175*663afb9bSAndroid Build Coastguard Worker[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2176*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_action, $1)= 2177*663afb9bSAndroid Build Coastguard Workerif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2178*663afb9bSAndroid Build Coastguard Worker test -n "$_LT_TAGVAR(runpath_var, $1)" || 2179*663afb9bSAndroid Build Coastguard Worker test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2180*663afb9bSAndroid Build Coastguard Worker 2181*663afb9bSAndroid Build Coastguard Worker # We can hardcode non-existent directories. 2182*663afb9bSAndroid Build Coastguard Worker if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2183*663afb9bSAndroid Build Coastguard Worker # If the only mechanism to avoid hardcoding is shlibpath_var, we 2184*663afb9bSAndroid Build Coastguard Worker # have to relink, otherwise we might link with an installed library 2185*663afb9bSAndroid Build Coastguard Worker # when we should be linking with a yet-to-be-installed one 2186*663afb9bSAndroid Build Coastguard Worker ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2187*663afb9bSAndroid Build Coastguard Worker test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2188*663afb9bSAndroid Build Coastguard Worker # Linking always hardcodes the temporary library directory. 2189*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_action, $1)=relink 2190*663afb9bSAndroid Build Coastguard Worker else 2191*663afb9bSAndroid Build Coastguard Worker # We can link without hardcoding, and we can hardcode nonexisting dirs. 2192*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_action, $1)=immediate 2193*663afb9bSAndroid Build Coastguard Worker fi 2194*663afb9bSAndroid Build Coastguard Workerelse 2195*663afb9bSAndroid Build Coastguard Worker # We cannot hardcode anything, or else we can only hardcode existing 2196*663afb9bSAndroid Build Coastguard Worker # directories. 2197*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_action, $1)=unsupported 2198*663afb9bSAndroid Build Coastguard Workerfi 2199*663afb9bSAndroid Build Coastguard WorkerAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2200*663afb9bSAndroid Build Coastguard Worker 2201*663afb9bSAndroid Build Coastguard Workerif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2202*663afb9bSAndroid Build Coastguard Worker test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2203*663afb9bSAndroid Build Coastguard Worker # Fast installation is not supported 2204*663afb9bSAndroid Build Coastguard Worker enable_fast_install=no 2205*663afb9bSAndroid Build Coastguard Workerelif test yes = "$shlibpath_overrides_runpath" || 2206*663afb9bSAndroid Build Coastguard Worker test no = "$enable_shared"; then 2207*663afb9bSAndroid Build Coastguard Worker # Fast installation is not necessary 2208*663afb9bSAndroid Build Coastguard Worker enable_fast_install=needless 2209*663afb9bSAndroid Build Coastguard Workerfi 2210*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_action], [0], 2211*663afb9bSAndroid Build Coastguard Worker [How to hardcode a shared library path into an executable]) 2212*663afb9bSAndroid Build Coastguard Worker])# _LT_LINKER_HARDCODE_LIBPATH 2213*663afb9bSAndroid Build Coastguard Worker 2214*663afb9bSAndroid Build Coastguard Worker 2215*663afb9bSAndroid Build Coastguard Worker# _LT_CMD_STRIPLIB 2216*663afb9bSAndroid Build Coastguard Worker# ---------------- 2217*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CMD_STRIPLIB], 2218*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP]) 2219*663afb9bSAndroid Build Coastguard Workerstriplib= 2220*663afb9bSAndroid Build Coastguard Workerold_striplib= 2221*663afb9bSAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether stripping libraries is possible]) 2222*663afb9bSAndroid Build Coastguard Workerif test -z "$STRIP"; then 2223*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2224*663afb9bSAndroid Build Coastguard Workerelse 2225*663afb9bSAndroid Build Coastguard Worker if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2226*663afb9bSAndroid Build Coastguard Worker old_striplib="$STRIP --strip-debug" 2227*663afb9bSAndroid Build Coastguard Worker striplib="$STRIP --strip-unneeded" 2228*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 2229*663afb9bSAndroid Build Coastguard Worker else 2230*663afb9bSAndroid Build Coastguard Worker case $host_os in 2231*663afb9bSAndroid Build Coastguard Worker darwin*) 2232*663afb9bSAndroid Build Coastguard Worker # FIXME - insert some real tests, host_os isn't really good enough 2233*663afb9bSAndroid Build Coastguard Worker striplib="$STRIP -x" 2234*663afb9bSAndroid Build Coastguard Worker old_striplib="$STRIP -S" 2235*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 2236*663afb9bSAndroid Build Coastguard Worker ;; 2237*663afb9bSAndroid Build Coastguard Worker freebsd*) 2238*663afb9bSAndroid Build Coastguard Worker if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 2239*663afb9bSAndroid Build Coastguard Worker old_striplib="$STRIP --strip-debug" 2240*663afb9bSAndroid Build Coastguard Worker striplib="$STRIP --strip-unneeded" 2241*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([yes]) 2242*663afb9bSAndroid Build Coastguard Worker else 2243*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2244*663afb9bSAndroid Build Coastguard Worker fi 2245*663afb9bSAndroid Build Coastguard Worker ;; 2246*663afb9bSAndroid Build Coastguard Worker *) 2247*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([no]) 2248*663afb9bSAndroid Build Coastguard Worker ;; 2249*663afb9bSAndroid Build Coastguard Worker esac 2250*663afb9bSAndroid Build Coastguard Worker fi 2251*663afb9bSAndroid Build Coastguard Workerfi 2252*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2253*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [striplib], [1]) 2254*663afb9bSAndroid Build Coastguard Worker])# _LT_CMD_STRIPLIB 2255*663afb9bSAndroid Build Coastguard Worker 2256*663afb9bSAndroid Build Coastguard Worker 2257*663afb9bSAndroid Build Coastguard Worker# _LT_PREPARE_MUNGE_PATH_LIST 2258*663afb9bSAndroid Build Coastguard Worker# --------------------------- 2259*663afb9bSAndroid Build Coastguard Worker# Make sure func_munge_path_list() is defined correctly. 2260*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2261*663afb9bSAndroid Build Coastguard Worker[[# func_munge_path_list VARIABLE PATH 2262*663afb9bSAndroid Build Coastguard Worker# ----------------------------------- 2263*663afb9bSAndroid Build Coastguard Worker# VARIABLE is name of variable containing _space_ separated list of 2264*663afb9bSAndroid Build Coastguard Worker# directories to be munged by the contents of PATH, which is string 2265*663afb9bSAndroid Build Coastguard Worker# having a format: 2266*663afb9bSAndroid Build Coastguard Worker# "DIR[:DIR]:" 2267*663afb9bSAndroid Build Coastguard Worker# string "DIR[ DIR]" will be prepended to VARIABLE 2268*663afb9bSAndroid Build Coastguard Worker# ":DIR[:DIR]" 2269*663afb9bSAndroid Build Coastguard Worker# string "DIR[ DIR]" will be appended to VARIABLE 2270*663afb9bSAndroid Build Coastguard Worker# "DIRP[:DIRP]::[DIRA:]DIRA" 2271*663afb9bSAndroid Build Coastguard Worker# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2272*663afb9bSAndroid Build Coastguard Worker# "DIRA[ DIRA]" will be appended to VARIABLE 2273*663afb9bSAndroid Build Coastguard Worker# "DIR[:DIR]" 2274*663afb9bSAndroid Build Coastguard Worker# VARIABLE will be replaced by "DIR[ DIR]" 2275*663afb9bSAndroid Build Coastguard Workerfunc_munge_path_list () 2276*663afb9bSAndroid Build Coastguard Worker{ 2277*663afb9bSAndroid Build Coastguard Worker case x@S|@2 in 2278*663afb9bSAndroid Build Coastguard Worker x) 2279*663afb9bSAndroid Build Coastguard Worker ;; 2280*663afb9bSAndroid Build Coastguard Worker *:) 2281*663afb9bSAndroid Build Coastguard Worker eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2282*663afb9bSAndroid Build Coastguard Worker ;; 2283*663afb9bSAndroid Build Coastguard Worker x:*) 2284*663afb9bSAndroid Build Coastguard Worker eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2285*663afb9bSAndroid Build Coastguard Worker ;; 2286*663afb9bSAndroid Build Coastguard Worker *::*) 2287*663afb9bSAndroid Build Coastguard Worker eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2288*663afb9bSAndroid Build Coastguard Worker eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2289*663afb9bSAndroid Build Coastguard Worker ;; 2290*663afb9bSAndroid Build Coastguard Worker *) 2291*663afb9bSAndroid Build Coastguard Worker eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2292*663afb9bSAndroid Build Coastguard Worker ;; 2293*663afb9bSAndroid Build Coastguard Worker esac 2294*663afb9bSAndroid Build Coastguard Worker} 2295*663afb9bSAndroid Build Coastguard Worker]])# _LT_PREPARE_PATH_LIST 2296*663afb9bSAndroid Build Coastguard Worker 2297*663afb9bSAndroid Build Coastguard Worker 2298*663afb9bSAndroid Build Coastguard Worker# _LT_SYS_DYNAMIC_LINKER([TAG]) 2299*663afb9bSAndroid Build Coastguard Worker# ----------------------------- 2300*663afb9bSAndroid Build Coastguard Worker# PORTME Fill in your ld.so characteristics 2301*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_SYS_DYNAMIC_LINKER], 2302*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2303*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl 2304*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2305*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_OBJDUMP])dnl 2306*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl 2307*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2308*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2309*663afb9bSAndroid Build Coastguard WorkerAC_MSG_CHECKING([dynamic linker characteristics]) 2310*663afb9bSAndroid Build Coastguard Workerm4_if([$1], 2311*663afb9bSAndroid Build Coastguard Worker [], [ 2312*663afb9bSAndroid Build Coastguard Workerif test yes = "$GCC"; then 2313*663afb9bSAndroid Build Coastguard Worker case $host_os in 2314*663afb9bSAndroid Build Coastguard Worker darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2315*663afb9bSAndroid Build Coastguard Worker *) lt_awk_arg='/^libraries:/' ;; 2316*663afb9bSAndroid Build Coastguard Worker esac 2317*663afb9bSAndroid Build Coastguard Worker case $host_os in 2318*663afb9bSAndroid Build Coastguard Worker mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2319*663afb9bSAndroid Build Coastguard Worker *) lt_sed_strip_eq='s|=/|/|g' ;; 2320*663afb9bSAndroid Build Coastguard Worker esac 2321*663afb9bSAndroid Build Coastguard Worker lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2322*663afb9bSAndroid Build Coastguard Worker case $lt_search_path_spec in 2323*663afb9bSAndroid Build Coastguard Worker *\;*) 2324*663afb9bSAndroid Build Coastguard Worker # if the path contains ";" then we assume it to be the separator 2325*663afb9bSAndroid Build Coastguard Worker # otherwise default to the standard path separator (i.e. ":") - it is 2326*663afb9bSAndroid Build Coastguard Worker # assumed that no part of a normal pathname contains ";" but that should 2327*663afb9bSAndroid Build Coastguard Worker # okay in the real world where ";" in dirpaths is itself problematic. 2328*663afb9bSAndroid Build Coastguard Worker lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2329*663afb9bSAndroid Build Coastguard Worker ;; 2330*663afb9bSAndroid Build Coastguard Worker *) 2331*663afb9bSAndroid Build Coastguard Worker lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2332*663afb9bSAndroid Build Coastguard Worker ;; 2333*663afb9bSAndroid Build Coastguard Worker esac 2334*663afb9bSAndroid Build Coastguard Worker # Ok, now we have the path, separated by spaces, we can step through it 2335*663afb9bSAndroid Build Coastguard Worker # and add multilib dir if necessary... 2336*663afb9bSAndroid Build Coastguard Worker lt_tmp_lt_search_path_spec= 2337*663afb9bSAndroid Build Coastguard Worker lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2338*663afb9bSAndroid Build Coastguard Worker # ...but if some path component already ends with the multilib dir we assume 2339*663afb9bSAndroid Build Coastguard Worker # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2340*663afb9bSAndroid Build Coastguard Worker case "$lt_multi_os_dir; $lt_search_path_spec " in 2341*663afb9bSAndroid Build Coastguard Worker "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2342*663afb9bSAndroid Build Coastguard Worker lt_multi_os_dir= 2343*663afb9bSAndroid Build Coastguard Worker ;; 2344*663afb9bSAndroid Build Coastguard Worker esac 2345*663afb9bSAndroid Build Coastguard Worker for lt_sys_path in $lt_search_path_spec; do 2346*663afb9bSAndroid Build Coastguard Worker if test -d "$lt_sys_path$lt_multi_os_dir"; then 2347*663afb9bSAndroid Build Coastguard Worker lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2348*663afb9bSAndroid Build Coastguard Worker elif test -n "$lt_multi_os_dir"; then 2349*663afb9bSAndroid Build Coastguard Worker test -d "$lt_sys_path" && \ 2350*663afb9bSAndroid Build Coastguard Worker lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2351*663afb9bSAndroid Build Coastguard Worker fi 2352*663afb9bSAndroid Build Coastguard Worker done 2353*663afb9bSAndroid Build Coastguard Worker lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2354*663afb9bSAndroid Build Coastguard WorkerBEGIN {RS = " "; FS = "/|\n";} { 2355*663afb9bSAndroid Build Coastguard Worker lt_foo = ""; 2356*663afb9bSAndroid Build Coastguard Worker lt_count = 0; 2357*663afb9bSAndroid Build Coastguard Worker for (lt_i = NF; lt_i > 0; lt_i--) { 2358*663afb9bSAndroid Build Coastguard Worker if ($lt_i != "" && $lt_i != ".") { 2359*663afb9bSAndroid Build Coastguard Worker if ($lt_i == "..") { 2360*663afb9bSAndroid Build Coastguard Worker lt_count++; 2361*663afb9bSAndroid Build Coastguard Worker } else { 2362*663afb9bSAndroid Build Coastguard Worker if (lt_count == 0) { 2363*663afb9bSAndroid Build Coastguard Worker lt_foo = "/" $lt_i lt_foo; 2364*663afb9bSAndroid Build Coastguard Worker } else { 2365*663afb9bSAndroid Build Coastguard Worker lt_count--; 2366*663afb9bSAndroid Build Coastguard Worker } 2367*663afb9bSAndroid Build Coastguard Worker } 2368*663afb9bSAndroid Build Coastguard Worker } 2369*663afb9bSAndroid Build Coastguard Worker } 2370*663afb9bSAndroid Build Coastguard Worker if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2371*663afb9bSAndroid Build Coastguard Worker if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2372*663afb9bSAndroid Build Coastguard Worker}'` 2373*663afb9bSAndroid Build Coastguard Worker # AWK program above erroneously prepends '/' to C:/dos/paths 2374*663afb9bSAndroid Build Coastguard Worker # for these hosts. 2375*663afb9bSAndroid Build Coastguard Worker case $host_os in 2376*663afb9bSAndroid Build Coastguard Worker mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2377*663afb9bSAndroid Build Coastguard Worker $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2378*663afb9bSAndroid Build Coastguard Worker esac 2379*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2380*663afb9bSAndroid Build Coastguard Workerelse 2381*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2382*663afb9bSAndroid Build Coastguard Workerfi]) 2383*663afb9bSAndroid Build Coastguard Workerlibrary_names_spec= 2384*663afb9bSAndroid Build Coastguard Workerlibname_spec='lib$name' 2385*663afb9bSAndroid Build Coastguard Workersoname_spec= 2386*663afb9bSAndroid Build Coastguard Workershrext_cmds=.so 2387*663afb9bSAndroid Build Coastguard Workerpostinstall_cmds= 2388*663afb9bSAndroid Build Coastguard Workerpostuninstall_cmds= 2389*663afb9bSAndroid Build Coastguard Workerfinish_cmds= 2390*663afb9bSAndroid Build Coastguard Workerfinish_eval= 2391*663afb9bSAndroid Build Coastguard Workershlibpath_var= 2392*663afb9bSAndroid Build Coastguard Workershlibpath_overrides_runpath=unknown 2393*663afb9bSAndroid Build Coastguard Workerversion_type=none 2394*663afb9bSAndroid Build Coastguard Workerdynamic_linker="$host_os ld.so" 2395*663afb9bSAndroid Build Coastguard Workersys_lib_dlsearch_path_spec="/lib /usr/lib" 2396*663afb9bSAndroid Build Coastguard Workerneed_lib_prefix=unknown 2397*663afb9bSAndroid Build Coastguard Workerhardcode_into_libs=no 2398*663afb9bSAndroid Build Coastguard Worker 2399*663afb9bSAndroid Build Coastguard Worker# when you set need_version to no, make sure it does not cause -set_version 2400*663afb9bSAndroid Build Coastguard Worker# flags to be left without arguments 2401*663afb9bSAndroid Build Coastguard Workerneed_version=unknown 2402*663afb9bSAndroid Build Coastguard Worker 2403*663afb9bSAndroid Build Coastguard WorkerAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2404*663afb9bSAndroid Build Coastguard Worker[User-defined run-time library search path.]) 2405*663afb9bSAndroid Build Coastguard Worker 2406*663afb9bSAndroid Build Coastguard Workercase $host_os in 2407*663afb9bSAndroid Build Coastguard Workeraix3*) 2408*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 2409*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2410*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LIBPATH 2411*663afb9bSAndroid Build Coastguard Worker 2412*663afb9bSAndroid Build Coastguard Worker # AIX 3 has no versioning support, so we append a major version to the name. 2413*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2414*663afb9bSAndroid Build Coastguard Worker ;; 2415*663afb9bSAndroid Build Coastguard Worker 2416*663afb9bSAndroid Build Coastguard Workeraix[[4-9]]*) 2417*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 2418*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2419*663afb9bSAndroid Build Coastguard Worker need_version=no 2420*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2421*663afb9bSAndroid Build Coastguard Worker if test ia64 = "$host_cpu"; then 2422*663afb9bSAndroid Build Coastguard Worker # AIX 5 supports IA64 2423*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2424*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 2425*663afb9bSAndroid Build Coastguard Worker else 2426*663afb9bSAndroid Build Coastguard Worker # With GCC up to 2.95.x, collect2 would create an import file 2427*663afb9bSAndroid Build Coastguard Worker # for dependence libraries. The import file would start with 2428*663afb9bSAndroid Build Coastguard Worker # the line '#! .'. This would cause the generated library to 2429*663afb9bSAndroid Build Coastguard Worker # depend on '.', always an invalid library. This was fixed in 2430*663afb9bSAndroid Build Coastguard Worker # development snapshots of GCC prior to 3.0. 2431*663afb9bSAndroid Build Coastguard Worker case $host_os in 2432*663afb9bSAndroid Build Coastguard Worker aix4 | aix4.[[01]] | aix4.[[01]].*) 2433*663afb9bSAndroid Build Coastguard Worker if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2434*663afb9bSAndroid Build Coastguard Worker echo ' yes ' 2435*663afb9bSAndroid Build Coastguard Worker echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2436*663afb9bSAndroid Build Coastguard Worker : 2437*663afb9bSAndroid Build Coastguard Worker else 2438*663afb9bSAndroid Build Coastguard Worker can_build_shared=no 2439*663afb9bSAndroid Build Coastguard Worker fi 2440*663afb9bSAndroid Build Coastguard Worker ;; 2441*663afb9bSAndroid Build Coastguard Worker esac 2442*663afb9bSAndroid Build Coastguard Worker # Using Import Files as archive members, it is possible to support 2443*663afb9bSAndroid Build Coastguard Worker # filename-based versioning of shared library archives on AIX. While 2444*663afb9bSAndroid Build Coastguard Worker # this would work for both with and without runtime linking, it will 2445*663afb9bSAndroid Build Coastguard Worker # prevent static linking of such archives. So we do filename-based 2446*663afb9bSAndroid Build Coastguard Worker # shared library versioning with .so extension only, which is used 2447*663afb9bSAndroid Build Coastguard Worker # when both runtime linking and shared linking is enabled. 2448*663afb9bSAndroid Build Coastguard Worker # Unfortunately, runtime linking may impact performance, so we do 2449*663afb9bSAndroid Build Coastguard Worker # not want this to be the default eventually. Also, we use the 2450*663afb9bSAndroid Build Coastguard Worker # versioned .so libs for executables only if there is the -brtl 2451*663afb9bSAndroid Build Coastguard Worker # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2452*663afb9bSAndroid Build Coastguard Worker # To allow for filename-based versioning support, we need to create 2453*663afb9bSAndroid Build Coastguard Worker # libNAME.so.V as an archive file, containing: 2454*663afb9bSAndroid Build Coastguard Worker # *) an Import File, referring to the versioned filename of the 2455*663afb9bSAndroid Build Coastguard Worker # archive as well as the shared archive member, telling the 2456*663afb9bSAndroid Build Coastguard Worker # bitwidth (32 or 64) of that shared object, and providing the 2457*663afb9bSAndroid Build Coastguard Worker # list of exported symbols of that shared object, eventually 2458*663afb9bSAndroid Build Coastguard Worker # decorated with the 'weak' keyword 2459*663afb9bSAndroid Build Coastguard Worker # *) the shared object with the F_LOADONLY flag set, to really avoid 2460*663afb9bSAndroid Build Coastguard Worker # it being seen by the linker. 2461*663afb9bSAndroid Build Coastguard Worker # At run time we better use the real file rather than another symlink, 2462*663afb9bSAndroid Build Coastguard Worker # but for link time we create the symlink libNAME.so -> libNAME.so.V 2463*663afb9bSAndroid Build Coastguard Worker 2464*663afb9bSAndroid Build Coastguard Worker case $with_aix_soname,$aix_use_runtimelinking in 2465*663afb9bSAndroid Build Coastguard Worker # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2466*663afb9bSAndroid Build Coastguard Worker # soname into executable. Probably we can add versioning support to 2467*663afb9bSAndroid Build Coastguard Worker # collect2, so additional links can be useful in future. 2468*663afb9bSAndroid Build Coastguard Worker aix,yes) # traditional libtool 2469*663afb9bSAndroid Build Coastguard Worker dynamic_linker='AIX unversionable lib.so' 2470*663afb9bSAndroid Build Coastguard Worker # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2471*663afb9bSAndroid Build Coastguard Worker # instead of lib<name>.a to let people know that these are not 2472*663afb9bSAndroid Build Coastguard Worker # typical AIX shared libraries. 2473*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2474*663afb9bSAndroid Build Coastguard Worker ;; 2475*663afb9bSAndroid Build Coastguard Worker aix,no) # traditional AIX only 2476*663afb9bSAndroid Build Coastguard Worker dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2477*663afb9bSAndroid Build Coastguard Worker # We preserve .a as extension for shared libraries through AIX4.2 2478*663afb9bSAndroid Build Coastguard Worker # and later when we are not doing run time linking. 2479*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release.a $libname.a' 2480*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2481*663afb9bSAndroid Build Coastguard Worker ;; 2482*663afb9bSAndroid Build Coastguard Worker svr4,*) # full svr4 only 2483*663afb9bSAndroid Build Coastguard Worker dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2484*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2485*663afb9bSAndroid Build Coastguard Worker # We do not specify a path in Import Files, so LIBPATH fires. 2486*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 2487*663afb9bSAndroid Build Coastguard Worker ;; 2488*663afb9bSAndroid Build Coastguard Worker *,yes) # both, prefer svr4 2489*663afb9bSAndroid Build Coastguard Worker dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2490*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2491*663afb9bSAndroid Build Coastguard Worker # unpreferred sharedlib libNAME.a needs extra handling 2492*663afb9bSAndroid Build Coastguard Worker 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"' 2493*663afb9bSAndroid Build Coastguard Worker 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"' 2494*663afb9bSAndroid Build Coastguard Worker # We do not specify a path in Import Files, so LIBPATH fires. 2495*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 2496*663afb9bSAndroid Build Coastguard Worker ;; 2497*663afb9bSAndroid Build Coastguard Worker *,no) # both, prefer aix 2498*663afb9bSAndroid Build Coastguard Worker dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2499*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release.a $libname.a' 2500*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2501*663afb9bSAndroid Build Coastguard Worker # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2502*663afb9bSAndroid Build Coastguard Worker 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)' 2503*663afb9bSAndroid Build Coastguard Worker 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"' 2504*663afb9bSAndroid Build Coastguard Worker ;; 2505*663afb9bSAndroid Build Coastguard Worker esac 2506*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LIBPATH 2507*663afb9bSAndroid Build Coastguard Worker fi 2508*663afb9bSAndroid Build Coastguard Worker ;; 2509*663afb9bSAndroid Build Coastguard Worker 2510*663afb9bSAndroid Build Coastguard Workeramigaos*) 2511*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 2512*663afb9bSAndroid Build Coastguard Worker powerpc) 2513*663afb9bSAndroid Build Coastguard Worker # Since July 2007 AmigaOS4 officially supports .so libraries. 2514*663afb9bSAndroid Build Coastguard Worker # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2515*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2516*663afb9bSAndroid Build Coastguard Worker ;; 2517*663afb9bSAndroid Build Coastguard Worker m68k) 2518*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname.ixlibrary $libname.a' 2519*663afb9bSAndroid Build Coastguard Worker # Create ${libname}_ixlibrary.a entries in /sys/libs. 2520*663afb9bSAndroid Build Coastguard Worker 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' 2521*663afb9bSAndroid Build Coastguard Worker ;; 2522*663afb9bSAndroid Build Coastguard Worker esac 2523*663afb9bSAndroid Build Coastguard Worker ;; 2524*663afb9bSAndroid Build Coastguard Worker 2525*663afb9bSAndroid Build Coastguard Workerbeos*) 2526*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$shared_ext' 2527*663afb9bSAndroid Build Coastguard Worker dynamic_linker="$host_os ld.so" 2528*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LIBRARY_PATH 2529*663afb9bSAndroid Build Coastguard Worker ;; 2530*663afb9bSAndroid Build Coastguard Worker 2531*663afb9bSAndroid Build Coastguard Workerbsdi[[45]]*) 2532*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 2533*663afb9bSAndroid Build Coastguard Worker need_version=no 2534*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2535*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2536*663afb9bSAndroid Build Coastguard Worker finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2537*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 2538*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2539*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2540*663afb9bSAndroid Build Coastguard Worker # the default ld.so.conf also contains /usr/contrib/lib and 2541*663afb9bSAndroid Build Coastguard Worker # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2542*663afb9bSAndroid Build Coastguard Worker # libtool to hard-code these into programs 2543*663afb9bSAndroid Build Coastguard Worker ;; 2544*663afb9bSAndroid Build Coastguard Worker 2545*663afb9bSAndroid Build Coastguard Workercygwin* | mingw* | pw32* | cegcc*) 2546*663afb9bSAndroid Build Coastguard Worker version_type=windows 2547*663afb9bSAndroid Build Coastguard Worker shrext_cmds=.dll 2548*663afb9bSAndroid Build Coastguard Worker need_version=no 2549*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2550*663afb9bSAndroid Build Coastguard Worker 2551*663afb9bSAndroid Build Coastguard Worker case $GCC,$cc_basename in 2552*663afb9bSAndroid Build Coastguard Worker yes,*) 2553*663afb9bSAndroid Build Coastguard Worker # gcc 2554*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname.dll.a' 2555*663afb9bSAndroid Build Coastguard Worker # DLL is installed to $(libdir)/../bin by postinstall_cmds 2556*663afb9bSAndroid Build Coastguard Worker postinstall_cmds='base_file=`basename \$file`~ 2557*663afb9bSAndroid Build Coastguard Worker dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2558*663afb9bSAndroid Build Coastguard Worker dldir=$destdir/`dirname \$dlpath`~ 2559*663afb9bSAndroid Build Coastguard Worker test -d \$dldir || mkdir -p \$dldir~ 2560*663afb9bSAndroid Build Coastguard Worker $install_prog $dir/$dlname \$dldir/$dlname~ 2561*663afb9bSAndroid Build Coastguard Worker chmod a+x \$dldir/$dlname~ 2562*663afb9bSAndroid Build Coastguard Worker if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2563*663afb9bSAndroid Build Coastguard Worker eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2564*663afb9bSAndroid Build Coastguard Worker fi' 2565*663afb9bSAndroid Build Coastguard Worker postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2566*663afb9bSAndroid Build Coastguard Worker dlpath=$dir/\$dldll~ 2567*663afb9bSAndroid Build Coastguard Worker $RM \$dlpath' 2568*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 2569*663afb9bSAndroid Build Coastguard Worker 2570*663afb9bSAndroid Build Coastguard Worker case $host_os in 2571*663afb9bSAndroid Build Coastguard Worker cygwin*) 2572*663afb9bSAndroid Build Coastguard Worker # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2573*663afb9bSAndroid Build Coastguard Worker soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2574*663afb9bSAndroid Build Coastguard Workerm4_if([$1], [],[ 2575*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2576*663afb9bSAndroid Build Coastguard Worker ;; 2577*663afb9bSAndroid Build Coastguard Worker mingw* | cegcc*) 2578*663afb9bSAndroid Build Coastguard Worker # MinGW DLLs use traditional 'lib' prefix 2579*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2580*663afb9bSAndroid Build Coastguard Worker ;; 2581*663afb9bSAndroid Build Coastguard Worker pw32*) 2582*663afb9bSAndroid Build Coastguard Worker # pw32 DLLs use 'pw' prefix rather than 'lib' 2583*663afb9bSAndroid Build Coastguard Worker library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2584*663afb9bSAndroid Build Coastguard Worker ;; 2585*663afb9bSAndroid Build Coastguard Worker esac 2586*663afb9bSAndroid Build Coastguard Worker dynamic_linker='Win32 ld.exe' 2587*663afb9bSAndroid Build Coastguard Worker ;; 2588*663afb9bSAndroid Build Coastguard Worker 2589*663afb9bSAndroid Build Coastguard Worker *,cl* | *,icl*) 2590*663afb9bSAndroid Build Coastguard Worker # Native MSVC or ICC 2591*663afb9bSAndroid Build Coastguard Worker libname_spec='$name' 2592*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2593*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname.dll.lib' 2594*663afb9bSAndroid Build Coastguard Worker 2595*663afb9bSAndroid Build Coastguard Worker case $build_os in 2596*663afb9bSAndroid Build Coastguard Worker mingw*) 2597*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec= 2598*663afb9bSAndroid Build Coastguard Worker lt_save_ifs=$IFS 2599*663afb9bSAndroid Build Coastguard Worker IFS=';' 2600*663afb9bSAndroid Build Coastguard Worker for lt_path in $LIB 2601*663afb9bSAndroid Build Coastguard Worker do 2602*663afb9bSAndroid Build Coastguard Worker IFS=$lt_save_ifs 2603*663afb9bSAndroid Build Coastguard Worker # Let DOS variable expansion print the short 8.3 style file name. 2604*663afb9bSAndroid Build Coastguard Worker lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2605*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2606*663afb9bSAndroid Build Coastguard Worker done 2607*663afb9bSAndroid Build Coastguard Worker IFS=$lt_save_ifs 2608*663afb9bSAndroid Build Coastguard Worker # Convert to MSYS style. 2609*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2610*663afb9bSAndroid Build Coastguard Worker ;; 2611*663afb9bSAndroid Build Coastguard Worker cygwin*) 2612*663afb9bSAndroid Build Coastguard Worker # Convert to unix form, then to dos form, then back to unix form 2613*663afb9bSAndroid Build Coastguard Worker # but this time dos style (no spaces!) so that the unix form looks 2614*663afb9bSAndroid Build Coastguard Worker # like /cygdrive/c/PROGRA~1:/cygdr... 2615*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2616*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2617*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2618*663afb9bSAndroid Build Coastguard Worker ;; 2619*663afb9bSAndroid Build Coastguard Worker *) 2620*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec=$LIB 2621*663afb9bSAndroid Build Coastguard Worker if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2622*663afb9bSAndroid Build Coastguard Worker # It is most probably a Windows format PATH. 2623*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2624*663afb9bSAndroid Build Coastguard Worker else 2625*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2626*663afb9bSAndroid Build Coastguard Worker fi 2627*663afb9bSAndroid Build Coastguard Worker # FIXME: find the short name or the path components, as spaces are 2628*663afb9bSAndroid Build Coastguard Worker # common. (e.g. "Program Files" -> "PROGRA~1") 2629*663afb9bSAndroid Build Coastguard Worker ;; 2630*663afb9bSAndroid Build Coastguard Worker esac 2631*663afb9bSAndroid Build Coastguard Worker 2632*663afb9bSAndroid Build Coastguard Worker # DLL is installed to $(libdir)/../bin by postinstall_cmds 2633*663afb9bSAndroid Build Coastguard Worker postinstall_cmds='base_file=`basename \$file`~ 2634*663afb9bSAndroid Build Coastguard Worker dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2635*663afb9bSAndroid Build Coastguard Worker dldir=$destdir/`dirname \$dlpath`~ 2636*663afb9bSAndroid Build Coastguard Worker test -d \$dldir || mkdir -p \$dldir~ 2637*663afb9bSAndroid Build Coastguard Worker $install_prog $dir/$dlname \$dldir/$dlname' 2638*663afb9bSAndroid Build Coastguard Worker postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2639*663afb9bSAndroid Build Coastguard Worker dlpath=$dir/\$dldll~ 2640*663afb9bSAndroid Build Coastguard Worker $RM \$dlpath' 2641*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 2642*663afb9bSAndroid Build Coastguard Worker dynamic_linker='Win32 link.exe' 2643*663afb9bSAndroid Build Coastguard Worker ;; 2644*663afb9bSAndroid Build Coastguard Worker 2645*663afb9bSAndroid Build Coastguard Worker *) 2646*663afb9bSAndroid Build Coastguard Worker # Assume MSVC and ICC wrapper 2647*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2648*663afb9bSAndroid Build Coastguard Worker dynamic_linker='Win32 ld.exe' 2649*663afb9bSAndroid Build Coastguard Worker ;; 2650*663afb9bSAndroid Build Coastguard Worker esac 2651*663afb9bSAndroid Build Coastguard Worker # FIXME: first we should search . and the directory the executable is in 2652*663afb9bSAndroid Build Coastguard Worker shlibpath_var=PATH 2653*663afb9bSAndroid Build Coastguard Worker ;; 2654*663afb9bSAndroid Build Coastguard Worker 2655*663afb9bSAndroid Build Coastguard Workerdarwin* | rhapsody*) 2656*663afb9bSAndroid Build Coastguard Worker dynamic_linker="$host_os dyld" 2657*663afb9bSAndroid Build Coastguard Worker version_type=darwin 2658*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2659*663afb9bSAndroid Build Coastguard Worker need_version=no 2660*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2661*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$major$shared_ext' 2662*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 2663*663afb9bSAndroid Build Coastguard Worker shlibpath_var=DYLD_LIBRARY_PATH 2664*663afb9bSAndroid Build Coastguard Worker shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2665*663afb9bSAndroid Build Coastguard Workerm4_if([$1], [],[ 2666*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2667*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2668*663afb9bSAndroid Build Coastguard Worker ;; 2669*663afb9bSAndroid Build Coastguard Worker 2670*663afb9bSAndroid Build Coastguard Workerdgux*) 2671*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 2672*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2673*663afb9bSAndroid Build Coastguard Worker need_version=no 2674*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2675*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2676*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 2677*663afb9bSAndroid Build Coastguard Worker ;; 2678*663afb9bSAndroid Build Coastguard Worker 2679*663afb9bSAndroid Build Coastguard Workerfreebsd* | dragonfly*) 2680*663afb9bSAndroid Build Coastguard Worker # DragonFly does not have aout. When/if they implement a new 2681*663afb9bSAndroid Build Coastguard Worker # versioning mechanism, adjust this. 2682*663afb9bSAndroid Build Coastguard Worker if test -x /usr/bin/objformat; then 2683*663afb9bSAndroid Build Coastguard Worker objformat=`/usr/bin/objformat` 2684*663afb9bSAndroid Build Coastguard Worker else 2685*663afb9bSAndroid Build Coastguard Worker case $host_os in 2686*663afb9bSAndroid Build Coastguard Worker freebsd[[23]].*) objformat=aout ;; 2687*663afb9bSAndroid Build Coastguard Worker *) objformat=elf ;; 2688*663afb9bSAndroid Build Coastguard Worker esac 2689*663afb9bSAndroid Build Coastguard Worker fi 2690*663afb9bSAndroid Build Coastguard Worker version_type=freebsd-$objformat 2691*663afb9bSAndroid Build Coastguard Worker case $version_type in 2692*663afb9bSAndroid Build Coastguard Worker freebsd-elf*) 2693*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2694*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2695*663afb9bSAndroid Build Coastguard Worker need_version=no 2696*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2697*663afb9bSAndroid Build Coastguard Worker ;; 2698*663afb9bSAndroid Build Coastguard Worker freebsd-*) 2699*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2700*663afb9bSAndroid Build Coastguard Worker need_version=yes 2701*663afb9bSAndroid Build Coastguard Worker ;; 2702*663afb9bSAndroid Build Coastguard Worker esac 2703*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 2704*663afb9bSAndroid Build Coastguard Worker case $host_os in 2705*663afb9bSAndroid Build Coastguard Worker freebsd2.*) 2706*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 2707*663afb9bSAndroid Build Coastguard Worker ;; 2708*663afb9bSAndroid Build Coastguard Worker freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2709*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 2710*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2711*663afb9bSAndroid Build Coastguard Worker ;; 2712*663afb9bSAndroid Build Coastguard Worker freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2713*663afb9bSAndroid Build Coastguard Worker freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2714*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=no 2715*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2716*663afb9bSAndroid Build Coastguard Worker ;; 2717*663afb9bSAndroid Build Coastguard Worker *) # from 4.6 on, and DragonFly 2718*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 2719*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2720*663afb9bSAndroid Build Coastguard Worker ;; 2721*663afb9bSAndroid Build Coastguard Worker esac 2722*663afb9bSAndroid Build Coastguard Worker ;; 2723*663afb9bSAndroid Build Coastguard Worker 2724*663afb9bSAndroid Build Coastguard Workerhaiku*) 2725*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 2726*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2727*663afb9bSAndroid Build Coastguard Worker need_version=no 2728*663afb9bSAndroid Build Coastguard Worker dynamic_linker="$host_os runtime_loader" 2729*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2730*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2731*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LIBRARY_PATH 2732*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=no 2733*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2734*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2735*663afb9bSAndroid Build Coastguard Worker ;; 2736*663afb9bSAndroid Build Coastguard Worker 2737*663afb9bSAndroid Build Coastguard Workerhpux9* | hpux10* | hpux11*) 2738*663afb9bSAndroid Build Coastguard Worker # Give a soname corresponding to the major version so that dld.sl refuses to 2739*663afb9bSAndroid Build Coastguard Worker # link against other versions. 2740*663afb9bSAndroid Build Coastguard Worker version_type=sunos 2741*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2742*663afb9bSAndroid Build Coastguard Worker need_version=no 2743*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 2744*663afb9bSAndroid Build Coastguard Worker ia64*) 2745*663afb9bSAndroid Build Coastguard Worker shrext_cmds='.so' 2746*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2747*663afb9bSAndroid Build Coastguard Worker dynamic_linker="$host_os dld.so" 2748*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 2749*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2750*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2751*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2752*663afb9bSAndroid Build Coastguard Worker if test 32 = "$HPUX_IA64_MODE"; then 2753*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2754*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2755*663afb9bSAndroid Build Coastguard Worker else 2756*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2757*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2758*663afb9bSAndroid Build Coastguard Worker fi 2759*663afb9bSAndroid Build Coastguard Worker ;; 2760*663afb9bSAndroid Build Coastguard Worker hppa*64*) 2761*663afb9bSAndroid Build Coastguard Worker shrext_cmds='.sl' 2762*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2763*663afb9bSAndroid Build Coastguard Worker dynamic_linker="$host_os dld.sl" 2764*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2765*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2766*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2767*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2768*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2769*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2770*663afb9bSAndroid Build Coastguard Worker ;; 2771*663afb9bSAndroid Build Coastguard Worker *) 2772*663afb9bSAndroid Build Coastguard Worker shrext_cmds='.sl' 2773*663afb9bSAndroid Build Coastguard Worker dynamic_linker="$host_os dld.sl" 2774*663afb9bSAndroid Build Coastguard Worker shlibpath_var=SHLIB_PATH 2775*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2776*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2777*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2778*663afb9bSAndroid Build Coastguard Worker ;; 2779*663afb9bSAndroid Build Coastguard Worker esac 2780*663afb9bSAndroid Build Coastguard Worker # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2781*663afb9bSAndroid Build Coastguard Worker postinstall_cmds='chmod 555 $lib' 2782*663afb9bSAndroid Build Coastguard Worker # or fails outright, so override atomically: 2783*663afb9bSAndroid Build Coastguard Worker install_override_mode=555 2784*663afb9bSAndroid Build Coastguard Worker ;; 2785*663afb9bSAndroid Build Coastguard Worker 2786*663afb9bSAndroid Build Coastguard Workerinterix[[3-9]]*) 2787*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 2788*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2789*663afb9bSAndroid Build Coastguard Worker need_version=no 2790*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2791*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2792*663afb9bSAndroid Build Coastguard Worker dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2793*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 2794*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=no 2795*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2796*663afb9bSAndroid Build Coastguard Worker ;; 2797*663afb9bSAndroid Build Coastguard Worker 2798*663afb9bSAndroid Build Coastguard Workeririx5* | irix6* | nonstopux*) 2799*663afb9bSAndroid Build Coastguard Worker case $host_os in 2800*663afb9bSAndroid Build Coastguard Worker nonstopux*) version_type=nonstopux ;; 2801*663afb9bSAndroid Build Coastguard Worker *) 2802*663afb9bSAndroid Build Coastguard Worker if test yes = "$lt_cv_prog_gnu_ld"; then 2803*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 2804*663afb9bSAndroid Build Coastguard Worker else 2805*663afb9bSAndroid Build Coastguard Worker version_type=irix 2806*663afb9bSAndroid Build Coastguard Worker fi ;; 2807*663afb9bSAndroid Build Coastguard Worker esac 2808*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2809*663afb9bSAndroid Build Coastguard Worker need_version=no 2810*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2811*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2812*663afb9bSAndroid Build Coastguard Worker case $host_os in 2813*663afb9bSAndroid Build Coastguard Worker irix5* | nonstopux*) 2814*663afb9bSAndroid Build Coastguard Worker libsuff= shlibsuff= 2815*663afb9bSAndroid Build Coastguard Worker ;; 2816*663afb9bSAndroid Build Coastguard Worker *) 2817*663afb9bSAndroid Build Coastguard Worker case $LD in # libtool.m4 will add one of these switches to LD 2818*663afb9bSAndroid Build Coastguard Worker *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2819*663afb9bSAndroid Build Coastguard Worker libsuff= shlibsuff= libmagic=32-bit;; 2820*663afb9bSAndroid Build Coastguard Worker *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2821*663afb9bSAndroid Build Coastguard Worker libsuff=32 shlibsuff=N32 libmagic=N32;; 2822*663afb9bSAndroid Build Coastguard Worker *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2823*663afb9bSAndroid Build Coastguard Worker libsuff=64 shlibsuff=64 libmagic=64-bit;; 2824*663afb9bSAndroid Build Coastguard Worker *) libsuff= shlibsuff= libmagic=never-match;; 2825*663afb9bSAndroid Build Coastguard Worker esac 2826*663afb9bSAndroid Build Coastguard Worker ;; 2827*663afb9bSAndroid Build Coastguard Worker esac 2828*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2829*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=no 2830*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2831*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2832*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2833*663afb9bSAndroid Build Coastguard Worker ;; 2834*663afb9bSAndroid Build Coastguard Worker 2835*663afb9bSAndroid Build Coastguard Worker# No shared lib support for Linux oldld, aout, or coff. 2836*663afb9bSAndroid Build Coastguard Workerlinux*oldld* | linux*aout* | linux*coff*) 2837*663afb9bSAndroid Build Coastguard Worker dynamic_linker=no 2838*663afb9bSAndroid Build Coastguard Worker ;; 2839*663afb9bSAndroid Build Coastguard Worker 2840*663afb9bSAndroid Build Coastguard Workerlinux*android*) 2841*663afb9bSAndroid Build Coastguard Worker version_type=none # Android doesn't support versioned libraries. 2842*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2843*663afb9bSAndroid Build Coastguard Worker need_version=no 2844*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext' 2845*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext' 2846*663afb9bSAndroid Build Coastguard Worker finish_cmds= 2847*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 2848*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 2849*663afb9bSAndroid Build Coastguard Worker 2850*663afb9bSAndroid Build Coastguard Worker # This implies no fast_install, which is unacceptable. 2851*663afb9bSAndroid Build Coastguard Worker # Some rework will be needed to allow for fast_install 2852*663afb9bSAndroid Build Coastguard Worker # before this can be enabled. 2853*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2854*663afb9bSAndroid Build Coastguard Worker 2855*663afb9bSAndroid Build Coastguard Worker dynamic_linker='Android linker' 2856*663afb9bSAndroid Build Coastguard Worker # Don't embed -rpath directories since the linker doesn't support them. 2857*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2858*663afb9bSAndroid Build Coastguard Worker ;; 2859*663afb9bSAndroid Build Coastguard Worker 2860*663afb9bSAndroid Build Coastguard Worker# This must be glibc/ELF. 2861*663afb9bSAndroid Build Coastguard Workerlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2862*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 2863*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2864*663afb9bSAndroid Build Coastguard Worker need_version=no 2865*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2866*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2867*663afb9bSAndroid Build Coastguard Worker finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2868*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 2869*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=no 2870*663afb9bSAndroid Build Coastguard Worker 2871*663afb9bSAndroid Build Coastguard Worker # Some binutils ld are patched to set DT_RUNPATH 2872*663afb9bSAndroid Build Coastguard Worker AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2873*663afb9bSAndroid Build Coastguard Worker [lt_cv_shlibpath_overrides_runpath=no 2874*663afb9bSAndroid Build Coastguard Worker save_LDFLAGS=$LDFLAGS 2875*663afb9bSAndroid Build Coastguard Worker save_libdir=$libdir 2876*663afb9bSAndroid Build Coastguard Worker eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2877*663afb9bSAndroid Build Coastguard Worker LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2878*663afb9bSAndroid Build Coastguard Worker AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2879*663afb9bSAndroid Build Coastguard Worker [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2880*663afb9bSAndroid Build Coastguard Worker [lt_cv_shlibpath_overrides_runpath=yes])]) 2881*663afb9bSAndroid Build Coastguard Worker LDFLAGS=$save_LDFLAGS 2882*663afb9bSAndroid Build Coastguard Worker libdir=$save_libdir 2883*663afb9bSAndroid Build Coastguard Worker ]) 2884*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2885*663afb9bSAndroid Build Coastguard Worker 2886*663afb9bSAndroid Build Coastguard Worker # This implies no fast_install, which is unacceptable. 2887*663afb9bSAndroid Build Coastguard Worker # Some rework will be needed to allow for fast_install 2888*663afb9bSAndroid Build Coastguard Worker # before this can be enabled. 2889*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2890*663afb9bSAndroid Build Coastguard Worker 2891*663afb9bSAndroid Build Coastguard Worker # Ideally, we could use ldconfig to report *all* directores which are 2892*663afb9bSAndroid Build Coastguard Worker # searched for libraries, however this is still not possible. Aside from not 2893*663afb9bSAndroid Build Coastguard Worker # being certain /sbin/ldconfig is available, command 2894*663afb9bSAndroid Build Coastguard Worker # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2895*663afb9bSAndroid Build Coastguard Worker # even though it is searched at run-time. Try to do the best guess by 2896*663afb9bSAndroid Build Coastguard Worker # appending ld.so.conf contents (and includes) to the search path. 2897*663afb9bSAndroid Build Coastguard Worker if test -f /etc/ld.so.conf; then 2898*663afb9bSAndroid Build Coastguard Worker 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' ' '` 2899*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2900*663afb9bSAndroid Build Coastguard Worker fi 2901*663afb9bSAndroid Build Coastguard Worker 2902*663afb9bSAndroid Build Coastguard Worker # We used to test for /lib/ld.so.1 and disable shared libraries on 2903*663afb9bSAndroid Build Coastguard Worker # powerpc, because MkLinux only supported shared libraries with the 2904*663afb9bSAndroid Build Coastguard Worker # GNU dynamic linker. Since this was broken with cross compilers, 2905*663afb9bSAndroid Build Coastguard Worker # most powerpc-linux boxes support dynamic linking these days and 2906*663afb9bSAndroid Build Coastguard Worker # people can always --disable-shared, the test was removed, and we 2907*663afb9bSAndroid Build Coastguard Worker # assume the GNU/Linux dynamic linker is in use. 2908*663afb9bSAndroid Build Coastguard Worker dynamic_linker='GNU/Linux ld.so' 2909*663afb9bSAndroid Build Coastguard Worker ;; 2910*663afb9bSAndroid Build Coastguard Worker 2911*663afb9bSAndroid Build Coastguard Workernetbsd*) 2912*663afb9bSAndroid Build Coastguard Worker version_type=sunos 2913*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2914*663afb9bSAndroid Build Coastguard Worker need_version=no 2915*663afb9bSAndroid Build Coastguard Worker if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2916*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2917*663afb9bSAndroid Build Coastguard Worker finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2918*663afb9bSAndroid Build Coastguard Worker dynamic_linker='NetBSD (a.out) ld.so' 2919*663afb9bSAndroid Build Coastguard Worker else 2920*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2921*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2922*663afb9bSAndroid Build Coastguard Worker dynamic_linker='NetBSD ld.elf_so' 2923*663afb9bSAndroid Build Coastguard Worker fi 2924*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 2925*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 2926*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2927*663afb9bSAndroid Build Coastguard Worker ;; 2928*663afb9bSAndroid Build Coastguard Worker 2929*663afb9bSAndroid Build Coastguard Workernewsos6) 2930*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 2931*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2932*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 2933*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 2934*663afb9bSAndroid Build Coastguard Worker ;; 2935*663afb9bSAndroid Build Coastguard Worker 2936*663afb9bSAndroid Build Coastguard Worker*nto* | *qnx*) 2937*663afb9bSAndroid Build Coastguard Worker version_type=qnx 2938*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2939*663afb9bSAndroid Build Coastguard Worker need_version=no 2940*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2941*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2942*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 2943*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=no 2944*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 2945*663afb9bSAndroid Build Coastguard Worker dynamic_linker='ldqnx.so' 2946*663afb9bSAndroid Build Coastguard Worker ;; 2947*663afb9bSAndroid Build Coastguard Worker 2948*663afb9bSAndroid Build Coastguard Workeropenbsd* | bitrig*) 2949*663afb9bSAndroid Build Coastguard Worker version_type=sunos 2950*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec=/usr/lib 2951*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2952*663afb9bSAndroid Build Coastguard Worker if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2953*663afb9bSAndroid Build Coastguard Worker need_version=no 2954*663afb9bSAndroid Build Coastguard Worker else 2955*663afb9bSAndroid Build Coastguard Worker need_version=yes 2956*663afb9bSAndroid Build Coastguard Worker fi 2957*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2958*663afb9bSAndroid Build Coastguard Worker finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2959*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 2960*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 2961*663afb9bSAndroid Build Coastguard Worker ;; 2962*663afb9bSAndroid Build Coastguard Worker 2963*663afb9bSAndroid Build Coastguard Workeros2*) 2964*663afb9bSAndroid Build Coastguard Worker libname_spec='$name' 2965*663afb9bSAndroid Build Coastguard Worker version_type=windows 2966*663afb9bSAndroid Build Coastguard Worker shrext_cmds=.dll 2967*663afb9bSAndroid Build Coastguard Worker need_version=no 2968*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2969*663afb9bSAndroid Build Coastguard Worker # OS/2 can only load a DLL with a base name of 8 characters or less. 2970*663afb9bSAndroid Build Coastguard Worker soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2971*663afb9bSAndroid Build Coastguard Worker v=$($ECHO $release$versuffix | tr -d .-); 2972*663afb9bSAndroid Build Coastguard Worker n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2973*663afb9bSAndroid Build Coastguard Worker $ECHO $n$v`$shared_ext' 2974*663afb9bSAndroid Build Coastguard Worker library_names_spec='${libname}_dll.$libext' 2975*663afb9bSAndroid Build Coastguard Worker dynamic_linker='OS/2 ld.exe' 2976*663afb9bSAndroid Build Coastguard Worker shlibpath_var=BEGINLIBPATH 2977*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2978*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2979*663afb9bSAndroid Build Coastguard Worker postinstall_cmds='base_file=`basename \$file`~ 2980*663afb9bSAndroid Build Coastguard Worker dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2981*663afb9bSAndroid Build Coastguard Worker dldir=$destdir/`dirname \$dlpath`~ 2982*663afb9bSAndroid Build Coastguard Worker test -d \$dldir || mkdir -p \$dldir~ 2983*663afb9bSAndroid Build Coastguard Worker $install_prog $dir/$dlname \$dldir/$dlname~ 2984*663afb9bSAndroid Build Coastguard Worker chmod a+x \$dldir/$dlname~ 2985*663afb9bSAndroid Build Coastguard Worker if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2986*663afb9bSAndroid Build Coastguard Worker eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2987*663afb9bSAndroid Build Coastguard Worker fi' 2988*663afb9bSAndroid Build Coastguard Worker postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2989*663afb9bSAndroid Build Coastguard Worker dlpath=$dir/\$dldll~ 2990*663afb9bSAndroid Build Coastguard Worker $RM \$dlpath' 2991*663afb9bSAndroid Build Coastguard Worker ;; 2992*663afb9bSAndroid Build Coastguard Worker 2993*663afb9bSAndroid Build Coastguard Workerosf3* | osf4* | osf5*) 2994*663afb9bSAndroid Build Coastguard Worker version_type=osf 2995*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 2996*663afb9bSAndroid Build Coastguard Worker need_version=no 2997*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 2998*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2999*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 3000*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3001*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3002*663afb9bSAndroid Build Coastguard Worker ;; 3003*663afb9bSAndroid Build Coastguard Worker 3004*663afb9bSAndroid Build Coastguard Workerrdos*) 3005*663afb9bSAndroid Build Coastguard Worker dynamic_linker=no 3006*663afb9bSAndroid Build Coastguard Worker ;; 3007*663afb9bSAndroid Build Coastguard Worker 3008*663afb9bSAndroid Build Coastguard Workersolaris*) 3009*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 3010*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 3011*663afb9bSAndroid Build Coastguard Worker need_version=no 3012*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3013*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 3014*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 3015*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 3016*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 3017*663afb9bSAndroid Build Coastguard Worker # ldd complains unless libraries are executable 3018*663afb9bSAndroid Build Coastguard Worker postinstall_cmds='chmod +x $lib' 3019*663afb9bSAndroid Build Coastguard Worker ;; 3020*663afb9bSAndroid Build Coastguard Worker 3021*663afb9bSAndroid Build Coastguard Workersunos4*) 3022*663afb9bSAndroid Build Coastguard Worker version_type=sunos 3023*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3024*663afb9bSAndroid Build Coastguard Worker finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3025*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 3026*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 3027*663afb9bSAndroid Build Coastguard Worker if test yes = "$with_gnu_ld"; then 3028*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 3029*663afb9bSAndroid Build Coastguard Worker fi 3030*663afb9bSAndroid Build Coastguard Worker need_version=yes 3031*663afb9bSAndroid Build Coastguard Worker ;; 3032*663afb9bSAndroid Build Coastguard Worker 3033*663afb9bSAndroid Build Coastguard Workersysv4 | sysv4.3*) 3034*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 3035*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3036*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 3037*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 3038*663afb9bSAndroid Build Coastguard Worker case $host_vendor in 3039*663afb9bSAndroid Build Coastguard Worker sni) 3040*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=no 3041*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 3042*663afb9bSAndroid Build Coastguard Worker runpath_var=LD_RUN_PATH 3043*663afb9bSAndroid Build Coastguard Worker ;; 3044*663afb9bSAndroid Build Coastguard Worker siemens) 3045*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 3046*663afb9bSAndroid Build Coastguard Worker ;; 3047*663afb9bSAndroid Build Coastguard Worker motorola) 3048*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 3049*663afb9bSAndroid Build Coastguard Worker need_version=no 3050*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=no 3051*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3052*663afb9bSAndroid Build Coastguard Worker ;; 3053*663afb9bSAndroid Build Coastguard Worker esac 3054*663afb9bSAndroid Build Coastguard Worker ;; 3055*663afb9bSAndroid Build Coastguard Worker 3056*663afb9bSAndroid Build Coastguard Workersysv4*MP*) 3057*663afb9bSAndroid Build Coastguard Worker if test -d /usr/nec; then 3058*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 3059*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3060*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$shared_ext.$major' 3061*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 3062*663afb9bSAndroid Build Coastguard Worker fi 3063*663afb9bSAndroid Build Coastguard Worker ;; 3064*663afb9bSAndroid Build Coastguard Worker 3065*663afb9bSAndroid Build Coastguard Workersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3066*663afb9bSAndroid Build Coastguard Worker version_type=sco 3067*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 3068*663afb9bSAndroid Build Coastguard Worker need_version=no 3069*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3070*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 3071*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 3072*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=yes 3073*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 3074*663afb9bSAndroid Build Coastguard Worker if test yes = "$with_gnu_ld"; then 3075*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3076*663afb9bSAndroid Build Coastguard Worker else 3077*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3078*663afb9bSAndroid Build Coastguard Worker case $host_os in 3079*663afb9bSAndroid Build Coastguard Worker sco3.2v5*) 3080*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3081*663afb9bSAndroid Build Coastguard Worker ;; 3082*663afb9bSAndroid Build Coastguard Worker esac 3083*663afb9bSAndroid Build Coastguard Worker fi 3084*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec='/usr/lib' 3085*663afb9bSAndroid Build Coastguard Worker ;; 3086*663afb9bSAndroid Build Coastguard Worker 3087*663afb9bSAndroid Build Coastguard Workertpf*) 3088*663afb9bSAndroid Build Coastguard Worker # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3089*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 3090*663afb9bSAndroid Build Coastguard Worker need_lib_prefix=no 3091*663afb9bSAndroid Build Coastguard Worker need_version=no 3092*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3093*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 3094*663afb9bSAndroid Build Coastguard Worker shlibpath_overrides_runpath=no 3095*663afb9bSAndroid Build Coastguard Worker hardcode_into_libs=yes 3096*663afb9bSAndroid Build Coastguard Worker ;; 3097*663afb9bSAndroid Build Coastguard Worker 3098*663afb9bSAndroid Build Coastguard Workeruts4*) 3099*663afb9bSAndroid Build Coastguard Worker version_type=linux # correct to gnu/linux during the next big refactor 3100*663afb9bSAndroid Build Coastguard Worker library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3101*663afb9bSAndroid Build Coastguard Worker soname_spec='$libname$release$shared_ext$major' 3102*663afb9bSAndroid Build Coastguard Worker shlibpath_var=LD_LIBRARY_PATH 3103*663afb9bSAndroid Build Coastguard Worker ;; 3104*663afb9bSAndroid Build Coastguard Worker 3105*663afb9bSAndroid Build Coastguard Worker*) 3106*663afb9bSAndroid Build Coastguard Worker dynamic_linker=no 3107*663afb9bSAndroid Build Coastguard Worker ;; 3108*663afb9bSAndroid Build Coastguard Workeresac 3109*663afb9bSAndroid Build Coastguard WorkerAC_MSG_RESULT([$dynamic_linker]) 3110*663afb9bSAndroid Build Coastguard Workertest no = "$dynamic_linker" && can_build_shared=no 3111*663afb9bSAndroid Build Coastguard Worker 3112*663afb9bSAndroid Build Coastguard Workervariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3113*663afb9bSAndroid Build Coastguard Workerif test yes = "$GCC"; then 3114*663afb9bSAndroid Build Coastguard Worker variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3115*663afb9bSAndroid Build Coastguard Workerfi 3116*663afb9bSAndroid Build Coastguard Worker 3117*663afb9bSAndroid Build Coastguard Workerif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3118*663afb9bSAndroid Build Coastguard Worker sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3119*663afb9bSAndroid Build Coastguard Workerfi 3120*663afb9bSAndroid Build Coastguard Worker 3121*663afb9bSAndroid Build Coastguard Workerif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3122*663afb9bSAndroid Build Coastguard Worker sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3123*663afb9bSAndroid Build Coastguard Workerfi 3124*663afb9bSAndroid Build Coastguard Worker 3125*663afb9bSAndroid Build Coastguard Worker# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3126*663afb9bSAndroid Build Coastguard Workerconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3127*663afb9bSAndroid Build Coastguard Worker 3128*663afb9bSAndroid Build Coastguard Worker# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3129*663afb9bSAndroid Build Coastguard Workerfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3130*663afb9bSAndroid Build Coastguard Worker 3131*663afb9bSAndroid Build Coastguard Worker# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3132*663afb9bSAndroid Build Coastguard Workerconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3133*663afb9bSAndroid Build Coastguard Worker 3134*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [variables_saved_for_relink], [1], 3135*663afb9bSAndroid Build Coastguard Worker [Variables whose values should be saved in libtool wrapper scripts and 3136*663afb9bSAndroid Build Coastguard Worker restored at link time]) 3137*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [need_lib_prefix], [0], 3138*663afb9bSAndroid Build Coastguard Worker [Do we need the "lib" prefix for modules?]) 3139*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3140*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [version_type], [0], [Library versioning type]) 3141*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3142*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3143*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [shlibpath_overrides_runpath], [0], 3144*663afb9bSAndroid Build Coastguard Worker [Is shlibpath searched before the hard-coded library search path?]) 3145*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3146*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [library_names_spec], [1], 3147*663afb9bSAndroid Build Coastguard Worker [[List of archive names. First name is the real one, the rest are links. 3148*663afb9bSAndroid Build Coastguard Worker The last name is the one that the linker finds with -lNAME]]) 3149*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [soname_spec], [1], 3150*663afb9bSAndroid Build Coastguard Worker [[The coded name of the library, if different from the real name]]) 3151*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [install_override_mode], [1], 3152*663afb9bSAndroid Build Coastguard Worker [Permission mode override for installation of shared libraries]) 3153*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [postinstall_cmds], [2], 3154*663afb9bSAndroid Build Coastguard Worker [Command to use after installation of a shared archive]) 3155*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [postuninstall_cmds], [2], 3156*663afb9bSAndroid Build Coastguard Worker [Command to use after uninstallation of a shared archive]) 3157*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [finish_cmds], [2], 3158*663afb9bSAndroid Build Coastguard Worker [Commands used to finish a libtool library installation in a directory]) 3159*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [finish_eval], [1], 3160*663afb9bSAndroid Build Coastguard Worker [[As "finish_cmds", except a single script fragment to be evaled but 3161*663afb9bSAndroid Build Coastguard Worker not shown]]) 3162*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [hardcode_into_libs], [0], 3163*663afb9bSAndroid Build Coastguard Worker [Whether we should hardcode library paths into libraries]) 3164*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [sys_lib_search_path_spec], [2], 3165*663afb9bSAndroid Build Coastguard Worker [Compile-time system search path for libraries]) 3166*663afb9bSAndroid Build Coastguard Worker_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3167*663afb9bSAndroid Build Coastguard Worker [Detected run-time system search path for libraries]) 3168*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3169*663afb9bSAndroid Build Coastguard Worker [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3170*663afb9bSAndroid Build Coastguard Worker])# _LT_SYS_DYNAMIC_LINKER 3171*663afb9bSAndroid Build Coastguard Worker 3172*663afb9bSAndroid Build Coastguard Worker 3173*663afb9bSAndroid Build Coastguard Worker# _LT_PATH_TOOL_PREFIX(TOOL) 3174*663afb9bSAndroid Build Coastguard Worker# -------------------------- 3175*663afb9bSAndroid Build Coastguard Worker# find a file program that can recognize shared library 3176*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3177*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])dnl 3178*663afb9bSAndroid Build Coastguard WorkerAC_MSG_CHECKING([for $1]) 3179*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3180*663afb9bSAndroid Build Coastguard Worker[case $MAGIC_CMD in 3181*663afb9bSAndroid Build Coastguard Worker[[\\/*] | ?:[\\/]*]) 3182*663afb9bSAndroid Build Coastguard Worker lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3183*663afb9bSAndroid Build Coastguard Worker ;; 3184*663afb9bSAndroid Build Coastguard Worker*) 3185*663afb9bSAndroid Build Coastguard Worker lt_save_MAGIC_CMD=$MAGIC_CMD 3186*663afb9bSAndroid Build Coastguard Worker lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3187*663afb9bSAndroid Build Coastguard Workerdnl $ac_dummy forces splitting on constant user-supplied paths. 3188*663afb9bSAndroid Build Coastguard Workerdnl POSIX.2 word splitting is done only on the output of word expansions, 3189*663afb9bSAndroid Build Coastguard Workerdnl not every word. This closes a longstanding sh security hole. 3190*663afb9bSAndroid Build Coastguard Worker ac_dummy="m4_if([$2], , $PATH, [$2])" 3191*663afb9bSAndroid Build Coastguard Worker for ac_dir in $ac_dummy; do 3192*663afb9bSAndroid Build Coastguard Worker IFS=$lt_save_ifs 3193*663afb9bSAndroid Build Coastguard Worker test -z "$ac_dir" && ac_dir=. 3194*663afb9bSAndroid Build Coastguard Worker if test -f "$ac_dir/$1"; then 3195*663afb9bSAndroid Build Coastguard Worker lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3196*663afb9bSAndroid Build Coastguard Worker if test -n "$file_magic_test_file"; then 3197*663afb9bSAndroid Build Coastguard Worker case $deplibs_check_method in 3198*663afb9bSAndroid Build Coastguard Worker "file_magic "*) 3199*663afb9bSAndroid Build Coastguard Worker file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3200*663afb9bSAndroid Build Coastguard Worker MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3201*663afb9bSAndroid Build Coastguard Worker if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3202*663afb9bSAndroid Build Coastguard Worker $EGREP "$file_magic_regex" > /dev/null; then 3203*663afb9bSAndroid Build Coastguard Worker : 3204*663afb9bSAndroid Build Coastguard Worker else 3205*663afb9bSAndroid Build Coastguard Worker cat <<_LT_EOF 1>&2 3206*663afb9bSAndroid Build Coastguard Worker 3207*663afb9bSAndroid Build Coastguard Worker*** Warning: the command libtool uses to detect shared libraries, 3208*663afb9bSAndroid Build Coastguard Worker*** $file_magic_cmd, produces output that libtool cannot recognize. 3209*663afb9bSAndroid Build Coastguard Worker*** The result is that libtool may fail to recognize shared libraries 3210*663afb9bSAndroid Build Coastguard Worker*** as such. This will affect the creation of libtool libraries that 3211*663afb9bSAndroid Build Coastguard Worker*** depend on shared libraries, but programs linked with such libtool 3212*663afb9bSAndroid Build Coastguard Worker*** libraries will work regardless of this problem. Nevertheless, you 3213*663afb9bSAndroid Build Coastguard Worker*** may want to report the problem to your system manager and/or to 3214*663afb9bSAndroid Build Coastguard Worker*** [email protected] 3215*663afb9bSAndroid Build Coastguard Worker 3216*663afb9bSAndroid Build Coastguard Worker_LT_EOF 3217*663afb9bSAndroid Build Coastguard Worker fi ;; 3218*663afb9bSAndroid Build Coastguard Worker esac 3219*663afb9bSAndroid Build Coastguard Worker fi 3220*663afb9bSAndroid Build Coastguard Worker break 3221*663afb9bSAndroid Build Coastguard Worker fi 3222*663afb9bSAndroid Build Coastguard Worker done 3223*663afb9bSAndroid Build Coastguard Worker IFS=$lt_save_ifs 3224*663afb9bSAndroid Build Coastguard Worker MAGIC_CMD=$lt_save_MAGIC_CMD 3225*663afb9bSAndroid Build Coastguard Worker ;; 3226*663afb9bSAndroid Build Coastguard Workeresac]) 3227*663afb9bSAndroid Build Coastguard WorkerMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3228*663afb9bSAndroid Build Coastguard Workerif test -n "$MAGIC_CMD"; then 3229*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT($MAGIC_CMD) 3230*663afb9bSAndroid Build Coastguard Workerelse 3231*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT(no) 3232*663afb9bSAndroid Build Coastguard Workerfi 3233*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [MAGIC_CMD], [0], 3234*663afb9bSAndroid Build Coastguard Worker [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3235*663afb9bSAndroid Build Coastguard Worker])# _LT_PATH_TOOL_PREFIX 3236*663afb9bSAndroid Build Coastguard Worker 3237*663afb9bSAndroid Build Coastguard Worker# Old name: 3238*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3239*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 3240*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3241*663afb9bSAndroid Build Coastguard Worker 3242*663afb9bSAndroid Build Coastguard Worker 3243*663afb9bSAndroid Build Coastguard Worker# _LT_PATH_MAGIC 3244*663afb9bSAndroid Build Coastguard Worker# -------------- 3245*663afb9bSAndroid Build Coastguard Worker# find a file program that can recognize a shared library 3246*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_PATH_MAGIC], 3247*663afb9bSAndroid Build Coastguard Worker[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3248*663afb9bSAndroid Build Coastguard Workerif test -z "$lt_cv_path_MAGIC_CMD"; then 3249*663afb9bSAndroid Build Coastguard Worker if test -n "$ac_tool_prefix"; then 3250*663afb9bSAndroid Build Coastguard Worker _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3251*663afb9bSAndroid Build Coastguard Worker else 3252*663afb9bSAndroid Build Coastguard Worker MAGIC_CMD=: 3253*663afb9bSAndroid Build Coastguard Worker fi 3254*663afb9bSAndroid Build Coastguard Workerfi 3255*663afb9bSAndroid Build Coastguard Worker])# _LT_PATH_MAGIC 3256*663afb9bSAndroid Build Coastguard Worker 3257*663afb9bSAndroid Build Coastguard Worker 3258*663afb9bSAndroid Build Coastguard Worker# LT_PATH_LD 3259*663afb9bSAndroid Build Coastguard Worker# ---------- 3260*663afb9bSAndroid Build Coastguard Worker# find the pathname to the GNU or non-GNU linker 3261*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([LT_PATH_LD], 3262*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_CC])dnl 3263*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_HOST])dnl 3264*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3265*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl 3266*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl 3267*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3268*663afb9bSAndroid Build Coastguard Worker 3269*663afb9bSAndroid Build Coastguard WorkerAC_ARG_WITH([gnu-ld], 3270*663afb9bSAndroid Build Coastguard Worker [AS_HELP_STRING([--with-gnu-ld], 3271*663afb9bSAndroid Build Coastguard Worker [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3272*663afb9bSAndroid Build Coastguard Worker [test no = "$withval" || with_gnu_ld=yes], 3273*663afb9bSAndroid Build Coastguard Worker [with_gnu_ld=no])dnl 3274*663afb9bSAndroid Build Coastguard Worker 3275*663afb9bSAndroid Build Coastguard Workerac_prog=ld 3276*663afb9bSAndroid Build Coastguard Workerif test yes = "$GCC"; then 3277*663afb9bSAndroid Build Coastguard Worker # Check if gcc -print-prog-name=ld gives a path. 3278*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([for ld used by $CC]) 3279*663afb9bSAndroid Build Coastguard Worker case $host in 3280*663afb9bSAndroid Build Coastguard Worker *-*-mingw*) 3281*663afb9bSAndroid Build Coastguard Worker # gcc leaves a trailing carriage return, which upsets mingw 3282*663afb9bSAndroid Build Coastguard Worker ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3283*663afb9bSAndroid Build Coastguard Worker *) 3284*663afb9bSAndroid Build Coastguard Worker ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3285*663afb9bSAndroid Build Coastguard Worker esac 3286*663afb9bSAndroid Build Coastguard Worker case $ac_prog in 3287*663afb9bSAndroid Build Coastguard Worker # Accept absolute paths. 3288*663afb9bSAndroid Build Coastguard Worker [[\\/]]* | ?:[[\\/]]*) 3289*663afb9bSAndroid Build Coastguard Worker re_direlt='/[[^/]][[^/]]*/\.\./' 3290*663afb9bSAndroid Build Coastguard Worker # Canonicalize the pathname of ld 3291*663afb9bSAndroid Build Coastguard Worker ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3292*663afb9bSAndroid Build Coastguard Worker while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3293*663afb9bSAndroid Build Coastguard Worker ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3294*663afb9bSAndroid Build Coastguard Worker done 3295*663afb9bSAndroid Build Coastguard Worker test -z "$LD" && LD=$ac_prog 3296*663afb9bSAndroid Build Coastguard Worker ;; 3297*663afb9bSAndroid Build Coastguard Worker "") 3298*663afb9bSAndroid Build Coastguard Worker # If it fails, then pretend we aren't using GCC. 3299*663afb9bSAndroid Build Coastguard Worker ac_prog=ld 3300*663afb9bSAndroid Build Coastguard Worker ;; 3301*663afb9bSAndroid Build Coastguard Worker *) 3302*663afb9bSAndroid Build Coastguard Worker # If it is relative, then search for the first ld in PATH. 3303*663afb9bSAndroid Build Coastguard Worker with_gnu_ld=unknown 3304*663afb9bSAndroid Build Coastguard Worker ;; 3305*663afb9bSAndroid Build Coastguard Worker esac 3306*663afb9bSAndroid Build Coastguard Workerelif test yes = "$with_gnu_ld"; then 3307*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([for GNU ld]) 3308*663afb9bSAndroid Build Coastguard Workerelse 3309*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([for non-GNU ld]) 3310*663afb9bSAndroid Build Coastguard Workerfi 3311*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_path_LD, 3312*663afb9bSAndroid Build Coastguard Worker[if test -z "$LD"; then 3313*663afb9bSAndroid Build Coastguard Worker lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3314*663afb9bSAndroid Build Coastguard Worker for ac_dir in $PATH; do 3315*663afb9bSAndroid Build Coastguard Worker IFS=$lt_save_ifs 3316*663afb9bSAndroid Build Coastguard Worker test -z "$ac_dir" && ac_dir=. 3317*663afb9bSAndroid Build Coastguard Worker if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3318*663afb9bSAndroid Build Coastguard Worker lt_cv_path_LD=$ac_dir/$ac_prog 3319*663afb9bSAndroid Build Coastguard Worker # Check to see if the program is GNU ld. I'd rather use --version, 3320*663afb9bSAndroid Build Coastguard Worker # but apparently some variants of GNU ld only accept -v. 3321*663afb9bSAndroid Build Coastguard Worker # Break only if it was the GNU/non-GNU ld that we prefer. 3322*663afb9bSAndroid Build Coastguard Worker case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3323*663afb9bSAndroid Build Coastguard Worker *GNU* | *'with BFD'*) 3324*663afb9bSAndroid Build Coastguard Worker test no != "$with_gnu_ld" && break 3325*663afb9bSAndroid Build Coastguard Worker ;; 3326*663afb9bSAndroid Build Coastguard Worker *) 3327*663afb9bSAndroid Build Coastguard Worker test yes != "$with_gnu_ld" && break 3328*663afb9bSAndroid Build Coastguard Worker ;; 3329*663afb9bSAndroid Build Coastguard Worker esac 3330*663afb9bSAndroid Build Coastguard Worker fi 3331*663afb9bSAndroid Build Coastguard Worker done 3332*663afb9bSAndroid Build Coastguard Worker IFS=$lt_save_ifs 3333*663afb9bSAndroid Build Coastguard Workerelse 3334*663afb9bSAndroid Build Coastguard Worker lt_cv_path_LD=$LD # Let the user override the test with a path. 3335*663afb9bSAndroid Build Coastguard Workerfi]) 3336*663afb9bSAndroid Build Coastguard WorkerLD=$lt_cv_path_LD 3337*663afb9bSAndroid Build Coastguard Workerif test -n "$LD"; then 3338*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT($LD) 3339*663afb9bSAndroid Build Coastguard Workerelse 3340*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT(no) 3341*663afb9bSAndroid Build Coastguard Workerfi 3342*663afb9bSAndroid Build Coastguard Workertest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3343*663afb9bSAndroid Build Coastguard Worker_LT_PATH_LD_GNU 3344*663afb9bSAndroid Build Coastguard WorkerAC_SUBST([LD]) 3345*663afb9bSAndroid Build Coastguard Worker 3346*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3347*663afb9bSAndroid Build Coastguard Worker])# LT_PATH_LD 3348*663afb9bSAndroid Build Coastguard Worker 3349*663afb9bSAndroid Build Coastguard Worker# Old names: 3350*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3351*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3352*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 3353*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AM_PROG_LD], []) 3354*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PROG_LD], []) 3355*663afb9bSAndroid Build Coastguard Worker 3356*663afb9bSAndroid Build Coastguard Worker 3357*663afb9bSAndroid Build Coastguard Worker# _LT_PATH_LD_GNU 3358*663afb9bSAndroid Build Coastguard Worker#- -------------- 3359*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_PATH_LD_GNU], 3360*663afb9bSAndroid Build Coastguard Worker[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3361*663afb9bSAndroid Build Coastguard Worker[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3362*663afb9bSAndroid Build Coastguard Workercase `$LD -v 2>&1 </dev/null` in 3363*663afb9bSAndroid Build Coastguard Worker*GNU* | *'with BFD'*) 3364*663afb9bSAndroid Build Coastguard Worker lt_cv_prog_gnu_ld=yes 3365*663afb9bSAndroid Build Coastguard Worker ;; 3366*663afb9bSAndroid Build Coastguard Worker*) 3367*663afb9bSAndroid Build Coastguard Worker lt_cv_prog_gnu_ld=no 3368*663afb9bSAndroid Build Coastguard Worker ;; 3369*663afb9bSAndroid Build Coastguard Workeresac]) 3370*663afb9bSAndroid Build Coastguard Workerwith_gnu_ld=$lt_cv_prog_gnu_ld 3371*663afb9bSAndroid Build Coastguard Worker])# _LT_PATH_LD_GNU 3372*663afb9bSAndroid Build Coastguard Worker 3373*663afb9bSAndroid Build Coastguard Worker 3374*663afb9bSAndroid Build Coastguard Worker# _LT_CMD_RELOAD 3375*663afb9bSAndroid Build Coastguard Worker# -------------- 3376*663afb9bSAndroid Build Coastguard Worker# find reload flag for linker 3377*663afb9bSAndroid Build Coastguard Worker# -- PORTME Some linkers may need a different reload flag. 3378*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CMD_RELOAD], 3379*663afb9bSAndroid Build Coastguard Worker[AC_CACHE_CHECK([for $LD option to reload object files], 3380*663afb9bSAndroid Build Coastguard Worker lt_cv_ld_reload_flag, 3381*663afb9bSAndroid Build Coastguard Worker [lt_cv_ld_reload_flag='-r']) 3382*663afb9bSAndroid Build Coastguard Workerreload_flag=$lt_cv_ld_reload_flag 3383*663afb9bSAndroid Build Coastguard Workercase $reload_flag in 3384*663afb9bSAndroid Build Coastguard Worker"" | " "*) ;; 3385*663afb9bSAndroid Build Coastguard Worker*) reload_flag=" $reload_flag" ;; 3386*663afb9bSAndroid Build Coastguard Workeresac 3387*663afb9bSAndroid Build Coastguard Workerreload_cmds='$LD$reload_flag -o $output$reload_objs' 3388*663afb9bSAndroid Build Coastguard Workercase $host_os in 3389*663afb9bSAndroid Build Coastguard Worker cygwin* | mingw* | pw32* | cegcc*) 3390*663afb9bSAndroid Build Coastguard Worker if test yes != "$GCC"; then 3391*663afb9bSAndroid Build Coastguard Worker reload_cmds=false 3392*663afb9bSAndroid Build Coastguard Worker fi 3393*663afb9bSAndroid Build Coastguard Worker ;; 3394*663afb9bSAndroid Build Coastguard Worker darwin*) 3395*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC"; then 3396*663afb9bSAndroid Build Coastguard Worker reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3397*663afb9bSAndroid Build Coastguard Worker else 3398*663afb9bSAndroid Build Coastguard Worker reload_cmds='$LD$reload_flag -o $output$reload_objs' 3399*663afb9bSAndroid Build Coastguard Worker fi 3400*663afb9bSAndroid Build Coastguard Worker ;; 3401*663afb9bSAndroid Build Coastguard Workeresac 3402*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3403*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [reload_cmds], [2])dnl 3404*663afb9bSAndroid Build Coastguard Worker])# _LT_CMD_RELOAD 3405*663afb9bSAndroid Build Coastguard Worker 3406*663afb9bSAndroid Build Coastguard Worker 3407*663afb9bSAndroid Build Coastguard Worker# _LT_PATH_DD 3408*663afb9bSAndroid Build Coastguard Worker# ----------- 3409*663afb9bSAndroid Build Coastguard Worker# find a working dd 3410*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_PATH_DD], 3411*663afb9bSAndroid Build Coastguard Worker[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3412*663afb9bSAndroid Build Coastguard Worker[printf 0123456789abcdef0123456789abcdef >conftest.i 3413*663afb9bSAndroid Build Coastguard Workercat conftest.i conftest.i >conftest2.i 3414*663afb9bSAndroid Build Coastguard Worker: ${lt_DD:=$DD} 3415*663afb9bSAndroid Build Coastguard WorkerAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3416*663afb9bSAndroid Build Coastguard Worker[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3417*663afb9bSAndroid Build Coastguard Worker cmp -s conftest.i conftest.out \ 3418*663afb9bSAndroid Build Coastguard Worker && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3419*663afb9bSAndroid Build Coastguard Workerfi]) 3420*663afb9bSAndroid Build Coastguard Workerrm -f conftest.i conftest2.i conftest.out]) 3421*663afb9bSAndroid Build Coastguard Worker])# _LT_PATH_DD 3422*663afb9bSAndroid Build Coastguard Worker 3423*663afb9bSAndroid Build Coastguard Worker 3424*663afb9bSAndroid Build Coastguard Worker# _LT_CMD_TRUNCATE 3425*663afb9bSAndroid Build Coastguard Worker# ---------------- 3426*663afb9bSAndroid Build Coastguard Worker# find command to truncate a binary pipe 3427*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CMD_TRUNCATE], 3428*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_PATH_DD]) 3429*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3430*663afb9bSAndroid Build Coastguard Worker[printf 0123456789abcdef0123456789abcdef >conftest.i 3431*663afb9bSAndroid Build Coastguard Workercat conftest.i conftest.i >conftest2.i 3432*663afb9bSAndroid Build Coastguard Workerlt_cv_truncate_bin= 3433*663afb9bSAndroid Build Coastguard Workerif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3434*663afb9bSAndroid Build Coastguard Worker cmp -s conftest.i conftest.out \ 3435*663afb9bSAndroid Build Coastguard Worker && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3436*663afb9bSAndroid Build Coastguard Workerfi 3437*663afb9bSAndroid Build Coastguard Workerrm -f conftest.i conftest2.i conftest.out 3438*663afb9bSAndroid Build Coastguard Workertest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3439*663afb9bSAndroid Build Coastguard Worker_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3440*663afb9bSAndroid Build Coastguard Worker [Command to truncate a binary pipe]) 3441*663afb9bSAndroid Build Coastguard Worker])# _LT_CMD_TRUNCATE 3442*663afb9bSAndroid Build Coastguard Worker 3443*663afb9bSAndroid Build Coastguard Worker 3444*663afb9bSAndroid Build Coastguard Worker# _LT_CHECK_MAGIC_METHOD 3445*663afb9bSAndroid Build Coastguard Worker# ---------------------- 3446*663afb9bSAndroid Build Coastguard Worker# how to check for library dependencies 3447*663afb9bSAndroid Build Coastguard Worker# -- PORTME fill in with the dynamic library characteristics 3448*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CHECK_MAGIC_METHOD], 3449*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP]) 3450*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_OBJDUMP]) 3451*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_CHECK([how to recognize dependent libraries], 3452*663afb9bSAndroid Build Coastguard Workerlt_cv_deplibs_check_method, 3453*663afb9bSAndroid Build Coastguard Worker[lt_cv_file_magic_cmd='$MAGIC_CMD' 3454*663afb9bSAndroid Build Coastguard Workerlt_cv_file_magic_test_file= 3455*663afb9bSAndroid Build Coastguard Workerlt_cv_deplibs_check_method='unknown' 3456*663afb9bSAndroid Build Coastguard Worker# Need to set the preceding variable on all platforms that support 3457*663afb9bSAndroid Build Coastguard Worker# interlibrary dependencies. 3458*663afb9bSAndroid Build Coastguard Worker# 'none' -- dependencies not supported. 3459*663afb9bSAndroid Build Coastguard Worker# 'unknown' -- same as none, but documents that we really don't know. 3460*663afb9bSAndroid Build Coastguard Worker# 'pass_all' -- all dependencies passed with no checks. 3461*663afb9bSAndroid Build Coastguard Worker# 'test_compile' -- check by making test program. 3462*663afb9bSAndroid Build Coastguard Worker# 'file_magic [[regex]]' -- check by looking for files in library path 3463*663afb9bSAndroid Build Coastguard Worker# that responds to the $file_magic_cmd with a given extended regex. 3464*663afb9bSAndroid Build Coastguard Worker# If you have 'file' or equivalent on your system and you're not sure 3465*663afb9bSAndroid Build Coastguard Worker# whether 'pass_all' will *always* work, you probably want this one. 3466*663afb9bSAndroid Build Coastguard Worker 3467*663afb9bSAndroid Build Coastguard Workercase $host_os in 3468*663afb9bSAndroid Build Coastguard Workeraix[[4-9]]*) 3469*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3470*663afb9bSAndroid Build Coastguard Worker ;; 3471*663afb9bSAndroid Build Coastguard Worker 3472*663afb9bSAndroid Build Coastguard Workerbeos*) 3473*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3474*663afb9bSAndroid Build Coastguard Worker ;; 3475*663afb9bSAndroid Build Coastguard Worker 3476*663afb9bSAndroid Build Coastguard Workerbsdi[[45]]*) 3477*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3478*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_cmd='/usr/bin/file -L' 3479*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_test_file=/shlib/libc.so 3480*663afb9bSAndroid Build Coastguard Worker ;; 3481*663afb9bSAndroid Build Coastguard Worker 3482*663afb9bSAndroid Build Coastguard Workercygwin*) 3483*663afb9bSAndroid Build Coastguard Worker # func_win32_libid is a shell function defined in ltmain.sh 3484*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3485*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_cmd='func_win32_libid' 3486*663afb9bSAndroid Build Coastguard Worker ;; 3487*663afb9bSAndroid Build Coastguard Worker 3488*663afb9bSAndroid Build Coastguard Workermingw* | pw32*) 3489*663afb9bSAndroid Build Coastguard Worker # Base MSYS/MinGW do not provide the 'file' command needed by 3490*663afb9bSAndroid Build Coastguard Worker # func_win32_libid shell function, so use a weaker test based on 'objdump', 3491*663afb9bSAndroid Build Coastguard Worker # unless we find 'file', for example because we are cross-compiling. 3492*663afb9bSAndroid Build Coastguard Worker if ( file / ) >/dev/null 2>&1; then 3493*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3494*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_cmd='func_win32_libid' 3495*663afb9bSAndroid Build Coastguard Worker else 3496*663afb9bSAndroid Build Coastguard Worker # Keep this pattern in sync with the one in func_win32_libid. 3497*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3498*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_cmd='$OBJDUMP -f' 3499*663afb9bSAndroid Build Coastguard Worker fi 3500*663afb9bSAndroid Build Coastguard Worker ;; 3501*663afb9bSAndroid Build Coastguard Worker 3502*663afb9bSAndroid Build Coastguard Workercegcc*) 3503*663afb9bSAndroid Build Coastguard Worker # use the weaker test based on 'objdump'. See mingw*. 3504*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3505*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_cmd='$OBJDUMP -f' 3506*663afb9bSAndroid Build Coastguard Worker ;; 3507*663afb9bSAndroid Build Coastguard Worker 3508*663afb9bSAndroid Build Coastguard Workerdarwin* | rhapsody*) 3509*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3510*663afb9bSAndroid Build Coastguard Worker ;; 3511*663afb9bSAndroid Build Coastguard Worker 3512*663afb9bSAndroid Build Coastguard Workerfreebsd* | dragonfly*) 3513*663afb9bSAndroid Build Coastguard Worker if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3514*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 3515*663afb9bSAndroid Build Coastguard Worker i*86 ) 3516*663afb9bSAndroid Build Coastguard Worker # Not sure whether the presence of OpenBSD here was a mistake. 3517*663afb9bSAndroid Build Coastguard Worker # Let's accept both of them until this is cleared up. 3518*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3519*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_cmd=/usr/bin/file 3520*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3521*663afb9bSAndroid Build Coastguard Worker ;; 3522*663afb9bSAndroid Build Coastguard Worker esac 3523*663afb9bSAndroid Build Coastguard Worker else 3524*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3525*663afb9bSAndroid Build Coastguard Worker fi 3526*663afb9bSAndroid Build Coastguard Worker ;; 3527*663afb9bSAndroid Build Coastguard Worker 3528*663afb9bSAndroid Build Coastguard Workerhaiku*) 3529*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3530*663afb9bSAndroid Build Coastguard Worker ;; 3531*663afb9bSAndroid Build Coastguard Worker 3532*663afb9bSAndroid Build Coastguard Workerhpux10.20* | hpux11*) 3533*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_cmd=/usr/bin/file 3534*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 3535*663afb9bSAndroid Build Coastguard Worker ia64*) 3536*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3537*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3538*663afb9bSAndroid Build Coastguard Worker ;; 3539*663afb9bSAndroid Build Coastguard Worker hppa*64*) 3540*663afb9bSAndroid Build Coastguard Worker [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]'] 3541*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3542*663afb9bSAndroid Build Coastguard Worker ;; 3543*663afb9bSAndroid Build Coastguard Worker *) 3544*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3545*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_test_file=/usr/lib/libc.sl 3546*663afb9bSAndroid Build Coastguard Worker ;; 3547*663afb9bSAndroid Build Coastguard Worker esac 3548*663afb9bSAndroid Build Coastguard Worker ;; 3549*663afb9bSAndroid Build Coastguard Worker 3550*663afb9bSAndroid Build Coastguard Workerinterix[[3-9]]*) 3551*663afb9bSAndroid Build Coastguard Worker # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3552*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3553*663afb9bSAndroid Build Coastguard Worker ;; 3554*663afb9bSAndroid Build Coastguard Worker 3555*663afb9bSAndroid Build Coastguard Workeririx5* | irix6* | nonstopux*) 3556*663afb9bSAndroid Build Coastguard Worker case $LD in 3557*663afb9bSAndroid Build Coastguard Worker *-32|*"-32 ") libmagic=32-bit;; 3558*663afb9bSAndroid Build Coastguard Worker *-n32|*"-n32 ") libmagic=N32;; 3559*663afb9bSAndroid Build Coastguard Worker *-64|*"-64 ") libmagic=64-bit;; 3560*663afb9bSAndroid Build Coastguard Worker *) libmagic=never-match;; 3561*663afb9bSAndroid Build Coastguard Worker esac 3562*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3563*663afb9bSAndroid Build Coastguard Worker ;; 3564*663afb9bSAndroid Build Coastguard Worker 3565*663afb9bSAndroid Build Coastguard Worker# This must be glibc/ELF. 3566*663afb9bSAndroid Build Coastguard Workerlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3567*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3568*663afb9bSAndroid Build Coastguard Worker ;; 3569*663afb9bSAndroid Build Coastguard Worker 3570*663afb9bSAndroid Build Coastguard Workernetbsd*) 3571*663afb9bSAndroid Build Coastguard Worker if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3572*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3573*663afb9bSAndroid Build Coastguard Worker else 3574*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3575*663afb9bSAndroid Build Coastguard Worker fi 3576*663afb9bSAndroid Build Coastguard Worker ;; 3577*663afb9bSAndroid Build Coastguard Worker 3578*663afb9bSAndroid Build Coastguard Workernewos6*) 3579*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3580*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_cmd=/usr/bin/file 3581*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_test_file=/usr/lib/libnls.so 3582*663afb9bSAndroid Build Coastguard Worker ;; 3583*663afb9bSAndroid Build Coastguard Worker 3584*663afb9bSAndroid Build Coastguard Worker*nto* | *qnx*) 3585*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3586*663afb9bSAndroid Build Coastguard Worker ;; 3587*663afb9bSAndroid Build Coastguard Worker 3588*663afb9bSAndroid Build Coastguard Workeropenbsd* | bitrig*) 3589*663afb9bSAndroid Build Coastguard Worker if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3590*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3591*663afb9bSAndroid Build Coastguard Worker else 3592*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3593*663afb9bSAndroid Build Coastguard Worker fi 3594*663afb9bSAndroid Build Coastguard Worker ;; 3595*663afb9bSAndroid Build Coastguard Worker 3596*663afb9bSAndroid Build Coastguard Workerosf3* | osf4* | osf5*) 3597*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3598*663afb9bSAndroid Build Coastguard Worker ;; 3599*663afb9bSAndroid Build Coastguard Worker 3600*663afb9bSAndroid Build Coastguard Workerrdos*) 3601*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3602*663afb9bSAndroid Build Coastguard Worker ;; 3603*663afb9bSAndroid Build Coastguard Worker 3604*663afb9bSAndroid Build Coastguard Workersolaris*) 3605*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3606*663afb9bSAndroid Build Coastguard Worker ;; 3607*663afb9bSAndroid Build Coastguard Worker 3608*663afb9bSAndroid Build Coastguard Workersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3609*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3610*663afb9bSAndroid Build Coastguard Worker ;; 3611*663afb9bSAndroid Build Coastguard Worker 3612*663afb9bSAndroid Build Coastguard Workersysv4 | sysv4.3*) 3613*663afb9bSAndroid Build Coastguard Worker case $host_vendor in 3614*663afb9bSAndroid Build Coastguard Worker motorola) 3615*663afb9bSAndroid Build Coastguard Worker 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]]' 3616*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3617*663afb9bSAndroid Build Coastguard Worker ;; 3618*663afb9bSAndroid Build Coastguard Worker ncr) 3619*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3620*663afb9bSAndroid Build Coastguard Worker ;; 3621*663afb9bSAndroid Build Coastguard Worker sequent) 3622*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_cmd='/bin/file' 3623*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3624*663afb9bSAndroid Build Coastguard Worker ;; 3625*663afb9bSAndroid Build Coastguard Worker sni) 3626*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_cmd='/bin/file' 3627*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3628*663afb9bSAndroid Build Coastguard Worker lt_cv_file_magic_test_file=/lib/libc.so 3629*663afb9bSAndroid Build Coastguard Worker ;; 3630*663afb9bSAndroid Build Coastguard Worker siemens) 3631*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3632*663afb9bSAndroid Build Coastguard Worker ;; 3633*663afb9bSAndroid Build Coastguard Worker pc) 3634*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3635*663afb9bSAndroid Build Coastguard Worker ;; 3636*663afb9bSAndroid Build Coastguard Worker esac 3637*663afb9bSAndroid Build Coastguard Worker ;; 3638*663afb9bSAndroid Build Coastguard Worker 3639*663afb9bSAndroid Build Coastguard Workertpf*) 3640*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3641*663afb9bSAndroid Build Coastguard Worker ;; 3642*663afb9bSAndroid Build Coastguard Workeros2*) 3643*663afb9bSAndroid Build Coastguard Worker lt_cv_deplibs_check_method=pass_all 3644*663afb9bSAndroid Build Coastguard Worker ;; 3645*663afb9bSAndroid Build Coastguard Workeresac 3646*663afb9bSAndroid Build Coastguard Worker]) 3647*663afb9bSAndroid Build Coastguard Worker 3648*663afb9bSAndroid Build Coastguard Workerfile_magic_glob= 3649*663afb9bSAndroid Build Coastguard Workerwant_nocaseglob=no 3650*663afb9bSAndroid Build Coastguard Workerif test "$build" = "$host"; then 3651*663afb9bSAndroid Build Coastguard Worker case $host_os in 3652*663afb9bSAndroid Build Coastguard Worker mingw* | pw32*) 3653*663afb9bSAndroid Build Coastguard Worker if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3654*663afb9bSAndroid Build Coastguard Worker want_nocaseglob=yes 3655*663afb9bSAndroid Build Coastguard Worker else 3656*663afb9bSAndroid Build Coastguard Worker file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3657*663afb9bSAndroid Build Coastguard Worker fi 3658*663afb9bSAndroid Build Coastguard Worker ;; 3659*663afb9bSAndroid Build Coastguard Worker esac 3660*663afb9bSAndroid Build Coastguard Workerfi 3661*663afb9bSAndroid Build Coastguard Worker 3662*663afb9bSAndroid Build Coastguard Workerfile_magic_cmd=$lt_cv_file_magic_cmd 3663*663afb9bSAndroid Build Coastguard Workerdeplibs_check_method=$lt_cv_deplibs_check_method 3664*663afb9bSAndroid Build Coastguard Workertest -z "$deplibs_check_method" && deplibs_check_method=unknown 3665*663afb9bSAndroid Build Coastguard Worker 3666*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [deplibs_check_method], [1], 3667*663afb9bSAndroid Build Coastguard Worker [Method to check whether dependent libraries are shared objects]) 3668*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [file_magic_cmd], [1], 3669*663afb9bSAndroid Build Coastguard Worker [Command to use when deplibs_check_method = "file_magic"]) 3670*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [file_magic_glob], [1], 3671*663afb9bSAndroid Build Coastguard Worker [How to find potential files when deplibs_check_method = "file_magic"]) 3672*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [want_nocaseglob], [1], 3673*663afb9bSAndroid Build Coastguard Worker [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3674*663afb9bSAndroid Build Coastguard Worker])# _LT_CHECK_MAGIC_METHOD 3675*663afb9bSAndroid Build Coastguard Worker 3676*663afb9bSAndroid Build Coastguard Worker 3677*663afb9bSAndroid Build Coastguard Worker# LT_PATH_NM 3678*663afb9bSAndroid Build Coastguard Worker# ---------- 3679*663afb9bSAndroid Build Coastguard Worker# find the pathname to a BSD- or MS-compatible name lister 3680*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([LT_PATH_NM], 3681*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_CC])dnl 3682*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3683*663afb9bSAndroid Build Coastguard Worker[if test -n "$NM"; then 3684*663afb9bSAndroid Build Coastguard Worker # Let the user override the test. 3685*663afb9bSAndroid Build Coastguard Worker lt_cv_path_NM=$NM 3686*663afb9bSAndroid Build Coastguard Workerelse 3687*663afb9bSAndroid Build Coastguard Worker lt_nm_to_check=${ac_tool_prefix}nm 3688*663afb9bSAndroid Build Coastguard Worker if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3689*663afb9bSAndroid Build Coastguard Worker lt_nm_to_check="$lt_nm_to_check nm" 3690*663afb9bSAndroid Build Coastguard Worker fi 3691*663afb9bSAndroid Build Coastguard Worker for lt_tmp_nm in $lt_nm_to_check; do 3692*663afb9bSAndroid Build Coastguard Worker lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3693*663afb9bSAndroid Build Coastguard Worker for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3694*663afb9bSAndroid Build Coastguard Worker IFS=$lt_save_ifs 3695*663afb9bSAndroid Build Coastguard Worker test -z "$ac_dir" && ac_dir=. 3696*663afb9bSAndroid Build Coastguard Worker tmp_nm=$ac_dir/$lt_tmp_nm 3697*663afb9bSAndroid Build Coastguard Worker if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3698*663afb9bSAndroid Build Coastguard Worker # Check to see if the nm accepts a BSD-compat flag. 3699*663afb9bSAndroid Build Coastguard Worker # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3700*663afb9bSAndroid Build Coastguard Worker # nm: unknown option "B" ignored 3701*663afb9bSAndroid Build Coastguard Worker # Tru64's nm complains that /dev/null is an invalid object file 3702*663afb9bSAndroid Build Coastguard Worker # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3703*663afb9bSAndroid Build Coastguard Worker case $build_os in 3704*663afb9bSAndroid Build Coastguard Worker mingw*) lt_bad_file=conftest.nm/nofile ;; 3705*663afb9bSAndroid Build Coastguard Worker *) lt_bad_file=/dev/null ;; 3706*663afb9bSAndroid Build Coastguard Worker esac 3707*663afb9bSAndroid Build Coastguard Worker case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3708*663afb9bSAndroid Build Coastguard Worker *$lt_bad_file* | *'Invalid file or object type'*) 3709*663afb9bSAndroid Build Coastguard Worker lt_cv_path_NM="$tmp_nm -B" 3710*663afb9bSAndroid Build Coastguard Worker break 2 3711*663afb9bSAndroid Build Coastguard Worker ;; 3712*663afb9bSAndroid Build Coastguard Worker *) 3713*663afb9bSAndroid Build Coastguard Worker case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3714*663afb9bSAndroid Build Coastguard Worker */dev/null*) 3715*663afb9bSAndroid Build Coastguard Worker lt_cv_path_NM="$tmp_nm -p" 3716*663afb9bSAndroid Build Coastguard Worker break 2 3717*663afb9bSAndroid Build Coastguard Worker ;; 3718*663afb9bSAndroid Build Coastguard Worker *) 3719*663afb9bSAndroid Build Coastguard Worker lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3720*663afb9bSAndroid Build Coastguard Worker continue # so that we can try to find one that supports BSD flags 3721*663afb9bSAndroid Build Coastguard Worker ;; 3722*663afb9bSAndroid Build Coastguard Worker esac 3723*663afb9bSAndroid Build Coastguard Worker ;; 3724*663afb9bSAndroid Build Coastguard Worker esac 3725*663afb9bSAndroid Build Coastguard Worker fi 3726*663afb9bSAndroid Build Coastguard Worker done 3727*663afb9bSAndroid Build Coastguard Worker IFS=$lt_save_ifs 3728*663afb9bSAndroid Build Coastguard Worker done 3729*663afb9bSAndroid Build Coastguard Worker : ${lt_cv_path_NM=no} 3730*663afb9bSAndroid Build Coastguard Workerfi]) 3731*663afb9bSAndroid Build Coastguard Workerif test no != "$lt_cv_path_NM"; then 3732*663afb9bSAndroid Build Coastguard Worker NM=$lt_cv_path_NM 3733*663afb9bSAndroid Build Coastguard Workerelse 3734*663afb9bSAndroid Build Coastguard Worker # Didn't find any BSD compatible name lister, look for dumpbin. 3735*663afb9bSAndroid Build Coastguard Worker if test -n "$DUMPBIN"; then : 3736*663afb9bSAndroid Build Coastguard Worker # Let the user override the test. 3737*663afb9bSAndroid Build Coastguard Worker else 3738*663afb9bSAndroid Build Coastguard Worker AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3739*663afb9bSAndroid Build Coastguard Worker case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3740*663afb9bSAndroid Build Coastguard Worker *COFF*) 3741*663afb9bSAndroid Build Coastguard Worker DUMPBIN="$DUMPBIN -symbols -headers" 3742*663afb9bSAndroid Build Coastguard Worker ;; 3743*663afb9bSAndroid Build Coastguard Worker *) 3744*663afb9bSAndroid Build Coastguard Worker DUMPBIN=: 3745*663afb9bSAndroid Build Coastguard Worker ;; 3746*663afb9bSAndroid Build Coastguard Worker esac 3747*663afb9bSAndroid Build Coastguard Worker fi 3748*663afb9bSAndroid Build Coastguard Worker AC_SUBST([DUMPBIN]) 3749*663afb9bSAndroid Build Coastguard Worker if test : != "$DUMPBIN"; then 3750*663afb9bSAndroid Build Coastguard Worker NM=$DUMPBIN 3751*663afb9bSAndroid Build Coastguard Worker fi 3752*663afb9bSAndroid Build Coastguard Workerfi 3753*663afb9bSAndroid Build Coastguard Workertest -z "$NM" && NM=nm 3754*663afb9bSAndroid Build Coastguard WorkerAC_SUBST([NM]) 3755*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3756*663afb9bSAndroid Build Coastguard Worker 3757*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3758*663afb9bSAndroid Build Coastguard Worker [lt_cv_nm_interface="BSD nm" 3759*663afb9bSAndroid Build Coastguard Worker echo "int some_variable = 0;" > conftest.$ac_ext 3760*663afb9bSAndroid Build Coastguard Worker (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3761*663afb9bSAndroid Build Coastguard Worker (eval "$ac_compile" 2>conftest.err) 3762*663afb9bSAndroid Build Coastguard Worker cat conftest.err >&AS_MESSAGE_LOG_FD 3763*663afb9bSAndroid Build Coastguard Worker (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3764*663afb9bSAndroid Build Coastguard Worker (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3765*663afb9bSAndroid Build Coastguard Worker cat conftest.err >&AS_MESSAGE_LOG_FD 3766*663afb9bSAndroid Build Coastguard Worker (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3767*663afb9bSAndroid Build Coastguard Worker cat conftest.out >&AS_MESSAGE_LOG_FD 3768*663afb9bSAndroid Build Coastguard Worker if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3769*663afb9bSAndroid Build Coastguard Worker lt_cv_nm_interface="MS dumpbin" 3770*663afb9bSAndroid Build Coastguard Worker fi 3771*663afb9bSAndroid Build Coastguard Worker rm -f conftest*]) 3772*663afb9bSAndroid Build Coastguard Worker])# LT_PATH_NM 3773*663afb9bSAndroid Build Coastguard Worker 3774*663afb9bSAndroid Build Coastguard Worker# Old names: 3775*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3776*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3777*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 3778*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AM_PROG_NM], []) 3779*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_PROG_NM], []) 3780*663afb9bSAndroid Build Coastguard Worker 3781*663afb9bSAndroid Build Coastguard Worker# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3782*663afb9bSAndroid Build Coastguard Worker# -------------------------------- 3783*663afb9bSAndroid Build Coastguard Worker# how to determine the name of the shared library 3784*663afb9bSAndroid Build Coastguard Worker# associated with a specific link library. 3785*663afb9bSAndroid Build Coastguard Worker# -- PORTME fill in with the dynamic library characteristics 3786*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3787*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP]) 3788*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_OBJDUMP]) 3789*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_DLLTOOL]) 3790*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_CHECK([how to associate runtime and link libraries], 3791*663afb9bSAndroid Build Coastguard Workerlt_cv_sharedlib_from_linklib_cmd, 3792*663afb9bSAndroid Build Coastguard Worker[lt_cv_sharedlib_from_linklib_cmd='unknown' 3793*663afb9bSAndroid Build Coastguard Worker 3794*663afb9bSAndroid Build Coastguard Workercase $host_os in 3795*663afb9bSAndroid Build Coastguard Workercygwin* | mingw* | pw32* | cegcc*) 3796*663afb9bSAndroid Build Coastguard Worker # two different shell functions defined in ltmain.sh; 3797*663afb9bSAndroid Build Coastguard Worker # decide which one to use based on capabilities of $DLLTOOL 3798*663afb9bSAndroid Build Coastguard Worker case `$DLLTOOL --help 2>&1` in 3799*663afb9bSAndroid Build Coastguard Worker *--identify-strict*) 3800*663afb9bSAndroid Build Coastguard Worker lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3801*663afb9bSAndroid Build Coastguard Worker ;; 3802*663afb9bSAndroid Build Coastguard Worker *) 3803*663afb9bSAndroid Build Coastguard Worker lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3804*663afb9bSAndroid Build Coastguard Worker ;; 3805*663afb9bSAndroid Build Coastguard Worker esac 3806*663afb9bSAndroid Build Coastguard Worker ;; 3807*663afb9bSAndroid Build Coastguard Worker*) 3808*663afb9bSAndroid Build Coastguard Worker # fallback: assume linklib IS sharedlib 3809*663afb9bSAndroid Build Coastguard Worker lt_cv_sharedlib_from_linklib_cmd=$ECHO 3810*663afb9bSAndroid Build Coastguard Worker ;; 3811*663afb9bSAndroid Build Coastguard Workeresac 3812*663afb9bSAndroid Build Coastguard Worker]) 3813*663afb9bSAndroid Build Coastguard Workersharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3814*663afb9bSAndroid Build Coastguard Workertest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3815*663afb9bSAndroid Build Coastguard Worker 3816*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3817*663afb9bSAndroid Build Coastguard Worker [Command to associate shared and link libraries]) 3818*663afb9bSAndroid Build Coastguard Worker])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3819*663afb9bSAndroid Build Coastguard Worker 3820*663afb9bSAndroid Build Coastguard Worker 3821*663afb9bSAndroid Build Coastguard Worker# _LT_PATH_MANIFEST_TOOL 3822*663afb9bSAndroid Build Coastguard Worker# ---------------------- 3823*663afb9bSAndroid Build Coastguard Worker# locate the manifest tool 3824*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_PATH_MANIFEST_TOOL], 3825*663afb9bSAndroid Build Coastguard Worker[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3826*663afb9bSAndroid Build Coastguard Workertest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3827*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3828*663afb9bSAndroid Build Coastguard Worker [lt_cv_path_mainfest_tool=no 3829*663afb9bSAndroid Build Coastguard Worker echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3830*663afb9bSAndroid Build Coastguard Worker $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3831*663afb9bSAndroid Build Coastguard Worker cat conftest.err >&AS_MESSAGE_LOG_FD 3832*663afb9bSAndroid Build Coastguard Worker if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3833*663afb9bSAndroid Build Coastguard Worker lt_cv_path_mainfest_tool=yes 3834*663afb9bSAndroid Build Coastguard Worker fi 3835*663afb9bSAndroid Build Coastguard Worker rm -f conftest*]) 3836*663afb9bSAndroid Build Coastguard Workerif test yes != "$lt_cv_path_mainfest_tool"; then 3837*663afb9bSAndroid Build Coastguard Worker MANIFEST_TOOL=: 3838*663afb9bSAndroid Build Coastguard Workerfi 3839*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3840*663afb9bSAndroid Build Coastguard Worker])# _LT_PATH_MANIFEST_TOOL 3841*663afb9bSAndroid Build Coastguard Worker 3842*663afb9bSAndroid Build Coastguard Worker 3843*663afb9bSAndroid Build Coastguard Worker# _LT_DLL_DEF_P([FILE]) 3844*663afb9bSAndroid Build Coastguard Worker# --------------------- 3845*663afb9bSAndroid Build Coastguard Worker# True iff FILE is a Windows DLL '.def' file. 3846*663afb9bSAndroid Build Coastguard Worker# Keep in sync with func_dll_def_p in the libtool script 3847*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([_LT_DLL_DEF_P], 3848*663afb9bSAndroid Build Coastguard Worker[dnl 3849*663afb9bSAndroid Build Coastguard Worker test DEF = "`$SED -n dnl 3850*663afb9bSAndroid Build Coastguard Worker -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3851*663afb9bSAndroid Build Coastguard Worker -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3852*663afb9bSAndroid Build Coastguard Worker -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3853*663afb9bSAndroid Build Coastguard Worker -e q dnl Only consider the first "real" line 3854*663afb9bSAndroid Build Coastguard Worker $1`" dnl 3855*663afb9bSAndroid Build Coastguard Worker])# _LT_DLL_DEF_P 3856*663afb9bSAndroid Build Coastguard Worker 3857*663afb9bSAndroid Build Coastguard Worker 3858*663afb9bSAndroid Build Coastguard Worker# LT_LIB_M 3859*663afb9bSAndroid Build Coastguard Worker# -------- 3860*663afb9bSAndroid Build Coastguard Worker# check for math library 3861*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([LT_LIB_M], 3862*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3863*663afb9bSAndroid Build Coastguard WorkerLIBM= 3864*663afb9bSAndroid Build Coastguard Workercase $host in 3865*663afb9bSAndroid Build Coastguard Worker*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3866*663afb9bSAndroid Build Coastguard Worker # These system don't have libm, or don't need it 3867*663afb9bSAndroid Build Coastguard Worker ;; 3868*663afb9bSAndroid Build Coastguard Worker*-ncr-sysv4.3*) 3869*663afb9bSAndroid Build Coastguard Worker AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3870*663afb9bSAndroid Build Coastguard Worker AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3871*663afb9bSAndroid Build Coastguard Worker ;; 3872*663afb9bSAndroid Build Coastguard Worker*) 3873*663afb9bSAndroid Build Coastguard Worker AC_CHECK_LIB(m, cos, LIBM=-lm) 3874*663afb9bSAndroid Build Coastguard Worker ;; 3875*663afb9bSAndroid Build Coastguard Workeresac 3876*663afb9bSAndroid Build Coastguard WorkerAC_SUBST([LIBM]) 3877*663afb9bSAndroid Build Coastguard Worker])# LT_LIB_M 3878*663afb9bSAndroid Build Coastguard Worker 3879*663afb9bSAndroid Build Coastguard Worker# Old name: 3880*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3881*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 3882*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([AC_CHECK_LIBM], []) 3883*663afb9bSAndroid Build Coastguard Worker 3884*663afb9bSAndroid Build Coastguard Worker 3885*663afb9bSAndroid Build Coastguard Worker# _LT_COMPILER_NO_RTTI([TAGNAME]) 3886*663afb9bSAndroid Build Coastguard Worker# ------------------------------- 3887*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_NO_RTTI], 3888*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_TAG_COMPILER])dnl 3889*663afb9bSAndroid Build Coastguard Worker 3890*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3891*663afb9bSAndroid Build Coastguard Worker 3892*663afb9bSAndroid Build Coastguard Workerif test yes = "$GCC"; then 3893*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 3894*663afb9bSAndroid Build Coastguard Worker nvcc*) 3895*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3896*663afb9bSAndroid Build Coastguard Worker *) 3897*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3898*663afb9bSAndroid Build Coastguard Worker esac 3899*663afb9bSAndroid Build Coastguard Worker 3900*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3901*663afb9bSAndroid Build Coastguard Worker lt_cv_prog_compiler_rtti_exceptions, 3902*663afb9bSAndroid Build Coastguard Worker [-fno-rtti -fno-exceptions], [], 3903*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3904*663afb9bSAndroid Build Coastguard Workerfi 3905*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3906*663afb9bSAndroid Build Coastguard Worker [Compiler flag to turn off builtin functions]) 3907*663afb9bSAndroid Build Coastguard Worker])# _LT_COMPILER_NO_RTTI 3908*663afb9bSAndroid Build Coastguard Worker 3909*663afb9bSAndroid Build Coastguard Worker 3910*663afb9bSAndroid Build Coastguard Worker# _LT_CMD_GLOBAL_SYMBOLS 3911*663afb9bSAndroid Build Coastguard Worker# ---------------------- 3912*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3913*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3914*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_CC])dnl 3915*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_AWK])dnl 3916*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_NM])dnl 3917*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_LD])dnl 3918*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl 3919*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl 3920*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl 3921*663afb9bSAndroid Build Coastguard Worker 3922*663afb9bSAndroid Build Coastguard Worker# Check for command to grab the raw symbol name followed by C symbol from nm. 3923*663afb9bSAndroid Build Coastguard WorkerAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3924*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3925*663afb9bSAndroid Build Coastguard Worker[ 3926*663afb9bSAndroid Build Coastguard Worker# These are sane defaults that work on at least a few old systems. 3927*663afb9bSAndroid Build Coastguard Worker# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3928*663afb9bSAndroid Build Coastguard Worker 3929*663afb9bSAndroid Build Coastguard Worker# Character class describing NM global symbol codes. 3930*663afb9bSAndroid Build Coastguard Workersymcode='[[BCDEGRST]]' 3931*663afb9bSAndroid Build Coastguard Worker 3932*663afb9bSAndroid Build Coastguard Worker# Regexp to match symbols that can be accessed directly from C. 3933*663afb9bSAndroid Build Coastguard Workersympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3934*663afb9bSAndroid Build Coastguard Worker 3935*663afb9bSAndroid Build Coastguard Worker# Define system-specific variables. 3936*663afb9bSAndroid Build Coastguard Workercase $host_os in 3937*663afb9bSAndroid Build Coastguard Workeraix*) 3938*663afb9bSAndroid Build Coastguard Worker symcode='[[BCDT]]' 3939*663afb9bSAndroid Build Coastguard Worker ;; 3940*663afb9bSAndroid Build Coastguard Workercygwin* | mingw* | pw32* | cegcc*) 3941*663afb9bSAndroid Build Coastguard Worker symcode='[[ABCDGISTW]]' 3942*663afb9bSAndroid Build Coastguard Worker ;; 3943*663afb9bSAndroid Build Coastguard Workerhpux*) 3944*663afb9bSAndroid Build Coastguard Worker if test ia64 = "$host_cpu"; then 3945*663afb9bSAndroid Build Coastguard Worker symcode='[[ABCDEGRST]]' 3946*663afb9bSAndroid Build Coastguard Worker fi 3947*663afb9bSAndroid Build Coastguard Worker ;; 3948*663afb9bSAndroid Build Coastguard Workeririx* | nonstopux*) 3949*663afb9bSAndroid Build Coastguard Worker symcode='[[BCDEGRST]]' 3950*663afb9bSAndroid Build Coastguard Worker ;; 3951*663afb9bSAndroid Build Coastguard Workerosf*) 3952*663afb9bSAndroid Build Coastguard Worker symcode='[[BCDEGQRST]]' 3953*663afb9bSAndroid Build Coastguard Worker ;; 3954*663afb9bSAndroid Build Coastguard Workersolaris*) 3955*663afb9bSAndroid Build Coastguard Worker symcode='[[BDRT]]' 3956*663afb9bSAndroid Build Coastguard Worker ;; 3957*663afb9bSAndroid Build Coastguard Workersco3.2v5*) 3958*663afb9bSAndroid Build Coastguard Worker symcode='[[DT]]' 3959*663afb9bSAndroid Build Coastguard Worker ;; 3960*663afb9bSAndroid Build Coastguard Workersysv4.2uw2*) 3961*663afb9bSAndroid Build Coastguard Worker symcode='[[DT]]' 3962*663afb9bSAndroid Build Coastguard Worker ;; 3963*663afb9bSAndroid Build Coastguard Workersysv5* | sco5v6* | unixware* | OpenUNIX*) 3964*663afb9bSAndroid Build Coastguard Worker symcode='[[ABDT]]' 3965*663afb9bSAndroid Build Coastguard Worker ;; 3966*663afb9bSAndroid Build Coastguard Workersysv4) 3967*663afb9bSAndroid Build Coastguard Worker symcode='[[DFNSTU]]' 3968*663afb9bSAndroid Build Coastguard Worker ;; 3969*663afb9bSAndroid Build Coastguard Workeresac 3970*663afb9bSAndroid Build Coastguard Worker 3971*663afb9bSAndroid Build Coastguard Worker# If we're using GNU nm, then use its standard symbol codes. 3972*663afb9bSAndroid Build Coastguard Workercase `$NM -V 2>&1` in 3973*663afb9bSAndroid Build Coastguard Worker*GNU* | *'with BFD'*) 3974*663afb9bSAndroid Build Coastguard Worker symcode='[[ABCDGIRSTW]]' ;; 3975*663afb9bSAndroid Build Coastguard Workeresac 3976*663afb9bSAndroid Build Coastguard Worker 3977*663afb9bSAndroid Build Coastguard Workerif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3978*663afb9bSAndroid Build Coastguard Worker # Gets list of data symbols to import. 3979*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3980*663afb9bSAndroid Build Coastguard Worker # Adjust the below global symbol transforms to fixup imported variables. 3981*663afb9bSAndroid Build Coastguard Worker lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3982*663afb9bSAndroid Build Coastguard Worker lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3983*663afb9bSAndroid Build Coastguard Worker lt_c_name_lib_hook="\ 3984*663afb9bSAndroid Build Coastguard Worker -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3985*663afb9bSAndroid Build Coastguard Worker -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3986*663afb9bSAndroid Build Coastguard Workerelse 3987*663afb9bSAndroid Build Coastguard Worker # Disable hooks by default. 3988*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_global_symbol_to_import= 3989*663afb9bSAndroid Build Coastguard Worker lt_cdecl_hook= 3990*663afb9bSAndroid Build Coastguard Worker lt_c_name_hook= 3991*663afb9bSAndroid Build Coastguard Worker lt_c_name_lib_hook= 3992*663afb9bSAndroid Build Coastguard Workerfi 3993*663afb9bSAndroid Build Coastguard Worker 3994*663afb9bSAndroid Build Coastguard Worker# Transform an extracted symbol line into a proper C declaration. 3995*663afb9bSAndroid Build Coastguard Worker# Some systems (esp. on ia64) link data and code symbols differently, 3996*663afb9bSAndroid Build Coastguard Worker# so use this general approach. 3997*663afb9bSAndroid Build Coastguard Workerlt_cv_sys_global_symbol_to_cdecl="sed -n"\ 3998*663afb9bSAndroid Build Coastguard Worker$lt_cdecl_hook\ 3999*663afb9bSAndroid Build Coastguard Worker" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4000*663afb9bSAndroid Build Coastguard Worker" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4001*663afb9bSAndroid Build Coastguard Worker 4002*663afb9bSAndroid Build Coastguard Worker# Transform an extracted symbol line into symbol name and symbol address 4003*663afb9bSAndroid Build Coastguard Workerlt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 4004*663afb9bSAndroid Build Coastguard Worker$lt_c_name_hook\ 4005*663afb9bSAndroid Build Coastguard Worker" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4006*663afb9bSAndroid Build Coastguard Worker" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4007*663afb9bSAndroid Build Coastguard Worker 4008*663afb9bSAndroid Build Coastguard Worker# Transform an extracted symbol line into symbol name with lib prefix and 4009*663afb9bSAndroid Build Coastguard Worker# symbol address. 4010*663afb9bSAndroid Build Coastguard Workerlt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4011*663afb9bSAndroid Build Coastguard Worker$lt_c_name_lib_hook\ 4012*663afb9bSAndroid Build Coastguard Worker" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4013*663afb9bSAndroid Build Coastguard Worker" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4014*663afb9bSAndroid Build Coastguard Worker" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4015*663afb9bSAndroid Build Coastguard Worker 4016*663afb9bSAndroid Build Coastguard Worker# Handle CRLF in mingw tool chain 4017*663afb9bSAndroid Build Coastguard Workeropt_cr= 4018*663afb9bSAndroid Build Coastguard Workercase $build_os in 4019*663afb9bSAndroid Build Coastguard Workermingw*) 4020*663afb9bSAndroid Build Coastguard Worker opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4021*663afb9bSAndroid Build Coastguard Worker ;; 4022*663afb9bSAndroid Build Coastguard Workeresac 4023*663afb9bSAndroid Build Coastguard Worker 4024*663afb9bSAndroid Build Coastguard Worker# Try without a prefix underscore, then with it. 4025*663afb9bSAndroid Build Coastguard Workerfor ac_symprfx in "" "_"; do 4026*663afb9bSAndroid Build Coastguard Worker 4027*663afb9bSAndroid Build Coastguard Worker # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4028*663afb9bSAndroid Build Coastguard Worker symxfrm="\\1 $ac_symprfx\\2 \\2" 4029*663afb9bSAndroid Build Coastguard Worker 4030*663afb9bSAndroid Build Coastguard Worker # Write the raw and C identifiers. 4031*663afb9bSAndroid Build Coastguard Worker if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4032*663afb9bSAndroid Build Coastguard Worker # Fake it for dumpbin and say T for any non-static function, 4033*663afb9bSAndroid Build Coastguard Worker # D for any global variable and I for any imported variable. 4034*663afb9bSAndroid Build Coastguard Worker # Also find C++ and __fastcall symbols from MSVC++ or ICC, 4035*663afb9bSAndroid Build Coastguard Worker # which start with @ or ?. 4036*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4037*663afb9bSAndroid Build Coastguard Worker" {last_section=section; section=\$ 3};"\ 4038*663afb9bSAndroid Build Coastguard Worker" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4039*663afb9bSAndroid Build Coastguard Worker" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4040*663afb9bSAndroid Build Coastguard Worker" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4041*663afb9bSAndroid Build Coastguard Worker" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4042*663afb9bSAndroid Build Coastguard Worker" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4043*663afb9bSAndroid Build Coastguard Worker" \$ 0!~/External *\|/{next};"\ 4044*663afb9bSAndroid Build Coastguard Worker" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4045*663afb9bSAndroid Build Coastguard Worker" {if(hide[section]) next};"\ 4046*663afb9bSAndroid Build Coastguard Worker" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4047*663afb9bSAndroid Build Coastguard Worker" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4048*663afb9bSAndroid Build Coastguard Worker" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4049*663afb9bSAndroid Build Coastguard Worker" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4050*663afb9bSAndroid Build Coastguard Worker" ' prfx=^$ac_symprfx]" 4051*663afb9bSAndroid Build Coastguard Worker else 4052*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4053*663afb9bSAndroid Build Coastguard Worker fi 4054*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4055*663afb9bSAndroid Build Coastguard Worker 4056*663afb9bSAndroid Build Coastguard Worker # Check to see that the pipe works correctly. 4057*663afb9bSAndroid Build Coastguard Worker pipe_works=no 4058*663afb9bSAndroid Build Coastguard Worker 4059*663afb9bSAndroid Build Coastguard Worker rm -f conftest* 4060*663afb9bSAndroid Build Coastguard Worker cat > conftest.$ac_ext <<_LT_EOF 4061*663afb9bSAndroid Build Coastguard Worker#ifdef __cplusplus 4062*663afb9bSAndroid Build Coastguard Workerextern "C" { 4063*663afb9bSAndroid Build Coastguard Worker#endif 4064*663afb9bSAndroid Build Coastguard Workerchar nm_test_var; 4065*663afb9bSAndroid Build Coastguard Workervoid nm_test_func(void); 4066*663afb9bSAndroid Build Coastguard Workervoid nm_test_func(void){} 4067*663afb9bSAndroid Build Coastguard Worker#ifdef __cplusplus 4068*663afb9bSAndroid Build Coastguard Worker} 4069*663afb9bSAndroid Build Coastguard Worker#endif 4070*663afb9bSAndroid Build Coastguard Workerint main(){nm_test_var='a';nm_test_func();return(0);} 4071*663afb9bSAndroid Build Coastguard Worker_LT_EOF 4072*663afb9bSAndroid Build Coastguard Worker 4073*663afb9bSAndroid Build Coastguard Worker if AC_TRY_EVAL(ac_compile); then 4074*663afb9bSAndroid Build Coastguard Worker # Now try to grab the symbols. 4075*663afb9bSAndroid Build Coastguard Worker nlist=conftest.nm 4076*663afb9bSAndroid Build Coastguard Worker if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4077*663afb9bSAndroid Build Coastguard Worker # Try sorting and uniquifying the output. 4078*663afb9bSAndroid Build Coastguard Worker if sort "$nlist" | uniq > "$nlist"T; then 4079*663afb9bSAndroid Build Coastguard Worker mv -f "$nlist"T "$nlist" 4080*663afb9bSAndroid Build Coastguard Worker else 4081*663afb9bSAndroid Build Coastguard Worker rm -f "$nlist"T 4082*663afb9bSAndroid Build Coastguard Worker fi 4083*663afb9bSAndroid Build Coastguard Worker 4084*663afb9bSAndroid Build Coastguard Worker # Make sure that we snagged all the symbols we need. 4085*663afb9bSAndroid Build Coastguard Worker if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4086*663afb9bSAndroid Build Coastguard Worker if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4087*663afb9bSAndroid Build Coastguard Worker cat <<_LT_EOF > conftest.$ac_ext 4088*663afb9bSAndroid Build Coastguard Worker/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4089*663afb9bSAndroid Build Coastguard Worker#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4090*663afb9bSAndroid Build Coastguard Worker/* DATA imports from DLLs on WIN32 can't be const, because runtime 4091*663afb9bSAndroid Build Coastguard Worker relocations are performed -- see ld's documentation on pseudo-relocs. */ 4092*663afb9bSAndroid Build Coastguard Worker# define LT@&t@_DLSYM_CONST 4093*663afb9bSAndroid Build Coastguard Worker#elif defined __osf__ 4094*663afb9bSAndroid Build Coastguard Worker/* This system does not cope well with relocations in const data. */ 4095*663afb9bSAndroid Build Coastguard Worker# define LT@&t@_DLSYM_CONST 4096*663afb9bSAndroid Build Coastguard Worker#else 4097*663afb9bSAndroid Build Coastguard Worker# define LT@&t@_DLSYM_CONST const 4098*663afb9bSAndroid Build Coastguard Worker#endif 4099*663afb9bSAndroid Build Coastguard Worker 4100*663afb9bSAndroid Build Coastguard Worker#ifdef __cplusplus 4101*663afb9bSAndroid Build Coastguard Workerextern "C" { 4102*663afb9bSAndroid Build Coastguard Worker#endif 4103*663afb9bSAndroid Build Coastguard Worker 4104*663afb9bSAndroid Build Coastguard Worker_LT_EOF 4105*663afb9bSAndroid Build Coastguard Worker # Now generate the symbol file. 4106*663afb9bSAndroid Build Coastguard Worker eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4107*663afb9bSAndroid Build Coastguard Worker 4108*663afb9bSAndroid Build Coastguard Worker cat <<_LT_EOF >> conftest.$ac_ext 4109*663afb9bSAndroid Build Coastguard Worker 4110*663afb9bSAndroid Build Coastguard Worker/* The mapping between symbol names and symbols. */ 4111*663afb9bSAndroid Build Coastguard WorkerLT@&t@_DLSYM_CONST struct { 4112*663afb9bSAndroid Build Coastguard Worker const char *name; 4113*663afb9bSAndroid Build Coastguard Worker void *address; 4114*663afb9bSAndroid Build Coastguard Worker} 4115*663afb9bSAndroid Build Coastguard Workerlt__PROGRAM__LTX_preloaded_symbols[[]] = 4116*663afb9bSAndroid Build Coastguard Worker{ 4117*663afb9bSAndroid Build Coastguard Worker { "@PROGRAM@", (void *) 0 }, 4118*663afb9bSAndroid Build Coastguard Worker_LT_EOF 4119*663afb9bSAndroid Build Coastguard Worker $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4120*663afb9bSAndroid Build Coastguard Worker cat <<\_LT_EOF >> conftest.$ac_ext 4121*663afb9bSAndroid Build Coastguard Worker {0, (void *) 0} 4122*663afb9bSAndroid Build Coastguard Worker}; 4123*663afb9bSAndroid Build Coastguard Worker 4124*663afb9bSAndroid Build Coastguard Worker/* This works around a problem in FreeBSD linker */ 4125*663afb9bSAndroid Build Coastguard Worker#ifdef FREEBSD_WORKAROUND 4126*663afb9bSAndroid Build Coastguard Workerstatic const void *lt_preloaded_setup() { 4127*663afb9bSAndroid Build Coastguard Worker return lt__PROGRAM__LTX_preloaded_symbols; 4128*663afb9bSAndroid Build Coastguard Worker} 4129*663afb9bSAndroid Build Coastguard Worker#endif 4130*663afb9bSAndroid Build Coastguard Worker 4131*663afb9bSAndroid Build Coastguard Worker#ifdef __cplusplus 4132*663afb9bSAndroid Build Coastguard Worker} 4133*663afb9bSAndroid Build Coastguard Worker#endif 4134*663afb9bSAndroid Build Coastguard Worker_LT_EOF 4135*663afb9bSAndroid Build Coastguard Worker # Now try linking the two files. 4136*663afb9bSAndroid Build Coastguard Worker mv conftest.$ac_objext conftstm.$ac_objext 4137*663afb9bSAndroid Build Coastguard Worker lt_globsym_save_LIBS=$LIBS 4138*663afb9bSAndroid Build Coastguard Worker lt_globsym_save_CFLAGS=$CFLAGS 4139*663afb9bSAndroid Build Coastguard Worker LIBS=conftstm.$ac_objext 4140*663afb9bSAndroid Build Coastguard Worker CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4141*663afb9bSAndroid Build Coastguard Worker if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4142*663afb9bSAndroid Build Coastguard Worker pipe_works=yes 4143*663afb9bSAndroid Build Coastguard Worker fi 4144*663afb9bSAndroid Build Coastguard Worker LIBS=$lt_globsym_save_LIBS 4145*663afb9bSAndroid Build Coastguard Worker CFLAGS=$lt_globsym_save_CFLAGS 4146*663afb9bSAndroid Build Coastguard Worker else 4147*663afb9bSAndroid Build Coastguard Worker echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4148*663afb9bSAndroid Build Coastguard Worker fi 4149*663afb9bSAndroid Build Coastguard Worker else 4150*663afb9bSAndroid Build Coastguard Worker echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4151*663afb9bSAndroid Build Coastguard Worker fi 4152*663afb9bSAndroid Build Coastguard Worker else 4153*663afb9bSAndroid Build Coastguard Worker echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4154*663afb9bSAndroid Build Coastguard Worker fi 4155*663afb9bSAndroid Build Coastguard Worker else 4156*663afb9bSAndroid Build Coastguard Worker echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4157*663afb9bSAndroid Build Coastguard Worker cat conftest.$ac_ext >&5 4158*663afb9bSAndroid Build Coastguard Worker fi 4159*663afb9bSAndroid Build Coastguard Worker rm -rf conftest* conftst* 4160*663afb9bSAndroid Build Coastguard Worker 4161*663afb9bSAndroid Build Coastguard Worker # Do not use the global_symbol_pipe unless it works. 4162*663afb9bSAndroid Build Coastguard Worker if test yes = "$pipe_works"; then 4163*663afb9bSAndroid Build Coastguard Worker break 4164*663afb9bSAndroid Build Coastguard Worker else 4165*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_global_symbol_pipe= 4166*663afb9bSAndroid Build Coastguard Worker fi 4167*663afb9bSAndroid Build Coastguard Workerdone 4168*663afb9bSAndroid Build Coastguard Worker]) 4169*663afb9bSAndroid Build Coastguard Workerif test -z "$lt_cv_sys_global_symbol_pipe"; then 4170*663afb9bSAndroid Build Coastguard Worker lt_cv_sys_global_symbol_to_cdecl= 4171*663afb9bSAndroid Build Coastguard Workerfi 4172*663afb9bSAndroid Build Coastguard Workerif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4173*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT(failed) 4174*663afb9bSAndroid Build Coastguard Workerelse 4175*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT(ok) 4176*663afb9bSAndroid Build Coastguard Workerfi 4177*663afb9bSAndroid Build Coastguard Worker 4178*663afb9bSAndroid Build Coastguard Worker# Response file support. 4179*663afb9bSAndroid Build Coastguard Workerif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4180*663afb9bSAndroid Build Coastguard Worker nm_file_list_spec='@' 4181*663afb9bSAndroid Build Coastguard Workerelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4182*663afb9bSAndroid Build Coastguard Worker nm_file_list_spec='@' 4183*663afb9bSAndroid Build Coastguard Workerfi 4184*663afb9bSAndroid Build Coastguard Worker 4185*663afb9bSAndroid Build Coastguard Worker_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4186*663afb9bSAndroid Build Coastguard Worker [Take the output of nm and produce a listing of raw symbols and C names]) 4187*663afb9bSAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4188*663afb9bSAndroid Build Coastguard Worker [Transform the output of nm in a proper C declaration]) 4189*663afb9bSAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4190*663afb9bSAndroid Build Coastguard Worker [Transform the output of nm into a list of symbols to manually relocate]) 4191*663afb9bSAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_c_name_address], 4192*663afb9bSAndroid Build Coastguard Worker [lt_cv_sys_global_symbol_to_c_name_address], [1], 4193*663afb9bSAndroid Build Coastguard Worker [Transform the output of nm in a C name address pair]) 4194*663afb9bSAndroid Build Coastguard Worker_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4195*663afb9bSAndroid Build Coastguard Worker [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4196*663afb9bSAndroid Build Coastguard Worker [Transform the output of nm in a C name address pair when lib prefix is needed]) 4197*663afb9bSAndroid Build Coastguard Worker_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4198*663afb9bSAndroid Build Coastguard Worker [The name lister interface]) 4199*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [nm_file_list_spec], [1], 4200*663afb9bSAndroid Build Coastguard Worker [Specify filename containing input files for $NM]) 4201*663afb9bSAndroid Build Coastguard Worker]) # _LT_CMD_GLOBAL_SYMBOLS 4202*663afb9bSAndroid Build Coastguard Worker 4203*663afb9bSAndroid Build Coastguard Worker 4204*663afb9bSAndroid Build Coastguard Worker# _LT_COMPILER_PIC([TAGNAME]) 4205*663afb9bSAndroid Build Coastguard Worker# --------------------------- 4206*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_COMPILER_PIC], 4207*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_TAG_COMPILER])dnl 4208*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4209*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4210*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_static, $1)= 4211*663afb9bSAndroid Build Coastguard Worker 4212*663afb9bSAndroid Build Coastguard Workerm4_if([$1], [CXX], [ 4213*663afb9bSAndroid Build Coastguard Worker # C++ specific cases for pic, static, wl, etc. 4214*663afb9bSAndroid Build Coastguard Worker if test yes = "$GXX"; then 4215*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4216*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4217*663afb9bSAndroid Build Coastguard Worker 4218*663afb9bSAndroid Build Coastguard Worker case $host_os in 4219*663afb9bSAndroid Build Coastguard Worker aix*) 4220*663afb9bSAndroid Build Coastguard Worker # All AIX code is PIC. 4221*663afb9bSAndroid Build Coastguard Worker if test ia64 = "$host_cpu"; then 4222*663afb9bSAndroid Build Coastguard Worker # AIX 5 now supports IA64 processor 4223*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4224*663afb9bSAndroid Build Coastguard Worker fi 4225*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4226*663afb9bSAndroid Build Coastguard Worker ;; 4227*663afb9bSAndroid Build Coastguard Worker 4228*663afb9bSAndroid Build Coastguard Worker amigaos*) 4229*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 4230*663afb9bSAndroid Build Coastguard Worker powerpc) 4231*663afb9bSAndroid Build Coastguard Worker # see comment about AmigaOS4 .so support 4232*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4233*663afb9bSAndroid Build Coastguard Worker ;; 4234*663afb9bSAndroid Build Coastguard Worker m68k) 4235*663afb9bSAndroid Build Coastguard Worker # FIXME: we need at least 68020 code to build shared libraries, but 4236*663afb9bSAndroid Build Coastguard Worker # adding the '-m68020' flag to GCC prevents building anything better, 4237*663afb9bSAndroid Build Coastguard Worker # like '-m68040'. 4238*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4239*663afb9bSAndroid Build Coastguard Worker ;; 4240*663afb9bSAndroid Build Coastguard Worker esac 4241*663afb9bSAndroid Build Coastguard Worker ;; 4242*663afb9bSAndroid Build Coastguard Worker 4243*663afb9bSAndroid Build Coastguard Worker beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4244*663afb9bSAndroid Build Coastguard Worker # PIC is the default for these OSes. 4245*663afb9bSAndroid Build Coastguard Worker ;; 4246*663afb9bSAndroid Build Coastguard Worker mingw* | cygwin* | os2* | pw32* | cegcc*) 4247*663afb9bSAndroid Build Coastguard Worker # This hack is so that the source file can tell whether it is being 4248*663afb9bSAndroid Build Coastguard Worker # built for inclusion in a dll (and should export symbols for example). 4249*663afb9bSAndroid Build Coastguard Worker # Although the cygwin gcc ignores -fPIC, still need this for old-style 4250*663afb9bSAndroid Build Coastguard Worker # (--disable-auto-import) libraries 4251*663afb9bSAndroid Build Coastguard Worker m4_if([$1], [GCJ], [], 4252*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4253*663afb9bSAndroid Build Coastguard Worker case $host_os in 4254*663afb9bSAndroid Build Coastguard Worker os2*) 4255*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4256*663afb9bSAndroid Build Coastguard Worker ;; 4257*663afb9bSAndroid Build Coastguard Worker esac 4258*663afb9bSAndroid Build Coastguard Worker ;; 4259*663afb9bSAndroid Build Coastguard Worker darwin* | rhapsody*) 4260*663afb9bSAndroid Build Coastguard Worker # PIC is the default on this platform 4261*663afb9bSAndroid Build Coastguard Worker # Common symbols not allowed in MH_DYLIB files 4262*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4263*663afb9bSAndroid Build Coastguard Worker ;; 4264*663afb9bSAndroid Build Coastguard Worker *djgpp*) 4265*663afb9bSAndroid Build Coastguard Worker # DJGPP does not support shared libraries at all 4266*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4267*663afb9bSAndroid Build Coastguard Worker ;; 4268*663afb9bSAndroid Build Coastguard Worker haiku*) 4269*663afb9bSAndroid Build Coastguard Worker # PIC is the default for Haiku. 4270*663afb9bSAndroid Build Coastguard Worker # The "-static" flag exists, but is broken. 4271*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)= 4272*663afb9bSAndroid Build Coastguard Worker ;; 4273*663afb9bSAndroid Build Coastguard Worker interix[[3-9]]*) 4274*663afb9bSAndroid Build Coastguard Worker # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4275*663afb9bSAndroid Build Coastguard Worker # Instead, we relocate shared libraries at runtime. 4276*663afb9bSAndroid Build Coastguard Worker ;; 4277*663afb9bSAndroid Build Coastguard Worker sysv4*MP*) 4278*663afb9bSAndroid Build Coastguard Worker if test -d /usr/nec; then 4279*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4280*663afb9bSAndroid Build Coastguard Worker fi 4281*663afb9bSAndroid Build Coastguard Worker ;; 4282*663afb9bSAndroid Build Coastguard Worker hpux*) 4283*663afb9bSAndroid Build Coastguard Worker # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4284*663afb9bSAndroid Build Coastguard Worker # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4285*663afb9bSAndroid Build Coastguard Worker # sets the default TLS model and affects inlining. 4286*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 4287*663afb9bSAndroid Build Coastguard Worker hppa*64*) 4288*663afb9bSAndroid Build Coastguard Worker ;; 4289*663afb9bSAndroid Build Coastguard Worker *) 4290*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4291*663afb9bSAndroid Build Coastguard Worker ;; 4292*663afb9bSAndroid Build Coastguard Worker esac 4293*663afb9bSAndroid Build Coastguard Worker ;; 4294*663afb9bSAndroid Build Coastguard Worker *qnx* | *nto*) 4295*663afb9bSAndroid Build Coastguard Worker # QNX uses GNU C++, but need to define -shared option too, otherwise 4296*663afb9bSAndroid Build Coastguard Worker # it will coredump. 4297*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4298*663afb9bSAndroid Build Coastguard Worker ;; 4299*663afb9bSAndroid Build Coastguard Worker *) 4300*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4301*663afb9bSAndroid Build Coastguard Worker ;; 4302*663afb9bSAndroid Build Coastguard Worker esac 4303*663afb9bSAndroid Build Coastguard Worker else 4304*663afb9bSAndroid Build Coastguard Worker case $host_os in 4305*663afb9bSAndroid Build Coastguard Worker aix[[4-9]]*) 4306*663afb9bSAndroid Build Coastguard Worker # All AIX code is PIC. 4307*663afb9bSAndroid Build Coastguard Worker if test ia64 = "$host_cpu"; then 4308*663afb9bSAndroid Build Coastguard Worker # AIX 5 now supports IA64 processor 4309*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4310*663afb9bSAndroid Build Coastguard Worker else 4311*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4312*663afb9bSAndroid Build Coastguard Worker fi 4313*663afb9bSAndroid Build Coastguard Worker ;; 4314*663afb9bSAndroid Build Coastguard Worker chorus*) 4315*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4316*663afb9bSAndroid Build Coastguard Worker cxch68*) 4317*663afb9bSAndroid Build Coastguard Worker # Green Hills C++ Compiler 4318*663afb9bSAndroid Build Coastguard Worker # _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" 4319*663afb9bSAndroid Build Coastguard Worker ;; 4320*663afb9bSAndroid Build Coastguard Worker esac 4321*663afb9bSAndroid Build Coastguard Worker ;; 4322*663afb9bSAndroid Build Coastguard Worker mingw* | cygwin* | os2* | pw32* | cegcc*) 4323*663afb9bSAndroid Build Coastguard Worker # This hack is so that the source file can tell whether it is being 4324*663afb9bSAndroid Build Coastguard Worker # built for inclusion in a dll (and should export symbols for example). 4325*663afb9bSAndroid Build Coastguard Worker m4_if([$1], [GCJ], [], 4326*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4327*663afb9bSAndroid Build Coastguard Worker ;; 4328*663afb9bSAndroid Build Coastguard Worker dgux*) 4329*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4330*663afb9bSAndroid Build Coastguard Worker ec++*) 4331*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4332*663afb9bSAndroid Build Coastguard Worker ;; 4333*663afb9bSAndroid Build Coastguard Worker ghcx*) 4334*663afb9bSAndroid Build Coastguard Worker # Green Hills C++ Compiler 4335*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4336*663afb9bSAndroid Build Coastguard Worker ;; 4337*663afb9bSAndroid Build Coastguard Worker *) 4338*663afb9bSAndroid Build Coastguard Worker ;; 4339*663afb9bSAndroid Build Coastguard Worker esac 4340*663afb9bSAndroid Build Coastguard Worker ;; 4341*663afb9bSAndroid Build Coastguard Worker freebsd* | dragonfly*) 4342*663afb9bSAndroid Build Coastguard Worker # FreeBSD uses GNU C++ 4343*663afb9bSAndroid Build Coastguard Worker ;; 4344*663afb9bSAndroid Build Coastguard Worker hpux9* | hpux10* | hpux11*) 4345*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4346*663afb9bSAndroid Build Coastguard Worker CC*) 4347*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4348*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4349*663afb9bSAndroid Build Coastguard Worker if test ia64 != "$host_cpu"; then 4350*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4351*663afb9bSAndroid Build Coastguard Worker fi 4352*663afb9bSAndroid Build Coastguard Worker ;; 4353*663afb9bSAndroid Build Coastguard Worker aCC*) 4354*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4355*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4356*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 4357*663afb9bSAndroid Build Coastguard Worker hppa*64*|ia64*) 4358*663afb9bSAndroid Build Coastguard Worker # +Z the default 4359*663afb9bSAndroid Build Coastguard Worker ;; 4360*663afb9bSAndroid Build Coastguard Worker *) 4361*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4362*663afb9bSAndroid Build Coastguard Worker ;; 4363*663afb9bSAndroid Build Coastguard Worker esac 4364*663afb9bSAndroid Build Coastguard Worker ;; 4365*663afb9bSAndroid Build Coastguard Worker *) 4366*663afb9bSAndroid Build Coastguard Worker ;; 4367*663afb9bSAndroid Build Coastguard Worker esac 4368*663afb9bSAndroid Build Coastguard Worker ;; 4369*663afb9bSAndroid Build Coastguard Worker interix*) 4370*663afb9bSAndroid Build Coastguard Worker # This is c89, which is MS Visual C++ (no shared libs) 4371*663afb9bSAndroid Build Coastguard Worker # Anyone wants to do a port? 4372*663afb9bSAndroid Build Coastguard Worker ;; 4373*663afb9bSAndroid Build Coastguard Worker irix5* | irix6* | nonstopux*) 4374*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4375*663afb9bSAndroid Build Coastguard Worker CC*) 4376*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4377*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4378*663afb9bSAndroid Build Coastguard Worker # CC pic flag -KPIC is the default. 4379*663afb9bSAndroid Build Coastguard Worker ;; 4380*663afb9bSAndroid Build Coastguard Worker *) 4381*663afb9bSAndroid Build Coastguard Worker ;; 4382*663afb9bSAndroid Build Coastguard Worker esac 4383*663afb9bSAndroid Build Coastguard Worker ;; 4384*663afb9bSAndroid Build Coastguard Worker linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4385*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4386*663afb9bSAndroid Build Coastguard Worker KCC*) 4387*663afb9bSAndroid Build Coastguard Worker # KAI C++ Compiler 4388*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4389*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4390*663afb9bSAndroid Build Coastguard Worker ;; 4391*663afb9bSAndroid Build Coastguard Worker ecpc* ) 4392*663afb9bSAndroid Build Coastguard Worker # old Intel C++ for x86_64, which still supported -KPIC. 4393*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4394*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4395*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4396*663afb9bSAndroid Build Coastguard Worker ;; 4397*663afb9bSAndroid Build Coastguard Worker icpc* ) 4398*663afb9bSAndroid Build Coastguard Worker # Intel C++, used to be incompatible with GCC. 4399*663afb9bSAndroid Build Coastguard Worker # ICC 10 doesn't accept -KPIC any more. 4400*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4401*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4402*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4403*663afb9bSAndroid Build Coastguard Worker ;; 4404*663afb9bSAndroid Build Coastguard Worker pgCC* | pgcpp*) 4405*663afb9bSAndroid Build Coastguard Worker # Portland Group C++ compiler 4406*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4407*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4408*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4409*663afb9bSAndroid Build Coastguard Worker ;; 4410*663afb9bSAndroid Build Coastguard Worker cxx*) 4411*663afb9bSAndroid Build Coastguard Worker # Compaq C++ 4412*663afb9bSAndroid Build Coastguard Worker # Make sure the PIC flag is empty. It appears that all Alpha 4413*663afb9bSAndroid Build Coastguard Worker # Linux and Compaq Tru64 Unix objects are PIC. 4414*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4415*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4416*663afb9bSAndroid Build Coastguard Worker ;; 4417*663afb9bSAndroid Build Coastguard Worker xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4418*663afb9bSAndroid Build Coastguard Worker # IBM XL 8.0, 9.0 on PPC and BlueGene 4419*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4420*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4421*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4422*663afb9bSAndroid Build Coastguard Worker ;; 4423*663afb9bSAndroid Build Coastguard Worker *) 4424*663afb9bSAndroid Build Coastguard Worker case `$CC -V 2>&1 | sed 5q` in 4425*663afb9bSAndroid Build Coastguard Worker *Sun\ C*) 4426*663afb9bSAndroid Build Coastguard Worker # Sun C++ 5.9 4427*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4428*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4429*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4430*663afb9bSAndroid Build Coastguard Worker ;; 4431*663afb9bSAndroid Build Coastguard Worker esac 4432*663afb9bSAndroid Build Coastguard Worker ;; 4433*663afb9bSAndroid Build Coastguard Worker esac 4434*663afb9bSAndroid Build Coastguard Worker ;; 4435*663afb9bSAndroid Build Coastguard Worker lynxos*) 4436*663afb9bSAndroid Build Coastguard Worker ;; 4437*663afb9bSAndroid Build Coastguard Worker m88k*) 4438*663afb9bSAndroid Build Coastguard Worker ;; 4439*663afb9bSAndroid Build Coastguard Worker mvs*) 4440*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4441*663afb9bSAndroid Build Coastguard Worker cxx*) 4442*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4443*663afb9bSAndroid Build Coastguard Worker ;; 4444*663afb9bSAndroid Build Coastguard Worker *) 4445*663afb9bSAndroid Build Coastguard Worker ;; 4446*663afb9bSAndroid Build Coastguard Worker esac 4447*663afb9bSAndroid Build Coastguard Worker ;; 4448*663afb9bSAndroid Build Coastguard Worker netbsd*) 4449*663afb9bSAndroid Build Coastguard Worker ;; 4450*663afb9bSAndroid Build Coastguard Worker *qnx* | *nto*) 4451*663afb9bSAndroid Build Coastguard Worker # QNX uses GNU C++, but need to define -shared option too, otherwise 4452*663afb9bSAndroid Build Coastguard Worker # it will coredump. 4453*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4454*663afb9bSAndroid Build Coastguard Worker ;; 4455*663afb9bSAndroid Build Coastguard Worker osf3* | osf4* | osf5*) 4456*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4457*663afb9bSAndroid Build Coastguard Worker KCC*) 4458*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4459*663afb9bSAndroid Build Coastguard Worker ;; 4460*663afb9bSAndroid Build Coastguard Worker RCC*) 4461*663afb9bSAndroid Build Coastguard Worker # Rational C++ 2.4.1 4462*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4463*663afb9bSAndroid Build Coastguard Worker ;; 4464*663afb9bSAndroid Build Coastguard Worker cxx*) 4465*663afb9bSAndroid Build Coastguard Worker # Digital/Compaq C++ 4466*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4467*663afb9bSAndroid Build Coastguard Worker # Make sure the PIC flag is empty. It appears that all Alpha 4468*663afb9bSAndroid Build Coastguard Worker # Linux and Compaq Tru64 Unix objects are PIC. 4469*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4470*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4471*663afb9bSAndroid Build Coastguard Worker ;; 4472*663afb9bSAndroid Build Coastguard Worker *) 4473*663afb9bSAndroid Build Coastguard Worker ;; 4474*663afb9bSAndroid Build Coastguard Worker esac 4475*663afb9bSAndroid Build Coastguard Worker ;; 4476*663afb9bSAndroid Build Coastguard Worker psos*) 4477*663afb9bSAndroid Build Coastguard Worker ;; 4478*663afb9bSAndroid Build Coastguard Worker solaris*) 4479*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4480*663afb9bSAndroid Build Coastguard Worker CC* | sunCC*) 4481*663afb9bSAndroid Build Coastguard Worker # Sun C++ 4.2, 5.x and Centerline C++ 4482*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4483*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4484*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4485*663afb9bSAndroid Build Coastguard Worker ;; 4486*663afb9bSAndroid Build Coastguard Worker gcx*) 4487*663afb9bSAndroid Build Coastguard Worker # Green Hills C++ Compiler 4488*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4489*663afb9bSAndroid Build Coastguard Worker ;; 4490*663afb9bSAndroid Build Coastguard Worker *) 4491*663afb9bSAndroid Build Coastguard Worker ;; 4492*663afb9bSAndroid Build Coastguard Worker esac 4493*663afb9bSAndroid Build Coastguard Worker ;; 4494*663afb9bSAndroid Build Coastguard Worker sunos4*) 4495*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4496*663afb9bSAndroid Build Coastguard Worker CC*) 4497*663afb9bSAndroid Build Coastguard Worker # Sun C++ 4.x 4498*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4499*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4500*663afb9bSAndroid Build Coastguard Worker ;; 4501*663afb9bSAndroid Build Coastguard Worker lcc*) 4502*663afb9bSAndroid Build Coastguard Worker # Lucid 4503*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4504*663afb9bSAndroid Build Coastguard Worker ;; 4505*663afb9bSAndroid Build Coastguard Worker *) 4506*663afb9bSAndroid Build Coastguard Worker ;; 4507*663afb9bSAndroid Build Coastguard Worker esac 4508*663afb9bSAndroid Build Coastguard Worker ;; 4509*663afb9bSAndroid Build Coastguard Worker sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4510*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4511*663afb9bSAndroid Build Coastguard Worker CC*) 4512*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4513*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4514*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4515*663afb9bSAndroid Build Coastguard Worker ;; 4516*663afb9bSAndroid Build Coastguard Worker esac 4517*663afb9bSAndroid Build Coastguard Worker ;; 4518*663afb9bSAndroid Build Coastguard Worker tandem*) 4519*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4520*663afb9bSAndroid Build Coastguard Worker NCC*) 4521*663afb9bSAndroid Build Coastguard Worker # NonStop-UX NCC 3.20 4522*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4523*663afb9bSAndroid Build Coastguard Worker ;; 4524*663afb9bSAndroid Build Coastguard Worker *) 4525*663afb9bSAndroid Build Coastguard Worker ;; 4526*663afb9bSAndroid Build Coastguard Worker esac 4527*663afb9bSAndroid Build Coastguard Worker ;; 4528*663afb9bSAndroid Build Coastguard Worker vxworks*) 4529*663afb9bSAndroid Build Coastguard Worker ;; 4530*663afb9bSAndroid Build Coastguard Worker *) 4531*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4532*663afb9bSAndroid Build Coastguard Worker ;; 4533*663afb9bSAndroid Build Coastguard Worker esac 4534*663afb9bSAndroid Build Coastguard Worker fi 4535*663afb9bSAndroid Build Coastguard Worker], 4536*663afb9bSAndroid Build Coastguard Worker[ 4537*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC"; then 4538*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4539*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4540*663afb9bSAndroid Build Coastguard Worker 4541*663afb9bSAndroid Build Coastguard Worker case $host_os in 4542*663afb9bSAndroid Build Coastguard Worker aix*) 4543*663afb9bSAndroid Build Coastguard Worker # All AIX code is PIC. 4544*663afb9bSAndroid Build Coastguard Worker if test ia64 = "$host_cpu"; then 4545*663afb9bSAndroid Build Coastguard Worker # AIX 5 now supports IA64 processor 4546*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4547*663afb9bSAndroid Build Coastguard Worker fi 4548*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4549*663afb9bSAndroid Build Coastguard Worker ;; 4550*663afb9bSAndroid Build Coastguard Worker 4551*663afb9bSAndroid Build Coastguard Worker amigaos*) 4552*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 4553*663afb9bSAndroid Build Coastguard Worker powerpc) 4554*663afb9bSAndroid Build Coastguard Worker # see comment about AmigaOS4 .so support 4555*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4556*663afb9bSAndroid Build Coastguard Worker ;; 4557*663afb9bSAndroid Build Coastguard Worker m68k) 4558*663afb9bSAndroid Build Coastguard Worker # FIXME: we need at least 68020 code to build shared libraries, but 4559*663afb9bSAndroid Build Coastguard Worker # adding the '-m68020' flag to GCC prevents building anything better, 4560*663afb9bSAndroid Build Coastguard Worker # like '-m68040'. 4561*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4562*663afb9bSAndroid Build Coastguard Worker ;; 4563*663afb9bSAndroid Build Coastguard Worker esac 4564*663afb9bSAndroid Build Coastguard Worker ;; 4565*663afb9bSAndroid Build Coastguard Worker 4566*663afb9bSAndroid Build Coastguard Worker beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4567*663afb9bSAndroid Build Coastguard Worker # PIC is the default for these OSes. 4568*663afb9bSAndroid Build Coastguard Worker ;; 4569*663afb9bSAndroid Build Coastguard Worker 4570*663afb9bSAndroid Build Coastguard Worker mingw* | cygwin* | pw32* | os2* | cegcc*) 4571*663afb9bSAndroid Build Coastguard Worker # This hack is so that the source file can tell whether it is being 4572*663afb9bSAndroid Build Coastguard Worker # built for inclusion in a dll (and should export symbols for example). 4573*663afb9bSAndroid Build Coastguard Worker # Although the cygwin gcc ignores -fPIC, still need this for old-style 4574*663afb9bSAndroid Build Coastguard Worker # (--disable-auto-import) libraries 4575*663afb9bSAndroid Build Coastguard Worker m4_if([$1], [GCJ], [], 4576*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4577*663afb9bSAndroid Build Coastguard Worker case $host_os in 4578*663afb9bSAndroid Build Coastguard Worker os2*) 4579*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4580*663afb9bSAndroid Build Coastguard Worker ;; 4581*663afb9bSAndroid Build Coastguard Worker esac 4582*663afb9bSAndroid Build Coastguard Worker ;; 4583*663afb9bSAndroid Build Coastguard Worker 4584*663afb9bSAndroid Build Coastguard Worker darwin* | rhapsody*) 4585*663afb9bSAndroid Build Coastguard Worker # PIC is the default on this platform 4586*663afb9bSAndroid Build Coastguard Worker # Common symbols not allowed in MH_DYLIB files 4587*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4588*663afb9bSAndroid Build Coastguard Worker ;; 4589*663afb9bSAndroid Build Coastguard Worker 4590*663afb9bSAndroid Build Coastguard Worker haiku*) 4591*663afb9bSAndroid Build Coastguard Worker # PIC is the default for Haiku. 4592*663afb9bSAndroid Build Coastguard Worker # The "-static" flag exists, but is broken. 4593*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)= 4594*663afb9bSAndroid Build Coastguard Worker ;; 4595*663afb9bSAndroid Build Coastguard Worker 4596*663afb9bSAndroid Build Coastguard Worker hpux*) 4597*663afb9bSAndroid Build Coastguard Worker # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4598*663afb9bSAndroid Build Coastguard Worker # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4599*663afb9bSAndroid Build Coastguard Worker # sets the default TLS model and affects inlining. 4600*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 4601*663afb9bSAndroid Build Coastguard Worker hppa*64*) 4602*663afb9bSAndroid Build Coastguard Worker # +Z the default 4603*663afb9bSAndroid Build Coastguard Worker ;; 4604*663afb9bSAndroid Build Coastguard Worker *) 4605*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4606*663afb9bSAndroid Build Coastguard Worker ;; 4607*663afb9bSAndroid Build Coastguard Worker esac 4608*663afb9bSAndroid Build Coastguard Worker ;; 4609*663afb9bSAndroid Build Coastguard Worker 4610*663afb9bSAndroid Build Coastguard Worker interix[[3-9]]*) 4611*663afb9bSAndroid Build Coastguard Worker # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4612*663afb9bSAndroid Build Coastguard Worker # Instead, we relocate shared libraries at runtime. 4613*663afb9bSAndroid Build Coastguard Worker ;; 4614*663afb9bSAndroid Build Coastguard Worker 4615*663afb9bSAndroid Build Coastguard Worker msdosdjgpp*) 4616*663afb9bSAndroid Build Coastguard Worker # Just because we use GCC doesn't mean we suddenly get shared libraries 4617*663afb9bSAndroid Build Coastguard Worker # on systems that don't support them. 4618*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4619*663afb9bSAndroid Build Coastguard Worker enable_shared=no 4620*663afb9bSAndroid Build Coastguard Worker ;; 4621*663afb9bSAndroid Build Coastguard Worker 4622*663afb9bSAndroid Build Coastguard Worker *nto* | *qnx*) 4623*663afb9bSAndroid Build Coastguard Worker # QNX uses GNU C++, but need to define -shared option too, otherwise 4624*663afb9bSAndroid Build Coastguard Worker # it will coredump. 4625*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4626*663afb9bSAndroid Build Coastguard Worker ;; 4627*663afb9bSAndroid Build Coastguard Worker 4628*663afb9bSAndroid Build Coastguard Worker sysv4*MP*) 4629*663afb9bSAndroid Build Coastguard Worker if test -d /usr/nec; then 4630*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4631*663afb9bSAndroid Build Coastguard Worker fi 4632*663afb9bSAndroid Build Coastguard Worker ;; 4633*663afb9bSAndroid Build Coastguard Worker 4634*663afb9bSAndroid Build Coastguard Worker *) 4635*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4636*663afb9bSAndroid Build Coastguard Worker ;; 4637*663afb9bSAndroid Build Coastguard Worker esac 4638*663afb9bSAndroid Build Coastguard Worker 4639*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4640*663afb9bSAndroid Build Coastguard Worker nvcc*) # Cuda Compiler Driver 2.2 4641*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4642*663afb9bSAndroid Build Coastguard Worker if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4643*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4644*663afb9bSAndroid Build Coastguard Worker fi 4645*663afb9bSAndroid Build Coastguard Worker ;; 4646*663afb9bSAndroid Build Coastguard Worker esac 4647*663afb9bSAndroid Build Coastguard Worker else 4648*663afb9bSAndroid Build Coastguard Worker # PORTME Check for flag to pass linker flags through the system compiler. 4649*663afb9bSAndroid Build Coastguard Worker case $host_os in 4650*663afb9bSAndroid Build Coastguard Worker aix*) 4651*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4652*663afb9bSAndroid Build Coastguard Worker if test ia64 = "$host_cpu"; then 4653*663afb9bSAndroid Build Coastguard Worker # AIX 5 now supports IA64 processor 4654*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4655*663afb9bSAndroid Build Coastguard Worker else 4656*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4657*663afb9bSAndroid Build Coastguard Worker fi 4658*663afb9bSAndroid Build Coastguard Worker ;; 4659*663afb9bSAndroid Build Coastguard Worker 4660*663afb9bSAndroid Build Coastguard Worker darwin* | rhapsody*) 4661*663afb9bSAndroid Build Coastguard Worker # PIC is the default on this platform 4662*663afb9bSAndroid Build Coastguard Worker # Common symbols not allowed in MH_DYLIB files 4663*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4664*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4665*663afb9bSAndroid Build Coastguard Worker nagfor*) 4666*663afb9bSAndroid Build Coastguard Worker # NAG Fortran compiler 4667*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4668*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4669*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4670*663afb9bSAndroid Build Coastguard Worker ;; 4671*663afb9bSAndroid Build Coastguard Worker esac 4672*663afb9bSAndroid Build Coastguard Worker ;; 4673*663afb9bSAndroid Build Coastguard Worker 4674*663afb9bSAndroid Build Coastguard Worker mingw* | cygwin* | pw32* | os2* | cegcc*) 4675*663afb9bSAndroid Build Coastguard Worker # This hack is so that the source file can tell whether it is being 4676*663afb9bSAndroid Build Coastguard Worker # built for inclusion in a dll (and should export symbols for example). 4677*663afb9bSAndroid Build Coastguard Worker m4_if([$1], [GCJ], [], 4678*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4679*663afb9bSAndroid Build Coastguard Worker case $host_os in 4680*663afb9bSAndroid Build Coastguard Worker os2*) 4681*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4682*663afb9bSAndroid Build Coastguard Worker ;; 4683*663afb9bSAndroid Build Coastguard Worker esac 4684*663afb9bSAndroid Build Coastguard Worker ;; 4685*663afb9bSAndroid Build Coastguard Worker 4686*663afb9bSAndroid Build Coastguard Worker hpux9* | hpux10* | hpux11*) 4687*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4688*663afb9bSAndroid Build Coastguard Worker # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4689*663afb9bSAndroid Build Coastguard Worker # not for PA HP-UX. 4690*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 4691*663afb9bSAndroid Build Coastguard Worker hppa*64*|ia64*) 4692*663afb9bSAndroid Build Coastguard Worker # +Z the default 4693*663afb9bSAndroid Build Coastguard Worker ;; 4694*663afb9bSAndroid Build Coastguard Worker *) 4695*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4696*663afb9bSAndroid Build Coastguard Worker ;; 4697*663afb9bSAndroid Build Coastguard Worker esac 4698*663afb9bSAndroid Build Coastguard Worker # Is there a better lt_prog_compiler_static that works with the bundled CC? 4699*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4700*663afb9bSAndroid Build Coastguard Worker ;; 4701*663afb9bSAndroid Build Coastguard Worker 4702*663afb9bSAndroid Build Coastguard Worker irix5* | irix6* | nonstopux*) 4703*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4704*663afb9bSAndroid Build Coastguard Worker # PIC (with -KPIC) is the default. 4705*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4706*663afb9bSAndroid Build Coastguard Worker ;; 4707*663afb9bSAndroid Build Coastguard Worker 4708*663afb9bSAndroid Build Coastguard Worker linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4709*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4710*663afb9bSAndroid Build Coastguard Worker # old Intel for x86_64, which still supported -KPIC. 4711*663afb9bSAndroid Build Coastguard Worker ecc*) 4712*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4713*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4714*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4715*663afb9bSAndroid Build Coastguard Worker ;; 4716*663afb9bSAndroid Build Coastguard Worker # icc used to be incompatible with GCC. 4717*663afb9bSAndroid Build Coastguard Worker # ICC 10 doesn't accept -KPIC any more. 4718*663afb9bSAndroid Build Coastguard Worker icc* | ifort*) 4719*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4720*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4721*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4722*663afb9bSAndroid Build Coastguard Worker ;; 4723*663afb9bSAndroid Build Coastguard Worker # Lahey Fortran 8.1. 4724*663afb9bSAndroid Build Coastguard Worker lf95*) 4725*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4726*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4727*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4728*663afb9bSAndroid Build Coastguard Worker ;; 4729*663afb9bSAndroid Build Coastguard Worker nagfor*) 4730*663afb9bSAndroid Build Coastguard Worker # NAG Fortran compiler 4731*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4732*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4733*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4734*663afb9bSAndroid Build Coastguard Worker ;; 4735*663afb9bSAndroid Build Coastguard Worker tcc*) 4736*663afb9bSAndroid Build Coastguard Worker # Fabrice Bellard et al's Tiny C Compiler 4737*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4738*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4739*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4740*663afb9bSAndroid Build Coastguard Worker ;; 4741*663afb9bSAndroid Build Coastguard Worker pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4742*663afb9bSAndroid Build Coastguard Worker # Portland Group compilers (*not* the Pentium gcc compiler, 4743*663afb9bSAndroid Build Coastguard Worker # which looks to be a dead project) 4744*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4745*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4746*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4747*663afb9bSAndroid Build Coastguard Worker ;; 4748*663afb9bSAndroid Build Coastguard Worker ccc*) 4749*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4750*663afb9bSAndroid Build Coastguard Worker # All Alpha code is PIC. 4751*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4752*663afb9bSAndroid Build Coastguard Worker ;; 4753*663afb9bSAndroid Build Coastguard Worker xl* | bgxl* | bgf* | mpixl*) 4754*663afb9bSAndroid Build Coastguard Worker # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4755*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4756*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4757*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4758*663afb9bSAndroid Build Coastguard Worker ;; 4759*663afb9bSAndroid Build Coastguard Worker *) 4760*663afb9bSAndroid Build Coastguard Worker case `$CC -V 2>&1 | sed 5q` in 4761*663afb9bSAndroid Build Coastguard Worker *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4762*663afb9bSAndroid Build Coastguard Worker # Sun Fortran 8.3 passes all unrecognized flags to the linker 4763*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4764*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4765*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4766*663afb9bSAndroid Build Coastguard Worker ;; 4767*663afb9bSAndroid Build Coastguard Worker *Sun\ F* | *Sun*Fortran*) 4768*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4769*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4770*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4771*663afb9bSAndroid Build Coastguard Worker ;; 4772*663afb9bSAndroid Build Coastguard Worker *Sun\ C*) 4773*663afb9bSAndroid Build Coastguard Worker # Sun C 5.9 4774*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4775*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4776*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4777*663afb9bSAndroid Build Coastguard Worker ;; 4778*663afb9bSAndroid Build Coastguard Worker *Intel*\ [[CF]]*Compiler*) 4779*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4780*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4781*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4782*663afb9bSAndroid Build Coastguard Worker ;; 4783*663afb9bSAndroid Build Coastguard Worker *Portland\ Group*) 4784*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4785*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4786*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4787*663afb9bSAndroid Build Coastguard Worker ;; 4788*663afb9bSAndroid Build Coastguard Worker esac 4789*663afb9bSAndroid Build Coastguard Worker ;; 4790*663afb9bSAndroid Build Coastguard Worker esac 4791*663afb9bSAndroid Build Coastguard Worker ;; 4792*663afb9bSAndroid Build Coastguard Worker 4793*663afb9bSAndroid Build Coastguard Worker newsos6) 4794*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4795*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4796*663afb9bSAndroid Build Coastguard Worker ;; 4797*663afb9bSAndroid Build Coastguard Worker 4798*663afb9bSAndroid Build Coastguard Worker *nto* | *qnx*) 4799*663afb9bSAndroid Build Coastguard Worker # QNX uses GNU C++, but need to define -shared option too, otherwise 4800*663afb9bSAndroid Build Coastguard Worker # it will coredump. 4801*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4802*663afb9bSAndroid Build Coastguard Worker ;; 4803*663afb9bSAndroid Build Coastguard Worker 4804*663afb9bSAndroid Build Coastguard Worker osf3* | osf4* | osf5*) 4805*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4806*663afb9bSAndroid Build Coastguard Worker # All OSF/1 code is PIC. 4807*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4808*663afb9bSAndroid Build Coastguard Worker ;; 4809*663afb9bSAndroid Build Coastguard Worker 4810*663afb9bSAndroid Build Coastguard Worker rdos*) 4811*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4812*663afb9bSAndroid Build Coastguard Worker ;; 4813*663afb9bSAndroid Build Coastguard Worker 4814*663afb9bSAndroid Build Coastguard Worker solaris*) 4815*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4816*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4817*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4818*663afb9bSAndroid Build Coastguard Worker f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4819*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4820*663afb9bSAndroid Build Coastguard Worker *) 4821*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4822*663afb9bSAndroid Build Coastguard Worker esac 4823*663afb9bSAndroid Build Coastguard Worker ;; 4824*663afb9bSAndroid Build Coastguard Worker 4825*663afb9bSAndroid Build Coastguard Worker sunos4*) 4826*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4827*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4828*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4829*663afb9bSAndroid Build Coastguard Worker ;; 4830*663afb9bSAndroid Build Coastguard Worker 4831*663afb9bSAndroid Build Coastguard Worker sysv4 | sysv4.2uw2* | sysv4.3*) 4832*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4833*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4834*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4835*663afb9bSAndroid Build Coastguard Worker ;; 4836*663afb9bSAndroid Build Coastguard Worker 4837*663afb9bSAndroid Build Coastguard Worker sysv4*MP*) 4838*663afb9bSAndroid Build Coastguard Worker if test -d /usr/nec; then 4839*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4840*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4841*663afb9bSAndroid Build Coastguard Worker fi 4842*663afb9bSAndroid Build Coastguard Worker ;; 4843*663afb9bSAndroid Build Coastguard Worker 4844*663afb9bSAndroid Build Coastguard Worker sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4845*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4846*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4847*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4848*663afb9bSAndroid Build Coastguard Worker ;; 4849*663afb9bSAndroid Build Coastguard Worker 4850*663afb9bSAndroid Build Coastguard Worker unicos*) 4851*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4852*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4853*663afb9bSAndroid Build Coastguard Worker ;; 4854*663afb9bSAndroid Build Coastguard Worker 4855*663afb9bSAndroid Build Coastguard Worker uts4*) 4856*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4857*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4858*663afb9bSAndroid Build Coastguard Worker ;; 4859*663afb9bSAndroid Build Coastguard Worker 4860*663afb9bSAndroid Build Coastguard Worker *) 4861*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4862*663afb9bSAndroid Build Coastguard Worker ;; 4863*663afb9bSAndroid Build Coastguard Worker esac 4864*663afb9bSAndroid Build Coastguard Worker fi 4865*663afb9bSAndroid Build Coastguard Worker]) 4866*663afb9bSAndroid Build Coastguard Workercase $host_os in 4867*663afb9bSAndroid Build Coastguard Worker # For platforms that do not support PIC, -DPIC is meaningless: 4868*663afb9bSAndroid Build Coastguard Worker *djgpp*) 4869*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4870*663afb9bSAndroid Build Coastguard Worker ;; 4871*663afb9bSAndroid Build Coastguard Worker *) 4872*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4873*663afb9bSAndroid Build Coastguard Worker ;; 4874*663afb9bSAndroid Build Coastguard Workeresac 4875*663afb9bSAndroid Build Coastguard Worker 4876*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_CHECK([for $compiler option to produce PIC], 4877*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4878*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4879*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4880*663afb9bSAndroid Build Coastguard Worker 4881*663afb9bSAndroid Build Coastguard Worker# 4882*663afb9bSAndroid Build Coastguard Worker# Check to make sure the PIC flag actually works. 4883*663afb9bSAndroid Build Coastguard Worker# 4884*663afb9bSAndroid Build Coastguard Workerif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4885*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4886*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4887*663afb9bSAndroid Build Coastguard Worker [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4888*663afb9bSAndroid Build Coastguard Worker [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4889*663afb9bSAndroid Build Coastguard Worker "" | " "*) ;; 4890*663afb9bSAndroid Build Coastguard Worker *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4891*663afb9bSAndroid Build Coastguard Worker esac], 4892*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4893*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4894*663afb9bSAndroid Build Coastguard Workerfi 4895*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4896*663afb9bSAndroid Build Coastguard Worker [Additional compiler flags for building library objects]) 4897*663afb9bSAndroid Build Coastguard Worker 4898*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4899*663afb9bSAndroid Build Coastguard Worker [How to pass a linker flag through the compiler]) 4900*663afb9bSAndroid Build Coastguard Worker# 4901*663afb9bSAndroid Build Coastguard Worker# Check to make sure the static flag actually works. 4902*663afb9bSAndroid Build Coastguard Worker# 4903*663afb9bSAndroid Build Coastguard Workerwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4904*663afb9bSAndroid Build Coastguard Worker_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4905*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4906*663afb9bSAndroid Build Coastguard Worker $lt_tmp_static_flag, 4907*663afb9bSAndroid Build Coastguard Worker [], 4908*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4909*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4910*663afb9bSAndroid Build Coastguard Worker [Compiler flag to prevent dynamic linking]) 4911*663afb9bSAndroid Build Coastguard Worker])# _LT_COMPILER_PIC 4912*663afb9bSAndroid Build Coastguard Worker 4913*663afb9bSAndroid Build Coastguard Worker 4914*663afb9bSAndroid Build Coastguard Worker# _LT_LINKER_SHLIBS([TAGNAME]) 4915*663afb9bSAndroid Build Coastguard Worker# ---------------------------- 4916*663afb9bSAndroid Build Coastguard Worker# See if the linker supports building shared libraries. 4917*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LINKER_SHLIBS], 4918*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([LT_PATH_LD])dnl 4919*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([LT_PATH_NM])dnl 4920*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4921*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4922*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl 4923*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_SED])dnl 4924*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4925*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_TAG_COMPILER])dnl 4926*663afb9bSAndroid Build Coastguard WorkerAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4927*663afb9bSAndroid Build Coastguard Workerm4_if([$1], [CXX], [ 4928*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4929*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4930*663afb9bSAndroid Build Coastguard Worker case $host_os in 4931*663afb9bSAndroid Build Coastguard Worker aix[[4-9]]*) 4932*663afb9bSAndroid Build Coastguard Worker # If we're using GNU nm, then we don't want the "-C" option. 4933*663afb9bSAndroid Build Coastguard Worker # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4934*663afb9bSAndroid Build Coastguard Worker # Without the "-l" option, or with the "-B" option, AIX nm treats 4935*663afb9bSAndroid Build Coastguard Worker # weak defined symbols like other global defined symbols, whereas 4936*663afb9bSAndroid Build Coastguard Worker # GNU nm marks them as "W". 4937*663afb9bSAndroid Build Coastguard Worker # While the 'weak' keyword is ignored in the Export File, we need 4938*663afb9bSAndroid Build Coastguard Worker # it in the Import File for the 'aix-soname' feature, so we have 4939*663afb9bSAndroid Build Coastguard Worker # to replace the "-B" option with "-P" for AIX nm. 4940*663afb9bSAndroid Build Coastguard Worker if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4941*663afb9bSAndroid Build Coastguard Worker _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' 4942*663afb9bSAndroid Build Coastguard Worker else 4943*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 4944*663afb9bSAndroid Build Coastguard Worker fi 4945*663afb9bSAndroid Build Coastguard Worker ;; 4946*663afb9bSAndroid Build Coastguard Worker pw32*) 4947*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4948*663afb9bSAndroid Build Coastguard Worker ;; 4949*663afb9bSAndroid Build Coastguard Worker cygwin* | mingw* | cegcc*) 4950*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 4951*663afb9bSAndroid Build Coastguard Worker cl* | icl*) 4952*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4953*663afb9bSAndroid Build Coastguard Worker ;; 4954*663afb9bSAndroid Build Coastguard Worker *) 4955*663afb9bSAndroid Build Coastguard Worker _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' 4956*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4957*663afb9bSAndroid Build Coastguard Worker ;; 4958*663afb9bSAndroid Build Coastguard Worker esac 4959*663afb9bSAndroid Build Coastguard Worker ;; 4960*663afb9bSAndroid Build Coastguard Worker *) 4961*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4962*663afb9bSAndroid Build Coastguard Worker ;; 4963*663afb9bSAndroid Build Coastguard Worker esac 4964*663afb9bSAndroid Build Coastguard Worker], [ 4965*663afb9bSAndroid Build Coastguard Worker runpath_var= 4966*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)= 4967*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(always_export_symbols, $1)=no 4968*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)= 4969*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)= 4970*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(compiler_needs_object, $1)=no 4971*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4972*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4973*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4974*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_automatic, $1)=no 4975*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=no 4976*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4977*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4978*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)= 4979*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=no 4980*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4981*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(inherit_rpath, $1)=no 4982*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(link_all_deplibs, $1)=unknown 4983*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(module_cmds, $1)= 4984*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(module_expsym_cmds, $1)= 4985*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4986*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4987*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(thread_safe_flag_spec, $1)= 4988*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)= 4989*663afb9bSAndroid Build Coastguard Worker # include_expsyms should be a list of space-separated symbols to be *always* 4990*663afb9bSAndroid Build Coastguard Worker # included in the symbol list 4991*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(include_expsyms, $1)= 4992*663afb9bSAndroid Build Coastguard Worker # exclude_expsyms can be an extended regexp of symbols to exclude 4993*663afb9bSAndroid Build Coastguard Worker # it will be wrapped by ' (' and ')$', so one must not match beginning or 4994*663afb9bSAndroid Build Coastguard Worker # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4995*663afb9bSAndroid Build Coastguard Worker # as well as any symbol that contains 'd'. 4996*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4997*663afb9bSAndroid Build Coastguard Worker # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4998*663afb9bSAndroid Build Coastguard Worker # platforms (ab)use it in PIC code, but their linkers get confused if 4999*663afb9bSAndroid Build Coastguard Worker # the symbol is explicitly referenced. Since portable code cannot 5000*663afb9bSAndroid Build Coastguard Worker # rely on this symbol name, it's probably fine to never include it in 5001*663afb9bSAndroid Build Coastguard Worker # preloaded symbol tables. 5002*663afb9bSAndroid Build Coastguard Worker # Exclude shared library initialization/finalization symbols. 5003*663afb9bSAndroid Build Coastguard Workerdnl Note also adjust exclude_expsyms for C++ above. 5004*663afb9bSAndroid Build Coastguard Worker extract_expsyms_cmds= 5005*663afb9bSAndroid Build Coastguard Worker 5006*663afb9bSAndroid Build Coastguard Worker case $host_os in 5007*663afb9bSAndroid Build Coastguard Worker cygwin* | mingw* | pw32* | cegcc*) 5008*663afb9bSAndroid Build Coastguard Worker # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 5009*663afb9bSAndroid Build Coastguard Worker # When not using gcc, we currently assume that we are using 5010*663afb9bSAndroid Build Coastguard Worker # Microsoft Visual C++ or Intel C++ Compiler. 5011*663afb9bSAndroid Build Coastguard Worker if test yes != "$GCC"; then 5012*663afb9bSAndroid Build Coastguard Worker with_gnu_ld=no 5013*663afb9bSAndroid Build Coastguard Worker fi 5014*663afb9bSAndroid Build Coastguard Worker ;; 5015*663afb9bSAndroid Build Coastguard Worker interix*) 5016*663afb9bSAndroid Build Coastguard Worker # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 5017*663afb9bSAndroid Build Coastguard Worker with_gnu_ld=yes 5018*663afb9bSAndroid Build Coastguard Worker ;; 5019*663afb9bSAndroid Build Coastguard Worker openbsd* | bitrig*) 5020*663afb9bSAndroid Build Coastguard Worker with_gnu_ld=no 5021*663afb9bSAndroid Build Coastguard Worker ;; 5022*663afb9bSAndroid Build Coastguard Worker esac 5023*663afb9bSAndroid Build Coastguard Worker 5024*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=yes 5025*663afb9bSAndroid Build Coastguard Worker 5026*663afb9bSAndroid Build Coastguard Worker # On some targets, GNU ld is compatible enough with the native linker 5027*663afb9bSAndroid Build Coastguard Worker # that we're better off using the native interface for both. 5028*663afb9bSAndroid Build Coastguard Worker lt_use_gnu_ld_interface=no 5029*663afb9bSAndroid Build Coastguard Worker if test yes = "$with_gnu_ld"; then 5030*663afb9bSAndroid Build Coastguard Worker case $host_os in 5031*663afb9bSAndroid Build Coastguard Worker aix*) 5032*663afb9bSAndroid Build Coastguard Worker # The AIX port of GNU ld has always aspired to compatibility 5033*663afb9bSAndroid Build Coastguard Worker # with the native linker. However, as the warning in the GNU ld 5034*663afb9bSAndroid Build Coastguard Worker # block says, versions before 2.19.5* couldn't really create working 5035*663afb9bSAndroid Build Coastguard Worker # shared libraries, regardless of the interface used. 5036*663afb9bSAndroid Build Coastguard Worker case `$LD -v 2>&1` in 5037*663afb9bSAndroid Build Coastguard Worker *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5038*663afb9bSAndroid Build Coastguard Worker *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5039*663afb9bSAndroid Build Coastguard Worker *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5040*663afb9bSAndroid Build Coastguard Worker *) 5041*663afb9bSAndroid Build Coastguard Worker lt_use_gnu_ld_interface=yes 5042*663afb9bSAndroid Build Coastguard Worker ;; 5043*663afb9bSAndroid Build Coastguard Worker esac 5044*663afb9bSAndroid Build Coastguard Worker ;; 5045*663afb9bSAndroid Build Coastguard Worker *) 5046*663afb9bSAndroid Build Coastguard Worker lt_use_gnu_ld_interface=yes 5047*663afb9bSAndroid Build Coastguard Worker ;; 5048*663afb9bSAndroid Build Coastguard Worker esac 5049*663afb9bSAndroid Build Coastguard Worker fi 5050*663afb9bSAndroid Build Coastguard Worker 5051*663afb9bSAndroid Build Coastguard Worker if test yes = "$lt_use_gnu_ld_interface"; then 5052*663afb9bSAndroid Build Coastguard Worker # If archive_cmds runs LD, not CC, wlarc should be empty 5053*663afb9bSAndroid Build Coastguard Worker wlarc='$wl' 5054*663afb9bSAndroid Build Coastguard Worker 5055*663afb9bSAndroid Build Coastguard Worker # Set some defaults for GNU ld with shared library support. These 5056*663afb9bSAndroid Build Coastguard Worker # are reset later if shared libraries are not supported. Putting them 5057*663afb9bSAndroid Build Coastguard Worker # here allows them to be overridden if necessary. 5058*663afb9bSAndroid Build Coastguard Worker runpath_var=LD_RUN_PATH 5059*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5060*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5061*663afb9bSAndroid Build Coastguard Worker # ancient GNU ld didn't support --whole-archive et. al. 5062*663afb9bSAndroid Build Coastguard Worker if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5063*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5064*663afb9bSAndroid Build Coastguard Worker else 5065*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)= 5066*663afb9bSAndroid Build Coastguard Worker fi 5067*663afb9bSAndroid Build Coastguard Worker supports_anon_versioning=no 5068*663afb9bSAndroid Build Coastguard Worker case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5069*663afb9bSAndroid Build Coastguard Worker *GNU\ gold*) supports_anon_versioning=yes ;; 5070*663afb9bSAndroid Build Coastguard Worker *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5071*663afb9bSAndroid Build Coastguard Worker *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5072*663afb9bSAndroid Build Coastguard Worker *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5073*663afb9bSAndroid Build Coastguard Worker *\ 2.11.*) ;; # other 2.11 versions 5074*663afb9bSAndroid Build Coastguard Worker *) supports_anon_versioning=yes ;; 5075*663afb9bSAndroid Build Coastguard Worker esac 5076*663afb9bSAndroid Build Coastguard Worker 5077*663afb9bSAndroid Build Coastguard Worker # See if GNU ld supports shared libraries. 5078*663afb9bSAndroid Build Coastguard Worker case $host_os in 5079*663afb9bSAndroid Build Coastguard Worker aix[[3-9]]*) 5080*663afb9bSAndroid Build Coastguard Worker # On AIX/PPC, the GNU linker is very broken 5081*663afb9bSAndroid Build Coastguard Worker if test ia64 != "$host_cpu"; then 5082*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 5083*663afb9bSAndroid Build Coastguard Worker cat <<_LT_EOF 1>&2 5084*663afb9bSAndroid Build Coastguard Worker 5085*663afb9bSAndroid Build Coastguard Worker*** Warning: the GNU linker, at least up to release 2.19, is reported 5086*663afb9bSAndroid Build Coastguard Worker*** to be unable to reliably create shared libraries on AIX. 5087*663afb9bSAndroid Build Coastguard Worker*** Therefore, libtool is disabling shared libraries support. If you 5088*663afb9bSAndroid Build Coastguard Worker*** really care for shared libraries, you may want to install binutils 5089*663afb9bSAndroid Build Coastguard Worker*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5090*663afb9bSAndroid Build Coastguard Worker*** You will then need to restart the configuration process. 5091*663afb9bSAndroid Build Coastguard Worker 5092*663afb9bSAndroid Build Coastguard Worker_LT_EOF 5093*663afb9bSAndroid Build Coastguard Worker fi 5094*663afb9bSAndroid Build Coastguard Worker ;; 5095*663afb9bSAndroid Build Coastguard Worker 5096*663afb9bSAndroid Build Coastguard Worker amigaos*) 5097*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 5098*663afb9bSAndroid Build Coastguard Worker powerpc) 5099*663afb9bSAndroid Build Coastguard Worker # see comment about AmigaOS4 .so support 5100*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5101*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='' 5102*663afb9bSAndroid Build Coastguard Worker ;; 5103*663afb9bSAndroid Build Coastguard Worker m68k) 5104*663afb9bSAndroid Build Coastguard Worker _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)' 5105*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5106*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 5107*663afb9bSAndroid Build Coastguard Worker ;; 5108*663afb9bSAndroid Build Coastguard Worker esac 5109*663afb9bSAndroid Build Coastguard Worker ;; 5110*663afb9bSAndroid Build Coastguard Worker 5111*663afb9bSAndroid Build Coastguard Worker beos*) 5112*663afb9bSAndroid Build Coastguard Worker if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5113*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5114*663afb9bSAndroid Build Coastguard Worker # Joseph Beckenbach <[email protected]> says some releases of gcc 5115*663afb9bSAndroid Build Coastguard Worker # support --undefined. This deserves some investigation. FIXME 5116*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5117*663afb9bSAndroid Build Coastguard Worker else 5118*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 5119*663afb9bSAndroid Build Coastguard Worker fi 5120*663afb9bSAndroid Build Coastguard Worker ;; 5121*663afb9bSAndroid Build Coastguard Worker 5122*663afb9bSAndroid Build Coastguard Worker cygwin* | mingw* | pw32* | cegcc*) 5123*663afb9bSAndroid Build Coastguard Worker # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5124*663afb9bSAndroid Build Coastguard Worker # as there is no search path for DLLs. 5125*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5126*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5127*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5128*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(always_export_symbols, $1)=no 5129*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5130*663afb9bSAndroid Build Coastguard Worker _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' 5131*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5132*663afb9bSAndroid Build Coastguard Worker 5133*663afb9bSAndroid Build Coastguard Worker if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5134*663afb9bSAndroid Build Coastguard Worker _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' 5135*663afb9bSAndroid Build Coastguard Worker # If the export-symbols file already is a .def file, use it as 5136*663afb9bSAndroid Build Coastguard Worker # is; otherwise, prepend EXPORTS... 5137*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5138*663afb9bSAndroid Build Coastguard Worker cp $export_symbols $output_objdir/$soname.def; 5139*663afb9bSAndroid Build Coastguard Worker else 5140*663afb9bSAndroid Build Coastguard Worker echo EXPORTS > $output_objdir/$soname.def; 5141*663afb9bSAndroid Build Coastguard Worker cat $export_symbols >> $output_objdir/$soname.def; 5142*663afb9bSAndroid Build Coastguard Worker fi~ 5143*663afb9bSAndroid Build Coastguard Worker $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5144*663afb9bSAndroid Build Coastguard Worker else 5145*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 5146*663afb9bSAndroid Build Coastguard Worker fi 5147*663afb9bSAndroid Build Coastguard Worker ;; 5148*663afb9bSAndroid Build Coastguard Worker 5149*663afb9bSAndroid Build Coastguard Worker haiku*) 5150*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5151*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(link_all_deplibs, $1)=yes 5152*663afb9bSAndroid Build Coastguard Worker ;; 5153*663afb9bSAndroid Build Coastguard Worker 5154*663afb9bSAndroid Build Coastguard Worker os2*) 5155*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5156*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 5157*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5158*663afb9bSAndroid Build Coastguard Worker shrext_cmds=.dll 5159*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5160*663afb9bSAndroid Build Coastguard Worker $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5161*663afb9bSAndroid Build Coastguard Worker $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5162*663afb9bSAndroid Build Coastguard Worker $ECHO EXPORTS >> $output_objdir/$libname.def~ 5163*663afb9bSAndroid Build Coastguard Worker emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5164*663afb9bSAndroid Build Coastguard Worker $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5165*663afb9bSAndroid Build Coastguard Worker emximp -o $lib $output_objdir/$libname.def' 5166*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5167*663afb9bSAndroid Build Coastguard Worker $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5168*663afb9bSAndroid Build Coastguard Worker $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5169*663afb9bSAndroid Build Coastguard Worker $ECHO EXPORTS >> $output_objdir/$libname.def~ 5170*663afb9bSAndroid Build Coastguard Worker prefix_cmds="$SED"~ 5171*663afb9bSAndroid Build Coastguard Worker if test EXPORTS = "`$SED 1q $export_symbols`"; then 5172*663afb9bSAndroid Build Coastguard Worker prefix_cmds="$prefix_cmds -e 1d"; 5173*663afb9bSAndroid Build Coastguard Worker fi~ 5174*663afb9bSAndroid Build Coastguard Worker prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5175*663afb9bSAndroid Build Coastguard Worker cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5176*663afb9bSAndroid Build Coastguard Worker $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5177*663afb9bSAndroid Build Coastguard Worker emximp -o $lib $output_objdir/$libname.def' 5178*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5179*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5180*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(file_list_spec, $1)='@' 5181*663afb9bSAndroid Build Coastguard Worker ;; 5182*663afb9bSAndroid Build Coastguard Worker 5183*663afb9bSAndroid Build Coastguard Worker interix[[3-9]]*) 5184*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=no 5185*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5186*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5187*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5188*663afb9bSAndroid Build Coastguard Worker # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5189*663afb9bSAndroid Build Coastguard Worker # Instead, shared libraries are loaded at an image base (0x10000000 by 5190*663afb9bSAndroid Build Coastguard Worker # default) and relocated if they conflict, which is a slow very memory 5191*663afb9bSAndroid Build Coastguard Worker # consuming and fragmenting process. To avoid this, we pick a random, 5192*663afb9bSAndroid Build Coastguard Worker # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5193*663afb9bSAndroid Build Coastguard Worker # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5194*663afb9bSAndroid Build Coastguard Worker _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' 5195*663afb9bSAndroid Build Coastguard Worker _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' 5196*663afb9bSAndroid Build Coastguard Worker ;; 5197*663afb9bSAndroid Build Coastguard Worker 5198*663afb9bSAndroid Build Coastguard Worker gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5199*663afb9bSAndroid Build Coastguard Worker tmp_diet=no 5200*663afb9bSAndroid Build Coastguard Worker if test linux-dietlibc = "$host_os"; then 5201*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 5202*663afb9bSAndroid Build Coastguard Worker diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5203*663afb9bSAndroid Build Coastguard Worker esac 5204*663afb9bSAndroid Build Coastguard Worker fi 5205*663afb9bSAndroid Build Coastguard Worker if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5206*663afb9bSAndroid Build Coastguard Worker && test no = "$tmp_diet" 5207*663afb9bSAndroid Build Coastguard Worker then 5208*663afb9bSAndroid Build Coastguard Worker tmp_addflag=' $pic_flag' 5209*663afb9bSAndroid Build Coastguard Worker tmp_sharedflag='-shared' 5210*663afb9bSAndroid Build Coastguard Worker case $cc_basename,$host_cpu in 5211*663afb9bSAndroid Build Coastguard Worker pgcc*) # Portland Group C compiler 5212*663afb9bSAndroid Build Coastguard Worker _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' 5213*663afb9bSAndroid Build Coastguard Worker tmp_addflag=' $pic_flag' 5214*663afb9bSAndroid Build Coastguard Worker ;; 5215*663afb9bSAndroid Build Coastguard Worker pgf77* | pgf90* | pgf95* | pgfortran*) 5216*663afb9bSAndroid Build Coastguard Worker # Portland Group f77 and f90 compilers 5217*663afb9bSAndroid Build Coastguard Worker _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' 5218*663afb9bSAndroid Build Coastguard Worker tmp_addflag=' $pic_flag -Mnomain' ;; 5219*663afb9bSAndroid Build Coastguard Worker ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5220*663afb9bSAndroid Build Coastguard Worker tmp_addflag=' -i_dynamic' ;; 5221*663afb9bSAndroid Build Coastguard Worker efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5222*663afb9bSAndroid Build Coastguard Worker tmp_addflag=' -i_dynamic -nofor_main' ;; 5223*663afb9bSAndroid Build Coastguard Worker ifc* | ifort*) # Intel Fortran compiler 5224*663afb9bSAndroid Build Coastguard Worker tmp_addflag=' -nofor_main' ;; 5225*663afb9bSAndroid Build Coastguard Worker lf95*) # Lahey Fortran 8.1 5226*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)= 5227*663afb9bSAndroid Build Coastguard Worker tmp_sharedflag='--shared' ;; 5228*663afb9bSAndroid Build Coastguard Worker nagfor*) # NAGFOR 5.3 5229*663afb9bSAndroid Build Coastguard Worker tmp_sharedflag='-Wl,-shared' ;; 5230*663afb9bSAndroid Build Coastguard Worker xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5231*663afb9bSAndroid Build Coastguard Worker tmp_sharedflag='-qmkshrobj' 5232*663afb9bSAndroid Build Coastguard Worker tmp_addflag= ;; 5233*663afb9bSAndroid Build Coastguard Worker nvcc*) # Cuda Compiler Driver 2.2 5234*663afb9bSAndroid Build Coastguard Worker _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' 5235*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(compiler_needs_object, $1)=yes 5236*663afb9bSAndroid Build Coastguard Worker ;; 5237*663afb9bSAndroid Build Coastguard Worker esac 5238*663afb9bSAndroid Build Coastguard Worker case `$CC -V 2>&1 | sed 5q` in 5239*663afb9bSAndroid Build Coastguard Worker *Sun\ C*) # Sun C 5.9 5240*663afb9bSAndroid Build Coastguard Worker _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' 5241*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(compiler_needs_object, $1)=yes 5242*663afb9bSAndroid Build Coastguard Worker tmp_sharedflag='-G' ;; 5243*663afb9bSAndroid Build Coastguard Worker *Sun\ F*) # Sun Fortran 8.3 5244*663afb9bSAndroid Build Coastguard Worker tmp_sharedflag='-G' ;; 5245*663afb9bSAndroid Build Coastguard Worker esac 5246*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5247*663afb9bSAndroid Build Coastguard Worker 5248*663afb9bSAndroid Build Coastguard Worker if test yes = "$supports_anon_versioning"; then 5249*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5250*663afb9bSAndroid Build Coastguard Worker cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5251*663afb9bSAndroid Build Coastguard Worker echo "local: *; };" >> $output_objdir/$libname.ver~ 5252*663afb9bSAndroid Build Coastguard Worker $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5253*663afb9bSAndroid Build Coastguard Worker fi 5254*663afb9bSAndroid Build Coastguard Worker 5255*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 5256*663afb9bSAndroid Build Coastguard Worker tcc*) 5257*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5258*663afb9bSAndroid Build Coastguard Worker ;; 5259*663afb9bSAndroid Build Coastguard Worker xlf* | bgf* | bgxlf* | mpixlf*) 5260*663afb9bSAndroid Build Coastguard Worker # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5261*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5262*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5263*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5264*663afb9bSAndroid Build Coastguard Worker if test yes = "$supports_anon_versioning"; then 5265*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5266*663afb9bSAndroid Build Coastguard Worker cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5267*663afb9bSAndroid Build Coastguard Worker echo "local: *; };" >> $output_objdir/$libname.ver~ 5268*663afb9bSAndroid Build Coastguard Worker $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5269*663afb9bSAndroid Build Coastguard Worker fi 5270*663afb9bSAndroid Build Coastguard Worker ;; 5271*663afb9bSAndroid Build Coastguard Worker esac 5272*663afb9bSAndroid Build Coastguard Worker else 5273*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 5274*663afb9bSAndroid Build Coastguard Worker fi 5275*663afb9bSAndroid Build Coastguard Worker ;; 5276*663afb9bSAndroid Build Coastguard Worker 5277*663afb9bSAndroid Build Coastguard Worker netbsd*) 5278*663afb9bSAndroid Build Coastguard Worker if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5279*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5280*663afb9bSAndroid Build Coastguard Worker wlarc= 5281*663afb9bSAndroid Build Coastguard Worker else 5282*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5283*663afb9bSAndroid Build Coastguard Worker _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' 5284*663afb9bSAndroid Build Coastguard Worker fi 5285*663afb9bSAndroid Build Coastguard Worker ;; 5286*663afb9bSAndroid Build Coastguard Worker 5287*663afb9bSAndroid Build Coastguard Worker solaris*) 5288*663afb9bSAndroid Build Coastguard Worker if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5289*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 5290*663afb9bSAndroid Build Coastguard Worker cat <<_LT_EOF 1>&2 5291*663afb9bSAndroid Build Coastguard Worker 5292*663afb9bSAndroid Build Coastguard Worker*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5293*663afb9bSAndroid Build Coastguard Worker*** create shared libraries on Solaris systems. Therefore, libtool 5294*663afb9bSAndroid Build Coastguard Worker*** is disabling shared libraries support. We urge you to upgrade GNU 5295*663afb9bSAndroid Build Coastguard Worker*** binutils to release 2.9.1 or newer. Another option is to modify 5296*663afb9bSAndroid Build Coastguard Worker*** your PATH or compiler configuration so that the native linker is 5297*663afb9bSAndroid Build Coastguard Worker*** used, and then restart. 5298*663afb9bSAndroid Build Coastguard Worker 5299*663afb9bSAndroid Build Coastguard Worker_LT_EOF 5300*663afb9bSAndroid Build Coastguard Worker elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5301*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5302*663afb9bSAndroid Build Coastguard Worker _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' 5303*663afb9bSAndroid Build Coastguard Worker else 5304*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 5305*663afb9bSAndroid Build Coastguard Worker fi 5306*663afb9bSAndroid Build Coastguard Worker ;; 5307*663afb9bSAndroid Build Coastguard Worker 5308*663afb9bSAndroid Build Coastguard Worker sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5309*663afb9bSAndroid Build Coastguard Worker case `$LD -v 2>&1` in 5310*663afb9bSAndroid Build Coastguard Worker *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5311*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 5312*663afb9bSAndroid Build Coastguard Worker cat <<_LT_EOF 1>&2 5313*663afb9bSAndroid Build Coastguard Worker 5314*663afb9bSAndroid Build Coastguard Worker*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5315*663afb9bSAndroid Build Coastguard Worker*** reliably create shared libraries on SCO systems. Therefore, libtool 5316*663afb9bSAndroid Build Coastguard Worker*** is disabling shared libraries support. We urge you to upgrade GNU 5317*663afb9bSAndroid Build Coastguard Worker*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5318*663afb9bSAndroid Build Coastguard Worker*** your PATH or compiler configuration so that the native linker is 5319*663afb9bSAndroid Build Coastguard Worker*** used, and then restart. 5320*663afb9bSAndroid Build Coastguard Worker 5321*663afb9bSAndroid Build Coastguard Worker_LT_EOF 5322*663afb9bSAndroid Build Coastguard Worker ;; 5323*663afb9bSAndroid Build Coastguard Worker *) 5324*663afb9bSAndroid Build Coastguard Worker # For security reasons, it is highly recommended that you always 5325*663afb9bSAndroid Build Coastguard Worker # use absolute paths for naming shared libraries, and exclude the 5326*663afb9bSAndroid Build Coastguard Worker # DT_RUNPATH tag from executables and libraries. But doing so 5327*663afb9bSAndroid Build Coastguard Worker # requires that you compile everything twice, which is a pain. 5328*663afb9bSAndroid Build Coastguard Worker if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5329*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5330*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5331*663afb9bSAndroid Build Coastguard Worker _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' 5332*663afb9bSAndroid Build Coastguard Worker else 5333*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 5334*663afb9bSAndroid Build Coastguard Worker fi 5335*663afb9bSAndroid Build Coastguard Worker ;; 5336*663afb9bSAndroid Build Coastguard Worker esac 5337*663afb9bSAndroid Build Coastguard Worker ;; 5338*663afb9bSAndroid Build Coastguard Worker 5339*663afb9bSAndroid Build Coastguard Worker sunos4*) 5340*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5341*663afb9bSAndroid Build Coastguard Worker wlarc= 5342*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 5343*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5344*663afb9bSAndroid Build Coastguard Worker ;; 5345*663afb9bSAndroid Build Coastguard Worker 5346*663afb9bSAndroid Build Coastguard Worker *) 5347*663afb9bSAndroid Build Coastguard Worker if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5348*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5349*663afb9bSAndroid Build Coastguard Worker _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' 5350*663afb9bSAndroid Build Coastguard Worker else 5351*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 5352*663afb9bSAndroid Build Coastguard Worker fi 5353*663afb9bSAndroid Build Coastguard Worker ;; 5354*663afb9bSAndroid Build Coastguard Worker esac 5355*663afb9bSAndroid Build Coastguard Worker 5356*663afb9bSAndroid Build Coastguard Worker if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5357*663afb9bSAndroid Build Coastguard Worker runpath_var= 5358*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5359*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5360*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)= 5361*663afb9bSAndroid Build Coastguard Worker fi 5362*663afb9bSAndroid Build Coastguard Worker else 5363*663afb9bSAndroid Build Coastguard Worker # PORTME fill in a description of your system's linker (not GNU ld) 5364*663afb9bSAndroid Build Coastguard Worker case $host_os in 5365*663afb9bSAndroid Build Coastguard Worker aix3*) 5366*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5367*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(always_export_symbols, $1)=yes 5368*663afb9bSAndroid Build Coastguard Worker _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' 5369*663afb9bSAndroid Build Coastguard Worker # Note: this linker hardcodes the directories in LIBPATH if there 5370*663afb9bSAndroid Build Coastguard Worker # are no directories specified by -L. 5371*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 5372*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5373*663afb9bSAndroid Build Coastguard Worker # Neither direct hardcoding nor static linking is supported with a 5374*663afb9bSAndroid Build Coastguard Worker # broken collect2. 5375*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=unsupported 5376*663afb9bSAndroid Build Coastguard Worker fi 5377*663afb9bSAndroid Build Coastguard Worker ;; 5378*663afb9bSAndroid Build Coastguard Worker 5379*663afb9bSAndroid Build Coastguard Worker aix[[4-9]]*) 5380*663afb9bSAndroid Build Coastguard Worker if test ia64 = "$host_cpu"; then 5381*663afb9bSAndroid Build Coastguard Worker # On IA64, the linker does run time linking by default, so we don't 5382*663afb9bSAndroid Build Coastguard Worker # have to do anything special. 5383*663afb9bSAndroid Build Coastguard Worker aix_use_runtimelinking=no 5384*663afb9bSAndroid Build Coastguard Worker exp_sym_flag='-Bexport' 5385*663afb9bSAndroid Build Coastguard Worker no_entry_flag= 5386*663afb9bSAndroid Build Coastguard Worker else 5387*663afb9bSAndroid Build Coastguard Worker # If we're using GNU nm, then we don't want the "-C" option. 5388*663afb9bSAndroid Build Coastguard Worker # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5389*663afb9bSAndroid Build Coastguard Worker # Without the "-l" option, or with the "-B" option, AIX nm treats 5390*663afb9bSAndroid Build Coastguard Worker # weak defined symbols like other global defined symbols, whereas 5391*663afb9bSAndroid Build Coastguard Worker # GNU nm marks them as "W". 5392*663afb9bSAndroid Build Coastguard Worker # While the 'weak' keyword is ignored in the Export File, we need 5393*663afb9bSAndroid Build Coastguard Worker # it in the Import File for the 'aix-soname' feature, so we have 5394*663afb9bSAndroid Build Coastguard Worker # to replace the "-B" option with "-P" for AIX nm. 5395*663afb9bSAndroid Build Coastguard Worker if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5396*663afb9bSAndroid Build Coastguard Worker _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' 5397*663afb9bSAndroid Build Coastguard Worker else 5398*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 5399*663afb9bSAndroid Build Coastguard Worker fi 5400*663afb9bSAndroid Build Coastguard Worker aix_use_runtimelinking=no 5401*663afb9bSAndroid Build Coastguard Worker 5402*663afb9bSAndroid Build Coastguard Worker # Test if we are trying to use run time linking or normal 5403*663afb9bSAndroid Build Coastguard Worker # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5404*663afb9bSAndroid Build Coastguard Worker # have runtime linking enabled, and use it for executables. 5405*663afb9bSAndroid Build Coastguard Worker # For shared libraries, we enable/disable runtime linking 5406*663afb9bSAndroid Build Coastguard Worker # depending on the kind of the shared library created - 5407*663afb9bSAndroid Build Coastguard Worker # when "with_aix_soname,aix_use_runtimelinking" is: 5408*663afb9bSAndroid Build Coastguard Worker # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5409*663afb9bSAndroid Build Coastguard Worker # "aix,yes" lib.so shared, rtl:yes, for executables 5410*663afb9bSAndroid Build Coastguard Worker # lib.a static archive 5411*663afb9bSAndroid Build Coastguard Worker # "both,no" lib.so.V(shr.o) shared, rtl:yes 5412*663afb9bSAndroid Build Coastguard Worker # lib.a(lib.so.V) shared, rtl:no, for executables 5413*663afb9bSAndroid Build Coastguard Worker # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5414*663afb9bSAndroid Build Coastguard Worker # lib.a(lib.so.V) shared, rtl:no 5415*663afb9bSAndroid Build Coastguard Worker # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5416*663afb9bSAndroid Build Coastguard Worker # lib.a static archive 5417*663afb9bSAndroid Build Coastguard Worker case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5418*663afb9bSAndroid Build Coastguard Worker for ld_flag in $LDFLAGS; do 5419*663afb9bSAndroid Build Coastguard Worker if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5420*663afb9bSAndroid Build Coastguard Worker aix_use_runtimelinking=yes 5421*663afb9bSAndroid Build Coastguard Worker break 5422*663afb9bSAndroid Build Coastguard Worker fi 5423*663afb9bSAndroid Build Coastguard Worker done 5424*663afb9bSAndroid Build Coastguard Worker if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5425*663afb9bSAndroid Build Coastguard Worker # With aix-soname=svr4, we create the lib.so.V shared archives only, 5426*663afb9bSAndroid Build Coastguard Worker # so we don't have lib.a shared libs to link our executables. 5427*663afb9bSAndroid Build Coastguard Worker # We have to force runtime linking in this case. 5428*663afb9bSAndroid Build Coastguard Worker aix_use_runtimelinking=yes 5429*663afb9bSAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS -Wl,-brtl" 5430*663afb9bSAndroid Build Coastguard Worker fi 5431*663afb9bSAndroid Build Coastguard Worker ;; 5432*663afb9bSAndroid Build Coastguard Worker esac 5433*663afb9bSAndroid Build Coastguard Worker 5434*663afb9bSAndroid Build Coastguard Worker exp_sym_flag='-bexport' 5435*663afb9bSAndroid Build Coastguard Worker no_entry_flag='-bnoentry' 5436*663afb9bSAndroid Build Coastguard Worker fi 5437*663afb9bSAndroid Build Coastguard Worker 5438*663afb9bSAndroid Build Coastguard Worker # When large executables or shared objects are built, AIX ld can 5439*663afb9bSAndroid Build Coastguard Worker # have problems creating the table of contents. If linking a library 5440*663afb9bSAndroid Build Coastguard Worker # or program results in "error TOC overflow" add -mminimal-toc to 5441*663afb9bSAndroid Build Coastguard Worker # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5442*663afb9bSAndroid Build Coastguard Worker # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5443*663afb9bSAndroid Build Coastguard Worker 5444*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='' 5445*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 5446*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5447*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5448*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(link_all_deplibs, $1)=yes 5449*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5450*663afb9bSAndroid Build Coastguard Worker case $with_aix_soname,$aix_use_runtimelinking in 5451*663afb9bSAndroid Build Coastguard Worker aix,*) ;; # traditional, no import file 5452*663afb9bSAndroid Build Coastguard Worker svr4,* | *,yes) # use import file 5453*663afb9bSAndroid Build Coastguard Worker # The Import File defines what to hardcode. 5454*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=no 5455*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5456*663afb9bSAndroid Build Coastguard Worker ;; 5457*663afb9bSAndroid Build Coastguard Worker esac 5458*663afb9bSAndroid Build Coastguard Worker 5459*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC"; then 5460*663afb9bSAndroid Build Coastguard Worker case $host_os in aix4.[[012]]|aix4.[[012]].*) 5461*663afb9bSAndroid Build Coastguard Worker # We only want to do this on AIX 4.2 and lower, the check 5462*663afb9bSAndroid Build Coastguard Worker # below for broken collect2 doesn't work under 4.3+ 5463*663afb9bSAndroid Build Coastguard Worker collect2name=`$CC -print-prog-name=collect2` 5464*663afb9bSAndroid Build Coastguard Worker if test -f "$collect2name" && 5465*663afb9bSAndroid Build Coastguard Worker strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5466*663afb9bSAndroid Build Coastguard Worker then 5467*663afb9bSAndroid Build Coastguard Worker # We have reworked collect2 5468*663afb9bSAndroid Build Coastguard Worker : 5469*663afb9bSAndroid Build Coastguard Worker else 5470*663afb9bSAndroid Build Coastguard Worker # We have old collect2 5471*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=unsupported 5472*663afb9bSAndroid Build Coastguard Worker # It fails to find uninstalled libraries when the uninstalled 5473*663afb9bSAndroid Build Coastguard Worker # path is not listed in the libpath. Setting hardcode_minus_L 5474*663afb9bSAndroid Build Coastguard Worker # to unsupported forces relinking 5475*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 5476*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5477*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)= 5478*663afb9bSAndroid Build Coastguard Worker fi 5479*663afb9bSAndroid Build Coastguard Worker ;; 5480*663afb9bSAndroid Build Coastguard Worker esac 5481*663afb9bSAndroid Build Coastguard Worker shared_flag='-shared' 5482*663afb9bSAndroid Build Coastguard Worker if test yes = "$aix_use_runtimelinking"; then 5483*663afb9bSAndroid Build Coastguard Worker shared_flag="$shared_flag "'$wl-G' 5484*663afb9bSAndroid Build Coastguard Worker fi 5485*663afb9bSAndroid Build Coastguard Worker # Need to ensure runtime linking is disabled for the traditional 5486*663afb9bSAndroid Build Coastguard Worker # shared library, or the linker may eventually find shared libraries 5487*663afb9bSAndroid Build Coastguard Worker # /with/ Import File - we do not want to mix them. 5488*663afb9bSAndroid Build Coastguard Worker shared_flag_aix='-shared' 5489*663afb9bSAndroid Build Coastguard Worker shared_flag_svr4='-shared $wl-G' 5490*663afb9bSAndroid Build Coastguard Worker else 5491*663afb9bSAndroid Build Coastguard Worker # not using gcc 5492*663afb9bSAndroid Build Coastguard Worker if test ia64 = "$host_cpu"; then 5493*663afb9bSAndroid Build Coastguard Worker # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5494*663afb9bSAndroid Build Coastguard Worker # chokes on -Wl,-G. The following line is correct: 5495*663afb9bSAndroid Build Coastguard Worker shared_flag='-G' 5496*663afb9bSAndroid Build Coastguard Worker else 5497*663afb9bSAndroid Build Coastguard Worker if test yes = "$aix_use_runtimelinking"; then 5498*663afb9bSAndroid Build Coastguard Worker shared_flag='$wl-G' 5499*663afb9bSAndroid Build Coastguard Worker else 5500*663afb9bSAndroid Build Coastguard Worker shared_flag='$wl-bM:SRE' 5501*663afb9bSAndroid Build Coastguard Worker fi 5502*663afb9bSAndroid Build Coastguard Worker shared_flag_aix='$wl-bM:SRE' 5503*663afb9bSAndroid Build Coastguard Worker shared_flag_svr4='$wl-G' 5504*663afb9bSAndroid Build Coastguard Worker fi 5505*663afb9bSAndroid Build Coastguard Worker fi 5506*663afb9bSAndroid Build Coastguard Worker 5507*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5508*663afb9bSAndroid Build Coastguard Worker # It seems that -bexpall does not export symbols beginning with 5509*663afb9bSAndroid Build Coastguard Worker # underscore (_), so it is better to generate a list of symbols to export. 5510*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(always_export_symbols, $1)=yes 5511*663afb9bSAndroid Build Coastguard Worker if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5512*663afb9bSAndroid Build Coastguard Worker # Warning - without using the other runtime loading flags (-brtl), 5513*663afb9bSAndroid Build Coastguard Worker # -berok will link without error, but may produce a broken library. 5514*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5515*663afb9bSAndroid Build Coastguard Worker # Determine the default libpath from the value encoded in an 5516*663afb9bSAndroid Build Coastguard Worker # empty executable. 5517*663afb9bSAndroid Build Coastguard Worker _LT_SYS_MODULE_PATH_AIX([$1]) 5518*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5519*663afb9bSAndroid Build Coastguard Worker _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 5520*663afb9bSAndroid Build Coastguard Worker else 5521*663afb9bSAndroid Build Coastguard Worker if test ia64 = "$host_cpu"; then 5522*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5523*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5524*663afb9bSAndroid Build Coastguard Worker _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" 5525*663afb9bSAndroid Build Coastguard Worker else 5526*663afb9bSAndroid Build Coastguard Worker # Determine the default libpath from the value encoded in an 5527*663afb9bSAndroid Build Coastguard Worker # empty executable. 5528*663afb9bSAndroid Build Coastguard Worker _LT_SYS_MODULE_PATH_AIX([$1]) 5529*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5530*663afb9bSAndroid Build Coastguard Worker # Warning - without using the other run time loading flags, 5531*663afb9bSAndroid Build Coastguard Worker # -berok will link without error, but may produce a broken library. 5532*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5533*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5534*663afb9bSAndroid Build Coastguard Worker if test yes = "$with_gnu_ld"; then 5535*663afb9bSAndroid Build Coastguard Worker # We only use this code for GNU lds that support --whole-archive. 5536*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5537*663afb9bSAndroid Build Coastguard Worker else 5538*663afb9bSAndroid Build Coastguard Worker # Exported symbols can be pulled into shared objects from archives 5539*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5540*663afb9bSAndroid Build Coastguard Worker fi 5541*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5542*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5543*663afb9bSAndroid Build Coastguard Worker # -brtl affects multiple linker settings, -berok does not and is overridden later 5544*663afb9bSAndroid Build Coastguard Worker compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5545*663afb9bSAndroid Build Coastguard Worker if test svr4 != "$with_aix_soname"; then 5546*663afb9bSAndroid Build Coastguard Worker # This is similar to how AIX traditionally builds its shared libraries. 5547*663afb9bSAndroid Build Coastguard Worker _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' 5548*663afb9bSAndroid Build Coastguard Worker fi 5549*663afb9bSAndroid Build Coastguard Worker if test aix != "$with_aix_soname"; then 5550*663afb9bSAndroid Build Coastguard Worker _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' 5551*663afb9bSAndroid Build Coastguard Worker else 5552*663afb9bSAndroid Build Coastguard Worker # used by -dlpreopen to get the symbols 5553*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5554*663afb9bSAndroid Build Coastguard Worker fi 5555*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5556*663afb9bSAndroid Build Coastguard Worker fi 5557*663afb9bSAndroid Build Coastguard Worker fi 5558*663afb9bSAndroid Build Coastguard Worker ;; 5559*663afb9bSAndroid Build Coastguard Worker 5560*663afb9bSAndroid Build Coastguard Worker amigaos*) 5561*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 5562*663afb9bSAndroid Build Coastguard Worker powerpc) 5563*663afb9bSAndroid Build Coastguard Worker # see comment about AmigaOS4 .so support 5564*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5565*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='' 5566*663afb9bSAndroid Build Coastguard Worker ;; 5567*663afb9bSAndroid Build Coastguard Worker m68k) 5568*663afb9bSAndroid Build Coastguard Worker _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)' 5569*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5570*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 5571*663afb9bSAndroid Build Coastguard Worker ;; 5572*663afb9bSAndroid Build Coastguard Worker esac 5573*663afb9bSAndroid Build Coastguard Worker ;; 5574*663afb9bSAndroid Build Coastguard Worker 5575*663afb9bSAndroid Build Coastguard Worker bsdi[[45]]*) 5576*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5577*663afb9bSAndroid Build Coastguard Worker ;; 5578*663afb9bSAndroid Build Coastguard Worker 5579*663afb9bSAndroid Build Coastguard Worker cygwin* | mingw* | pw32* | cegcc*) 5580*663afb9bSAndroid Build Coastguard Worker # When not using gcc, we currently assume that we are using 5581*663afb9bSAndroid Build Coastguard Worker # Microsoft Visual C++ or Intel C++ Compiler. 5582*663afb9bSAndroid Build Coastguard Worker # hardcode_libdir_flag_spec is actually meaningless, as there is 5583*663afb9bSAndroid Build Coastguard Worker # no search path for DLLs. 5584*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 5585*663afb9bSAndroid Build Coastguard Worker cl* | icl*) 5586*663afb9bSAndroid Build Coastguard Worker # Native MSVC or ICC 5587*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5588*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5589*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(always_export_symbols, $1)=yes 5590*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(file_list_spec, $1)='@' 5591*663afb9bSAndroid Build Coastguard Worker # Tell ltmain to make .lib files, not .a files. 5592*663afb9bSAndroid Build Coastguard Worker libext=lib 5593*663afb9bSAndroid Build Coastguard Worker # Tell ltmain to make .dll files, not .so files. 5594*663afb9bSAndroid Build Coastguard Worker shrext_cmds=.dll 5595*663afb9bSAndroid Build Coastguard Worker # FIXME: Setting linknames here is a bad hack. 5596*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5597*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5598*663afb9bSAndroid Build Coastguard Worker cp "$export_symbols" "$output_objdir/$soname.def"; 5599*663afb9bSAndroid Build Coastguard Worker echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5600*663afb9bSAndroid Build Coastguard Worker else 5601*663afb9bSAndroid Build Coastguard Worker $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5602*663afb9bSAndroid Build Coastguard Worker fi~ 5603*663afb9bSAndroid Build Coastguard Worker $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5604*663afb9bSAndroid Build Coastguard Worker linknames=' 5605*663afb9bSAndroid Build Coastguard Worker # The linker will not automatically build a static lib if we build a DLL. 5606*663afb9bSAndroid Build Coastguard Worker # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5607*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5608*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5609*663afb9bSAndroid Build Coastguard Worker _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' 5610*663afb9bSAndroid Build Coastguard Worker # Don't use ranlib 5611*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5612*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5613*663afb9bSAndroid Build Coastguard Worker lt_tool_outputfile="@TOOL_OUTPUT@"~ 5614*663afb9bSAndroid Build Coastguard Worker case $lt_outputfile in 5615*663afb9bSAndroid Build Coastguard Worker *.exe|*.EXE) ;; 5616*663afb9bSAndroid Build Coastguard Worker *) 5617*663afb9bSAndroid Build Coastguard Worker lt_outputfile=$lt_outputfile.exe 5618*663afb9bSAndroid Build Coastguard Worker lt_tool_outputfile=$lt_tool_outputfile.exe 5619*663afb9bSAndroid Build Coastguard Worker ;; 5620*663afb9bSAndroid Build Coastguard Worker esac~ 5621*663afb9bSAndroid Build Coastguard Worker if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5622*663afb9bSAndroid Build Coastguard Worker $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5623*663afb9bSAndroid Build Coastguard Worker $RM "$lt_outputfile.manifest"; 5624*663afb9bSAndroid Build Coastguard Worker fi' 5625*663afb9bSAndroid Build Coastguard Worker ;; 5626*663afb9bSAndroid Build Coastguard Worker *) 5627*663afb9bSAndroid Build Coastguard Worker # Assume MSVC and ICC wrapper 5628*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5629*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5630*663afb9bSAndroid Build Coastguard Worker # Tell ltmain to make .lib files, not .a files. 5631*663afb9bSAndroid Build Coastguard Worker libext=lib 5632*663afb9bSAndroid Build Coastguard Worker # Tell ltmain to make .dll files, not .so files. 5633*663afb9bSAndroid Build Coastguard Worker shrext_cmds=.dll 5634*663afb9bSAndroid Build Coastguard Worker # FIXME: Setting linknames here is a bad hack. 5635*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5636*663afb9bSAndroid Build Coastguard Worker # The linker will automatically build a .lib file if we build a DLL. 5637*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5638*663afb9bSAndroid Build Coastguard Worker # FIXME: Should let the user specify the lib program. 5639*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5640*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5641*663afb9bSAndroid Build Coastguard Worker ;; 5642*663afb9bSAndroid Build Coastguard Worker esac 5643*663afb9bSAndroid Build Coastguard Worker ;; 5644*663afb9bSAndroid Build Coastguard Worker 5645*663afb9bSAndroid Build Coastguard Worker darwin* | rhapsody*) 5646*663afb9bSAndroid Build Coastguard Worker _LT_DARWIN_LINKER_FEATURES($1) 5647*663afb9bSAndroid Build Coastguard Worker ;; 5648*663afb9bSAndroid Build Coastguard Worker 5649*663afb9bSAndroid Build Coastguard Worker dgux*) 5650*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5651*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5652*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5653*663afb9bSAndroid Build Coastguard Worker ;; 5654*663afb9bSAndroid Build Coastguard Worker 5655*663afb9bSAndroid Build Coastguard Worker # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5656*663afb9bSAndroid Build Coastguard Worker # support. Future versions do this automatically, but an explicit c++rt0.o 5657*663afb9bSAndroid Build Coastguard Worker # does not break anything, and helps significantly (at the cost of a little 5658*663afb9bSAndroid Build Coastguard Worker # extra space). 5659*663afb9bSAndroid Build Coastguard Worker freebsd2.2*) 5660*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5661*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5662*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 5663*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5664*663afb9bSAndroid Build Coastguard Worker ;; 5665*663afb9bSAndroid Build Coastguard Worker 5666*663afb9bSAndroid Build Coastguard Worker # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5667*663afb9bSAndroid Build Coastguard Worker freebsd2.*) 5668*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5669*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 5670*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 5671*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5672*663afb9bSAndroid Build Coastguard Worker ;; 5673*663afb9bSAndroid Build Coastguard Worker 5674*663afb9bSAndroid Build Coastguard Worker # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5675*663afb9bSAndroid Build Coastguard Worker freebsd* | dragonfly*) 5676*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5677*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5678*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 5679*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5680*663afb9bSAndroid Build Coastguard Worker ;; 5681*663afb9bSAndroid Build Coastguard Worker 5682*663afb9bSAndroid Build Coastguard Worker hpux9*) 5683*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC"; then 5684*663afb9bSAndroid Build Coastguard Worker _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' 5685*663afb9bSAndroid Build Coastguard Worker else 5686*663afb9bSAndroid Build Coastguard Worker _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' 5687*663afb9bSAndroid Build Coastguard Worker fi 5688*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5689*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5690*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 5691*663afb9bSAndroid Build Coastguard Worker 5692*663afb9bSAndroid Build Coastguard Worker # hardcode_minus_L: Not really in the search PATH, 5693*663afb9bSAndroid Build Coastguard Worker # but as the default location of the library. 5694*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 5695*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5696*663afb9bSAndroid Build Coastguard Worker ;; 5697*663afb9bSAndroid Build Coastguard Worker 5698*663afb9bSAndroid Build Coastguard Worker hpux10*) 5699*663afb9bSAndroid Build Coastguard Worker if test yes,no = "$GCC,$with_gnu_ld"; then 5700*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5701*663afb9bSAndroid Build Coastguard Worker else 5702*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5703*663afb9bSAndroid Build Coastguard Worker fi 5704*663afb9bSAndroid Build Coastguard Worker if test no = "$with_gnu_ld"; then 5705*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5706*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5707*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 5708*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5709*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5710*663afb9bSAndroid Build Coastguard Worker # hardcode_minus_L: Not really in the search PATH, 5711*663afb9bSAndroid Build Coastguard Worker # but as the default location of the library. 5712*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 5713*663afb9bSAndroid Build Coastguard Worker fi 5714*663afb9bSAndroid Build Coastguard Worker ;; 5715*663afb9bSAndroid Build Coastguard Worker 5716*663afb9bSAndroid Build Coastguard Worker hpux11*) 5717*663afb9bSAndroid Build Coastguard Worker if test yes,no = "$GCC,$with_gnu_ld"; then 5718*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 5719*663afb9bSAndroid Build Coastguard Worker hppa*64*) 5720*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5721*663afb9bSAndroid Build Coastguard Worker ;; 5722*663afb9bSAndroid Build Coastguard Worker ia64*) 5723*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5724*663afb9bSAndroid Build Coastguard Worker ;; 5725*663afb9bSAndroid Build Coastguard Worker *) 5726*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5727*663afb9bSAndroid Build Coastguard Worker ;; 5728*663afb9bSAndroid Build Coastguard Worker esac 5729*663afb9bSAndroid Build Coastguard Worker else 5730*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 5731*663afb9bSAndroid Build Coastguard Worker hppa*64*) 5732*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5733*663afb9bSAndroid Build Coastguard Worker ;; 5734*663afb9bSAndroid Build Coastguard Worker ia64*) 5735*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5736*663afb9bSAndroid Build Coastguard Worker ;; 5737*663afb9bSAndroid Build Coastguard Worker *) 5738*663afb9bSAndroid Build Coastguard Worker m4_if($1, [], [ 5739*663afb9bSAndroid Build Coastguard Worker # Older versions of the 11.00 compiler do not understand -b yet 5740*663afb9bSAndroid Build Coastguard Worker # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5741*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_OPTION([if $CC understands -b], 5742*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5743*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5744*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5745*663afb9bSAndroid Build Coastguard Worker [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5746*663afb9bSAndroid Build Coastguard Worker ;; 5747*663afb9bSAndroid Build Coastguard Worker esac 5748*663afb9bSAndroid Build Coastguard Worker fi 5749*663afb9bSAndroid Build Coastguard Worker if test no = "$with_gnu_ld"; then 5750*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5751*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5752*663afb9bSAndroid Build Coastguard Worker 5753*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 5754*663afb9bSAndroid Build Coastguard Worker hppa*64*|ia64*) 5755*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=no 5756*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5757*663afb9bSAndroid Build Coastguard Worker ;; 5758*663afb9bSAndroid Build Coastguard Worker *) 5759*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 5760*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5761*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5762*663afb9bSAndroid Build Coastguard Worker 5763*663afb9bSAndroid Build Coastguard Worker # hardcode_minus_L: Not really in the search PATH, 5764*663afb9bSAndroid Build Coastguard Worker # but as the default location of the library. 5765*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 5766*663afb9bSAndroid Build Coastguard Worker ;; 5767*663afb9bSAndroid Build Coastguard Worker esac 5768*663afb9bSAndroid Build Coastguard Worker fi 5769*663afb9bSAndroid Build Coastguard Worker ;; 5770*663afb9bSAndroid Build Coastguard Worker 5771*663afb9bSAndroid Build Coastguard Worker irix5* | irix6* | nonstopux*) 5772*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC"; then 5773*663afb9bSAndroid Build Coastguard Worker _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' 5774*663afb9bSAndroid Build Coastguard Worker # Try to use the -exported_symbol ld option, if it does not 5775*663afb9bSAndroid Build Coastguard Worker # work, assume that -exports_file does not work either and 5776*663afb9bSAndroid Build Coastguard Worker # implicitly export all symbols. 5777*663afb9bSAndroid Build Coastguard Worker # This should be the same for all languages, so no per-tag cache variable. 5778*663afb9bSAndroid Build Coastguard Worker AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5779*663afb9bSAndroid Build Coastguard Worker [lt_cv_irix_exported_symbol], 5780*663afb9bSAndroid Build Coastguard Worker [save_LDFLAGS=$LDFLAGS 5781*663afb9bSAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5782*663afb9bSAndroid Build Coastguard Worker AC_LINK_IFELSE( 5783*663afb9bSAndroid Build Coastguard Worker [AC_LANG_SOURCE( 5784*663afb9bSAndroid Build Coastguard Worker [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5785*663afb9bSAndroid Build Coastguard Worker [C++], [[int foo (void) { return 0; }]], 5786*663afb9bSAndroid Build Coastguard Worker [Fortran 77], [[ 5787*663afb9bSAndroid Build Coastguard Worker subroutine foo 5788*663afb9bSAndroid Build Coastguard Worker end]], 5789*663afb9bSAndroid Build Coastguard Worker [Fortran], [[ 5790*663afb9bSAndroid Build Coastguard Worker subroutine foo 5791*663afb9bSAndroid Build Coastguard Worker end]])])], 5792*663afb9bSAndroid Build Coastguard Worker [lt_cv_irix_exported_symbol=yes], 5793*663afb9bSAndroid Build Coastguard Worker [lt_cv_irix_exported_symbol=no]) 5794*663afb9bSAndroid Build Coastguard Worker LDFLAGS=$save_LDFLAGS]) 5795*663afb9bSAndroid Build Coastguard Worker if test yes = "$lt_cv_irix_exported_symbol"; then 5796*663afb9bSAndroid Build Coastguard Worker _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' 5797*663afb9bSAndroid Build Coastguard Worker fi 5798*663afb9bSAndroid Build Coastguard Worker else 5799*663afb9bSAndroid Build Coastguard Worker _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' 5800*663afb9bSAndroid Build Coastguard Worker _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' 5801*663afb9bSAndroid Build Coastguard Worker fi 5802*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5803*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5804*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5805*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(inherit_rpath, $1)=yes 5806*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(link_all_deplibs, $1)=yes 5807*663afb9bSAndroid Build Coastguard Worker ;; 5808*663afb9bSAndroid Build Coastguard Worker 5809*663afb9bSAndroid Build Coastguard Worker linux*) 5810*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 5811*663afb9bSAndroid Build Coastguard Worker tcc*) 5812*663afb9bSAndroid Build Coastguard Worker # Fabrice Bellard et al's Tiny C Compiler 5813*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=yes 5814*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5815*663afb9bSAndroid Build Coastguard Worker ;; 5816*663afb9bSAndroid Build Coastguard Worker esac 5817*663afb9bSAndroid Build Coastguard Worker ;; 5818*663afb9bSAndroid Build Coastguard Worker 5819*663afb9bSAndroid Build Coastguard Worker netbsd*) 5820*663afb9bSAndroid Build Coastguard Worker if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5821*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5822*663afb9bSAndroid Build Coastguard Worker else 5823*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5824*663afb9bSAndroid Build Coastguard Worker fi 5825*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5826*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 5827*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5828*663afb9bSAndroid Build Coastguard Worker ;; 5829*663afb9bSAndroid Build Coastguard Worker 5830*663afb9bSAndroid Build Coastguard Worker newsos6) 5831*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5832*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 5833*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5834*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5835*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5836*663afb9bSAndroid Build Coastguard Worker ;; 5837*663afb9bSAndroid Build Coastguard Worker 5838*663afb9bSAndroid Build Coastguard Worker *nto* | *qnx*) 5839*663afb9bSAndroid Build Coastguard Worker ;; 5840*663afb9bSAndroid Build Coastguard Worker 5841*663afb9bSAndroid Build Coastguard Worker openbsd* | bitrig*) 5842*663afb9bSAndroid Build Coastguard Worker if test -f /usr/libexec/ld.so; then 5843*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 5844*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5845*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5846*663afb9bSAndroid Build Coastguard Worker if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5847*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5848*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5849*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5850*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5851*663afb9bSAndroid Build Coastguard Worker else 5852*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5853*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5854*663afb9bSAndroid Build Coastguard Worker fi 5855*663afb9bSAndroid Build Coastguard Worker else 5856*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 5857*663afb9bSAndroid Build Coastguard Worker fi 5858*663afb9bSAndroid Build Coastguard Worker ;; 5859*663afb9bSAndroid Build Coastguard Worker 5860*663afb9bSAndroid Build Coastguard Worker os2*) 5861*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5862*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 5863*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5864*663afb9bSAndroid Build Coastguard Worker shrext_cmds=.dll 5865*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5866*663afb9bSAndroid Build Coastguard Worker $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5867*663afb9bSAndroid Build Coastguard Worker $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5868*663afb9bSAndroid Build Coastguard Worker $ECHO EXPORTS >> $output_objdir/$libname.def~ 5869*663afb9bSAndroid Build Coastguard Worker emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5870*663afb9bSAndroid Build Coastguard Worker $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5871*663afb9bSAndroid Build Coastguard Worker emximp -o $lib $output_objdir/$libname.def' 5872*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5873*663afb9bSAndroid Build Coastguard Worker $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5874*663afb9bSAndroid Build Coastguard Worker $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5875*663afb9bSAndroid Build Coastguard Worker $ECHO EXPORTS >> $output_objdir/$libname.def~ 5876*663afb9bSAndroid Build Coastguard Worker prefix_cmds="$SED"~ 5877*663afb9bSAndroid Build Coastguard Worker if test EXPORTS = "`$SED 1q $export_symbols`"; then 5878*663afb9bSAndroid Build Coastguard Worker prefix_cmds="$prefix_cmds -e 1d"; 5879*663afb9bSAndroid Build Coastguard Worker fi~ 5880*663afb9bSAndroid Build Coastguard Worker prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5881*663afb9bSAndroid Build Coastguard Worker cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5882*663afb9bSAndroid Build Coastguard Worker $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5883*663afb9bSAndroid Build Coastguard Worker emximp -o $lib $output_objdir/$libname.def' 5884*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5885*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5886*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(file_list_spec, $1)='@' 5887*663afb9bSAndroid Build Coastguard Worker ;; 5888*663afb9bSAndroid Build Coastguard Worker 5889*663afb9bSAndroid Build Coastguard Worker osf3*) 5890*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC"; then 5891*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5892*663afb9bSAndroid Build Coastguard Worker _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' 5893*663afb9bSAndroid Build Coastguard Worker else 5894*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5895*663afb9bSAndroid Build Coastguard Worker _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' 5896*663afb9bSAndroid Build Coastguard Worker fi 5897*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5898*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5899*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5900*663afb9bSAndroid Build Coastguard Worker ;; 5901*663afb9bSAndroid Build Coastguard Worker 5902*663afb9bSAndroid Build Coastguard Worker osf4* | osf5*) # as osf3* with the addition of -msym flag 5903*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC"; then 5904*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5905*663afb9bSAndroid Build Coastguard Worker _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' 5906*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5907*663afb9bSAndroid Build Coastguard Worker else 5908*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5909*663afb9bSAndroid Build Coastguard Worker _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' 5910*663afb9bSAndroid Build Coastguard Worker _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~ 5911*663afb9bSAndroid Build Coastguard Worker $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' 5912*663afb9bSAndroid Build Coastguard Worker 5913*663afb9bSAndroid Build Coastguard Worker # Both c and cxx compiler support -rpath directly 5914*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5915*663afb9bSAndroid Build Coastguard Worker fi 5916*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5917*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5918*663afb9bSAndroid Build Coastguard Worker ;; 5919*663afb9bSAndroid Build Coastguard Worker 5920*663afb9bSAndroid Build Coastguard Worker solaris*) 5921*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5922*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC"; then 5923*663afb9bSAndroid Build Coastguard Worker wlarc='$wl' 5924*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5925*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5926*663afb9bSAndroid Build Coastguard Worker $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' 5927*663afb9bSAndroid Build Coastguard Worker else 5928*663afb9bSAndroid Build Coastguard Worker case `$CC -V 2>&1` in 5929*663afb9bSAndroid Build Coastguard Worker *"Compilers 5.0"*) 5930*663afb9bSAndroid Build Coastguard Worker wlarc='' 5931*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5932*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5933*663afb9bSAndroid Build Coastguard Worker $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5934*663afb9bSAndroid Build Coastguard Worker ;; 5935*663afb9bSAndroid Build Coastguard Worker *) 5936*663afb9bSAndroid Build Coastguard Worker wlarc='$wl' 5937*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5938*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5939*663afb9bSAndroid Build Coastguard Worker $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5940*663afb9bSAndroid Build Coastguard Worker ;; 5941*663afb9bSAndroid Build Coastguard Worker esac 5942*663afb9bSAndroid Build Coastguard Worker fi 5943*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5944*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5945*663afb9bSAndroid Build Coastguard Worker case $host_os in 5946*663afb9bSAndroid Build Coastguard Worker solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5947*663afb9bSAndroid Build Coastguard Worker *) 5948*663afb9bSAndroid Build Coastguard Worker # The compiler driver will combine and reorder linker options, 5949*663afb9bSAndroid Build Coastguard Worker # but understands '-z linker_flag'. GCC discards it without '$wl', 5950*663afb9bSAndroid Build Coastguard Worker # but is careful enough not to reorder. 5951*663afb9bSAndroid Build Coastguard Worker # Supported since Solaris 2.6 (maybe 2.5.1?) 5952*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC"; then 5953*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5954*663afb9bSAndroid Build Coastguard Worker else 5955*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5956*663afb9bSAndroid Build Coastguard Worker fi 5957*663afb9bSAndroid Build Coastguard Worker ;; 5958*663afb9bSAndroid Build Coastguard Worker esac 5959*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(link_all_deplibs, $1)=yes 5960*663afb9bSAndroid Build Coastguard Worker ;; 5961*663afb9bSAndroid Build Coastguard Worker 5962*663afb9bSAndroid Build Coastguard Worker sunos4*) 5963*663afb9bSAndroid Build Coastguard Worker if test sequent = "$host_vendor"; then 5964*663afb9bSAndroid Build Coastguard Worker # Use $CC to link under sequent, because it throws in some extra .o 5965*663afb9bSAndroid Build Coastguard Worker # files that make .init and .fini sections work. 5966*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5967*663afb9bSAndroid Build Coastguard Worker else 5968*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5969*663afb9bSAndroid Build Coastguard Worker fi 5970*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5971*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 5972*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 5973*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5974*663afb9bSAndroid Build Coastguard Worker ;; 5975*663afb9bSAndroid Build Coastguard Worker 5976*663afb9bSAndroid Build Coastguard Worker sysv4) 5977*663afb9bSAndroid Build Coastguard Worker case $host_vendor in 5978*663afb9bSAndroid Build Coastguard Worker sni) 5979*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5980*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5981*663afb9bSAndroid Build Coastguard Worker ;; 5982*663afb9bSAndroid Build Coastguard Worker siemens) 5983*663afb9bSAndroid Build Coastguard Worker ## LD is ld it makes a PLAMLIB 5984*663afb9bSAndroid Build Coastguard Worker ## CC just makes a GrossModule. 5985*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5986*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5987*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=no 5988*663afb9bSAndroid Build Coastguard Worker ;; 5989*663afb9bSAndroid Build Coastguard Worker motorola) 5990*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5991*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5992*663afb9bSAndroid Build Coastguard Worker ;; 5993*663afb9bSAndroid Build Coastguard Worker esac 5994*663afb9bSAndroid Build Coastguard Worker runpath_var='LD_RUN_PATH' 5995*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5996*663afb9bSAndroid Build Coastguard Worker ;; 5997*663afb9bSAndroid Build Coastguard Worker 5998*663afb9bSAndroid Build Coastguard Worker sysv4.3*) 5999*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6000*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6001*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6002*663afb9bSAndroid Build Coastguard Worker ;; 6003*663afb9bSAndroid Build Coastguard Worker 6004*663afb9bSAndroid Build Coastguard Worker sysv4*MP*) 6005*663afb9bSAndroid Build Coastguard Worker if test -d /usr/nec; then 6006*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6007*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6008*663afb9bSAndroid Build Coastguard Worker runpath_var=LD_RUN_PATH 6009*663afb9bSAndroid Build Coastguard Worker hardcode_runpath_var=yes 6010*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=yes 6011*663afb9bSAndroid Build Coastguard Worker fi 6012*663afb9bSAndroid Build Coastguard Worker ;; 6013*663afb9bSAndroid Build Coastguard Worker 6014*663afb9bSAndroid Build Coastguard Worker sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6015*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6016*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6017*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6018*663afb9bSAndroid Build Coastguard Worker runpath_var='LD_RUN_PATH' 6019*663afb9bSAndroid Build Coastguard Worker 6020*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC"; then 6021*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6022*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6023*663afb9bSAndroid Build Coastguard Worker else 6024*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6025*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6026*663afb9bSAndroid Build Coastguard Worker fi 6027*663afb9bSAndroid Build Coastguard Worker ;; 6028*663afb9bSAndroid Build Coastguard Worker 6029*663afb9bSAndroid Build Coastguard Worker sysv5* | sco3.2v5* | sco5v6*) 6030*663afb9bSAndroid Build Coastguard Worker # Note: We CANNOT use -z defs as we might desire, because we do not 6031*663afb9bSAndroid Build Coastguard Worker # link with -lc, and that would cause any symbols used from libc to 6032*663afb9bSAndroid Build Coastguard Worker # always be unresolved, which means just about no library would 6033*663afb9bSAndroid Build Coastguard Worker # ever link correctly. If we're not using GNU ld we use -z text 6034*663afb9bSAndroid Build Coastguard Worker # though, which does catch some bad symbols but isn't as heavy-handed 6035*663afb9bSAndroid Build Coastguard Worker # as -z defs. 6036*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6037*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6038*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6039*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6040*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6041*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6042*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(link_all_deplibs, $1)=yes 6043*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6044*663afb9bSAndroid Build Coastguard Worker runpath_var='LD_RUN_PATH' 6045*663afb9bSAndroid Build Coastguard Worker 6046*663afb9bSAndroid Build Coastguard Worker if test yes = "$GCC"; then 6047*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6048*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6049*663afb9bSAndroid Build Coastguard Worker else 6050*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6051*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6052*663afb9bSAndroid Build Coastguard Worker fi 6053*663afb9bSAndroid Build Coastguard Worker ;; 6054*663afb9bSAndroid Build Coastguard Worker 6055*663afb9bSAndroid Build Coastguard Worker uts4*) 6056*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6057*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6058*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6059*663afb9bSAndroid Build Coastguard Worker ;; 6060*663afb9bSAndroid Build Coastguard Worker 6061*663afb9bSAndroid Build Coastguard Worker *) 6062*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6063*663afb9bSAndroid Build Coastguard Worker ;; 6064*663afb9bSAndroid Build Coastguard Worker esac 6065*663afb9bSAndroid Build Coastguard Worker 6066*663afb9bSAndroid Build Coastguard Worker if test sni = "$host_vendor"; then 6067*663afb9bSAndroid Build Coastguard Worker case $host in 6068*663afb9bSAndroid Build Coastguard Worker sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6069*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6070*663afb9bSAndroid Build Coastguard Worker ;; 6071*663afb9bSAndroid Build Coastguard Worker esac 6072*663afb9bSAndroid Build Coastguard Worker fi 6073*663afb9bSAndroid Build Coastguard Worker fi 6074*663afb9bSAndroid Build Coastguard Worker]) 6075*663afb9bSAndroid Build Coastguard WorkerAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6076*663afb9bSAndroid Build Coastguard Workertest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6077*663afb9bSAndroid Build Coastguard Worker 6078*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6079*663afb9bSAndroid Build Coastguard Worker 6080*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6081*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6082*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [extract_expsyms_cmds], [2], 6083*663afb9bSAndroid Build Coastguard Worker [The commands to extract the exported symbol list from a shared archive]) 6084*663afb9bSAndroid Build Coastguard Worker 6085*663afb9bSAndroid Build Coastguard Worker# 6086*663afb9bSAndroid Build Coastguard Worker# Do we need to explicitly link libc? 6087*663afb9bSAndroid Build Coastguard Worker# 6088*663afb9bSAndroid Build Coastguard Workercase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6089*663afb9bSAndroid Build Coastguard Workerx|xyes) 6090*663afb9bSAndroid Build Coastguard Worker # Assume -lc should be added 6091*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6092*663afb9bSAndroid Build Coastguard Worker 6093*663afb9bSAndroid Build Coastguard Worker if test yes,yes = "$GCC,$enable_shared"; then 6094*663afb9bSAndroid Build Coastguard Worker case $_LT_TAGVAR(archive_cmds, $1) in 6095*663afb9bSAndroid Build Coastguard Worker *'~'*) 6096*663afb9bSAndroid Build Coastguard Worker # FIXME: we may have to deal with multi-command sequences. 6097*663afb9bSAndroid Build Coastguard Worker ;; 6098*663afb9bSAndroid Build Coastguard Worker '$CC '*) 6099*663afb9bSAndroid Build Coastguard Worker # Test whether the compiler implicitly links with -lc since on some 6100*663afb9bSAndroid Build Coastguard Worker # systems, -lgcc has to come before -lc. If gcc already passes -lc 6101*663afb9bSAndroid Build Coastguard Worker # to ld, don't add -lc before -lgcc. 6102*663afb9bSAndroid Build Coastguard Worker AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6103*663afb9bSAndroid Build Coastguard Worker [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6104*663afb9bSAndroid Build Coastguard Worker [$RM conftest* 6105*663afb9bSAndroid Build Coastguard Worker echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6106*663afb9bSAndroid Build Coastguard Worker 6107*663afb9bSAndroid Build Coastguard Worker if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6108*663afb9bSAndroid Build Coastguard Worker soname=conftest 6109*663afb9bSAndroid Build Coastguard Worker lib=conftest 6110*663afb9bSAndroid Build Coastguard Worker libobjs=conftest.$ac_objext 6111*663afb9bSAndroid Build Coastguard Worker deplibs= 6112*663afb9bSAndroid Build Coastguard Worker wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6113*663afb9bSAndroid Build Coastguard Worker pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6114*663afb9bSAndroid Build Coastguard Worker compiler_flags=-v 6115*663afb9bSAndroid Build Coastguard Worker linker_flags=-v 6116*663afb9bSAndroid Build Coastguard Worker verstring= 6117*663afb9bSAndroid Build Coastguard Worker output_objdir=. 6118*663afb9bSAndroid Build Coastguard Worker libname=conftest 6119*663afb9bSAndroid Build Coastguard Worker lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6120*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)= 6121*663afb9bSAndroid Build Coastguard Worker if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6122*663afb9bSAndroid Build Coastguard Worker then 6123*663afb9bSAndroid Build Coastguard Worker lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6124*663afb9bSAndroid Build Coastguard Worker else 6125*663afb9bSAndroid Build Coastguard Worker lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6126*663afb9bSAndroid Build Coastguard Worker fi 6127*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6128*663afb9bSAndroid Build Coastguard Worker else 6129*663afb9bSAndroid Build Coastguard Worker cat conftest.err 1>&5 6130*663afb9bSAndroid Build Coastguard Worker fi 6131*663afb9bSAndroid Build Coastguard Worker $RM conftest* 6132*663afb9bSAndroid Build Coastguard Worker ]) 6133*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6134*663afb9bSAndroid Build Coastguard Worker ;; 6135*663afb9bSAndroid Build Coastguard Worker esac 6136*663afb9bSAndroid Build Coastguard Worker fi 6137*663afb9bSAndroid Build Coastguard Worker ;; 6138*663afb9bSAndroid Build Coastguard Workeresac 6139*663afb9bSAndroid Build Coastguard Worker 6140*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6141*663afb9bSAndroid Build Coastguard Worker [Whether or not to add -lc for building shared libraries]) 6142*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6143*663afb9bSAndroid Build Coastguard Worker [enable_shared_with_static_runtimes], [0], 6144*663afb9bSAndroid Build Coastguard Worker [Whether or not to disallow shared libs when runtime libs are static]) 6145*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6146*663afb9bSAndroid Build Coastguard Worker [Compiler flag to allow reflexive dlopens]) 6147*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6148*663afb9bSAndroid Build Coastguard Worker [Compiler flag to generate shared objects directly from archives]) 6149*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [compiler_needs_object], [1], 6150*663afb9bSAndroid Build Coastguard Worker [Whether the compiler copes with passing no objects directly]) 6151*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6152*663afb9bSAndroid Build Coastguard Worker [Create an old-style archive from a shared archive]) 6153*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6154*663afb9bSAndroid Build Coastguard Worker [Create a temporary old-style archive to link instead of a shared archive]) 6155*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6156*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6157*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [module_cmds], [2], 6158*663afb9bSAndroid Build Coastguard Worker [Commands used to build a loadable module if different from building 6159*663afb9bSAndroid Build Coastguard Worker a shared archive.]) 6160*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [module_expsym_cmds], [2]) 6161*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [with_gnu_ld], [1], 6162*663afb9bSAndroid Build Coastguard Worker [Whether we are building with GNU ld or not]) 6163*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [allow_undefined_flag], [1], 6164*663afb9bSAndroid Build Coastguard Worker [Flag that allows shared libraries with undefined symbols to be built]) 6165*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [no_undefined_flag], [1], 6166*663afb9bSAndroid Build Coastguard Worker [Flag that enforces no undefined symbols]) 6167*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6168*663afb9bSAndroid Build Coastguard Worker [Flag to hardcode $libdir into a binary during linking. 6169*663afb9bSAndroid Build Coastguard Worker This must work even if $libdir does not exist]) 6170*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6171*663afb9bSAndroid Build Coastguard Worker [Whether we need a single "-rpath" flag with a separated argument]) 6172*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_direct], [0], 6173*663afb9bSAndroid Build Coastguard Worker [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6174*663afb9bSAndroid Build Coastguard Worker DIR into the resulting binary]) 6175*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6176*663afb9bSAndroid Build Coastguard Worker [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6177*663afb9bSAndroid Build Coastguard Worker DIR into the resulting binary and the resulting library dependency is 6178*663afb9bSAndroid Build Coastguard Worker "absolute", i.e impossible to change by setting $shlibpath_var if the 6179*663afb9bSAndroid Build Coastguard Worker library is relocated]) 6180*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_minus_L], [0], 6181*663afb9bSAndroid Build Coastguard Worker [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6182*663afb9bSAndroid Build Coastguard Worker into the resulting binary]) 6183*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6184*663afb9bSAndroid Build Coastguard Worker [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6185*663afb9bSAndroid Build Coastguard Worker into the resulting binary]) 6186*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [hardcode_automatic], [0], 6187*663afb9bSAndroid Build Coastguard Worker [Set to "yes" if building a shared library automatically hardcodes DIR 6188*663afb9bSAndroid Build Coastguard Worker into the library and all subsequent libraries and executables linked 6189*663afb9bSAndroid Build Coastguard Worker against it]) 6190*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [inherit_rpath], [0], 6191*663afb9bSAndroid Build Coastguard Worker [Set to yes if linker adds runtime paths of dependent libraries 6192*663afb9bSAndroid Build Coastguard Worker to runtime path list]) 6193*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [link_all_deplibs], [0], 6194*663afb9bSAndroid Build Coastguard Worker [Whether libtool must link a program against all its dependency libraries]) 6195*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [always_export_symbols], [0], 6196*663afb9bSAndroid Build Coastguard Worker [Set to "yes" if exported symbols are required]) 6197*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [export_symbols_cmds], [2], 6198*663afb9bSAndroid Build Coastguard Worker [The commands to list exported symbols]) 6199*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [exclude_expsyms], [1], 6200*663afb9bSAndroid Build Coastguard Worker [Symbols that should not be listed in the preloaded symbols]) 6201*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [include_expsyms], [1], 6202*663afb9bSAndroid Build Coastguard Worker [Symbols that must always be exported]) 6203*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [prelink_cmds], [2], 6204*663afb9bSAndroid Build Coastguard Worker [Commands necessary for linking programs (against libraries) with templates]) 6205*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [postlink_cmds], [2], 6206*663afb9bSAndroid Build Coastguard Worker [Commands necessary for finishing linking programs]) 6207*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [file_list_spec], [1], 6208*663afb9bSAndroid Build Coastguard Worker [Specify filename containing input files]) 6209*663afb9bSAndroid Build Coastguard Workerdnl FIXME: Not yet implemented 6210*663afb9bSAndroid Build Coastguard Workerdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6211*663afb9bSAndroid Build Coastguard Workerdnl [Compiler flag to generate thread safe objects]) 6212*663afb9bSAndroid Build Coastguard Worker])# _LT_LINKER_SHLIBS 6213*663afb9bSAndroid Build Coastguard Worker 6214*663afb9bSAndroid Build Coastguard Worker 6215*663afb9bSAndroid Build Coastguard Worker# _LT_LANG_C_CONFIG([TAG]) 6216*663afb9bSAndroid Build Coastguard Worker# ------------------------ 6217*663afb9bSAndroid Build Coastguard Worker# Ensure that the configuration variables for a C compiler are suitably 6218*663afb9bSAndroid Build Coastguard Worker# defined. These variables are subsequently used by _LT_CONFIG to write 6219*663afb9bSAndroid Build Coastguard Worker# the compiler configuration to 'libtool'. 6220*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LANG_C_CONFIG], 6221*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_DECL_EGREP])dnl 6222*663afb9bSAndroid Build Coastguard Workerlt_save_CC=$CC 6223*663afb9bSAndroid Build Coastguard WorkerAC_LANG_PUSH(C) 6224*663afb9bSAndroid Build Coastguard Worker 6225*663afb9bSAndroid Build Coastguard Worker# Source file extension for C test sources. 6226*663afb9bSAndroid Build Coastguard Workerac_ext=c 6227*663afb9bSAndroid Build Coastguard Worker 6228*663afb9bSAndroid Build Coastguard Worker# Object file extension for compiled C test sources. 6229*663afb9bSAndroid Build Coastguard Workerobjext=o 6230*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext 6231*663afb9bSAndroid Build Coastguard Worker 6232*663afb9bSAndroid Build Coastguard Worker# Code to be used in simple compile tests 6233*663afb9bSAndroid Build Coastguard Workerlt_simple_compile_test_code="int some_variable = 0;" 6234*663afb9bSAndroid Build Coastguard Worker 6235*663afb9bSAndroid Build Coastguard Worker# Code to be used in simple link tests 6236*663afb9bSAndroid Build Coastguard Workerlt_simple_link_test_code='int main(){return(0);}' 6237*663afb9bSAndroid Build Coastguard Worker 6238*663afb9bSAndroid Build Coastguard Worker_LT_TAG_COMPILER 6239*663afb9bSAndroid Build Coastguard Worker# Save the default compiler, since it gets overwritten when the other 6240*663afb9bSAndroid Build Coastguard Worker# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6241*663afb9bSAndroid Build Coastguard Workercompiler_DEFAULT=$CC 6242*663afb9bSAndroid Build Coastguard Worker 6243*663afb9bSAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code 6244*663afb9bSAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE 6245*663afb9bSAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE 6246*663afb9bSAndroid Build Coastguard Worker 6247*663afb9bSAndroid Build Coastguard Worker## CAVEAT EMPTOR: 6248*663afb9bSAndroid Build Coastguard Worker## There is no encapsulation within the following macros, do not change 6249*663afb9bSAndroid Build Coastguard Worker## the running order or otherwise move them around unless you know exactly 6250*663afb9bSAndroid Build Coastguard Worker## what you are doing... 6251*663afb9bSAndroid Build Coastguard Workerif test -n "$compiler"; then 6252*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_NO_RTTI($1) 6253*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_PIC($1) 6254*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_C_O($1) 6255*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_FILE_LOCKS($1) 6256*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_SHLIBS($1) 6257*663afb9bSAndroid Build Coastguard Worker _LT_SYS_DYNAMIC_LINKER($1) 6258*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_HARDCODE_LIBPATH($1) 6259*663afb9bSAndroid Build Coastguard Worker LT_SYS_DLOPEN_SELF 6260*663afb9bSAndroid Build Coastguard Worker _LT_CMD_STRIPLIB 6261*663afb9bSAndroid Build Coastguard Worker 6262*663afb9bSAndroid Build Coastguard Worker # Report what library types will actually be built 6263*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([if libtool supports shared libraries]) 6264*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([$can_build_shared]) 6265*663afb9bSAndroid Build Coastguard Worker 6266*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to build shared libraries]) 6267*663afb9bSAndroid Build Coastguard Worker test no = "$can_build_shared" && enable_shared=no 6268*663afb9bSAndroid Build Coastguard Worker 6269*663afb9bSAndroid Build Coastguard Worker # On AIX, shared libraries and static libraries use the same namespace, and 6270*663afb9bSAndroid Build Coastguard Worker # are all built from PIC. 6271*663afb9bSAndroid Build Coastguard Worker case $host_os in 6272*663afb9bSAndroid Build Coastguard Worker aix3*) 6273*663afb9bSAndroid Build Coastguard Worker test yes = "$enable_shared" && enable_static=no 6274*663afb9bSAndroid Build Coastguard Worker if test -n "$RANLIB"; then 6275*663afb9bSAndroid Build Coastguard Worker archive_cmds="$archive_cmds~\$RANLIB \$lib" 6276*663afb9bSAndroid Build Coastguard Worker postinstall_cmds='$RANLIB $lib' 6277*663afb9bSAndroid Build Coastguard Worker fi 6278*663afb9bSAndroid Build Coastguard Worker ;; 6279*663afb9bSAndroid Build Coastguard Worker 6280*663afb9bSAndroid Build Coastguard Worker aix[[4-9]]*) 6281*663afb9bSAndroid Build Coastguard Worker if test ia64 != "$host_cpu"; then 6282*663afb9bSAndroid Build Coastguard Worker case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6283*663afb9bSAndroid Build Coastguard Worker yes,aix,yes) ;; # shared object as lib.so file only 6284*663afb9bSAndroid Build Coastguard Worker yes,svr4,*) ;; # shared object as lib.so archive member only 6285*663afb9bSAndroid Build Coastguard Worker yes,*) enable_static=no ;; # shared object in lib.a archive as well 6286*663afb9bSAndroid Build Coastguard Worker esac 6287*663afb9bSAndroid Build Coastguard Worker fi 6288*663afb9bSAndroid Build Coastguard Worker ;; 6289*663afb9bSAndroid Build Coastguard Worker esac 6290*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([$enable_shared]) 6291*663afb9bSAndroid Build Coastguard Worker 6292*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to build static libraries]) 6293*663afb9bSAndroid Build Coastguard Worker # Make sure either enable_shared or enable_static is yes. 6294*663afb9bSAndroid Build Coastguard Worker test yes = "$enable_shared" || enable_static=yes 6295*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([$enable_static]) 6296*663afb9bSAndroid Build Coastguard Worker 6297*663afb9bSAndroid Build Coastguard Worker _LT_CONFIG($1) 6298*663afb9bSAndroid Build Coastguard Workerfi 6299*663afb9bSAndroid Build Coastguard WorkerAC_LANG_POP 6300*663afb9bSAndroid Build Coastguard WorkerCC=$lt_save_CC 6301*663afb9bSAndroid Build Coastguard Worker])# _LT_LANG_C_CONFIG 6302*663afb9bSAndroid Build Coastguard Worker 6303*663afb9bSAndroid Build Coastguard Worker 6304*663afb9bSAndroid Build Coastguard Worker# _LT_LANG_CXX_CONFIG([TAG]) 6305*663afb9bSAndroid Build Coastguard Worker# -------------------------- 6306*663afb9bSAndroid Build Coastguard Worker# Ensure that the configuration variables for a C++ compiler are suitably 6307*663afb9bSAndroid Build Coastguard Worker# defined. These variables are subsequently used by _LT_CONFIG to write 6308*663afb9bSAndroid Build Coastguard Worker# the compiler configuration to 'libtool'. 6309*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LANG_CXX_CONFIG], 6310*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6311*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_DECL_EGREP])dnl 6312*663afb9bSAndroid Build Coastguard Workerm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6313*663afb9bSAndroid Build Coastguard Workerif test -n "$CXX" && ( test no != "$CXX" && 6314*663afb9bSAndroid Build Coastguard Worker ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6315*663afb9bSAndroid Build Coastguard Worker (test g++ != "$CXX"))); then 6316*663afb9bSAndroid Build Coastguard Worker AC_PROG_CXXCPP 6317*663afb9bSAndroid Build Coastguard Workerelse 6318*663afb9bSAndroid Build Coastguard Worker _lt_caught_CXX_error=yes 6319*663afb9bSAndroid Build Coastguard Workerfi 6320*663afb9bSAndroid Build Coastguard Worker 6321*663afb9bSAndroid Build Coastguard WorkerAC_LANG_PUSH(C++) 6322*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6323*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(allow_undefined_flag, $1)= 6324*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(always_export_symbols, $1)=no 6325*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(archive_expsym_cmds, $1)= 6326*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(compiler_needs_object, $1)=no 6327*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6328*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct, $1)=no 6329*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6330*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6331*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_separator, $1)= 6332*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_minus_L, $1)=no 6333*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6334*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_automatic, $1)=no 6335*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(inherit_rpath, $1)=no 6336*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(module_cmds, $1)= 6337*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(module_expsym_cmds, $1)= 6338*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(link_all_deplibs, $1)=unknown 6339*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6340*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag 6341*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6342*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(no_undefined_flag, $1)= 6343*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(whole_archive_flag_spec, $1)= 6344*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6345*663afb9bSAndroid Build Coastguard Worker 6346*663afb9bSAndroid Build Coastguard Worker# Source file extension for C++ test sources. 6347*663afb9bSAndroid Build Coastguard Workerac_ext=cpp 6348*663afb9bSAndroid Build Coastguard Worker 6349*663afb9bSAndroid Build Coastguard Worker# Object file extension for compiled C++ test sources. 6350*663afb9bSAndroid Build Coastguard Workerobjext=o 6351*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext 6352*663afb9bSAndroid Build Coastguard Worker 6353*663afb9bSAndroid Build Coastguard Worker# No sense in running all these tests if we already determined that 6354*663afb9bSAndroid Build Coastguard Worker# the CXX compiler isn't working. Some variables (like enable_shared) 6355*663afb9bSAndroid Build Coastguard Worker# are currently assumed to apply to all compilers on this platform, 6356*663afb9bSAndroid Build Coastguard Worker# and will be corrupted by setting them based on a non-working compiler. 6357*663afb9bSAndroid Build Coastguard Workerif test yes != "$_lt_caught_CXX_error"; then 6358*663afb9bSAndroid Build Coastguard Worker # Code to be used in simple compile tests 6359*663afb9bSAndroid Build Coastguard Worker lt_simple_compile_test_code="int some_variable = 0;" 6360*663afb9bSAndroid Build Coastguard Worker 6361*663afb9bSAndroid Build Coastguard Worker # Code to be used in simple link tests 6362*663afb9bSAndroid Build Coastguard Worker lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6363*663afb9bSAndroid Build Coastguard Worker 6364*663afb9bSAndroid Build Coastguard Worker # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6365*663afb9bSAndroid Build Coastguard Worker _LT_TAG_COMPILER 6366*663afb9bSAndroid Build Coastguard Worker 6367*663afb9bSAndroid Build Coastguard Worker # save warnings/boilerplate of simple test code 6368*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_BOILERPLATE 6369*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_BOILERPLATE 6370*663afb9bSAndroid Build Coastguard Worker 6371*663afb9bSAndroid Build Coastguard Worker # Allow CC to be a program name with arguments. 6372*663afb9bSAndroid Build Coastguard Worker lt_save_CC=$CC 6373*663afb9bSAndroid Build Coastguard Worker lt_save_CFLAGS=$CFLAGS 6374*663afb9bSAndroid Build Coastguard Worker lt_save_LD=$LD 6375*663afb9bSAndroid Build Coastguard Worker lt_save_GCC=$GCC 6376*663afb9bSAndroid Build Coastguard Worker GCC=$GXX 6377*663afb9bSAndroid Build Coastguard Worker lt_save_with_gnu_ld=$with_gnu_ld 6378*663afb9bSAndroid Build Coastguard Worker lt_save_path_LD=$lt_cv_path_LD 6379*663afb9bSAndroid Build Coastguard Worker if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6380*663afb9bSAndroid Build Coastguard Worker lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6381*663afb9bSAndroid Build Coastguard Worker else 6382*663afb9bSAndroid Build Coastguard Worker $as_unset lt_cv_prog_gnu_ld 6383*663afb9bSAndroid Build Coastguard Worker fi 6384*663afb9bSAndroid Build Coastguard Worker if test -n "${lt_cv_path_LDCXX+set}"; then 6385*663afb9bSAndroid Build Coastguard Worker lt_cv_path_LD=$lt_cv_path_LDCXX 6386*663afb9bSAndroid Build Coastguard Worker else 6387*663afb9bSAndroid Build Coastguard Worker $as_unset lt_cv_path_LD 6388*663afb9bSAndroid Build Coastguard Worker fi 6389*663afb9bSAndroid Build Coastguard Worker test -z "${LDCXX+set}" || LD=$LDCXX 6390*663afb9bSAndroid Build Coastguard Worker CC=${CXX-"c++"} 6391*663afb9bSAndroid Build Coastguard Worker CFLAGS=$CXXFLAGS 6392*663afb9bSAndroid Build Coastguard Worker compiler=$CC 6393*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(compiler, $1)=$CC 6394*663afb9bSAndroid Build Coastguard Worker _LT_CC_BASENAME([$compiler]) 6395*663afb9bSAndroid Build Coastguard Worker 6396*663afb9bSAndroid Build Coastguard Worker if test -n "$compiler"; then 6397*663afb9bSAndroid Build Coastguard Worker # We don't want -fno-exception when compiling C++ code, so set the 6398*663afb9bSAndroid Build Coastguard Worker # no_builtin_flag separately 6399*663afb9bSAndroid Build Coastguard Worker if test yes = "$GXX"; then 6400*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6401*663afb9bSAndroid Build Coastguard Worker else 6402*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6403*663afb9bSAndroid Build Coastguard Worker fi 6404*663afb9bSAndroid Build Coastguard Worker 6405*663afb9bSAndroid Build Coastguard Worker if test yes = "$GXX"; then 6406*663afb9bSAndroid Build Coastguard Worker # Set up default GNU C++ configuration 6407*663afb9bSAndroid Build Coastguard Worker 6408*663afb9bSAndroid Build Coastguard Worker LT_PATH_LD 6409*663afb9bSAndroid Build Coastguard Worker 6410*663afb9bSAndroid Build Coastguard Worker # Check if GNU C++ uses GNU ld as the underlying linker, since the 6411*663afb9bSAndroid Build Coastguard Worker # archiving commands below assume that GNU ld is being used. 6412*663afb9bSAndroid Build Coastguard Worker if test yes = "$with_gnu_ld"; then 6413*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6414*663afb9bSAndroid Build Coastguard Worker _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' 6415*663afb9bSAndroid Build Coastguard Worker 6416*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6417*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6418*663afb9bSAndroid Build Coastguard Worker 6419*663afb9bSAndroid Build Coastguard Worker # If archive_cmds runs LD, not CC, wlarc should be empty 6420*663afb9bSAndroid Build Coastguard Worker # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6421*663afb9bSAndroid Build Coastguard Worker # investigate it a little bit more. (MM) 6422*663afb9bSAndroid Build Coastguard Worker wlarc='$wl' 6423*663afb9bSAndroid Build Coastguard Worker 6424*663afb9bSAndroid Build Coastguard Worker # ancient GNU ld didn't support --whole-archive et. al. 6425*663afb9bSAndroid Build Coastguard Worker if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6426*663afb9bSAndroid Build Coastguard Worker $GREP 'no-whole-archive' > /dev/null; then 6427*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6428*663afb9bSAndroid Build Coastguard Worker else 6429*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)= 6430*663afb9bSAndroid Build Coastguard Worker fi 6431*663afb9bSAndroid Build Coastguard Worker else 6432*663afb9bSAndroid Build Coastguard Worker with_gnu_ld=no 6433*663afb9bSAndroid Build Coastguard Worker wlarc= 6434*663afb9bSAndroid Build Coastguard Worker 6435*663afb9bSAndroid Build Coastguard Worker # A generic and very simple default shared library creation 6436*663afb9bSAndroid Build Coastguard Worker # command for GNU C++ for the case where it uses the native 6437*663afb9bSAndroid Build Coastguard Worker # linker, instead of GNU ld. If possible, this setting should 6438*663afb9bSAndroid Build Coastguard Worker # overridden to take advantage of the native linker features on 6439*663afb9bSAndroid Build Coastguard Worker # the platform it is being used on. 6440*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6441*663afb9bSAndroid Build Coastguard Worker fi 6442*663afb9bSAndroid Build Coastguard Worker 6443*663afb9bSAndroid Build Coastguard Worker # Commands to make compiler produce verbose output that lists 6444*663afb9bSAndroid Build Coastguard Worker # what "hidden" libraries, object files and flags are used when 6445*663afb9bSAndroid Build Coastguard Worker # linking a shared library. 6446*663afb9bSAndroid Build Coastguard Worker output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6447*663afb9bSAndroid Build Coastguard Worker 6448*663afb9bSAndroid Build Coastguard Worker else 6449*663afb9bSAndroid Build Coastguard Worker GXX=no 6450*663afb9bSAndroid Build Coastguard Worker with_gnu_ld=no 6451*663afb9bSAndroid Build Coastguard Worker wlarc= 6452*663afb9bSAndroid Build Coastguard Worker fi 6453*663afb9bSAndroid Build Coastguard Worker 6454*663afb9bSAndroid Build Coastguard Worker # PORTME: fill in a description of your system's C++ link characteristics 6455*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6456*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=yes 6457*663afb9bSAndroid Build Coastguard Worker case $host_os in 6458*663afb9bSAndroid Build Coastguard Worker aix3*) 6459*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 6460*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6461*663afb9bSAndroid Build Coastguard Worker ;; 6462*663afb9bSAndroid Build Coastguard Worker aix[[4-9]]*) 6463*663afb9bSAndroid Build Coastguard Worker if test ia64 = "$host_cpu"; then 6464*663afb9bSAndroid Build Coastguard Worker # On IA64, the linker does run time linking by default, so we don't 6465*663afb9bSAndroid Build Coastguard Worker # have to do anything special. 6466*663afb9bSAndroid Build Coastguard Worker aix_use_runtimelinking=no 6467*663afb9bSAndroid Build Coastguard Worker exp_sym_flag='-Bexport' 6468*663afb9bSAndroid Build Coastguard Worker no_entry_flag= 6469*663afb9bSAndroid Build Coastguard Worker else 6470*663afb9bSAndroid Build Coastguard Worker aix_use_runtimelinking=no 6471*663afb9bSAndroid Build Coastguard Worker 6472*663afb9bSAndroid Build Coastguard Worker # Test if we are trying to use run time linking or normal 6473*663afb9bSAndroid Build Coastguard Worker # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6474*663afb9bSAndroid Build Coastguard Worker # have runtime linking enabled, and use it for executables. 6475*663afb9bSAndroid Build Coastguard Worker # For shared libraries, we enable/disable runtime linking 6476*663afb9bSAndroid Build Coastguard Worker # depending on the kind of the shared library created - 6477*663afb9bSAndroid Build Coastguard Worker # when "with_aix_soname,aix_use_runtimelinking" is: 6478*663afb9bSAndroid Build Coastguard Worker # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6479*663afb9bSAndroid Build Coastguard Worker # "aix,yes" lib.so shared, rtl:yes, for executables 6480*663afb9bSAndroid Build Coastguard Worker # lib.a static archive 6481*663afb9bSAndroid Build Coastguard Worker # "both,no" lib.so.V(shr.o) shared, rtl:yes 6482*663afb9bSAndroid Build Coastguard Worker # lib.a(lib.so.V) shared, rtl:no, for executables 6483*663afb9bSAndroid Build Coastguard Worker # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6484*663afb9bSAndroid Build Coastguard Worker # lib.a(lib.so.V) shared, rtl:no 6485*663afb9bSAndroid Build Coastguard Worker # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6486*663afb9bSAndroid Build Coastguard Worker # lib.a static archive 6487*663afb9bSAndroid Build Coastguard Worker case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6488*663afb9bSAndroid Build Coastguard Worker for ld_flag in $LDFLAGS; do 6489*663afb9bSAndroid Build Coastguard Worker case $ld_flag in 6490*663afb9bSAndroid Build Coastguard Worker *-brtl*) 6491*663afb9bSAndroid Build Coastguard Worker aix_use_runtimelinking=yes 6492*663afb9bSAndroid Build Coastguard Worker break 6493*663afb9bSAndroid Build Coastguard Worker ;; 6494*663afb9bSAndroid Build Coastguard Worker esac 6495*663afb9bSAndroid Build Coastguard Worker done 6496*663afb9bSAndroid Build Coastguard Worker if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6497*663afb9bSAndroid Build Coastguard Worker # With aix-soname=svr4, we create the lib.so.V shared archives only, 6498*663afb9bSAndroid Build Coastguard Worker # so we don't have lib.a shared libs to link our executables. 6499*663afb9bSAndroid Build Coastguard Worker # We have to force runtime linking in this case. 6500*663afb9bSAndroid Build Coastguard Worker aix_use_runtimelinking=yes 6501*663afb9bSAndroid Build Coastguard Worker LDFLAGS="$LDFLAGS -Wl,-brtl" 6502*663afb9bSAndroid Build Coastguard Worker fi 6503*663afb9bSAndroid Build Coastguard Worker ;; 6504*663afb9bSAndroid Build Coastguard Worker esac 6505*663afb9bSAndroid Build Coastguard Worker 6506*663afb9bSAndroid Build Coastguard Worker exp_sym_flag='-bexport' 6507*663afb9bSAndroid Build Coastguard Worker no_entry_flag='-bnoentry' 6508*663afb9bSAndroid Build Coastguard Worker fi 6509*663afb9bSAndroid Build Coastguard Worker 6510*663afb9bSAndroid Build Coastguard Worker # When large executables or shared objects are built, AIX ld can 6511*663afb9bSAndroid Build Coastguard Worker # have problems creating the table of contents. If linking a library 6512*663afb9bSAndroid Build Coastguard Worker # or program results in "error TOC overflow" add -mminimal-toc to 6513*663afb9bSAndroid Build Coastguard Worker # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6514*663afb9bSAndroid Build Coastguard Worker # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6515*663afb9bSAndroid Build Coastguard Worker 6516*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='' 6517*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 6518*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6519*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6520*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(link_all_deplibs, $1)=yes 6521*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6522*663afb9bSAndroid Build Coastguard Worker case $with_aix_soname,$aix_use_runtimelinking in 6523*663afb9bSAndroid Build Coastguard Worker aix,*) ;; # no import file 6524*663afb9bSAndroid Build Coastguard Worker svr4,* | *,yes) # use import file 6525*663afb9bSAndroid Build Coastguard Worker # The Import File defines what to hardcode. 6526*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=no 6527*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6528*663afb9bSAndroid Build Coastguard Worker ;; 6529*663afb9bSAndroid Build Coastguard Worker esac 6530*663afb9bSAndroid Build Coastguard Worker 6531*663afb9bSAndroid Build Coastguard Worker if test yes = "$GXX"; then 6532*663afb9bSAndroid Build Coastguard Worker case $host_os in aix4.[[012]]|aix4.[[012]].*) 6533*663afb9bSAndroid Build Coastguard Worker # We only want to do this on AIX 4.2 and lower, the check 6534*663afb9bSAndroid Build Coastguard Worker # below for broken collect2 doesn't work under 4.3+ 6535*663afb9bSAndroid Build Coastguard Worker collect2name=`$CC -print-prog-name=collect2` 6536*663afb9bSAndroid Build Coastguard Worker if test -f "$collect2name" && 6537*663afb9bSAndroid Build Coastguard Worker strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6538*663afb9bSAndroid Build Coastguard Worker then 6539*663afb9bSAndroid Build Coastguard Worker # We have reworked collect2 6540*663afb9bSAndroid Build Coastguard Worker : 6541*663afb9bSAndroid Build Coastguard Worker else 6542*663afb9bSAndroid Build Coastguard Worker # We have old collect2 6543*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=unsupported 6544*663afb9bSAndroid Build Coastguard Worker # It fails to find uninstalled libraries when the uninstalled 6545*663afb9bSAndroid Build Coastguard Worker # path is not listed in the libpath. Setting hardcode_minus_L 6546*663afb9bSAndroid Build Coastguard Worker # to unsupported forces relinking 6547*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 6548*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6549*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)= 6550*663afb9bSAndroid Build Coastguard Worker fi 6551*663afb9bSAndroid Build Coastguard Worker esac 6552*663afb9bSAndroid Build Coastguard Worker shared_flag='-shared' 6553*663afb9bSAndroid Build Coastguard Worker if test yes = "$aix_use_runtimelinking"; then 6554*663afb9bSAndroid Build Coastguard Worker shared_flag=$shared_flag' $wl-G' 6555*663afb9bSAndroid Build Coastguard Worker fi 6556*663afb9bSAndroid Build Coastguard Worker # Need to ensure runtime linking is disabled for the traditional 6557*663afb9bSAndroid Build Coastguard Worker # shared library, or the linker may eventually find shared libraries 6558*663afb9bSAndroid Build Coastguard Worker # /with/ Import File - we do not want to mix them. 6559*663afb9bSAndroid Build Coastguard Worker shared_flag_aix='-shared' 6560*663afb9bSAndroid Build Coastguard Worker shared_flag_svr4='-shared $wl-G' 6561*663afb9bSAndroid Build Coastguard Worker else 6562*663afb9bSAndroid Build Coastguard Worker # not using gcc 6563*663afb9bSAndroid Build Coastguard Worker if test ia64 = "$host_cpu"; then 6564*663afb9bSAndroid Build Coastguard Worker # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6565*663afb9bSAndroid Build Coastguard Worker # chokes on -Wl,-G. The following line is correct: 6566*663afb9bSAndroid Build Coastguard Worker shared_flag='-G' 6567*663afb9bSAndroid Build Coastguard Worker else 6568*663afb9bSAndroid Build Coastguard Worker if test yes = "$aix_use_runtimelinking"; then 6569*663afb9bSAndroid Build Coastguard Worker shared_flag='$wl-G' 6570*663afb9bSAndroid Build Coastguard Worker else 6571*663afb9bSAndroid Build Coastguard Worker shared_flag='$wl-bM:SRE' 6572*663afb9bSAndroid Build Coastguard Worker fi 6573*663afb9bSAndroid Build Coastguard Worker shared_flag_aix='$wl-bM:SRE' 6574*663afb9bSAndroid Build Coastguard Worker shared_flag_svr4='$wl-G' 6575*663afb9bSAndroid Build Coastguard Worker fi 6576*663afb9bSAndroid Build Coastguard Worker fi 6577*663afb9bSAndroid Build Coastguard Worker 6578*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6579*663afb9bSAndroid Build Coastguard Worker # It seems that -bexpall does not export symbols beginning with 6580*663afb9bSAndroid Build Coastguard Worker # underscore (_), so it is better to generate a list of symbols to 6581*663afb9bSAndroid Build Coastguard Worker # export. 6582*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(always_export_symbols, $1)=yes 6583*663afb9bSAndroid Build Coastguard Worker if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6584*663afb9bSAndroid Build Coastguard Worker # Warning - without using the other runtime loading flags (-brtl), 6585*663afb9bSAndroid Build Coastguard Worker # -berok will link without error, but may produce a broken library. 6586*663afb9bSAndroid Build Coastguard Worker # The "-G" linker flag allows undefined symbols. 6587*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6588*663afb9bSAndroid Build Coastguard Worker # Determine the default libpath from the value encoded in an empty 6589*663afb9bSAndroid Build Coastguard Worker # executable. 6590*663afb9bSAndroid Build Coastguard Worker _LT_SYS_MODULE_PATH_AIX([$1]) 6591*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6592*663afb9bSAndroid Build Coastguard Worker 6593*663afb9bSAndroid Build Coastguard Worker _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 6594*663afb9bSAndroid Build Coastguard Worker else 6595*663afb9bSAndroid Build Coastguard Worker if test ia64 = "$host_cpu"; then 6596*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6597*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6598*663afb9bSAndroid Build Coastguard Worker _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" 6599*663afb9bSAndroid Build Coastguard Worker else 6600*663afb9bSAndroid Build Coastguard Worker # Determine the default libpath from the value encoded in an 6601*663afb9bSAndroid Build Coastguard Worker # empty executable. 6602*663afb9bSAndroid Build Coastguard Worker _LT_SYS_MODULE_PATH_AIX([$1]) 6603*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6604*663afb9bSAndroid Build Coastguard Worker # Warning - without using the other run time loading flags, 6605*663afb9bSAndroid Build Coastguard Worker # -berok will link without error, but may produce a broken library. 6606*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6607*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6608*663afb9bSAndroid Build Coastguard Worker if test yes = "$with_gnu_ld"; then 6609*663afb9bSAndroid Build Coastguard Worker # We only use this code for GNU lds that support --whole-archive. 6610*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6611*663afb9bSAndroid Build Coastguard Worker else 6612*663afb9bSAndroid Build Coastguard Worker # Exported symbols can be pulled into shared objects from archives 6613*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6614*663afb9bSAndroid Build Coastguard Worker fi 6615*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6616*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6617*663afb9bSAndroid Build Coastguard Worker # -brtl affects multiple linker settings, -berok does not and is overridden later 6618*663afb9bSAndroid Build Coastguard Worker compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6619*663afb9bSAndroid Build Coastguard Worker if test svr4 != "$with_aix_soname"; then 6620*663afb9bSAndroid Build Coastguard Worker # This is similar to how AIX traditionally builds its shared 6621*663afb9bSAndroid Build Coastguard Worker # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6622*663afb9bSAndroid Build Coastguard Worker _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' 6623*663afb9bSAndroid Build Coastguard Worker fi 6624*663afb9bSAndroid Build Coastguard Worker if test aix != "$with_aix_soname"; then 6625*663afb9bSAndroid Build Coastguard Worker _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' 6626*663afb9bSAndroid Build Coastguard Worker else 6627*663afb9bSAndroid Build Coastguard Worker # used by -dlpreopen to get the symbols 6628*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6629*663afb9bSAndroid Build Coastguard Worker fi 6630*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6631*663afb9bSAndroid Build Coastguard Worker fi 6632*663afb9bSAndroid Build Coastguard Worker fi 6633*663afb9bSAndroid Build Coastguard Worker ;; 6634*663afb9bSAndroid Build Coastguard Worker 6635*663afb9bSAndroid Build Coastguard Worker beos*) 6636*663afb9bSAndroid Build Coastguard Worker if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6637*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6638*663afb9bSAndroid Build Coastguard Worker # Joseph Beckenbach <[email protected]> says some releases of gcc 6639*663afb9bSAndroid Build Coastguard Worker # support --undefined. This deserves some investigation. FIXME 6640*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6641*663afb9bSAndroid Build Coastguard Worker else 6642*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6643*663afb9bSAndroid Build Coastguard Worker fi 6644*663afb9bSAndroid Build Coastguard Worker ;; 6645*663afb9bSAndroid Build Coastguard Worker 6646*663afb9bSAndroid Build Coastguard Worker chorus*) 6647*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 6648*663afb9bSAndroid Build Coastguard Worker *) 6649*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 6650*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6651*663afb9bSAndroid Build Coastguard Worker ;; 6652*663afb9bSAndroid Build Coastguard Worker esac 6653*663afb9bSAndroid Build Coastguard Worker ;; 6654*663afb9bSAndroid Build Coastguard Worker 6655*663afb9bSAndroid Build Coastguard Worker cygwin* | mingw* | pw32* | cegcc*) 6656*663afb9bSAndroid Build Coastguard Worker case $GXX,$cc_basename in 6657*663afb9bSAndroid Build Coastguard Worker ,cl* | no,cl* | ,icl* | no,icl*) 6658*663afb9bSAndroid Build Coastguard Worker # Native MSVC or ICC 6659*663afb9bSAndroid Build Coastguard Worker # hardcode_libdir_flag_spec is actually meaningless, as there is 6660*663afb9bSAndroid Build Coastguard Worker # no search path for DLLs. 6661*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6662*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6663*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(always_export_symbols, $1)=yes 6664*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(file_list_spec, $1)='@' 6665*663afb9bSAndroid Build Coastguard Worker # Tell ltmain to make .lib files, not .a files. 6666*663afb9bSAndroid Build Coastguard Worker libext=lib 6667*663afb9bSAndroid Build Coastguard Worker # Tell ltmain to make .dll files, not .so files. 6668*663afb9bSAndroid Build Coastguard Worker shrext_cmds=.dll 6669*663afb9bSAndroid Build Coastguard Worker # FIXME: Setting linknames here is a bad hack. 6670*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6671*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6672*663afb9bSAndroid Build Coastguard Worker cp "$export_symbols" "$output_objdir/$soname.def"; 6673*663afb9bSAndroid Build Coastguard Worker echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6674*663afb9bSAndroid Build Coastguard Worker else 6675*663afb9bSAndroid Build Coastguard Worker $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6676*663afb9bSAndroid Build Coastguard Worker fi~ 6677*663afb9bSAndroid Build Coastguard Worker $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6678*663afb9bSAndroid Build Coastguard Worker linknames=' 6679*663afb9bSAndroid Build Coastguard Worker # The linker will not automatically build a static lib if we build a DLL. 6680*663afb9bSAndroid Build Coastguard Worker # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6681*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6682*663afb9bSAndroid Build Coastguard Worker # Don't use ranlib 6683*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6684*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6685*663afb9bSAndroid Build Coastguard Worker lt_tool_outputfile="@TOOL_OUTPUT@"~ 6686*663afb9bSAndroid Build Coastguard Worker case $lt_outputfile in 6687*663afb9bSAndroid Build Coastguard Worker *.exe|*.EXE) ;; 6688*663afb9bSAndroid Build Coastguard Worker *) 6689*663afb9bSAndroid Build Coastguard Worker lt_outputfile=$lt_outputfile.exe 6690*663afb9bSAndroid Build Coastguard Worker lt_tool_outputfile=$lt_tool_outputfile.exe 6691*663afb9bSAndroid Build Coastguard Worker ;; 6692*663afb9bSAndroid Build Coastguard Worker esac~ 6693*663afb9bSAndroid Build Coastguard Worker func_to_tool_file "$lt_outputfile"~ 6694*663afb9bSAndroid Build Coastguard Worker if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6695*663afb9bSAndroid Build Coastguard Worker $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6696*663afb9bSAndroid Build Coastguard Worker $RM "$lt_outputfile.manifest"; 6697*663afb9bSAndroid Build Coastguard Worker fi' 6698*663afb9bSAndroid Build Coastguard Worker ;; 6699*663afb9bSAndroid Build Coastguard Worker *) 6700*663afb9bSAndroid Build Coastguard Worker # g++ 6701*663afb9bSAndroid Build Coastguard Worker # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6702*663afb9bSAndroid Build Coastguard Worker # as there is no search path for DLLs. 6703*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6704*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6705*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6706*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(always_export_symbols, $1)=no 6707*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6708*663afb9bSAndroid Build Coastguard Worker 6709*663afb9bSAndroid Build Coastguard Worker if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6710*663afb9bSAndroid Build Coastguard Worker _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' 6711*663afb9bSAndroid Build Coastguard Worker # If the export-symbols file already is a .def file, use it as 6712*663afb9bSAndroid Build Coastguard Worker # is; otherwise, prepend EXPORTS... 6713*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6714*663afb9bSAndroid Build Coastguard Worker cp $export_symbols $output_objdir/$soname.def; 6715*663afb9bSAndroid Build Coastguard Worker else 6716*663afb9bSAndroid Build Coastguard Worker echo EXPORTS > $output_objdir/$soname.def; 6717*663afb9bSAndroid Build Coastguard Worker cat $export_symbols >> $output_objdir/$soname.def; 6718*663afb9bSAndroid Build Coastguard Worker fi~ 6719*663afb9bSAndroid Build Coastguard Worker $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' 6720*663afb9bSAndroid Build Coastguard Worker else 6721*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6722*663afb9bSAndroid Build Coastguard Worker fi 6723*663afb9bSAndroid Build Coastguard Worker ;; 6724*663afb9bSAndroid Build Coastguard Worker esac 6725*663afb9bSAndroid Build Coastguard Worker ;; 6726*663afb9bSAndroid Build Coastguard Worker darwin* | rhapsody*) 6727*663afb9bSAndroid Build Coastguard Worker _LT_DARWIN_LINKER_FEATURES($1) 6728*663afb9bSAndroid Build Coastguard Worker ;; 6729*663afb9bSAndroid Build Coastguard Worker 6730*663afb9bSAndroid Build Coastguard Worker os2*) 6731*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6732*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes 6733*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6734*663afb9bSAndroid Build Coastguard Worker shrext_cmds=.dll 6735*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6736*663afb9bSAndroid Build Coastguard Worker $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6737*663afb9bSAndroid Build Coastguard Worker $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6738*663afb9bSAndroid Build Coastguard Worker $ECHO EXPORTS >> $output_objdir/$libname.def~ 6739*663afb9bSAndroid Build Coastguard Worker emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6740*663afb9bSAndroid Build Coastguard Worker $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6741*663afb9bSAndroid Build Coastguard Worker emximp -o $lib $output_objdir/$libname.def' 6742*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6743*663afb9bSAndroid Build Coastguard Worker $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6744*663afb9bSAndroid Build Coastguard Worker $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6745*663afb9bSAndroid Build Coastguard Worker $ECHO EXPORTS >> $output_objdir/$libname.def~ 6746*663afb9bSAndroid Build Coastguard Worker prefix_cmds="$SED"~ 6747*663afb9bSAndroid Build Coastguard Worker if test EXPORTS = "`$SED 1q $export_symbols`"; then 6748*663afb9bSAndroid Build Coastguard Worker prefix_cmds="$prefix_cmds -e 1d"; 6749*663afb9bSAndroid Build Coastguard Worker fi~ 6750*663afb9bSAndroid Build Coastguard Worker prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6751*663afb9bSAndroid Build Coastguard Worker cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6752*663afb9bSAndroid Build Coastguard Worker $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6753*663afb9bSAndroid Build Coastguard Worker emximp -o $lib $output_objdir/$libname.def' 6754*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6755*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6756*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(file_list_spec, $1)='@' 6757*663afb9bSAndroid Build Coastguard Worker ;; 6758*663afb9bSAndroid Build Coastguard Worker 6759*663afb9bSAndroid Build Coastguard Worker dgux*) 6760*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 6761*663afb9bSAndroid Build Coastguard Worker ec++*) 6762*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 6763*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6764*663afb9bSAndroid Build Coastguard Worker ;; 6765*663afb9bSAndroid Build Coastguard Worker ghcx*) 6766*663afb9bSAndroid Build Coastguard Worker # Green Hills C++ Compiler 6767*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 6768*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6769*663afb9bSAndroid Build Coastguard Worker ;; 6770*663afb9bSAndroid Build Coastguard Worker *) 6771*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 6772*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6773*663afb9bSAndroid Build Coastguard Worker ;; 6774*663afb9bSAndroid Build Coastguard Worker esac 6775*663afb9bSAndroid Build Coastguard Worker ;; 6776*663afb9bSAndroid Build Coastguard Worker 6777*663afb9bSAndroid Build Coastguard Worker freebsd2.*) 6778*663afb9bSAndroid Build Coastguard Worker # C++ shared libraries reported to be fairly broken before 6779*663afb9bSAndroid Build Coastguard Worker # switch to ELF 6780*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6781*663afb9bSAndroid Build Coastguard Worker ;; 6782*663afb9bSAndroid Build Coastguard Worker 6783*663afb9bSAndroid Build Coastguard Worker freebsd-elf*) 6784*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6785*663afb9bSAndroid Build Coastguard Worker ;; 6786*663afb9bSAndroid Build Coastguard Worker 6787*663afb9bSAndroid Build Coastguard Worker freebsd* | dragonfly*) 6788*663afb9bSAndroid Build Coastguard Worker # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6789*663afb9bSAndroid Build Coastguard Worker # conventions 6790*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=yes 6791*663afb9bSAndroid Build Coastguard Worker ;; 6792*663afb9bSAndroid Build Coastguard Worker 6793*663afb9bSAndroid Build Coastguard Worker haiku*) 6794*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6795*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(link_all_deplibs, $1)=yes 6796*663afb9bSAndroid Build Coastguard Worker ;; 6797*663afb9bSAndroid Build Coastguard Worker 6798*663afb9bSAndroid Build Coastguard Worker hpux9*) 6799*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6800*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6801*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6802*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 6803*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6804*663afb9bSAndroid Build Coastguard Worker # but as the default 6805*663afb9bSAndroid Build Coastguard Worker # location of the library. 6806*663afb9bSAndroid Build Coastguard Worker 6807*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 6808*663afb9bSAndroid Build Coastguard Worker CC*) 6809*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 6810*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6811*663afb9bSAndroid Build Coastguard Worker ;; 6812*663afb9bSAndroid Build Coastguard Worker aCC*) 6813*663afb9bSAndroid Build Coastguard Worker _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' 6814*663afb9bSAndroid Build Coastguard Worker # Commands to make compiler produce verbose output that lists 6815*663afb9bSAndroid Build Coastguard Worker # what "hidden" libraries, object files and flags are used when 6816*663afb9bSAndroid Build Coastguard Worker # linking a shared library. 6817*663afb9bSAndroid Build Coastguard Worker # 6818*663afb9bSAndroid Build Coastguard Worker # There doesn't appear to be a way to prevent this compiler from 6819*663afb9bSAndroid Build Coastguard Worker # explicitly linking system object files so we need to strip them 6820*663afb9bSAndroid Build Coastguard Worker # from the output so that they don't get included in the library 6821*663afb9bSAndroid Build Coastguard Worker # dependencies. 6822*663afb9bSAndroid Build Coastguard Worker 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"' 6823*663afb9bSAndroid Build Coastguard Worker ;; 6824*663afb9bSAndroid Build Coastguard Worker *) 6825*663afb9bSAndroid Build Coastguard Worker if test yes = "$GXX"; then 6826*663afb9bSAndroid Build Coastguard Worker _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' 6827*663afb9bSAndroid Build Coastguard Worker else 6828*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 6829*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6830*663afb9bSAndroid Build Coastguard Worker fi 6831*663afb9bSAndroid Build Coastguard Worker ;; 6832*663afb9bSAndroid Build Coastguard Worker esac 6833*663afb9bSAndroid Build Coastguard Worker ;; 6834*663afb9bSAndroid Build Coastguard Worker 6835*663afb9bSAndroid Build Coastguard Worker hpux10*|hpux11*) 6836*663afb9bSAndroid Build Coastguard Worker if test no = "$with_gnu_ld"; then 6837*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6838*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6839*663afb9bSAndroid Build Coastguard Worker 6840*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 6841*663afb9bSAndroid Build Coastguard Worker hppa*64*|ia64*) 6842*663afb9bSAndroid Build Coastguard Worker ;; 6843*663afb9bSAndroid Build Coastguard Worker *) 6844*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6845*663afb9bSAndroid Build Coastguard Worker ;; 6846*663afb9bSAndroid Build Coastguard Worker esac 6847*663afb9bSAndroid Build Coastguard Worker fi 6848*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 6849*663afb9bSAndroid Build Coastguard Worker hppa*64*|ia64*) 6850*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=no 6851*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6852*663afb9bSAndroid Build Coastguard Worker ;; 6853*663afb9bSAndroid Build Coastguard Worker *) 6854*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 6855*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6856*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6857*663afb9bSAndroid Build Coastguard Worker # but as the default 6858*663afb9bSAndroid Build Coastguard Worker # location of the library. 6859*663afb9bSAndroid Build Coastguard Worker ;; 6860*663afb9bSAndroid Build Coastguard Worker esac 6861*663afb9bSAndroid Build Coastguard Worker 6862*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 6863*663afb9bSAndroid Build Coastguard Worker CC*) 6864*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 6865*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6866*663afb9bSAndroid Build Coastguard Worker ;; 6867*663afb9bSAndroid Build Coastguard Worker aCC*) 6868*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 6869*663afb9bSAndroid Build Coastguard Worker hppa*64*) 6870*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6871*663afb9bSAndroid Build Coastguard Worker ;; 6872*663afb9bSAndroid Build Coastguard Worker ia64*) 6873*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6874*663afb9bSAndroid Build Coastguard Worker ;; 6875*663afb9bSAndroid Build Coastguard Worker *) 6876*663afb9bSAndroid Build Coastguard Worker _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' 6877*663afb9bSAndroid Build Coastguard Worker ;; 6878*663afb9bSAndroid Build Coastguard Worker esac 6879*663afb9bSAndroid Build Coastguard Worker # Commands to make compiler produce verbose output that lists 6880*663afb9bSAndroid Build Coastguard Worker # what "hidden" libraries, object files and flags are used when 6881*663afb9bSAndroid Build Coastguard Worker # linking a shared library. 6882*663afb9bSAndroid Build Coastguard Worker # 6883*663afb9bSAndroid Build Coastguard Worker # There doesn't appear to be a way to prevent this compiler from 6884*663afb9bSAndroid Build Coastguard Worker # explicitly linking system object files so we need to strip them 6885*663afb9bSAndroid Build Coastguard Worker # from the output so that they don't get included in the library 6886*663afb9bSAndroid Build Coastguard Worker # dependencies. 6887*663afb9bSAndroid Build Coastguard Worker 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"' 6888*663afb9bSAndroid Build Coastguard Worker ;; 6889*663afb9bSAndroid Build Coastguard Worker *) 6890*663afb9bSAndroid Build Coastguard Worker if test yes = "$GXX"; then 6891*663afb9bSAndroid Build Coastguard Worker if test no = "$with_gnu_ld"; then 6892*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 6893*663afb9bSAndroid Build Coastguard Worker hppa*64*) 6894*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6895*663afb9bSAndroid Build Coastguard Worker ;; 6896*663afb9bSAndroid Build Coastguard Worker ia64*) 6897*663afb9bSAndroid Build Coastguard Worker _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' 6898*663afb9bSAndroid Build Coastguard Worker ;; 6899*663afb9bSAndroid Build Coastguard Worker *) 6900*663afb9bSAndroid Build Coastguard Worker _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' 6901*663afb9bSAndroid Build Coastguard Worker ;; 6902*663afb9bSAndroid Build Coastguard Worker esac 6903*663afb9bSAndroid Build Coastguard Worker fi 6904*663afb9bSAndroid Build Coastguard Worker else 6905*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 6906*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 6907*663afb9bSAndroid Build Coastguard Worker fi 6908*663afb9bSAndroid Build Coastguard Worker ;; 6909*663afb9bSAndroid Build Coastguard Worker esac 6910*663afb9bSAndroid Build Coastguard Worker ;; 6911*663afb9bSAndroid Build Coastguard Worker 6912*663afb9bSAndroid Build Coastguard Worker interix[[3-9]]*) 6913*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=no 6914*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6915*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6916*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6917*663afb9bSAndroid Build Coastguard Worker # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6918*663afb9bSAndroid Build Coastguard Worker # Instead, shared libraries are loaded at an image base (0x10000000 by 6919*663afb9bSAndroid Build Coastguard Worker # default) and relocated if they conflict, which is a slow very memory 6920*663afb9bSAndroid Build Coastguard Worker # consuming and fragmenting process. To avoid this, we pick a random, 6921*663afb9bSAndroid Build Coastguard Worker # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6922*663afb9bSAndroid Build Coastguard Worker # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6923*663afb9bSAndroid Build Coastguard Worker _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' 6924*663afb9bSAndroid Build Coastguard Worker _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' 6925*663afb9bSAndroid Build Coastguard Worker ;; 6926*663afb9bSAndroid Build Coastguard Worker irix5* | irix6*) 6927*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 6928*663afb9bSAndroid Build Coastguard Worker CC*) 6929*663afb9bSAndroid Build Coastguard Worker # SGI C++ 6930*663afb9bSAndroid Build Coastguard Worker _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' 6931*663afb9bSAndroid Build Coastguard Worker 6932*663afb9bSAndroid Build Coastguard Worker # Archives containing C++ object files must be created using 6933*663afb9bSAndroid Build Coastguard Worker # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6934*663afb9bSAndroid Build Coastguard Worker # necessary to make sure instantiated templates are included 6935*663afb9bSAndroid Build Coastguard Worker # in the archive. 6936*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6937*663afb9bSAndroid Build Coastguard Worker ;; 6938*663afb9bSAndroid Build Coastguard Worker *) 6939*663afb9bSAndroid Build Coastguard Worker if test yes = "$GXX"; then 6940*663afb9bSAndroid Build Coastguard Worker if test no = "$with_gnu_ld"; then 6941*663afb9bSAndroid Build Coastguard Worker _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' 6942*663afb9bSAndroid Build Coastguard Worker else 6943*663afb9bSAndroid Build Coastguard Worker _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' 6944*663afb9bSAndroid Build Coastguard Worker fi 6945*663afb9bSAndroid Build Coastguard Worker fi 6946*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(link_all_deplibs, $1)=yes 6947*663afb9bSAndroid Build Coastguard Worker ;; 6948*663afb9bSAndroid Build Coastguard Worker esac 6949*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6950*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6951*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(inherit_rpath, $1)=yes 6952*663afb9bSAndroid Build Coastguard Worker ;; 6953*663afb9bSAndroid Build Coastguard Worker 6954*663afb9bSAndroid Build Coastguard Worker linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6955*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 6956*663afb9bSAndroid Build Coastguard Worker KCC*) 6957*663afb9bSAndroid Build Coastguard Worker # Kuck and Associates, Inc. (KAI) C++ Compiler 6958*663afb9bSAndroid Build Coastguard Worker 6959*663afb9bSAndroid Build Coastguard Worker # KCC will only create a shared library if the output file 6960*663afb9bSAndroid Build Coastguard Worker # ends with ".so" (or ".sl" for HP-UX), so rename the library 6961*663afb9bSAndroid Build Coastguard Worker # to its proper name (with version) after linking. 6962*663afb9bSAndroid Build Coastguard Worker _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' 6963*663afb9bSAndroid Build Coastguard Worker _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' 6964*663afb9bSAndroid Build Coastguard Worker # Commands to make compiler produce verbose output that lists 6965*663afb9bSAndroid Build Coastguard Worker # what "hidden" libraries, object files and flags are used when 6966*663afb9bSAndroid Build Coastguard Worker # linking a shared library. 6967*663afb9bSAndroid Build Coastguard Worker # 6968*663afb9bSAndroid Build Coastguard Worker # There doesn't appear to be a way to prevent this compiler from 6969*663afb9bSAndroid Build Coastguard Worker # explicitly linking system object files so we need to strip them 6970*663afb9bSAndroid Build Coastguard Worker # from the output so that they don't get included in the library 6971*663afb9bSAndroid Build Coastguard Worker # dependencies. 6972*663afb9bSAndroid Build Coastguard Worker 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"' 6973*663afb9bSAndroid Build Coastguard Worker 6974*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6975*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6976*663afb9bSAndroid Build Coastguard Worker 6977*663afb9bSAndroid Build Coastguard Worker # Archives containing C++ object files must be created using 6978*663afb9bSAndroid Build Coastguard Worker # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6979*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6980*663afb9bSAndroid Build Coastguard Worker ;; 6981*663afb9bSAndroid Build Coastguard Worker icpc* | ecpc* ) 6982*663afb9bSAndroid Build Coastguard Worker # Intel C++ 6983*663afb9bSAndroid Build Coastguard Worker with_gnu_ld=yes 6984*663afb9bSAndroid Build Coastguard Worker # version 8.0 and above of icpc choke on multiply defined symbols 6985*663afb9bSAndroid Build Coastguard Worker # if we add $predep_objects and $postdep_objects, however 7.1 and 6986*663afb9bSAndroid Build Coastguard Worker # earlier do not add the objects themselves. 6987*663afb9bSAndroid Build Coastguard Worker case `$CC -V 2>&1` in 6988*663afb9bSAndroid Build Coastguard Worker *"Version 7."*) 6989*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6990*663afb9bSAndroid Build Coastguard Worker _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' 6991*663afb9bSAndroid Build Coastguard Worker ;; 6992*663afb9bSAndroid Build Coastguard Worker *) # Version 8.0 or newer 6993*663afb9bSAndroid Build Coastguard Worker tmp_idyn= 6994*663afb9bSAndroid Build Coastguard Worker case $host_cpu in 6995*663afb9bSAndroid Build Coastguard Worker ia64*) tmp_idyn=' -i_dynamic';; 6996*663afb9bSAndroid Build Coastguard Worker esac 6997*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6998*663afb9bSAndroid Build Coastguard Worker _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' 6999*663afb9bSAndroid Build Coastguard Worker ;; 7000*663afb9bSAndroid Build Coastguard Worker esac 7001*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7002*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7003*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7004*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7005*663afb9bSAndroid Build Coastguard Worker ;; 7006*663afb9bSAndroid Build Coastguard Worker pgCC* | pgcpp*) 7007*663afb9bSAndroid Build Coastguard Worker # Portland Group C++ compiler 7008*663afb9bSAndroid Build Coastguard Worker case `$CC -V` in 7009*663afb9bSAndroid Build Coastguard Worker *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7010*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7011*663afb9bSAndroid Build Coastguard Worker rm -rf $tpldir~ 7012*663afb9bSAndroid Build Coastguard Worker $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7013*663afb9bSAndroid Build Coastguard Worker compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7014*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7015*663afb9bSAndroid Build Coastguard Worker rm -rf $tpldir~ 7016*663afb9bSAndroid Build Coastguard Worker $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7017*663afb9bSAndroid Build Coastguard Worker $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7018*663afb9bSAndroid Build Coastguard Worker $RANLIB $oldlib' 7019*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7020*663afb9bSAndroid Build Coastguard Worker rm -rf $tpldir~ 7021*663afb9bSAndroid Build Coastguard Worker $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7022*663afb9bSAndroid Build Coastguard Worker $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7023*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7024*663afb9bSAndroid Build Coastguard Worker rm -rf $tpldir~ 7025*663afb9bSAndroid Build Coastguard Worker $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7026*663afb9bSAndroid Build Coastguard Worker $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' 7027*663afb9bSAndroid Build Coastguard Worker ;; 7028*663afb9bSAndroid Build Coastguard Worker *) # Version 6 and above use weak symbols 7029*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7030*663afb9bSAndroid Build Coastguard Worker _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' 7031*663afb9bSAndroid Build Coastguard Worker ;; 7032*663afb9bSAndroid Build Coastguard Worker esac 7033*663afb9bSAndroid Build Coastguard Worker 7034*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7035*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7036*663afb9bSAndroid Build Coastguard Worker _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' 7037*663afb9bSAndroid Build Coastguard Worker ;; 7038*663afb9bSAndroid Build Coastguard Worker cxx*) 7039*663afb9bSAndroid Build Coastguard Worker # Compaq C++ 7040*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7041*663afb9bSAndroid Build Coastguard Worker _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' 7042*663afb9bSAndroid Build Coastguard Worker 7043*663afb9bSAndroid Build Coastguard Worker runpath_var=LD_RUN_PATH 7044*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7045*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7046*663afb9bSAndroid Build Coastguard Worker 7047*663afb9bSAndroid Build Coastguard Worker # Commands to make compiler produce verbose output that lists 7048*663afb9bSAndroid Build Coastguard Worker # what "hidden" libraries, object files and flags are used when 7049*663afb9bSAndroid Build Coastguard Worker # linking a shared library. 7050*663afb9bSAndroid Build Coastguard Worker # 7051*663afb9bSAndroid Build Coastguard Worker # There doesn't appear to be a way to prevent this compiler from 7052*663afb9bSAndroid Build Coastguard Worker # explicitly linking system object files so we need to strip them 7053*663afb9bSAndroid Build Coastguard Worker # from the output so that they don't get included in the library 7054*663afb9bSAndroid Build Coastguard Worker # dependencies. 7055*663afb9bSAndroid Build Coastguard Worker 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' 7056*663afb9bSAndroid Build Coastguard Worker ;; 7057*663afb9bSAndroid Build Coastguard Worker xl* | mpixl* | bgxl*) 7058*663afb9bSAndroid Build Coastguard Worker # IBM XL 8.0 on PPC, with GNU ld 7059*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7060*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7061*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7062*663afb9bSAndroid Build Coastguard Worker if test yes = "$supports_anon_versioning"; then 7063*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7064*663afb9bSAndroid Build Coastguard Worker cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7065*663afb9bSAndroid Build Coastguard Worker echo "local: *; };" >> $output_objdir/$libname.ver~ 7066*663afb9bSAndroid Build Coastguard Worker $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7067*663afb9bSAndroid Build Coastguard Worker fi 7068*663afb9bSAndroid Build Coastguard Worker ;; 7069*663afb9bSAndroid Build Coastguard Worker *) 7070*663afb9bSAndroid Build Coastguard Worker case `$CC -V 2>&1 | sed 5q` in 7071*663afb9bSAndroid Build Coastguard Worker *Sun\ C*) 7072*663afb9bSAndroid Build Coastguard Worker # Sun C++ 5.9 7073*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7074*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7075*663afb9bSAndroid Build Coastguard Worker _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' 7076*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7077*663afb9bSAndroid Build Coastguard Worker _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' 7078*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(compiler_needs_object, $1)=yes 7079*663afb9bSAndroid Build Coastguard Worker 7080*663afb9bSAndroid Build Coastguard Worker # Not sure whether something based on 7081*663afb9bSAndroid Build Coastguard Worker # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7082*663afb9bSAndroid Build Coastguard Worker # would be better. 7083*663afb9bSAndroid Build Coastguard Worker output_verbose_link_cmd='func_echo_all' 7084*663afb9bSAndroid Build Coastguard Worker 7085*663afb9bSAndroid Build Coastguard Worker # Archives containing C++ object files must be created using 7086*663afb9bSAndroid Build Coastguard Worker # "CC -xar", where "CC" is the Sun C++ compiler. This is 7087*663afb9bSAndroid Build Coastguard Worker # necessary to make sure instantiated templates are included 7088*663afb9bSAndroid Build Coastguard Worker # in the archive. 7089*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7090*663afb9bSAndroid Build Coastguard Worker ;; 7091*663afb9bSAndroid Build Coastguard Worker esac 7092*663afb9bSAndroid Build Coastguard Worker ;; 7093*663afb9bSAndroid Build Coastguard Worker esac 7094*663afb9bSAndroid Build Coastguard Worker ;; 7095*663afb9bSAndroid Build Coastguard Worker 7096*663afb9bSAndroid Build Coastguard Worker lynxos*) 7097*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7098*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7099*663afb9bSAndroid Build Coastguard Worker ;; 7100*663afb9bSAndroid Build Coastguard Worker 7101*663afb9bSAndroid Build Coastguard Worker m88k*) 7102*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7103*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7104*663afb9bSAndroid Build Coastguard Worker ;; 7105*663afb9bSAndroid Build Coastguard Worker 7106*663afb9bSAndroid Build Coastguard Worker mvs*) 7107*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 7108*663afb9bSAndroid Build Coastguard Worker cxx*) 7109*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7110*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7111*663afb9bSAndroid Build Coastguard Worker ;; 7112*663afb9bSAndroid Build Coastguard Worker *) 7113*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7114*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7115*663afb9bSAndroid Build Coastguard Worker ;; 7116*663afb9bSAndroid Build Coastguard Worker esac 7117*663afb9bSAndroid Build Coastguard Worker ;; 7118*663afb9bSAndroid Build Coastguard Worker 7119*663afb9bSAndroid Build Coastguard Worker netbsd*) 7120*663afb9bSAndroid Build Coastguard Worker if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7121*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7122*663afb9bSAndroid Build Coastguard Worker wlarc= 7123*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7124*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 7125*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7126*663afb9bSAndroid Build Coastguard Worker fi 7127*663afb9bSAndroid Build Coastguard Worker # Workaround some broken pre-1.5 toolchains 7128*663afb9bSAndroid Build Coastguard Worker output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7129*663afb9bSAndroid Build Coastguard Worker ;; 7130*663afb9bSAndroid Build Coastguard Worker 7131*663afb9bSAndroid Build Coastguard Worker *nto* | *qnx*) 7132*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=yes 7133*663afb9bSAndroid Build Coastguard Worker ;; 7134*663afb9bSAndroid Build Coastguard Worker 7135*663afb9bSAndroid Build Coastguard Worker openbsd* | bitrig*) 7136*663afb9bSAndroid Build Coastguard Worker if test -f /usr/libexec/ld.so; then 7137*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct, $1)=yes 7138*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7139*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7140*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7141*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7142*663afb9bSAndroid Build Coastguard Worker if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7143*663afb9bSAndroid Build Coastguard Worker _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' 7144*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7145*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7146*663afb9bSAndroid Build Coastguard Worker fi 7147*663afb9bSAndroid Build Coastguard Worker output_verbose_link_cmd=func_echo_all 7148*663afb9bSAndroid Build Coastguard Worker else 7149*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7150*663afb9bSAndroid Build Coastguard Worker fi 7151*663afb9bSAndroid Build Coastguard Worker ;; 7152*663afb9bSAndroid Build Coastguard Worker 7153*663afb9bSAndroid Build Coastguard Worker osf3* | osf4* | osf5*) 7154*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 7155*663afb9bSAndroid Build Coastguard Worker KCC*) 7156*663afb9bSAndroid Build Coastguard Worker # Kuck and Associates, Inc. (KAI) C++ Compiler 7157*663afb9bSAndroid Build Coastguard Worker 7158*663afb9bSAndroid Build Coastguard Worker # KCC will only create a shared library if the output file 7159*663afb9bSAndroid Build Coastguard Worker # ends with ".so" (or ".sl" for HP-UX), so rename the library 7160*663afb9bSAndroid Build Coastguard Worker # to its proper name (with version) after linking. 7161*663afb9bSAndroid Build Coastguard Worker _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' 7162*663afb9bSAndroid Build Coastguard Worker 7163*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7164*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7165*663afb9bSAndroid Build Coastguard Worker 7166*663afb9bSAndroid Build Coastguard Worker # Archives containing C++ object files must be created using 7167*663afb9bSAndroid Build Coastguard Worker # the KAI C++ compiler. 7168*663afb9bSAndroid Build Coastguard Worker case $host in 7169*663afb9bSAndroid Build Coastguard Worker osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7170*663afb9bSAndroid Build Coastguard Worker *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7171*663afb9bSAndroid Build Coastguard Worker esac 7172*663afb9bSAndroid Build Coastguard Worker ;; 7173*663afb9bSAndroid Build Coastguard Worker RCC*) 7174*663afb9bSAndroid Build Coastguard Worker # Rational C++ 2.4.1 7175*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7176*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7177*663afb9bSAndroid Build Coastguard Worker ;; 7178*663afb9bSAndroid Build Coastguard Worker cxx*) 7179*663afb9bSAndroid Build Coastguard Worker case $host in 7180*663afb9bSAndroid Build Coastguard Worker osf3*) 7181*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7182*663afb9bSAndroid Build Coastguard Worker _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' 7183*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7184*663afb9bSAndroid Build Coastguard Worker ;; 7185*663afb9bSAndroid Build Coastguard Worker *) 7186*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7187*663afb9bSAndroid Build Coastguard Worker _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' 7188*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7189*663afb9bSAndroid Build Coastguard Worker echo "-hidden">> $lib.exp~ 7190*663afb9bSAndroid Build Coastguard Worker $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~ 7191*663afb9bSAndroid Build Coastguard Worker $RM $lib.exp' 7192*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7193*663afb9bSAndroid Build Coastguard Worker ;; 7194*663afb9bSAndroid Build Coastguard Worker esac 7195*663afb9bSAndroid Build Coastguard Worker 7196*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7197*663afb9bSAndroid Build Coastguard Worker 7198*663afb9bSAndroid Build Coastguard Worker # Commands to make compiler produce verbose output that lists 7199*663afb9bSAndroid Build Coastguard Worker # what "hidden" libraries, object files and flags are used when 7200*663afb9bSAndroid Build Coastguard Worker # linking a shared library. 7201*663afb9bSAndroid Build Coastguard Worker # 7202*663afb9bSAndroid Build Coastguard Worker # There doesn't appear to be a way to prevent this compiler from 7203*663afb9bSAndroid Build Coastguard Worker # explicitly linking system object files so we need to strip them 7204*663afb9bSAndroid Build Coastguard Worker # from the output so that they don't get included in the library 7205*663afb9bSAndroid Build Coastguard Worker # dependencies. 7206*663afb9bSAndroid Build Coastguard Worker 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"' 7207*663afb9bSAndroid Build Coastguard Worker ;; 7208*663afb9bSAndroid Build Coastguard Worker *) 7209*663afb9bSAndroid Build Coastguard Worker if test yes,no = "$GXX,$with_gnu_ld"; then 7210*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7211*663afb9bSAndroid Build Coastguard Worker case $host in 7212*663afb9bSAndroid Build Coastguard Worker osf3*) 7213*663afb9bSAndroid Build Coastguard Worker _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' 7214*663afb9bSAndroid Build Coastguard Worker ;; 7215*663afb9bSAndroid Build Coastguard Worker *) 7216*663afb9bSAndroid Build Coastguard Worker _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' 7217*663afb9bSAndroid Build Coastguard Worker ;; 7218*663afb9bSAndroid Build Coastguard Worker esac 7219*663afb9bSAndroid Build Coastguard Worker 7220*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7221*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7222*663afb9bSAndroid Build Coastguard Worker 7223*663afb9bSAndroid Build Coastguard Worker # Commands to make compiler produce verbose output that lists 7224*663afb9bSAndroid Build Coastguard Worker # what "hidden" libraries, object files and flags are used when 7225*663afb9bSAndroid Build Coastguard Worker # linking a shared library. 7226*663afb9bSAndroid Build Coastguard Worker output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7227*663afb9bSAndroid Build Coastguard Worker 7228*663afb9bSAndroid Build Coastguard Worker else 7229*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7230*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7231*663afb9bSAndroid Build Coastguard Worker fi 7232*663afb9bSAndroid Build Coastguard Worker ;; 7233*663afb9bSAndroid Build Coastguard Worker esac 7234*663afb9bSAndroid Build Coastguard Worker ;; 7235*663afb9bSAndroid Build Coastguard Worker 7236*663afb9bSAndroid Build Coastguard Worker psos*) 7237*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7238*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7239*663afb9bSAndroid Build Coastguard Worker ;; 7240*663afb9bSAndroid Build Coastguard Worker 7241*663afb9bSAndroid Build Coastguard Worker sunos4*) 7242*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 7243*663afb9bSAndroid Build Coastguard Worker CC*) 7244*663afb9bSAndroid Build Coastguard Worker # Sun C++ 4.x 7245*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7246*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7247*663afb9bSAndroid Build Coastguard Worker ;; 7248*663afb9bSAndroid Build Coastguard Worker lcc*) 7249*663afb9bSAndroid Build Coastguard Worker # Lucid 7250*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7251*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7252*663afb9bSAndroid Build Coastguard Worker ;; 7253*663afb9bSAndroid Build Coastguard Worker *) 7254*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7255*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7256*663afb9bSAndroid Build Coastguard Worker ;; 7257*663afb9bSAndroid Build Coastguard Worker esac 7258*663afb9bSAndroid Build Coastguard Worker ;; 7259*663afb9bSAndroid Build Coastguard Worker 7260*663afb9bSAndroid Build Coastguard Worker solaris*) 7261*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 7262*663afb9bSAndroid Build Coastguard Worker CC* | sunCC*) 7263*663afb9bSAndroid Build Coastguard Worker # Sun C++ 4.2, 5.x and Centerline C++ 7264*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7265*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7266*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7267*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7268*663afb9bSAndroid Build Coastguard Worker $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' 7269*663afb9bSAndroid Build Coastguard Worker 7270*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7271*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7272*663afb9bSAndroid Build Coastguard Worker case $host_os in 7273*663afb9bSAndroid Build Coastguard Worker solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7274*663afb9bSAndroid Build Coastguard Worker *) 7275*663afb9bSAndroid Build Coastguard Worker # The compiler driver will combine and reorder linker options, 7276*663afb9bSAndroid Build Coastguard Worker # but understands '-z linker_flag'. 7277*663afb9bSAndroid Build Coastguard Worker # Supported since Solaris 2.6 (maybe 2.5.1?) 7278*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7279*663afb9bSAndroid Build Coastguard Worker ;; 7280*663afb9bSAndroid Build Coastguard Worker esac 7281*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(link_all_deplibs, $1)=yes 7282*663afb9bSAndroid Build Coastguard Worker 7283*663afb9bSAndroid Build Coastguard Worker output_verbose_link_cmd='func_echo_all' 7284*663afb9bSAndroid Build Coastguard Worker 7285*663afb9bSAndroid Build Coastguard Worker # Archives containing C++ object files must be created using 7286*663afb9bSAndroid Build Coastguard Worker # "CC -xar", where "CC" is the Sun C++ compiler. This is 7287*663afb9bSAndroid Build Coastguard Worker # necessary to make sure instantiated templates are included 7288*663afb9bSAndroid Build Coastguard Worker # in the archive. 7289*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7290*663afb9bSAndroid Build Coastguard Worker ;; 7291*663afb9bSAndroid Build Coastguard Worker gcx*) 7292*663afb9bSAndroid Build Coastguard Worker # Green Hills C++ Compiler 7293*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7294*663afb9bSAndroid Build Coastguard Worker 7295*663afb9bSAndroid Build Coastguard Worker # The C++ compiler must be used to create the archive. 7296*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7297*663afb9bSAndroid Build Coastguard Worker ;; 7298*663afb9bSAndroid Build Coastguard Worker *) 7299*663afb9bSAndroid Build Coastguard Worker # GNU C++ compiler with Solaris linker 7300*663afb9bSAndroid Build Coastguard Worker if test yes,no = "$GXX,$with_gnu_ld"; then 7301*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7302*663afb9bSAndroid Build Coastguard Worker if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7303*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7304*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7305*663afb9bSAndroid Build Coastguard Worker $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' 7306*663afb9bSAndroid Build Coastguard Worker 7307*663afb9bSAndroid Build Coastguard Worker # Commands to make compiler produce verbose output that lists 7308*663afb9bSAndroid Build Coastguard Worker # what "hidden" libraries, object files and flags are used when 7309*663afb9bSAndroid Build Coastguard Worker # linking a shared library. 7310*663afb9bSAndroid Build Coastguard Worker output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7311*663afb9bSAndroid Build Coastguard Worker else 7312*663afb9bSAndroid Build Coastguard Worker # g++ 2.7 appears to require '-G' NOT '-shared' on this 7313*663afb9bSAndroid Build Coastguard Worker # platform. 7314*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7315*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7316*663afb9bSAndroid Build Coastguard Worker $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' 7317*663afb9bSAndroid Build Coastguard Worker 7318*663afb9bSAndroid Build Coastguard Worker # Commands to make compiler produce verbose output that lists 7319*663afb9bSAndroid Build Coastguard Worker # what "hidden" libraries, object files and flags are used when 7320*663afb9bSAndroid Build Coastguard Worker # linking a shared library. 7321*663afb9bSAndroid Build Coastguard Worker output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7322*663afb9bSAndroid Build Coastguard Worker fi 7323*663afb9bSAndroid Build Coastguard Worker 7324*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7325*663afb9bSAndroid Build Coastguard Worker case $host_os in 7326*663afb9bSAndroid Build Coastguard Worker solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7327*663afb9bSAndroid Build Coastguard Worker *) 7328*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7329*663afb9bSAndroid Build Coastguard Worker ;; 7330*663afb9bSAndroid Build Coastguard Worker esac 7331*663afb9bSAndroid Build Coastguard Worker fi 7332*663afb9bSAndroid Build Coastguard Worker ;; 7333*663afb9bSAndroid Build Coastguard Worker esac 7334*663afb9bSAndroid Build Coastguard Worker ;; 7335*663afb9bSAndroid Build Coastguard Worker 7336*663afb9bSAndroid Build Coastguard Worker sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7337*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7338*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7339*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7340*663afb9bSAndroid Build Coastguard Worker runpath_var='LD_RUN_PATH' 7341*663afb9bSAndroid Build Coastguard Worker 7342*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 7343*663afb9bSAndroid Build Coastguard Worker CC*) 7344*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7345*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7346*663afb9bSAndroid Build Coastguard Worker ;; 7347*663afb9bSAndroid Build Coastguard Worker *) 7348*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7349*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7350*663afb9bSAndroid Build Coastguard Worker ;; 7351*663afb9bSAndroid Build Coastguard Worker esac 7352*663afb9bSAndroid Build Coastguard Worker ;; 7353*663afb9bSAndroid Build Coastguard Worker 7354*663afb9bSAndroid Build Coastguard Worker sysv5* | sco3.2v5* | sco5v6*) 7355*663afb9bSAndroid Build Coastguard Worker # Note: We CANNOT use -z defs as we might desire, because we do not 7356*663afb9bSAndroid Build Coastguard Worker # link with -lc, and that would cause any symbols used from libc to 7357*663afb9bSAndroid Build Coastguard Worker # always be unresolved, which means just about no library would 7358*663afb9bSAndroid Build Coastguard Worker # ever link correctly. If we're not using GNU ld we use -z text 7359*663afb9bSAndroid Build Coastguard Worker # though, which does catch some bad symbols but isn't as heavy-handed 7360*663afb9bSAndroid Build Coastguard Worker # as -z defs. 7361*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7362*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7363*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7364*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7365*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7366*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7367*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(link_all_deplibs, $1)=yes 7368*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7369*663afb9bSAndroid Build Coastguard Worker runpath_var='LD_RUN_PATH' 7370*663afb9bSAndroid Build Coastguard Worker 7371*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 7372*663afb9bSAndroid Build Coastguard Worker CC*) 7373*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7374*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7375*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7376*663afb9bSAndroid Build Coastguard Worker '"$_LT_TAGVAR(old_archive_cmds, $1)" 7377*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7378*663afb9bSAndroid Build Coastguard Worker '"$_LT_TAGVAR(reload_cmds, $1)" 7379*663afb9bSAndroid Build Coastguard Worker ;; 7380*663afb9bSAndroid Build Coastguard Worker *) 7381*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7382*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7383*663afb9bSAndroid Build Coastguard Worker ;; 7384*663afb9bSAndroid Build Coastguard Worker esac 7385*663afb9bSAndroid Build Coastguard Worker ;; 7386*663afb9bSAndroid Build Coastguard Worker 7387*663afb9bSAndroid Build Coastguard Worker tandem*) 7388*663afb9bSAndroid Build Coastguard Worker case $cc_basename in 7389*663afb9bSAndroid Build Coastguard Worker NCC*) 7390*663afb9bSAndroid Build Coastguard Worker # NonStop-UX NCC 3.20 7391*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7392*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7393*663afb9bSAndroid Build Coastguard Worker ;; 7394*663afb9bSAndroid Build Coastguard Worker *) 7395*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7396*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7397*663afb9bSAndroid Build Coastguard Worker ;; 7398*663afb9bSAndroid Build Coastguard Worker esac 7399*663afb9bSAndroid Build Coastguard Worker ;; 7400*663afb9bSAndroid Build Coastguard Worker 7401*663afb9bSAndroid Build Coastguard Worker vxworks*) 7402*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7403*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7404*663afb9bSAndroid Build Coastguard Worker ;; 7405*663afb9bSAndroid Build Coastguard Worker 7406*663afb9bSAndroid Build Coastguard Worker *) 7407*663afb9bSAndroid Build Coastguard Worker # FIXME: insert proper C++ library support 7408*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(ld_shlibs, $1)=no 7409*663afb9bSAndroid Build Coastguard Worker ;; 7410*663afb9bSAndroid Build Coastguard Worker esac 7411*663afb9bSAndroid Build Coastguard Worker 7412*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7413*663afb9bSAndroid Build Coastguard Worker test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7414*663afb9bSAndroid Build Coastguard Worker 7415*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(GCC, $1)=$GXX 7416*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(LD, $1)=$LD 7417*663afb9bSAndroid Build Coastguard Worker 7418*663afb9bSAndroid Build Coastguard Worker ## CAVEAT EMPTOR: 7419*663afb9bSAndroid Build Coastguard Worker ## There is no encapsulation within the following macros, do not change 7420*663afb9bSAndroid Build Coastguard Worker ## the running order or otherwise move them around unless you know exactly 7421*663afb9bSAndroid Build Coastguard Worker ## what you are doing... 7422*663afb9bSAndroid Build Coastguard Worker _LT_SYS_HIDDEN_LIBDEPS($1) 7423*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_PIC($1) 7424*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_C_O($1) 7425*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_FILE_LOCKS($1) 7426*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_SHLIBS($1) 7427*663afb9bSAndroid Build Coastguard Worker _LT_SYS_DYNAMIC_LINKER($1) 7428*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_HARDCODE_LIBPATH($1) 7429*663afb9bSAndroid Build Coastguard Worker 7430*663afb9bSAndroid Build Coastguard Worker _LT_CONFIG($1) 7431*663afb9bSAndroid Build Coastguard Worker fi # test -n "$compiler" 7432*663afb9bSAndroid Build Coastguard Worker 7433*663afb9bSAndroid Build Coastguard Worker CC=$lt_save_CC 7434*663afb9bSAndroid Build Coastguard Worker CFLAGS=$lt_save_CFLAGS 7435*663afb9bSAndroid Build Coastguard Worker LDCXX=$LD 7436*663afb9bSAndroid Build Coastguard Worker LD=$lt_save_LD 7437*663afb9bSAndroid Build Coastguard Worker GCC=$lt_save_GCC 7438*663afb9bSAndroid Build Coastguard Worker with_gnu_ld=$lt_save_with_gnu_ld 7439*663afb9bSAndroid Build Coastguard Worker lt_cv_path_LDCXX=$lt_cv_path_LD 7440*663afb9bSAndroid Build Coastguard Worker lt_cv_path_LD=$lt_save_path_LD 7441*663afb9bSAndroid Build Coastguard Worker lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7442*663afb9bSAndroid Build Coastguard Worker lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7443*663afb9bSAndroid Build Coastguard Workerfi # test yes != "$_lt_caught_CXX_error" 7444*663afb9bSAndroid Build Coastguard Worker 7445*663afb9bSAndroid Build Coastguard WorkerAC_LANG_POP 7446*663afb9bSAndroid Build Coastguard Worker])# _LT_LANG_CXX_CONFIG 7447*663afb9bSAndroid Build Coastguard Worker 7448*663afb9bSAndroid Build Coastguard Worker 7449*663afb9bSAndroid Build Coastguard Worker# _LT_FUNC_STRIPNAME_CNF 7450*663afb9bSAndroid Build Coastguard Worker# ---------------------- 7451*663afb9bSAndroid Build Coastguard Worker# func_stripname_cnf prefix suffix name 7452*663afb9bSAndroid Build Coastguard Worker# strip PREFIX and SUFFIX off of NAME. 7453*663afb9bSAndroid Build Coastguard Worker# PREFIX and SUFFIX must not contain globbing or regex special 7454*663afb9bSAndroid Build Coastguard Worker# characters, hashes, percent signs, but SUFFIX may contain a leading 7455*663afb9bSAndroid Build Coastguard Worker# dot (in which case that matches only a dot). 7456*663afb9bSAndroid Build Coastguard Worker# 7457*663afb9bSAndroid Build Coastguard Worker# This function is identical to the (non-XSI) version of func_stripname, 7458*663afb9bSAndroid Build Coastguard Worker# except this one can be used by m4 code that may be executed by configure, 7459*663afb9bSAndroid Build Coastguard Worker# rather than the libtool script. 7460*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7461*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_DECL_SED]) 7462*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7463*663afb9bSAndroid Build Coastguard Workerfunc_stripname_cnf () 7464*663afb9bSAndroid Build Coastguard Worker{ 7465*663afb9bSAndroid Build Coastguard Worker case @S|@2 in 7466*663afb9bSAndroid Build Coastguard Worker .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7467*663afb9bSAndroid Build Coastguard Worker *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7468*663afb9bSAndroid Build Coastguard Worker esac 7469*663afb9bSAndroid Build Coastguard Worker} # func_stripname_cnf 7470*663afb9bSAndroid Build Coastguard Worker])# _LT_FUNC_STRIPNAME_CNF 7471*663afb9bSAndroid Build Coastguard Worker 7472*663afb9bSAndroid Build Coastguard Worker 7473*663afb9bSAndroid Build Coastguard Worker# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7474*663afb9bSAndroid Build Coastguard Worker# --------------------------------- 7475*663afb9bSAndroid Build Coastguard Worker# Figure out "hidden" library dependencies from verbose 7476*663afb9bSAndroid Build Coastguard Worker# compiler output when linking a shared library. 7477*663afb9bSAndroid Build Coastguard Worker# Parse the compiler output and extract the necessary 7478*663afb9bSAndroid Build Coastguard Worker# objects, libraries and library flags. 7479*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7480*663afb9bSAndroid Build Coastguard Worker[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7481*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7482*663afb9bSAndroid Build Coastguard Worker# Dependencies to place before and after the object being linked: 7483*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(predep_objects, $1)= 7484*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(postdep_objects, $1)= 7485*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(predeps, $1)= 7486*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(postdeps, $1)= 7487*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(compiler_lib_search_path, $1)= 7488*663afb9bSAndroid Build Coastguard Worker 7489*663afb9bSAndroid Build Coastguard Workerdnl we can't use the lt_simple_compile_test_code here, 7490*663afb9bSAndroid Build Coastguard Workerdnl because it contains code intended for an executable, 7491*663afb9bSAndroid Build Coastguard Workerdnl not a library. It's possible we should let each 7492*663afb9bSAndroid Build Coastguard Workerdnl tag define a new lt_????_link_test_code variable, 7493*663afb9bSAndroid Build Coastguard Workerdnl but it's only used here... 7494*663afb9bSAndroid Build Coastguard Workerm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7495*663afb9bSAndroid Build Coastguard Workerint a; 7496*663afb9bSAndroid Build Coastguard Workervoid foo (void) { a = 0; } 7497*663afb9bSAndroid Build Coastguard Worker_LT_EOF 7498*663afb9bSAndroid Build Coastguard Worker], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7499*663afb9bSAndroid Build Coastguard Workerclass Foo 7500*663afb9bSAndroid Build Coastguard Worker{ 7501*663afb9bSAndroid Build Coastguard Workerpublic: 7502*663afb9bSAndroid Build Coastguard Worker Foo (void) { a = 0; } 7503*663afb9bSAndroid Build Coastguard Workerprivate: 7504*663afb9bSAndroid Build Coastguard Worker int a; 7505*663afb9bSAndroid Build Coastguard Worker}; 7506*663afb9bSAndroid Build Coastguard Worker_LT_EOF 7507*663afb9bSAndroid Build Coastguard Worker], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7508*663afb9bSAndroid Build Coastguard Worker subroutine foo 7509*663afb9bSAndroid Build Coastguard Worker implicit none 7510*663afb9bSAndroid Build Coastguard Worker integer*4 a 7511*663afb9bSAndroid Build Coastguard Worker a=0 7512*663afb9bSAndroid Build Coastguard Worker return 7513*663afb9bSAndroid Build Coastguard Worker end 7514*663afb9bSAndroid Build Coastguard Worker_LT_EOF 7515*663afb9bSAndroid Build Coastguard Worker], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7516*663afb9bSAndroid Build Coastguard Worker subroutine foo 7517*663afb9bSAndroid Build Coastguard Worker implicit none 7518*663afb9bSAndroid Build Coastguard Worker integer a 7519*663afb9bSAndroid Build Coastguard Worker a=0 7520*663afb9bSAndroid Build Coastguard Worker return 7521*663afb9bSAndroid Build Coastguard Worker end 7522*663afb9bSAndroid Build Coastguard Worker_LT_EOF 7523*663afb9bSAndroid Build Coastguard Worker], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7524*663afb9bSAndroid Build Coastguard Workerpublic class foo { 7525*663afb9bSAndroid Build Coastguard Worker private int a; 7526*663afb9bSAndroid Build Coastguard Worker public void bar (void) { 7527*663afb9bSAndroid Build Coastguard Worker a = 0; 7528*663afb9bSAndroid Build Coastguard Worker } 7529*663afb9bSAndroid Build Coastguard Worker}; 7530*663afb9bSAndroid Build Coastguard Worker_LT_EOF 7531*663afb9bSAndroid Build Coastguard Worker], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7532*663afb9bSAndroid Build Coastguard Workerpackage foo 7533*663afb9bSAndroid Build Coastguard Workerfunc foo() { 7534*663afb9bSAndroid Build Coastguard Worker} 7535*663afb9bSAndroid Build Coastguard Worker_LT_EOF 7536*663afb9bSAndroid Build Coastguard Worker]) 7537*663afb9bSAndroid Build Coastguard Worker 7538*663afb9bSAndroid Build Coastguard Worker_lt_libdeps_save_CFLAGS=$CFLAGS 7539*663afb9bSAndroid Build Coastguard Workercase "$CC $CFLAGS " in #( 7540*663afb9bSAndroid Build Coastguard Worker*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7541*663afb9bSAndroid Build Coastguard Worker*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7542*663afb9bSAndroid Build Coastguard Worker*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7543*663afb9bSAndroid Build Coastguard Workeresac 7544*663afb9bSAndroid Build Coastguard Worker 7545*663afb9bSAndroid Build Coastguard Workerdnl Parse the compiler output and extract the necessary 7546*663afb9bSAndroid Build Coastguard Workerdnl objects, libraries and library flags. 7547*663afb9bSAndroid Build Coastguard Workerif AC_TRY_EVAL(ac_compile); then 7548*663afb9bSAndroid Build Coastguard Worker # Parse the compiler output and extract the necessary 7549*663afb9bSAndroid Build Coastguard Worker # objects, libraries and library flags. 7550*663afb9bSAndroid Build Coastguard Worker 7551*663afb9bSAndroid Build Coastguard Worker # Sentinel used to keep track of whether or not we are before 7552*663afb9bSAndroid Build Coastguard Worker # the conftest object file. 7553*663afb9bSAndroid Build Coastguard Worker pre_test_object_deps_done=no 7554*663afb9bSAndroid Build Coastguard Worker 7555*663afb9bSAndroid Build Coastguard Worker for p in `eval "$output_verbose_link_cmd"`; do 7556*663afb9bSAndroid Build Coastguard Worker case $prev$p in 7557*663afb9bSAndroid Build Coastguard Worker 7558*663afb9bSAndroid Build Coastguard Worker -L* | -R* | -l*) 7559*663afb9bSAndroid Build Coastguard Worker # Some compilers place space between "-{L,R}" and the path. 7560*663afb9bSAndroid Build Coastguard Worker # Remove the space. 7561*663afb9bSAndroid Build Coastguard Worker if test x-L = "$p" || 7562*663afb9bSAndroid Build Coastguard Worker test x-R = "$p"; then 7563*663afb9bSAndroid Build Coastguard Worker prev=$p 7564*663afb9bSAndroid Build Coastguard Worker continue 7565*663afb9bSAndroid Build Coastguard Worker fi 7566*663afb9bSAndroid Build Coastguard Worker 7567*663afb9bSAndroid Build Coastguard Worker # Expand the sysroot to ease extracting the directories later. 7568*663afb9bSAndroid Build Coastguard Worker if test -z "$prev"; then 7569*663afb9bSAndroid Build Coastguard Worker case $p in 7570*663afb9bSAndroid Build Coastguard Worker -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7571*663afb9bSAndroid Build Coastguard Worker -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7572*663afb9bSAndroid Build Coastguard Worker -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7573*663afb9bSAndroid Build Coastguard Worker esac 7574*663afb9bSAndroid Build Coastguard Worker fi 7575*663afb9bSAndroid Build Coastguard Worker case $p in 7576*663afb9bSAndroid Build Coastguard Worker =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7577*663afb9bSAndroid Build Coastguard Worker esac 7578*663afb9bSAndroid Build Coastguard Worker if test no = "$pre_test_object_deps_done"; then 7579*663afb9bSAndroid Build Coastguard Worker case $prev in 7580*663afb9bSAndroid Build Coastguard Worker -L | -R) 7581*663afb9bSAndroid Build Coastguard Worker # Internal compiler library paths should come after those 7582*663afb9bSAndroid Build Coastguard Worker # provided the user. The postdeps already come after the 7583*663afb9bSAndroid Build Coastguard Worker # user supplied libs so there is no need to process them. 7584*663afb9bSAndroid Build Coastguard Worker if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7585*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7586*663afb9bSAndroid Build Coastguard Worker else 7587*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7588*663afb9bSAndroid Build Coastguard Worker fi 7589*663afb9bSAndroid Build Coastguard Worker ;; 7590*663afb9bSAndroid Build Coastguard Worker # The "-l" case would never come before the object being 7591*663afb9bSAndroid Build Coastguard Worker # linked, so don't bother handling this case. 7592*663afb9bSAndroid Build Coastguard Worker esac 7593*663afb9bSAndroid Build Coastguard Worker else 7594*663afb9bSAndroid Build Coastguard Worker if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7595*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(postdeps, $1)=$prev$p 7596*663afb9bSAndroid Build Coastguard Worker else 7597*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7598*663afb9bSAndroid Build Coastguard Worker fi 7599*663afb9bSAndroid Build Coastguard Worker fi 7600*663afb9bSAndroid Build Coastguard Worker prev= 7601*663afb9bSAndroid Build Coastguard Worker ;; 7602*663afb9bSAndroid Build Coastguard Worker 7603*663afb9bSAndroid Build Coastguard Worker *.lto.$objext) ;; # Ignore GCC LTO objects 7604*663afb9bSAndroid Build Coastguard Worker *.$objext) 7605*663afb9bSAndroid Build Coastguard Worker # This assumes that the test object file only shows up 7606*663afb9bSAndroid Build Coastguard Worker # once in the compiler output. 7607*663afb9bSAndroid Build Coastguard Worker if test "$p" = "conftest.$objext"; then 7608*663afb9bSAndroid Build Coastguard Worker pre_test_object_deps_done=yes 7609*663afb9bSAndroid Build Coastguard Worker continue 7610*663afb9bSAndroid Build Coastguard Worker fi 7611*663afb9bSAndroid Build Coastguard Worker 7612*663afb9bSAndroid Build Coastguard Worker if test no = "$pre_test_object_deps_done"; then 7613*663afb9bSAndroid Build Coastguard Worker if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7614*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(predep_objects, $1)=$p 7615*663afb9bSAndroid Build Coastguard Worker else 7616*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7617*663afb9bSAndroid Build Coastguard Worker fi 7618*663afb9bSAndroid Build Coastguard Worker else 7619*663afb9bSAndroid Build Coastguard Worker if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7620*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(postdep_objects, $1)=$p 7621*663afb9bSAndroid Build Coastguard Worker else 7622*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7623*663afb9bSAndroid Build Coastguard Worker fi 7624*663afb9bSAndroid Build Coastguard Worker fi 7625*663afb9bSAndroid Build Coastguard Worker ;; 7626*663afb9bSAndroid Build Coastguard Worker 7627*663afb9bSAndroid Build Coastguard Worker *) ;; # Ignore the rest. 7628*663afb9bSAndroid Build Coastguard Worker 7629*663afb9bSAndroid Build Coastguard Worker esac 7630*663afb9bSAndroid Build Coastguard Worker done 7631*663afb9bSAndroid Build Coastguard Worker 7632*663afb9bSAndroid Build Coastguard Worker # Clean up. 7633*663afb9bSAndroid Build Coastguard Worker rm -f a.out a.exe 7634*663afb9bSAndroid Build Coastguard Workerelse 7635*663afb9bSAndroid Build Coastguard Worker echo "libtool.m4: error: problem compiling $1 test program" 7636*663afb9bSAndroid Build Coastguard Workerfi 7637*663afb9bSAndroid Build Coastguard Worker 7638*663afb9bSAndroid Build Coastguard Worker$RM -f confest.$objext 7639*663afb9bSAndroid Build Coastguard WorkerCFLAGS=$_lt_libdeps_save_CFLAGS 7640*663afb9bSAndroid Build Coastguard Worker 7641*663afb9bSAndroid Build Coastguard Worker# PORTME: override above test on systems where it is broken 7642*663afb9bSAndroid Build Coastguard Workerm4_if([$1], [CXX], 7643*663afb9bSAndroid Build Coastguard Worker[case $host_os in 7644*663afb9bSAndroid Build Coastguard Workerinterix[[3-9]]*) 7645*663afb9bSAndroid Build Coastguard Worker # Interix 3.5 installs completely hosed .la files for C++, so rather than 7646*663afb9bSAndroid Build Coastguard Worker # hack all around it, let's just trust "g++" to DTRT. 7647*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(predep_objects,$1)= 7648*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(postdep_objects,$1)= 7649*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(postdeps,$1)= 7650*663afb9bSAndroid Build Coastguard Worker ;; 7651*663afb9bSAndroid Build Coastguard Workeresac 7652*663afb9bSAndroid Build Coastguard Worker]) 7653*663afb9bSAndroid Build Coastguard Worker 7654*663afb9bSAndroid Build Coastguard Workercase " $_LT_TAGVAR(postdeps, $1) " in 7655*663afb9bSAndroid Build Coastguard Worker*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7656*663afb9bSAndroid Build Coastguard Workeresac 7657*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7658*663afb9bSAndroid Build Coastguard Workerif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7659*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7660*663afb9bSAndroid Build Coastguard Workerfi 7661*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7662*663afb9bSAndroid Build Coastguard Worker [The directories searched by this compiler when creating a shared library]) 7663*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [predep_objects], [1], 7664*663afb9bSAndroid Build Coastguard Worker [Dependencies to place before and after the objects being linked to 7665*663afb9bSAndroid Build Coastguard Worker create a shared library]) 7666*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [postdep_objects], [1]) 7667*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [predeps], [1]) 7668*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [postdeps], [1]) 7669*663afb9bSAndroid Build Coastguard Worker_LT_TAGDECL([], [compiler_lib_search_path], [1], 7670*663afb9bSAndroid Build Coastguard Worker [The library search path used internally by the compiler when linking 7671*663afb9bSAndroid Build Coastguard Worker a shared library]) 7672*663afb9bSAndroid Build Coastguard Worker])# _LT_SYS_HIDDEN_LIBDEPS 7673*663afb9bSAndroid Build Coastguard Worker 7674*663afb9bSAndroid Build Coastguard Worker 7675*663afb9bSAndroid Build Coastguard Worker# _LT_LANG_F77_CONFIG([TAG]) 7676*663afb9bSAndroid Build Coastguard Worker# -------------------------- 7677*663afb9bSAndroid Build Coastguard Worker# Ensure that the configuration variables for a Fortran 77 compiler are 7678*663afb9bSAndroid Build Coastguard Worker# suitably defined. These variables are subsequently used by _LT_CONFIG 7679*663afb9bSAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'. 7680*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LANG_F77_CONFIG], 7681*663afb9bSAndroid Build Coastguard Worker[AC_LANG_PUSH(Fortran 77) 7682*663afb9bSAndroid Build Coastguard Workerif test -z "$F77" || test no = "$F77"; then 7683*663afb9bSAndroid Build Coastguard Worker _lt_disable_F77=yes 7684*663afb9bSAndroid Build Coastguard Workerfi 7685*663afb9bSAndroid Build Coastguard Worker 7686*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7687*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(allow_undefined_flag, $1)= 7688*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(always_export_symbols, $1)=no 7689*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(archive_expsym_cmds, $1)= 7690*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7691*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct, $1)=no 7692*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7693*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7694*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_separator, $1)= 7695*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_minus_L, $1)=no 7696*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_automatic, $1)=no 7697*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(inherit_rpath, $1)=no 7698*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(module_cmds, $1)= 7699*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(module_expsym_cmds, $1)= 7700*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(link_all_deplibs, $1)=unknown 7701*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7702*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag 7703*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7704*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(no_undefined_flag, $1)= 7705*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(whole_archive_flag_spec, $1)= 7706*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7707*663afb9bSAndroid Build Coastguard Worker 7708*663afb9bSAndroid Build Coastguard Worker# Source file extension for f77 test sources. 7709*663afb9bSAndroid Build Coastguard Workerac_ext=f 7710*663afb9bSAndroid Build Coastguard Worker 7711*663afb9bSAndroid Build Coastguard Worker# Object file extension for compiled f77 test sources. 7712*663afb9bSAndroid Build Coastguard Workerobjext=o 7713*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext 7714*663afb9bSAndroid Build Coastguard Worker 7715*663afb9bSAndroid Build Coastguard Worker# No sense in running all these tests if we already determined that 7716*663afb9bSAndroid Build Coastguard Worker# the F77 compiler isn't working. Some variables (like enable_shared) 7717*663afb9bSAndroid Build Coastguard Worker# are currently assumed to apply to all compilers on this platform, 7718*663afb9bSAndroid Build Coastguard Worker# and will be corrupted by setting them based on a non-working compiler. 7719*663afb9bSAndroid Build Coastguard Workerif test yes != "$_lt_disable_F77"; then 7720*663afb9bSAndroid Build Coastguard Worker # Code to be used in simple compile tests 7721*663afb9bSAndroid Build Coastguard Worker lt_simple_compile_test_code="\ 7722*663afb9bSAndroid Build Coastguard Worker subroutine t 7723*663afb9bSAndroid Build Coastguard Worker return 7724*663afb9bSAndroid Build Coastguard Worker end 7725*663afb9bSAndroid Build Coastguard Worker" 7726*663afb9bSAndroid Build Coastguard Worker 7727*663afb9bSAndroid Build Coastguard Worker # Code to be used in simple link tests 7728*663afb9bSAndroid Build Coastguard Worker lt_simple_link_test_code="\ 7729*663afb9bSAndroid Build Coastguard Worker program t 7730*663afb9bSAndroid Build Coastguard Worker end 7731*663afb9bSAndroid Build Coastguard Worker" 7732*663afb9bSAndroid Build Coastguard Worker 7733*663afb9bSAndroid Build Coastguard Worker # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7734*663afb9bSAndroid Build Coastguard Worker _LT_TAG_COMPILER 7735*663afb9bSAndroid Build Coastguard Worker 7736*663afb9bSAndroid Build Coastguard Worker # save warnings/boilerplate of simple test code 7737*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_BOILERPLATE 7738*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_BOILERPLATE 7739*663afb9bSAndroid Build Coastguard Worker 7740*663afb9bSAndroid Build Coastguard Worker # Allow CC to be a program name with arguments. 7741*663afb9bSAndroid Build Coastguard Worker lt_save_CC=$CC 7742*663afb9bSAndroid Build Coastguard Worker lt_save_GCC=$GCC 7743*663afb9bSAndroid Build Coastguard Worker lt_save_CFLAGS=$CFLAGS 7744*663afb9bSAndroid Build Coastguard Worker CC=${F77-"f77"} 7745*663afb9bSAndroid Build Coastguard Worker CFLAGS=$FFLAGS 7746*663afb9bSAndroid Build Coastguard Worker compiler=$CC 7747*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(compiler, $1)=$CC 7748*663afb9bSAndroid Build Coastguard Worker _LT_CC_BASENAME([$compiler]) 7749*663afb9bSAndroid Build Coastguard Worker GCC=$G77 7750*663afb9bSAndroid Build Coastguard Worker if test -n "$compiler"; then 7751*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([if libtool supports shared libraries]) 7752*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([$can_build_shared]) 7753*663afb9bSAndroid Build Coastguard Worker 7754*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to build shared libraries]) 7755*663afb9bSAndroid Build Coastguard Worker test no = "$can_build_shared" && enable_shared=no 7756*663afb9bSAndroid Build Coastguard Worker 7757*663afb9bSAndroid Build Coastguard Worker # On AIX, shared libraries and static libraries use the same namespace, and 7758*663afb9bSAndroid Build Coastguard Worker # are all built from PIC. 7759*663afb9bSAndroid Build Coastguard Worker case $host_os in 7760*663afb9bSAndroid Build Coastguard Worker aix3*) 7761*663afb9bSAndroid Build Coastguard Worker test yes = "$enable_shared" && enable_static=no 7762*663afb9bSAndroid Build Coastguard Worker if test -n "$RANLIB"; then 7763*663afb9bSAndroid Build Coastguard Worker archive_cmds="$archive_cmds~\$RANLIB \$lib" 7764*663afb9bSAndroid Build Coastguard Worker postinstall_cmds='$RANLIB $lib' 7765*663afb9bSAndroid Build Coastguard Worker fi 7766*663afb9bSAndroid Build Coastguard Worker ;; 7767*663afb9bSAndroid Build Coastguard Worker aix[[4-9]]*) 7768*663afb9bSAndroid Build Coastguard Worker if test ia64 != "$host_cpu"; then 7769*663afb9bSAndroid Build Coastguard Worker case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7770*663afb9bSAndroid Build Coastguard Worker yes,aix,yes) ;; # shared object as lib.so file only 7771*663afb9bSAndroid Build Coastguard Worker yes,svr4,*) ;; # shared object as lib.so archive member only 7772*663afb9bSAndroid Build Coastguard Worker yes,*) enable_static=no ;; # shared object in lib.a archive as well 7773*663afb9bSAndroid Build Coastguard Worker esac 7774*663afb9bSAndroid Build Coastguard Worker fi 7775*663afb9bSAndroid Build Coastguard Worker ;; 7776*663afb9bSAndroid Build Coastguard Worker esac 7777*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([$enable_shared]) 7778*663afb9bSAndroid Build Coastguard Worker 7779*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to build static libraries]) 7780*663afb9bSAndroid Build Coastguard Worker # Make sure either enable_shared or enable_static is yes. 7781*663afb9bSAndroid Build Coastguard Worker test yes = "$enable_shared" || enable_static=yes 7782*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([$enable_static]) 7783*663afb9bSAndroid Build Coastguard Worker 7784*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(GCC, $1)=$G77 7785*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(LD, $1)=$LD 7786*663afb9bSAndroid Build Coastguard Worker 7787*663afb9bSAndroid Build Coastguard Worker ## CAVEAT EMPTOR: 7788*663afb9bSAndroid Build Coastguard Worker ## There is no encapsulation within the following macros, do not change 7789*663afb9bSAndroid Build Coastguard Worker ## the running order or otherwise move them around unless you know exactly 7790*663afb9bSAndroid Build Coastguard Worker ## what you are doing... 7791*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_PIC($1) 7792*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_C_O($1) 7793*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_FILE_LOCKS($1) 7794*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_SHLIBS($1) 7795*663afb9bSAndroid Build Coastguard Worker _LT_SYS_DYNAMIC_LINKER($1) 7796*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_HARDCODE_LIBPATH($1) 7797*663afb9bSAndroid Build Coastguard Worker 7798*663afb9bSAndroid Build Coastguard Worker _LT_CONFIG($1) 7799*663afb9bSAndroid Build Coastguard Worker fi # test -n "$compiler" 7800*663afb9bSAndroid Build Coastguard Worker 7801*663afb9bSAndroid Build Coastguard Worker GCC=$lt_save_GCC 7802*663afb9bSAndroid Build Coastguard Worker CC=$lt_save_CC 7803*663afb9bSAndroid Build Coastguard Worker CFLAGS=$lt_save_CFLAGS 7804*663afb9bSAndroid Build Coastguard Workerfi # test yes != "$_lt_disable_F77" 7805*663afb9bSAndroid Build Coastguard Worker 7806*663afb9bSAndroid Build Coastguard WorkerAC_LANG_POP 7807*663afb9bSAndroid Build Coastguard Worker])# _LT_LANG_F77_CONFIG 7808*663afb9bSAndroid Build Coastguard Worker 7809*663afb9bSAndroid Build Coastguard Worker 7810*663afb9bSAndroid Build Coastguard Worker# _LT_LANG_FC_CONFIG([TAG]) 7811*663afb9bSAndroid Build Coastguard Worker# ------------------------- 7812*663afb9bSAndroid Build Coastguard Worker# Ensure that the configuration variables for a Fortran compiler are 7813*663afb9bSAndroid Build Coastguard Worker# suitably defined. These variables are subsequently used by _LT_CONFIG 7814*663afb9bSAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'. 7815*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LANG_FC_CONFIG], 7816*663afb9bSAndroid Build Coastguard Worker[AC_LANG_PUSH(Fortran) 7817*663afb9bSAndroid Build Coastguard Worker 7818*663afb9bSAndroid Build Coastguard Workerif test -z "$FC" || test no = "$FC"; then 7819*663afb9bSAndroid Build Coastguard Worker _lt_disable_FC=yes 7820*663afb9bSAndroid Build Coastguard Workerfi 7821*663afb9bSAndroid Build Coastguard Worker 7822*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7823*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(allow_undefined_flag, $1)= 7824*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(always_export_symbols, $1)=no 7825*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(archive_expsym_cmds, $1)= 7826*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7827*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct, $1)=no 7828*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7829*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7830*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_libdir_separator, $1)= 7831*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_minus_L, $1)=no 7832*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(hardcode_automatic, $1)=no 7833*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(inherit_rpath, $1)=no 7834*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(module_cmds, $1)= 7835*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(module_expsym_cmds, $1)= 7836*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(link_all_deplibs, $1)=unknown 7837*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7838*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag 7839*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7840*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(no_undefined_flag, $1)= 7841*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(whole_archive_flag_spec, $1)= 7842*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7843*663afb9bSAndroid Build Coastguard Worker 7844*663afb9bSAndroid Build Coastguard Worker# Source file extension for fc test sources. 7845*663afb9bSAndroid Build Coastguard Workerac_ext=${ac_fc_srcext-f} 7846*663afb9bSAndroid Build Coastguard Worker 7847*663afb9bSAndroid Build Coastguard Worker# Object file extension for compiled fc test sources. 7848*663afb9bSAndroid Build Coastguard Workerobjext=o 7849*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext 7850*663afb9bSAndroid Build Coastguard Worker 7851*663afb9bSAndroid Build Coastguard Worker# No sense in running all these tests if we already determined that 7852*663afb9bSAndroid Build Coastguard Worker# the FC compiler isn't working. Some variables (like enable_shared) 7853*663afb9bSAndroid Build Coastguard Worker# are currently assumed to apply to all compilers on this platform, 7854*663afb9bSAndroid Build Coastguard Worker# and will be corrupted by setting them based on a non-working compiler. 7855*663afb9bSAndroid Build Coastguard Workerif test yes != "$_lt_disable_FC"; then 7856*663afb9bSAndroid Build Coastguard Worker # Code to be used in simple compile tests 7857*663afb9bSAndroid Build Coastguard Worker lt_simple_compile_test_code="\ 7858*663afb9bSAndroid Build Coastguard Worker subroutine t 7859*663afb9bSAndroid Build Coastguard Worker return 7860*663afb9bSAndroid Build Coastguard Worker end 7861*663afb9bSAndroid Build Coastguard Worker" 7862*663afb9bSAndroid Build Coastguard Worker 7863*663afb9bSAndroid Build Coastguard Worker # Code to be used in simple link tests 7864*663afb9bSAndroid Build Coastguard Worker lt_simple_link_test_code="\ 7865*663afb9bSAndroid Build Coastguard Worker program t 7866*663afb9bSAndroid Build Coastguard Worker end 7867*663afb9bSAndroid Build Coastguard Worker" 7868*663afb9bSAndroid Build Coastguard Worker 7869*663afb9bSAndroid Build Coastguard Worker # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7870*663afb9bSAndroid Build Coastguard Worker _LT_TAG_COMPILER 7871*663afb9bSAndroid Build Coastguard Worker 7872*663afb9bSAndroid Build Coastguard Worker # save warnings/boilerplate of simple test code 7873*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_BOILERPLATE 7874*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_BOILERPLATE 7875*663afb9bSAndroid Build Coastguard Worker 7876*663afb9bSAndroid Build Coastguard Worker # Allow CC to be a program name with arguments. 7877*663afb9bSAndroid Build Coastguard Worker lt_save_CC=$CC 7878*663afb9bSAndroid Build Coastguard Worker lt_save_GCC=$GCC 7879*663afb9bSAndroid Build Coastguard Worker lt_save_CFLAGS=$CFLAGS 7880*663afb9bSAndroid Build Coastguard Worker CC=${FC-"f95"} 7881*663afb9bSAndroid Build Coastguard Worker CFLAGS=$FCFLAGS 7882*663afb9bSAndroid Build Coastguard Worker compiler=$CC 7883*663afb9bSAndroid Build Coastguard Worker GCC=$ac_cv_fc_compiler_gnu 7884*663afb9bSAndroid Build Coastguard Worker 7885*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(compiler, $1)=$CC 7886*663afb9bSAndroid Build Coastguard Worker _LT_CC_BASENAME([$compiler]) 7887*663afb9bSAndroid Build Coastguard Worker 7888*663afb9bSAndroid Build Coastguard Worker if test -n "$compiler"; then 7889*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([if libtool supports shared libraries]) 7890*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([$can_build_shared]) 7891*663afb9bSAndroid Build Coastguard Worker 7892*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to build shared libraries]) 7893*663afb9bSAndroid Build Coastguard Worker test no = "$can_build_shared" && enable_shared=no 7894*663afb9bSAndroid Build Coastguard Worker 7895*663afb9bSAndroid Build Coastguard Worker # On AIX, shared libraries and static libraries use the same namespace, and 7896*663afb9bSAndroid Build Coastguard Worker # are all built from PIC. 7897*663afb9bSAndroid Build Coastguard Worker case $host_os in 7898*663afb9bSAndroid Build Coastguard Worker aix3*) 7899*663afb9bSAndroid Build Coastguard Worker test yes = "$enable_shared" && enable_static=no 7900*663afb9bSAndroid Build Coastguard Worker if test -n "$RANLIB"; then 7901*663afb9bSAndroid Build Coastguard Worker archive_cmds="$archive_cmds~\$RANLIB \$lib" 7902*663afb9bSAndroid Build Coastguard Worker postinstall_cmds='$RANLIB $lib' 7903*663afb9bSAndroid Build Coastguard Worker fi 7904*663afb9bSAndroid Build Coastguard Worker ;; 7905*663afb9bSAndroid Build Coastguard Worker aix[[4-9]]*) 7906*663afb9bSAndroid Build Coastguard Worker if test ia64 != "$host_cpu"; then 7907*663afb9bSAndroid Build Coastguard Worker case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7908*663afb9bSAndroid Build Coastguard Worker yes,aix,yes) ;; # shared object as lib.so file only 7909*663afb9bSAndroid Build Coastguard Worker yes,svr4,*) ;; # shared object as lib.so archive member only 7910*663afb9bSAndroid Build Coastguard Worker yes,*) enable_static=no ;; # shared object in lib.a archive as well 7911*663afb9bSAndroid Build Coastguard Worker esac 7912*663afb9bSAndroid Build Coastguard Worker fi 7913*663afb9bSAndroid Build Coastguard Worker ;; 7914*663afb9bSAndroid Build Coastguard Worker esac 7915*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([$enable_shared]) 7916*663afb9bSAndroid Build Coastguard Worker 7917*663afb9bSAndroid Build Coastguard Worker AC_MSG_CHECKING([whether to build static libraries]) 7918*663afb9bSAndroid Build Coastguard Worker # Make sure either enable_shared or enable_static is yes. 7919*663afb9bSAndroid Build Coastguard Worker test yes = "$enable_shared" || enable_static=yes 7920*663afb9bSAndroid Build Coastguard Worker AC_MSG_RESULT([$enable_static]) 7921*663afb9bSAndroid Build Coastguard Worker 7922*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7923*663afb9bSAndroid Build Coastguard Worker _LT_TAGVAR(LD, $1)=$LD 7924*663afb9bSAndroid Build Coastguard Worker 7925*663afb9bSAndroid Build Coastguard Worker ## CAVEAT EMPTOR: 7926*663afb9bSAndroid Build Coastguard Worker ## There is no encapsulation within the following macros, do not change 7927*663afb9bSAndroid Build Coastguard Worker ## the running order or otherwise move them around unless you know exactly 7928*663afb9bSAndroid Build Coastguard Worker ## what you are doing... 7929*663afb9bSAndroid Build Coastguard Worker _LT_SYS_HIDDEN_LIBDEPS($1) 7930*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_PIC($1) 7931*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_C_O($1) 7932*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_FILE_LOCKS($1) 7933*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_SHLIBS($1) 7934*663afb9bSAndroid Build Coastguard Worker _LT_SYS_DYNAMIC_LINKER($1) 7935*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_HARDCODE_LIBPATH($1) 7936*663afb9bSAndroid Build Coastguard Worker 7937*663afb9bSAndroid Build Coastguard Worker _LT_CONFIG($1) 7938*663afb9bSAndroid Build Coastguard Worker fi # test -n "$compiler" 7939*663afb9bSAndroid Build Coastguard Worker 7940*663afb9bSAndroid Build Coastguard Worker GCC=$lt_save_GCC 7941*663afb9bSAndroid Build Coastguard Worker CC=$lt_save_CC 7942*663afb9bSAndroid Build Coastguard Worker CFLAGS=$lt_save_CFLAGS 7943*663afb9bSAndroid Build Coastguard Workerfi # test yes != "$_lt_disable_FC" 7944*663afb9bSAndroid Build Coastguard Worker 7945*663afb9bSAndroid Build Coastguard WorkerAC_LANG_POP 7946*663afb9bSAndroid Build Coastguard Worker])# _LT_LANG_FC_CONFIG 7947*663afb9bSAndroid Build Coastguard Worker 7948*663afb9bSAndroid Build Coastguard Worker 7949*663afb9bSAndroid Build Coastguard Worker# _LT_LANG_GCJ_CONFIG([TAG]) 7950*663afb9bSAndroid Build Coastguard Worker# -------------------------- 7951*663afb9bSAndroid Build Coastguard Worker# Ensure that the configuration variables for the GNU Java Compiler compiler 7952*663afb9bSAndroid Build Coastguard Worker# are suitably defined. These variables are subsequently used by _LT_CONFIG 7953*663afb9bSAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'. 7954*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LANG_GCJ_CONFIG], 7955*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([LT_PROG_GCJ])dnl 7956*663afb9bSAndroid Build Coastguard WorkerAC_LANG_SAVE 7957*663afb9bSAndroid Build Coastguard Worker 7958*663afb9bSAndroid Build Coastguard Worker# Source file extension for Java test sources. 7959*663afb9bSAndroid Build Coastguard Workerac_ext=java 7960*663afb9bSAndroid Build Coastguard Worker 7961*663afb9bSAndroid Build Coastguard Worker# Object file extension for compiled Java test sources. 7962*663afb9bSAndroid Build Coastguard Workerobjext=o 7963*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext 7964*663afb9bSAndroid Build Coastguard Worker 7965*663afb9bSAndroid Build Coastguard Worker# Code to be used in simple compile tests 7966*663afb9bSAndroid Build Coastguard Workerlt_simple_compile_test_code="class foo {}" 7967*663afb9bSAndroid Build Coastguard Worker 7968*663afb9bSAndroid Build Coastguard Worker# Code to be used in simple link tests 7969*663afb9bSAndroid Build Coastguard Workerlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7970*663afb9bSAndroid Build Coastguard Worker 7971*663afb9bSAndroid Build Coastguard Worker# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7972*663afb9bSAndroid Build Coastguard Worker_LT_TAG_COMPILER 7973*663afb9bSAndroid Build Coastguard Worker 7974*663afb9bSAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code 7975*663afb9bSAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE 7976*663afb9bSAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE 7977*663afb9bSAndroid Build Coastguard Worker 7978*663afb9bSAndroid Build Coastguard Worker# Allow CC to be a program name with arguments. 7979*663afb9bSAndroid Build Coastguard Workerlt_save_CC=$CC 7980*663afb9bSAndroid Build Coastguard Workerlt_save_CFLAGS=$CFLAGS 7981*663afb9bSAndroid Build Coastguard Workerlt_save_GCC=$GCC 7982*663afb9bSAndroid Build Coastguard WorkerGCC=yes 7983*663afb9bSAndroid Build Coastguard WorkerCC=${GCJ-"gcj"} 7984*663afb9bSAndroid Build Coastguard WorkerCFLAGS=$GCJFLAGS 7985*663afb9bSAndroid Build Coastguard Workercompiler=$CC 7986*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(compiler, $1)=$CC 7987*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(LD, $1)=$LD 7988*663afb9bSAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler]) 7989*663afb9bSAndroid Build Coastguard Worker 7990*663afb9bSAndroid Build Coastguard Worker# GCJ did not exist at the time GCC didn't implicitly link libc in. 7991*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7992*663afb9bSAndroid Build Coastguard Worker 7993*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7994*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag 7995*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7996*663afb9bSAndroid Build Coastguard Worker 7997*663afb9bSAndroid Build Coastguard Worker## CAVEAT EMPTOR: 7998*663afb9bSAndroid Build Coastguard Worker## There is no encapsulation within the following macros, do not change 7999*663afb9bSAndroid Build Coastguard Worker## the running order or otherwise move them around unless you know exactly 8000*663afb9bSAndroid Build Coastguard Worker## what you are doing... 8001*663afb9bSAndroid Build Coastguard Workerif test -n "$compiler"; then 8002*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_NO_RTTI($1) 8003*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_PIC($1) 8004*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_C_O($1) 8005*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_FILE_LOCKS($1) 8006*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_SHLIBS($1) 8007*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_HARDCODE_LIBPATH($1) 8008*663afb9bSAndroid Build Coastguard Worker 8009*663afb9bSAndroid Build Coastguard Worker _LT_CONFIG($1) 8010*663afb9bSAndroid Build Coastguard Workerfi 8011*663afb9bSAndroid Build Coastguard Worker 8012*663afb9bSAndroid Build Coastguard WorkerAC_LANG_RESTORE 8013*663afb9bSAndroid Build Coastguard Worker 8014*663afb9bSAndroid Build Coastguard WorkerGCC=$lt_save_GCC 8015*663afb9bSAndroid Build Coastguard WorkerCC=$lt_save_CC 8016*663afb9bSAndroid Build Coastguard WorkerCFLAGS=$lt_save_CFLAGS 8017*663afb9bSAndroid Build Coastguard Worker])# _LT_LANG_GCJ_CONFIG 8018*663afb9bSAndroid Build Coastguard Worker 8019*663afb9bSAndroid Build Coastguard Worker 8020*663afb9bSAndroid Build Coastguard Worker# _LT_LANG_GO_CONFIG([TAG]) 8021*663afb9bSAndroid Build Coastguard Worker# -------------------------- 8022*663afb9bSAndroid Build Coastguard Worker# Ensure that the configuration variables for the GNU Go compiler 8023*663afb9bSAndroid Build Coastguard Worker# are suitably defined. These variables are subsequently used by _LT_CONFIG 8024*663afb9bSAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'. 8025*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LANG_GO_CONFIG], 8026*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([LT_PROG_GO])dnl 8027*663afb9bSAndroid Build Coastguard WorkerAC_LANG_SAVE 8028*663afb9bSAndroid Build Coastguard Worker 8029*663afb9bSAndroid Build Coastguard Worker# Source file extension for Go test sources. 8030*663afb9bSAndroid Build Coastguard Workerac_ext=go 8031*663afb9bSAndroid Build Coastguard Worker 8032*663afb9bSAndroid Build Coastguard Worker# Object file extension for compiled Go test sources. 8033*663afb9bSAndroid Build Coastguard Workerobjext=o 8034*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext 8035*663afb9bSAndroid Build Coastguard Worker 8036*663afb9bSAndroid Build Coastguard Worker# Code to be used in simple compile tests 8037*663afb9bSAndroid Build Coastguard Workerlt_simple_compile_test_code="package main; func main() { }" 8038*663afb9bSAndroid Build Coastguard Worker 8039*663afb9bSAndroid Build Coastguard Worker# Code to be used in simple link tests 8040*663afb9bSAndroid Build Coastguard Workerlt_simple_link_test_code='package main; func main() { }' 8041*663afb9bSAndroid Build Coastguard Worker 8042*663afb9bSAndroid Build Coastguard Worker# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8043*663afb9bSAndroid Build Coastguard Worker_LT_TAG_COMPILER 8044*663afb9bSAndroid Build Coastguard Worker 8045*663afb9bSAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code 8046*663afb9bSAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE 8047*663afb9bSAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE 8048*663afb9bSAndroid Build Coastguard Worker 8049*663afb9bSAndroid Build Coastguard Worker# Allow CC to be a program name with arguments. 8050*663afb9bSAndroid Build Coastguard Workerlt_save_CC=$CC 8051*663afb9bSAndroid Build Coastguard Workerlt_save_CFLAGS=$CFLAGS 8052*663afb9bSAndroid Build Coastguard Workerlt_save_GCC=$GCC 8053*663afb9bSAndroid Build Coastguard WorkerGCC=yes 8054*663afb9bSAndroid Build Coastguard WorkerCC=${GOC-"gccgo"} 8055*663afb9bSAndroid Build Coastguard WorkerCFLAGS=$GOFLAGS 8056*663afb9bSAndroid Build Coastguard Workercompiler=$CC 8057*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(compiler, $1)=$CC 8058*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(LD, $1)=$LD 8059*663afb9bSAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler]) 8060*663afb9bSAndroid Build Coastguard Worker 8061*663afb9bSAndroid Build Coastguard Worker# Go did not exist at the time GCC didn't implicitly link libc in. 8062*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8063*663afb9bSAndroid Build Coastguard Worker 8064*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8065*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(reload_flag, $1)=$reload_flag 8066*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8067*663afb9bSAndroid Build Coastguard Worker 8068*663afb9bSAndroid Build Coastguard Worker## CAVEAT EMPTOR: 8069*663afb9bSAndroid Build Coastguard Worker## There is no encapsulation within the following macros, do not change 8070*663afb9bSAndroid Build Coastguard Worker## the running order or otherwise move them around unless you know exactly 8071*663afb9bSAndroid Build Coastguard Worker## what you are doing... 8072*663afb9bSAndroid Build Coastguard Workerif test -n "$compiler"; then 8073*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_NO_RTTI($1) 8074*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_PIC($1) 8075*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_C_O($1) 8076*663afb9bSAndroid Build Coastguard Worker _LT_COMPILER_FILE_LOCKS($1) 8077*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_SHLIBS($1) 8078*663afb9bSAndroid Build Coastguard Worker _LT_LINKER_HARDCODE_LIBPATH($1) 8079*663afb9bSAndroid Build Coastguard Worker 8080*663afb9bSAndroid Build Coastguard Worker _LT_CONFIG($1) 8081*663afb9bSAndroid Build Coastguard Workerfi 8082*663afb9bSAndroid Build Coastguard Worker 8083*663afb9bSAndroid Build Coastguard WorkerAC_LANG_RESTORE 8084*663afb9bSAndroid Build Coastguard Worker 8085*663afb9bSAndroid Build Coastguard WorkerGCC=$lt_save_GCC 8086*663afb9bSAndroid Build Coastguard WorkerCC=$lt_save_CC 8087*663afb9bSAndroid Build Coastguard WorkerCFLAGS=$lt_save_CFLAGS 8088*663afb9bSAndroid Build Coastguard Worker])# _LT_LANG_GO_CONFIG 8089*663afb9bSAndroid Build Coastguard Worker 8090*663afb9bSAndroid Build Coastguard Worker 8091*663afb9bSAndroid Build Coastguard Worker# _LT_LANG_RC_CONFIG([TAG]) 8092*663afb9bSAndroid Build Coastguard Worker# ------------------------- 8093*663afb9bSAndroid Build Coastguard Worker# Ensure that the configuration variables for the Windows resource compiler 8094*663afb9bSAndroid Build Coastguard Worker# are suitably defined. These variables are subsequently used by _LT_CONFIG 8095*663afb9bSAndroid Build Coastguard Worker# to write the compiler configuration to 'libtool'. 8096*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_LANG_RC_CONFIG], 8097*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([LT_PROG_RC])dnl 8098*663afb9bSAndroid Build Coastguard WorkerAC_LANG_SAVE 8099*663afb9bSAndroid Build Coastguard Worker 8100*663afb9bSAndroid Build Coastguard Worker# Source file extension for RC test sources. 8101*663afb9bSAndroid Build Coastguard Workerac_ext=rc 8102*663afb9bSAndroid Build Coastguard Worker 8103*663afb9bSAndroid Build Coastguard Worker# Object file extension for compiled RC test sources. 8104*663afb9bSAndroid Build Coastguard Workerobjext=o 8105*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(objext, $1)=$objext 8106*663afb9bSAndroid Build Coastguard Worker 8107*663afb9bSAndroid Build Coastguard Worker# Code to be used in simple compile tests 8108*663afb9bSAndroid Build Coastguard Workerlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8109*663afb9bSAndroid Build Coastguard Worker 8110*663afb9bSAndroid Build Coastguard Worker# Code to be used in simple link tests 8111*663afb9bSAndroid Build Coastguard Workerlt_simple_link_test_code=$lt_simple_compile_test_code 8112*663afb9bSAndroid Build Coastguard Worker 8113*663afb9bSAndroid Build Coastguard Worker# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8114*663afb9bSAndroid Build Coastguard Worker_LT_TAG_COMPILER 8115*663afb9bSAndroid Build Coastguard Worker 8116*663afb9bSAndroid Build Coastguard Worker# save warnings/boilerplate of simple test code 8117*663afb9bSAndroid Build Coastguard Worker_LT_COMPILER_BOILERPLATE 8118*663afb9bSAndroid Build Coastguard Worker_LT_LINKER_BOILERPLATE 8119*663afb9bSAndroid Build Coastguard Worker 8120*663afb9bSAndroid Build Coastguard Worker# Allow CC to be a program name with arguments. 8121*663afb9bSAndroid Build Coastguard Workerlt_save_CC=$CC 8122*663afb9bSAndroid Build Coastguard Workerlt_save_CFLAGS=$CFLAGS 8123*663afb9bSAndroid Build Coastguard Workerlt_save_GCC=$GCC 8124*663afb9bSAndroid Build Coastguard WorkerGCC= 8125*663afb9bSAndroid Build Coastguard WorkerCC=${RC-"windres"} 8126*663afb9bSAndroid Build Coastguard WorkerCFLAGS= 8127*663afb9bSAndroid Build Coastguard Workercompiler=$CC 8128*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(compiler, $1)=$CC 8129*663afb9bSAndroid Build Coastguard Worker_LT_CC_BASENAME([$compiler]) 8130*663afb9bSAndroid Build Coastguard Worker_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8131*663afb9bSAndroid Build Coastguard Worker 8132*663afb9bSAndroid Build Coastguard Workerif test -n "$compiler"; then 8133*663afb9bSAndroid Build Coastguard Worker : 8134*663afb9bSAndroid Build Coastguard Worker _LT_CONFIG($1) 8135*663afb9bSAndroid Build Coastguard Workerfi 8136*663afb9bSAndroid Build Coastguard Worker 8137*663afb9bSAndroid Build Coastguard WorkerGCC=$lt_save_GCC 8138*663afb9bSAndroid Build Coastguard WorkerAC_LANG_RESTORE 8139*663afb9bSAndroid Build Coastguard WorkerCC=$lt_save_CC 8140*663afb9bSAndroid Build Coastguard WorkerCFLAGS=$lt_save_CFLAGS 8141*663afb9bSAndroid Build Coastguard Worker])# _LT_LANG_RC_CONFIG 8142*663afb9bSAndroid Build Coastguard Worker 8143*663afb9bSAndroid Build Coastguard Worker 8144*663afb9bSAndroid Build Coastguard Worker# LT_PROG_GCJ 8145*663afb9bSAndroid Build Coastguard Worker# ----------- 8146*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([LT_PROG_GCJ], 8147*663afb9bSAndroid Build Coastguard Worker[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8148*663afb9bSAndroid Build Coastguard Worker [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8149*663afb9bSAndroid Build Coastguard Worker [AC_CHECK_TOOL(GCJ, gcj,) 8150*663afb9bSAndroid Build Coastguard Worker test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8151*663afb9bSAndroid Build Coastguard Worker AC_SUBST(GCJFLAGS)])])[]dnl 8152*663afb9bSAndroid Build Coastguard Worker]) 8153*663afb9bSAndroid Build Coastguard Worker 8154*663afb9bSAndroid Build Coastguard Worker# Old name: 8155*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8156*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 8157*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8158*663afb9bSAndroid Build Coastguard Worker 8159*663afb9bSAndroid Build Coastguard Worker 8160*663afb9bSAndroid Build Coastguard Worker# LT_PROG_GO 8161*663afb9bSAndroid Build Coastguard Worker# ---------- 8162*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([LT_PROG_GO], 8163*663afb9bSAndroid Build Coastguard Worker[AC_CHECK_TOOL(GOC, gccgo,) 8164*663afb9bSAndroid Build Coastguard Worker]) 8165*663afb9bSAndroid Build Coastguard Worker 8166*663afb9bSAndroid Build Coastguard Worker 8167*663afb9bSAndroid Build Coastguard Worker# LT_PROG_RC 8168*663afb9bSAndroid Build Coastguard Worker# ---------- 8169*663afb9bSAndroid Build Coastguard WorkerAC_DEFUN([LT_PROG_RC], 8170*663afb9bSAndroid Build Coastguard Worker[AC_CHECK_TOOL(RC, windres,) 8171*663afb9bSAndroid Build Coastguard Worker]) 8172*663afb9bSAndroid Build Coastguard Worker 8173*663afb9bSAndroid Build Coastguard Worker# Old name: 8174*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8175*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 8176*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([LT_AC_PROG_RC], []) 8177*663afb9bSAndroid Build Coastguard Worker 8178*663afb9bSAndroid Build Coastguard Worker 8179*663afb9bSAndroid Build Coastguard Worker# _LT_DECL_EGREP 8180*663afb9bSAndroid Build Coastguard Worker# -------------- 8181*663afb9bSAndroid Build Coastguard Worker# If we don't have a new enough Autoconf to choose the best grep 8182*663afb9bSAndroid Build Coastguard Worker# available, choose the one first in the user's PATH. 8183*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_DECL_EGREP], 8184*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([AC_PROG_EGREP])dnl 8185*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([AC_PROG_FGREP])dnl 8186*663afb9bSAndroid Build Coastguard Workertest -z "$GREP" && GREP=grep 8187*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8188*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8189*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8190*663afb9bSAndroid Build Coastguard Workerdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8191*663afb9bSAndroid Build Coastguard WorkerAC_SUBST([GREP]) 8192*663afb9bSAndroid Build Coastguard Worker]) 8193*663afb9bSAndroid Build Coastguard Worker 8194*663afb9bSAndroid Build Coastguard Worker 8195*663afb9bSAndroid Build Coastguard Worker# _LT_DECL_OBJDUMP 8196*663afb9bSAndroid Build Coastguard Worker# -------------- 8197*663afb9bSAndroid Build Coastguard Worker# If we don't have a new enough Autoconf to choose the best objdump 8198*663afb9bSAndroid Build Coastguard Worker# available, choose the one first in the user's PATH. 8199*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_DECL_OBJDUMP], 8200*663afb9bSAndroid Build Coastguard Worker[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8201*663afb9bSAndroid Build Coastguard Workertest -z "$OBJDUMP" && OBJDUMP=objdump 8202*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8203*663afb9bSAndroid Build Coastguard WorkerAC_SUBST([OBJDUMP]) 8204*663afb9bSAndroid Build Coastguard Worker]) 8205*663afb9bSAndroid Build Coastguard Worker 8206*663afb9bSAndroid Build Coastguard Worker# _LT_DECL_DLLTOOL 8207*663afb9bSAndroid Build Coastguard Worker# ---------------- 8208*663afb9bSAndroid Build Coastguard Worker# Ensure DLLTOOL variable is set. 8209*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_DECL_DLLTOOL], 8210*663afb9bSAndroid Build Coastguard Worker[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8211*663afb9bSAndroid Build Coastguard Workertest -z "$DLLTOOL" && DLLTOOL=dlltool 8212*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8213*663afb9bSAndroid Build Coastguard WorkerAC_SUBST([DLLTOOL]) 8214*663afb9bSAndroid Build Coastguard Worker]) 8215*663afb9bSAndroid Build Coastguard Worker 8216*663afb9bSAndroid Build Coastguard Worker# _LT_DECL_SED 8217*663afb9bSAndroid Build Coastguard Worker# ------------ 8218*663afb9bSAndroid Build Coastguard Worker# Check for a fully-functional sed program, that truncates 8219*663afb9bSAndroid Build Coastguard Worker# as few characters as possible. Prefer GNU sed if found. 8220*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_DECL_SED], 8221*663afb9bSAndroid Build Coastguard Worker[AC_PROG_SED 8222*663afb9bSAndroid Build Coastguard Workertest -z "$SED" && SED=sed 8223*663afb9bSAndroid Build Coastguard WorkerXsed="$SED -e 1s/^X//" 8224*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8225*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8226*663afb9bSAndroid Build Coastguard Worker [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8227*663afb9bSAndroid Build Coastguard Worker])# _LT_DECL_SED 8228*663afb9bSAndroid Build Coastguard Worker 8229*663afb9bSAndroid Build Coastguard Workerm4_ifndef([AC_PROG_SED], [ 8230*663afb9bSAndroid Build Coastguard Worker############################################################ 8231*663afb9bSAndroid Build Coastguard Worker# NOTE: This macro has been submitted for inclusion into # 8232*663afb9bSAndroid Build Coastguard Worker# GNU Autoconf as AC_PROG_SED. When it is available in # 8233*663afb9bSAndroid Build Coastguard Worker# a released version of Autoconf we should remove this # 8234*663afb9bSAndroid Build Coastguard Worker# macro and use it instead. # 8235*663afb9bSAndroid Build Coastguard Worker############################################################ 8236*663afb9bSAndroid Build Coastguard Worker 8237*663afb9bSAndroid Build Coastguard Workerm4_defun([AC_PROG_SED], 8238*663afb9bSAndroid Build Coastguard Worker[AC_MSG_CHECKING([for a sed that does not truncate output]) 8239*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_path_SED, 8240*663afb9bSAndroid Build Coastguard Worker[# Loop through the user's path and test for sed and gsed. 8241*663afb9bSAndroid Build Coastguard Worker# Then use that list of sed's as ones to test for truncation. 8242*663afb9bSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8243*663afb9bSAndroid Build Coastguard Workerfor as_dir in $PATH 8244*663afb9bSAndroid Build Coastguard Workerdo 8245*663afb9bSAndroid Build Coastguard Worker IFS=$as_save_IFS 8246*663afb9bSAndroid Build Coastguard Worker test -z "$as_dir" && as_dir=. 8247*663afb9bSAndroid Build Coastguard Worker for lt_ac_prog in sed gsed; do 8248*663afb9bSAndroid Build Coastguard Worker for ac_exec_ext in '' $ac_executable_extensions; do 8249*663afb9bSAndroid Build Coastguard Worker if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8250*663afb9bSAndroid Build Coastguard Worker lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8251*663afb9bSAndroid Build Coastguard Worker fi 8252*663afb9bSAndroid Build Coastguard Worker done 8253*663afb9bSAndroid Build Coastguard Worker done 8254*663afb9bSAndroid Build Coastguard Workerdone 8255*663afb9bSAndroid Build Coastguard WorkerIFS=$as_save_IFS 8256*663afb9bSAndroid Build Coastguard Workerlt_ac_max=0 8257*663afb9bSAndroid Build Coastguard Workerlt_ac_count=0 8258*663afb9bSAndroid Build Coastguard Worker# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8259*663afb9bSAndroid Build Coastguard Worker# along with /bin/sed that truncates output. 8260*663afb9bSAndroid Build Coastguard Workerfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8261*663afb9bSAndroid Build Coastguard Worker test ! -f "$lt_ac_sed" && continue 8262*663afb9bSAndroid Build Coastguard Worker cat /dev/null > conftest.in 8263*663afb9bSAndroid Build Coastguard Worker lt_ac_count=0 8264*663afb9bSAndroid Build Coastguard Worker echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8265*663afb9bSAndroid Build Coastguard Worker # Check for GNU sed and select it if it is found. 8266*663afb9bSAndroid Build Coastguard Worker if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8267*663afb9bSAndroid Build Coastguard Worker lt_cv_path_SED=$lt_ac_sed 8268*663afb9bSAndroid Build Coastguard Worker break 8269*663afb9bSAndroid Build Coastguard Worker fi 8270*663afb9bSAndroid Build Coastguard Worker while true; do 8271*663afb9bSAndroid Build Coastguard Worker cat conftest.in conftest.in >conftest.tmp 8272*663afb9bSAndroid Build Coastguard Worker mv conftest.tmp conftest.in 8273*663afb9bSAndroid Build Coastguard Worker cp conftest.in conftest.nl 8274*663afb9bSAndroid Build Coastguard Worker echo >>conftest.nl 8275*663afb9bSAndroid Build Coastguard Worker $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8276*663afb9bSAndroid Build Coastguard Worker cmp -s conftest.out conftest.nl || break 8277*663afb9bSAndroid Build Coastguard Worker # 10000 chars as input seems more than enough 8278*663afb9bSAndroid Build Coastguard Worker test 10 -lt "$lt_ac_count" && break 8279*663afb9bSAndroid Build Coastguard Worker lt_ac_count=`expr $lt_ac_count + 1` 8280*663afb9bSAndroid Build Coastguard Worker if test "$lt_ac_count" -gt "$lt_ac_max"; then 8281*663afb9bSAndroid Build Coastguard Worker lt_ac_max=$lt_ac_count 8282*663afb9bSAndroid Build Coastguard Worker lt_cv_path_SED=$lt_ac_sed 8283*663afb9bSAndroid Build Coastguard Worker fi 8284*663afb9bSAndroid Build Coastguard Worker done 8285*663afb9bSAndroid Build Coastguard Workerdone 8286*663afb9bSAndroid Build Coastguard Worker]) 8287*663afb9bSAndroid Build Coastguard WorkerSED=$lt_cv_path_SED 8288*663afb9bSAndroid Build Coastguard WorkerAC_SUBST([SED]) 8289*663afb9bSAndroid Build Coastguard WorkerAC_MSG_RESULT([$SED]) 8290*663afb9bSAndroid Build Coastguard Worker])#AC_PROG_SED 8291*663afb9bSAndroid Build Coastguard Worker])#m4_ifndef 8292*663afb9bSAndroid Build Coastguard Worker 8293*663afb9bSAndroid Build Coastguard Worker# Old name: 8294*663afb9bSAndroid Build Coastguard WorkerAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8295*663afb9bSAndroid Build Coastguard Workerdnl aclocal-1.4 backwards compatibility: 8296*663afb9bSAndroid Build Coastguard Workerdnl AC_DEFUN([LT_AC_PROG_SED], []) 8297*663afb9bSAndroid Build Coastguard Worker 8298*663afb9bSAndroid Build Coastguard Worker 8299*663afb9bSAndroid Build Coastguard Worker# _LT_CHECK_SHELL_FEATURES 8300*663afb9bSAndroid Build Coastguard Worker# ------------------------ 8301*663afb9bSAndroid Build Coastguard Worker# Find out whether the shell is Bourne or XSI compatible, 8302*663afb9bSAndroid Build Coastguard Worker# or has some other useful features. 8303*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_CHECK_SHELL_FEATURES], 8304*663afb9bSAndroid Build Coastguard Worker[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8305*663afb9bSAndroid Build Coastguard Worker lt_unset=unset 8306*663afb9bSAndroid Build Coastguard Workerelse 8307*663afb9bSAndroid Build Coastguard Worker lt_unset=false 8308*663afb9bSAndroid Build Coastguard Workerfi 8309*663afb9bSAndroid Build Coastguard Worker_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8310*663afb9bSAndroid Build Coastguard Worker 8311*663afb9bSAndroid Build Coastguard Worker# test EBCDIC or ASCII 8312*663afb9bSAndroid Build Coastguard Workercase `echo X|tr X '\101'` in 8313*663afb9bSAndroid Build Coastguard Worker A) # ASCII based system 8314*663afb9bSAndroid Build Coastguard Worker # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8315*663afb9bSAndroid Build Coastguard Worker lt_SP2NL='tr \040 \012' 8316*663afb9bSAndroid Build Coastguard Worker lt_NL2SP='tr \015\012 \040\040' 8317*663afb9bSAndroid Build Coastguard Worker ;; 8318*663afb9bSAndroid Build Coastguard Worker *) # EBCDIC based system 8319*663afb9bSAndroid Build Coastguard Worker lt_SP2NL='tr \100 \n' 8320*663afb9bSAndroid Build Coastguard Worker lt_NL2SP='tr \r\n \100\100' 8321*663afb9bSAndroid Build Coastguard Worker ;; 8322*663afb9bSAndroid Build Coastguard Workeresac 8323*663afb9bSAndroid Build Coastguard Worker_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8324*663afb9bSAndroid Build Coastguard Worker_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8325*663afb9bSAndroid Build Coastguard Worker])# _LT_CHECK_SHELL_FEATURES 8326*663afb9bSAndroid Build Coastguard Worker 8327*663afb9bSAndroid Build Coastguard Worker 8328*663afb9bSAndroid Build Coastguard Worker# _LT_PATH_CONVERSION_FUNCTIONS 8329*663afb9bSAndroid Build Coastguard Worker# ----------------------------- 8330*663afb9bSAndroid Build Coastguard Worker# Determine what file name conversion functions should be used by 8331*663afb9bSAndroid Build Coastguard Worker# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8332*663afb9bSAndroid Build Coastguard Worker# for certain cross-compile configurations and native mingw. 8333*663afb9bSAndroid Build Coastguard Workerm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8334*663afb9bSAndroid Build Coastguard Worker[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8335*663afb9bSAndroid Build Coastguard WorkerAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8336*663afb9bSAndroid Build Coastguard WorkerAC_MSG_CHECKING([how to convert $build file names to $host format]) 8337*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8338*663afb9bSAndroid Build Coastguard Worker[case $host in 8339*663afb9bSAndroid Build Coastguard Worker *-*-mingw* ) 8340*663afb9bSAndroid Build Coastguard Worker case $build in 8341*663afb9bSAndroid Build Coastguard Worker *-*-mingw* ) # actually msys 8342*663afb9bSAndroid Build Coastguard Worker lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8343*663afb9bSAndroid Build Coastguard Worker ;; 8344*663afb9bSAndroid Build Coastguard Worker *-*-cygwin* ) 8345*663afb9bSAndroid Build Coastguard Worker lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8346*663afb9bSAndroid Build Coastguard Worker ;; 8347*663afb9bSAndroid Build Coastguard Worker * ) # otherwise, assume *nix 8348*663afb9bSAndroid Build Coastguard Worker lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8349*663afb9bSAndroid Build Coastguard Worker ;; 8350*663afb9bSAndroid Build Coastguard Worker esac 8351*663afb9bSAndroid Build Coastguard Worker ;; 8352*663afb9bSAndroid Build Coastguard Worker *-*-cygwin* ) 8353*663afb9bSAndroid Build Coastguard Worker case $build in 8354*663afb9bSAndroid Build Coastguard Worker *-*-mingw* ) # actually msys 8355*663afb9bSAndroid Build Coastguard Worker lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8356*663afb9bSAndroid Build Coastguard Worker ;; 8357*663afb9bSAndroid Build Coastguard Worker *-*-cygwin* ) 8358*663afb9bSAndroid Build Coastguard Worker lt_cv_to_host_file_cmd=func_convert_file_noop 8359*663afb9bSAndroid Build Coastguard Worker ;; 8360*663afb9bSAndroid Build Coastguard Worker * ) # otherwise, assume *nix 8361*663afb9bSAndroid Build Coastguard Worker lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8362*663afb9bSAndroid Build Coastguard Worker ;; 8363*663afb9bSAndroid Build Coastguard Worker esac 8364*663afb9bSAndroid Build Coastguard Worker ;; 8365*663afb9bSAndroid Build Coastguard Worker * ) # unhandled hosts (and "normal" native builds) 8366*663afb9bSAndroid Build Coastguard Worker lt_cv_to_host_file_cmd=func_convert_file_noop 8367*663afb9bSAndroid Build Coastguard Worker ;; 8368*663afb9bSAndroid Build Coastguard Workeresac 8369*663afb9bSAndroid Build Coastguard Worker]) 8370*663afb9bSAndroid Build Coastguard Workerto_host_file_cmd=$lt_cv_to_host_file_cmd 8371*663afb9bSAndroid Build Coastguard WorkerAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8372*663afb9bSAndroid Build Coastguard Worker_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8373*663afb9bSAndroid Build Coastguard Worker [0], [convert $build file names to $host format])dnl 8374*663afb9bSAndroid Build Coastguard Worker 8375*663afb9bSAndroid Build Coastguard WorkerAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8376*663afb9bSAndroid Build Coastguard WorkerAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8377*663afb9bSAndroid Build Coastguard Worker[#assume ordinary cross tools, or native build. 8378*663afb9bSAndroid Build Coastguard Workerlt_cv_to_tool_file_cmd=func_convert_file_noop 8379*663afb9bSAndroid Build Coastguard Workercase $host in 8380*663afb9bSAndroid Build Coastguard Worker *-*-mingw* ) 8381*663afb9bSAndroid Build Coastguard Worker case $build in 8382*663afb9bSAndroid Build Coastguard Worker *-*-mingw* ) # actually msys 8383*663afb9bSAndroid Build Coastguard Worker lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8384*663afb9bSAndroid Build Coastguard Worker ;; 8385*663afb9bSAndroid Build Coastguard Worker esac 8386*663afb9bSAndroid Build Coastguard Worker ;; 8387*663afb9bSAndroid Build Coastguard Workeresac 8388*663afb9bSAndroid Build Coastguard Worker]) 8389*663afb9bSAndroid Build Coastguard Workerto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8390*663afb9bSAndroid Build Coastguard WorkerAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8391*663afb9bSAndroid Build Coastguard Worker_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8392*663afb9bSAndroid Build Coastguard Worker [0], [convert $build files to toolchain format])dnl 8393*663afb9bSAndroid Build Coastguard Worker])# _LT_PATH_CONVERSION_FUNCTIONS 8394