1*44704f69SBart Van Assche# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 2*44704f69SBart Van Assche 3*44704f69SBart Van Assche# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4*44704f69SBart Van Assche 5*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 6*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 7*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 8*44704f69SBart Van Assche 9*44704f69SBart Van Assche# This program is distributed in the hope that it will be useful, 10*44704f69SBart Van Assche# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11*44704f69SBart Van Assche# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12*44704f69SBart Van Assche# PARTICULAR PURPOSE. 13*44704f69SBart Van Assche 14*44704f69SBart Van Asschem4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15*44704f69SBart Van Asschem4_ifndef([AC_AUTOCONF_VERSION], 16*44704f69SBart Van Assche [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17*44704f69SBart Van Asschem4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18*44704f69SBart Van Assche[m4_warning([this file was generated for autoconf 2.71. 19*44704f69SBart Van AsscheYou have another version of autoconf. It may work, but is not guaranteed to. 20*44704f69SBart Van AsscheIf you have problems, you may need to regenerate the build system entirely. 21*44704f69SBart Van AsscheTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22*44704f69SBart Van Assche 23*44704f69SBart Van Assche# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24*44704f69SBart Van Assche# 25*44704f69SBart Van Assche# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 26*44704f69SBart Van Assche# Foundation, Inc. 27*44704f69SBart Van Assche# Written by Gordon Matzigkeit, 1996 28*44704f69SBart Van Assche# 29*44704f69SBart Van Assche# This file is free software; the Free Software Foundation gives 30*44704f69SBart Van Assche# unlimited permission to copy and/or distribute it, with or without 31*44704f69SBart Van Assche# modifications, as long as this notice is preserved. 32*44704f69SBart Van Assche 33*44704f69SBart Van Asschem4_define([_LT_COPYING], [dnl 34*44704f69SBart Van Assche# Copyright (C) 2014 Free Software Foundation, Inc. 35*44704f69SBart Van Assche# This is free software; see the source for copying conditions. There is NO 36*44704f69SBart Van Assche# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 37*44704f69SBart Van Assche 38*44704f69SBart Van Assche# GNU Libtool is free software; you can redistribute it and/or modify 39*44704f69SBart Van Assche# it under the terms of the GNU General Public License as published by 40*44704f69SBart Van Assche# the Free Software Foundation; either version 2 of of the License, or 41*44704f69SBart Van Assche# (at your option) any later version. 42*44704f69SBart Van Assche# 43*44704f69SBart Van Assche# As a special exception to the GNU General Public License, if you 44*44704f69SBart Van Assche# distribute this file as part of a program or library that is built 45*44704f69SBart Van Assche# using GNU Libtool, you may include this file under the same 46*44704f69SBart Van Assche# distribution terms that you use for the rest of that program. 47*44704f69SBart Van Assche# 48*44704f69SBart Van Assche# GNU Libtool is distributed in the hope that it will be useful, but 49*44704f69SBart Van Assche# WITHOUT ANY WARRANTY; without even the implied warranty of 50*44704f69SBart Van Assche# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 51*44704f69SBart Van Assche# GNU General Public License for more details. 52*44704f69SBart Van Assche# 53*44704f69SBart Van Assche# You should have received a copy of the GNU General Public License 54*44704f69SBart Van Assche# along with this program. If not, see <http://www.gnu.org/licenses/>. 55*44704f69SBart Van Assche]) 56*44704f69SBart Van Assche 57*44704f69SBart Van Assche# serial 59 LT_INIT 58*44704f69SBart Van Assche 59*44704f69SBart Van Assche 60*44704f69SBart Van Assche# LT_PREREQ(VERSION) 61*44704f69SBart Van Assche# ------------------ 62*44704f69SBart Van Assche# Complain and exit if this libtool version is less that VERSION. 63*44704f69SBart Van Asschem4_defun([LT_PREREQ], 64*44704f69SBart Van Assche[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 65*44704f69SBart Van Assche [m4_default([$3], 66*44704f69SBart Van Assche [m4_fatal([Libtool version $1 or higher is required], 67*44704f69SBart Van Assche 63)])], 68*44704f69SBart Van Assche [$2])]) 69*44704f69SBart Van Assche 70*44704f69SBart Van Assche 71*44704f69SBart Van Assche# _LT_CHECK_BUILDDIR 72*44704f69SBart Van Assche# ------------------ 73*44704f69SBart Van Assche# Complain if the absolute build directory name contains unusual characters 74*44704f69SBart Van Asschem4_defun([_LT_CHECK_BUILDDIR], 75*44704f69SBart Van Assche[case `pwd` in 76*44704f69SBart Van Assche *\ * | *\ *) 77*44704f69SBart Van Assche AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 78*44704f69SBart Van Asscheesac 79*44704f69SBart Van Assche]) 80*44704f69SBart Van Assche 81*44704f69SBart Van Assche 82*44704f69SBart Van Assche# LT_INIT([OPTIONS]) 83*44704f69SBart Van Assche# ------------------ 84*44704f69SBart Van AsscheAC_DEFUN([LT_INIT], 85*44704f69SBart Van Assche[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 86*44704f69SBart Van AsscheAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 87*44704f69SBart Van AsscheAC_BEFORE([$0], [LT_LANG])dnl 88*44704f69SBart Van AsscheAC_BEFORE([$0], [LT_OUTPUT])dnl 89*44704f69SBart Van AsscheAC_BEFORE([$0], [LTDL_INIT])dnl 90*44704f69SBart Van Asschem4_require([_LT_CHECK_BUILDDIR])dnl 91*44704f69SBart Van Assche 92*44704f69SBart Van Asschednl Autoconf doesn't catch unexpanded LT_ macros by default: 93*44704f69SBart Van Asschem4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 94*44704f69SBart Van Asschem4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 95*44704f69SBart Van Asschednl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 96*44704f69SBart Van Asschednl unless we require an AC_DEFUNed macro: 97*44704f69SBart Van AsscheAC_REQUIRE([LTOPTIONS_VERSION])dnl 98*44704f69SBart Van AsscheAC_REQUIRE([LTSUGAR_VERSION])dnl 99*44704f69SBart Van AsscheAC_REQUIRE([LTVERSION_VERSION])dnl 100*44704f69SBart Van AsscheAC_REQUIRE([LTOBSOLETE_VERSION])dnl 101*44704f69SBart Van Asschem4_require([_LT_PROG_LTMAIN])dnl 102*44704f69SBart Van Assche 103*44704f69SBart Van Assche_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 104*44704f69SBart Van Assche 105*44704f69SBart Van Asschednl Parse OPTIONS 106*44704f69SBart Van Assche_LT_SET_OPTIONS([$0], [$1]) 107*44704f69SBart Van Assche 108*44704f69SBart Van Assche# This can be used to rebuild libtool when needed 109*44704f69SBart Van AsscheLIBTOOL_DEPS=$ltmain 110*44704f69SBart Van Assche 111*44704f69SBart Van Assche# Always use our own libtool. 112*44704f69SBart Van AsscheLIBTOOL='$(SHELL) $(top_builddir)/libtool' 113*44704f69SBart Van AsscheAC_SUBST(LIBTOOL)dnl 114*44704f69SBart Van Assche 115*44704f69SBart Van Assche_LT_SETUP 116*44704f69SBart Van Assche 117*44704f69SBart Van Assche# Only expand once: 118*44704f69SBart Van Asschem4_define([LT_INIT]) 119*44704f69SBart Van Assche])# LT_INIT 120*44704f69SBart Van Assche 121*44704f69SBart Van Assche# Old names: 122*44704f69SBart Van AsscheAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 123*44704f69SBart Van AsscheAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 124*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 125*44704f69SBart Van Asschednl AC_DEFUN([AC_PROG_LIBTOOL], []) 126*44704f69SBart Van Asschednl AC_DEFUN([AM_PROG_LIBTOOL], []) 127*44704f69SBart Van Assche 128*44704f69SBart Van Assche 129*44704f69SBart Van Assche# _LT_PREPARE_CC_BASENAME 130*44704f69SBart Van Assche# ----------------------- 131*44704f69SBart Van Asschem4_defun([_LT_PREPARE_CC_BASENAME], [ 132*44704f69SBart Van Assche# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 133*44704f69SBart Van Asschefunc_cc_basename () 134*44704f69SBart Van Assche{ 135*44704f69SBart Van Assche for cc_temp in @S|@*""; do 136*44704f69SBart Van Assche case $cc_temp in 137*44704f69SBart Van Assche compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 138*44704f69SBart Van Assche distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 139*44704f69SBart Van Assche \-*) ;; 140*44704f69SBart Van Assche *) break;; 141*44704f69SBart Van Assche esac 142*44704f69SBart Van Assche done 143*44704f69SBart Van Assche func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 144*44704f69SBart Van Assche} 145*44704f69SBart Van Assche])# _LT_PREPARE_CC_BASENAME 146*44704f69SBart Van Assche 147*44704f69SBart Van Assche 148*44704f69SBart Van Assche# _LT_CC_BASENAME(CC) 149*44704f69SBart Van Assche# ------------------- 150*44704f69SBart Van Assche# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 151*44704f69SBart Van Assche# but that macro is also expanded into generated libtool script, which 152*44704f69SBart Van Assche# arranges for $SED and $ECHO to be set by different means. 153*44704f69SBart Van Asschem4_defun([_LT_CC_BASENAME], 154*44704f69SBart Van Assche[m4_require([_LT_PREPARE_CC_BASENAME])dnl 155*44704f69SBart Van AsscheAC_REQUIRE([_LT_DECL_SED])dnl 156*44704f69SBart Van AsscheAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 157*44704f69SBart Van Asschefunc_cc_basename $1 158*44704f69SBart Van Asschecc_basename=$func_cc_basename_result 159*44704f69SBart Van Assche]) 160*44704f69SBart Van Assche 161*44704f69SBart Van Assche 162*44704f69SBart Van Assche# _LT_FILEUTILS_DEFAULTS 163*44704f69SBart Van Assche# ---------------------- 164*44704f69SBart Van Assche# It is okay to use these file commands and assume they have been set 165*44704f69SBart Van Assche# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 166*44704f69SBart Van Asschem4_defun([_LT_FILEUTILS_DEFAULTS], 167*44704f69SBart Van Assche[: ${CP="cp -f"} 168*44704f69SBart Van Assche: ${MV="mv -f"} 169*44704f69SBart Van Assche: ${RM="rm -f"} 170*44704f69SBart Van Assche])# _LT_FILEUTILS_DEFAULTS 171*44704f69SBart Van Assche 172*44704f69SBart Van Assche 173*44704f69SBart Van Assche# _LT_SETUP 174*44704f69SBart Van Assche# --------- 175*44704f69SBart Van Asschem4_defun([_LT_SETUP], 176*44704f69SBart Van Assche[AC_REQUIRE([AC_CANONICAL_HOST])dnl 177*44704f69SBart Van AsscheAC_REQUIRE([AC_CANONICAL_BUILD])dnl 178*44704f69SBart Van AsscheAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 179*44704f69SBart Van AsscheAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 180*44704f69SBart Van Assche 181*44704f69SBart Van Assche_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 182*44704f69SBart Van Asschednl 183*44704f69SBart Van Assche_LT_DECL([], [host_alias], [0], [The host system])dnl 184*44704f69SBart Van Assche_LT_DECL([], [host], [0])dnl 185*44704f69SBart Van Assche_LT_DECL([], [host_os], [0])dnl 186*44704f69SBart Van Asschednl 187*44704f69SBart Van Assche_LT_DECL([], [build_alias], [0], [The build system])dnl 188*44704f69SBart Van Assche_LT_DECL([], [build], [0])dnl 189*44704f69SBart Van Assche_LT_DECL([], [build_os], [0])dnl 190*44704f69SBart Van Asschednl 191*44704f69SBart Van AsscheAC_REQUIRE([AC_PROG_CC])dnl 192*44704f69SBart Van AsscheAC_REQUIRE([LT_PATH_LD])dnl 193*44704f69SBart Van AsscheAC_REQUIRE([LT_PATH_NM])dnl 194*44704f69SBart Van Asschednl 195*44704f69SBart Van AsscheAC_REQUIRE([AC_PROG_LN_S])dnl 196*44704f69SBart Van Asschetest -z "$LN_S" && LN_S="ln -s" 197*44704f69SBart Van Assche_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 198*44704f69SBart Van Asschednl 199*44704f69SBart Van AsscheAC_REQUIRE([LT_CMD_MAX_LEN])dnl 200*44704f69SBart Van Assche_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 201*44704f69SBart Van Assche_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 202*44704f69SBart Van Asschednl 203*44704f69SBart Van Asschem4_require([_LT_FILEUTILS_DEFAULTS])dnl 204*44704f69SBart Van Asschem4_require([_LT_CHECK_SHELL_FEATURES])dnl 205*44704f69SBart Van Asschem4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 206*44704f69SBart Van Asschem4_require([_LT_CMD_RELOAD])dnl 207*44704f69SBart Van Asschem4_require([_LT_DECL_FILECMD])dnl 208*44704f69SBart Van Asschem4_require([_LT_CHECK_MAGIC_METHOD])dnl 209*44704f69SBart Van Asschem4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 210*44704f69SBart Van Asschem4_require([_LT_CMD_OLD_ARCHIVE])dnl 211*44704f69SBart Van Asschem4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 212*44704f69SBart Van Asschem4_require([_LT_WITH_SYSROOT])dnl 213*44704f69SBart Van Asschem4_require([_LT_CMD_TRUNCATE])dnl 214*44704f69SBart Van Assche 215*44704f69SBart Van Assche_LT_CONFIG_LIBTOOL_INIT([ 216*44704f69SBart Van Assche# See if we are running on zsh, and set the options that allow our 217*44704f69SBart Van Assche# commands through without removal of \ escapes INIT. 218*44704f69SBart Van Asscheif test -n "\${ZSH_VERSION+set}"; then 219*44704f69SBart Van Assche setopt NO_GLOB_SUBST 220*44704f69SBart Van Asschefi 221*44704f69SBart Van Assche]) 222*44704f69SBart Van Asscheif test -n "${ZSH_VERSION+set}"; then 223*44704f69SBart Van Assche setopt NO_GLOB_SUBST 224*44704f69SBart Van Asschefi 225*44704f69SBart Van Assche 226*44704f69SBart Van Assche_LT_CHECK_OBJDIR 227*44704f69SBart Van Assche 228*44704f69SBart Van Asschem4_require([_LT_TAG_COMPILER])dnl 229*44704f69SBart Van Assche 230*44704f69SBart Van Asschecase $host_os in 231*44704f69SBart Van Asscheaix3*) 232*44704f69SBart Van Assche # AIX sometimes has problems with the GCC collect2 program. For some 233*44704f69SBart Van Assche # reason, if we set the COLLECT_NAMES environment variable, the problems 234*44704f69SBart Van Assche # vanish in a puff of smoke. 235*44704f69SBart Van Assche if test set != "${COLLECT_NAMES+set}"; then 236*44704f69SBart Van Assche COLLECT_NAMES= 237*44704f69SBart Van Assche export COLLECT_NAMES 238*44704f69SBart Van Assche fi 239*44704f69SBart Van Assche ;; 240*44704f69SBart Van Asscheesac 241*44704f69SBart Van Assche 242*44704f69SBart Van Assche# Global variables: 243*44704f69SBart Van Asscheofile=libtool 244*44704f69SBart Van Asschecan_build_shared=yes 245*44704f69SBart Van Assche 246*44704f69SBart Van Assche# All known linkers require a '.a' archive for static linking (except MSVC and 247*44704f69SBart Van Assche# ICC, which need '.lib'). 248*44704f69SBart Van Asschelibext=a 249*44704f69SBart Van Assche 250*44704f69SBart Van Asschewith_gnu_ld=$lt_cv_prog_gnu_ld 251*44704f69SBart Van Assche 252*44704f69SBart Van Asscheold_CC=$CC 253*44704f69SBart Van Asscheold_CFLAGS=$CFLAGS 254*44704f69SBart Van Assche 255*44704f69SBart Van Assche# Set sane defaults for various variables 256*44704f69SBart Van Asschetest -z "$CC" && CC=cc 257*44704f69SBart Van Asschetest -z "$LTCC" && LTCC=$CC 258*44704f69SBart Van Asschetest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 259*44704f69SBart Van Asschetest -z "$LD" && LD=ld 260*44704f69SBart Van Asschetest -z "$ac_objext" && ac_objext=o 261*44704f69SBart Van Assche 262*44704f69SBart Van Assche_LT_CC_BASENAME([$compiler]) 263*44704f69SBart Van Assche 264*44704f69SBart Van Assche# Only perform the check for file, if the check method requires it 265*44704f69SBart Van Asschetest -z "$MAGIC_CMD" && MAGIC_CMD=file 266*44704f69SBart Van Asschecase $deplibs_check_method in 267*44704f69SBart Van Asschefile_magic*) 268*44704f69SBart Van Assche if test "$file_magic_cmd" = '$MAGIC_CMD'; then 269*44704f69SBart Van Assche _LT_PATH_MAGIC 270*44704f69SBart Van Assche fi 271*44704f69SBart Van Assche ;; 272*44704f69SBart Van Asscheesac 273*44704f69SBart Van Assche 274*44704f69SBart Van Assche# Use C for the default configuration in the libtool script 275*44704f69SBart Van AsscheLT_SUPPORTED_TAG([CC]) 276*44704f69SBart Van Assche_LT_LANG_C_CONFIG 277*44704f69SBart Van Assche_LT_LANG_DEFAULT_CONFIG 278*44704f69SBart Van Assche_LT_CONFIG_COMMANDS 279*44704f69SBart Van Assche])# _LT_SETUP 280*44704f69SBart Van Assche 281*44704f69SBart Van Assche 282*44704f69SBart Van Assche# _LT_PREPARE_SED_QUOTE_VARS 283*44704f69SBart Van Assche# -------------------------- 284*44704f69SBart Van Assche# Define a few sed substitution that help us do robust quoting. 285*44704f69SBart Van Asschem4_defun([_LT_PREPARE_SED_QUOTE_VARS], 286*44704f69SBart Van Assche[# Backslashify metacharacters that are still active within 287*44704f69SBart Van Assche# double-quoted strings. 288*44704f69SBart Van Asschesed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 289*44704f69SBart Van Assche 290*44704f69SBart Van Assche# Same as above, but do not quote variable references. 291*44704f69SBart Van Asschedouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 292*44704f69SBart Van Assche 293*44704f69SBart Van Assche# Sed substitution to delay expansion of an escaped shell variable in a 294*44704f69SBart Van Assche# double_quote_subst'ed string. 295*44704f69SBart Van Asschedelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 296*44704f69SBart Van Assche 297*44704f69SBart Van Assche# Sed substitution to delay expansion of an escaped single quote. 298*44704f69SBart Van Asschedelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 299*44704f69SBart Van Assche 300*44704f69SBart Van Assche# Sed substitution to avoid accidental globbing in evaled expressions 301*44704f69SBart Van Asscheno_glob_subst='s/\*/\\\*/g' 302*44704f69SBart Van Assche]) 303*44704f69SBart Van Assche 304*44704f69SBart Van Assche# _LT_PROG_LTMAIN 305*44704f69SBart Van Assche# --------------- 306*44704f69SBart Van Assche# Note that this code is called both from 'configure', and 'config.status' 307*44704f69SBart Van Assche# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 308*44704f69SBart Van Assche# 'config.status' has no value for ac_aux_dir unless we are using Automake, 309*44704f69SBart Van Assche# so we pass a copy along to make sure it has a sensible value anyway. 310*44704f69SBart Van Asschem4_defun([_LT_PROG_LTMAIN], 311*44704f69SBart Van Assche[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 312*44704f69SBart Van Assche_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 313*44704f69SBart Van Asscheltmain=$ac_aux_dir/ltmain.sh 314*44704f69SBart Van Assche])# _LT_PROG_LTMAIN 315*44704f69SBart Van Assche 316*44704f69SBart Van Assche 317*44704f69SBart Van Assche 318*44704f69SBart Van Assche# So that we can recreate a full libtool script including additional 319*44704f69SBart Van Assche# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 320*44704f69SBart Van Assche# in macros and then make a single call at the end using the 'libtool' 321*44704f69SBart Van Assche# label. 322*44704f69SBart Van Assche 323*44704f69SBart Van Assche 324*44704f69SBart Van Assche# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 325*44704f69SBart Van Assche# ---------------------------------------- 326*44704f69SBart Van Assche# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 327*44704f69SBart Van Asschem4_define([_LT_CONFIG_LIBTOOL_INIT], 328*44704f69SBart Van Assche[m4_ifval([$1], 329*44704f69SBart Van Assche [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 330*44704f69SBart Van Assche [$1 331*44704f69SBart Van Assche])])]) 332*44704f69SBart Van Assche 333*44704f69SBart Van Assche# Initialize. 334*44704f69SBart Van Asschem4_define([_LT_OUTPUT_LIBTOOL_INIT]) 335*44704f69SBart Van Assche 336*44704f69SBart Van Assche 337*44704f69SBart Van Assche# _LT_CONFIG_LIBTOOL([COMMANDS]) 338*44704f69SBart Van Assche# ------------------------------ 339*44704f69SBart Van Assche# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 340*44704f69SBart Van Asschem4_define([_LT_CONFIG_LIBTOOL], 341*44704f69SBart Van Assche[m4_ifval([$1], 342*44704f69SBart Van Assche [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 343*44704f69SBart Van Assche [$1 344*44704f69SBart Van Assche])])]) 345*44704f69SBart Van Assche 346*44704f69SBart Van Assche# Initialize. 347*44704f69SBart Van Asschem4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 348*44704f69SBart Van Assche 349*44704f69SBart Van Assche 350*44704f69SBart Van Assche# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 351*44704f69SBart Van Assche# ----------------------------------------------------- 352*44704f69SBart Van Asschem4_defun([_LT_CONFIG_SAVE_COMMANDS], 353*44704f69SBart Van Assche[_LT_CONFIG_LIBTOOL([$1]) 354*44704f69SBart Van Assche_LT_CONFIG_LIBTOOL_INIT([$2]) 355*44704f69SBart Van Assche]) 356*44704f69SBart Van Assche 357*44704f69SBart Van Assche 358*44704f69SBart Van Assche# _LT_FORMAT_COMMENT([COMMENT]) 359*44704f69SBart Van Assche# ----------------------------- 360*44704f69SBart Van Assche# Add leading comment marks to the start of each line, and a trailing 361*44704f69SBart Van Assche# full-stop to the whole comment if one is not present already. 362*44704f69SBart Van Asschem4_define([_LT_FORMAT_COMMENT], 363*44704f69SBart Van Assche[m4_ifval([$1], [ 364*44704f69SBart Van Asschem4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 365*44704f69SBart Van Assche [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 366*44704f69SBart Van Assche)]) 367*44704f69SBart Van Assche 368*44704f69SBart Van Assche 369*44704f69SBart Van Assche 370*44704f69SBart Van Assche 371*44704f69SBart Van Assche 372*44704f69SBart Van Assche# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 373*44704f69SBart Van Assche# ------------------------------------------------------------------- 374*44704f69SBart Van Assche# CONFIGNAME is the name given to the value in the libtool script. 375*44704f69SBart Van Assche# VARNAME is the (base) name used in the configure script. 376*44704f69SBart Van Assche# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 377*44704f69SBart Van Assche# VARNAME. Any other value will be used directly. 378*44704f69SBart Van Asschem4_define([_LT_DECL], 379*44704f69SBart Van Assche[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 380*44704f69SBart Van Assche [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 381*44704f69SBart Van Assche [m4_ifval([$1], [$1], [$2])]) 382*44704f69SBart Van Assche lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 383*44704f69SBart Van Assche m4_ifval([$4], 384*44704f69SBart Van Assche [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 385*44704f69SBart Van Assche lt_dict_add_subkey([lt_decl_dict], [$2], 386*44704f69SBart Van Assche [tagged?], [m4_ifval([$5], [yes], [no])])]) 387*44704f69SBart Van Assche]) 388*44704f69SBart Van Assche 389*44704f69SBart Van Assche 390*44704f69SBart Van Assche# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 391*44704f69SBart Van Assche# -------------------------------------------------------- 392*44704f69SBart Van Asschem4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 393*44704f69SBart Van Assche 394*44704f69SBart Van Assche 395*44704f69SBart Van Assche# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 396*44704f69SBart Van Assche# ------------------------------------------------ 397*44704f69SBart Van Asschem4_define([lt_decl_tag_varnames], 398*44704f69SBart Van Assche[_lt_decl_filter([tagged?], [yes], $@)]) 399*44704f69SBart Van Assche 400*44704f69SBart Van Assche 401*44704f69SBart Van Assche# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 402*44704f69SBart Van Assche# --------------------------------------------------------- 403*44704f69SBart Van Asschem4_define([_lt_decl_filter], 404*44704f69SBart Van Assche[m4_case([$#], 405*44704f69SBart Van Assche [0], [m4_fatal([$0: too few arguments: $#])], 406*44704f69SBart Van Assche [1], [m4_fatal([$0: too few arguments: $#: $1])], 407*44704f69SBart Van Assche [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 408*44704f69SBart Van Assche [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 409*44704f69SBart Van Assche [lt_dict_filter([lt_decl_dict], $@)])[]dnl 410*44704f69SBart Van Assche]) 411*44704f69SBart Van Assche 412*44704f69SBart Van Assche 413*44704f69SBart Van Assche# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 414*44704f69SBart Van Assche# -------------------------------------------------- 415*44704f69SBart Van Asschem4_define([lt_decl_quote_varnames], 416*44704f69SBart Van Assche[_lt_decl_filter([value], [1], $@)]) 417*44704f69SBart Van Assche 418*44704f69SBart Van Assche 419*44704f69SBart Van Assche# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 420*44704f69SBart Van Assche# --------------------------------------------------- 421*44704f69SBart Van Asschem4_define([lt_decl_dquote_varnames], 422*44704f69SBart Van Assche[_lt_decl_filter([value], [2], $@)]) 423*44704f69SBart Van Assche 424*44704f69SBart Van Assche 425*44704f69SBart Van Assche# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 426*44704f69SBart Van Assche# --------------------------------------------------- 427*44704f69SBart Van Asschem4_define([lt_decl_varnames_tagged], 428*44704f69SBart Van Assche[m4_assert([$# <= 2])dnl 429*44704f69SBart Van Assche_$0(m4_quote(m4_default([$1], [[, ]])), 430*44704f69SBart Van Assche m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 431*44704f69SBart Van Assche m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 432*44704f69SBart Van Asschem4_define([_lt_decl_varnames_tagged], 433*44704f69SBart Van Assche[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 434*44704f69SBart Van Assche 435*44704f69SBart Van Assche 436*44704f69SBart Van Assche# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 437*44704f69SBart Van Assche# ------------------------------------------------ 438*44704f69SBart Van Asschem4_define([lt_decl_all_varnames], 439*44704f69SBart Van Assche[_$0(m4_quote(m4_default([$1], [[, ]])), 440*44704f69SBart Van Assche m4_if([$2], [], 441*44704f69SBart Van Assche m4_quote(lt_decl_varnames), 442*44704f69SBart Van Assche m4_quote(m4_shift($@))))[]dnl 443*44704f69SBart Van Assche]) 444*44704f69SBart Van Asschem4_define([_lt_decl_all_varnames], 445*44704f69SBart Van Assche[lt_join($@, lt_decl_varnames_tagged([$1], 446*44704f69SBart Van Assche lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 447*44704f69SBart Van Assche]) 448*44704f69SBart Van Assche 449*44704f69SBart Van Assche 450*44704f69SBart Van Assche# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 451*44704f69SBart Van Assche# ------------------------------------ 452*44704f69SBart Van Assche# Quote a variable value, and forward it to 'config.status' so that its 453*44704f69SBart Van Assche# declaration there will have the same value as in 'configure'. VARNAME 454*44704f69SBart Van Assche# must have a single quote delimited value for this to work. 455*44704f69SBart Van Asschem4_define([_LT_CONFIG_STATUS_DECLARE], 456*44704f69SBart Van Assche[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 457*44704f69SBart Van Assche 458*44704f69SBart Van Assche 459*44704f69SBart Van Assche# _LT_CONFIG_STATUS_DECLARATIONS 460*44704f69SBart Van Assche# ------------------------------ 461*44704f69SBart Van Assche# We delimit libtool config variables with single quotes, so when 462*44704f69SBart Van Assche# we write them to config.status, we have to be sure to quote all 463*44704f69SBart Van Assche# embedded single quotes properly. In configure, this macro expands 464*44704f69SBart Van Assche# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 465*44704f69SBart Van Assche# 466*44704f69SBart Van Assche# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 467*44704f69SBart Van Asschem4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 468*44704f69SBart Van Assche[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 469*44704f69SBart Van Assche [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 470*44704f69SBart Van Assche 471*44704f69SBart Van Assche 472*44704f69SBart Van Assche# _LT_LIBTOOL_TAGS 473*44704f69SBart Van Assche# ---------------- 474*44704f69SBart Van Assche# Output comment and list of tags supported by the script 475*44704f69SBart Van Asschem4_defun([_LT_LIBTOOL_TAGS], 476*44704f69SBart Van Assche[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 477*44704f69SBart Van Asscheavailable_tags='_LT_TAGS'dnl 478*44704f69SBart Van Assche]) 479*44704f69SBart Van Assche 480*44704f69SBart Van Assche 481*44704f69SBart Van Assche# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 482*44704f69SBart Van Assche# ----------------------------------- 483*44704f69SBart Van Assche# Extract the dictionary values for VARNAME (optionally with TAG) and 484*44704f69SBart Van Assche# expand to a commented shell variable setting: 485*44704f69SBart Van Assche# 486*44704f69SBart Van Assche# # Some comment about what VAR is for. 487*44704f69SBart Van Assche# visible_name=$lt_internal_name 488*44704f69SBart Van Asschem4_define([_LT_LIBTOOL_DECLARE], 489*44704f69SBart Van Assche[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 490*44704f69SBart Van Assche [description])))[]dnl 491*44704f69SBart Van Asschem4_pushdef([_libtool_name], 492*44704f69SBart Van Assche m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 493*44704f69SBart Van Asschem4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 494*44704f69SBart Van Assche [0], [_libtool_name=[$]$1], 495*44704f69SBart Van Assche [1], [_libtool_name=$lt_[]$1], 496*44704f69SBart Van Assche [2], [_libtool_name=$lt_[]$1], 497*44704f69SBart Van Assche [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 498*44704f69SBart Van Asschem4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 499*44704f69SBart Van Assche]) 500*44704f69SBart Van Assche 501*44704f69SBart Van Assche 502*44704f69SBart Van Assche# _LT_LIBTOOL_CONFIG_VARS 503*44704f69SBart Van Assche# ----------------------- 504*44704f69SBart Van Assche# Produce commented declarations of non-tagged libtool config variables 505*44704f69SBart Van Assche# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 506*44704f69SBart Van Assche# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 507*44704f69SBart Van Assche# section) are produced by _LT_LIBTOOL_TAG_VARS. 508*44704f69SBart Van Asschem4_defun([_LT_LIBTOOL_CONFIG_VARS], 509*44704f69SBart Van Assche[m4_foreach([_lt_var], 510*44704f69SBart Van Assche m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 511*44704f69SBart Van Assche [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 512*44704f69SBart Van Assche 513*44704f69SBart Van Assche 514*44704f69SBart Van Assche# _LT_LIBTOOL_TAG_VARS(TAG) 515*44704f69SBart Van Assche# ------------------------- 516*44704f69SBart Van Asschem4_define([_LT_LIBTOOL_TAG_VARS], 517*44704f69SBart Van Assche[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 518*44704f69SBart Van Assche [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 519*44704f69SBart Van Assche 520*44704f69SBart Van Assche 521*44704f69SBart Van Assche# _LT_TAGVAR(VARNAME, [TAGNAME]) 522*44704f69SBart Van Assche# ------------------------------ 523*44704f69SBart Van Asschem4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 524*44704f69SBart Van Assche 525*44704f69SBart Van Assche 526*44704f69SBart Van Assche# _LT_CONFIG_COMMANDS 527*44704f69SBart Van Assche# ------------------- 528*44704f69SBart Van Assche# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 529*44704f69SBart Van Assche# variables for single and double quote escaping we saved from calls 530*44704f69SBart Van Assche# to _LT_DECL, we can put quote escaped variables declarations 531*44704f69SBart Van Assche# into 'config.status', and then the shell code to quote escape them in 532*44704f69SBart Van Assche# for loops in 'config.status'. Finally, any additional code accumulated 533*44704f69SBart Van Assche# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 534*44704f69SBart Van Asschem4_defun([_LT_CONFIG_COMMANDS], 535*44704f69SBart Van Assche[AC_PROVIDE_IFELSE([LT_OUTPUT], 536*44704f69SBart Van Assche dnl If the libtool generation code has been placed in $CONFIG_LT, 537*44704f69SBart Van Assche dnl instead of duplicating it all over again into config.status, 538*44704f69SBart Van Assche dnl then we will have config.status run $CONFIG_LT later, so it 539*44704f69SBart Van Assche dnl needs to know what name is stored there: 540*44704f69SBart Van Assche [AC_CONFIG_COMMANDS([libtool], 541*44704f69SBart Van Assche [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 542*44704f69SBart Van Assche dnl If the libtool generation code is destined for config.status, 543*44704f69SBart Van Assche dnl expand the accumulated commands and init code now: 544*44704f69SBart Van Assche [AC_CONFIG_COMMANDS([libtool], 545*44704f69SBart Van Assche [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 546*44704f69SBart Van Assche])#_LT_CONFIG_COMMANDS 547*44704f69SBart Van Assche 548*44704f69SBart Van Assche 549*44704f69SBart Van Assche# Initialize. 550*44704f69SBart Van Asschem4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 551*44704f69SBart Van Assche[ 552*44704f69SBart Van Assche 553*44704f69SBart Van Assche# The HP-UX ksh and POSIX shell print the target directory to stdout 554*44704f69SBart Van Assche# if CDPATH is set. 555*44704f69SBart Van Assche(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 556*44704f69SBart Van Assche 557*44704f69SBart Van Asschesed_quote_subst='$sed_quote_subst' 558*44704f69SBart Van Asschedouble_quote_subst='$double_quote_subst' 559*44704f69SBart Van Asschedelay_variable_subst='$delay_variable_subst' 560*44704f69SBart Van Assche_LT_CONFIG_STATUS_DECLARATIONS 561*44704f69SBart Van AsscheLTCC='$LTCC' 562*44704f69SBart Van AsscheLTCFLAGS='$LTCFLAGS' 563*44704f69SBart Van Asschecompiler='$compiler_DEFAULT' 564*44704f69SBart Van Assche 565*44704f69SBart Van Assche# A function that is used when there is no print builtin or printf. 566*44704f69SBart Van Asschefunc_fallback_echo () 567*44704f69SBart Van Assche{ 568*44704f69SBart Van Assche eval 'cat <<_LTECHO_EOF 569*44704f69SBart Van Assche\$[]1 570*44704f69SBart Van Assche_LTECHO_EOF' 571*44704f69SBart Van Assche} 572*44704f69SBart Van Assche 573*44704f69SBart Van Assche# Quote evaled strings. 574*44704f69SBart Van Asschefor var in lt_decl_all_varnames([[ \ 575*44704f69SBart Van Assche]], lt_decl_quote_varnames); do 576*44704f69SBart Van Assche case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 577*44704f69SBart Van Assche *[[\\\\\\\`\\"\\\$]]*) 578*44704f69SBart Van Assche eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 579*44704f69SBart Van Assche ;; 580*44704f69SBart Van Assche *) 581*44704f69SBart Van Assche eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 582*44704f69SBart Van Assche ;; 583*44704f69SBart Van Assche esac 584*44704f69SBart Van Asschedone 585*44704f69SBart Van Assche 586*44704f69SBart Van Assche# Double-quote double-evaled strings. 587*44704f69SBart Van Asschefor var in lt_decl_all_varnames([[ \ 588*44704f69SBart Van Assche]], lt_decl_dquote_varnames); do 589*44704f69SBart Van Assche case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 590*44704f69SBart Van Assche *[[\\\\\\\`\\"\\\$]]*) 591*44704f69SBart Van Assche eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 592*44704f69SBart Van Assche ;; 593*44704f69SBart Van Assche *) 594*44704f69SBart Van Assche eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 595*44704f69SBart Van Assche ;; 596*44704f69SBart Van Assche esac 597*44704f69SBart Van Asschedone 598*44704f69SBart Van Assche 599*44704f69SBart Van Assche_LT_OUTPUT_LIBTOOL_INIT 600*44704f69SBart Van Assche]) 601*44704f69SBart Van Assche 602*44704f69SBart Van Assche# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 603*44704f69SBart Van Assche# ------------------------------------ 604*44704f69SBart Van Assche# Generate a child script FILE with all initialization necessary to 605*44704f69SBart Van Assche# reuse the environment learned by the parent script, and make the 606*44704f69SBart Van Assche# file executable. If COMMENT is supplied, it is inserted after the 607*44704f69SBart Van Assche# '#!' sequence but before initialization text begins. After this 608*44704f69SBart Van Assche# macro, additional text can be appended to FILE to form the body of 609*44704f69SBart Van Assche# the child script. The macro ends with non-zero status if the 610*44704f69SBart Van Assche# file could not be fully written (such as if the disk is full). 611*44704f69SBart Van Asschem4_ifdef([AS_INIT_GENERATED], 612*44704f69SBart Van Assche[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 613*44704f69SBart Van Assche[m4_defun([_LT_GENERATED_FILE_INIT], 614*44704f69SBart Van Assche[m4_require([AS_PREPARE])]dnl 615*44704f69SBart Van Assche[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 616*44704f69SBart Van Assche[lt_write_fail=0 617*44704f69SBart Van Asschecat >$1 <<_ASEOF || lt_write_fail=1 618*44704f69SBart Van Assche#! $SHELL 619*44704f69SBart Van Assche# Generated by $as_me. 620*44704f69SBart Van Assche$2 621*44704f69SBart Van AsscheSHELL=\${CONFIG_SHELL-$SHELL} 622*44704f69SBart Van Asscheexport SHELL 623*44704f69SBart Van Assche_ASEOF 624*44704f69SBart Van Asschecat >>$1 <<\_ASEOF || lt_write_fail=1 625*44704f69SBart Van AsscheAS_SHELL_SANITIZE 626*44704f69SBart Van Assche_AS_PREPARE 627*44704f69SBart Van Asscheexec AS_MESSAGE_FD>&1 628*44704f69SBart Van Assche_ASEOF 629*44704f69SBart Van Asschetest 0 = "$lt_write_fail" && chmod +x $1[]dnl 630*44704f69SBart Van Asschem4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 631*44704f69SBart Van Assche 632*44704f69SBart Van Assche# LT_OUTPUT 633*44704f69SBart Van Assche# --------- 634*44704f69SBart Van Assche# This macro allows early generation of the libtool script (before 635*44704f69SBart Van Assche# AC_OUTPUT is called), incase it is used in configure for compilation 636*44704f69SBart Van Assche# tests. 637*44704f69SBart Van AsscheAC_DEFUN([LT_OUTPUT], 638*44704f69SBart Van Assche[: ${CONFIG_LT=./config.lt} 639*44704f69SBart Van AsscheAC_MSG_NOTICE([creating $CONFIG_LT]) 640*44704f69SBart Van Assche_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 641*44704f69SBart Van Assche[# Run this file to recreate a libtool stub with the current configuration.]) 642*44704f69SBart Van Assche 643*44704f69SBart Van Asschecat >>"$CONFIG_LT" <<\_LTEOF 644*44704f69SBart Van Asschelt_cl_silent=false 645*44704f69SBart Van Asscheexec AS_MESSAGE_LOG_FD>>config.log 646*44704f69SBart Van Assche{ 647*44704f69SBart Van Assche echo 648*44704f69SBart Van Assche AS_BOX([Running $as_me.]) 649*44704f69SBart Van Assche} >&AS_MESSAGE_LOG_FD 650*44704f69SBart Van Assche 651*44704f69SBart Van Asschelt_cl_help="\ 652*44704f69SBart Van Assche'$as_me' creates a local libtool stub from the current configuration, 653*44704f69SBart Van Asschefor use in further configure time tests before the real libtool is 654*44704f69SBart Van Asschegenerated. 655*44704f69SBart Van Assche 656*44704f69SBart Van AsscheUsage: $[0] [[OPTIONS]] 657*44704f69SBart Van Assche 658*44704f69SBart Van Assche -h, --help print this help, then exit 659*44704f69SBart Van Assche -V, --version print version number, then exit 660*44704f69SBart Van Assche -q, --quiet do not print progress messages 661*44704f69SBart Van Assche -d, --debug don't remove temporary files 662*44704f69SBart Van Assche 663*44704f69SBart Van AsscheReport bugs to <[email protected]>." 664*44704f69SBart Van Assche 665*44704f69SBart Van Asschelt_cl_version="\ 666*44704f69SBart Van Asschem4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 667*44704f69SBart Van Asschem4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 668*44704f69SBart Van Asscheconfigured by $[0], generated by m4_PACKAGE_STRING. 669*44704f69SBart Van Assche 670*44704f69SBart Van AsscheCopyright (C) 2011 Free Software Foundation, Inc. 671*44704f69SBart Van AsscheThis config.lt script is free software; the Free Software Foundation 672*44704f69SBart Van Asschegives unlimited permision to copy, distribute and modify it." 673*44704f69SBart Van Assche 674*44704f69SBart Van Asschewhile test 0 != $[#] 675*44704f69SBart Van Asschedo 676*44704f69SBart Van Assche case $[1] in 677*44704f69SBart Van Assche --version | --v* | -V ) 678*44704f69SBart Van Assche echo "$lt_cl_version"; exit 0 ;; 679*44704f69SBart Van Assche --help | --h* | -h ) 680*44704f69SBart Van Assche echo "$lt_cl_help"; exit 0 ;; 681*44704f69SBart Van Assche --debug | --d* | -d ) 682*44704f69SBart Van Assche debug=: ;; 683*44704f69SBart Van Assche --quiet | --q* | --silent | --s* | -q ) 684*44704f69SBart Van Assche lt_cl_silent=: ;; 685*44704f69SBart Van Assche 686*44704f69SBart Van Assche -*) AC_MSG_ERROR([unrecognized option: $[1] 687*44704f69SBart Van AsscheTry '$[0] --help' for more information.]) ;; 688*44704f69SBart Van Assche 689*44704f69SBart Van Assche *) AC_MSG_ERROR([unrecognized argument: $[1] 690*44704f69SBart Van AsscheTry '$[0] --help' for more information.]) ;; 691*44704f69SBart Van Assche esac 692*44704f69SBart Van Assche shift 693*44704f69SBart Van Asschedone 694*44704f69SBart Van Assche 695*44704f69SBart Van Asscheif $lt_cl_silent; then 696*44704f69SBart Van Assche exec AS_MESSAGE_FD>/dev/null 697*44704f69SBart Van Asschefi 698*44704f69SBart Van Assche_LTEOF 699*44704f69SBart Van Assche 700*44704f69SBart Van Asschecat >>"$CONFIG_LT" <<_LTEOF 701*44704f69SBart Van Assche_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 702*44704f69SBart Van Assche_LTEOF 703*44704f69SBart Van Assche 704*44704f69SBart Van Asschecat >>"$CONFIG_LT" <<\_LTEOF 705*44704f69SBart Van AsscheAC_MSG_NOTICE([creating $ofile]) 706*44704f69SBart Van Assche_LT_OUTPUT_LIBTOOL_COMMANDS 707*44704f69SBart Van AsscheAS_EXIT(0) 708*44704f69SBart Van Assche_LTEOF 709*44704f69SBart Van Asschechmod +x "$CONFIG_LT" 710*44704f69SBart Van Assche 711*44704f69SBart Van Assche# configure is writing to config.log, but config.lt does its own redirection, 712*44704f69SBart Van Assche# appending to config.log, which fails on DOS, as config.log is still kept 713*44704f69SBart Van Assche# open by configure. Here we exec the FD to /dev/null, effectively closing 714*44704f69SBart Van Assche# config.log, so it can be properly (re)opened and appended to by config.lt. 715*44704f69SBart Van Asschelt_cl_success=: 716*44704f69SBart Van Asschetest yes = "$silent" && 717*44704f69SBart Van Assche lt_config_lt_args="$lt_config_lt_args --quiet" 718*44704f69SBart Van Asscheexec AS_MESSAGE_LOG_FD>/dev/null 719*44704f69SBart Van Assche$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 720*44704f69SBart Van Asscheexec AS_MESSAGE_LOG_FD>>config.log 721*44704f69SBart Van Assche$lt_cl_success || AS_EXIT(1) 722*44704f69SBart Van Assche])# LT_OUTPUT 723*44704f69SBart Van Assche 724*44704f69SBart Van Assche 725*44704f69SBart Van Assche# _LT_CONFIG(TAG) 726*44704f69SBart Van Assche# --------------- 727*44704f69SBart Van Assche# If TAG is the built-in tag, create an initial libtool script with a 728*44704f69SBart Van Assche# default configuration from the untagged config vars. Otherwise add code 729*44704f69SBart Van Assche# to config.status for appending the configuration named by TAG from the 730*44704f69SBart Van Assche# matching tagged config vars. 731*44704f69SBart Van Asschem4_defun([_LT_CONFIG], 732*44704f69SBart Van Assche[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 733*44704f69SBart Van Assche_LT_CONFIG_SAVE_COMMANDS([ 734*44704f69SBart Van Assche m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 735*44704f69SBart Van Assche m4_if(_LT_TAG, [C], [ 736*44704f69SBart Van Assche # See if we are running on zsh, and set the options that allow our 737*44704f69SBart Van Assche # commands through without removal of \ escapes. 738*44704f69SBart Van Assche if test -n "${ZSH_VERSION+set}"; then 739*44704f69SBart Van Assche setopt NO_GLOB_SUBST 740*44704f69SBart Van Assche fi 741*44704f69SBart Van Assche 742*44704f69SBart Van Assche cfgfile=${ofile}T 743*44704f69SBart Van Assche trap "$RM \"$cfgfile\"; exit 1" 1 2 15 744*44704f69SBart Van Assche $RM "$cfgfile" 745*44704f69SBart Van Assche 746*44704f69SBart Van Assche cat <<_LT_EOF >> "$cfgfile" 747*44704f69SBart Van Assche#! $SHELL 748*44704f69SBart Van Assche# Generated automatically by $as_me ($PACKAGE) $VERSION 749*44704f69SBart Van Assche# NOTE: Changes made to this file will be lost: look at ltmain.sh. 750*44704f69SBart Van Assche 751*44704f69SBart Van Assche# Provide generalized library-building support services. 752*44704f69SBart Van Assche# Written by Gordon Matzigkeit, 1996 753*44704f69SBart Van Assche 754*44704f69SBart Van Assche_LT_COPYING 755*44704f69SBart Van Assche_LT_LIBTOOL_TAGS 756*44704f69SBart Van Assche 757*44704f69SBart Van Assche# Configured defaults for sys_lib_dlsearch_path munging. 758*44704f69SBart Van Assche: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 759*44704f69SBart Van Assche 760*44704f69SBart Van Assche# ### BEGIN LIBTOOL CONFIG 761*44704f69SBart Van Assche_LT_LIBTOOL_CONFIG_VARS 762*44704f69SBart Van Assche_LT_LIBTOOL_TAG_VARS 763*44704f69SBart Van Assche# ### END LIBTOOL CONFIG 764*44704f69SBart Van Assche 765*44704f69SBart Van Assche_LT_EOF 766*44704f69SBart Van Assche 767*44704f69SBart Van Assche cat <<'_LT_EOF' >> "$cfgfile" 768*44704f69SBart Van Assche 769*44704f69SBart Van Assche# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 770*44704f69SBart Van Assche 771*44704f69SBart Van Assche_LT_PREPARE_MUNGE_PATH_LIST 772*44704f69SBart Van Assche_LT_PREPARE_CC_BASENAME 773*44704f69SBart Van Assche 774*44704f69SBart Van Assche# ### END FUNCTIONS SHARED WITH CONFIGURE 775*44704f69SBart Van Assche 776*44704f69SBart Van Assche_LT_EOF 777*44704f69SBart Van Assche 778*44704f69SBart Van Assche case $host_os in 779*44704f69SBart Van Assche aix3*) 780*44704f69SBart Van Assche cat <<\_LT_EOF >> "$cfgfile" 781*44704f69SBart Van Assche# AIX sometimes has problems with the GCC collect2 program. For some 782*44704f69SBart Van Assche# reason, if we set the COLLECT_NAMES environment variable, the problems 783*44704f69SBart Van Assche# vanish in a puff of smoke. 784*44704f69SBart Van Asscheif test set != "${COLLECT_NAMES+set}"; then 785*44704f69SBart Van Assche COLLECT_NAMES= 786*44704f69SBart Van Assche export COLLECT_NAMES 787*44704f69SBart Van Asschefi 788*44704f69SBart Van Assche_LT_EOF 789*44704f69SBart Van Assche ;; 790*44704f69SBart Van Assche esac 791*44704f69SBart Van Assche 792*44704f69SBart Van Assche _LT_PROG_LTMAIN 793*44704f69SBart Van Assche 794*44704f69SBart Van Assche # We use sed instead of cat because bash on DJGPP gets confused if 795*44704f69SBart Van Assche # if finds mixed CR/LF and LF-only lines. Since sed operates in 796*44704f69SBart Van Assche # text mode, it properly converts lines to CR/LF. This bash problem 797*44704f69SBart Van Assche # is reportedly fixed, but why not run on old versions too? 798*44704f69SBart Van Assche $SED '$q' "$ltmain" >> "$cfgfile" \ 799*44704f69SBart Van Assche || (rm -f "$cfgfile"; exit 1) 800*44704f69SBart Van Assche 801*44704f69SBart Van Assche mv -f "$cfgfile" "$ofile" || 802*44704f69SBart Van Assche (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 803*44704f69SBart Van Assche chmod +x "$ofile" 804*44704f69SBart Van Assche], 805*44704f69SBart Van Assche[cat <<_LT_EOF >> "$ofile" 806*44704f69SBart Van Assche 807*44704f69SBart Van Asschednl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 808*44704f69SBart Van Asschednl in a comment (ie after a #). 809*44704f69SBart Van Assche# ### BEGIN LIBTOOL TAG CONFIG: $1 810*44704f69SBart Van Assche_LT_LIBTOOL_TAG_VARS(_LT_TAG) 811*44704f69SBart Van Assche# ### END LIBTOOL TAG CONFIG: $1 812*44704f69SBart Van Assche_LT_EOF 813*44704f69SBart Van Assche])dnl /m4_if 814*44704f69SBart Van Assche], 815*44704f69SBart Van Assche[m4_if([$1], [], [ 816*44704f69SBart Van Assche PACKAGE='$PACKAGE' 817*44704f69SBart Van Assche VERSION='$VERSION' 818*44704f69SBart Van Assche RM='$RM' 819*44704f69SBart Van Assche ofile='$ofile'], []) 820*44704f69SBart Van Assche])dnl /_LT_CONFIG_SAVE_COMMANDS 821*44704f69SBart Van Assche])# _LT_CONFIG 822*44704f69SBart Van Assche 823*44704f69SBart Van Assche 824*44704f69SBart Van Assche# LT_SUPPORTED_TAG(TAG) 825*44704f69SBart Van Assche# --------------------- 826*44704f69SBart Van Assche# Trace this macro to discover what tags are supported by the libtool 827*44704f69SBart Van Assche# --tag option, using: 828*44704f69SBart Van Assche# autoconf --trace 'LT_SUPPORTED_TAG:$1' 829*44704f69SBart Van AsscheAC_DEFUN([LT_SUPPORTED_TAG], []) 830*44704f69SBart Van Assche 831*44704f69SBart Van Assche 832*44704f69SBart Van Assche# C support is built-in for now 833*44704f69SBart Van Asschem4_define([_LT_LANG_C_enabled], []) 834*44704f69SBart Van Asschem4_define([_LT_TAGS], []) 835*44704f69SBart Van Assche 836*44704f69SBart Van Assche 837*44704f69SBart Van Assche# LT_LANG(LANG) 838*44704f69SBart Van Assche# ------------- 839*44704f69SBart Van Assche# Enable libtool support for the given language if not already enabled. 840*44704f69SBart Van AsscheAC_DEFUN([LT_LANG], 841*44704f69SBart Van Assche[AC_BEFORE([$0], [LT_OUTPUT])dnl 842*44704f69SBart Van Asschem4_case([$1], 843*44704f69SBart Van Assche [C], [_LT_LANG(C)], 844*44704f69SBart Van Assche [C++], [_LT_LANG(CXX)], 845*44704f69SBart Van Assche [Go], [_LT_LANG(GO)], 846*44704f69SBart Van Assche [Java], [_LT_LANG(GCJ)], 847*44704f69SBart Van Assche [Fortran 77], [_LT_LANG(F77)], 848*44704f69SBart Van Assche [Fortran], [_LT_LANG(FC)], 849*44704f69SBart Van Assche [Windows Resource], [_LT_LANG(RC)], 850*44704f69SBart Van Assche [m4_ifdef([_LT_LANG_]$1[_CONFIG], 851*44704f69SBart Van Assche [_LT_LANG($1)], 852*44704f69SBart Van Assche [m4_fatal([$0: unsupported language: "$1"])])])dnl 853*44704f69SBart Van Assche])# LT_LANG 854*44704f69SBart Van Assche 855*44704f69SBart Van Assche 856*44704f69SBart Van Assche# _LT_LANG(LANGNAME) 857*44704f69SBart Van Assche# ------------------ 858*44704f69SBart Van Asschem4_defun([_LT_LANG], 859*44704f69SBart Van Assche[m4_ifdef([_LT_LANG_]$1[_enabled], [], 860*44704f69SBart Van Assche [LT_SUPPORTED_TAG([$1])dnl 861*44704f69SBart Van Assche m4_append([_LT_TAGS], [$1 ])dnl 862*44704f69SBart Van Assche m4_define([_LT_LANG_]$1[_enabled], [])dnl 863*44704f69SBart Van Assche _LT_LANG_$1_CONFIG($1)])dnl 864*44704f69SBart Van Assche])# _LT_LANG 865*44704f69SBart Van Assche 866*44704f69SBart Van Assche 867*44704f69SBart Van Asschem4_ifndef([AC_PROG_GO], [ 868*44704f69SBart Van Assche# NOTE: This macro has been submitted for inclusion into # 869*44704f69SBart Van Assche# GNU Autoconf as AC_PROG_GO. When it is available in # 870*44704f69SBart Van Assche# a released version of Autoconf we should remove this # 871*44704f69SBart Van Assche# macro and use it instead. # 872*44704f69SBart Van Asschem4_defun([AC_PROG_GO], 873*44704f69SBart Van Assche[AC_LANG_PUSH(Go)dnl 874*44704f69SBart Van AsscheAC_ARG_VAR([GOC], [Go compiler command])dnl 875*44704f69SBart Van AsscheAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 876*44704f69SBart Van Assche_AC_ARG_VAR_LDFLAGS()dnl 877*44704f69SBart Van AsscheAC_CHECK_TOOL(GOC, gccgo) 878*44704f69SBart Van Asscheif test -z "$GOC"; then 879*44704f69SBart Van Assche if test -n "$ac_tool_prefix"; then 880*44704f69SBart Van Assche AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 881*44704f69SBart Van Assche fi 882*44704f69SBart Van Asschefi 883*44704f69SBart Van Asscheif test -z "$GOC"; then 884*44704f69SBart Van Assche AC_CHECK_PROG(GOC, gccgo, gccgo, false) 885*44704f69SBart Van Asschefi 886*44704f69SBart Van Assche])#m4_defun 887*44704f69SBart Van Assche])#m4_ifndef 888*44704f69SBart Van Assche 889*44704f69SBart Van Assche 890*44704f69SBart Van Assche# _LT_LANG_DEFAULT_CONFIG 891*44704f69SBart Van Assche# ----------------------- 892*44704f69SBart Van Asschem4_defun([_LT_LANG_DEFAULT_CONFIG], 893*44704f69SBart Van Assche[AC_PROVIDE_IFELSE([AC_PROG_CXX], 894*44704f69SBart Van Assche [LT_LANG(CXX)], 895*44704f69SBart Van Assche [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 896*44704f69SBart Van Assche 897*44704f69SBart Van AsscheAC_PROVIDE_IFELSE([AC_PROG_F77], 898*44704f69SBart Van Assche [LT_LANG(F77)], 899*44704f69SBart Van Assche [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 900*44704f69SBart Van Assche 901*44704f69SBart Van AsscheAC_PROVIDE_IFELSE([AC_PROG_FC], 902*44704f69SBart Van Assche [LT_LANG(FC)], 903*44704f69SBart Van Assche [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 904*44704f69SBart Van Assche 905*44704f69SBart Van Asschednl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 906*44704f69SBart Van Asschednl pulling things in needlessly. 907*44704f69SBart Van AsscheAC_PROVIDE_IFELSE([AC_PROG_GCJ], 908*44704f69SBart Van Assche [LT_LANG(GCJ)], 909*44704f69SBart Van Assche [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 910*44704f69SBart Van Assche [LT_LANG(GCJ)], 911*44704f69SBart Van Assche [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 912*44704f69SBart Van Assche [LT_LANG(GCJ)], 913*44704f69SBart Van Assche [m4_ifdef([AC_PROG_GCJ], 914*44704f69SBart Van Assche [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 915*44704f69SBart Van Assche m4_ifdef([A][M_PROG_GCJ], 916*44704f69SBart Van Assche [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 917*44704f69SBart Van Assche m4_ifdef([LT_PROG_GCJ], 918*44704f69SBart Van Assche [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 919*44704f69SBart Van Assche 920*44704f69SBart Van AsscheAC_PROVIDE_IFELSE([AC_PROG_GO], 921*44704f69SBart Van Assche [LT_LANG(GO)], 922*44704f69SBart Van Assche [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 923*44704f69SBart Van Assche 924*44704f69SBart Van AsscheAC_PROVIDE_IFELSE([LT_PROG_RC], 925*44704f69SBart Van Assche [LT_LANG(RC)], 926*44704f69SBart Van Assche [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 927*44704f69SBart Van Assche])# _LT_LANG_DEFAULT_CONFIG 928*44704f69SBart Van Assche 929*44704f69SBart Van Assche# Obsolete macros: 930*44704f69SBart Van AsscheAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 931*44704f69SBart Van AsscheAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 932*44704f69SBart Van AsscheAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 933*44704f69SBart Van AsscheAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 934*44704f69SBart Van AsscheAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 935*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 936*44704f69SBart Van Asschednl AC_DEFUN([AC_LIBTOOL_CXX], []) 937*44704f69SBart Van Asschednl AC_DEFUN([AC_LIBTOOL_F77], []) 938*44704f69SBart Van Asschednl AC_DEFUN([AC_LIBTOOL_FC], []) 939*44704f69SBart Van Asschednl AC_DEFUN([AC_LIBTOOL_GCJ], []) 940*44704f69SBart Van Asschednl AC_DEFUN([AC_LIBTOOL_RC], []) 941*44704f69SBart Van Assche 942*44704f69SBart Van Assche 943*44704f69SBart Van Assche# _LT_TAG_COMPILER 944*44704f69SBart Van Assche# ---------------- 945*44704f69SBart Van Asschem4_defun([_LT_TAG_COMPILER], 946*44704f69SBart Van Assche[AC_REQUIRE([AC_PROG_CC])dnl 947*44704f69SBart Van Assche 948*44704f69SBart Van Assche_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 949*44704f69SBart Van Assche_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 950*44704f69SBart Van Assche_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 951*44704f69SBart Van Assche_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 952*44704f69SBart Van Assche 953*44704f69SBart Van Assche# If no C compiler was specified, use CC. 954*44704f69SBart Van AsscheLTCC=${LTCC-"$CC"} 955*44704f69SBart Van Assche 956*44704f69SBart Van Assche# If no C compiler flags were specified, use CFLAGS. 957*44704f69SBart Van AsscheLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 958*44704f69SBart Van Assche 959*44704f69SBart Van Assche# Allow CC to be a program name with arguments. 960*44704f69SBart Van Asschecompiler=$CC 961*44704f69SBart Van Assche])# _LT_TAG_COMPILER 962*44704f69SBart Van Assche 963*44704f69SBart Van Assche 964*44704f69SBart Van Assche# _LT_COMPILER_BOILERPLATE 965*44704f69SBart Van Assche# ------------------------ 966*44704f69SBart Van Assche# Check for compiler boilerplate output or warnings with 967*44704f69SBart Van Assche# the simple compiler test code. 968*44704f69SBart Van Asschem4_defun([_LT_COMPILER_BOILERPLATE], 969*44704f69SBart Van Assche[m4_require([_LT_DECL_SED])dnl 970*44704f69SBart Van Asscheac_outfile=conftest.$ac_objext 971*44704f69SBart Van Asscheecho "$lt_simple_compile_test_code" >conftest.$ac_ext 972*44704f69SBart Van Asscheeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 973*44704f69SBart Van Assche_lt_compiler_boilerplate=`cat conftest.err` 974*44704f69SBart Van Assche$RM conftest* 975*44704f69SBart Van Assche])# _LT_COMPILER_BOILERPLATE 976*44704f69SBart Van Assche 977*44704f69SBart Van Assche 978*44704f69SBart Van Assche# _LT_LINKER_BOILERPLATE 979*44704f69SBart Van Assche# ---------------------- 980*44704f69SBart Van Assche# Check for linker boilerplate output or warnings with 981*44704f69SBart Van Assche# the simple link test code. 982*44704f69SBart Van Asschem4_defun([_LT_LINKER_BOILERPLATE], 983*44704f69SBart Van Assche[m4_require([_LT_DECL_SED])dnl 984*44704f69SBart Van Asscheac_outfile=conftest.$ac_objext 985*44704f69SBart Van Asscheecho "$lt_simple_link_test_code" >conftest.$ac_ext 986*44704f69SBart Van Asscheeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 987*44704f69SBart Van Assche_lt_linker_boilerplate=`cat conftest.err` 988*44704f69SBart Van Assche$RM -r conftest* 989*44704f69SBart Van Assche])# _LT_LINKER_BOILERPLATE 990*44704f69SBart Van Assche 991*44704f69SBart Van Assche# _LT_REQUIRED_DARWIN_CHECKS 992*44704f69SBart Van Assche# ------------------------- 993*44704f69SBart Van Asschem4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 994*44704f69SBart Van Assche case $host_os in 995*44704f69SBart Van Assche rhapsody* | darwin*) 996*44704f69SBart Van Assche AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 997*44704f69SBart Van Assche AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 998*44704f69SBart Van Assche AC_CHECK_TOOL([LIPO], [lipo], [:]) 999*44704f69SBart Van Assche AC_CHECK_TOOL([OTOOL], [otool], [:]) 1000*44704f69SBart Van Assche AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1001*44704f69SBart Van Assche _LT_DECL([], [DSYMUTIL], [1], 1002*44704f69SBart Van Assche [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1003*44704f69SBart Van Assche _LT_DECL([], [NMEDIT], [1], 1004*44704f69SBart Van Assche [Tool to change global to local symbols on Mac OS X]) 1005*44704f69SBart Van Assche _LT_DECL([], [LIPO], [1], 1006*44704f69SBart Van Assche [Tool to manipulate fat objects and archives on Mac OS X]) 1007*44704f69SBart Van Assche _LT_DECL([], [OTOOL], [1], 1008*44704f69SBart Van Assche [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1009*44704f69SBart Van Assche _LT_DECL([], [OTOOL64], [1], 1010*44704f69SBart Van Assche [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1011*44704f69SBart Van Assche 1012*44704f69SBart Van Assche AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1013*44704f69SBart Van Assche [lt_cv_apple_cc_single_mod=no 1014*44704f69SBart Van Assche if test -z "$LT_MULTI_MODULE"; then 1015*44704f69SBart Van Assche # By default we will add the -single_module flag. You can override 1016*44704f69SBart Van Assche # by either setting the environment variable LT_MULTI_MODULE 1017*44704f69SBart Van Assche # non-empty at configure time, or by adding -multi_module to the 1018*44704f69SBart Van Assche # link flags. 1019*44704f69SBart Van Assche rm -rf libconftest.dylib* 1020*44704f69SBart Van Assche echo "int foo(void){return 1;}" > conftest.c 1021*44704f69SBart Van Assche echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1022*44704f69SBart Van Assche-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1023*44704f69SBart Van Assche $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1024*44704f69SBart Van Assche -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1025*44704f69SBart Van Assche _lt_result=$? 1026*44704f69SBart Van Assche # If there is a non-empty error log, and "single_module" 1027*44704f69SBart Van Assche # appears in it, assume the flag caused a linker warning 1028*44704f69SBart Van Assche if test -s conftest.err && $GREP single_module conftest.err; then 1029*44704f69SBart Van Assche cat conftest.err >&AS_MESSAGE_LOG_FD 1030*44704f69SBart Van Assche # Otherwise, if the output was created with a 0 exit code from 1031*44704f69SBart Van Assche # the compiler, it worked. 1032*44704f69SBart Van Assche elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1033*44704f69SBart Van Assche lt_cv_apple_cc_single_mod=yes 1034*44704f69SBart Van Assche else 1035*44704f69SBart Van Assche cat conftest.err >&AS_MESSAGE_LOG_FD 1036*44704f69SBart Van Assche fi 1037*44704f69SBart Van Assche rm -rf libconftest.dylib* 1038*44704f69SBart Van Assche rm -f conftest.* 1039*44704f69SBart Van Assche fi]) 1040*44704f69SBart Van Assche 1041*44704f69SBart Van Assche AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1042*44704f69SBart Van Assche [lt_cv_ld_exported_symbols_list], 1043*44704f69SBart Van Assche [lt_cv_ld_exported_symbols_list=no 1044*44704f69SBart Van Assche save_LDFLAGS=$LDFLAGS 1045*44704f69SBart Van Assche echo "_main" > conftest.sym 1046*44704f69SBart Van Assche LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1047*44704f69SBart Van Assche AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1048*44704f69SBart Van Assche [lt_cv_ld_exported_symbols_list=yes], 1049*44704f69SBart Van Assche [lt_cv_ld_exported_symbols_list=no]) 1050*44704f69SBart Van Assche LDFLAGS=$save_LDFLAGS 1051*44704f69SBart Van Assche ]) 1052*44704f69SBart Van Assche 1053*44704f69SBart Van Assche AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1054*44704f69SBart Van Assche [lt_cv_ld_force_load=no 1055*44704f69SBart Van Assche cat > conftest.c << _LT_EOF 1056*44704f69SBart Van Asscheint forced_loaded() { return 2;} 1057*44704f69SBart Van Assche_LT_EOF 1058*44704f69SBart Van Assche echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1059*44704f69SBart Van Assche $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1060*44704f69SBart Van Assche echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1061*44704f69SBart Van Assche $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1062*44704f69SBart Van Assche echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1063*44704f69SBart Van Assche $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1064*44704f69SBart Van Assche cat > conftest.c << _LT_EOF 1065*44704f69SBart Van Asscheint main() { return 0;} 1066*44704f69SBart Van Assche_LT_EOF 1067*44704f69SBart Van Assche echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1068*44704f69SBart Van Assche $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1069*44704f69SBart Van Assche _lt_result=$? 1070*44704f69SBart Van Assche if test -s conftest.err && $GREP force_load conftest.err; then 1071*44704f69SBart Van Assche cat conftest.err >&AS_MESSAGE_LOG_FD 1072*44704f69SBart Van Assche elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1073*44704f69SBart Van Assche lt_cv_ld_force_load=yes 1074*44704f69SBart Van Assche else 1075*44704f69SBart Van Assche cat conftest.err >&AS_MESSAGE_LOG_FD 1076*44704f69SBart Van Assche fi 1077*44704f69SBart Van Assche rm -f conftest.err libconftest.a conftest conftest.c 1078*44704f69SBart Van Assche rm -rf conftest.dSYM 1079*44704f69SBart Van Assche ]) 1080*44704f69SBart Van Assche case $host_os in 1081*44704f69SBart Van Assche rhapsody* | darwin1.[[012]]) 1082*44704f69SBart Van Assche _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1083*44704f69SBart Van Assche darwin1.*) 1084*44704f69SBart Van Assche _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1085*44704f69SBart Van Assche darwin*) 1086*44704f69SBart Van Assche case $MACOSX_DEPLOYMENT_TARGET,$host in 1087*44704f69SBart Van Assche 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 1088*44704f69SBart Van Assche _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1089*44704f69SBart Van Assche *) 1090*44704f69SBart Van Assche _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1091*44704f69SBart Van Assche esac 1092*44704f69SBart Van Assche ;; 1093*44704f69SBart Van Assche esac 1094*44704f69SBart Van Assche if test yes = "$lt_cv_apple_cc_single_mod"; then 1095*44704f69SBart Van Assche _lt_dar_single_mod='$single_module' 1096*44704f69SBart Van Assche fi 1097*44704f69SBart Van Assche if test yes = "$lt_cv_ld_exported_symbols_list"; then 1098*44704f69SBart Van Assche _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1099*44704f69SBart Van Assche else 1100*44704f69SBart Van Assche _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1101*44704f69SBart Van Assche fi 1102*44704f69SBart Van Assche if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1103*44704f69SBart Van Assche _lt_dsymutil='~$DSYMUTIL $lib || :' 1104*44704f69SBart Van Assche else 1105*44704f69SBart Van Assche _lt_dsymutil= 1106*44704f69SBart Van Assche fi 1107*44704f69SBart Van Assche ;; 1108*44704f69SBart Van Assche esac 1109*44704f69SBart Van Assche]) 1110*44704f69SBart Van Assche 1111*44704f69SBart Van Assche 1112*44704f69SBart Van Assche# _LT_DARWIN_LINKER_FEATURES([TAG]) 1113*44704f69SBart Van Assche# --------------------------------- 1114*44704f69SBart Van Assche# Checks for linker and compiler features on darwin 1115*44704f69SBart Van Asschem4_defun([_LT_DARWIN_LINKER_FEATURES], 1116*44704f69SBart Van Assche[ 1117*44704f69SBart Van Assche m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1118*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1119*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=no 1120*44704f69SBart Van Assche _LT_TAGVAR(hardcode_automatic, $1)=yes 1121*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1122*44704f69SBart Van Assche if test yes = "$lt_cv_ld_force_load"; then 1123*44704f69SBart Van Assche _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\"`' 1124*44704f69SBart Van Assche m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1125*44704f69SBart Van Assche [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1126*44704f69SBart Van Assche else 1127*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1128*44704f69SBart Van Assche fi 1129*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=yes 1130*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1131*44704f69SBart Van Assche case $cc_basename in 1132*44704f69SBart Van Assche ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1133*44704f69SBart Van Assche *) _lt_dar_can_shared=$GCC ;; 1134*44704f69SBart Van Assche esac 1135*44704f69SBart Van Assche if test yes = "$_lt_dar_can_shared"; then 1136*44704f69SBart Van Assche output_verbose_link_cmd=func_echo_all 1137*44704f69SBart Van Assche _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" 1138*44704f69SBart Van Assche _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1139*44704f69SBart Van Assche _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" 1140*44704f69SBart Van Assche _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" 1141*44704f69SBart Van Assche m4_if([$1], [CXX], 1142*44704f69SBart Van Assche[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1143*44704f69SBart Van Assche _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" 1144*44704f69SBart Van Assche _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" 1145*44704f69SBart Van Assche fi 1146*44704f69SBart Van Assche],[]) 1147*44704f69SBart Van Assche else 1148*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 1149*44704f69SBart Van Assche fi 1150*44704f69SBart Van Assche]) 1151*44704f69SBart Van Assche 1152*44704f69SBart Van Assche# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1153*44704f69SBart Van Assche# ---------------------------------- 1154*44704f69SBart Van Assche# Links a minimal program and checks the executable 1155*44704f69SBart Van Assche# for the system default hardcoded library path. In most cases, 1156*44704f69SBart Van Assche# this is /usr/lib:/lib, but when the MPI compilers are used 1157*44704f69SBart Van Assche# the location of the communication and MPI libs are included too. 1158*44704f69SBart Van Assche# If we don't find anything, use the default library path according 1159*44704f69SBart Van Assche# to the aix ld manual. 1160*44704f69SBart Van Assche# Store the results from the different compilers for each TAGNAME. 1161*44704f69SBart Van Assche# Allow to override them for all tags through lt_cv_aix_libpath. 1162*44704f69SBart Van Asschem4_defun([_LT_SYS_MODULE_PATH_AIX], 1163*44704f69SBart Van Assche[m4_require([_LT_DECL_SED])dnl 1164*44704f69SBart Van Asscheif test set = "${lt_cv_aix_libpath+set}"; then 1165*44704f69SBart Van Assche aix_libpath=$lt_cv_aix_libpath 1166*44704f69SBart Van Asscheelse 1167*44704f69SBart Van Assche AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1168*44704f69SBart Van Assche [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1169*44704f69SBart Van Assche lt_aix_libpath_sed='[ 1170*44704f69SBart Van Assche /Import File Strings/,/^$/ { 1171*44704f69SBart Van Assche /^0/ { 1172*44704f69SBart Van Assche s/^0 *\([^ ]*\) *$/\1/ 1173*44704f69SBart Van Assche p 1174*44704f69SBart Van Assche } 1175*44704f69SBart Van Assche }]' 1176*44704f69SBart Van Assche _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1177*44704f69SBart Van Assche # Check for a 64-bit object if we didn't find anything. 1178*44704f69SBart Van Assche if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1179*44704f69SBart Van Assche _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1180*44704f69SBart Van Assche fi],[]) 1181*44704f69SBart Van Assche if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1182*44704f69SBart Van Assche _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1183*44704f69SBart Van Assche fi 1184*44704f69SBart Van Assche ]) 1185*44704f69SBart Van Assche aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1186*44704f69SBart Van Asschefi 1187*44704f69SBart Van Assche])# _LT_SYS_MODULE_PATH_AIX 1188*44704f69SBart Van Assche 1189*44704f69SBart Van Assche 1190*44704f69SBart Van Assche# _LT_SHELL_INIT(ARG) 1191*44704f69SBart Van Assche# ------------------- 1192*44704f69SBart Van Asschem4_define([_LT_SHELL_INIT], 1193*44704f69SBart Van Assche[m4_divert_text([M4SH-INIT], [$1 1194*44704f69SBart Van Assche])])# _LT_SHELL_INIT 1195*44704f69SBart Van Assche 1196*44704f69SBart Van Assche 1197*44704f69SBart Van Assche 1198*44704f69SBart Van Assche# _LT_PROG_ECHO_BACKSLASH 1199*44704f69SBart Van Assche# ----------------------- 1200*44704f69SBart Van Assche# Find how we can fake an echo command that does not interpret backslash. 1201*44704f69SBart Van Assche# In particular, with Autoconf 2.60 or later we add some code to the start 1202*44704f69SBart Van Assche# of the generated configure script that will find a shell with a builtin 1203*44704f69SBart Van Assche# printf (that we can use as an echo command). 1204*44704f69SBart Van Asschem4_defun([_LT_PROG_ECHO_BACKSLASH], 1205*44704f69SBart Van Assche[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1206*44704f69SBart Van AsscheECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1207*44704f69SBart Van AsscheECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1208*44704f69SBart Van Assche 1209*44704f69SBart Van AsscheAC_MSG_CHECKING([how to print strings]) 1210*44704f69SBart Van Assche# Test print first, because it will be a builtin if present. 1211*44704f69SBart Van Asscheif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1212*44704f69SBart Van Assche test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1213*44704f69SBart Van Assche ECHO='print -r --' 1214*44704f69SBart Van Asscheelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1215*44704f69SBart Van Assche ECHO='printf %s\n' 1216*44704f69SBart Van Asscheelse 1217*44704f69SBart Van Assche # Use this function as a fallback that always works. 1218*44704f69SBart Van Assche func_fallback_echo () 1219*44704f69SBart Van Assche { 1220*44704f69SBart Van Assche eval 'cat <<_LTECHO_EOF 1221*44704f69SBart Van Assche$[]1 1222*44704f69SBart Van Assche_LTECHO_EOF' 1223*44704f69SBart Van Assche } 1224*44704f69SBart Van Assche ECHO='func_fallback_echo' 1225*44704f69SBart Van Asschefi 1226*44704f69SBart Van Assche 1227*44704f69SBart Van Assche# func_echo_all arg... 1228*44704f69SBart Van Assche# Invoke $ECHO with all args, space-separated. 1229*44704f69SBart Van Asschefunc_echo_all () 1230*44704f69SBart Van Assche{ 1231*44704f69SBart Van Assche $ECHO "$*" 1232*44704f69SBart Van Assche} 1233*44704f69SBart Van Assche 1234*44704f69SBart Van Asschecase $ECHO in 1235*44704f69SBart Van Assche printf*) AC_MSG_RESULT([printf]) ;; 1236*44704f69SBart Van Assche print*) AC_MSG_RESULT([print -r]) ;; 1237*44704f69SBart Van Assche *) AC_MSG_RESULT([cat]) ;; 1238*44704f69SBart Van Asscheesac 1239*44704f69SBart Van Assche 1240*44704f69SBart Van Asschem4_ifdef([_AS_DETECT_SUGGESTED], 1241*44704f69SBart Van Assche[_AS_DETECT_SUGGESTED([ 1242*44704f69SBart Van Assche test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1243*44704f69SBart Van Assche ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1244*44704f69SBart Van Assche ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1245*44704f69SBart Van Assche ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1246*44704f69SBart Van Assche PATH=/empty FPATH=/empty; export PATH FPATH 1247*44704f69SBart Van Assche test "X`printf %s $ECHO`" = "X$ECHO" \ 1248*44704f69SBart Van Assche || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1249*44704f69SBart Van Assche 1250*44704f69SBart Van Assche_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1251*44704f69SBart Van Assche_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1252*44704f69SBart Van Assche])# _LT_PROG_ECHO_BACKSLASH 1253*44704f69SBart Van Assche 1254*44704f69SBart Van Assche 1255*44704f69SBart Van Assche# _LT_WITH_SYSROOT 1256*44704f69SBart Van Assche# ---------------- 1257*44704f69SBart Van AsscheAC_DEFUN([_LT_WITH_SYSROOT], 1258*44704f69SBart Van Assche[m4_require([_LT_DECL_SED])dnl 1259*44704f69SBart Van AsscheAC_MSG_CHECKING([for sysroot]) 1260*44704f69SBart Van AsscheAC_ARG_WITH([sysroot], 1261*44704f69SBart Van Assche[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1262*44704f69SBart Van Assche [Search for dependent libraries within DIR (or the compiler's sysroot 1263*44704f69SBart Van Assche if not specified).])], 1264*44704f69SBart Van Assche[], [with_sysroot=no]) 1265*44704f69SBart Van Assche 1266*44704f69SBart Van Asschednl lt_sysroot will always be passed unquoted. We quote it here 1267*44704f69SBart Van Asschednl in case the user passed a directory name. 1268*44704f69SBart Van Asschelt_sysroot= 1269*44704f69SBart Van Asschecase $with_sysroot in #( 1270*44704f69SBart Van Assche yes) 1271*44704f69SBart Van Assche if test yes = "$GCC"; then 1272*44704f69SBart Van Assche lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1273*44704f69SBart Van Assche fi 1274*44704f69SBart Van Assche ;; #( 1275*44704f69SBart Van Assche /*) 1276*44704f69SBart Van Assche lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 1277*44704f69SBart Van Assche ;; #( 1278*44704f69SBart Van Assche no|'') 1279*44704f69SBart Van Assche ;; #( 1280*44704f69SBart Van Assche *) 1281*44704f69SBart Van Assche AC_MSG_RESULT([$with_sysroot]) 1282*44704f69SBart Van Assche AC_MSG_ERROR([The sysroot must be an absolute path.]) 1283*44704f69SBart Van Assche ;; 1284*44704f69SBart Van Asscheesac 1285*44704f69SBart Van Assche 1286*44704f69SBart Van Assche AC_MSG_RESULT([${lt_sysroot:-no}]) 1287*44704f69SBart Van Assche_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1288*44704f69SBart Van Assche[dependent libraries, and where our libraries should be installed.])]) 1289*44704f69SBart Van Assche 1290*44704f69SBart Van Assche# _LT_ENABLE_LOCK 1291*44704f69SBart Van Assche# --------------- 1292*44704f69SBart Van Asschem4_defun([_LT_ENABLE_LOCK], 1293*44704f69SBart Van Assche[AC_ARG_ENABLE([libtool-lock], 1294*44704f69SBart Van Assche [AS_HELP_STRING([--disable-libtool-lock], 1295*44704f69SBart Van Assche [avoid locking (might break parallel builds)])]) 1296*44704f69SBart Van Asschetest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1297*44704f69SBart Van Assche 1298*44704f69SBart Van Assche# Some flags need to be propagated to the compiler or linker for good 1299*44704f69SBart Van Assche# libtool support. 1300*44704f69SBart Van Asschecase $host in 1301*44704f69SBart Van Asscheia64-*-hpux*) 1302*44704f69SBart Van Assche # Find out what ABI is being produced by ac_compile, and set mode 1303*44704f69SBart Van Assche # options accordingly. 1304*44704f69SBart Van Assche echo 'int i;' > conftest.$ac_ext 1305*44704f69SBart Van Assche if AC_TRY_EVAL(ac_compile); then 1306*44704f69SBart Van Assche case `$FILECMD conftest.$ac_objext` in 1307*44704f69SBart Van Assche *ELF-32*) 1308*44704f69SBart Van Assche HPUX_IA64_MODE=32 1309*44704f69SBart Van Assche ;; 1310*44704f69SBart Van Assche *ELF-64*) 1311*44704f69SBart Van Assche HPUX_IA64_MODE=64 1312*44704f69SBart Van Assche ;; 1313*44704f69SBart Van Assche esac 1314*44704f69SBart Van Assche fi 1315*44704f69SBart Van Assche rm -rf conftest* 1316*44704f69SBart Van Assche ;; 1317*44704f69SBart Van Assche*-*-irix6*) 1318*44704f69SBart Van Assche # Find out what ABI is being produced by ac_compile, and set linker 1319*44704f69SBart Van Assche # options accordingly. 1320*44704f69SBart Van Assche echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1321*44704f69SBart Van Assche if AC_TRY_EVAL(ac_compile); then 1322*44704f69SBart Van Assche if test yes = "$lt_cv_prog_gnu_ld"; then 1323*44704f69SBart Van Assche case `$FILECMD conftest.$ac_objext` in 1324*44704f69SBart Van Assche *32-bit*) 1325*44704f69SBart Van Assche LD="${LD-ld} -melf32bsmip" 1326*44704f69SBart Van Assche ;; 1327*44704f69SBart Van Assche *N32*) 1328*44704f69SBart Van Assche LD="${LD-ld} -melf32bmipn32" 1329*44704f69SBart Van Assche ;; 1330*44704f69SBart Van Assche *64-bit*) 1331*44704f69SBart Van Assche LD="${LD-ld} -melf64bmip" 1332*44704f69SBart Van Assche ;; 1333*44704f69SBart Van Assche esac 1334*44704f69SBart Van Assche else 1335*44704f69SBart Van Assche case `$FILECMD conftest.$ac_objext` in 1336*44704f69SBart Van Assche *32-bit*) 1337*44704f69SBart Van Assche LD="${LD-ld} -32" 1338*44704f69SBart Van Assche ;; 1339*44704f69SBart Van Assche *N32*) 1340*44704f69SBart Van Assche LD="${LD-ld} -n32" 1341*44704f69SBart Van Assche ;; 1342*44704f69SBart Van Assche *64-bit*) 1343*44704f69SBart Van Assche LD="${LD-ld} -64" 1344*44704f69SBart Van Assche ;; 1345*44704f69SBart Van Assche esac 1346*44704f69SBart Van Assche fi 1347*44704f69SBart Van Assche fi 1348*44704f69SBart Van Assche rm -rf conftest* 1349*44704f69SBart Van Assche ;; 1350*44704f69SBart Van Assche 1351*44704f69SBart Van Asschemips64*-*linux*) 1352*44704f69SBart Van Assche # Find out what ABI is being produced by ac_compile, and set linker 1353*44704f69SBart Van Assche # options accordingly. 1354*44704f69SBart Van Assche echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1355*44704f69SBart Van Assche if AC_TRY_EVAL(ac_compile); then 1356*44704f69SBart Van Assche emul=elf 1357*44704f69SBart Van Assche case `$FILECMD conftest.$ac_objext` in 1358*44704f69SBart Van Assche *32-bit*) 1359*44704f69SBart Van Assche emul="${emul}32" 1360*44704f69SBart Van Assche ;; 1361*44704f69SBart Van Assche *64-bit*) 1362*44704f69SBart Van Assche emul="${emul}64" 1363*44704f69SBart Van Assche ;; 1364*44704f69SBart Van Assche esac 1365*44704f69SBart Van Assche case `$FILECMD conftest.$ac_objext` in 1366*44704f69SBart Van Assche *MSB*) 1367*44704f69SBart Van Assche emul="${emul}btsmip" 1368*44704f69SBart Van Assche ;; 1369*44704f69SBart Van Assche *LSB*) 1370*44704f69SBart Van Assche emul="${emul}ltsmip" 1371*44704f69SBart Van Assche ;; 1372*44704f69SBart Van Assche esac 1373*44704f69SBart Van Assche case `$FILECMD conftest.$ac_objext` in 1374*44704f69SBart Van Assche *N32*) 1375*44704f69SBart Van Assche emul="${emul}n32" 1376*44704f69SBart Van Assche ;; 1377*44704f69SBart Van Assche esac 1378*44704f69SBart Van Assche LD="${LD-ld} -m $emul" 1379*44704f69SBart Van Assche fi 1380*44704f69SBart Van Assche rm -rf conftest* 1381*44704f69SBart Van Assche ;; 1382*44704f69SBart Van Assche 1383*44704f69SBart Van Asschex86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1384*44704f69SBart Van Assches390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1385*44704f69SBart Van Assche # Find out what ABI is being produced by ac_compile, and set linker 1386*44704f69SBart Van Assche # options accordingly. Note that the listed cases only cover the 1387*44704f69SBart Van Assche # situations where additional linker options are needed (such as when 1388*44704f69SBart Van Assche # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1389*44704f69SBart Van Assche # vice versa); the common cases where no linker options are needed do 1390*44704f69SBart Van Assche # not appear in the list. 1391*44704f69SBart Van Assche echo 'int i;' > conftest.$ac_ext 1392*44704f69SBart Van Assche if AC_TRY_EVAL(ac_compile); then 1393*44704f69SBart Van Assche case `$FILECMD conftest.o` in 1394*44704f69SBart Van Assche *32-bit*) 1395*44704f69SBart Van Assche case $host in 1396*44704f69SBart Van Assche x86_64-*kfreebsd*-gnu) 1397*44704f69SBart Van Assche LD="${LD-ld} -m elf_i386_fbsd" 1398*44704f69SBart Van Assche ;; 1399*44704f69SBart Van Assche x86_64-*linux*) 1400*44704f69SBart Van Assche case `$FILECMD conftest.o` in 1401*44704f69SBart Van Assche *x86-64*) 1402*44704f69SBart Van Assche LD="${LD-ld} -m elf32_x86_64" 1403*44704f69SBart Van Assche ;; 1404*44704f69SBart Van Assche *) 1405*44704f69SBart Van Assche LD="${LD-ld} -m elf_i386" 1406*44704f69SBart Van Assche ;; 1407*44704f69SBart Van Assche esac 1408*44704f69SBart Van Assche ;; 1409*44704f69SBart Van Assche powerpc64le-*linux*) 1410*44704f69SBart Van Assche LD="${LD-ld} -m elf32lppclinux" 1411*44704f69SBart Van Assche ;; 1412*44704f69SBart Van Assche powerpc64-*linux*) 1413*44704f69SBart Van Assche LD="${LD-ld} -m elf32ppclinux" 1414*44704f69SBart Van Assche ;; 1415*44704f69SBart Van Assche s390x-*linux*) 1416*44704f69SBart Van Assche LD="${LD-ld} -m elf_s390" 1417*44704f69SBart Van Assche ;; 1418*44704f69SBart Van Assche sparc64-*linux*) 1419*44704f69SBart Van Assche LD="${LD-ld} -m elf32_sparc" 1420*44704f69SBart Van Assche ;; 1421*44704f69SBart Van Assche esac 1422*44704f69SBart Van Assche ;; 1423*44704f69SBart Van Assche *64-bit*) 1424*44704f69SBart Van Assche case $host in 1425*44704f69SBart Van Assche x86_64-*kfreebsd*-gnu) 1426*44704f69SBart Van Assche LD="${LD-ld} -m elf_x86_64_fbsd" 1427*44704f69SBart Van Assche ;; 1428*44704f69SBart Van Assche x86_64-*linux*) 1429*44704f69SBart Van Assche LD="${LD-ld} -m elf_x86_64" 1430*44704f69SBart Van Assche ;; 1431*44704f69SBart Van Assche powerpcle-*linux*) 1432*44704f69SBart Van Assche LD="${LD-ld} -m elf64lppc" 1433*44704f69SBart Van Assche ;; 1434*44704f69SBart Van Assche powerpc-*linux*) 1435*44704f69SBart Van Assche LD="${LD-ld} -m elf64ppc" 1436*44704f69SBart Van Assche ;; 1437*44704f69SBart Van Assche s390*-*linux*|s390*-*tpf*) 1438*44704f69SBart Van Assche LD="${LD-ld} -m elf64_s390" 1439*44704f69SBart Van Assche ;; 1440*44704f69SBart Van Assche sparc*-*linux*) 1441*44704f69SBart Van Assche LD="${LD-ld} -m elf64_sparc" 1442*44704f69SBart Van Assche ;; 1443*44704f69SBart Van Assche esac 1444*44704f69SBart Van Assche ;; 1445*44704f69SBart Van Assche esac 1446*44704f69SBart Van Assche fi 1447*44704f69SBart Van Assche rm -rf conftest* 1448*44704f69SBart Van Assche ;; 1449*44704f69SBart Van Assche 1450*44704f69SBart Van Assche*-*-sco3.2v5*) 1451*44704f69SBart Van Assche # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1452*44704f69SBart Van Assche SAVE_CFLAGS=$CFLAGS 1453*44704f69SBart Van Assche CFLAGS="$CFLAGS -belf" 1454*44704f69SBart Van Assche AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1455*44704f69SBart Van Assche [AC_LANG_PUSH(C) 1456*44704f69SBart Van Assche AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1457*44704f69SBart Van Assche AC_LANG_POP]) 1458*44704f69SBart Van Assche if test yes != "$lt_cv_cc_needs_belf"; then 1459*44704f69SBart Van Assche # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1460*44704f69SBart Van Assche CFLAGS=$SAVE_CFLAGS 1461*44704f69SBart Van Assche fi 1462*44704f69SBart Van Assche ;; 1463*44704f69SBart Van Assche*-*solaris*) 1464*44704f69SBart Van Assche # Find out what ABI is being produced by ac_compile, and set linker 1465*44704f69SBart Van Assche # options accordingly. 1466*44704f69SBart Van Assche echo 'int i;' > conftest.$ac_ext 1467*44704f69SBart Van Assche if AC_TRY_EVAL(ac_compile); then 1468*44704f69SBart Van Assche case `$FILECMD conftest.o` in 1469*44704f69SBart Van Assche *64-bit*) 1470*44704f69SBart Van Assche case $lt_cv_prog_gnu_ld in 1471*44704f69SBart Van Assche yes*) 1472*44704f69SBart Van Assche case $host in 1473*44704f69SBart Van Assche i?86-*-solaris*|x86_64-*-solaris*) 1474*44704f69SBart Van Assche LD="${LD-ld} -m elf_x86_64" 1475*44704f69SBart Van Assche ;; 1476*44704f69SBart Van Assche sparc*-*-solaris*) 1477*44704f69SBart Van Assche LD="${LD-ld} -m elf64_sparc" 1478*44704f69SBart Van Assche ;; 1479*44704f69SBart Van Assche esac 1480*44704f69SBart Van Assche # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1481*44704f69SBart Van Assche if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1482*44704f69SBart Van Assche LD=${LD-ld}_sol2 1483*44704f69SBart Van Assche fi 1484*44704f69SBart Van Assche ;; 1485*44704f69SBart Van Assche *) 1486*44704f69SBart Van Assche if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1487*44704f69SBart Van Assche LD="${LD-ld} -64" 1488*44704f69SBart Van Assche fi 1489*44704f69SBart Van Assche ;; 1490*44704f69SBart Van Assche esac 1491*44704f69SBart Van Assche ;; 1492*44704f69SBart Van Assche esac 1493*44704f69SBart Van Assche fi 1494*44704f69SBart Van Assche rm -rf conftest* 1495*44704f69SBart Van Assche ;; 1496*44704f69SBart Van Asscheesac 1497*44704f69SBart Van Assche 1498*44704f69SBart Van Asscheneed_locks=$enable_libtool_lock 1499*44704f69SBart Van Assche])# _LT_ENABLE_LOCK 1500*44704f69SBart Van Assche 1501*44704f69SBart Van Assche 1502*44704f69SBart Van Assche# _LT_PROG_AR 1503*44704f69SBart Van Assche# ----------- 1504*44704f69SBart Van Asschem4_defun([_LT_PROG_AR], 1505*44704f69SBart Van Assche[AC_CHECK_TOOLS(AR, [ar], false) 1506*44704f69SBart Van Assche: ${AR=ar} 1507*44704f69SBart Van Assche_LT_DECL([], [AR], [1], [The archiver]) 1508*44704f69SBart Van Assche 1509*44704f69SBart Van Assche# Use ARFLAGS variable as AR's operation code to sync the variable naming with 1510*44704f69SBart Van Assche# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 1511*44704f69SBart Van Assche# higher priority because thats what people were doing historically (setting 1512*44704f69SBart Van Assche# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 1513*44704f69SBart Van Assche# variable obsoleted/removed. 1514*44704f69SBart Van Assche 1515*44704f69SBart Van Asschetest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 1516*44704f69SBart Van Asschelt_ar_flags=$AR_FLAGS 1517*44704f69SBart Van Assche_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 1518*44704f69SBart Van Assche 1519*44704f69SBart Van Assche# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 1520*44704f69SBart Van Assche# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 1521*44704f69SBart Van Assche_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 1522*44704f69SBart Van Assche [Flags to create an archive]) 1523*44704f69SBart Van Assche 1524*44704f69SBart Van AsscheAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1525*44704f69SBart Van Assche [lt_cv_ar_at_file=no 1526*44704f69SBart Van Assche AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1527*44704f69SBart Van Assche [echo conftest.$ac_objext > conftest.lst 1528*44704f69SBart Van Assche lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1529*44704f69SBart Van Assche AC_TRY_EVAL([lt_ar_try]) 1530*44704f69SBart Van Assche if test 0 -eq "$ac_status"; then 1531*44704f69SBart Van Assche # Ensure the archiver fails upon bogus file names. 1532*44704f69SBart Van Assche rm -f conftest.$ac_objext libconftest.a 1533*44704f69SBart Van Assche AC_TRY_EVAL([lt_ar_try]) 1534*44704f69SBart Van Assche if test 0 -ne "$ac_status"; then 1535*44704f69SBart Van Assche lt_cv_ar_at_file=@ 1536*44704f69SBart Van Assche fi 1537*44704f69SBart Van Assche fi 1538*44704f69SBart Van Assche rm -f conftest.* libconftest.a 1539*44704f69SBart Van Assche ]) 1540*44704f69SBart Van Assche ]) 1541*44704f69SBart Van Assche 1542*44704f69SBart Van Asscheif test no = "$lt_cv_ar_at_file"; then 1543*44704f69SBart Van Assche archiver_list_spec= 1544*44704f69SBart Van Asscheelse 1545*44704f69SBart Van Assche archiver_list_spec=$lt_cv_ar_at_file 1546*44704f69SBart Van Asschefi 1547*44704f69SBart Van Assche_LT_DECL([], [archiver_list_spec], [1], 1548*44704f69SBart Van Assche [How to feed a file listing to the archiver]) 1549*44704f69SBart Van Assche])# _LT_PROG_AR 1550*44704f69SBart Van Assche 1551*44704f69SBart Van Assche 1552*44704f69SBart Van Assche# _LT_CMD_OLD_ARCHIVE 1553*44704f69SBart Van Assche# ------------------- 1554*44704f69SBart Van Asschem4_defun([_LT_CMD_OLD_ARCHIVE], 1555*44704f69SBart Van Assche[_LT_PROG_AR 1556*44704f69SBart Van Assche 1557*44704f69SBart Van AsscheAC_CHECK_TOOL(STRIP, strip, :) 1558*44704f69SBart Van Asschetest -z "$STRIP" && STRIP=: 1559*44704f69SBart Van Assche_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1560*44704f69SBart Van Assche 1561*44704f69SBart Van AsscheAC_CHECK_TOOL(RANLIB, ranlib, :) 1562*44704f69SBart Van Asschetest -z "$RANLIB" && RANLIB=: 1563*44704f69SBart Van Assche_LT_DECL([], [RANLIB], [1], 1564*44704f69SBart Van Assche [Commands used to install an old-style archive]) 1565*44704f69SBart Van Assche 1566*44704f69SBart Van Assche# Determine commands to create old-style static archives. 1567*44704f69SBart Van Asscheold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1568*44704f69SBart Van Asscheold_postinstall_cmds='chmod 644 $oldlib' 1569*44704f69SBart Van Asscheold_postuninstall_cmds= 1570*44704f69SBart Van Assche 1571*44704f69SBart Van Asscheif test -n "$RANLIB"; then 1572*44704f69SBart Van Assche case $host_os in 1573*44704f69SBart Van Assche bitrig* | openbsd*) 1574*44704f69SBart Van Assche old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1575*44704f69SBart Van Assche ;; 1576*44704f69SBart Van Assche *) 1577*44704f69SBart Van Assche old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1578*44704f69SBart Van Assche ;; 1579*44704f69SBart Van Assche esac 1580*44704f69SBart Van Assche old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1581*44704f69SBart Van Asschefi 1582*44704f69SBart Van Assche 1583*44704f69SBart Van Asschecase $host_os in 1584*44704f69SBart Van Assche darwin*) 1585*44704f69SBart Van Assche lock_old_archive_extraction=yes ;; 1586*44704f69SBart Van Assche *) 1587*44704f69SBart Van Assche lock_old_archive_extraction=no ;; 1588*44704f69SBart Van Asscheesac 1589*44704f69SBart Van Assche_LT_DECL([], [old_postinstall_cmds], [2]) 1590*44704f69SBart Van Assche_LT_DECL([], [old_postuninstall_cmds], [2]) 1591*44704f69SBart Van Assche_LT_TAGDECL([], [old_archive_cmds], [2], 1592*44704f69SBart Van Assche [Commands used to build an old-style archive]) 1593*44704f69SBart Van Assche_LT_DECL([], [lock_old_archive_extraction], [0], 1594*44704f69SBart Van Assche [Whether to use a lock for old archive extraction]) 1595*44704f69SBart Van Assche])# _LT_CMD_OLD_ARCHIVE 1596*44704f69SBart Van Assche 1597*44704f69SBart Van Assche 1598*44704f69SBart Van Assche# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1599*44704f69SBart Van Assche# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1600*44704f69SBart Van Assche# ---------------------------------------------------------------- 1601*44704f69SBart Van Assche# Check whether the given compiler option works 1602*44704f69SBart Van AsscheAC_DEFUN([_LT_COMPILER_OPTION], 1603*44704f69SBart Van Assche[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1604*44704f69SBart Van Asschem4_require([_LT_DECL_SED])dnl 1605*44704f69SBart Van AsscheAC_CACHE_CHECK([$1], [$2], 1606*44704f69SBart Van Assche [$2=no 1607*44704f69SBart Van Assche m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1608*44704f69SBart Van Assche echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1609*44704f69SBart Van Assche lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1610*44704f69SBart Van Assche # Insert the option either (1) after the last *FLAGS variable, or 1611*44704f69SBart Van Assche # (2) before a word containing "conftest.", or (3) at the end. 1612*44704f69SBart Van Assche # Note that $ac_compile itself does not contain backslashes and begins 1613*44704f69SBart Van Assche # with a dollar sign (not a hyphen), so the echo should work correctly. 1614*44704f69SBart Van Assche # The option is referenced via a variable to avoid confusing sed. 1615*44704f69SBart Van Assche lt_compile=`echo "$ac_compile" | $SED \ 1616*44704f69SBart Van Assche -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1617*44704f69SBart Van Assche -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1618*44704f69SBart Van Assche -e 's:$: $lt_compiler_flag:'` 1619*44704f69SBart Van Assche (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1620*44704f69SBart Van Assche (eval "$lt_compile" 2>conftest.err) 1621*44704f69SBart Van Assche ac_status=$? 1622*44704f69SBart Van Assche cat conftest.err >&AS_MESSAGE_LOG_FD 1623*44704f69SBart Van Assche echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1624*44704f69SBart Van Assche if (exit $ac_status) && test -s "$ac_outfile"; then 1625*44704f69SBart Van Assche # The compiler can only warn and ignore the option if not recognized 1626*44704f69SBart Van Assche # So say no if there are warnings other than the usual output. 1627*44704f69SBart Van Assche $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1628*44704f69SBart Van Assche $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1629*44704f69SBart Van Assche if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1630*44704f69SBart Van Assche $2=yes 1631*44704f69SBart Van Assche fi 1632*44704f69SBart Van Assche fi 1633*44704f69SBart Van Assche $RM conftest* 1634*44704f69SBart Van Assche]) 1635*44704f69SBart Van Assche 1636*44704f69SBart Van Asscheif test yes = "[$]$2"; then 1637*44704f69SBart Van Assche m4_if([$5], , :, [$5]) 1638*44704f69SBart Van Asscheelse 1639*44704f69SBart Van Assche m4_if([$6], , :, [$6]) 1640*44704f69SBart Van Asschefi 1641*44704f69SBart Van Assche])# _LT_COMPILER_OPTION 1642*44704f69SBart Van Assche 1643*44704f69SBart Van Assche# Old name: 1644*44704f69SBart Van AsscheAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1645*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 1646*44704f69SBart Van Asschednl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1647*44704f69SBart Van Assche 1648*44704f69SBart Van Assche 1649*44704f69SBart Van Assche# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1650*44704f69SBart Van Assche# [ACTION-SUCCESS], [ACTION-FAILURE]) 1651*44704f69SBart Van Assche# ---------------------------------------------------- 1652*44704f69SBart Van Assche# Check whether the given linker option works 1653*44704f69SBart Van AsscheAC_DEFUN([_LT_LINKER_OPTION], 1654*44704f69SBart Van Assche[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1655*44704f69SBart Van Asschem4_require([_LT_DECL_SED])dnl 1656*44704f69SBart Van AsscheAC_CACHE_CHECK([$1], [$2], 1657*44704f69SBart Van Assche [$2=no 1658*44704f69SBart Van Assche save_LDFLAGS=$LDFLAGS 1659*44704f69SBart Van Assche LDFLAGS="$LDFLAGS $3" 1660*44704f69SBart Van Assche echo "$lt_simple_link_test_code" > conftest.$ac_ext 1661*44704f69SBart Van Assche if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1662*44704f69SBart Van Assche # The linker can only warn and ignore the option if not recognized 1663*44704f69SBart Van Assche # So say no if there are warnings 1664*44704f69SBart Van Assche if test -s conftest.err; then 1665*44704f69SBart Van Assche # Append any errors to the config.log. 1666*44704f69SBart Van Assche cat conftest.err 1>&AS_MESSAGE_LOG_FD 1667*44704f69SBart Van Assche $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1668*44704f69SBart Van Assche $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1669*44704f69SBart Van Assche if diff conftest.exp conftest.er2 >/dev/null; then 1670*44704f69SBart Van Assche $2=yes 1671*44704f69SBart Van Assche fi 1672*44704f69SBart Van Assche else 1673*44704f69SBart Van Assche $2=yes 1674*44704f69SBart Van Assche fi 1675*44704f69SBart Van Assche fi 1676*44704f69SBart Van Assche $RM -r conftest* 1677*44704f69SBart Van Assche LDFLAGS=$save_LDFLAGS 1678*44704f69SBart Van Assche]) 1679*44704f69SBart Van Assche 1680*44704f69SBart Van Asscheif test yes = "[$]$2"; then 1681*44704f69SBart Van Assche m4_if([$4], , :, [$4]) 1682*44704f69SBart Van Asscheelse 1683*44704f69SBart Van Assche m4_if([$5], , :, [$5]) 1684*44704f69SBart Van Asschefi 1685*44704f69SBart Van Assche])# _LT_LINKER_OPTION 1686*44704f69SBart Van Assche 1687*44704f69SBart Van Assche# Old name: 1688*44704f69SBart Van AsscheAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1689*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 1690*44704f69SBart Van Asschednl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1691*44704f69SBart Van Assche 1692*44704f69SBart Van Assche 1693*44704f69SBart Van Assche# LT_CMD_MAX_LEN 1694*44704f69SBart Van Assche#--------------- 1695*44704f69SBart Van AsscheAC_DEFUN([LT_CMD_MAX_LEN], 1696*44704f69SBart Van Assche[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1697*44704f69SBart Van Assche# find the maximum length of command line arguments 1698*44704f69SBart Van AsscheAC_MSG_CHECKING([the maximum length of command line arguments]) 1699*44704f69SBart Van AsscheAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1700*44704f69SBart Van Assche i=0 1701*44704f69SBart Van Assche teststring=ABCD 1702*44704f69SBart Van Assche 1703*44704f69SBart Van Assche case $build_os in 1704*44704f69SBart Van Assche msdosdjgpp*) 1705*44704f69SBart Van Assche # On DJGPP, this test can blow up pretty badly due to problems in libc 1706*44704f69SBart Van Assche # (any single argument exceeding 2000 bytes causes a buffer overrun 1707*44704f69SBart Van Assche # during glob expansion). Even if it were fixed, the result of this 1708*44704f69SBart Van Assche # check would be larger than it should be. 1709*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=12288; # 12K is about right 1710*44704f69SBart Van Assche ;; 1711*44704f69SBart Van Assche 1712*44704f69SBart Van Assche gnu*) 1713*44704f69SBart Van Assche # Under GNU Hurd, this test is not required because there is 1714*44704f69SBart Van Assche # no limit to the length of command line arguments. 1715*44704f69SBart Van Assche # Libtool will interpret -1 as no limit whatsoever 1716*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=-1; 1717*44704f69SBart Van Assche ;; 1718*44704f69SBart Van Assche 1719*44704f69SBart Van Assche cygwin* | mingw* | cegcc*) 1720*44704f69SBart Van Assche # On Win9x/ME, this test blows up -- it succeeds, but takes 1721*44704f69SBart Van Assche # about 5 minutes as the teststring grows exponentially. 1722*44704f69SBart Van Assche # Worse, since 9x/ME are not pre-emptively multitasking, 1723*44704f69SBart Van Assche # you end up with a "frozen" computer, even though with patience 1724*44704f69SBart Van Assche # the test eventually succeeds (with a max line length of 256k). 1725*44704f69SBart Van Assche # Instead, let's just punt: use the minimum linelength reported by 1726*44704f69SBart Van Assche # all of the supported platforms: 8192 (on NT/2K/XP). 1727*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=8192; 1728*44704f69SBart Van Assche ;; 1729*44704f69SBart Van Assche 1730*44704f69SBart Van Assche mint*) 1731*44704f69SBart Van Assche # On MiNT this can take a long time and run out of memory. 1732*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=8192; 1733*44704f69SBart Van Assche ;; 1734*44704f69SBart Van Assche 1735*44704f69SBart Van Assche amigaos*) 1736*44704f69SBart Van Assche # On AmigaOS with pdksh, this test takes hours, literally. 1737*44704f69SBart Van Assche # So we just punt and use a minimum line length of 8192. 1738*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=8192; 1739*44704f69SBart Van Assche ;; 1740*44704f69SBart Van Assche 1741*44704f69SBart Van Assche bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 1742*44704f69SBart Van Assche # This has been around since 386BSD, at least. Likely further. 1743*44704f69SBart Van Assche if test -x /sbin/sysctl; then 1744*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1745*44704f69SBart Van Assche elif test -x /usr/sbin/sysctl; then 1746*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1747*44704f69SBart Van Assche else 1748*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1749*44704f69SBart Van Assche fi 1750*44704f69SBart Van Assche # And add a safety zone 1751*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1752*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1753*44704f69SBart Van Assche ;; 1754*44704f69SBart Van Assche 1755*44704f69SBart Van Assche interix*) 1756*44704f69SBart Van Assche # We know the value 262144 and hardcode it with a safety zone (like BSD) 1757*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=196608 1758*44704f69SBart Van Assche ;; 1759*44704f69SBart Van Assche 1760*44704f69SBart Van Assche os2*) 1761*44704f69SBart Van Assche # The test takes a long time on OS/2. 1762*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=8192 1763*44704f69SBart Van Assche ;; 1764*44704f69SBart Van Assche 1765*44704f69SBart Van Assche osf*) 1766*44704f69SBart Van Assche # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1767*44704f69SBart Van Assche # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1768*44704f69SBart Van Assche # nice to cause kernel panics so lets avoid the loop below. 1769*44704f69SBart Van Assche # First set a reasonable default. 1770*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=16384 1771*44704f69SBart Van Assche # 1772*44704f69SBart Van Assche if test -x /sbin/sysconfig; then 1773*44704f69SBart Van Assche case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1774*44704f69SBart Van Assche *1*) lt_cv_sys_max_cmd_len=-1 ;; 1775*44704f69SBart Van Assche esac 1776*44704f69SBart Van Assche fi 1777*44704f69SBart Van Assche ;; 1778*44704f69SBart Van Assche sco3.2v5*) 1779*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=102400 1780*44704f69SBart Van Assche ;; 1781*44704f69SBart Van Assche sysv5* | sco5v6* | sysv4.2uw2*) 1782*44704f69SBart Van Assche kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1783*44704f69SBart Van Assche if test -n "$kargmax"; then 1784*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 1785*44704f69SBart Van Assche else 1786*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=32768 1787*44704f69SBart Van Assche fi 1788*44704f69SBart Van Assche ;; 1789*44704f69SBart Van Assche *) 1790*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1791*44704f69SBart Van Assche if test -n "$lt_cv_sys_max_cmd_len" && \ 1792*44704f69SBart Van Assche test undefined != "$lt_cv_sys_max_cmd_len"; then 1793*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1794*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1795*44704f69SBart Van Assche else 1796*44704f69SBart Van Assche # Make teststring a little bigger before we do anything with it. 1797*44704f69SBart Van Assche # a 1K string should be a reasonable start. 1798*44704f69SBart Van Assche for i in 1 2 3 4 5 6 7 8; do 1799*44704f69SBart Van Assche teststring=$teststring$teststring 1800*44704f69SBart Van Assche done 1801*44704f69SBart Van Assche SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1802*44704f69SBart Van Assche # If test is not a shell built-in, we'll probably end up computing a 1803*44704f69SBart Van Assche # maximum length that is only half of the actual maximum length, but 1804*44704f69SBart Van Assche # we can't tell. 1805*44704f69SBart Van Assche while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1806*44704f69SBart Van Assche = "X$teststring$teststring"; } >/dev/null 2>&1 && 1807*44704f69SBart Van Assche test 17 != "$i" # 1/2 MB should be enough 1808*44704f69SBart Van Assche do 1809*44704f69SBart Van Assche i=`expr $i + 1` 1810*44704f69SBart Van Assche teststring=$teststring$teststring 1811*44704f69SBart Van Assche done 1812*44704f69SBart Van Assche # Only check the string length outside the loop. 1813*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1814*44704f69SBart Van Assche teststring= 1815*44704f69SBart Van Assche # Add a significant safety factor because C++ compilers can tack on 1816*44704f69SBart Van Assche # massive amounts of additional arguments before passing them to the 1817*44704f69SBart Van Assche # linker. It appears as though 1/2 is a usable value. 1818*44704f69SBart Van Assche lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1819*44704f69SBart Van Assche fi 1820*44704f69SBart Van Assche ;; 1821*44704f69SBart Van Assche esac 1822*44704f69SBart Van Assche]) 1823*44704f69SBart Van Asscheif test -n "$lt_cv_sys_max_cmd_len"; then 1824*44704f69SBart Van Assche AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1825*44704f69SBart Van Asscheelse 1826*44704f69SBart Van Assche AC_MSG_RESULT(none) 1827*44704f69SBart Van Asschefi 1828*44704f69SBart Van Asschemax_cmd_len=$lt_cv_sys_max_cmd_len 1829*44704f69SBart Van Assche_LT_DECL([], [max_cmd_len], [0], 1830*44704f69SBart Van Assche [What is the maximum length of a command?]) 1831*44704f69SBart Van Assche])# LT_CMD_MAX_LEN 1832*44704f69SBart Van Assche 1833*44704f69SBart Van Assche# Old name: 1834*44704f69SBart Van AsscheAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1835*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 1836*44704f69SBart Van Asschednl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1837*44704f69SBart Van Assche 1838*44704f69SBart Van Assche 1839*44704f69SBart Van Assche# _LT_HEADER_DLFCN 1840*44704f69SBart Van Assche# ---------------- 1841*44704f69SBart Van Asschem4_defun([_LT_HEADER_DLFCN], 1842*44704f69SBart Van Assche[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1843*44704f69SBart Van Assche])# _LT_HEADER_DLFCN 1844*44704f69SBart Van Assche 1845*44704f69SBart Van Assche 1846*44704f69SBart Van Assche# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1847*44704f69SBart Van Assche# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1848*44704f69SBart Van Assche# ---------------------------------------------------------------- 1849*44704f69SBart Van Asschem4_defun([_LT_TRY_DLOPEN_SELF], 1850*44704f69SBart Van Assche[m4_require([_LT_HEADER_DLFCN])dnl 1851*44704f69SBart Van Asscheif test yes = "$cross_compiling"; then : 1852*44704f69SBart Van Assche [$4] 1853*44704f69SBart Van Asscheelse 1854*44704f69SBart Van Assche lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1855*44704f69SBart Van Assche lt_status=$lt_dlunknown 1856*44704f69SBart Van Assche cat > conftest.$ac_ext <<_LT_EOF 1857*44704f69SBart Van Assche[#line $LINENO "configure" 1858*44704f69SBart Van Assche#include "confdefs.h" 1859*44704f69SBart Van Assche 1860*44704f69SBart Van Assche#if HAVE_DLFCN_H 1861*44704f69SBart Van Assche#include <dlfcn.h> 1862*44704f69SBart Van Assche#endif 1863*44704f69SBart Van Assche 1864*44704f69SBart Van Assche#include <stdio.h> 1865*44704f69SBart Van Assche 1866*44704f69SBart Van Assche#ifdef RTLD_GLOBAL 1867*44704f69SBart Van Assche# define LT_DLGLOBAL RTLD_GLOBAL 1868*44704f69SBart Van Assche#else 1869*44704f69SBart Van Assche# ifdef DL_GLOBAL 1870*44704f69SBart Van Assche# define LT_DLGLOBAL DL_GLOBAL 1871*44704f69SBart Van Assche# else 1872*44704f69SBart Van Assche# define LT_DLGLOBAL 0 1873*44704f69SBart Van Assche# endif 1874*44704f69SBart Van Assche#endif 1875*44704f69SBart Van Assche 1876*44704f69SBart Van Assche/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1877*44704f69SBart Van Assche find out it does not work in some platform. */ 1878*44704f69SBart Van Assche#ifndef LT_DLLAZY_OR_NOW 1879*44704f69SBart Van Assche# ifdef RTLD_LAZY 1880*44704f69SBart Van Assche# define LT_DLLAZY_OR_NOW RTLD_LAZY 1881*44704f69SBart Van Assche# else 1882*44704f69SBart Van Assche# ifdef DL_LAZY 1883*44704f69SBart Van Assche# define LT_DLLAZY_OR_NOW DL_LAZY 1884*44704f69SBart Van Assche# else 1885*44704f69SBart Van Assche# ifdef RTLD_NOW 1886*44704f69SBart Van Assche# define LT_DLLAZY_OR_NOW RTLD_NOW 1887*44704f69SBart Van Assche# else 1888*44704f69SBart Van Assche# ifdef DL_NOW 1889*44704f69SBart Van Assche# define LT_DLLAZY_OR_NOW DL_NOW 1890*44704f69SBart Van Assche# else 1891*44704f69SBart Van Assche# define LT_DLLAZY_OR_NOW 0 1892*44704f69SBart Van Assche# endif 1893*44704f69SBart Van Assche# endif 1894*44704f69SBart Van Assche# endif 1895*44704f69SBart Van Assche# endif 1896*44704f69SBart Van Assche#endif 1897*44704f69SBart Van Assche 1898*44704f69SBart Van Assche/* When -fvisibility=hidden is used, assume the code has been annotated 1899*44704f69SBart Van Assche correspondingly for the symbols needed. */ 1900*44704f69SBart Van Assche#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1901*44704f69SBart Van Asscheint fnord () __attribute__((visibility("default"))); 1902*44704f69SBart Van Assche#endif 1903*44704f69SBart Van Assche 1904*44704f69SBart Van Asscheint fnord () { return 42; } 1905*44704f69SBart Van Asscheint main () 1906*44704f69SBart Van Assche{ 1907*44704f69SBart Van Assche void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1908*44704f69SBart Van Assche int status = $lt_dlunknown; 1909*44704f69SBart Van Assche 1910*44704f69SBart Van Assche if (self) 1911*44704f69SBart Van Assche { 1912*44704f69SBart Van Assche if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1913*44704f69SBart Van Assche else 1914*44704f69SBart Van Assche { 1915*44704f69SBart Van Assche if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1916*44704f69SBart Van Assche else puts (dlerror ()); 1917*44704f69SBart Van Assche } 1918*44704f69SBart Van Assche /* dlclose (self); */ 1919*44704f69SBart Van Assche } 1920*44704f69SBart Van Assche else 1921*44704f69SBart Van Assche puts (dlerror ()); 1922*44704f69SBart Van Assche 1923*44704f69SBart Van Assche return status; 1924*44704f69SBart Van Assche}] 1925*44704f69SBart Van Assche_LT_EOF 1926*44704f69SBart Van Assche if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1927*44704f69SBart Van Assche (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1928*44704f69SBart Van Assche lt_status=$? 1929*44704f69SBart Van Assche case x$lt_status in 1930*44704f69SBart Van Assche x$lt_dlno_uscore) $1 ;; 1931*44704f69SBart Van Assche x$lt_dlneed_uscore) $2 ;; 1932*44704f69SBart Van Assche x$lt_dlunknown|x*) $3 ;; 1933*44704f69SBart Van Assche esac 1934*44704f69SBart Van Assche else : 1935*44704f69SBart Van Assche # compilation failed 1936*44704f69SBart Van Assche $3 1937*44704f69SBart Van Assche fi 1938*44704f69SBart Van Asschefi 1939*44704f69SBart Van Asscherm -fr conftest* 1940*44704f69SBart Van Assche])# _LT_TRY_DLOPEN_SELF 1941*44704f69SBart Van Assche 1942*44704f69SBart Van Assche 1943*44704f69SBart Van Assche# LT_SYS_DLOPEN_SELF 1944*44704f69SBart Van Assche# ------------------ 1945*44704f69SBart Van AsscheAC_DEFUN([LT_SYS_DLOPEN_SELF], 1946*44704f69SBart Van Assche[m4_require([_LT_HEADER_DLFCN])dnl 1947*44704f69SBart Van Asscheif test yes != "$enable_dlopen"; then 1948*44704f69SBart Van Assche enable_dlopen=unknown 1949*44704f69SBart Van Assche enable_dlopen_self=unknown 1950*44704f69SBart Van Assche enable_dlopen_self_static=unknown 1951*44704f69SBart Van Asscheelse 1952*44704f69SBart Van Assche lt_cv_dlopen=no 1953*44704f69SBart Van Assche lt_cv_dlopen_libs= 1954*44704f69SBart Van Assche 1955*44704f69SBart Van Assche case $host_os in 1956*44704f69SBart Van Assche beos*) 1957*44704f69SBart Van Assche lt_cv_dlopen=load_add_on 1958*44704f69SBart Van Assche lt_cv_dlopen_libs= 1959*44704f69SBart Van Assche lt_cv_dlopen_self=yes 1960*44704f69SBart Van Assche ;; 1961*44704f69SBart Van Assche 1962*44704f69SBart Van Assche mingw* | pw32* | cegcc*) 1963*44704f69SBart Van Assche lt_cv_dlopen=LoadLibrary 1964*44704f69SBart Van Assche lt_cv_dlopen_libs= 1965*44704f69SBart Van Assche ;; 1966*44704f69SBart Van Assche 1967*44704f69SBart Van Assche cygwin*) 1968*44704f69SBart Van Assche lt_cv_dlopen=dlopen 1969*44704f69SBart Van Assche lt_cv_dlopen_libs= 1970*44704f69SBart Van Assche ;; 1971*44704f69SBart Van Assche 1972*44704f69SBart Van Assche darwin*) 1973*44704f69SBart Van Assche # if libdl is installed we need to link against it 1974*44704f69SBart Van Assche AC_CHECK_LIB([dl], [dlopen], 1975*44704f69SBart Van Assche [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1976*44704f69SBart Van Assche lt_cv_dlopen=dyld 1977*44704f69SBart Van Assche lt_cv_dlopen_libs= 1978*44704f69SBart Van Assche lt_cv_dlopen_self=yes 1979*44704f69SBart Van Assche ]) 1980*44704f69SBart Van Assche ;; 1981*44704f69SBart Van Assche 1982*44704f69SBart Van Assche tpf*) 1983*44704f69SBart Van Assche # Don't try to run any link tests for TPF. We know it's impossible 1984*44704f69SBart Van Assche # because TPF is a cross-compiler, and we know how we open DSOs. 1985*44704f69SBart Van Assche lt_cv_dlopen=dlopen 1986*44704f69SBart Van Assche lt_cv_dlopen_libs= 1987*44704f69SBart Van Assche lt_cv_dlopen_self=no 1988*44704f69SBart Van Assche ;; 1989*44704f69SBart Van Assche 1990*44704f69SBart Van Assche *) 1991*44704f69SBart Van Assche AC_CHECK_FUNC([shl_load], 1992*44704f69SBart Van Assche [lt_cv_dlopen=shl_load], 1993*44704f69SBart Van Assche [AC_CHECK_LIB([dld], [shl_load], 1994*44704f69SBart Van Assche [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1995*44704f69SBart Van Assche [AC_CHECK_FUNC([dlopen], 1996*44704f69SBart Van Assche [lt_cv_dlopen=dlopen], 1997*44704f69SBart Van Assche [AC_CHECK_LIB([dl], [dlopen], 1998*44704f69SBart Van Assche [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1999*44704f69SBart Van Assche [AC_CHECK_LIB([svld], [dlopen], 2000*44704f69SBart Van Assche [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 2001*44704f69SBart Van Assche [AC_CHECK_LIB([dld], [dld_link], 2002*44704f69SBart Van Assche [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 2003*44704f69SBart Van Assche ]) 2004*44704f69SBart Van Assche ]) 2005*44704f69SBart Van Assche ]) 2006*44704f69SBart Van Assche ]) 2007*44704f69SBart Van Assche ]) 2008*44704f69SBart Van Assche ;; 2009*44704f69SBart Van Assche esac 2010*44704f69SBart Van Assche 2011*44704f69SBart Van Assche if test no = "$lt_cv_dlopen"; then 2012*44704f69SBart Van Assche enable_dlopen=no 2013*44704f69SBart Van Assche else 2014*44704f69SBart Van Assche enable_dlopen=yes 2015*44704f69SBart Van Assche fi 2016*44704f69SBart Van Assche 2017*44704f69SBart Van Assche case $lt_cv_dlopen in 2018*44704f69SBart Van Assche dlopen) 2019*44704f69SBart Van Assche save_CPPFLAGS=$CPPFLAGS 2020*44704f69SBart Van Assche test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2021*44704f69SBart Van Assche 2022*44704f69SBart Van Assche save_LDFLAGS=$LDFLAGS 2023*44704f69SBart Van Assche wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2024*44704f69SBart Van Assche 2025*44704f69SBart Van Assche save_LIBS=$LIBS 2026*44704f69SBart Van Assche LIBS="$lt_cv_dlopen_libs $LIBS" 2027*44704f69SBart Van Assche 2028*44704f69SBart Van Assche AC_CACHE_CHECK([whether a program can dlopen itself], 2029*44704f69SBart Van Assche lt_cv_dlopen_self, [dnl 2030*44704f69SBart Van Assche _LT_TRY_DLOPEN_SELF( 2031*44704f69SBart Van Assche lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2032*44704f69SBart Van Assche lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2033*44704f69SBart Van Assche ]) 2034*44704f69SBart Van Assche 2035*44704f69SBart Van Assche if test yes = "$lt_cv_dlopen_self"; then 2036*44704f69SBart Van Assche wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2037*44704f69SBart Van Assche AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2038*44704f69SBart Van Assche lt_cv_dlopen_self_static, [dnl 2039*44704f69SBart Van Assche _LT_TRY_DLOPEN_SELF( 2040*44704f69SBart Van Assche lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2041*44704f69SBart Van Assche lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2042*44704f69SBart Van Assche ]) 2043*44704f69SBart Van Assche fi 2044*44704f69SBart Van Assche 2045*44704f69SBart Van Assche CPPFLAGS=$save_CPPFLAGS 2046*44704f69SBart Van Assche LDFLAGS=$save_LDFLAGS 2047*44704f69SBart Van Assche LIBS=$save_LIBS 2048*44704f69SBart Van Assche ;; 2049*44704f69SBart Van Assche esac 2050*44704f69SBart Van Assche 2051*44704f69SBart Van Assche case $lt_cv_dlopen_self in 2052*44704f69SBart Van Assche yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2053*44704f69SBart Van Assche *) enable_dlopen_self=unknown ;; 2054*44704f69SBart Van Assche esac 2055*44704f69SBart Van Assche 2056*44704f69SBart Van Assche case $lt_cv_dlopen_self_static in 2057*44704f69SBart Van Assche yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2058*44704f69SBart Van Assche *) enable_dlopen_self_static=unknown ;; 2059*44704f69SBart Van Assche esac 2060*44704f69SBart Van Asschefi 2061*44704f69SBart Van Assche_LT_DECL([dlopen_support], [enable_dlopen], [0], 2062*44704f69SBart Van Assche [Whether dlopen is supported]) 2063*44704f69SBart Van Assche_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2064*44704f69SBart Van Assche [Whether dlopen of programs is supported]) 2065*44704f69SBart Van Assche_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2066*44704f69SBart Van Assche [Whether dlopen of statically linked programs is supported]) 2067*44704f69SBart Van Assche])# LT_SYS_DLOPEN_SELF 2068*44704f69SBart Van Assche 2069*44704f69SBart Van Assche# Old name: 2070*44704f69SBart Van AsscheAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2071*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 2072*44704f69SBart Van Asschednl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2073*44704f69SBart Van Assche 2074*44704f69SBart Van Assche 2075*44704f69SBart Van Assche# _LT_COMPILER_C_O([TAGNAME]) 2076*44704f69SBart Van Assche# --------------------------- 2077*44704f69SBart Van Assche# Check to see if options -c and -o are simultaneously supported by compiler. 2078*44704f69SBart Van Assche# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2079*44704f69SBart Van Asschem4_defun([_LT_COMPILER_C_O], 2080*44704f69SBart Van Assche[m4_require([_LT_DECL_SED])dnl 2081*44704f69SBart Van Asschem4_require([_LT_FILEUTILS_DEFAULTS])dnl 2082*44704f69SBart Van Asschem4_require([_LT_TAG_COMPILER])dnl 2083*44704f69SBart Van AsscheAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2084*44704f69SBart Van Assche [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2085*44704f69SBart Van Assche [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2086*44704f69SBart Van Assche $RM -r conftest 2>/dev/null 2087*44704f69SBart Van Assche mkdir conftest 2088*44704f69SBart Van Assche cd conftest 2089*44704f69SBart Van Assche mkdir out 2090*44704f69SBart Van Assche echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2091*44704f69SBart Van Assche 2092*44704f69SBart Van Assche lt_compiler_flag="-o out/conftest2.$ac_objext" 2093*44704f69SBart Van Assche # Insert the option either (1) after the last *FLAGS variable, or 2094*44704f69SBart Van Assche # (2) before a word containing "conftest.", or (3) at the end. 2095*44704f69SBart Van Assche # Note that $ac_compile itself does not contain backslashes and begins 2096*44704f69SBart Van Assche # with a dollar sign (not a hyphen), so the echo should work correctly. 2097*44704f69SBart Van Assche lt_compile=`echo "$ac_compile" | $SED \ 2098*44704f69SBart Van Assche -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2099*44704f69SBart Van Assche -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2100*44704f69SBart Van Assche -e 's:$: $lt_compiler_flag:'` 2101*44704f69SBart Van Assche (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2102*44704f69SBart Van Assche (eval "$lt_compile" 2>out/conftest.err) 2103*44704f69SBart Van Assche ac_status=$? 2104*44704f69SBart Van Assche cat out/conftest.err >&AS_MESSAGE_LOG_FD 2105*44704f69SBart Van Assche echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2106*44704f69SBart Van Assche if (exit $ac_status) && test -s out/conftest2.$ac_objext 2107*44704f69SBart Van Assche then 2108*44704f69SBart Van Assche # The compiler can only warn and ignore the option if not recognized 2109*44704f69SBart Van Assche # So say no if there are warnings 2110*44704f69SBart Van Assche $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2111*44704f69SBart Van Assche $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2112*44704f69SBart Van Assche if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2113*44704f69SBart Van Assche _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2114*44704f69SBart Van Assche fi 2115*44704f69SBart Van Assche fi 2116*44704f69SBart Van Assche chmod u+w . 2>&AS_MESSAGE_LOG_FD 2117*44704f69SBart Van Assche $RM conftest* 2118*44704f69SBart Van Assche # SGI C++ compiler will create directory out/ii_files/ for 2119*44704f69SBart Van Assche # template instantiation 2120*44704f69SBart Van Assche test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2121*44704f69SBart Van Assche $RM out/* && rmdir out 2122*44704f69SBart Van Assche cd .. 2123*44704f69SBart Van Assche $RM -r conftest 2124*44704f69SBart Van Assche $RM conftest* 2125*44704f69SBart Van Assche]) 2126*44704f69SBart Van Assche_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2127*44704f69SBart Van Assche [Does compiler simultaneously support -c and -o options?]) 2128*44704f69SBart Van Assche])# _LT_COMPILER_C_O 2129*44704f69SBart Van Assche 2130*44704f69SBart Van Assche 2131*44704f69SBart Van Assche# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2132*44704f69SBart Van Assche# ---------------------------------- 2133*44704f69SBart Van Assche# Check to see if we can do hard links to lock some files if needed 2134*44704f69SBart Van Asschem4_defun([_LT_COMPILER_FILE_LOCKS], 2135*44704f69SBart Van Assche[m4_require([_LT_ENABLE_LOCK])dnl 2136*44704f69SBart Van Asschem4_require([_LT_FILEUTILS_DEFAULTS])dnl 2137*44704f69SBart Van Assche_LT_COMPILER_C_O([$1]) 2138*44704f69SBart Van Assche 2139*44704f69SBart Van Asschehard_links=nottested 2140*44704f69SBart Van Asscheif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2141*44704f69SBart Van Assche # do not overwrite the value of need_locks provided by the user 2142*44704f69SBart Van Assche AC_MSG_CHECKING([if we can lock with hard links]) 2143*44704f69SBart Van Assche hard_links=yes 2144*44704f69SBart Van Assche $RM conftest* 2145*44704f69SBart Van Assche ln conftest.a conftest.b 2>/dev/null && hard_links=no 2146*44704f69SBart Van Assche touch conftest.a 2147*44704f69SBart Van Assche ln conftest.a conftest.b 2>&5 || hard_links=no 2148*44704f69SBart Van Assche ln conftest.a conftest.b 2>/dev/null && hard_links=no 2149*44704f69SBart Van Assche AC_MSG_RESULT([$hard_links]) 2150*44704f69SBart Van Assche if test no = "$hard_links"; then 2151*44704f69SBart Van Assche AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2152*44704f69SBart Van Assche need_locks=warn 2153*44704f69SBart Van Assche fi 2154*44704f69SBart Van Asscheelse 2155*44704f69SBart Van Assche need_locks=no 2156*44704f69SBart Van Asschefi 2157*44704f69SBart Van Assche_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2158*44704f69SBart Van Assche])# _LT_COMPILER_FILE_LOCKS 2159*44704f69SBart Van Assche 2160*44704f69SBart Van Assche 2161*44704f69SBart Van Assche# _LT_CHECK_OBJDIR 2162*44704f69SBart Van Assche# ---------------- 2163*44704f69SBart Van Asschem4_defun([_LT_CHECK_OBJDIR], 2164*44704f69SBart Van Assche[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2165*44704f69SBart Van Assche[rm -f .libs 2>/dev/null 2166*44704f69SBart Van Asschemkdir .libs 2>/dev/null 2167*44704f69SBart Van Asscheif test -d .libs; then 2168*44704f69SBart Van Assche lt_cv_objdir=.libs 2169*44704f69SBart Van Asscheelse 2170*44704f69SBart Van Assche # MS-DOS does not allow filenames that begin with a dot. 2171*44704f69SBart Van Assche lt_cv_objdir=_libs 2172*44704f69SBart Van Asschefi 2173*44704f69SBart Van Asschermdir .libs 2>/dev/null]) 2174*44704f69SBart Van Asscheobjdir=$lt_cv_objdir 2175*44704f69SBart Van Assche_LT_DECL([], [objdir], [0], 2176*44704f69SBart Van Assche [The name of the directory that contains temporary libtool files])dnl 2177*44704f69SBart Van Asschem4_pattern_allow([LT_OBJDIR])dnl 2178*44704f69SBart Van AsscheAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2179*44704f69SBart Van Assche [Define to the sub-directory where libtool stores uninstalled libraries.]) 2180*44704f69SBart Van Assche])# _LT_CHECK_OBJDIR 2181*44704f69SBart Van Assche 2182*44704f69SBart Van Assche 2183*44704f69SBart Van Assche# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2184*44704f69SBart Van Assche# -------------------------------------- 2185*44704f69SBart Van Assche# Check hardcoding attributes. 2186*44704f69SBart Van Asschem4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2187*44704f69SBart Van Assche[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2188*44704f69SBart Van Assche_LT_TAGVAR(hardcode_action, $1)= 2189*44704f69SBart Van Asscheif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2190*44704f69SBart Van Assche test -n "$_LT_TAGVAR(runpath_var, $1)" || 2191*44704f69SBart Van Assche test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2192*44704f69SBart Van Assche 2193*44704f69SBart Van Assche # We can hardcode non-existent directories. 2194*44704f69SBart Van Assche if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2195*44704f69SBart Van Assche # If the only mechanism to avoid hardcoding is shlibpath_var, we 2196*44704f69SBart Van Assche # have to relink, otherwise we might link with an installed library 2197*44704f69SBart Van Assche # when we should be linking with a yet-to-be-installed one 2198*44704f69SBart Van Assche ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2199*44704f69SBart Van Assche test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2200*44704f69SBart Van Assche # Linking always hardcodes the temporary library directory. 2201*44704f69SBart Van Assche _LT_TAGVAR(hardcode_action, $1)=relink 2202*44704f69SBart Van Assche else 2203*44704f69SBart Van Assche # We can link without hardcoding, and we can hardcode nonexisting dirs. 2204*44704f69SBart Van Assche _LT_TAGVAR(hardcode_action, $1)=immediate 2205*44704f69SBart Van Assche fi 2206*44704f69SBart Van Asscheelse 2207*44704f69SBart Van Assche # We cannot hardcode anything, or else we can only hardcode existing 2208*44704f69SBart Van Assche # directories. 2209*44704f69SBart Van Assche _LT_TAGVAR(hardcode_action, $1)=unsupported 2210*44704f69SBart Van Asschefi 2211*44704f69SBart Van AsscheAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2212*44704f69SBart Van Assche 2213*44704f69SBart Van Asscheif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2214*44704f69SBart Van Assche test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2215*44704f69SBart Van Assche # Fast installation is not supported 2216*44704f69SBart Van Assche enable_fast_install=no 2217*44704f69SBart Van Asscheelif test yes = "$shlibpath_overrides_runpath" || 2218*44704f69SBart Van Assche test no = "$enable_shared"; then 2219*44704f69SBart Van Assche # Fast installation is not necessary 2220*44704f69SBart Van Assche enable_fast_install=needless 2221*44704f69SBart Van Asschefi 2222*44704f69SBart Van Assche_LT_TAGDECL([], [hardcode_action], [0], 2223*44704f69SBart Van Assche [How to hardcode a shared library path into an executable]) 2224*44704f69SBart Van Assche])# _LT_LINKER_HARDCODE_LIBPATH 2225*44704f69SBart Van Assche 2226*44704f69SBart Van Assche 2227*44704f69SBart Van Assche# _LT_CMD_STRIPLIB 2228*44704f69SBart Van Assche# ---------------- 2229*44704f69SBart Van Asschem4_defun([_LT_CMD_STRIPLIB], 2230*44704f69SBart Van Assche[m4_require([_LT_DECL_EGREP]) 2231*44704f69SBart Van Asschestriplib= 2232*44704f69SBart Van Asscheold_striplib= 2233*44704f69SBart Van AsscheAC_MSG_CHECKING([whether stripping libraries is possible]) 2234*44704f69SBart Van Asscheif test -z "$STRIP"; then 2235*44704f69SBart Van Assche AC_MSG_RESULT([no]) 2236*44704f69SBart Van Asscheelse 2237*44704f69SBart Van Assche if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2238*44704f69SBart Van Assche old_striplib="$STRIP --strip-debug" 2239*44704f69SBart Van Assche striplib="$STRIP --strip-unneeded" 2240*44704f69SBart Van Assche AC_MSG_RESULT([yes]) 2241*44704f69SBart Van Assche else 2242*44704f69SBart Van Assche case $host_os in 2243*44704f69SBart Van Assche darwin*) 2244*44704f69SBart Van Assche # FIXME - insert some real tests, host_os isn't really good enough 2245*44704f69SBart Van Assche striplib="$STRIP -x" 2246*44704f69SBart Van Assche old_striplib="$STRIP -S" 2247*44704f69SBart Van Assche AC_MSG_RESULT([yes]) 2248*44704f69SBart Van Assche ;; 2249*44704f69SBart Van Assche freebsd*) 2250*44704f69SBart Van Assche if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 2251*44704f69SBart Van Assche old_striplib="$STRIP --strip-debug" 2252*44704f69SBart Van Assche striplib="$STRIP --strip-unneeded" 2253*44704f69SBart Van Assche AC_MSG_RESULT([yes]) 2254*44704f69SBart Van Assche else 2255*44704f69SBart Van Assche AC_MSG_RESULT([no]) 2256*44704f69SBart Van Assche fi 2257*44704f69SBart Van Assche ;; 2258*44704f69SBart Van Assche *) 2259*44704f69SBart Van Assche AC_MSG_RESULT([no]) 2260*44704f69SBart Van Assche ;; 2261*44704f69SBart Van Assche esac 2262*44704f69SBart Van Assche fi 2263*44704f69SBart Van Asschefi 2264*44704f69SBart Van Assche_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2265*44704f69SBart Van Assche_LT_DECL([], [striplib], [1]) 2266*44704f69SBart Van Assche])# _LT_CMD_STRIPLIB 2267*44704f69SBart Van Assche 2268*44704f69SBart Van Assche 2269*44704f69SBart Van Assche# _LT_PREPARE_MUNGE_PATH_LIST 2270*44704f69SBart Van Assche# --------------------------- 2271*44704f69SBart Van Assche# Make sure func_munge_path_list() is defined correctly. 2272*44704f69SBart Van Asschem4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2273*44704f69SBart Van Assche[[# func_munge_path_list VARIABLE PATH 2274*44704f69SBart Van Assche# ----------------------------------- 2275*44704f69SBart Van Assche# VARIABLE is name of variable containing _space_ separated list of 2276*44704f69SBart Van Assche# directories to be munged by the contents of PATH, which is string 2277*44704f69SBart Van Assche# having a format: 2278*44704f69SBart Van Assche# "DIR[:DIR]:" 2279*44704f69SBart Van Assche# string "DIR[ DIR]" will be prepended to VARIABLE 2280*44704f69SBart Van Assche# ":DIR[:DIR]" 2281*44704f69SBart Van Assche# string "DIR[ DIR]" will be appended to VARIABLE 2282*44704f69SBart Van Assche# "DIRP[:DIRP]::[DIRA:]DIRA" 2283*44704f69SBart Van Assche# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2284*44704f69SBart Van Assche# "DIRA[ DIRA]" will be appended to VARIABLE 2285*44704f69SBart Van Assche# "DIR[:DIR]" 2286*44704f69SBart Van Assche# VARIABLE will be replaced by "DIR[ DIR]" 2287*44704f69SBart Van Asschefunc_munge_path_list () 2288*44704f69SBart Van Assche{ 2289*44704f69SBart Van Assche case x@S|@2 in 2290*44704f69SBart Van Assche x) 2291*44704f69SBart Van Assche ;; 2292*44704f69SBart Van Assche *:) 2293*44704f69SBart Van Assche eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2294*44704f69SBart Van Assche ;; 2295*44704f69SBart Van Assche x:*) 2296*44704f69SBart Van Assche eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2297*44704f69SBart Van Assche ;; 2298*44704f69SBart Van Assche *::*) 2299*44704f69SBart Van Assche eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2300*44704f69SBart Van Assche eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2301*44704f69SBart Van Assche ;; 2302*44704f69SBart Van Assche *) 2303*44704f69SBart Van Assche eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2304*44704f69SBart Van Assche ;; 2305*44704f69SBart Van Assche esac 2306*44704f69SBart Van Assche} 2307*44704f69SBart Van Assche]])# _LT_PREPARE_PATH_LIST 2308*44704f69SBart Van Assche 2309*44704f69SBart Van Assche 2310*44704f69SBart Van Assche# _LT_SYS_DYNAMIC_LINKER([TAG]) 2311*44704f69SBart Van Assche# ----------------------------- 2312*44704f69SBart Van Assche# PORTME Fill in your ld.so characteristics 2313*44704f69SBart Van Asschem4_defun([_LT_SYS_DYNAMIC_LINKER], 2314*44704f69SBart Van Assche[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2315*44704f69SBart Van Asschem4_require([_LT_DECL_EGREP])dnl 2316*44704f69SBart Van Asschem4_require([_LT_FILEUTILS_DEFAULTS])dnl 2317*44704f69SBart Van Asschem4_require([_LT_DECL_OBJDUMP])dnl 2318*44704f69SBart Van Asschem4_require([_LT_DECL_SED])dnl 2319*44704f69SBart Van Asschem4_require([_LT_CHECK_SHELL_FEATURES])dnl 2320*44704f69SBart Van Asschem4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2321*44704f69SBart Van AsscheAC_MSG_CHECKING([dynamic linker characteristics]) 2322*44704f69SBart Van Asschem4_if([$1], 2323*44704f69SBart Van Assche [], [ 2324*44704f69SBart Van Asscheif test yes = "$GCC"; then 2325*44704f69SBart Van Assche case $host_os in 2326*44704f69SBart Van Assche darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2327*44704f69SBart Van Assche *) lt_awk_arg='/^libraries:/' ;; 2328*44704f69SBart Van Assche esac 2329*44704f69SBart Van Assche case $host_os in 2330*44704f69SBart Van Assche mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2331*44704f69SBart Van Assche *) lt_sed_strip_eq='s|=/|/|g' ;; 2332*44704f69SBart Van Assche esac 2333*44704f69SBart Van Assche lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2334*44704f69SBart Van Assche case $lt_search_path_spec in 2335*44704f69SBart Van Assche *\;*) 2336*44704f69SBart Van Assche # if the path contains ";" then we assume it to be the separator 2337*44704f69SBart Van Assche # otherwise default to the standard path separator (i.e. ":") - it is 2338*44704f69SBart Van Assche # assumed that no part of a normal pathname contains ";" but that should 2339*44704f69SBart Van Assche # okay in the real world where ";" in dirpaths is itself problematic. 2340*44704f69SBart Van Assche lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2341*44704f69SBart Van Assche ;; 2342*44704f69SBart Van Assche *) 2343*44704f69SBart Van Assche lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2344*44704f69SBart Van Assche ;; 2345*44704f69SBart Van Assche esac 2346*44704f69SBart Van Assche # Ok, now we have the path, separated by spaces, we can step through it 2347*44704f69SBart Van Assche # and add multilib dir if necessary... 2348*44704f69SBart Van Assche lt_tmp_lt_search_path_spec= 2349*44704f69SBart Van Assche lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2350*44704f69SBart Van Assche # ...but if some path component already ends with the multilib dir we assume 2351*44704f69SBart Van Assche # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2352*44704f69SBart Van Assche case "$lt_multi_os_dir; $lt_search_path_spec " in 2353*44704f69SBart Van Assche "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2354*44704f69SBart Van Assche lt_multi_os_dir= 2355*44704f69SBart Van Assche ;; 2356*44704f69SBart Van Assche esac 2357*44704f69SBart Van Assche for lt_sys_path in $lt_search_path_spec; do 2358*44704f69SBart Van Assche if test -d "$lt_sys_path$lt_multi_os_dir"; then 2359*44704f69SBart Van Assche lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2360*44704f69SBart Van Assche elif test -n "$lt_multi_os_dir"; then 2361*44704f69SBart Van Assche test -d "$lt_sys_path" && \ 2362*44704f69SBart Van Assche lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2363*44704f69SBart Van Assche fi 2364*44704f69SBart Van Assche done 2365*44704f69SBart Van Assche lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2366*44704f69SBart Van AsscheBEGIN {RS = " "; FS = "/|\n";} { 2367*44704f69SBart Van Assche lt_foo = ""; 2368*44704f69SBart Van Assche lt_count = 0; 2369*44704f69SBart Van Assche for (lt_i = NF; lt_i > 0; lt_i--) { 2370*44704f69SBart Van Assche if ($lt_i != "" && $lt_i != ".") { 2371*44704f69SBart Van Assche if ($lt_i == "..") { 2372*44704f69SBart Van Assche lt_count++; 2373*44704f69SBart Van Assche } else { 2374*44704f69SBart Van Assche if (lt_count == 0) { 2375*44704f69SBart Van Assche lt_foo = "/" $lt_i lt_foo; 2376*44704f69SBart Van Assche } else { 2377*44704f69SBart Van Assche lt_count--; 2378*44704f69SBart Van Assche } 2379*44704f69SBart Van Assche } 2380*44704f69SBart Van Assche } 2381*44704f69SBart Van Assche } 2382*44704f69SBart Van Assche if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2383*44704f69SBart Van Assche if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2384*44704f69SBart Van Assche}'` 2385*44704f69SBart Van Assche # AWK program above erroneously prepends '/' to C:/dos/paths 2386*44704f69SBart Van Assche # for these hosts. 2387*44704f69SBart Van Assche case $host_os in 2388*44704f69SBart Van Assche mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2389*44704f69SBart Van Assche $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2390*44704f69SBart Van Assche esac 2391*44704f69SBart Van Assche sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2392*44704f69SBart Van Asscheelse 2393*44704f69SBart Van Assche sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2394*44704f69SBart Van Asschefi]) 2395*44704f69SBart Van Asschelibrary_names_spec= 2396*44704f69SBart Van Asschelibname_spec='lib$name' 2397*44704f69SBart Van Asschesoname_spec= 2398*44704f69SBart Van Asscheshrext_cmds=.so 2399*44704f69SBart Van Asschepostinstall_cmds= 2400*44704f69SBart Van Asschepostuninstall_cmds= 2401*44704f69SBart Van Asschefinish_cmds= 2402*44704f69SBart Van Asschefinish_eval= 2403*44704f69SBart Van Asscheshlibpath_var= 2404*44704f69SBart Van Asscheshlibpath_overrides_runpath=unknown 2405*44704f69SBart Van Asscheversion_type=none 2406*44704f69SBart Van Asschedynamic_linker="$host_os ld.so" 2407*44704f69SBart Van Asschesys_lib_dlsearch_path_spec="/lib /usr/lib" 2408*44704f69SBart Van Asscheneed_lib_prefix=unknown 2409*44704f69SBart Van Asschehardcode_into_libs=no 2410*44704f69SBart Van Assche 2411*44704f69SBart Van Assche# when you set need_version to no, make sure it does not cause -set_version 2412*44704f69SBart Van Assche# flags to be left without arguments 2413*44704f69SBart Van Asscheneed_version=unknown 2414*44704f69SBart Van Assche 2415*44704f69SBart Van AsscheAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2416*44704f69SBart Van Assche[User-defined run-time library search path.]) 2417*44704f69SBart Van Assche 2418*44704f69SBart Van Asschecase $host_os in 2419*44704f69SBart Van Asscheaix3*) 2420*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 2421*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2422*44704f69SBart Van Assche shlibpath_var=LIBPATH 2423*44704f69SBart Van Assche 2424*44704f69SBart Van Assche # AIX 3 has no versioning support, so we append a major version to the name. 2425*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2426*44704f69SBart Van Assche ;; 2427*44704f69SBart Van Assche 2428*44704f69SBart Van Asscheaix[[4-9]]*) 2429*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 2430*44704f69SBart Van Assche need_lib_prefix=no 2431*44704f69SBart Van Assche need_version=no 2432*44704f69SBart Van Assche hardcode_into_libs=yes 2433*44704f69SBart Van Assche if test ia64 = "$host_cpu"; then 2434*44704f69SBart Van Assche # AIX 5 supports IA64 2435*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2436*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2437*44704f69SBart Van Assche else 2438*44704f69SBart Van Assche # With GCC up to 2.95.x, collect2 would create an import file 2439*44704f69SBart Van Assche # for dependence libraries. The import file would start with 2440*44704f69SBart Van Assche # the line '#! .'. This would cause the generated library to 2441*44704f69SBart Van Assche # depend on '.', always an invalid library. This was fixed in 2442*44704f69SBart Van Assche # development snapshots of GCC prior to 3.0. 2443*44704f69SBart Van Assche case $host_os in 2444*44704f69SBart Van Assche aix4 | aix4.[[01]] | aix4.[[01]].*) 2445*44704f69SBart Van Assche if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2446*44704f69SBart Van Assche echo ' yes ' 2447*44704f69SBart Van Assche echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2448*44704f69SBart Van Assche : 2449*44704f69SBart Van Assche else 2450*44704f69SBart Van Assche can_build_shared=no 2451*44704f69SBart Van Assche fi 2452*44704f69SBart Van Assche ;; 2453*44704f69SBart Van Assche esac 2454*44704f69SBart Van Assche # Using Import Files as archive members, it is possible to support 2455*44704f69SBart Van Assche # filename-based versioning of shared library archives on AIX. While 2456*44704f69SBart Van Assche # this would work for both with and without runtime linking, it will 2457*44704f69SBart Van Assche # prevent static linking of such archives. So we do filename-based 2458*44704f69SBart Van Assche # shared library versioning with .so extension only, which is used 2459*44704f69SBart Van Assche # when both runtime linking and shared linking is enabled. 2460*44704f69SBart Van Assche # Unfortunately, runtime linking may impact performance, so we do 2461*44704f69SBart Van Assche # not want this to be the default eventually. Also, we use the 2462*44704f69SBart Van Assche # versioned .so libs for executables only if there is the -brtl 2463*44704f69SBart Van Assche # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2464*44704f69SBart Van Assche # To allow for filename-based versioning support, we need to create 2465*44704f69SBart Van Assche # libNAME.so.V as an archive file, containing: 2466*44704f69SBart Van Assche # *) an Import File, referring to the versioned filename of the 2467*44704f69SBart Van Assche # archive as well as the shared archive member, telling the 2468*44704f69SBart Van Assche # bitwidth (32 or 64) of that shared object, and providing the 2469*44704f69SBart Van Assche # list of exported symbols of that shared object, eventually 2470*44704f69SBart Van Assche # decorated with the 'weak' keyword 2471*44704f69SBart Van Assche # *) the shared object with the F_LOADONLY flag set, to really avoid 2472*44704f69SBart Van Assche # it being seen by the linker. 2473*44704f69SBart Van Assche # At run time we better use the real file rather than another symlink, 2474*44704f69SBart Van Assche # but for link time we create the symlink libNAME.so -> libNAME.so.V 2475*44704f69SBart Van Assche 2476*44704f69SBart Van Assche case $with_aix_soname,$aix_use_runtimelinking in 2477*44704f69SBart Van Assche # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2478*44704f69SBart Van Assche # soname into executable. Probably we can add versioning support to 2479*44704f69SBart Van Assche # collect2, so additional links can be useful in future. 2480*44704f69SBart Van Assche aix,yes) # traditional libtool 2481*44704f69SBart Van Assche dynamic_linker='AIX unversionable lib.so' 2482*44704f69SBart Van Assche # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2483*44704f69SBart Van Assche # instead of lib<name>.a to let people know that these are not 2484*44704f69SBart Van Assche # typical AIX shared libraries. 2485*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2486*44704f69SBart Van Assche ;; 2487*44704f69SBart Van Assche aix,no) # traditional AIX only 2488*44704f69SBart Van Assche dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2489*44704f69SBart Van Assche # We preserve .a as extension for shared libraries through AIX4.2 2490*44704f69SBart Van Assche # and later when we are not doing run time linking. 2491*44704f69SBart Van Assche library_names_spec='$libname$release.a $libname.a' 2492*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2493*44704f69SBart Van Assche ;; 2494*44704f69SBart Van Assche svr4,*) # full svr4 only 2495*44704f69SBart Van Assche dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2496*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2497*44704f69SBart Van Assche # We do not specify a path in Import Files, so LIBPATH fires. 2498*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 2499*44704f69SBart Van Assche ;; 2500*44704f69SBart Van Assche *,yes) # both, prefer svr4 2501*44704f69SBart Van Assche dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2502*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2503*44704f69SBart Van Assche # unpreferred sharedlib libNAME.a needs extra handling 2504*44704f69SBart Van Assche 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"' 2505*44704f69SBart Van Assche 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"' 2506*44704f69SBart Van Assche # We do not specify a path in Import Files, so LIBPATH fires. 2507*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 2508*44704f69SBart Van Assche ;; 2509*44704f69SBart Van Assche *,no) # both, prefer aix 2510*44704f69SBart Van Assche dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2511*44704f69SBart Van Assche library_names_spec='$libname$release.a $libname.a' 2512*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2513*44704f69SBart Van Assche # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2514*44704f69SBart Van Assche 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)' 2515*44704f69SBart Van Assche 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"' 2516*44704f69SBart Van Assche ;; 2517*44704f69SBart Van Assche esac 2518*44704f69SBart Van Assche shlibpath_var=LIBPATH 2519*44704f69SBart Van Assche fi 2520*44704f69SBart Van Assche ;; 2521*44704f69SBart Van Assche 2522*44704f69SBart Van Asscheamigaos*) 2523*44704f69SBart Van Assche case $host_cpu in 2524*44704f69SBart Van Assche powerpc) 2525*44704f69SBart Van Assche # Since July 2007 AmigaOS4 officially supports .so libraries. 2526*44704f69SBart Van Assche # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2527*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2528*44704f69SBart Van Assche ;; 2529*44704f69SBart Van Assche m68k) 2530*44704f69SBart Van Assche library_names_spec='$libname.ixlibrary $libname.a' 2531*44704f69SBart Van Assche # Create ${libname}_ixlibrary.a entries in /sys/libs. 2532*44704f69SBart Van Assche 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' 2533*44704f69SBart Van Assche ;; 2534*44704f69SBart Van Assche esac 2535*44704f69SBart Van Assche ;; 2536*44704f69SBart Van Assche 2537*44704f69SBart Van Asschebeos*) 2538*44704f69SBart Van Assche library_names_spec='$libname$shared_ext' 2539*44704f69SBart Van Assche dynamic_linker="$host_os ld.so" 2540*44704f69SBart Van Assche shlibpath_var=LIBRARY_PATH 2541*44704f69SBart Van Assche ;; 2542*44704f69SBart Van Assche 2543*44704f69SBart Van Asschebsdi[[45]]*) 2544*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 2545*44704f69SBart Van Assche need_version=no 2546*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2547*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2548*44704f69SBart Van Assche finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2549*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2550*44704f69SBart Van Assche sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2551*44704f69SBart Van Assche sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2552*44704f69SBart Van Assche # the default ld.so.conf also contains /usr/contrib/lib and 2553*44704f69SBart Van Assche # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2554*44704f69SBart Van Assche # libtool to hard-code these into programs 2555*44704f69SBart Van Assche ;; 2556*44704f69SBart Van Assche 2557*44704f69SBart Van Asschecygwin* | mingw* | pw32* | cegcc*) 2558*44704f69SBart Van Assche version_type=windows 2559*44704f69SBart Van Assche shrext_cmds=.dll 2560*44704f69SBart Van Assche need_version=no 2561*44704f69SBart Van Assche need_lib_prefix=no 2562*44704f69SBart Van Assche 2563*44704f69SBart Van Assche case $GCC,$cc_basename in 2564*44704f69SBart Van Assche yes,*) 2565*44704f69SBart Van Assche # gcc 2566*44704f69SBart Van Assche library_names_spec='$libname.dll.a' 2567*44704f69SBart Van Assche # DLL is installed to $(libdir)/../bin by postinstall_cmds 2568*44704f69SBart Van Assche postinstall_cmds='base_file=`basename \$file`~ 2569*44704f69SBart Van Assche dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2570*44704f69SBart Van Assche dldir=$destdir/`dirname \$dlpath`~ 2571*44704f69SBart Van Assche test -d \$dldir || mkdir -p \$dldir~ 2572*44704f69SBart Van Assche $install_prog $dir/$dlname \$dldir/$dlname~ 2573*44704f69SBart Van Assche chmod a+x \$dldir/$dlname~ 2574*44704f69SBart Van Assche if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2575*44704f69SBart Van Assche eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2576*44704f69SBart Van Assche fi' 2577*44704f69SBart Van Assche postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2578*44704f69SBart Van Assche dlpath=$dir/\$dldll~ 2579*44704f69SBart Van Assche $RM \$dlpath' 2580*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 2581*44704f69SBart Van Assche 2582*44704f69SBart Van Assche case $host_os in 2583*44704f69SBart Van Assche cygwin*) 2584*44704f69SBart Van Assche # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2585*44704f69SBart Van Assche soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2586*44704f69SBart Van Asschem4_if([$1], [],[ 2587*44704f69SBart Van Assche sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2588*44704f69SBart Van Assche ;; 2589*44704f69SBart Van Assche mingw* | cegcc*) 2590*44704f69SBart Van Assche # MinGW DLLs use traditional 'lib' prefix 2591*44704f69SBart Van Assche soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2592*44704f69SBart Van Assche ;; 2593*44704f69SBart Van Assche pw32*) 2594*44704f69SBart Van Assche # pw32 DLLs use 'pw' prefix rather than 'lib' 2595*44704f69SBart Van Assche library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2596*44704f69SBart Van Assche ;; 2597*44704f69SBart Van Assche esac 2598*44704f69SBart Van Assche dynamic_linker='Win32 ld.exe' 2599*44704f69SBart Van Assche ;; 2600*44704f69SBart Van Assche 2601*44704f69SBart Van Assche *,cl* | *,icl*) 2602*44704f69SBart Van Assche # Native MSVC or ICC 2603*44704f69SBart Van Assche libname_spec='$name' 2604*44704f69SBart Van Assche soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2605*44704f69SBart Van Assche library_names_spec='$libname.dll.lib' 2606*44704f69SBart Van Assche 2607*44704f69SBart Van Assche case $build_os in 2608*44704f69SBart Van Assche mingw*) 2609*44704f69SBart Van Assche sys_lib_search_path_spec= 2610*44704f69SBart Van Assche lt_save_ifs=$IFS 2611*44704f69SBart Van Assche IFS=';' 2612*44704f69SBart Van Assche for lt_path in $LIB 2613*44704f69SBart Van Assche do 2614*44704f69SBart Van Assche IFS=$lt_save_ifs 2615*44704f69SBart Van Assche # Let DOS variable expansion print the short 8.3 style file name. 2616*44704f69SBart Van Assche lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2617*44704f69SBart Van Assche sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2618*44704f69SBart Van Assche done 2619*44704f69SBart Van Assche IFS=$lt_save_ifs 2620*44704f69SBart Van Assche # Convert to MSYS style. 2621*44704f69SBart Van Assche sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2622*44704f69SBart Van Assche ;; 2623*44704f69SBart Van Assche cygwin*) 2624*44704f69SBart Van Assche # Convert to unix form, then to dos form, then back to unix form 2625*44704f69SBart Van Assche # but this time dos style (no spaces!) so that the unix form looks 2626*44704f69SBart Van Assche # like /cygdrive/c/PROGRA~1:/cygdr... 2627*44704f69SBart Van Assche sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2628*44704f69SBart Van Assche sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2629*44704f69SBart Van Assche sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2630*44704f69SBart Van Assche ;; 2631*44704f69SBart Van Assche *) 2632*44704f69SBart Van Assche sys_lib_search_path_spec=$LIB 2633*44704f69SBart Van Assche if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2634*44704f69SBart Van Assche # It is most probably a Windows format PATH. 2635*44704f69SBart Van Assche sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2636*44704f69SBart Van Assche else 2637*44704f69SBart Van Assche sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2638*44704f69SBart Van Assche fi 2639*44704f69SBart Van Assche # FIXME: find the short name or the path components, as spaces are 2640*44704f69SBart Van Assche # common. (e.g. "Program Files" -> "PROGRA~1") 2641*44704f69SBart Van Assche ;; 2642*44704f69SBart Van Assche esac 2643*44704f69SBart Van Assche 2644*44704f69SBart Van Assche # DLL is installed to $(libdir)/../bin by postinstall_cmds 2645*44704f69SBart Van Assche postinstall_cmds='base_file=`basename \$file`~ 2646*44704f69SBart Van Assche dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2647*44704f69SBart Van Assche dldir=$destdir/`dirname \$dlpath`~ 2648*44704f69SBart Van Assche test -d \$dldir || mkdir -p \$dldir~ 2649*44704f69SBart Van Assche $install_prog $dir/$dlname \$dldir/$dlname' 2650*44704f69SBart Van Assche postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2651*44704f69SBart Van Assche dlpath=$dir/\$dldll~ 2652*44704f69SBart Van Assche $RM \$dlpath' 2653*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 2654*44704f69SBart Van Assche dynamic_linker='Win32 link.exe' 2655*44704f69SBart Van Assche ;; 2656*44704f69SBart Van Assche 2657*44704f69SBart Van Assche *) 2658*44704f69SBart Van Assche # Assume MSVC and ICC wrapper 2659*44704f69SBart Van Assche library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2660*44704f69SBart Van Assche dynamic_linker='Win32 ld.exe' 2661*44704f69SBart Van Assche ;; 2662*44704f69SBart Van Assche esac 2663*44704f69SBart Van Assche # FIXME: first we should search . and the directory the executable is in 2664*44704f69SBart Van Assche shlibpath_var=PATH 2665*44704f69SBart Van Assche ;; 2666*44704f69SBart Van Assche 2667*44704f69SBart Van Asschedarwin* | rhapsody*) 2668*44704f69SBart Van Assche dynamic_linker="$host_os dyld" 2669*44704f69SBart Van Assche version_type=darwin 2670*44704f69SBart Van Assche need_lib_prefix=no 2671*44704f69SBart Van Assche need_version=no 2672*44704f69SBart Van Assche library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2673*44704f69SBart Van Assche soname_spec='$libname$release$major$shared_ext' 2674*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 2675*44704f69SBart Van Assche shlibpath_var=DYLD_LIBRARY_PATH 2676*44704f69SBart Van Assche shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2677*44704f69SBart Van Asschem4_if([$1], [],[ 2678*44704f69SBart Van Assche sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2679*44704f69SBart Van Assche sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2680*44704f69SBart Van Assche ;; 2681*44704f69SBart Van Assche 2682*44704f69SBart Van Asschedgux*) 2683*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 2684*44704f69SBart Van Assche need_lib_prefix=no 2685*44704f69SBart Van Assche need_version=no 2686*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2687*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2688*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2689*44704f69SBart Van Assche ;; 2690*44704f69SBart Van Assche 2691*44704f69SBart Van Asschefreebsd* | dragonfly* | midnightbsd*) 2692*44704f69SBart Van Assche # DragonFly does not have aout. When/if they implement a new 2693*44704f69SBart Van Assche # versioning mechanism, adjust this. 2694*44704f69SBart Van Assche if test -x /usr/bin/objformat; then 2695*44704f69SBart Van Assche objformat=`/usr/bin/objformat` 2696*44704f69SBart Van Assche else 2697*44704f69SBart Van Assche case $host_os in 2698*44704f69SBart Van Assche freebsd[[23]].*) objformat=aout ;; 2699*44704f69SBart Van Assche *) objformat=elf ;; 2700*44704f69SBart Van Assche esac 2701*44704f69SBart Van Assche fi 2702*44704f69SBart Van Assche version_type=freebsd-$objformat 2703*44704f69SBart Van Assche case $version_type in 2704*44704f69SBart Van Assche freebsd-elf*) 2705*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2706*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2707*44704f69SBart Van Assche need_version=no 2708*44704f69SBart Van Assche need_lib_prefix=no 2709*44704f69SBart Van Assche ;; 2710*44704f69SBart Van Assche freebsd-*) 2711*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2712*44704f69SBart Van Assche need_version=yes 2713*44704f69SBart Van Assche ;; 2714*44704f69SBart Van Assche esac 2715*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2716*44704f69SBart Van Assche case $host_os in 2717*44704f69SBart Van Assche freebsd2.*) 2718*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 2719*44704f69SBart Van Assche ;; 2720*44704f69SBart Van Assche freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2721*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 2722*44704f69SBart Van Assche hardcode_into_libs=yes 2723*44704f69SBart Van Assche ;; 2724*44704f69SBart Van Assche freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2725*44704f69SBart Van Assche freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2726*44704f69SBart Van Assche shlibpath_overrides_runpath=no 2727*44704f69SBart Van Assche hardcode_into_libs=yes 2728*44704f69SBart Van Assche ;; 2729*44704f69SBart Van Assche *) # from 4.6 on, and DragonFly 2730*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 2731*44704f69SBart Van Assche hardcode_into_libs=yes 2732*44704f69SBart Van Assche ;; 2733*44704f69SBart Van Assche esac 2734*44704f69SBart Van Assche ;; 2735*44704f69SBart Van Assche 2736*44704f69SBart Van Asschehaiku*) 2737*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 2738*44704f69SBart Van Assche need_lib_prefix=no 2739*44704f69SBart Van Assche need_version=no 2740*44704f69SBart Van Assche dynamic_linker="$host_os runtime_loader" 2741*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2742*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2743*44704f69SBart Van Assche shlibpath_var=LIBRARY_PATH 2744*44704f69SBart Van Assche shlibpath_overrides_runpath=no 2745*44704f69SBart Van Assche sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2746*44704f69SBart Van Assche hardcode_into_libs=yes 2747*44704f69SBart Van Assche ;; 2748*44704f69SBart Van Assche 2749*44704f69SBart Van Asschehpux9* | hpux10* | hpux11*) 2750*44704f69SBart Van Assche # Give a soname corresponding to the major version so that dld.sl refuses to 2751*44704f69SBart Van Assche # link against other versions. 2752*44704f69SBart Van Assche version_type=sunos 2753*44704f69SBart Van Assche need_lib_prefix=no 2754*44704f69SBart Van Assche need_version=no 2755*44704f69SBart Van Assche case $host_cpu in 2756*44704f69SBart Van Assche ia64*) 2757*44704f69SBart Van Assche shrext_cmds='.so' 2758*44704f69SBart Van Assche hardcode_into_libs=yes 2759*44704f69SBart Van Assche dynamic_linker="$host_os dld.so" 2760*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2761*44704f69SBart Van Assche shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2762*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2763*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2764*44704f69SBart Van Assche if test 32 = "$HPUX_IA64_MODE"; then 2765*44704f69SBart Van Assche sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2766*44704f69SBart Van Assche sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2767*44704f69SBart Van Assche else 2768*44704f69SBart Van Assche sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2769*44704f69SBart Van Assche sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2770*44704f69SBart Van Assche fi 2771*44704f69SBart Van Assche ;; 2772*44704f69SBart Van Assche hppa*64*) 2773*44704f69SBart Van Assche shrext_cmds='.sl' 2774*44704f69SBart Van Assche hardcode_into_libs=yes 2775*44704f69SBart Van Assche dynamic_linker="$host_os dld.sl" 2776*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2777*44704f69SBart Van Assche shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2778*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2779*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2780*44704f69SBart Van Assche sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2781*44704f69SBart Van Assche sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2782*44704f69SBart Van Assche ;; 2783*44704f69SBart Van Assche *) 2784*44704f69SBart Van Assche shrext_cmds='.sl' 2785*44704f69SBart Van Assche dynamic_linker="$host_os dld.sl" 2786*44704f69SBart Van Assche shlibpath_var=SHLIB_PATH 2787*44704f69SBart Van Assche shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2788*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2789*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2790*44704f69SBart Van Assche ;; 2791*44704f69SBart Van Assche esac 2792*44704f69SBart Van Assche # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2793*44704f69SBart Van Assche postinstall_cmds='chmod 555 $lib' 2794*44704f69SBart Van Assche # or fails outright, so override atomically: 2795*44704f69SBart Van Assche install_override_mode=555 2796*44704f69SBart Van Assche ;; 2797*44704f69SBart Van Assche 2798*44704f69SBart Van Asscheinterix[[3-9]]*) 2799*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 2800*44704f69SBart Van Assche need_lib_prefix=no 2801*44704f69SBart Van Assche need_version=no 2802*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2803*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2804*44704f69SBart Van Assche dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2805*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2806*44704f69SBart Van Assche shlibpath_overrides_runpath=no 2807*44704f69SBart Van Assche hardcode_into_libs=yes 2808*44704f69SBart Van Assche ;; 2809*44704f69SBart Van Assche 2810*44704f69SBart Van Asscheirix5* | irix6* | nonstopux*) 2811*44704f69SBart Van Assche case $host_os in 2812*44704f69SBart Van Assche nonstopux*) version_type=nonstopux ;; 2813*44704f69SBart Van Assche *) 2814*44704f69SBart Van Assche if test yes = "$lt_cv_prog_gnu_ld"; then 2815*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 2816*44704f69SBart Van Assche else 2817*44704f69SBart Van Assche version_type=irix 2818*44704f69SBart Van Assche fi ;; 2819*44704f69SBart Van Assche esac 2820*44704f69SBart Van Assche need_lib_prefix=no 2821*44704f69SBart Van Assche need_version=no 2822*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2823*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2824*44704f69SBart Van Assche case $host_os in 2825*44704f69SBart Van Assche irix5* | nonstopux*) 2826*44704f69SBart Van Assche libsuff= shlibsuff= 2827*44704f69SBart Van Assche ;; 2828*44704f69SBart Van Assche *) 2829*44704f69SBart Van Assche case $LD in # libtool.m4 will add one of these switches to LD 2830*44704f69SBart Van Assche *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2831*44704f69SBart Van Assche libsuff= shlibsuff= libmagic=32-bit;; 2832*44704f69SBart Van Assche *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2833*44704f69SBart Van Assche libsuff=32 shlibsuff=N32 libmagic=N32;; 2834*44704f69SBart Van Assche *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2835*44704f69SBart Van Assche libsuff=64 shlibsuff=64 libmagic=64-bit;; 2836*44704f69SBart Van Assche *) libsuff= shlibsuff= libmagic=never-match;; 2837*44704f69SBart Van Assche esac 2838*44704f69SBart Van Assche ;; 2839*44704f69SBart Van Assche esac 2840*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2841*44704f69SBart Van Assche shlibpath_overrides_runpath=no 2842*44704f69SBart Van Assche sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2843*44704f69SBart Van Assche sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2844*44704f69SBart Van Assche hardcode_into_libs=yes 2845*44704f69SBart Van Assche ;; 2846*44704f69SBart Van Assche 2847*44704f69SBart Van Assche# No shared lib support for Linux oldld, aout, or coff. 2848*44704f69SBart Van Asschelinux*oldld* | linux*aout* | linux*coff*) 2849*44704f69SBart Van Assche dynamic_linker=no 2850*44704f69SBart Van Assche ;; 2851*44704f69SBart Van Assche 2852*44704f69SBart Van Asschelinux*android*) 2853*44704f69SBart Van Assche version_type=none # Android doesn't support versioned libraries. 2854*44704f69SBart Van Assche need_lib_prefix=no 2855*44704f69SBart Van Assche need_version=no 2856*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext' 2857*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext' 2858*44704f69SBart Van Assche finish_cmds= 2859*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2860*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 2861*44704f69SBart Van Assche 2862*44704f69SBart Van Assche # This implies no fast_install, which is unacceptable. 2863*44704f69SBart Van Assche # Some rework will be needed to allow for fast_install 2864*44704f69SBart Van Assche # before this can be enabled. 2865*44704f69SBart Van Assche hardcode_into_libs=yes 2866*44704f69SBart Van Assche 2867*44704f69SBart Van Assche dynamic_linker='Android linker' 2868*44704f69SBart Van Assche # Don't embed -rpath directories since the linker doesn't support them. 2869*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2870*44704f69SBart Van Assche ;; 2871*44704f69SBart Van Assche 2872*44704f69SBart Van Assche# This must be glibc/ELF. 2873*44704f69SBart Van Asschelinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2874*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 2875*44704f69SBart Van Assche need_lib_prefix=no 2876*44704f69SBart Van Assche need_version=no 2877*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2878*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2879*44704f69SBart Van Assche finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2880*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2881*44704f69SBart Van Assche shlibpath_overrides_runpath=no 2882*44704f69SBart Van Assche 2883*44704f69SBart Van Assche # Some binutils ld are patched to set DT_RUNPATH 2884*44704f69SBart Van Assche AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2885*44704f69SBart Van Assche [lt_cv_shlibpath_overrides_runpath=no 2886*44704f69SBart Van Assche save_LDFLAGS=$LDFLAGS 2887*44704f69SBart Van Assche save_libdir=$libdir 2888*44704f69SBart Van Assche eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2889*44704f69SBart Van Assche LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2890*44704f69SBart Van Assche AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2891*44704f69SBart Van Assche [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2892*44704f69SBart Van Assche [lt_cv_shlibpath_overrides_runpath=yes])]) 2893*44704f69SBart Van Assche LDFLAGS=$save_LDFLAGS 2894*44704f69SBart Van Assche libdir=$save_libdir 2895*44704f69SBart Van Assche ]) 2896*44704f69SBart Van Assche shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2897*44704f69SBart Van Assche 2898*44704f69SBart Van Assche # This implies no fast_install, which is unacceptable. 2899*44704f69SBart Van Assche # Some rework will be needed to allow for fast_install 2900*44704f69SBart Van Assche # before this can be enabled. 2901*44704f69SBart Van Assche hardcode_into_libs=yes 2902*44704f69SBart Van Assche 2903*44704f69SBart Van Assche # Ideally, we could use ldconfig to report *all* directores which are 2904*44704f69SBart Van Assche # searched for libraries, however this is still not possible. Aside from not 2905*44704f69SBart Van Assche # being certain /sbin/ldconfig is available, command 2906*44704f69SBart Van Assche # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2907*44704f69SBart Van Assche # even though it is searched at run-time. Try to do the best guess by 2908*44704f69SBart Van Assche # appending ld.so.conf contents (and includes) to the search path. 2909*44704f69SBart Van Assche if test -f /etc/ld.so.conf; then 2910*44704f69SBart Van Assche 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' ' '` 2911*44704f69SBart Van Assche sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2912*44704f69SBart Van Assche fi 2913*44704f69SBart Van Assche 2914*44704f69SBart Van Assche # We used to test for /lib/ld.so.1 and disable shared libraries on 2915*44704f69SBart Van Assche # powerpc, because MkLinux only supported shared libraries with the 2916*44704f69SBart Van Assche # GNU dynamic linker. Since this was broken with cross compilers, 2917*44704f69SBart Van Assche # most powerpc-linux boxes support dynamic linking these days and 2918*44704f69SBart Van Assche # people can always --disable-shared, the test was removed, and we 2919*44704f69SBart Van Assche # assume the GNU/Linux dynamic linker is in use. 2920*44704f69SBart Van Assche dynamic_linker='GNU/Linux ld.so' 2921*44704f69SBart Van Assche ;; 2922*44704f69SBart Van Assche 2923*44704f69SBart Van Asschenetbsdelf*-gnu) 2924*44704f69SBart Van Assche version_type=linux 2925*44704f69SBart Van Assche need_lib_prefix=no 2926*44704f69SBart Van Assche need_version=no 2927*44704f69SBart Van Assche library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2928*44704f69SBart Van Assche soname_spec='${libname}${release}${shared_ext}$major' 2929*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2930*44704f69SBart Van Assche shlibpath_overrides_runpath=no 2931*44704f69SBart Van Assche hardcode_into_libs=yes 2932*44704f69SBart Van Assche dynamic_linker='NetBSD ld.elf_so' 2933*44704f69SBart Van Assche ;; 2934*44704f69SBart Van Assche 2935*44704f69SBart Van Asschenetbsd*) 2936*44704f69SBart Van Assche version_type=sunos 2937*44704f69SBart Van Assche need_lib_prefix=no 2938*44704f69SBart Van Assche need_version=no 2939*44704f69SBart Van Assche if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2940*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2941*44704f69SBart Van Assche finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2942*44704f69SBart Van Assche dynamic_linker='NetBSD (a.out) ld.so' 2943*44704f69SBart Van Assche else 2944*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2945*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2946*44704f69SBart Van Assche dynamic_linker='NetBSD ld.elf_so' 2947*44704f69SBart Van Assche fi 2948*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2949*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 2950*44704f69SBart Van Assche hardcode_into_libs=yes 2951*44704f69SBart Van Assche ;; 2952*44704f69SBart Van Assche 2953*44704f69SBart Van Asschenewsos6) 2954*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 2955*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2956*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2957*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 2958*44704f69SBart Van Assche ;; 2959*44704f69SBart Van Assche 2960*44704f69SBart Van Assche*nto* | *qnx*) 2961*44704f69SBart Van Assche version_type=qnx 2962*44704f69SBart Van Assche need_lib_prefix=no 2963*44704f69SBart Van Assche need_version=no 2964*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2965*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 2966*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2967*44704f69SBart Van Assche shlibpath_overrides_runpath=no 2968*44704f69SBart Van Assche hardcode_into_libs=yes 2969*44704f69SBart Van Assche dynamic_linker='ldqnx.so' 2970*44704f69SBart Van Assche ;; 2971*44704f69SBart Van Assche 2972*44704f69SBart Van Asscheopenbsd* | bitrig*) 2973*44704f69SBart Van Assche version_type=sunos 2974*44704f69SBart Van Assche sys_lib_dlsearch_path_spec=/usr/lib 2975*44704f69SBart Van Assche need_lib_prefix=no 2976*44704f69SBart Van Assche if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2977*44704f69SBart Van Assche need_version=no 2978*44704f69SBart Van Assche else 2979*44704f69SBart Van Assche need_version=yes 2980*44704f69SBart Van Assche fi 2981*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2982*44704f69SBart Van Assche finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2983*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 2984*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 2985*44704f69SBart Van Assche ;; 2986*44704f69SBart Van Assche 2987*44704f69SBart Van Asscheos2*) 2988*44704f69SBart Van Assche libname_spec='$name' 2989*44704f69SBart Van Assche version_type=windows 2990*44704f69SBart Van Assche shrext_cmds=.dll 2991*44704f69SBart Van Assche need_version=no 2992*44704f69SBart Van Assche need_lib_prefix=no 2993*44704f69SBart Van Assche # OS/2 can only load a DLL with a base name of 8 characters or less. 2994*44704f69SBart Van Assche soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2995*44704f69SBart Van Assche v=$($ECHO $release$versuffix | tr -d .-); 2996*44704f69SBart Van Assche n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2997*44704f69SBart Van Assche $ECHO $n$v`$shared_ext' 2998*44704f69SBart Van Assche library_names_spec='${libname}_dll.$libext' 2999*44704f69SBart Van Assche dynamic_linker='OS/2 ld.exe' 3000*44704f69SBart Van Assche shlibpath_var=BEGINLIBPATH 3001*44704f69SBart Van Assche sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 3002*44704f69SBart Van Assche sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3003*44704f69SBart Van Assche postinstall_cmds='base_file=`basename \$file`~ 3004*44704f69SBart Van Assche dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 3005*44704f69SBart Van Assche dldir=$destdir/`dirname \$dlpath`~ 3006*44704f69SBart Van Assche test -d \$dldir || mkdir -p \$dldir~ 3007*44704f69SBart Van Assche $install_prog $dir/$dlname \$dldir/$dlname~ 3008*44704f69SBart Van Assche chmod a+x \$dldir/$dlname~ 3009*44704f69SBart Van Assche if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 3010*44704f69SBart Van Assche eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 3011*44704f69SBart Van Assche fi' 3012*44704f69SBart Van Assche postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 3013*44704f69SBart Van Assche dlpath=$dir/\$dldll~ 3014*44704f69SBart Van Assche $RM \$dlpath' 3015*44704f69SBart Van Assche ;; 3016*44704f69SBart Van Assche 3017*44704f69SBart Van Asscheosf3* | osf4* | osf5*) 3018*44704f69SBart Van Assche version_type=osf 3019*44704f69SBart Van Assche need_lib_prefix=no 3020*44704f69SBart Van Assche need_version=no 3021*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 3022*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3023*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 3024*44704f69SBart Van Assche sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3025*44704f69SBart Van Assche sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3026*44704f69SBart Van Assche ;; 3027*44704f69SBart Van Assche 3028*44704f69SBart Van Asscherdos*) 3029*44704f69SBart Van Assche dynamic_linker=no 3030*44704f69SBart Van Assche ;; 3031*44704f69SBart Van Assche 3032*44704f69SBart Van Asschesolaris*) 3033*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 3034*44704f69SBart Van Assche need_lib_prefix=no 3035*44704f69SBart Van Assche need_version=no 3036*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3037*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 3038*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 3039*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 3040*44704f69SBart Van Assche hardcode_into_libs=yes 3041*44704f69SBart Van Assche # ldd complains unless libraries are executable 3042*44704f69SBart Van Assche postinstall_cmds='chmod +x $lib' 3043*44704f69SBart Van Assche ;; 3044*44704f69SBart Van Assche 3045*44704f69SBart Van Asschesunos4*) 3046*44704f69SBart Van Assche version_type=sunos 3047*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3048*44704f69SBart Van Assche finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3049*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 3050*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 3051*44704f69SBart Van Assche if test yes = "$with_gnu_ld"; then 3052*44704f69SBart Van Assche need_lib_prefix=no 3053*44704f69SBart Van Assche fi 3054*44704f69SBart Van Assche need_version=yes 3055*44704f69SBart Van Assche ;; 3056*44704f69SBart Van Assche 3057*44704f69SBart Van Asschesysv4 | sysv4.3*) 3058*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 3059*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3060*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 3061*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 3062*44704f69SBart Van Assche case $host_vendor in 3063*44704f69SBart Van Assche sni) 3064*44704f69SBart Van Assche shlibpath_overrides_runpath=no 3065*44704f69SBart Van Assche need_lib_prefix=no 3066*44704f69SBart Van Assche runpath_var=LD_RUN_PATH 3067*44704f69SBart Van Assche ;; 3068*44704f69SBart Van Assche siemens) 3069*44704f69SBart Van Assche need_lib_prefix=no 3070*44704f69SBart Van Assche ;; 3071*44704f69SBart Van Assche motorola) 3072*44704f69SBart Van Assche need_lib_prefix=no 3073*44704f69SBart Van Assche need_version=no 3074*44704f69SBart Van Assche shlibpath_overrides_runpath=no 3075*44704f69SBart Van Assche sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3076*44704f69SBart Van Assche ;; 3077*44704f69SBart Van Assche esac 3078*44704f69SBart Van Assche ;; 3079*44704f69SBart Van Assche 3080*44704f69SBart Van Asschesysv4*MP*) 3081*44704f69SBart Van Assche if test -d /usr/nec; then 3082*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 3083*44704f69SBart Van Assche library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3084*44704f69SBart Van Assche soname_spec='$libname$shared_ext.$major' 3085*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 3086*44704f69SBart Van Assche fi 3087*44704f69SBart Van Assche ;; 3088*44704f69SBart Van Assche 3089*44704f69SBart Van Asschesysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3090*44704f69SBart Van Assche version_type=sco 3091*44704f69SBart Van Assche need_lib_prefix=no 3092*44704f69SBart Van Assche need_version=no 3093*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3094*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 3095*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 3096*44704f69SBart Van Assche shlibpath_overrides_runpath=yes 3097*44704f69SBart Van Assche hardcode_into_libs=yes 3098*44704f69SBart Van Assche if test yes = "$with_gnu_ld"; then 3099*44704f69SBart Van Assche sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3100*44704f69SBart Van Assche else 3101*44704f69SBart Van Assche sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3102*44704f69SBart Van Assche case $host_os in 3103*44704f69SBart Van Assche sco3.2v5*) 3104*44704f69SBart Van Assche sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3105*44704f69SBart Van Assche ;; 3106*44704f69SBart Van Assche esac 3107*44704f69SBart Van Assche fi 3108*44704f69SBart Van Assche sys_lib_dlsearch_path_spec='/usr/lib' 3109*44704f69SBart Van Assche ;; 3110*44704f69SBart Van Assche 3111*44704f69SBart Van Asschetpf*) 3112*44704f69SBart Van Assche # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3113*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 3114*44704f69SBart Van Assche need_lib_prefix=no 3115*44704f69SBart Van Assche need_version=no 3116*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3117*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 3118*44704f69SBart Van Assche shlibpath_overrides_runpath=no 3119*44704f69SBart Van Assche hardcode_into_libs=yes 3120*44704f69SBart Van Assche ;; 3121*44704f69SBart Van Assche 3122*44704f69SBart Van Asscheuts4*) 3123*44704f69SBart Van Assche version_type=linux # correct to gnu/linux during the next big refactor 3124*44704f69SBart Van Assche library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3125*44704f69SBart Van Assche soname_spec='$libname$release$shared_ext$major' 3126*44704f69SBart Van Assche shlibpath_var=LD_LIBRARY_PATH 3127*44704f69SBart Van Assche ;; 3128*44704f69SBart Van Assche 3129*44704f69SBart Van Assche*) 3130*44704f69SBart Van Assche dynamic_linker=no 3131*44704f69SBart Van Assche ;; 3132*44704f69SBart Van Asscheesac 3133*44704f69SBart Van AsscheAC_MSG_RESULT([$dynamic_linker]) 3134*44704f69SBart Van Asschetest no = "$dynamic_linker" && can_build_shared=no 3135*44704f69SBart Van Assche 3136*44704f69SBart Van Asschevariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3137*44704f69SBart Van Asscheif test yes = "$GCC"; then 3138*44704f69SBart Van Assche variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3139*44704f69SBart Van Asschefi 3140*44704f69SBart Van Assche 3141*44704f69SBart Van Asscheif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3142*44704f69SBart Van Assche sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3143*44704f69SBart Van Asschefi 3144*44704f69SBart Van Assche 3145*44704f69SBart Van Asscheif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3146*44704f69SBart Van Assche sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3147*44704f69SBart Van Asschefi 3148*44704f69SBart Van Assche 3149*44704f69SBart Van Assche# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3150*44704f69SBart Van Asscheconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3151*44704f69SBart Van Assche 3152*44704f69SBart Van Assche# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3153*44704f69SBart Van Asschefunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3154*44704f69SBart Van Assche 3155*44704f69SBart Van Assche# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3156*44704f69SBart Van Asscheconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3157*44704f69SBart Van Assche 3158*44704f69SBart Van Assche_LT_DECL([], [variables_saved_for_relink], [1], 3159*44704f69SBart Van Assche [Variables whose values should be saved in libtool wrapper scripts and 3160*44704f69SBart Van Assche restored at link time]) 3161*44704f69SBart Van Assche_LT_DECL([], [need_lib_prefix], [0], 3162*44704f69SBart Van Assche [Do we need the "lib" prefix for modules?]) 3163*44704f69SBart Van Assche_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3164*44704f69SBart Van Assche_LT_DECL([], [version_type], [0], [Library versioning type]) 3165*44704f69SBart Van Assche_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3166*44704f69SBart Van Assche_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3167*44704f69SBart Van Assche_LT_DECL([], [shlibpath_overrides_runpath], [0], 3168*44704f69SBart Van Assche [Is shlibpath searched before the hard-coded library search path?]) 3169*44704f69SBart Van Assche_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3170*44704f69SBart Van Assche_LT_DECL([], [library_names_spec], [1], 3171*44704f69SBart Van Assche [[List of archive names. First name is the real one, the rest are links. 3172*44704f69SBart Van Assche The last name is the one that the linker finds with -lNAME]]) 3173*44704f69SBart Van Assche_LT_DECL([], [soname_spec], [1], 3174*44704f69SBart Van Assche [[The coded name of the library, if different from the real name]]) 3175*44704f69SBart Van Assche_LT_DECL([], [install_override_mode], [1], 3176*44704f69SBart Van Assche [Permission mode override for installation of shared libraries]) 3177*44704f69SBart Van Assche_LT_DECL([], [postinstall_cmds], [2], 3178*44704f69SBart Van Assche [Command to use after installation of a shared archive]) 3179*44704f69SBart Van Assche_LT_DECL([], [postuninstall_cmds], [2], 3180*44704f69SBart Van Assche [Command to use after uninstallation of a shared archive]) 3181*44704f69SBart Van Assche_LT_DECL([], [finish_cmds], [2], 3182*44704f69SBart Van Assche [Commands used to finish a libtool library installation in a directory]) 3183*44704f69SBart Van Assche_LT_DECL([], [finish_eval], [1], 3184*44704f69SBart Van Assche [[As "finish_cmds", except a single script fragment to be evaled but 3185*44704f69SBart Van Assche not shown]]) 3186*44704f69SBart Van Assche_LT_DECL([], [hardcode_into_libs], [0], 3187*44704f69SBart Van Assche [Whether we should hardcode library paths into libraries]) 3188*44704f69SBart Van Assche_LT_DECL([], [sys_lib_search_path_spec], [2], 3189*44704f69SBart Van Assche [Compile-time system search path for libraries]) 3190*44704f69SBart Van Assche_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3191*44704f69SBart Van Assche [Detected run-time system search path for libraries]) 3192*44704f69SBart Van Assche_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3193*44704f69SBart Van Assche [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3194*44704f69SBart Van Assche])# _LT_SYS_DYNAMIC_LINKER 3195*44704f69SBart Van Assche 3196*44704f69SBart Van Assche 3197*44704f69SBart Van Assche# _LT_PATH_TOOL_PREFIX(TOOL) 3198*44704f69SBart Van Assche# -------------------------- 3199*44704f69SBart Van Assche# find a file program that can recognize shared library 3200*44704f69SBart Van AsscheAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3201*44704f69SBart Van Assche[m4_require([_LT_DECL_EGREP])dnl 3202*44704f69SBart Van AsscheAC_MSG_CHECKING([for $1]) 3203*44704f69SBart Van AsscheAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3204*44704f69SBart Van Assche[case $MAGIC_CMD in 3205*44704f69SBart Van Assche[[\\/*] | ?:[\\/]*]) 3206*44704f69SBart Van Assche lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3207*44704f69SBart Van Assche ;; 3208*44704f69SBart Van Assche*) 3209*44704f69SBart Van Assche lt_save_MAGIC_CMD=$MAGIC_CMD 3210*44704f69SBart Van Assche lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3211*44704f69SBart Van Asschednl $ac_dummy forces splitting on constant user-supplied paths. 3212*44704f69SBart Van Asschednl POSIX.2 word splitting is done only on the output of word expansions, 3213*44704f69SBart Van Asschednl not every word. This closes a longstanding sh security hole. 3214*44704f69SBart Van Assche ac_dummy="m4_if([$2], , $PATH, [$2])" 3215*44704f69SBart Van Assche for ac_dir in $ac_dummy; do 3216*44704f69SBart Van Assche IFS=$lt_save_ifs 3217*44704f69SBart Van Assche test -z "$ac_dir" && ac_dir=. 3218*44704f69SBart Van Assche if test -f "$ac_dir/$1"; then 3219*44704f69SBart Van Assche lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3220*44704f69SBart Van Assche if test -n "$file_magic_test_file"; then 3221*44704f69SBart Van Assche case $deplibs_check_method in 3222*44704f69SBart Van Assche "file_magic "*) 3223*44704f69SBart Van Assche file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3224*44704f69SBart Van Assche MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3225*44704f69SBart Van Assche if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3226*44704f69SBart Van Assche $EGREP "$file_magic_regex" > /dev/null; then 3227*44704f69SBart Van Assche : 3228*44704f69SBart Van Assche else 3229*44704f69SBart Van Assche cat <<_LT_EOF 1>&2 3230*44704f69SBart Van Assche 3231*44704f69SBart Van Assche*** Warning: the command libtool uses to detect shared libraries, 3232*44704f69SBart Van Assche*** $file_magic_cmd, produces output that libtool cannot recognize. 3233*44704f69SBart Van Assche*** The result is that libtool may fail to recognize shared libraries 3234*44704f69SBart Van Assche*** as such. This will affect the creation of libtool libraries that 3235*44704f69SBart Van Assche*** depend on shared libraries, but programs linked with such libtool 3236*44704f69SBart Van Assche*** libraries will work regardless of this problem. Nevertheless, you 3237*44704f69SBart Van Assche*** may want to report the problem to your system manager and/or to 3238*44704f69SBart Van Assche*** [email protected] 3239*44704f69SBart Van Assche 3240*44704f69SBart Van Assche_LT_EOF 3241*44704f69SBart Van Assche fi ;; 3242*44704f69SBart Van Assche esac 3243*44704f69SBart Van Assche fi 3244*44704f69SBart Van Assche break 3245*44704f69SBart Van Assche fi 3246*44704f69SBart Van Assche done 3247*44704f69SBart Van Assche IFS=$lt_save_ifs 3248*44704f69SBart Van Assche MAGIC_CMD=$lt_save_MAGIC_CMD 3249*44704f69SBart Van Assche ;; 3250*44704f69SBart Van Asscheesac]) 3251*44704f69SBart Van AsscheMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3252*44704f69SBart Van Asscheif test -n "$MAGIC_CMD"; then 3253*44704f69SBart Van Assche AC_MSG_RESULT($MAGIC_CMD) 3254*44704f69SBart Van Asscheelse 3255*44704f69SBart Van Assche AC_MSG_RESULT(no) 3256*44704f69SBart Van Asschefi 3257*44704f69SBart Van Assche_LT_DECL([], [MAGIC_CMD], [0], 3258*44704f69SBart Van Assche [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3259*44704f69SBart Van Assche])# _LT_PATH_TOOL_PREFIX 3260*44704f69SBart Van Assche 3261*44704f69SBart Van Assche# Old name: 3262*44704f69SBart Van AsscheAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3263*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 3264*44704f69SBart Van Asschednl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3265*44704f69SBart Van Assche 3266*44704f69SBart Van Assche 3267*44704f69SBart Van Assche# _LT_PATH_MAGIC 3268*44704f69SBart Van Assche# -------------- 3269*44704f69SBart Van Assche# find a file program that can recognize a shared library 3270*44704f69SBart Van Asschem4_defun([_LT_PATH_MAGIC], 3271*44704f69SBart Van Assche[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3272*44704f69SBart Van Asscheif test -z "$lt_cv_path_MAGIC_CMD"; then 3273*44704f69SBart Van Assche if test -n "$ac_tool_prefix"; then 3274*44704f69SBart Van Assche _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3275*44704f69SBart Van Assche else 3276*44704f69SBart Van Assche MAGIC_CMD=: 3277*44704f69SBart Van Assche fi 3278*44704f69SBart Van Asschefi 3279*44704f69SBart Van Assche])# _LT_PATH_MAGIC 3280*44704f69SBart Van Assche 3281*44704f69SBart Van Assche 3282*44704f69SBart Van Assche# LT_PATH_LD 3283*44704f69SBart Van Assche# ---------- 3284*44704f69SBart Van Assche# find the pathname to the GNU or non-GNU linker 3285*44704f69SBart Van AsscheAC_DEFUN([LT_PATH_LD], 3286*44704f69SBart Van Assche[AC_REQUIRE([AC_PROG_CC])dnl 3287*44704f69SBart Van AsscheAC_REQUIRE([AC_CANONICAL_HOST])dnl 3288*44704f69SBart Van AsscheAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3289*44704f69SBart Van Asschem4_require([_LT_DECL_SED])dnl 3290*44704f69SBart Van Asschem4_require([_LT_DECL_EGREP])dnl 3291*44704f69SBart Van Asschem4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3292*44704f69SBart Van Assche 3293*44704f69SBart Van AsscheAC_ARG_WITH([gnu-ld], 3294*44704f69SBart Van Assche [AS_HELP_STRING([--with-gnu-ld], 3295*44704f69SBart Van Assche [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3296*44704f69SBart Van Assche [test no = "$withval" || with_gnu_ld=yes], 3297*44704f69SBart Van Assche [with_gnu_ld=no])dnl 3298*44704f69SBart Van Assche 3299*44704f69SBart Van Asscheac_prog=ld 3300*44704f69SBart Van Asscheif test yes = "$GCC"; then 3301*44704f69SBart Van Assche # Check if gcc -print-prog-name=ld gives a path. 3302*44704f69SBart Van Assche AC_MSG_CHECKING([for ld used by $CC]) 3303*44704f69SBart Van Assche case $host in 3304*44704f69SBart Van Assche *-*-mingw*) 3305*44704f69SBart Van Assche # gcc leaves a trailing carriage return, which upsets mingw 3306*44704f69SBart Van Assche ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3307*44704f69SBart Van Assche *) 3308*44704f69SBart Van Assche ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3309*44704f69SBart Van Assche esac 3310*44704f69SBart Van Assche case $ac_prog in 3311*44704f69SBart Van Assche # Accept absolute paths. 3312*44704f69SBart Van Assche [[\\/]]* | ?:[[\\/]]*) 3313*44704f69SBart Van Assche re_direlt='/[[^/]][[^/]]*/\.\./' 3314*44704f69SBart Van Assche # Canonicalize the pathname of ld 3315*44704f69SBart Van Assche ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3316*44704f69SBart Van Assche while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3317*44704f69SBart Van Assche ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3318*44704f69SBart Van Assche done 3319*44704f69SBart Van Assche test -z "$LD" && LD=$ac_prog 3320*44704f69SBart Van Assche ;; 3321*44704f69SBart Van Assche "") 3322*44704f69SBart Van Assche # If it fails, then pretend we aren't using GCC. 3323*44704f69SBart Van Assche ac_prog=ld 3324*44704f69SBart Van Assche ;; 3325*44704f69SBart Van Assche *) 3326*44704f69SBart Van Assche # If it is relative, then search for the first ld in PATH. 3327*44704f69SBart Van Assche with_gnu_ld=unknown 3328*44704f69SBart Van Assche ;; 3329*44704f69SBart Van Assche esac 3330*44704f69SBart Van Asscheelif test yes = "$with_gnu_ld"; then 3331*44704f69SBart Van Assche AC_MSG_CHECKING([for GNU ld]) 3332*44704f69SBart Van Asscheelse 3333*44704f69SBart Van Assche AC_MSG_CHECKING([for non-GNU ld]) 3334*44704f69SBart Van Asschefi 3335*44704f69SBart Van AsscheAC_CACHE_VAL(lt_cv_path_LD, 3336*44704f69SBart Van Assche[if test -z "$LD"; then 3337*44704f69SBart Van Assche lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3338*44704f69SBart Van Assche for ac_dir in $PATH; do 3339*44704f69SBart Van Assche IFS=$lt_save_ifs 3340*44704f69SBart Van Assche test -z "$ac_dir" && ac_dir=. 3341*44704f69SBart Van Assche if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3342*44704f69SBart Van Assche lt_cv_path_LD=$ac_dir/$ac_prog 3343*44704f69SBart Van Assche # Check to see if the program is GNU ld. I'd rather use --version, 3344*44704f69SBart Van Assche # but apparently some variants of GNU ld only accept -v. 3345*44704f69SBart Van Assche # Break only if it was the GNU/non-GNU ld that we prefer. 3346*44704f69SBart Van Assche case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3347*44704f69SBart Van Assche *GNU* | *'with BFD'*) 3348*44704f69SBart Van Assche test no != "$with_gnu_ld" && break 3349*44704f69SBart Van Assche ;; 3350*44704f69SBart Van Assche *) 3351*44704f69SBart Van Assche test yes != "$with_gnu_ld" && break 3352*44704f69SBart Van Assche ;; 3353*44704f69SBart Van Assche esac 3354*44704f69SBart Van Assche fi 3355*44704f69SBart Van Assche done 3356*44704f69SBart Van Assche IFS=$lt_save_ifs 3357*44704f69SBart Van Asscheelse 3358*44704f69SBart Van Assche lt_cv_path_LD=$LD # Let the user override the test with a path. 3359*44704f69SBart Van Asschefi]) 3360*44704f69SBart Van AsscheLD=$lt_cv_path_LD 3361*44704f69SBart Van Asscheif test -n "$LD"; then 3362*44704f69SBart Van Assche AC_MSG_RESULT($LD) 3363*44704f69SBart Van Asscheelse 3364*44704f69SBart Van Assche AC_MSG_RESULT(no) 3365*44704f69SBart Van Asschefi 3366*44704f69SBart Van Asschetest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3367*44704f69SBart Van Assche_LT_PATH_LD_GNU 3368*44704f69SBart Van AsscheAC_SUBST([LD]) 3369*44704f69SBart Van Assche 3370*44704f69SBart Van Assche_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3371*44704f69SBart Van Assche])# LT_PATH_LD 3372*44704f69SBart Van Assche 3373*44704f69SBart Van Assche# Old names: 3374*44704f69SBart Van AsscheAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3375*44704f69SBart Van AsscheAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3376*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 3377*44704f69SBart Van Asschednl AC_DEFUN([AM_PROG_LD], []) 3378*44704f69SBart Van Asschednl AC_DEFUN([AC_PROG_LD], []) 3379*44704f69SBart Van Assche 3380*44704f69SBart Van Assche 3381*44704f69SBart Van Assche# _LT_PATH_LD_GNU 3382*44704f69SBart Van Assche#- -------------- 3383*44704f69SBart Van Asschem4_defun([_LT_PATH_LD_GNU], 3384*44704f69SBart Van Assche[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3385*44704f69SBart Van Assche[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3386*44704f69SBart Van Asschecase `$LD -v 2>&1 </dev/null` in 3387*44704f69SBart Van Assche*GNU* | *'with BFD'*) 3388*44704f69SBart Van Assche lt_cv_prog_gnu_ld=yes 3389*44704f69SBart Van Assche ;; 3390*44704f69SBart Van Assche*) 3391*44704f69SBart Van Assche lt_cv_prog_gnu_ld=no 3392*44704f69SBart Van Assche ;; 3393*44704f69SBart Van Asscheesac]) 3394*44704f69SBart Van Asschewith_gnu_ld=$lt_cv_prog_gnu_ld 3395*44704f69SBart Van Assche])# _LT_PATH_LD_GNU 3396*44704f69SBart Van Assche 3397*44704f69SBart Van Assche 3398*44704f69SBart Van Assche# _LT_CMD_RELOAD 3399*44704f69SBart Van Assche# -------------- 3400*44704f69SBart Van Assche# find reload flag for linker 3401*44704f69SBart Van Assche# -- PORTME Some linkers may need a different reload flag. 3402*44704f69SBart Van Asschem4_defun([_LT_CMD_RELOAD], 3403*44704f69SBart Van Assche[AC_CACHE_CHECK([for $LD option to reload object files], 3404*44704f69SBart Van Assche lt_cv_ld_reload_flag, 3405*44704f69SBart Van Assche [lt_cv_ld_reload_flag='-r']) 3406*44704f69SBart Van Asschereload_flag=$lt_cv_ld_reload_flag 3407*44704f69SBart Van Asschecase $reload_flag in 3408*44704f69SBart Van Assche"" | " "*) ;; 3409*44704f69SBart Van Assche*) reload_flag=" $reload_flag" ;; 3410*44704f69SBart Van Asscheesac 3411*44704f69SBart Van Asschereload_cmds='$LD$reload_flag -o $output$reload_objs' 3412*44704f69SBart Van Asschecase $host_os in 3413*44704f69SBart Van Assche cygwin* | mingw* | pw32* | cegcc*) 3414*44704f69SBart Van Assche if test yes != "$GCC"; then 3415*44704f69SBart Van Assche reload_cmds=false 3416*44704f69SBart Van Assche fi 3417*44704f69SBart Van Assche ;; 3418*44704f69SBart Van Assche darwin*) 3419*44704f69SBart Van Assche if test yes = "$GCC"; then 3420*44704f69SBart Van Assche reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3421*44704f69SBart Van Assche else 3422*44704f69SBart Van Assche reload_cmds='$LD$reload_flag -o $output$reload_objs' 3423*44704f69SBart Van Assche fi 3424*44704f69SBart Van Assche ;; 3425*44704f69SBart Van Asscheesac 3426*44704f69SBart Van Assche_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3427*44704f69SBart Van Assche_LT_TAGDECL([], [reload_cmds], [2])dnl 3428*44704f69SBart Van Assche])# _LT_CMD_RELOAD 3429*44704f69SBart Van Assche 3430*44704f69SBart Van Assche 3431*44704f69SBart Van Assche# _LT_PATH_DD 3432*44704f69SBart Van Assche# ----------- 3433*44704f69SBart Van Assche# find a working dd 3434*44704f69SBart Van Asschem4_defun([_LT_PATH_DD], 3435*44704f69SBart Van Assche[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3436*44704f69SBart Van Assche[printf 0123456789abcdef0123456789abcdef >conftest.i 3437*44704f69SBart Van Asschecat conftest.i conftest.i >conftest2.i 3438*44704f69SBart Van Assche: ${lt_DD:=$DD} 3439*44704f69SBart Van AsscheAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3440*44704f69SBart Van Assche[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3441*44704f69SBart Van Assche cmp -s conftest.i conftest.out \ 3442*44704f69SBart Van Assche && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3443*44704f69SBart Van Asschefi]) 3444*44704f69SBart Van Asscherm -f conftest.i conftest2.i conftest.out]) 3445*44704f69SBart Van Assche])# _LT_PATH_DD 3446*44704f69SBart Van Assche 3447*44704f69SBart Van Assche 3448*44704f69SBart Van Assche# _LT_CMD_TRUNCATE 3449*44704f69SBart Van Assche# ---------------- 3450*44704f69SBart Van Assche# find command to truncate a binary pipe 3451*44704f69SBart Van Asschem4_defun([_LT_CMD_TRUNCATE], 3452*44704f69SBart Van Assche[m4_require([_LT_PATH_DD]) 3453*44704f69SBart Van AsscheAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3454*44704f69SBart Van Assche[printf 0123456789abcdef0123456789abcdef >conftest.i 3455*44704f69SBart Van Asschecat conftest.i conftest.i >conftest2.i 3456*44704f69SBart Van Asschelt_cv_truncate_bin= 3457*44704f69SBart Van Asscheif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3458*44704f69SBart Van Assche cmp -s conftest.i conftest.out \ 3459*44704f69SBart Van Assche && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3460*44704f69SBart Van Asschefi 3461*44704f69SBart Van Asscherm -f conftest.i conftest2.i conftest.out 3462*44704f69SBart Van Asschetest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3463*44704f69SBart Van Assche_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3464*44704f69SBart Van Assche [Command to truncate a binary pipe]) 3465*44704f69SBart Van Assche])# _LT_CMD_TRUNCATE 3466*44704f69SBart Van Assche 3467*44704f69SBart Van Assche 3468*44704f69SBart Van Assche# _LT_CHECK_MAGIC_METHOD 3469*44704f69SBart Van Assche# ---------------------- 3470*44704f69SBart Van Assche# how to check for library dependencies 3471*44704f69SBart Van Assche# -- PORTME fill in with the dynamic library characteristics 3472*44704f69SBart Van Asschem4_defun([_LT_CHECK_MAGIC_METHOD], 3473*44704f69SBart Van Assche[m4_require([_LT_DECL_EGREP]) 3474*44704f69SBart Van Asschem4_require([_LT_DECL_OBJDUMP]) 3475*44704f69SBart Van AsscheAC_CACHE_CHECK([how to recognize dependent libraries], 3476*44704f69SBart Van Asschelt_cv_deplibs_check_method, 3477*44704f69SBart Van Assche[lt_cv_file_magic_cmd='$MAGIC_CMD' 3478*44704f69SBart Van Asschelt_cv_file_magic_test_file= 3479*44704f69SBart Van Asschelt_cv_deplibs_check_method='unknown' 3480*44704f69SBart Van Assche# Need to set the preceding variable on all platforms that support 3481*44704f69SBart Van Assche# interlibrary dependencies. 3482*44704f69SBart Van Assche# 'none' -- dependencies not supported. 3483*44704f69SBart Van Assche# 'unknown' -- same as none, but documents that we really don't know. 3484*44704f69SBart Van Assche# 'pass_all' -- all dependencies passed with no checks. 3485*44704f69SBart Van Assche# 'test_compile' -- check by making test program. 3486*44704f69SBart Van Assche# 'file_magic [[regex]]' -- check by looking for files in library path 3487*44704f69SBart Van Assche# that responds to the $file_magic_cmd with a given extended regex. 3488*44704f69SBart Van Assche# If you have 'file' or equivalent on your system and you're not sure 3489*44704f69SBart Van Assche# whether 'pass_all' will *always* work, you probably want this one. 3490*44704f69SBart Van Assche 3491*44704f69SBart Van Asschecase $host_os in 3492*44704f69SBart Van Asscheaix[[4-9]]*) 3493*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3494*44704f69SBart Van Assche ;; 3495*44704f69SBart Van Assche 3496*44704f69SBart Van Asschebeos*) 3497*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3498*44704f69SBart Van Assche ;; 3499*44704f69SBart Van Assche 3500*44704f69SBart Van Asschebsdi[[45]]*) 3501*44704f69SBart Van Assche lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3502*44704f69SBart Van Assche lt_cv_file_magic_cmd='$FILECMD -L' 3503*44704f69SBart Van Assche lt_cv_file_magic_test_file=/shlib/libc.so 3504*44704f69SBart Van Assche ;; 3505*44704f69SBart Van Assche 3506*44704f69SBart Van Asschecygwin*) 3507*44704f69SBart Van Assche # func_win32_libid is a shell function defined in ltmain.sh 3508*44704f69SBart Van Assche lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3509*44704f69SBart Van Assche lt_cv_file_magic_cmd='func_win32_libid' 3510*44704f69SBart Van Assche ;; 3511*44704f69SBart Van Assche 3512*44704f69SBart Van Asschemingw* | pw32*) 3513*44704f69SBart Van Assche # Base MSYS/MinGW do not provide the 'file' command needed by 3514*44704f69SBart Van Assche # func_win32_libid shell function, so use a weaker test based on 'objdump', 3515*44704f69SBart Van Assche # unless we find 'file', for example because we are cross-compiling. 3516*44704f69SBart Van Assche if ( file / ) >/dev/null 2>&1; then 3517*44704f69SBart Van Assche lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3518*44704f69SBart Van Assche lt_cv_file_magic_cmd='func_win32_libid' 3519*44704f69SBart Van Assche else 3520*44704f69SBart Van Assche # Keep this pattern in sync with the one in func_win32_libid. 3521*44704f69SBart Van Assche lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3522*44704f69SBart Van Assche lt_cv_file_magic_cmd='$OBJDUMP -f' 3523*44704f69SBart Van Assche fi 3524*44704f69SBart Van Assche ;; 3525*44704f69SBart Van Assche 3526*44704f69SBart Van Asschecegcc*) 3527*44704f69SBart Van Assche # use the weaker test based on 'objdump'. See mingw*. 3528*44704f69SBart Van Assche lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3529*44704f69SBart Van Assche lt_cv_file_magic_cmd='$OBJDUMP -f' 3530*44704f69SBart Van Assche ;; 3531*44704f69SBart Van Assche 3532*44704f69SBart Van Asschedarwin* | rhapsody*) 3533*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3534*44704f69SBart Van Assche ;; 3535*44704f69SBart Van Assche 3536*44704f69SBart Van Asschefreebsd* | dragonfly* | midnightbsd*) 3537*44704f69SBart Van Assche if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3538*44704f69SBart Van Assche case $host_cpu in 3539*44704f69SBart Van Assche i*86 ) 3540*44704f69SBart Van Assche # Not sure whether the presence of OpenBSD here was a mistake. 3541*44704f69SBart Van Assche # Let's accept both of them until this is cleared up. 3542*44704f69SBart Van Assche lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3543*44704f69SBart Van Assche lt_cv_file_magic_cmd=$FILECMD 3544*44704f69SBart Van Assche lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3545*44704f69SBart Van Assche ;; 3546*44704f69SBart Van Assche esac 3547*44704f69SBart Van Assche else 3548*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3549*44704f69SBart Van Assche fi 3550*44704f69SBart Van Assche ;; 3551*44704f69SBart Van Assche 3552*44704f69SBart Van Asschehaiku*) 3553*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3554*44704f69SBart Van Assche ;; 3555*44704f69SBart Van Assche 3556*44704f69SBart Van Asschehpux10.20* | hpux11*) 3557*44704f69SBart Van Assche lt_cv_file_magic_cmd=$FILECMD 3558*44704f69SBart Van Assche case $host_cpu in 3559*44704f69SBart Van Assche ia64*) 3560*44704f69SBart Van Assche lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3561*44704f69SBart Van Assche lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3562*44704f69SBart Van Assche ;; 3563*44704f69SBart Van Assche hppa*64*) 3564*44704f69SBart Van Assche [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]'] 3565*44704f69SBart Van Assche lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3566*44704f69SBart Van Assche ;; 3567*44704f69SBart Van Assche *) 3568*44704f69SBart Van Assche lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3569*44704f69SBart Van Assche lt_cv_file_magic_test_file=/usr/lib/libc.sl 3570*44704f69SBart Van Assche ;; 3571*44704f69SBart Van Assche esac 3572*44704f69SBart Van Assche ;; 3573*44704f69SBart Van Assche 3574*44704f69SBart Van Asscheinterix[[3-9]]*) 3575*44704f69SBart Van Assche # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3576*44704f69SBart Van Assche lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3577*44704f69SBart Van Assche ;; 3578*44704f69SBart Van Assche 3579*44704f69SBart Van Asscheirix5* | irix6* | nonstopux*) 3580*44704f69SBart Van Assche case $LD in 3581*44704f69SBart Van Assche *-32|*"-32 ") libmagic=32-bit;; 3582*44704f69SBart Van Assche *-n32|*"-n32 ") libmagic=N32;; 3583*44704f69SBart Van Assche *-64|*"-64 ") libmagic=64-bit;; 3584*44704f69SBart Van Assche *) libmagic=never-match;; 3585*44704f69SBart Van Assche esac 3586*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3587*44704f69SBart Van Assche ;; 3588*44704f69SBart Van Assche 3589*44704f69SBart Van Assche# This must be glibc/ELF. 3590*44704f69SBart Van Asschelinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3591*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3592*44704f69SBart Van Assche ;; 3593*44704f69SBart Van Assche 3594*44704f69SBart Van Asschenetbsd* | netbsdelf*-gnu) 3595*44704f69SBart Van Assche if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3596*44704f69SBart Van Assche lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3597*44704f69SBart Van Assche else 3598*44704f69SBart Van Assche lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3599*44704f69SBart Van Assche fi 3600*44704f69SBart Van Assche ;; 3601*44704f69SBart Van Assche 3602*44704f69SBart Van Asschenewos6*) 3603*44704f69SBart Van Assche lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3604*44704f69SBart Van Assche lt_cv_file_magic_cmd=$FILECMD 3605*44704f69SBart Van Assche lt_cv_file_magic_test_file=/usr/lib/libnls.so 3606*44704f69SBart Van Assche ;; 3607*44704f69SBart Van Assche 3608*44704f69SBart Van Assche*nto* | *qnx*) 3609*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3610*44704f69SBart Van Assche ;; 3611*44704f69SBart Van Assche 3612*44704f69SBart Van Asscheopenbsd* | bitrig*) 3613*44704f69SBart Van Assche if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3614*44704f69SBart Van Assche lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3615*44704f69SBart Van Assche else 3616*44704f69SBart Van Assche lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3617*44704f69SBart Van Assche fi 3618*44704f69SBart Van Assche ;; 3619*44704f69SBart Van Assche 3620*44704f69SBart Van Asscheosf3* | osf4* | osf5*) 3621*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3622*44704f69SBart Van Assche ;; 3623*44704f69SBart Van Assche 3624*44704f69SBart Van Asscherdos*) 3625*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3626*44704f69SBart Van Assche ;; 3627*44704f69SBart Van Assche 3628*44704f69SBart Van Asschesolaris*) 3629*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3630*44704f69SBart Van Assche ;; 3631*44704f69SBart Van Assche 3632*44704f69SBart Van Asschesysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3633*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3634*44704f69SBart Van Assche ;; 3635*44704f69SBart Van Assche 3636*44704f69SBart Van Asschesysv4 | sysv4.3*) 3637*44704f69SBart Van Assche case $host_vendor in 3638*44704f69SBart Van Assche motorola) 3639*44704f69SBart Van Assche 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]]' 3640*44704f69SBart Van Assche lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3641*44704f69SBart Van Assche ;; 3642*44704f69SBart Van Assche ncr) 3643*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3644*44704f69SBart Van Assche ;; 3645*44704f69SBart Van Assche sequent) 3646*44704f69SBart Van Assche lt_cv_file_magic_cmd='/bin/file' 3647*44704f69SBart Van Assche lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3648*44704f69SBart Van Assche ;; 3649*44704f69SBart Van Assche sni) 3650*44704f69SBart Van Assche lt_cv_file_magic_cmd='/bin/file' 3651*44704f69SBart Van Assche lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3652*44704f69SBart Van Assche lt_cv_file_magic_test_file=/lib/libc.so 3653*44704f69SBart Van Assche ;; 3654*44704f69SBart Van Assche siemens) 3655*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3656*44704f69SBart Van Assche ;; 3657*44704f69SBart Van Assche pc) 3658*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3659*44704f69SBart Van Assche ;; 3660*44704f69SBart Van Assche esac 3661*44704f69SBart Van Assche ;; 3662*44704f69SBart Van Assche 3663*44704f69SBart Van Asschetpf*) 3664*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3665*44704f69SBart Van Assche ;; 3666*44704f69SBart Van Asscheos2*) 3667*44704f69SBart Van Assche lt_cv_deplibs_check_method=pass_all 3668*44704f69SBart Van Assche ;; 3669*44704f69SBart Van Asscheesac 3670*44704f69SBart Van Assche]) 3671*44704f69SBart Van Assche 3672*44704f69SBart Van Asschefile_magic_glob= 3673*44704f69SBart Van Asschewant_nocaseglob=no 3674*44704f69SBart Van Asscheif test "$build" = "$host"; then 3675*44704f69SBart Van Assche case $host_os in 3676*44704f69SBart Van Assche mingw* | pw32*) 3677*44704f69SBart Van Assche if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3678*44704f69SBart Van Assche want_nocaseglob=yes 3679*44704f69SBart Van Assche else 3680*44704f69SBart Van Assche file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3681*44704f69SBart Van Assche fi 3682*44704f69SBart Van Assche ;; 3683*44704f69SBart Van Assche esac 3684*44704f69SBart Van Asschefi 3685*44704f69SBart Van Assche 3686*44704f69SBart Van Asschefile_magic_cmd=$lt_cv_file_magic_cmd 3687*44704f69SBart Van Asschedeplibs_check_method=$lt_cv_deplibs_check_method 3688*44704f69SBart Van Asschetest -z "$deplibs_check_method" && deplibs_check_method=unknown 3689*44704f69SBart Van Assche 3690*44704f69SBart Van Assche_LT_DECL([], [deplibs_check_method], [1], 3691*44704f69SBart Van Assche [Method to check whether dependent libraries are shared objects]) 3692*44704f69SBart Van Assche_LT_DECL([], [file_magic_cmd], [1], 3693*44704f69SBart Van Assche [Command to use when deplibs_check_method = "file_magic"]) 3694*44704f69SBart Van Assche_LT_DECL([], [file_magic_glob], [1], 3695*44704f69SBart Van Assche [How to find potential files when deplibs_check_method = "file_magic"]) 3696*44704f69SBart Van Assche_LT_DECL([], [want_nocaseglob], [1], 3697*44704f69SBart Van Assche [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3698*44704f69SBart Van Assche])# _LT_CHECK_MAGIC_METHOD 3699*44704f69SBart Van Assche 3700*44704f69SBart Van Assche 3701*44704f69SBart Van Assche# LT_PATH_NM 3702*44704f69SBart Van Assche# ---------- 3703*44704f69SBart Van Assche# find the pathname to a BSD- or MS-compatible name lister 3704*44704f69SBart Van AsscheAC_DEFUN([LT_PATH_NM], 3705*44704f69SBart Van Assche[AC_REQUIRE([AC_PROG_CC])dnl 3706*44704f69SBart Van AsscheAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3707*44704f69SBart Van Assche[if test -n "$NM"; then 3708*44704f69SBart Van Assche # Let the user override the test. 3709*44704f69SBart Van Assche lt_cv_path_NM=$NM 3710*44704f69SBart Van Asscheelse 3711*44704f69SBart Van Assche lt_nm_to_check=${ac_tool_prefix}nm 3712*44704f69SBart Van Assche if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3713*44704f69SBart Van Assche lt_nm_to_check="$lt_nm_to_check nm" 3714*44704f69SBart Van Assche fi 3715*44704f69SBart Van Assche for lt_tmp_nm in $lt_nm_to_check; do 3716*44704f69SBart Van Assche lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3717*44704f69SBart Van Assche for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3718*44704f69SBart Van Assche IFS=$lt_save_ifs 3719*44704f69SBart Van Assche test -z "$ac_dir" && ac_dir=. 3720*44704f69SBart Van Assche tmp_nm=$ac_dir/$lt_tmp_nm 3721*44704f69SBart Van Assche if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3722*44704f69SBart Van Assche # Check to see if the nm accepts a BSD-compat flag. 3723*44704f69SBart Van Assche # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3724*44704f69SBart Van Assche # nm: unknown option "B" ignored 3725*44704f69SBart Van Assche # Tru64's nm complains that /dev/null is an invalid object file 3726*44704f69SBart Van Assche # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3727*44704f69SBart Van Assche case $build_os in 3728*44704f69SBart Van Assche mingw*) lt_bad_file=conftest.nm/nofile ;; 3729*44704f69SBart Van Assche *) lt_bad_file=/dev/null ;; 3730*44704f69SBart Van Assche esac 3731*44704f69SBart Van Assche case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 3732*44704f69SBart Van Assche *$lt_bad_file* | *'Invalid file or object type'*) 3733*44704f69SBart Van Assche lt_cv_path_NM="$tmp_nm -B" 3734*44704f69SBart Van Assche break 2 3735*44704f69SBart Van Assche ;; 3736*44704f69SBart Van Assche *) 3737*44704f69SBart Van Assche case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 3738*44704f69SBart Van Assche */dev/null*) 3739*44704f69SBart Van Assche lt_cv_path_NM="$tmp_nm -p" 3740*44704f69SBart Van Assche break 2 3741*44704f69SBart Van Assche ;; 3742*44704f69SBart Van Assche *) 3743*44704f69SBart Van Assche lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3744*44704f69SBart Van Assche continue # so that we can try to find one that supports BSD flags 3745*44704f69SBart Van Assche ;; 3746*44704f69SBart Van Assche esac 3747*44704f69SBart Van Assche ;; 3748*44704f69SBart Van Assche esac 3749*44704f69SBart Van Assche fi 3750*44704f69SBart Van Assche done 3751*44704f69SBart Van Assche IFS=$lt_save_ifs 3752*44704f69SBart Van Assche done 3753*44704f69SBart Van Assche : ${lt_cv_path_NM=no} 3754*44704f69SBart Van Asschefi]) 3755*44704f69SBart Van Asscheif test no != "$lt_cv_path_NM"; then 3756*44704f69SBart Van Assche NM=$lt_cv_path_NM 3757*44704f69SBart Van Asscheelse 3758*44704f69SBart Van Assche # Didn't find any BSD compatible name lister, look for dumpbin. 3759*44704f69SBart Van Assche if test -n "$DUMPBIN"; then : 3760*44704f69SBart Van Assche # Let the user override the test. 3761*44704f69SBart Van Assche else 3762*44704f69SBart Van Assche AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3763*44704f69SBart Van Assche case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 3764*44704f69SBart Van Assche *COFF*) 3765*44704f69SBart Van Assche DUMPBIN="$DUMPBIN -symbols -headers" 3766*44704f69SBart Van Assche ;; 3767*44704f69SBart Van Assche *) 3768*44704f69SBart Van Assche DUMPBIN=: 3769*44704f69SBart Van Assche ;; 3770*44704f69SBart Van Assche esac 3771*44704f69SBart Van Assche fi 3772*44704f69SBart Van Assche AC_SUBST([DUMPBIN]) 3773*44704f69SBart Van Assche if test : != "$DUMPBIN"; then 3774*44704f69SBart Van Assche NM=$DUMPBIN 3775*44704f69SBart Van Assche fi 3776*44704f69SBart Van Asschefi 3777*44704f69SBart Van Asschetest -z "$NM" && NM=nm 3778*44704f69SBart Van AsscheAC_SUBST([NM]) 3779*44704f69SBart Van Assche_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3780*44704f69SBart Van Assche 3781*44704f69SBart Van AsscheAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3782*44704f69SBart Van Assche [lt_cv_nm_interface="BSD nm" 3783*44704f69SBart Van Assche echo "int some_variable = 0;" > conftest.$ac_ext 3784*44704f69SBart Van Assche (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3785*44704f69SBart Van Assche (eval "$ac_compile" 2>conftest.err) 3786*44704f69SBart Van Assche cat conftest.err >&AS_MESSAGE_LOG_FD 3787*44704f69SBart Van Assche (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3788*44704f69SBart Van Assche (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3789*44704f69SBart Van Assche cat conftest.err >&AS_MESSAGE_LOG_FD 3790*44704f69SBart Van Assche (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3791*44704f69SBart Van Assche cat conftest.out >&AS_MESSAGE_LOG_FD 3792*44704f69SBart Van Assche if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3793*44704f69SBart Van Assche lt_cv_nm_interface="MS dumpbin" 3794*44704f69SBart Van Assche fi 3795*44704f69SBart Van Assche rm -f conftest*]) 3796*44704f69SBart Van Assche])# LT_PATH_NM 3797*44704f69SBart Van Assche 3798*44704f69SBart Van Assche# Old names: 3799*44704f69SBart Van AsscheAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3800*44704f69SBart Van AsscheAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3801*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 3802*44704f69SBart Van Asschednl AC_DEFUN([AM_PROG_NM], []) 3803*44704f69SBart Van Asschednl AC_DEFUN([AC_PROG_NM], []) 3804*44704f69SBart Van Assche 3805*44704f69SBart Van Assche# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3806*44704f69SBart Van Assche# -------------------------------- 3807*44704f69SBart Van Assche# how to determine the name of the shared library 3808*44704f69SBart Van Assche# associated with a specific link library. 3809*44704f69SBart Van Assche# -- PORTME fill in with the dynamic library characteristics 3810*44704f69SBart Van Asschem4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3811*44704f69SBart Van Assche[m4_require([_LT_DECL_EGREP]) 3812*44704f69SBart Van Asschem4_require([_LT_DECL_OBJDUMP]) 3813*44704f69SBart Van Asschem4_require([_LT_DECL_DLLTOOL]) 3814*44704f69SBart Van AsscheAC_CACHE_CHECK([how to associate runtime and link libraries], 3815*44704f69SBart Van Asschelt_cv_sharedlib_from_linklib_cmd, 3816*44704f69SBart Van Assche[lt_cv_sharedlib_from_linklib_cmd='unknown' 3817*44704f69SBart Van Assche 3818*44704f69SBart Van Asschecase $host_os in 3819*44704f69SBart Van Asschecygwin* | mingw* | pw32* | cegcc*) 3820*44704f69SBart Van Assche # two different shell functions defined in ltmain.sh; 3821*44704f69SBart Van Assche # decide which one to use based on capabilities of $DLLTOOL 3822*44704f69SBart Van Assche case `$DLLTOOL --help 2>&1` in 3823*44704f69SBart Van Assche *--identify-strict*) 3824*44704f69SBart Van Assche lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3825*44704f69SBart Van Assche ;; 3826*44704f69SBart Van Assche *) 3827*44704f69SBart Van Assche lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3828*44704f69SBart Van Assche ;; 3829*44704f69SBart Van Assche esac 3830*44704f69SBart Van Assche ;; 3831*44704f69SBart Van Assche*) 3832*44704f69SBart Van Assche # fallback: assume linklib IS sharedlib 3833*44704f69SBart Van Assche lt_cv_sharedlib_from_linklib_cmd=$ECHO 3834*44704f69SBart Van Assche ;; 3835*44704f69SBart Van Asscheesac 3836*44704f69SBart Van Assche]) 3837*44704f69SBart Van Asschesharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3838*44704f69SBart Van Asschetest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3839*44704f69SBart Van Assche 3840*44704f69SBart Van Assche_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3841*44704f69SBart Van Assche [Command to associate shared and link libraries]) 3842*44704f69SBart Van Assche])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3843*44704f69SBart Van Assche 3844*44704f69SBart Van Assche 3845*44704f69SBart Van Assche# _LT_PATH_MANIFEST_TOOL 3846*44704f69SBart Van Assche# ---------------------- 3847*44704f69SBart Van Assche# locate the manifest tool 3848*44704f69SBart Van Asschem4_defun([_LT_PATH_MANIFEST_TOOL], 3849*44704f69SBart Van Assche[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3850*44704f69SBart Van Asschetest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3851*44704f69SBart Van AsscheAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3852*44704f69SBart Van Assche [lt_cv_path_mainfest_tool=no 3853*44704f69SBart Van Assche echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3854*44704f69SBart Van Assche $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3855*44704f69SBart Van Assche cat conftest.err >&AS_MESSAGE_LOG_FD 3856*44704f69SBart Van Assche if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3857*44704f69SBart Van Assche lt_cv_path_mainfest_tool=yes 3858*44704f69SBart Van Assche fi 3859*44704f69SBart Van Assche rm -f conftest*]) 3860*44704f69SBart Van Asscheif test yes != "$lt_cv_path_mainfest_tool"; then 3861*44704f69SBart Van Assche MANIFEST_TOOL=: 3862*44704f69SBart Van Asschefi 3863*44704f69SBart Van Assche_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3864*44704f69SBart Van Assche])# _LT_PATH_MANIFEST_TOOL 3865*44704f69SBart Van Assche 3866*44704f69SBart Van Assche 3867*44704f69SBart Van Assche# _LT_DLL_DEF_P([FILE]) 3868*44704f69SBart Van Assche# --------------------- 3869*44704f69SBart Van Assche# True iff FILE is a Windows DLL '.def' file. 3870*44704f69SBart Van Assche# Keep in sync with func_dll_def_p in the libtool script 3871*44704f69SBart Van AsscheAC_DEFUN([_LT_DLL_DEF_P], 3872*44704f69SBart Van Assche[dnl 3873*44704f69SBart Van Assche test DEF = "`$SED -n dnl 3874*44704f69SBart Van Assche -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3875*44704f69SBart Van Assche -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3876*44704f69SBart Van Assche -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3877*44704f69SBart Van Assche -e q dnl Only consider the first "real" line 3878*44704f69SBart Van Assche $1`" dnl 3879*44704f69SBart Van Assche])# _LT_DLL_DEF_P 3880*44704f69SBart Van Assche 3881*44704f69SBart Van Assche 3882*44704f69SBart Van Assche# LT_LIB_M 3883*44704f69SBart Van Assche# -------- 3884*44704f69SBart Van Assche# check for math library 3885*44704f69SBart Van AsscheAC_DEFUN([LT_LIB_M], 3886*44704f69SBart Van Assche[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3887*44704f69SBart Van AsscheLIBM= 3888*44704f69SBart Van Asschecase $host in 3889*44704f69SBart Van Assche*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3890*44704f69SBart Van Assche # These system don't have libm, or don't need it 3891*44704f69SBart Van Assche ;; 3892*44704f69SBart Van Assche*-ncr-sysv4.3*) 3893*44704f69SBart Van Assche AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3894*44704f69SBart Van Assche AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3895*44704f69SBart Van Assche ;; 3896*44704f69SBart Van Assche*) 3897*44704f69SBart Van Assche AC_CHECK_LIB(m, cos, LIBM=-lm) 3898*44704f69SBart Van Assche ;; 3899*44704f69SBart Van Asscheesac 3900*44704f69SBart Van AsscheAC_SUBST([LIBM]) 3901*44704f69SBart Van Assche])# LT_LIB_M 3902*44704f69SBart Van Assche 3903*44704f69SBart Van Assche# Old name: 3904*44704f69SBart Van AsscheAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3905*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 3906*44704f69SBart Van Asschednl AC_DEFUN([AC_CHECK_LIBM], []) 3907*44704f69SBart Van Assche 3908*44704f69SBart Van Assche 3909*44704f69SBart Van Assche# _LT_COMPILER_NO_RTTI([TAGNAME]) 3910*44704f69SBart Van Assche# ------------------------------- 3911*44704f69SBart Van Asschem4_defun([_LT_COMPILER_NO_RTTI], 3912*44704f69SBart Van Assche[m4_require([_LT_TAG_COMPILER])dnl 3913*44704f69SBart Van Assche 3914*44704f69SBart Van Assche_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3915*44704f69SBart Van Assche 3916*44704f69SBart Van Asscheif test yes = "$GCC"; then 3917*44704f69SBart Van Assche case $cc_basename in 3918*44704f69SBart Van Assche nvcc*) 3919*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3920*44704f69SBart Van Assche *) 3921*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3922*44704f69SBart Van Assche esac 3923*44704f69SBart Van Assche 3924*44704f69SBart Van Assche _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3925*44704f69SBart Van Assche lt_cv_prog_compiler_rtti_exceptions, 3926*44704f69SBart Van Assche [-fno-rtti -fno-exceptions], [], 3927*44704f69SBart Van Assche [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3928*44704f69SBart Van Asschefi 3929*44704f69SBart Van Assche_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3930*44704f69SBart Van Assche [Compiler flag to turn off builtin functions]) 3931*44704f69SBart Van Assche])# _LT_COMPILER_NO_RTTI 3932*44704f69SBart Van Assche 3933*44704f69SBart Van Assche 3934*44704f69SBart Van Assche# _LT_CMD_GLOBAL_SYMBOLS 3935*44704f69SBart Van Assche# ---------------------- 3936*44704f69SBart Van Asschem4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3937*44704f69SBart Van Assche[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3938*44704f69SBart Van AsscheAC_REQUIRE([AC_PROG_CC])dnl 3939*44704f69SBart Van AsscheAC_REQUIRE([AC_PROG_AWK])dnl 3940*44704f69SBart Van AsscheAC_REQUIRE([LT_PATH_NM])dnl 3941*44704f69SBart Van AsscheAC_REQUIRE([LT_PATH_LD])dnl 3942*44704f69SBart Van Asschem4_require([_LT_DECL_SED])dnl 3943*44704f69SBart Van Asschem4_require([_LT_DECL_EGREP])dnl 3944*44704f69SBart Van Asschem4_require([_LT_TAG_COMPILER])dnl 3945*44704f69SBart Van Assche 3946*44704f69SBart Van Assche# Check for command to grab the raw symbol name followed by C symbol from nm. 3947*44704f69SBart Van AsscheAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3948*44704f69SBart Van AsscheAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3949*44704f69SBart Van Assche[ 3950*44704f69SBart Van Assche# These are sane defaults that work on at least a few old systems. 3951*44704f69SBart Van Assche# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3952*44704f69SBart Van Assche 3953*44704f69SBart Van Assche# Character class describing NM global symbol codes. 3954*44704f69SBart Van Asschesymcode='[[BCDEGRST]]' 3955*44704f69SBart Van Assche 3956*44704f69SBart Van Assche# Regexp to match symbols that can be accessed directly from C. 3957*44704f69SBart Van Asschesympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3958*44704f69SBart Van Assche 3959*44704f69SBart Van Assche# Define system-specific variables. 3960*44704f69SBart Van Asschecase $host_os in 3961*44704f69SBart Van Asscheaix*) 3962*44704f69SBart Van Assche symcode='[[BCDT]]' 3963*44704f69SBart Van Assche ;; 3964*44704f69SBart Van Asschecygwin* | mingw* | pw32* | cegcc*) 3965*44704f69SBart Van Assche symcode='[[ABCDGISTW]]' 3966*44704f69SBart Van Assche ;; 3967*44704f69SBart Van Asschehpux*) 3968*44704f69SBart Van Assche if test ia64 = "$host_cpu"; then 3969*44704f69SBart Van Assche symcode='[[ABCDEGRST]]' 3970*44704f69SBart Van Assche fi 3971*44704f69SBart Van Assche ;; 3972*44704f69SBart Van Asscheirix* | nonstopux*) 3973*44704f69SBart Van Assche symcode='[[BCDEGRST]]' 3974*44704f69SBart Van Assche ;; 3975*44704f69SBart Van Asscheosf*) 3976*44704f69SBart Van Assche symcode='[[BCDEGQRST]]' 3977*44704f69SBart Van Assche ;; 3978*44704f69SBart Van Asschesolaris*) 3979*44704f69SBart Van Assche symcode='[[BDRT]]' 3980*44704f69SBart Van Assche ;; 3981*44704f69SBart Van Asschesco3.2v5*) 3982*44704f69SBart Van Assche symcode='[[DT]]' 3983*44704f69SBart Van Assche ;; 3984*44704f69SBart Van Asschesysv4.2uw2*) 3985*44704f69SBart Van Assche symcode='[[DT]]' 3986*44704f69SBart Van Assche ;; 3987*44704f69SBart Van Asschesysv5* | sco5v6* | unixware* | OpenUNIX*) 3988*44704f69SBart Van Assche symcode='[[ABDT]]' 3989*44704f69SBart Van Assche ;; 3990*44704f69SBart Van Asschesysv4) 3991*44704f69SBart Van Assche symcode='[[DFNSTU]]' 3992*44704f69SBart Van Assche ;; 3993*44704f69SBart Van Asscheesac 3994*44704f69SBart Van Assche 3995*44704f69SBart Van Assche# If we're using GNU nm, then use its standard symbol codes. 3996*44704f69SBart Van Asschecase `$NM -V 2>&1` in 3997*44704f69SBart Van Assche*GNU* | *'with BFD'*) 3998*44704f69SBart Van Assche symcode='[[ABCDGIRSTW]]' ;; 3999*44704f69SBart Van Asscheesac 4000*44704f69SBart Van Assche 4001*44704f69SBart Van Asscheif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4002*44704f69SBart Van Assche # Gets list of data symbols to import. 4003*44704f69SBart Van Assche lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 4004*44704f69SBart Van Assche # Adjust the below global symbol transforms to fixup imported variables. 4005*44704f69SBart Van Assche lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 4006*44704f69SBart Van Assche lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 4007*44704f69SBart Van Assche lt_c_name_lib_hook="\ 4008*44704f69SBart Van Assche -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 4009*44704f69SBart Van Assche -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 4010*44704f69SBart Van Asscheelse 4011*44704f69SBart Van Assche # Disable hooks by default. 4012*44704f69SBart Van Assche lt_cv_sys_global_symbol_to_import= 4013*44704f69SBart Van Assche lt_cdecl_hook= 4014*44704f69SBart Van Assche lt_c_name_hook= 4015*44704f69SBart Van Assche lt_c_name_lib_hook= 4016*44704f69SBart Van Asschefi 4017*44704f69SBart Van Assche 4018*44704f69SBart Van Assche# Transform an extracted symbol line into a proper C declaration. 4019*44704f69SBart Van Assche# Some systems (esp. on ia64) link data and code symbols differently, 4020*44704f69SBart Van Assche# so use this general approach. 4021*44704f69SBart Van Asschelt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 4022*44704f69SBart Van Assche$lt_cdecl_hook\ 4023*44704f69SBart Van Assche" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4024*44704f69SBart Van Assche" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4025*44704f69SBart Van Assche 4026*44704f69SBart Van Assche# Transform an extracted symbol line into symbol name and symbol address 4027*44704f69SBart Van Asschelt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 4028*44704f69SBart Van Assche$lt_c_name_hook\ 4029*44704f69SBart Van Assche" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4030*44704f69SBart Van Assche" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4031*44704f69SBart Van Assche 4032*44704f69SBart Van Assche# Transform an extracted symbol line into symbol name with lib prefix and 4033*44704f69SBart Van Assche# symbol address. 4034*44704f69SBart Van Asschelt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 4035*44704f69SBart Van Assche$lt_c_name_lib_hook\ 4036*44704f69SBart Van Assche" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4037*44704f69SBart Van Assche" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4038*44704f69SBart Van Assche" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4039*44704f69SBart Van Assche 4040*44704f69SBart Van Assche# Handle CRLF in mingw tool chain 4041*44704f69SBart Van Asscheopt_cr= 4042*44704f69SBart Van Asschecase $build_os in 4043*44704f69SBart Van Asschemingw*) 4044*44704f69SBart Van Assche opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4045*44704f69SBart Van Assche ;; 4046*44704f69SBart Van Asscheesac 4047*44704f69SBart Van Assche 4048*44704f69SBart Van Assche# Try without a prefix underscore, then with it. 4049*44704f69SBart Van Asschefor ac_symprfx in "" "_"; do 4050*44704f69SBart Van Assche 4051*44704f69SBart Van Assche # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4052*44704f69SBart Van Assche symxfrm="\\1 $ac_symprfx\\2 \\2" 4053*44704f69SBart Van Assche 4054*44704f69SBart Van Assche # Write the raw and C identifiers. 4055*44704f69SBart Van Assche if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4056*44704f69SBart Van Assche # Fake it for dumpbin and say T for any non-static function, 4057*44704f69SBart Van Assche # D for any global variable and I for any imported variable. 4058*44704f69SBart Van Assche # Also find C++ and __fastcall symbols from MSVC++ or ICC, 4059*44704f69SBart Van Assche # which start with @ or ?. 4060*44704f69SBart Van Assche lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4061*44704f69SBart Van Assche" {last_section=section; section=\$ 3};"\ 4062*44704f69SBart Van Assche" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4063*44704f69SBart Van Assche" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4064*44704f69SBart Van Assche" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4065*44704f69SBart Van Assche" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4066*44704f69SBart Van Assche" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4067*44704f69SBart Van Assche" \$ 0!~/External *\|/{next};"\ 4068*44704f69SBart Van Assche" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4069*44704f69SBart Van Assche" {if(hide[section]) next};"\ 4070*44704f69SBart Van Assche" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4071*44704f69SBart Van Assche" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4072*44704f69SBart Van Assche" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4073*44704f69SBart Van Assche" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4074*44704f69SBart Van Assche" ' prfx=^$ac_symprfx]" 4075*44704f69SBart Van Assche else 4076*44704f69SBart Van Assche lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4077*44704f69SBart Van Assche fi 4078*44704f69SBart Van Assche lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 4079*44704f69SBart Van Assche 4080*44704f69SBart Van Assche # Check to see that the pipe works correctly. 4081*44704f69SBart Van Assche pipe_works=no 4082*44704f69SBart Van Assche 4083*44704f69SBart Van Assche rm -f conftest* 4084*44704f69SBart Van Assche cat > conftest.$ac_ext <<_LT_EOF 4085*44704f69SBart Van Assche#ifdef __cplusplus 4086*44704f69SBart Van Asscheextern "C" { 4087*44704f69SBart Van Assche#endif 4088*44704f69SBart Van Asschechar nm_test_var; 4089*44704f69SBart Van Asschevoid nm_test_func(void); 4090*44704f69SBart Van Asschevoid nm_test_func(void){} 4091*44704f69SBart Van Assche#ifdef __cplusplus 4092*44704f69SBart Van Assche} 4093*44704f69SBart Van Assche#endif 4094*44704f69SBart Van Asscheint main(){nm_test_var='a';nm_test_func();return(0);} 4095*44704f69SBart Van Assche_LT_EOF 4096*44704f69SBart Van Assche 4097*44704f69SBart Van Assche if AC_TRY_EVAL(ac_compile); then 4098*44704f69SBart Van Assche # Now try to grab the symbols. 4099*44704f69SBart Van Assche nlist=conftest.nm 4100*44704f69SBart Van Assche $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD 4101*44704f69SBart Van Assche if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then 4102*44704f69SBart Van Assche # Try sorting and uniquifying the output. 4103*44704f69SBart Van Assche if sort "$nlist" | uniq > "$nlist"T; then 4104*44704f69SBart Van Assche mv -f "$nlist"T "$nlist" 4105*44704f69SBart Van Assche else 4106*44704f69SBart Van Assche rm -f "$nlist"T 4107*44704f69SBart Van Assche fi 4108*44704f69SBart Van Assche 4109*44704f69SBart Van Assche # Make sure that we snagged all the symbols we need. 4110*44704f69SBart Van Assche if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4111*44704f69SBart Van Assche if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4112*44704f69SBart Van Assche cat <<_LT_EOF > conftest.$ac_ext 4113*44704f69SBart Van Assche/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4114*44704f69SBart Van Assche#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4115*44704f69SBart Van Assche/* DATA imports from DLLs on WIN32 can't be const, because runtime 4116*44704f69SBart Van Assche relocations are performed -- see ld's documentation on pseudo-relocs. */ 4117*44704f69SBart Van Assche# define LT@&t@_DLSYM_CONST 4118*44704f69SBart Van Assche#elif defined __osf__ 4119*44704f69SBart Van Assche/* This system does not cope well with relocations in const data. */ 4120*44704f69SBart Van Assche# define LT@&t@_DLSYM_CONST 4121*44704f69SBart Van Assche#else 4122*44704f69SBart Van Assche# define LT@&t@_DLSYM_CONST const 4123*44704f69SBart Van Assche#endif 4124*44704f69SBart Van Assche 4125*44704f69SBart Van Assche#ifdef __cplusplus 4126*44704f69SBart Van Asscheextern "C" { 4127*44704f69SBart Van Assche#endif 4128*44704f69SBart Van Assche 4129*44704f69SBart Van Assche_LT_EOF 4130*44704f69SBart Van Assche # Now generate the symbol file. 4131*44704f69SBart Van Assche eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4132*44704f69SBart Van Assche 4133*44704f69SBart Van Assche cat <<_LT_EOF >> conftest.$ac_ext 4134*44704f69SBart Van Assche 4135*44704f69SBart Van Assche/* The mapping between symbol names and symbols. */ 4136*44704f69SBart Van AsscheLT@&t@_DLSYM_CONST struct { 4137*44704f69SBart Van Assche const char *name; 4138*44704f69SBart Van Assche void *address; 4139*44704f69SBart Van Assche} 4140*44704f69SBart Van Asschelt__PROGRAM__LTX_preloaded_symbols[[]] = 4141*44704f69SBart Van Assche{ 4142*44704f69SBart Van Assche { "@PROGRAM@", (void *) 0 }, 4143*44704f69SBart Van Assche_LT_EOF 4144*44704f69SBart Van Assche $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4145*44704f69SBart Van Assche cat <<\_LT_EOF >> conftest.$ac_ext 4146*44704f69SBart Van Assche {0, (void *) 0} 4147*44704f69SBart Van Assche}; 4148*44704f69SBart Van Assche 4149*44704f69SBart Van Assche/* This works around a problem in FreeBSD linker */ 4150*44704f69SBart Van Assche#ifdef FREEBSD_WORKAROUND 4151*44704f69SBart Van Asschestatic const void *lt_preloaded_setup() { 4152*44704f69SBart Van Assche return lt__PROGRAM__LTX_preloaded_symbols; 4153*44704f69SBart Van Assche} 4154*44704f69SBart Van Assche#endif 4155*44704f69SBart Van Assche 4156*44704f69SBart Van Assche#ifdef __cplusplus 4157*44704f69SBart Van Assche} 4158*44704f69SBart Van Assche#endif 4159*44704f69SBart Van Assche_LT_EOF 4160*44704f69SBart Van Assche # Now try linking the two files. 4161*44704f69SBart Van Assche mv conftest.$ac_objext conftstm.$ac_objext 4162*44704f69SBart Van Assche lt_globsym_save_LIBS=$LIBS 4163*44704f69SBart Van Assche lt_globsym_save_CFLAGS=$CFLAGS 4164*44704f69SBart Van Assche LIBS=conftstm.$ac_objext 4165*44704f69SBart Van Assche CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4166*44704f69SBart Van Assche if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4167*44704f69SBart Van Assche pipe_works=yes 4168*44704f69SBart Van Assche fi 4169*44704f69SBart Van Assche LIBS=$lt_globsym_save_LIBS 4170*44704f69SBart Van Assche CFLAGS=$lt_globsym_save_CFLAGS 4171*44704f69SBart Van Assche else 4172*44704f69SBart Van Assche echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4173*44704f69SBart Van Assche fi 4174*44704f69SBart Van Assche else 4175*44704f69SBart Van Assche echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4176*44704f69SBart Van Assche fi 4177*44704f69SBart Van Assche else 4178*44704f69SBart Van Assche echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4179*44704f69SBart Van Assche fi 4180*44704f69SBart Van Assche else 4181*44704f69SBart Van Assche echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4182*44704f69SBart Van Assche cat conftest.$ac_ext >&5 4183*44704f69SBart Van Assche fi 4184*44704f69SBart Van Assche rm -rf conftest* conftst* 4185*44704f69SBart Van Assche 4186*44704f69SBart Van Assche # Do not use the global_symbol_pipe unless it works. 4187*44704f69SBart Van Assche if test yes = "$pipe_works"; then 4188*44704f69SBart Van Assche break 4189*44704f69SBart Van Assche else 4190*44704f69SBart Van Assche lt_cv_sys_global_symbol_pipe= 4191*44704f69SBart Van Assche fi 4192*44704f69SBart Van Asschedone 4193*44704f69SBart Van Assche]) 4194*44704f69SBart Van Asscheif test -z "$lt_cv_sys_global_symbol_pipe"; then 4195*44704f69SBart Van Assche lt_cv_sys_global_symbol_to_cdecl= 4196*44704f69SBart Van Asschefi 4197*44704f69SBart Van Asscheif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4198*44704f69SBart Van Assche AC_MSG_RESULT(failed) 4199*44704f69SBart Van Asscheelse 4200*44704f69SBart Van Assche AC_MSG_RESULT(ok) 4201*44704f69SBart Van Asschefi 4202*44704f69SBart Van Assche 4203*44704f69SBart Van Assche# Response file support. 4204*44704f69SBart Van Asscheif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4205*44704f69SBart Van Assche nm_file_list_spec='@' 4206*44704f69SBart Van Asscheelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4207*44704f69SBart Van Assche nm_file_list_spec='@' 4208*44704f69SBart Van Asschefi 4209*44704f69SBart Van Assche 4210*44704f69SBart Van Assche_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4211*44704f69SBart Van Assche [Take the output of nm and produce a listing of raw symbols and C names]) 4212*44704f69SBart Van Assche_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4213*44704f69SBart Van Assche [Transform the output of nm in a proper C declaration]) 4214*44704f69SBart Van Assche_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4215*44704f69SBart Van Assche [Transform the output of nm into a list of symbols to manually relocate]) 4216*44704f69SBart Van Assche_LT_DECL([global_symbol_to_c_name_address], 4217*44704f69SBart Van Assche [lt_cv_sys_global_symbol_to_c_name_address], [1], 4218*44704f69SBart Van Assche [Transform the output of nm in a C name address pair]) 4219*44704f69SBart Van Assche_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4220*44704f69SBart Van Assche [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4221*44704f69SBart Van Assche [Transform the output of nm in a C name address pair when lib prefix is needed]) 4222*44704f69SBart Van Assche_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4223*44704f69SBart Van Assche [The name lister interface]) 4224*44704f69SBart Van Assche_LT_DECL([], [nm_file_list_spec], [1], 4225*44704f69SBart Van Assche [Specify filename containing input files for $NM]) 4226*44704f69SBart Van Assche]) # _LT_CMD_GLOBAL_SYMBOLS 4227*44704f69SBart Van Assche 4228*44704f69SBart Van Assche 4229*44704f69SBart Van Assche# _LT_COMPILER_PIC([TAGNAME]) 4230*44704f69SBart Van Assche# --------------------------- 4231*44704f69SBart Van Asschem4_defun([_LT_COMPILER_PIC], 4232*44704f69SBart Van Assche[m4_require([_LT_TAG_COMPILER])dnl 4233*44704f69SBart Van Assche_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4234*44704f69SBart Van Assche_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4235*44704f69SBart Van Assche_LT_TAGVAR(lt_prog_compiler_static, $1)= 4236*44704f69SBart Van Assche 4237*44704f69SBart Van Asschem4_if([$1], [CXX], [ 4238*44704f69SBart Van Assche # C++ specific cases for pic, static, wl, etc. 4239*44704f69SBart Van Assche if test yes = "$GXX"; then 4240*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4241*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4242*44704f69SBart Van Assche 4243*44704f69SBart Van Assche case $host_os in 4244*44704f69SBart Van Assche aix*) 4245*44704f69SBart Van Assche # All AIX code is PIC. 4246*44704f69SBart Van Assche if test ia64 = "$host_cpu"; then 4247*44704f69SBart Van Assche # AIX 5 now supports IA64 processor 4248*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4249*44704f69SBart Van Assche fi 4250*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4251*44704f69SBart Van Assche ;; 4252*44704f69SBart Van Assche 4253*44704f69SBart Van Assche amigaos*) 4254*44704f69SBart Van Assche case $host_cpu in 4255*44704f69SBart Van Assche powerpc) 4256*44704f69SBart Van Assche # see comment about AmigaOS4 .so support 4257*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4258*44704f69SBart Van Assche ;; 4259*44704f69SBart Van Assche m68k) 4260*44704f69SBart Van Assche # FIXME: we need at least 68020 code to build shared libraries, but 4261*44704f69SBart Van Assche # adding the '-m68020' flag to GCC prevents building anything better, 4262*44704f69SBart Van Assche # like '-m68040'. 4263*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4264*44704f69SBart Van Assche ;; 4265*44704f69SBart Van Assche esac 4266*44704f69SBart Van Assche ;; 4267*44704f69SBart Van Assche 4268*44704f69SBart Van Assche beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4269*44704f69SBart Van Assche # PIC is the default for these OSes. 4270*44704f69SBart Van Assche ;; 4271*44704f69SBart Van Assche mingw* | cygwin* | os2* | pw32* | cegcc*) 4272*44704f69SBart Van Assche # This hack is so that the source file can tell whether it is being 4273*44704f69SBart Van Assche # built for inclusion in a dll (and should export symbols for example). 4274*44704f69SBart Van Assche # Although the cygwin gcc ignores -fPIC, still need this for old-style 4275*44704f69SBart Van Assche # (--disable-auto-import) libraries 4276*44704f69SBart Van Assche m4_if([$1], [GCJ], [], 4277*44704f69SBart Van Assche [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4278*44704f69SBart Van Assche case $host_os in 4279*44704f69SBart Van Assche os2*) 4280*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4281*44704f69SBart Van Assche ;; 4282*44704f69SBart Van Assche esac 4283*44704f69SBart Van Assche ;; 4284*44704f69SBart Van Assche darwin* | rhapsody*) 4285*44704f69SBart Van Assche # PIC is the default on this platform 4286*44704f69SBart Van Assche # Common symbols not allowed in MH_DYLIB files 4287*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4288*44704f69SBart Van Assche ;; 4289*44704f69SBart Van Assche *djgpp*) 4290*44704f69SBart Van Assche # DJGPP does not support shared libraries at all 4291*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4292*44704f69SBart Van Assche ;; 4293*44704f69SBart Van Assche haiku*) 4294*44704f69SBart Van Assche # PIC is the default for Haiku. 4295*44704f69SBart Van Assche # The "-static" flag exists, but is broken. 4296*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)= 4297*44704f69SBart Van Assche ;; 4298*44704f69SBart Van Assche interix[[3-9]]*) 4299*44704f69SBart Van Assche # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4300*44704f69SBart Van Assche # Instead, we relocate shared libraries at runtime. 4301*44704f69SBart Van Assche ;; 4302*44704f69SBart Van Assche sysv4*MP*) 4303*44704f69SBart Van Assche if test -d /usr/nec; then 4304*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4305*44704f69SBart Van Assche fi 4306*44704f69SBart Van Assche ;; 4307*44704f69SBart Van Assche hpux*) 4308*44704f69SBart Van Assche # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4309*44704f69SBart Van Assche # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4310*44704f69SBart Van Assche # sets the default TLS model and affects inlining. 4311*44704f69SBart Van Assche case $host_cpu in 4312*44704f69SBart Van Assche hppa*64*) 4313*44704f69SBart Van Assche ;; 4314*44704f69SBart Van Assche *) 4315*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4316*44704f69SBart Van Assche ;; 4317*44704f69SBart Van Assche esac 4318*44704f69SBart Van Assche ;; 4319*44704f69SBart Van Assche *qnx* | *nto*) 4320*44704f69SBart Van Assche # QNX uses GNU C++, but need to define -shared option too, otherwise 4321*44704f69SBart Van Assche # it will coredump. 4322*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4323*44704f69SBart Van Assche ;; 4324*44704f69SBart Van Assche *) 4325*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4326*44704f69SBart Van Assche ;; 4327*44704f69SBart Van Assche esac 4328*44704f69SBart Van Assche else 4329*44704f69SBart Van Assche case $host_os in 4330*44704f69SBart Van Assche aix[[4-9]]*) 4331*44704f69SBart Van Assche # All AIX code is PIC. 4332*44704f69SBart Van Assche if test ia64 = "$host_cpu"; then 4333*44704f69SBart Van Assche # AIX 5 now supports IA64 processor 4334*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4335*44704f69SBart Van Assche else 4336*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4337*44704f69SBart Van Assche fi 4338*44704f69SBart Van Assche ;; 4339*44704f69SBart Van Assche chorus*) 4340*44704f69SBart Van Assche case $cc_basename in 4341*44704f69SBart Van Assche cxch68*) 4342*44704f69SBart Van Assche # Green Hills C++ Compiler 4343*44704f69SBart Van Assche # _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" 4344*44704f69SBart Van Assche ;; 4345*44704f69SBart Van Assche esac 4346*44704f69SBart Van Assche ;; 4347*44704f69SBart Van Assche mingw* | cygwin* | os2* | pw32* | cegcc*) 4348*44704f69SBart Van Assche # This hack is so that the source file can tell whether it is being 4349*44704f69SBart Van Assche # built for inclusion in a dll (and should export symbols for example). 4350*44704f69SBart Van Assche m4_if([$1], [GCJ], [], 4351*44704f69SBart Van Assche [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4352*44704f69SBart Van Assche ;; 4353*44704f69SBart Van Assche dgux*) 4354*44704f69SBart Van Assche case $cc_basename in 4355*44704f69SBart Van Assche ec++*) 4356*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4357*44704f69SBart Van Assche ;; 4358*44704f69SBart Van Assche ghcx*) 4359*44704f69SBart Van Assche # Green Hills C++ Compiler 4360*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4361*44704f69SBart Van Assche ;; 4362*44704f69SBart Van Assche *) 4363*44704f69SBart Van Assche ;; 4364*44704f69SBart Van Assche esac 4365*44704f69SBart Van Assche ;; 4366*44704f69SBart Van Assche freebsd* | dragonfly* | midnightbsd*) 4367*44704f69SBart Van Assche # FreeBSD uses GNU C++ 4368*44704f69SBart Van Assche ;; 4369*44704f69SBart Van Assche hpux9* | hpux10* | hpux11*) 4370*44704f69SBart Van Assche case $cc_basename in 4371*44704f69SBart Van Assche CC*) 4372*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4373*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4374*44704f69SBart Van Assche if test ia64 != "$host_cpu"; then 4375*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4376*44704f69SBart Van Assche fi 4377*44704f69SBart Van Assche ;; 4378*44704f69SBart Van Assche aCC*) 4379*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4380*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4381*44704f69SBart Van Assche case $host_cpu in 4382*44704f69SBart Van Assche hppa*64*|ia64*) 4383*44704f69SBart Van Assche # +Z the default 4384*44704f69SBart Van Assche ;; 4385*44704f69SBart Van Assche *) 4386*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4387*44704f69SBart Van Assche ;; 4388*44704f69SBart Van Assche esac 4389*44704f69SBart Van Assche ;; 4390*44704f69SBart Van Assche *) 4391*44704f69SBart Van Assche ;; 4392*44704f69SBart Van Assche esac 4393*44704f69SBart Van Assche ;; 4394*44704f69SBart Van Assche interix*) 4395*44704f69SBart Van Assche # This is c89, which is MS Visual C++ (no shared libs) 4396*44704f69SBart Van Assche # Anyone wants to do a port? 4397*44704f69SBart Van Assche ;; 4398*44704f69SBart Van Assche irix5* | irix6* | nonstopux*) 4399*44704f69SBart Van Assche case $cc_basename in 4400*44704f69SBart Van Assche CC*) 4401*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4402*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4403*44704f69SBart Van Assche # CC pic flag -KPIC is the default. 4404*44704f69SBart Van Assche ;; 4405*44704f69SBart Van Assche *) 4406*44704f69SBart Van Assche ;; 4407*44704f69SBart Van Assche esac 4408*44704f69SBart Van Assche ;; 4409*44704f69SBart Van Assche linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4410*44704f69SBart Van Assche case $cc_basename in 4411*44704f69SBart Van Assche KCC*) 4412*44704f69SBart Van Assche # KAI C++ Compiler 4413*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4414*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4415*44704f69SBart Van Assche ;; 4416*44704f69SBart Van Assche ecpc* ) 4417*44704f69SBart Van Assche # old Intel C++ for x86_64, which still supported -KPIC. 4418*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4419*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4420*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4421*44704f69SBart Van Assche ;; 4422*44704f69SBart Van Assche icpc* ) 4423*44704f69SBart Van Assche # Intel C++, used to be incompatible with GCC. 4424*44704f69SBart Van Assche # ICC 10 doesn't accept -KPIC any more. 4425*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4426*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4427*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4428*44704f69SBart Van Assche ;; 4429*44704f69SBart Van Assche pgCC* | pgcpp*) 4430*44704f69SBart Van Assche # Portland Group C++ compiler 4431*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4432*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4433*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4434*44704f69SBart Van Assche ;; 4435*44704f69SBart Van Assche cxx*) 4436*44704f69SBart Van Assche # Compaq C++ 4437*44704f69SBart Van Assche # Make sure the PIC flag is empty. It appears that all Alpha 4438*44704f69SBart Van Assche # Linux and Compaq Tru64 Unix objects are PIC. 4439*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4440*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4441*44704f69SBart Van Assche ;; 4442*44704f69SBart Van Assche xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4443*44704f69SBart Van Assche # IBM XL 8.0, 9.0 on PPC and BlueGene 4444*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4445*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4446*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4447*44704f69SBart Van Assche ;; 4448*44704f69SBart Van Assche *) 4449*44704f69SBart Van Assche case `$CC -V 2>&1 | $SED 5q` in 4450*44704f69SBart Van Assche *Sun\ C*) 4451*44704f69SBart Van Assche # Sun C++ 5.9 4452*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4453*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4454*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4455*44704f69SBart Van Assche ;; 4456*44704f69SBart Van Assche esac 4457*44704f69SBart Van Assche ;; 4458*44704f69SBart Van Assche esac 4459*44704f69SBart Van Assche ;; 4460*44704f69SBart Van Assche lynxos*) 4461*44704f69SBart Van Assche ;; 4462*44704f69SBart Van Assche m88k*) 4463*44704f69SBart Van Assche ;; 4464*44704f69SBart Van Assche mvs*) 4465*44704f69SBart Van Assche case $cc_basename in 4466*44704f69SBart Van Assche cxx*) 4467*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4468*44704f69SBart Van Assche ;; 4469*44704f69SBart Van Assche *) 4470*44704f69SBart Van Assche ;; 4471*44704f69SBart Van Assche esac 4472*44704f69SBart Van Assche ;; 4473*44704f69SBart Van Assche netbsd* | netbsdelf*-gnu) 4474*44704f69SBart Van Assche ;; 4475*44704f69SBart Van Assche *qnx* | *nto*) 4476*44704f69SBart Van Assche # QNX uses GNU C++, but need to define -shared option too, otherwise 4477*44704f69SBart Van Assche # it will coredump. 4478*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4479*44704f69SBart Van Assche ;; 4480*44704f69SBart Van Assche osf3* | osf4* | osf5*) 4481*44704f69SBart Van Assche case $cc_basename in 4482*44704f69SBart Van Assche KCC*) 4483*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4484*44704f69SBart Van Assche ;; 4485*44704f69SBart Van Assche RCC*) 4486*44704f69SBart Van Assche # Rational C++ 2.4.1 4487*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4488*44704f69SBart Van Assche ;; 4489*44704f69SBart Van Assche cxx*) 4490*44704f69SBart Van Assche # Digital/Compaq C++ 4491*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4492*44704f69SBart Van Assche # Make sure the PIC flag is empty. It appears that all Alpha 4493*44704f69SBart Van Assche # Linux and Compaq Tru64 Unix objects are PIC. 4494*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4495*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4496*44704f69SBart Van Assche ;; 4497*44704f69SBart Van Assche *) 4498*44704f69SBart Van Assche ;; 4499*44704f69SBart Van Assche esac 4500*44704f69SBart Van Assche ;; 4501*44704f69SBart Van Assche psos*) 4502*44704f69SBart Van Assche ;; 4503*44704f69SBart Van Assche solaris*) 4504*44704f69SBart Van Assche case $cc_basename in 4505*44704f69SBart Van Assche CC* | sunCC*) 4506*44704f69SBart Van Assche # Sun C++ 4.2, 5.x and Centerline C++ 4507*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4508*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4509*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4510*44704f69SBart Van Assche ;; 4511*44704f69SBart Van Assche gcx*) 4512*44704f69SBart Van Assche # Green Hills C++ Compiler 4513*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4514*44704f69SBart Van Assche ;; 4515*44704f69SBart Van Assche *) 4516*44704f69SBart Van Assche ;; 4517*44704f69SBart Van Assche esac 4518*44704f69SBart Van Assche ;; 4519*44704f69SBart Van Assche sunos4*) 4520*44704f69SBart Van Assche case $cc_basename in 4521*44704f69SBart Van Assche CC*) 4522*44704f69SBart Van Assche # Sun C++ 4.x 4523*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4524*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4525*44704f69SBart Van Assche ;; 4526*44704f69SBart Van Assche lcc*) 4527*44704f69SBart Van Assche # Lucid 4528*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4529*44704f69SBart Van Assche ;; 4530*44704f69SBart Van Assche *) 4531*44704f69SBart Van Assche ;; 4532*44704f69SBart Van Assche esac 4533*44704f69SBart Van Assche ;; 4534*44704f69SBart Van Assche sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4535*44704f69SBart Van Assche case $cc_basename in 4536*44704f69SBart Van Assche CC*) 4537*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4538*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4539*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4540*44704f69SBart Van Assche ;; 4541*44704f69SBart Van Assche esac 4542*44704f69SBart Van Assche ;; 4543*44704f69SBart Van Assche tandem*) 4544*44704f69SBart Van Assche case $cc_basename in 4545*44704f69SBart Van Assche NCC*) 4546*44704f69SBart Van Assche # NonStop-UX NCC 3.20 4547*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4548*44704f69SBart Van Assche ;; 4549*44704f69SBart Van Assche *) 4550*44704f69SBart Van Assche ;; 4551*44704f69SBart Van Assche esac 4552*44704f69SBart Van Assche ;; 4553*44704f69SBart Van Assche vxworks*) 4554*44704f69SBart Van Assche ;; 4555*44704f69SBart Van Assche *) 4556*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4557*44704f69SBart Van Assche ;; 4558*44704f69SBart Van Assche esac 4559*44704f69SBart Van Assche fi 4560*44704f69SBart Van Assche], 4561*44704f69SBart Van Assche[ 4562*44704f69SBart Van Assche if test yes = "$GCC"; then 4563*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4564*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4565*44704f69SBart Van Assche 4566*44704f69SBart Van Assche case $host_os in 4567*44704f69SBart Van Assche aix*) 4568*44704f69SBart Van Assche # All AIX code is PIC. 4569*44704f69SBart Van Assche if test ia64 = "$host_cpu"; then 4570*44704f69SBart Van Assche # AIX 5 now supports IA64 processor 4571*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4572*44704f69SBart Van Assche fi 4573*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4574*44704f69SBart Van Assche ;; 4575*44704f69SBart Van Assche 4576*44704f69SBart Van Assche amigaos*) 4577*44704f69SBart Van Assche case $host_cpu in 4578*44704f69SBart Van Assche powerpc) 4579*44704f69SBart Van Assche # see comment about AmigaOS4 .so support 4580*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4581*44704f69SBart Van Assche ;; 4582*44704f69SBart Van Assche m68k) 4583*44704f69SBart Van Assche # FIXME: we need at least 68020 code to build shared libraries, but 4584*44704f69SBart Van Assche # adding the '-m68020' flag to GCC prevents building anything better, 4585*44704f69SBart Van Assche # like '-m68040'. 4586*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4587*44704f69SBart Van Assche ;; 4588*44704f69SBart Van Assche esac 4589*44704f69SBart Van Assche ;; 4590*44704f69SBart Van Assche 4591*44704f69SBart Van Assche beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4592*44704f69SBart Van Assche # PIC is the default for these OSes. 4593*44704f69SBart Van Assche ;; 4594*44704f69SBart Van Assche 4595*44704f69SBart Van Assche mingw* | cygwin* | pw32* | os2* | cegcc*) 4596*44704f69SBart Van Assche # This hack is so that the source file can tell whether it is being 4597*44704f69SBart Van Assche # built for inclusion in a dll (and should export symbols for example). 4598*44704f69SBart Van Assche # Although the cygwin gcc ignores -fPIC, still need this for old-style 4599*44704f69SBart Van Assche # (--disable-auto-import) libraries 4600*44704f69SBart Van Assche m4_if([$1], [GCJ], [], 4601*44704f69SBart Van Assche [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4602*44704f69SBart Van Assche case $host_os in 4603*44704f69SBart Van Assche os2*) 4604*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4605*44704f69SBart Van Assche ;; 4606*44704f69SBart Van Assche esac 4607*44704f69SBart Van Assche ;; 4608*44704f69SBart Van Assche 4609*44704f69SBart Van Assche darwin* | rhapsody*) 4610*44704f69SBart Van Assche # PIC is the default on this platform 4611*44704f69SBart Van Assche # Common symbols not allowed in MH_DYLIB files 4612*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4613*44704f69SBart Van Assche ;; 4614*44704f69SBart Van Assche 4615*44704f69SBart Van Assche haiku*) 4616*44704f69SBart Van Assche # PIC is the default for Haiku. 4617*44704f69SBart Van Assche # The "-static" flag exists, but is broken. 4618*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)= 4619*44704f69SBart Van Assche ;; 4620*44704f69SBart Van Assche 4621*44704f69SBart Van Assche hpux*) 4622*44704f69SBart Van Assche # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4623*44704f69SBart Van Assche # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4624*44704f69SBart Van Assche # sets the default TLS model and affects inlining. 4625*44704f69SBart Van Assche case $host_cpu in 4626*44704f69SBart Van Assche hppa*64*) 4627*44704f69SBart Van Assche # +Z the default 4628*44704f69SBart Van Assche ;; 4629*44704f69SBart Van Assche *) 4630*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4631*44704f69SBart Van Assche ;; 4632*44704f69SBart Van Assche esac 4633*44704f69SBart Van Assche ;; 4634*44704f69SBart Van Assche 4635*44704f69SBart Van Assche interix[[3-9]]*) 4636*44704f69SBart Van Assche # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4637*44704f69SBart Van Assche # Instead, we relocate shared libraries at runtime. 4638*44704f69SBart Van Assche ;; 4639*44704f69SBart Van Assche 4640*44704f69SBart Van Assche msdosdjgpp*) 4641*44704f69SBart Van Assche # Just because we use GCC doesn't mean we suddenly get shared libraries 4642*44704f69SBart Van Assche # on systems that don't support them. 4643*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4644*44704f69SBart Van Assche enable_shared=no 4645*44704f69SBart Van Assche ;; 4646*44704f69SBart Van Assche 4647*44704f69SBart Van Assche *nto* | *qnx*) 4648*44704f69SBart Van Assche # QNX uses GNU C++, but need to define -shared option too, otherwise 4649*44704f69SBart Van Assche # it will coredump. 4650*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4651*44704f69SBart Van Assche ;; 4652*44704f69SBart Van Assche 4653*44704f69SBart Van Assche sysv4*MP*) 4654*44704f69SBart Van Assche if test -d /usr/nec; then 4655*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4656*44704f69SBart Van Assche fi 4657*44704f69SBart Van Assche ;; 4658*44704f69SBart Van Assche 4659*44704f69SBart Van Assche *) 4660*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4661*44704f69SBart Van Assche ;; 4662*44704f69SBart Van Assche esac 4663*44704f69SBart Van Assche 4664*44704f69SBart Van Assche case $cc_basename in 4665*44704f69SBart Van Assche nvcc*) # Cuda Compiler Driver 2.2 4666*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4667*44704f69SBart Van Assche if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4668*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4669*44704f69SBart Van Assche fi 4670*44704f69SBart Van Assche ;; 4671*44704f69SBart Van Assche esac 4672*44704f69SBart Van Assche else 4673*44704f69SBart Van Assche # PORTME Check for flag to pass linker flags through the system compiler. 4674*44704f69SBart Van Assche case $host_os in 4675*44704f69SBart Van Assche aix*) 4676*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4677*44704f69SBart Van Assche if test ia64 = "$host_cpu"; then 4678*44704f69SBart Van Assche # AIX 5 now supports IA64 processor 4679*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4680*44704f69SBart Van Assche else 4681*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4682*44704f69SBart Van Assche fi 4683*44704f69SBart Van Assche ;; 4684*44704f69SBart Van Assche 4685*44704f69SBart Van Assche darwin* | rhapsody*) 4686*44704f69SBart Van Assche # PIC is the default on this platform 4687*44704f69SBart Van Assche # Common symbols not allowed in MH_DYLIB files 4688*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4689*44704f69SBart Van Assche case $cc_basename in 4690*44704f69SBart Van Assche nagfor*) 4691*44704f69SBart Van Assche # NAG Fortran compiler 4692*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4693*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4694*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4695*44704f69SBart Van Assche ;; 4696*44704f69SBart Van Assche esac 4697*44704f69SBart Van Assche ;; 4698*44704f69SBart Van Assche 4699*44704f69SBart Van Assche mingw* | cygwin* | pw32* | os2* | cegcc*) 4700*44704f69SBart Van Assche # This hack is so that the source file can tell whether it is being 4701*44704f69SBart Van Assche # built for inclusion in a dll (and should export symbols for example). 4702*44704f69SBart Van Assche m4_if([$1], [GCJ], [], 4703*44704f69SBart Van Assche [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4704*44704f69SBart Van Assche case $host_os in 4705*44704f69SBart Van Assche os2*) 4706*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4707*44704f69SBart Van Assche ;; 4708*44704f69SBart Van Assche esac 4709*44704f69SBart Van Assche ;; 4710*44704f69SBart Van Assche 4711*44704f69SBart Van Assche hpux9* | hpux10* | hpux11*) 4712*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4713*44704f69SBart Van Assche # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4714*44704f69SBart Van Assche # not for PA HP-UX. 4715*44704f69SBart Van Assche case $host_cpu in 4716*44704f69SBart Van Assche hppa*64*|ia64*) 4717*44704f69SBart Van Assche # +Z the default 4718*44704f69SBart Van Assche ;; 4719*44704f69SBart Van Assche *) 4720*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4721*44704f69SBart Van Assche ;; 4722*44704f69SBart Van Assche esac 4723*44704f69SBart Van Assche # Is there a better lt_prog_compiler_static that works with the bundled CC? 4724*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4725*44704f69SBart Van Assche ;; 4726*44704f69SBart Van Assche 4727*44704f69SBart Van Assche irix5* | irix6* | nonstopux*) 4728*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4729*44704f69SBart Van Assche # PIC (with -KPIC) is the default. 4730*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4731*44704f69SBart Van Assche ;; 4732*44704f69SBart Van Assche 4733*44704f69SBart Van Assche linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4734*44704f69SBart Van Assche case $cc_basename in 4735*44704f69SBart Van Assche # old Intel for x86_64, which still supported -KPIC. 4736*44704f69SBart Van Assche ecc*) 4737*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4738*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4739*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4740*44704f69SBart Van Assche ;; 4741*44704f69SBart Van Assche # flang / f18. f95 an alias for gfortran or flang on Debian 4742*44704f69SBart Van Assche flang* | f18* | f95*) 4743*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4744*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4745*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4746*44704f69SBart Van Assche ;; 4747*44704f69SBart Van Assche # icc used to be incompatible with GCC. 4748*44704f69SBart Van Assche # ICC 10 doesn't accept -KPIC any more. 4749*44704f69SBart Van Assche icc* | ifort*) 4750*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4751*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4752*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4753*44704f69SBart Van Assche ;; 4754*44704f69SBart Van Assche # Lahey Fortran 8.1. 4755*44704f69SBart Van Assche lf95*) 4756*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4757*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4758*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4759*44704f69SBart Van Assche ;; 4760*44704f69SBart Van Assche nagfor*) 4761*44704f69SBart Van Assche # NAG Fortran compiler 4762*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4763*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4764*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4765*44704f69SBart Van Assche ;; 4766*44704f69SBart Van Assche tcc*) 4767*44704f69SBart Van Assche # Fabrice Bellard et al's Tiny C Compiler 4768*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4769*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4770*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4771*44704f69SBart Van Assche ;; 4772*44704f69SBart Van Assche pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4773*44704f69SBart Van Assche # Portland Group compilers (*not* the Pentium gcc compiler, 4774*44704f69SBart Van Assche # which looks to be a dead project) 4775*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4776*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4777*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4778*44704f69SBart Van Assche ;; 4779*44704f69SBart Van Assche ccc*) 4780*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4781*44704f69SBart Van Assche # All Alpha code is PIC. 4782*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4783*44704f69SBart Van Assche ;; 4784*44704f69SBart Van Assche xl* | bgxl* | bgf* | mpixl*) 4785*44704f69SBart Van Assche # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4786*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4787*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4788*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4789*44704f69SBart Van Assche ;; 4790*44704f69SBart Van Assche *) 4791*44704f69SBart Van Assche case `$CC -V 2>&1 | $SED 5q` in 4792*44704f69SBart Van Assche *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4793*44704f69SBart Van Assche # Sun Fortran 8.3 passes all unrecognized flags to the linker 4794*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4795*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4796*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4797*44704f69SBart Van Assche ;; 4798*44704f69SBart Van Assche *Sun\ F* | *Sun*Fortran*) 4799*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4800*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4801*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4802*44704f69SBart Van Assche ;; 4803*44704f69SBart Van Assche *Sun\ C*) 4804*44704f69SBart Van Assche # Sun C 5.9 4805*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4806*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4807*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4808*44704f69SBart Van Assche ;; 4809*44704f69SBart Van Assche *Intel*\ [[CF]]*Compiler*) 4810*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4811*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4812*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4813*44704f69SBart Van Assche ;; 4814*44704f69SBart Van Assche *Portland\ Group*) 4815*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4816*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4817*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4818*44704f69SBart Van Assche ;; 4819*44704f69SBart Van Assche esac 4820*44704f69SBart Van Assche ;; 4821*44704f69SBart Van Assche esac 4822*44704f69SBart Van Assche ;; 4823*44704f69SBart Van Assche 4824*44704f69SBart Van Assche newsos6) 4825*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4826*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4827*44704f69SBart Van Assche ;; 4828*44704f69SBart Van Assche 4829*44704f69SBart Van Assche *nto* | *qnx*) 4830*44704f69SBart Van Assche # QNX uses GNU C++, but need to define -shared option too, otherwise 4831*44704f69SBart Van Assche # it will coredump. 4832*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4833*44704f69SBart Van Assche ;; 4834*44704f69SBart Van Assche 4835*44704f69SBart Van Assche osf3* | osf4* | osf5*) 4836*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4837*44704f69SBart Van Assche # All OSF/1 code is PIC. 4838*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4839*44704f69SBart Van Assche ;; 4840*44704f69SBart Van Assche 4841*44704f69SBart Van Assche rdos*) 4842*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4843*44704f69SBart Van Assche ;; 4844*44704f69SBart Van Assche 4845*44704f69SBart Van Assche solaris*) 4846*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4847*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4848*44704f69SBart Van Assche case $cc_basename in 4849*44704f69SBart Van Assche f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4850*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4851*44704f69SBart Van Assche *) 4852*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4853*44704f69SBart Van Assche esac 4854*44704f69SBart Van Assche ;; 4855*44704f69SBart Van Assche 4856*44704f69SBart Van Assche sunos4*) 4857*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4858*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4859*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4860*44704f69SBart Van Assche ;; 4861*44704f69SBart Van Assche 4862*44704f69SBart Van Assche sysv4 | sysv4.2uw2* | sysv4.3*) 4863*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4864*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4865*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4866*44704f69SBart Van Assche ;; 4867*44704f69SBart Van Assche 4868*44704f69SBart Van Assche sysv4*MP*) 4869*44704f69SBart Van Assche if test -d /usr/nec; then 4870*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4871*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4872*44704f69SBart Van Assche fi 4873*44704f69SBart Van Assche ;; 4874*44704f69SBart Van Assche 4875*44704f69SBart Van Assche sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4876*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4877*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4878*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4879*44704f69SBart Van Assche ;; 4880*44704f69SBart Van Assche 4881*44704f69SBart Van Assche unicos*) 4882*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4883*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4884*44704f69SBart Van Assche ;; 4885*44704f69SBart Van Assche 4886*44704f69SBart Van Assche uts4*) 4887*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4888*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4889*44704f69SBart Van Assche ;; 4890*44704f69SBart Van Assche 4891*44704f69SBart Van Assche *) 4892*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4893*44704f69SBart Van Assche ;; 4894*44704f69SBart Van Assche esac 4895*44704f69SBart Van Assche fi 4896*44704f69SBart Van Assche]) 4897*44704f69SBart Van Asschecase $host_os in 4898*44704f69SBart Van Assche # For platforms that do not support PIC, -DPIC is meaningless: 4899*44704f69SBart Van Assche *djgpp*) 4900*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4901*44704f69SBart Van Assche ;; 4902*44704f69SBart Van Assche *) 4903*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4904*44704f69SBart Van Assche ;; 4905*44704f69SBart Van Asscheesac 4906*44704f69SBart Van Assche 4907*44704f69SBart Van AsscheAC_CACHE_CHECK([for $compiler option to produce PIC], 4908*44704f69SBart Van Assche [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4909*44704f69SBart Van Assche [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4910*44704f69SBart Van Assche_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4911*44704f69SBart Van Assche 4912*44704f69SBart Van Assche# 4913*44704f69SBart Van Assche# Check to make sure the PIC flag actually works. 4914*44704f69SBart Van Assche# 4915*44704f69SBart Van Asscheif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4916*44704f69SBart Van Assche _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4917*44704f69SBart Van Assche [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4918*44704f69SBart Van Assche [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4919*44704f69SBart Van Assche [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4920*44704f69SBart Van Assche "" | " "*) ;; 4921*44704f69SBart Van Assche *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4922*44704f69SBart Van Assche esac], 4923*44704f69SBart Van Assche [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4924*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4925*44704f69SBart Van Asschefi 4926*44704f69SBart Van Assche_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4927*44704f69SBart Van Assche [Additional compiler flags for building library objects]) 4928*44704f69SBart Van Assche 4929*44704f69SBart Van Assche_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4930*44704f69SBart Van Assche [How to pass a linker flag through the compiler]) 4931*44704f69SBart Van Assche# 4932*44704f69SBart Van Assche# Check to make sure the static flag actually works. 4933*44704f69SBart Van Assche# 4934*44704f69SBart Van Asschewl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4935*44704f69SBart Van Assche_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4936*44704f69SBart Van Assche _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4937*44704f69SBart Van Assche $lt_tmp_static_flag, 4938*44704f69SBart Van Assche [], 4939*44704f69SBart Van Assche [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4940*44704f69SBart Van Assche_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4941*44704f69SBart Van Assche [Compiler flag to prevent dynamic linking]) 4942*44704f69SBart Van Assche])# _LT_COMPILER_PIC 4943*44704f69SBart Van Assche 4944*44704f69SBart Van Assche 4945*44704f69SBart Van Assche# _LT_LINKER_SHLIBS([TAGNAME]) 4946*44704f69SBart Van Assche# ---------------------------- 4947*44704f69SBart Van Assche# See if the linker supports building shared libraries. 4948*44704f69SBart Van Asschem4_defun([_LT_LINKER_SHLIBS], 4949*44704f69SBart Van Assche[AC_REQUIRE([LT_PATH_LD])dnl 4950*44704f69SBart Van AsscheAC_REQUIRE([LT_PATH_NM])dnl 4951*44704f69SBart Van Asschem4_require([_LT_PATH_MANIFEST_TOOL])dnl 4952*44704f69SBart Van Asschem4_require([_LT_FILEUTILS_DEFAULTS])dnl 4953*44704f69SBart Van Asschem4_require([_LT_DECL_EGREP])dnl 4954*44704f69SBart Van Asschem4_require([_LT_DECL_SED])dnl 4955*44704f69SBart Van Asschem4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4956*44704f69SBart Van Asschem4_require([_LT_TAG_COMPILER])dnl 4957*44704f69SBart Van AsscheAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4958*44704f69SBart Van Asschem4_if([$1], [CXX], [ 4959*44704f69SBart Van Assche _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4960*44704f69SBart Van Assche _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4961*44704f69SBart Van Assche case $host_os in 4962*44704f69SBart Van Assche aix[[4-9]]*) 4963*44704f69SBart Van Assche # If we're using GNU nm, then we don't want the "-C" option. 4964*44704f69SBart Van Assche # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4965*44704f69SBart Van Assche # Without the "-l" option, or with the "-B" option, AIX nm treats 4966*44704f69SBart Van Assche # weak defined symbols like other global defined symbols, whereas 4967*44704f69SBart Van Assche # GNU nm marks them as "W". 4968*44704f69SBart Van Assche # While the 'weak' keyword is ignored in the Export File, we need 4969*44704f69SBart Van Assche # it in the Import File for the 'aix-soname' feature, so we have 4970*44704f69SBart Van Assche # to replace the "-B" option with "-P" for AIX nm. 4971*44704f69SBart Van Assche if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4972*44704f69SBart Van Assche _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' 4973*44704f69SBart Van Assche else 4974*44704f69SBart Van Assche _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' 4975*44704f69SBart Van Assche fi 4976*44704f69SBart Van Assche ;; 4977*44704f69SBart Van Assche pw32*) 4978*44704f69SBart Van Assche _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4979*44704f69SBart Van Assche ;; 4980*44704f69SBart Van Assche cygwin* | mingw* | cegcc*) 4981*44704f69SBart Van Assche case $cc_basename in 4982*44704f69SBart Van Assche cl* | icl*) 4983*44704f69SBart Van Assche _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4984*44704f69SBart Van Assche ;; 4985*44704f69SBart Van Assche *) 4986*44704f69SBart Van Assche _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' 4987*44704f69SBart Van Assche _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4988*44704f69SBart Van Assche ;; 4989*44704f69SBart Van Assche esac 4990*44704f69SBart Van Assche ;; 4991*44704f69SBart Van Assche linux* | k*bsd*-gnu | gnu*) 4992*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=no 4993*44704f69SBart Van Assche ;; 4994*44704f69SBart Van Assche *) 4995*44704f69SBart Van Assche _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4996*44704f69SBart Van Assche ;; 4997*44704f69SBart Van Assche esac 4998*44704f69SBart Van Assche], [ 4999*44704f69SBart Van Assche runpath_var= 5000*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)= 5001*44704f69SBart Van Assche _LT_TAGVAR(always_export_symbols, $1)=no 5002*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)= 5003*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)= 5004*44704f69SBart Van Assche _LT_TAGVAR(compiler_needs_object, $1)=no 5005*44704f69SBart Van Assche _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5006*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5007*44704f69SBart Van Assche _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 5008*44704f69SBart Van Assche _LT_TAGVAR(hardcode_automatic, $1)=no 5009*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=no 5010*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5011*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5012*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)= 5013*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=no 5014*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5015*44704f69SBart Van Assche _LT_TAGVAR(inherit_rpath, $1)=no 5016*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=unknown 5017*44704f69SBart Van Assche _LT_TAGVAR(module_cmds, $1)= 5018*44704f69SBart Van Assche _LT_TAGVAR(module_expsym_cmds, $1)= 5019*44704f69SBart Van Assche _LT_TAGVAR(old_archive_from_new_cmds, $1)= 5020*44704f69SBart Van Assche _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 5021*44704f69SBart Van Assche _LT_TAGVAR(thread_safe_flag_spec, $1)= 5022*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)= 5023*44704f69SBart Van Assche # include_expsyms should be a list of space-separated symbols to be *always* 5024*44704f69SBart Van Assche # included in the symbol list 5025*44704f69SBart Van Assche _LT_TAGVAR(include_expsyms, $1)= 5026*44704f69SBart Van Assche # exclude_expsyms can be an extended regexp of symbols to exclude 5027*44704f69SBart Van Assche # it will be wrapped by ' (' and ')$', so one must not match beginning or 5028*44704f69SBart Van Assche # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5029*44704f69SBart Van Assche # as well as any symbol that contains 'd'. 5030*44704f69SBart Van Assche _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5031*44704f69SBart Van Assche # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5032*44704f69SBart Van Assche # platforms (ab)use it in PIC code, but their linkers get confused if 5033*44704f69SBart Van Assche # the symbol is explicitly referenced. Since portable code cannot 5034*44704f69SBart Van Assche # rely on this symbol name, it's probably fine to never include it in 5035*44704f69SBart Van Assche # preloaded symbol tables. 5036*44704f69SBart Van Assche # Exclude shared library initialization/finalization symbols. 5037*44704f69SBart Van Asschednl Note also adjust exclude_expsyms for C++ above. 5038*44704f69SBart Van Assche extract_expsyms_cmds= 5039*44704f69SBart Van Assche 5040*44704f69SBart Van Assche case $host_os in 5041*44704f69SBart Van Assche cygwin* | mingw* | pw32* | cegcc*) 5042*44704f69SBart Van Assche # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 5043*44704f69SBart Van Assche # When not using gcc, we currently assume that we are using 5044*44704f69SBart Van Assche # Microsoft Visual C++ or Intel C++ Compiler. 5045*44704f69SBart Van Assche if test yes != "$GCC"; then 5046*44704f69SBart Van Assche with_gnu_ld=no 5047*44704f69SBart Van Assche fi 5048*44704f69SBart Van Assche ;; 5049*44704f69SBart Van Assche interix*) 5050*44704f69SBart Van Assche # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 5051*44704f69SBart Van Assche with_gnu_ld=yes 5052*44704f69SBart Van Assche ;; 5053*44704f69SBart Van Assche openbsd* | bitrig*) 5054*44704f69SBart Van Assche with_gnu_ld=no 5055*44704f69SBart Van Assche ;; 5056*44704f69SBart Van Assche linux* | k*bsd*-gnu | gnu*) 5057*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=no 5058*44704f69SBart Van Assche ;; 5059*44704f69SBart Van Assche esac 5060*44704f69SBart Van Assche 5061*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=yes 5062*44704f69SBart Van Assche 5063*44704f69SBart Van Assche # On some targets, GNU ld is compatible enough with the native linker 5064*44704f69SBart Van Assche # that we're better off using the native interface for both. 5065*44704f69SBart Van Assche lt_use_gnu_ld_interface=no 5066*44704f69SBart Van Assche if test yes = "$with_gnu_ld"; then 5067*44704f69SBart Van Assche case $host_os in 5068*44704f69SBart Van Assche aix*) 5069*44704f69SBart Van Assche # The AIX port of GNU ld has always aspired to compatibility 5070*44704f69SBart Van Assche # with the native linker. However, as the warning in the GNU ld 5071*44704f69SBart Van Assche # block says, versions before 2.19.5* couldn't really create working 5072*44704f69SBart Van Assche # shared libraries, regardless of the interface used. 5073*44704f69SBart Van Assche case `$LD -v 2>&1` in 5074*44704f69SBart Van Assche *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5075*44704f69SBart Van Assche *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5076*44704f69SBart Van Assche *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5077*44704f69SBart Van Assche *) 5078*44704f69SBart Van Assche lt_use_gnu_ld_interface=yes 5079*44704f69SBart Van Assche ;; 5080*44704f69SBart Van Assche esac 5081*44704f69SBart Van Assche ;; 5082*44704f69SBart Van Assche *) 5083*44704f69SBart Van Assche lt_use_gnu_ld_interface=yes 5084*44704f69SBart Van Assche ;; 5085*44704f69SBart Van Assche esac 5086*44704f69SBart Van Assche fi 5087*44704f69SBart Van Assche 5088*44704f69SBart Van Assche if test yes = "$lt_use_gnu_ld_interface"; then 5089*44704f69SBart Van Assche # If archive_cmds runs LD, not CC, wlarc should be empty 5090*44704f69SBart Van Assche wlarc='$wl' 5091*44704f69SBart Van Assche 5092*44704f69SBart Van Assche # Set some defaults for GNU ld with shared library support. These 5093*44704f69SBart Van Assche # are reset later if shared libraries are not supported. Putting them 5094*44704f69SBart Van Assche # here allows them to be overridden if necessary. 5095*44704f69SBart Van Assche runpath_var=LD_RUN_PATH 5096*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5097*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5098*44704f69SBart Van Assche # ancient GNU ld didn't support --whole-archive et. al. 5099*44704f69SBart Van Assche if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5100*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5101*44704f69SBart Van Assche else 5102*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)= 5103*44704f69SBart Van Assche fi 5104*44704f69SBart Van Assche supports_anon_versioning=no 5105*44704f69SBart Van Assche case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 5106*44704f69SBart Van Assche *GNU\ gold*) supports_anon_versioning=yes ;; 5107*44704f69SBart Van Assche *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5108*44704f69SBart Van Assche *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5109*44704f69SBart Van Assche *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5110*44704f69SBart Van Assche *\ 2.11.*) ;; # other 2.11 versions 5111*44704f69SBart Van Assche *) supports_anon_versioning=yes ;; 5112*44704f69SBart Van Assche esac 5113*44704f69SBart Van Assche 5114*44704f69SBart Van Assche # See if GNU ld supports shared libraries. 5115*44704f69SBart Van Assche case $host_os in 5116*44704f69SBart Van Assche aix[[3-9]]*) 5117*44704f69SBart Van Assche # On AIX/PPC, the GNU linker is very broken 5118*44704f69SBart Van Assche if test ia64 != "$host_cpu"; then 5119*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 5120*44704f69SBart Van Assche cat <<_LT_EOF 1>&2 5121*44704f69SBart Van Assche 5122*44704f69SBart Van Assche*** Warning: the GNU linker, at least up to release 2.19, is reported 5123*44704f69SBart Van Assche*** to be unable to reliably create shared libraries on AIX. 5124*44704f69SBart Van Assche*** Therefore, libtool is disabling shared libraries support. If you 5125*44704f69SBart Van Assche*** really care for shared libraries, you may want to install binutils 5126*44704f69SBart Van Assche*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5127*44704f69SBart Van Assche*** You will then need to restart the configuration process. 5128*44704f69SBart Van Assche 5129*44704f69SBart Van Assche_LT_EOF 5130*44704f69SBart Van Assche fi 5131*44704f69SBart Van Assche ;; 5132*44704f69SBart Van Assche 5133*44704f69SBart Van Assche amigaos*) 5134*44704f69SBart Van Assche case $host_cpu in 5135*44704f69SBart Van Assche powerpc) 5136*44704f69SBart Van Assche # see comment about AmigaOS4 .so support 5137*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5138*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='' 5139*44704f69SBart Van Assche ;; 5140*44704f69SBart Van Assche m68k) 5141*44704f69SBart Van Assche _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)' 5142*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5143*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 5144*44704f69SBart Van Assche ;; 5145*44704f69SBart Van Assche esac 5146*44704f69SBart Van Assche ;; 5147*44704f69SBart Van Assche 5148*44704f69SBart Van Assche beos*) 5149*44704f69SBart Van Assche if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5150*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5151*44704f69SBart Van Assche # Joseph Beckenbach <[email protected]> says some releases of gcc 5152*44704f69SBart Van Assche # support --undefined. This deserves some investigation. FIXME 5153*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5154*44704f69SBart Van Assche else 5155*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 5156*44704f69SBart Van Assche fi 5157*44704f69SBart Van Assche ;; 5158*44704f69SBart Van Assche 5159*44704f69SBart Van Assche cygwin* | mingw* | pw32* | cegcc*) 5160*44704f69SBart Van Assche # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5161*44704f69SBart Van Assche # as there is no search path for DLLs. 5162*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5163*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5164*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5165*44704f69SBart Van Assche _LT_TAGVAR(always_export_symbols, $1)=no 5166*44704f69SBart Van Assche _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5167*44704f69SBart Van Assche _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' 5168*44704f69SBart Van Assche _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5169*44704f69SBart Van Assche 5170*44704f69SBart Van Assche if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5171*44704f69SBart Van Assche _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' 5172*44704f69SBart Van Assche # If the export-symbols file already is a .def file, use it as 5173*44704f69SBart Van Assche # is; otherwise, prepend EXPORTS... 5174*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5175*44704f69SBart Van Assche cp $export_symbols $output_objdir/$soname.def; 5176*44704f69SBart Van Assche else 5177*44704f69SBart Van Assche echo EXPORTS > $output_objdir/$soname.def; 5178*44704f69SBart Van Assche cat $export_symbols >> $output_objdir/$soname.def; 5179*44704f69SBart Van Assche fi~ 5180*44704f69SBart Van Assche $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5181*44704f69SBart Van Assche else 5182*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 5183*44704f69SBart Van Assche fi 5184*44704f69SBart Van Assche ;; 5185*44704f69SBart Van Assche 5186*44704f69SBart Van Assche haiku*) 5187*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5188*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=yes 5189*44704f69SBart Van Assche ;; 5190*44704f69SBart Van Assche 5191*44704f69SBart Van Assche os2*) 5192*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5193*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 5194*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5195*44704f69SBart Van Assche shrext_cmds=.dll 5196*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5197*44704f69SBart Van Assche $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5198*44704f69SBart Van Assche $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5199*44704f69SBart Van Assche $ECHO EXPORTS >> $output_objdir/$libname.def~ 5200*44704f69SBart Van Assche emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5201*44704f69SBart Van Assche $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5202*44704f69SBart Van Assche emximp -o $lib $output_objdir/$libname.def' 5203*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5204*44704f69SBart Van Assche $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5205*44704f69SBart Van Assche $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5206*44704f69SBart Van Assche $ECHO EXPORTS >> $output_objdir/$libname.def~ 5207*44704f69SBart Van Assche prefix_cmds="$SED"~ 5208*44704f69SBart Van Assche if test EXPORTS = "`$SED 1q $export_symbols`"; then 5209*44704f69SBart Van Assche prefix_cmds="$prefix_cmds -e 1d"; 5210*44704f69SBart Van Assche fi~ 5211*44704f69SBart Van Assche prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5212*44704f69SBart Van Assche cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5213*44704f69SBart Van Assche $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5214*44704f69SBart Van Assche emximp -o $lib $output_objdir/$libname.def' 5215*44704f69SBart Van Assche _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5216*44704f69SBart Van Assche _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5217*44704f69SBart Van Assche _LT_TAGVAR(file_list_spec, $1)='@' 5218*44704f69SBart Van Assche ;; 5219*44704f69SBart Van Assche 5220*44704f69SBart Van Assche interix[[3-9]]*) 5221*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=no 5222*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5223*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5224*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5225*44704f69SBart Van Assche # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5226*44704f69SBart Van Assche # Instead, shared libraries are loaded at an image base (0x10000000 by 5227*44704f69SBart Van Assche # default) and relocated if they conflict, which is a slow very memory 5228*44704f69SBart Van Assche # consuming and fragmenting process. To avoid this, we pick a random, 5229*44704f69SBart Van Assche # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5230*44704f69SBart Van Assche # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5231*44704f69SBart Van Assche _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' 5232*44704f69SBart Van Assche _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' 5233*44704f69SBart Van Assche ;; 5234*44704f69SBart Van Assche 5235*44704f69SBart Van Assche gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5236*44704f69SBart Van Assche tmp_diet=no 5237*44704f69SBart Van Assche if test linux-dietlibc = "$host_os"; then 5238*44704f69SBart Van Assche case $cc_basename in 5239*44704f69SBart Van Assche diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5240*44704f69SBart Van Assche esac 5241*44704f69SBart Van Assche fi 5242*44704f69SBart Van Assche if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5243*44704f69SBart Van Assche && test no = "$tmp_diet" 5244*44704f69SBart Van Assche then 5245*44704f69SBart Van Assche tmp_addflag=' $pic_flag' 5246*44704f69SBart Van Assche tmp_sharedflag='-shared' 5247*44704f69SBart Van Assche case $cc_basename,$host_cpu in 5248*44704f69SBart Van Assche pgcc*) # Portland Group C compiler 5249*44704f69SBart Van Assche _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' 5250*44704f69SBart Van Assche tmp_addflag=' $pic_flag' 5251*44704f69SBart Van Assche ;; 5252*44704f69SBart Van Assche pgf77* | pgf90* | pgf95* | pgfortran*) 5253*44704f69SBart Van Assche # Portland Group f77 and f90 compilers 5254*44704f69SBart Van Assche _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' 5255*44704f69SBart Van Assche tmp_addflag=' $pic_flag -Mnomain' ;; 5256*44704f69SBart Van Assche ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5257*44704f69SBart Van Assche tmp_addflag=' -i_dynamic' ;; 5258*44704f69SBart Van Assche efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5259*44704f69SBart Van Assche tmp_addflag=' -i_dynamic -nofor_main' ;; 5260*44704f69SBart Van Assche ifc* | ifort*) # Intel Fortran compiler 5261*44704f69SBart Van Assche tmp_addflag=' -nofor_main' ;; 5262*44704f69SBart Van Assche lf95*) # Lahey Fortran 8.1 5263*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)= 5264*44704f69SBart Van Assche tmp_sharedflag='--shared' ;; 5265*44704f69SBart Van Assche nagfor*) # NAGFOR 5.3 5266*44704f69SBart Van Assche tmp_sharedflag='-Wl,-shared' ;; 5267*44704f69SBart Van Assche xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5268*44704f69SBart Van Assche tmp_sharedflag='-qmkshrobj' 5269*44704f69SBart Van Assche tmp_addflag= ;; 5270*44704f69SBart Van Assche nvcc*) # Cuda Compiler Driver 2.2 5271*44704f69SBart Van Assche _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' 5272*44704f69SBart Van Assche _LT_TAGVAR(compiler_needs_object, $1)=yes 5273*44704f69SBart Van Assche ;; 5274*44704f69SBart Van Assche esac 5275*44704f69SBart Van Assche case `$CC -V 2>&1 | $SED 5q` in 5276*44704f69SBart Van Assche *Sun\ C*) # Sun C 5.9 5277*44704f69SBart Van Assche _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' 5278*44704f69SBart Van Assche _LT_TAGVAR(compiler_needs_object, $1)=yes 5279*44704f69SBart Van Assche tmp_sharedflag='-G' ;; 5280*44704f69SBart Van Assche *Sun\ F*) # Sun Fortran 8.3 5281*44704f69SBart Van Assche tmp_sharedflag='-G' ;; 5282*44704f69SBart Van Assche esac 5283*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5284*44704f69SBart Van Assche 5285*44704f69SBart Van Assche if test yes = "$supports_anon_versioning"; then 5286*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5287*44704f69SBart Van Assche cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5288*44704f69SBart Van Assche echo "local: *; };" >> $output_objdir/$libname.ver~ 5289*44704f69SBart Van Assche $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5290*44704f69SBart Van Assche fi 5291*44704f69SBart Van Assche 5292*44704f69SBart Van Assche case $cc_basename in 5293*44704f69SBart Van Assche tcc*) 5294*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5295*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5296*44704f69SBart Van Assche ;; 5297*44704f69SBart Van Assche xlf* | bgf* | bgxlf* | mpixlf*) 5298*44704f69SBart Van Assche # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5299*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5300*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5301*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5302*44704f69SBart Van Assche if test yes = "$supports_anon_versioning"; then 5303*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5304*44704f69SBart Van Assche cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5305*44704f69SBart Van Assche echo "local: *; };" >> $output_objdir/$libname.ver~ 5306*44704f69SBart Van Assche $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5307*44704f69SBart Van Assche fi 5308*44704f69SBart Van Assche ;; 5309*44704f69SBart Van Assche esac 5310*44704f69SBart Van Assche else 5311*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 5312*44704f69SBart Van Assche fi 5313*44704f69SBart Van Assche ;; 5314*44704f69SBart Van Assche 5315*44704f69SBart Van Assche netbsd* | netbsdelf*-gnu) 5316*44704f69SBart Van Assche if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5317*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5318*44704f69SBart Van Assche wlarc= 5319*44704f69SBart Van Assche else 5320*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5321*44704f69SBart Van Assche _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' 5322*44704f69SBart Van Assche fi 5323*44704f69SBart Van Assche ;; 5324*44704f69SBart Van Assche 5325*44704f69SBart Van Assche solaris*) 5326*44704f69SBart Van Assche if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5327*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 5328*44704f69SBart Van Assche cat <<_LT_EOF 1>&2 5329*44704f69SBart Van Assche 5330*44704f69SBart Van Assche*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5331*44704f69SBart Van Assche*** create shared libraries on Solaris systems. Therefore, libtool 5332*44704f69SBart Van Assche*** is disabling shared libraries support. We urge you to upgrade GNU 5333*44704f69SBart Van Assche*** binutils to release 2.9.1 or newer. Another option is to modify 5334*44704f69SBart Van Assche*** your PATH or compiler configuration so that the native linker is 5335*44704f69SBart Van Assche*** used, and then restart. 5336*44704f69SBart Van Assche 5337*44704f69SBart Van Assche_LT_EOF 5338*44704f69SBart Van Assche elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5339*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5340*44704f69SBart Van Assche _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' 5341*44704f69SBart Van Assche else 5342*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 5343*44704f69SBart Van Assche fi 5344*44704f69SBart Van Assche ;; 5345*44704f69SBart Van Assche 5346*44704f69SBart Van Assche sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5347*44704f69SBart Van Assche case `$LD -v 2>&1` in 5348*44704f69SBart Van Assche *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5349*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 5350*44704f69SBart Van Assche cat <<_LT_EOF 1>&2 5351*44704f69SBart Van Assche 5352*44704f69SBart Van Assche*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5353*44704f69SBart Van Assche*** reliably create shared libraries on SCO systems. Therefore, libtool 5354*44704f69SBart Van Assche*** is disabling shared libraries support. We urge you to upgrade GNU 5355*44704f69SBart Van Assche*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5356*44704f69SBart Van Assche*** your PATH or compiler configuration so that the native linker is 5357*44704f69SBart Van Assche*** used, and then restart. 5358*44704f69SBart Van Assche 5359*44704f69SBart Van Assche_LT_EOF 5360*44704f69SBart Van Assche ;; 5361*44704f69SBart Van Assche *) 5362*44704f69SBart Van Assche # For security reasons, it is highly recommended that you always 5363*44704f69SBart Van Assche # use absolute paths for naming shared libraries, and exclude the 5364*44704f69SBart Van Assche # DT_RUNPATH tag from executables and libraries. But doing so 5365*44704f69SBart Van Assche # requires that you compile everything twice, which is a pain. 5366*44704f69SBart Van Assche if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5367*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5368*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5369*44704f69SBart Van Assche _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' 5370*44704f69SBart Van Assche else 5371*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 5372*44704f69SBart Van Assche fi 5373*44704f69SBart Van Assche ;; 5374*44704f69SBart Van Assche esac 5375*44704f69SBart Van Assche ;; 5376*44704f69SBart Van Assche 5377*44704f69SBart Van Assche sunos4*) 5378*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5379*44704f69SBart Van Assche wlarc= 5380*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 5381*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5382*44704f69SBart Van Assche ;; 5383*44704f69SBart Van Assche 5384*44704f69SBart Van Assche *) 5385*44704f69SBart Van Assche if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5386*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5387*44704f69SBart Van Assche _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' 5388*44704f69SBart Van Assche else 5389*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 5390*44704f69SBart Van Assche fi 5391*44704f69SBart Van Assche ;; 5392*44704f69SBart Van Assche esac 5393*44704f69SBart Van Assche 5394*44704f69SBart Van Assche if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5395*44704f69SBart Van Assche runpath_var= 5396*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5397*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5398*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)= 5399*44704f69SBart Van Assche fi 5400*44704f69SBart Van Assche else 5401*44704f69SBart Van Assche # PORTME fill in a description of your system's linker (not GNU ld) 5402*44704f69SBart Van Assche case $host_os in 5403*44704f69SBart Van Assche aix3*) 5404*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5405*44704f69SBart Van Assche _LT_TAGVAR(always_export_symbols, $1)=yes 5406*44704f69SBart Van Assche _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' 5407*44704f69SBart Van Assche # Note: this linker hardcodes the directories in LIBPATH if there 5408*44704f69SBart Van Assche # are no directories specified by -L. 5409*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 5410*44704f69SBart Van Assche if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5411*44704f69SBart Van Assche # Neither direct hardcoding nor static linking is supported with a 5412*44704f69SBart Van Assche # broken collect2. 5413*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=unsupported 5414*44704f69SBart Van Assche fi 5415*44704f69SBart Van Assche ;; 5416*44704f69SBart Van Assche 5417*44704f69SBart Van Assche aix[[4-9]]*) 5418*44704f69SBart Van Assche if test ia64 = "$host_cpu"; then 5419*44704f69SBart Van Assche # On IA64, the linker does run time linking by default, so we don't 5420*44704f69SBart Van Assche # have to do anything special. 5421*44704f69SBart Van Assche aix_use_runtimelinking=no 5422*44704f69SBart Van Assche exp_sym_flag='-Bexport' 5423*44704f69SBart Van Assche no_entry_flag= 5424*44704f69SBart Van Assche else 5425*44704f69SBart Van Assche # If we're using GNU nm, then we don't want the "-C" option. 5426*44704f69SBart Van Assche # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5427*44704f69SBart Van Assche # Without the "-l" option, or with the "-B" option, AIX nm treats 5428*44704f69SBart Van Assche # weak defined symbols like other global defined symbols, whereas 5429*44704f69SBart Van Assche # GNU nm marks them as "W". 5430*44704f69SBart Van Assche # While the 'weak' keyword is ignored in the Export File, we need 5431*44704f69SBart Van Assche # it in the Import File for the 'aix-soname' feature, so we have 5432*44704f69SBart Van Assche # to replace the "-B" option with "-P" for AIX nm. 5433*44704f69SBart Van Assche if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5434*44704f69SBart Van Assche _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' 5435*44704f69SBart Van Assche else 5436*44704f69SBart Van Assche _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' 5437*44704f69SBart Van Assche fi 5438*44704f69SBart Van Assche aix_use_runtimelinking=no 5439*44704f69SBart Van Assche 5440*44704f69SBart Van Assche # Test if we are trying to use run time linking or normal 5441*44704f69SBart Van Assche # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5442*44704f69SBart Van Assche # have runtime linking enabled, and use it for executables. 5443*44704f69SBart Van Assche # For shared libraries, we enable/disable runtime linking 5444*44704f69SBart Van Assche # depending on the kind of the shared library created - 5445*44704f69SBart Van Assche # when "with_aix_soname,aix_use_runtimelinking" is: 5446*44704f69SBart Van Assche # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5447*44704f69SBart Van Assche # "aix,yes" lib.so shared, rtl:yes, for executables 5448*44704f69SBart Van Assche # lib.a static archive 5449*44704f69SBart Van Assche # "both,no" lib.so.V(shr.o) shared, rtl:yes 5450*44704f69SBart Van Assche # lib.a(lib.so.V) shared, rtl:no, for executables 5451*44704f69SBart Van Assche # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5452*44704f69SBart Van Assche # lib.a(lib.so.V) shared, rtl:no 5453*44704f69SBart Van Assche # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5454*44704f69SBart Van Assche # lib.a static archive 5455*44704f69SBart Van Assche case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5456*44704f69SBart Van Assche for ld_flag in $LDFLAGS; do 5457*44704f69SBart Van Assche if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5458*44704f69SBart Van Assche aix_use_runtimelinking=yes 5459*44704f69SBart Van Assche break 5460*44704f69SBart Van Assche fi 5461*44704f69SBart Van Assche done 5462*44704f69SBart Van Assche if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5463*44704f69SBart Van Assche # With aix-soname=svr4, we create the lib.so.V shared archives only, 5464*44704f69SBart Van Assche # so we don't have lib.a shared libs to link our executables. 5465*44704f69SBart Van Assche # We have to force runtime linking in this case. 5466*44704f69SBart Van Assche aix_use_runtimelinking=yes 5467*44704f69SBart Van Assche LDFLAGS="$LDFLAGS -Wl,-brtl" 5468*44704f69SBart Van Assche fi 5469*44704f69SBart Van Assche ;; 5470*44704f69SBart Van Assche esac 5471*44704f69SBart Van Assche 5472*44704f69SBart Van Assche exp_sym_flag='-bexport' 5473*44704f69SBart Van Assche no_entry_flag='-bnoentry' 5474*44704f69SBart Van Assche fi 5475*44704f69SBart Van Assche 5476*44704f69SBart Van Assche # When large executables or shared objects are built, AIX ld can 5477*44704f69SBart Van Assche # have problems creating the table of contents. If linking a library 5478*44704f69SBart Van Assche # or program results in "error TOC overflow" add -mminimal-toc to 5479*44704f69SBart Van Assche # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5480*44704f69SBart Van Assche # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5481*44704f69SBart Van Assche 5482*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='' 5483*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 5484*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5485*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5486*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=yes 5487*44704f69SBart Van Assche _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5488*44704f69SBart Van Assche case $with_aix_soname,$aix_use_runtimelinking in 5489*44704f69SBart Van Assche aix,*) ;; # traditional, no import file 5490*44704f69SBart Van Assche svr4,* | *,yes) # use import file 5491*44704f69SBart Van Assche # The Import File defines what to hardcode. 5492*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=no 5493*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5494*44704f69SBart Van Assche ;; 5495*44704f69SBart Van Assche esac 5496*44704f69SBart Van Assche 5497*44704f69SBart Van Assche if test yes = "$GCC"; then 5498*44704f69SBart Van Assche case $host_os in aix4.[[012]]|aix4.[[012]].*) 5499*44704f69SBart Van Assche # We only want to do this on AIX 4.2 and lower, the check 5500*44704f69SBart Van Assche # below for broken collect2 doesn't work under 4.3+ 5501*44704f69SBart Van Assche collect2name=`$CC -print-prog-name=collect2` 5502*44704f69SBart Van Assche if test -f "$collect2name" && 5503*44704f69SBart Van Assche strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5504*44704f69SBart Van Assche then 5505*44704f69SBart Van Assche # We have reworked collect2 5506*44704f69SBart Van Assche : 5507*44704f69SBart Van Assche else 5508*44704f69SBart Van Assche # We have old collect2 5509*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=unsupported 5510*44704f69SBart Van Assche # It fails to find uninstalled libraries when the uninstalled 5511*44704f69SBart Van Assche # path is not listed in the libpath. Setting hardcode_minus_L 5512*44704f69SBart Van Assche # to unsupported forces relinking 5513*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 5514*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5515*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)= 5516*44704f69SBart Van Assche fi 5517*44704f69SBart Van Assche ;; 5518*44704f69SBart Van Assche esac 5519*44704f69SBart Van Assche shared_flag='-shared' 5520*44704f69SBart Van Assche if test yes = "$aix_use_runtimelinking"; then 5521*44704f69SBart Van Assche shared_flag="$shared_flag "'$wl-G' 5522*44704f69SBart Van Assche fi 5523*44704f69SBart Van Assche # Need to ensure runtime linking is disabled for the traditional 5524*44704f69SBart Van Assche # shared library, or the linker may eventually find shared libraries 5525*44704f69SBart Van Assche # /with/ Import File - we do not want to mix them. 5526*44704f69SBart Van Assche shared_flag_aix='-shared' 5527*44704f69SBart Van Assche shared_flag_svr4='-shared $wl-G' 5528*44704f69SBart Van Assche else 5529*44704f69SBart Van Assche # not using gcc 5530*44704f69SBart Van Assche if test ia64 = "$host_cpu"; then 5531*44704f69SBart Van Assche # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5532*44704f69SBart Van Assche # chokes on -Wl,-G. The following line is correct: 5533*44704f69SBart Van Assche shared_flag='-G' 5534*44704f69SBart Van Assche else 5535*44704f69SBart Van Assche if test yes = "$aix_use_runtimelinking"; then 5536*44704f69SBart Van Assche shared_flag='$wl-G' 5537*44704f69SBart Van Assche else 5538*44704f69SBart Van Assche shared_flag='$wl-bM:SRE' 5539*44704f69SBart Van Assche fi 5540*44704f69SBart Van Assche shared_flag_aix='$wl-bM:SRE' 5541*44704f69SBart Van Assche shared_flag_svr4='$wl-G' 5542*44704f69SBart Van Assche fi 5543*44704f69SBart Van Assche fi 5544*44704f69SBart Van Assche 5545*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5546*44704f69SBart Van Assche # It seems that -bexpall does not export symbols beginning with 5547*44704f69SBart Van Assche # underscore (_), so it is better to generate a list of symbols to export. 5548*44704f69SBart Van Assche _LT_TAGVAR(always_export_symbols, $1)=yes 5549*44704f69SBart Van Assche if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5550*44704f69SBart Van Assche # Warning - without using the other runtime loading flags (-brtl), 5551*44704f69SBart Van Assche # -berok will link without error, but may produce a broken library. 5552*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5553*44704f69SBart Van Assche # Determine the default libpath from the value encoded in an 5554*44704f69SBart Van Assche # empty executable. 5555*44704f69SBart Van Assche _LT_SYS_MODULE_PATH_AIX([$1]) 5556*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5557*44704f69SBart Van Assche _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 5558*44704f69SBart Van Assche else 5559*44704f69SBart Van Assche if test ia64 = "$host_cpu"; then 5560*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5561*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5562*44704f69SBart Van Assche _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" 5563*44704f69SBart Van Assche else 5564*44704f69SBart Van Assche # Determine the default libpath from the value encoded in an 5565*44704f69SBart Van Assche # empty executable. 5566*44704f69SBart Van Assche _LT_SYS_MODULE_PATH_AIX([$1]) 5567*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5568*44704f69SBart Van Assche # Warning - without using the other run time loading flags, 5569*44704f69SBart Van Assche # -berok will link without error, but may produce a broken library. 5570*44704f69SBart Van Assche _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5571*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5572*44704f69SBart Van Assche if test yes = "$with_gnu_ld"; then 5573*44704f69SBart Van Assche # We only use this code for GNU lds that support --whole-archive. 5574*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5575*44704f69SBart Van Assche else 5576*44704f69SBart Van Assche # Exported symbols can be pulled into shared objects from archives 5577*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5578*44704f69SBart Van Assche fi 5579*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5580*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5581*44704f69SBart Van Assche # -brtl affects multiple linker settings, -berok does not and is overridden later 5582*44704f69SBart Van Assche compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5583*44704f69SBart Van Assche if test svr4 != "$with_aix_soname"; then 5584*44704f69SBart Van Assche # This is similar to how AIX traditionally builds its shared libraries. 5585*44704f69SBart Van Assche _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' 5586*44704f69SBart Van Assche fi 5587*44704f69SBart Van Assche if test aix != "$with_aix_soname"; then 5588*44704f69SBart Van Assche _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' 5589*44704f69SBart Van Assche else 5590*44704f69SBart Van Assche # used by -dlpreopen to get the symbols 5591*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5592*44704f69SBart Van Assche fi 5593*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5594*44704f69SBart Van Assche fi 5595*44704f69SBart Van Assche fi 5596*44704f69SBart Van Assche ;; 5597*44704f69SBart Van Assche 5598*44704f69SBart Van Assche amigaos*) 5599*44704f69SBart Van Assche case $host_cpu in 5600*44704f69SBart Van Assche powerpc) 5601*44704f69SBart Van Assche # see comment about AmigaOS4 .so support 5602*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5603*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='' 5604*44704f69SBart Van Assche ;; 5605*44704f69SBart Van Assche m68k) 5606*44704f69SBart Van Assche _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)' 5607*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5608*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 5609*44704f69SBart Van Assche ;; 5610*44704f69SBart Van Assche esac 5611*44704f69SBart Van Assche ;; 5612*44704f69SBart Van Assche 5613*44704f69SBart Van Assche bsdi[[45]]*) 5614*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5615*44704f69SBart Van Assche ;; 5616*44704f69SBart Van Assche 5617*44704f69SBart Van Assche cygwin* | mingw* | pw32* | cegcc*) 5618*44704f69SBart Van Assche # When not using gcc, we currently assume that we are using 5619*44704f69SBart Van Assche # Microsoft Visual C++ or Intel C++ Compiler. 5620*44704f69SBart Van Assche # hardcode_libdir_flag_spec is actually meaningless, as there is 5621*44704f69SBart Van Assche # no search path for DLLs. 5622*44704f69SBart Van Assche case $cc_basename in 5623*44704f69SBart Van Assche cl* | icl*) 5624*44704f69SBart Van Assche # Native MSVC or ICC 5625*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5626*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5627*44704f69SBart Van Assche _LT_TAGVAR(always_export_symbols, $1)=yes 5628*44704f69SBart Van Assche _LT_TAGVAR(file_list_spec, $1)='@' 5629*44704f69SBart Van Assche # Tell ltmain to make .lib files, not .a files. 5630*44704f69SBart Van Assche libext=lib 5631*44704f69SBart Van Assche # Tell ltmain to make .dll files, not .so files. 5632*44704f69SBart Van Assche shrext_cmds=.dll 5633*44704f69SBart Van Assche # FIXME: Setting linknames here is a bad hack. 5634*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5635*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5636*44704f69SBart Van Assche cp "$export_symbols" "$output_objdir/$soname.def"; 5637*44704f69SBart Van Assche echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5638*44704f69SBart Van Assche else 5639*44704f69SBart Van Assche $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5640*44704f69SBart Van Assche fi~ 5641*44704f69SBart Van Assche $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5642*44704f69SBart Van Assche linknames=' 5643*44704f69SBart Van Assche # The linker will not automatically build a static lib if we build a DLL. 5644*44704f69SBart Van Assche # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5645*44704f69SBart Van Assche _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5646*44704f69SBart Van Assche _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5647*44704f69SBart Van Assche _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' 5648*44704f69SBart Van Assche # Don't use ranlib 5649*44704f69SBart Van Assche _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5650*44704f69SBart Van Assche _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5651*44704f69SBart Van Assche lt_tool_outputfile="@TOOL_OUTPUT@"~ 5652*44704f69SBart Van Assche case $lt_outputfile in 5653*44704f69SBart Van Assche *.exe|*.EXE) ;; 5654*44704f69SBart Van Assche *) 5655*44704f69SBart Van Assche lt_outputfile=$lt_outputfile.exe 5656*44704f69SBart Van Assche lt_tool_outputfile=$lt_tool_outputfile.exe 5657*44704f69SBart Van Assche ;; 5658*44704f69SBart Van Assche esac~ 5659*44704f69SBart Van Assche if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5660*44704f69SBart Van Assche $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5661*44704f69SBart Van Assche $RM "$lt_outputfile.manifest"; 5662*44704f69SBart Van Assche fi' 5663*44704f69SBart Van Assche ;; 5664*44704f69SBart Van Assche *) 5665*44704f69SBart Van Assche # Assume MSVC and ICC wrapper 5666*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5667*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5668*44704f69SBart Van Assche # Tell ltmain to make .lib files, not .a files. 5669*44704f69SBart Van Assche libext=lib 5670*44704f69SBart Van Assche # Tell ltmain to make .dll files, not .so files. 5671*44704f69SBart Van Assche shrext_cmds=.dll 5672*44704f69SBart Van Assche # FIXME: Setting linknames here is a bad hack. 5673*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5674*44704f69SBart Van Assche # The linker will automatically build a .lib file if we build a DLL. 5675*44704f69SBart Van Assche _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5676*44704f69SBart Van Assche # FIXME: Should let the user specify the lib program. 5677*44704f69SBart Van Assche _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5678*44704f69SBart Van Assche _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5679*44704f69SBart Van Assche ;; 5680*44704f69SBart Van Assche esac 5681*44704f69SBart Van Assche ;; 5682*44704f69SBart Van Assche 5683*44704f69SBart Van Assche darwin* | rhapsody*) 5684*44704f69SBart Van Assche _LT_DARWIN_LINKER_FEATURES($1) 5685*44704f69SBart Van Assche ;; 5686*44704f69SBart Van Assche 5687*44704f69SBart Van Assche dgux*) 5688*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5689*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5690*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5691*44704f69SBart Van Assche ;; 5692*44704f69SBart Van Assche 5693*44704f69SBart Van Assche # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5694*44704f69SBart Van Assche # support. Future versions do this automatically, but an explicit c++rt0.o 5695*44704f69SBart Van Assche # does not break anything, and helps significantly (at the cost of a little 5696*44704f69SBart Van Assche # extra space). 5697*44704f69SBart Van Assche freebsd2.2*) 5698*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5699*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5700*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 5701*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5702*44704f69SBart Van Assche ;; 5703*44704f69SBart Van Assche 5704*44704f69SBart Van Assche # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5705*44704f69SBart Van Assche freebsd2.*) 5706*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5707*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 5708*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 5709*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5710*44704f69SBart Van Assche ;; 5711*44704f69SBart Van Assche 5712*44704f69SBart Van Assche # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5713*44704f69SBart Van Assche freebsd* | dragonfly* | midnightbsd*) 5714*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5715*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5716*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 5717*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5718*44704f69SBart Van Assche ;; 5719*44704f69SBart Van Assche 5720*44704f69SBart Van Assche hpux9*) 5721*44704f69SBart Van Assche if test yes = "$GCC"; then 5722*44704f69SBart Van Assche _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' 5723*44704f69SBart Van Assche else 5724*44704f69SBart Van Assche _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' 5725*44704f69SBart Van Assche fi 5726*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5727*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5728*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 5729*44704f69SBart Van Assche 5730*44704f69SBart Van Assche # hardcode_minus_L: Not really in the search PATH, 5731*44704f69SBart Van Assche # but as the default location of the library. 5732*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 5733*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5734*44704f69SBart Van Assche ;; 5735*44704f69SBart Van Assche 5736*44704f69SBart Van Assche hpux10*) 5737*44704f69SBart Van Assche if test yes,no = "$GCC,$with_gnu_ld"; then 5738*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5739*44704f69SBart Van Assche else 5740*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5741*44704f69SBart Van Assche fi 5742*44704f69SBart Van Assche if test no = "$with_gnu_ld"; then 5743*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5744*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5745*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 5746*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5747*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5748*44704f69SBart Van Assche # hardcode_minus_L: Not really in the search PATH, 5749*44704f69SBart Van Assche # but as the default location of the library. 5750*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 5751*44704f69SBart Van Assche fi 5752*44704f69SBart Van Assche ;; 5753*44704f69SBart Van Assche 5754*44704f69SBart Van Assche hpux11*) 5755*44704f69SBart Van Assche if test yes,no = "$GCC,$with_gnu_ld"; then 5756*44704f69SBart Van Assche case $host_cpu in 5757*44704f69SBart Van Assche hppa*64*) 5758*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5759*44704f69SBart Van Assche ;; 5760*44704f69SBart Van Assche ia64*) 5761*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5762*44704f69SBart Van Assche ;; 5763*44704f69SBart Van Assche *) 5764*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5765*44704f69SBart Van Assche ;; 5766*44704f69SBart Van Assche esac 5767*44704f69SBart Van Assche else 5768*44704f69SBart Van Assche case $host_cpu in 5769*44704f69SBart Van Assche hppa*64*) 5770*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5771*44704f69SBart Van Assche ;; 5772*44704f69SBart Van Assche ia64*) 5773*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5774*44704f69SBart Van Assche ;; 5775*44704f69SBart Van Assche *) 5776*44704f69SBart Van Assche m4_if($1, [], [ 5777*44704f69SBart Van Assche # Older versions of the 11.00 compiler do not understand -b yet 5778*44704f69SBart Van Assche # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5779*44704f69SBart Van Assche _LT_LINKER_OPTION([if $CC understands -b], 5780*44704f69SBart Van Assche _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5781*44704f69SBart Van Assche [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5782*44704f69SBart Van Assche [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5783*44704f69SBart Van Assche [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5784*44704f69SBart Van Assche ;; 5785*44704f69SBart Van Assche esac 5786*44704f69SBart Van Assche fi 5787*44704f69SBart Van Assche if test no = "$with_gnu_ld"; then 5788*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5789*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5790*44704f69SBart Van Assche 5791*44704f69SBart Van Assche case $host_cpu in 5792*44704f69SBart Van Assche hppa*64*|ia64*) 5793*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=no 5794*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5795*44704f69SBart Van Assche ;; 5796*44704f69SBart Van Assche *) 5797*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 5798*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5799*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5800*44704f69SBart Van Assche 5801*44704f69SBart Van Assche # hardcode_minus_L: Not really in the search PATH, 5802*44704f69SBart Van Assche # but as the default location of the library. 5803*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 5804*44704f69SBart Van Assche ;; 5805*44704f69SBart Van Assche esac 5806*44704f69SBart Van Assche fi 5807*44704f69SBart Van Assche ;; 5808*44704f69SBart Van Assche 5809*44704f69SBart Van Assche irix5* | irix6* | nonstopux*) 5810*44704f69SBart Van Assche if test yes = "$GCC"; then 5811*44704f69SBart Van Assche _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' 5812*44704f69SBart Van Assche # Try to use the -exported_symbol ld option, if it does not 5813*44704f69SBart Van Assche # work, assume that -exports_file does not work either and 5814*44704f69SBart Van Assche # implicitly export all symbols. 5815*44704f69SBart Van Assche # This should be the same for all languages, so no per-tag cache variable. 5816*44704f69SBart Van Assche AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5817*44704f69SBart Van Assche [lt_cv_irix_exported_symbol], 5818*44704f69SBart Van Assche [save_LDFLAGS=$LDFLAGS 5819*44704f69SBart Van Assche LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5820*44704f69SBart Van Assche AC_LINK_IFELSE( 5821*44704f69SBart Van Assche [AC_LANG_SOURCE( 5822*44704f69SBart Van Assche [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5823*44704f69SBart Van Assche [C++], [[int foo (void) { return 0; }]], 5824*44704f69SBart Van Assche [Fortran 77], [[ 5825*44704f69SBart Van Assche subroutine foo 5826*44704f69SBart Van Assche end]], 5827*44704f69SBart Van Assche [Fortran], [[ 5828*44704f69SBart Van Assche subroutine foo 5829*44704f69SBart Van Assche end]])])], 5830*44704f69SBart Van Assche [lt_cv_irix_exported_symbol=yes], 5831*44704f69SBart Van Assche [lt_cv_irix_exported_symbol=no]) 5832*44704f69SBart Van Assche LDFLAGS=$save_LDFLAGS]) 5833*44704f69SBart Van Assche if test yes = "$lt_cv_irix_exported_symbol"; then 5834*44704f69SBart Van Assche _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' 5835*44704f69SBart Van Assche fi 5836*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=no 5837*44704f69SBart Van Assche else 5838*44704f69SBart Van Assche _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' 5839*44704f69SBart Van Assche _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' 5840*44704f69SBart Van Assche fi 5841*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5842*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5843*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5844*44704f69SBart Van Assche _LT_TAGVAR(inherit_rpath, $1)=yes 5845*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=yes 5846*44704f69SBart Van Assche ;; 5847*44704f69SBart Van Assche 5848*44704f69SBart Van Assche linux*) 5849*44704f69SBart Van Assche case $cc_basename in 5850*44704f69SBart Van Assche tcc*) 5851*44704f69SBart Van Assche # Fabrice Bellard et al's Tiny C Compiler 5852*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=yes 5853*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5854*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5855*44704f69SBart Van Assche ;; 5856*44704f69SBart Van Assche esac 5857*44704f69SBart Van Assche ;; 5858*44704f69SBart Van Assche 5859*44704f69SBart Van Assche netbsd* | netbsdelf*-gnu) 5860*44704f69SBart Van Assche if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5861*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5862*44704f69SBart Van Assche else 5863*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5864*44704f69SBart Van Assche fi 5865*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5866*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 5867*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5868*44704f69SBart Van Assche ;; 5869*44704f69SBart Van Assche 5870*44704f69SBart Van Assche newsos6) 5871*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5872*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 5873*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5874*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5875*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5876*44704f69SBart Van Assche ;; 5877*44704f69SBart Van Assche 5878*44704f69SBart Van Assche *nto* | *qnx*) 5879*44704f69SBart Van Assche ;; 5880*44704f69SBart Van Assche 5881*44704f69SBart Van Assche openbsd* | bitrig*) 5882*44704f69SBart Van Assche if test -f /usr/libexec/ld.so; then 5883*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 5884*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5885*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5886*44704f69SBart Van Assche if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5887*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5888*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5889*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5890*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5891*44704f69SBart Van Assche else 5892*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5893*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5894*44704f69SBart Van Assche fi 5895*44704f69SBart Van Assche else 5896*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 5897*44704f69SBart Van Assche fi 5898*44704f69SBart Van Assche ;; 5899*44704f69SBart Van Assche 5900*44704f69SBart Van Assche os2*) 5901*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5902*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 5903*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5904*44704f69SBart Van Assche shrext_cmds=.dll 5905*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5906*44704f69SBart Van Assche $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5907*44704f69SBart Van Assche $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5908*44704f69SBart Van Assche $ECHO EXPORTS >> $output_objdir/$libname.def~ 5909*44704f69SBart Van Assche emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5910*44704f69SBart Van Assche $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5911*44704f69SBart Van Assche emximp -o $lib $output_objdir/$libname.def' 5912*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5913*44704f69SBart Van Assche $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5914*44704f69SBart Van Assche $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5915*44704f69SBart Van Assche $ECHO EXPORTS >> $output_objdir/$libname.def~ 5916*44704f69SBart Van Assche prefix_cmds="$SED"~ 5917*44704f69SBart Van Assche if test EXPORTS = "`$SED 1q $export_symbols`"; then 5918*44704f69SBart Van Assche prefix_cmds="$prefix_cmds -e 1d"; 5919*44704f69SBart Van Assche fi~ 5920*44704f69SBart Van Assche prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5921*44704f69SBart Van Assche cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5922*44704f69SBart Van Assche $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5923*44704f69SBart Van Assche emximp -o $lib $output_objdir/$libname.def' 5924*44704f69SBart Van Assche _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5925*44704f69SBart Van Assche _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5926*44704f69SBart Van Assche _LT_TAGVAR(file_list_spec, $1)='@' 5927*44704f69SBart Van Assche ;; 5928*44704f69SBart Van Assche 5929*44704f69SBart Van Assche osf3*) 5930*44704f69SBart Van Assche if test yes = "$GCC"; then 5931*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5932*44704f69SBart Van Assche _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' 5933*44704f69SBart Van Assche else 5934*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5935*44704f69SBart Van Assche _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' 5936*44704f69SBart Van Assche fi 5937*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5938*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5939*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5940*44704f69SBart Van Assche ;; 5941*44704f69SBart Van Assche 5942*44704f69SBart Van Assche osf4* | osf5*) # as osf3* with the addition of -msym flag 5943*44704f69SBart Van Assche if test yes = "$GCC"; then 5944*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5945*44704f69SBart Van Assche _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' 5946*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5947*44704f69SBart Van Assche else 5948*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5949*44704f69SBart Van Assche _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' 5950*44704f69SBart Van Assche _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~ 5951*44704f69SBart Van Assche $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' 5952*44704f69SBart Van Assche 5953*44704f69SBart Van Assche # Both c and cxx compiler support -rpath directly 5954*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5955*44704f69SBart Van Assche fi 5956*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5957*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5958*44704f69SBart Van Assche ;; 5959*44704f69SBart Van Assche 5960*44704f69SBart Van Assche solaris*) 5961*44704f69SBart Van Assche _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5962*44704f69SBart Van Assche if test yes = "$GCC"; then 5963*44704f69SBart Van Assche wlarc='$wl' 5964*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5965*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5966*44704f69SBart Van Assche $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' 5967*44704f69SBart Van Assche else 5968*44704f69SBart Van Assche case `$CC -V 2>&1` in 5969*44704f69SBart Van Assche *"Compilers 5.0"*) 5970*44704f69SBart Van Assche wlarc='' 5971*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5972*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5973*44704f69SBart Van Assche $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5974*44704f69SBart Van Assche ;; 5975*44704f69SBart Van Assche *) 5976*44704f69SBart Van Assche wlarc='$wl' 5977*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5978*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5979*44704f69SBart Van Assche $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5980*44704f69SBart Van Assche ;; 5981*44704f69SBart Van Assche esac 5982*44704f69SBart Van Assche fi 5983*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5984*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5985*44704f69SBart Van Assche case $host_os in 5986*44704f69SBart Van Assche solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5987*44704f69SBart Van Assche *) 5988*44704f69SBart Van Assche # The compiler driver will combine and reorder linker options, 5989*44704f69SBart Van Assche # but understands '-z linker_flag'. GCC discards it without '$wl', 5990*44704f69SBart Van Assche # but is careful enough not to reorder. 5991*44704f69SBart Van Assche # Supported since Solaris 2.6 (maybe 2.5.1?) 5992*44704f69SBart Van Assche if test yes = "$GCC"; then 5993*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5994*44704f69SBart Van Assche else 5995*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5996*44704f69SBart Van Assche fi 5997*44704f69SBart Van Assche ;; 5998*44704f69SBart Van Assche esac 5999*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=yes 6000*44704f69SBart Van Assche ;; 6001*44704f69SBart Van Assche 6002*44704f69SBart Van Assche sunos4*) 6003*44704f69SBart Van Assche if test sequent = "$host_vendor"; then 6004*44704f69SBart Van Assche # Use $CC to link under sequent, because it throws in some extra .o 6005*44704f69SBart Van Assche # files that make .init and .fini sections work. 6006*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 6007*44704f69SBart Van Assche else 6008*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 6009*44704f69SBart Van Assche fi 6010*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6011*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 6012*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 6013*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6014*44704f69SBart Van Assche ;; 6015*44704f69SBart Van Assche 6016*44704f69SBart Van Assche sysv4) 6017*44704f69SBart Van Assche case $host_vendor in 6018*44704f69SBart Van Assche sni) 6019*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6020*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 6021*44704f69SBart Van Assche ;; 6022*44704f69SBart Van Assche siemens) 6023*44704f69SBart Van Assche ## LD is ld it makes a PLAMLIB 6024*44704f69SBart Van Assche ## CC just makes a GrossModule. 6025*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 6026*44704f69SBart Van Assche _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 6027*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=no 6028*44704f69SBart Van Assche ;; 6029*44704f69SBart Van Assche motorola) 6030*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6031*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6032*44704f69SBart Van Assche ;; 6033*44704f69SBart Van Assche esac 6034*44704f69SBart Van Assche runpath_var='LD_RUN_PATH' 6035*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6036*44704f69SBart Van Assche ;; 6037*44704f69SBart Van Assche 6038*44704f69SBart Van Assche sysv4.3*) 6039*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6040*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6041*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6042*44704f69SBart Van Assche ;; 6043*44704f69SBart Van Assche 6044*44704f69SBart Van Assche sysv4*MP*) 6045*44704f69SBart Van Assche if test -d /usr/nec; then 6046*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6047*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6048*44704f69SBart Van Assche runpath_var=LD_RUN_PATH 6049*44704f69SBart Van Assche hardcode_runpath_var=yes 6050*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=yes 6051*44704f69SBart Van Assche fi 6052*44704f69SBart Van Assche ;; 6053*44704f69SBart Van Assche 6054*44704f69SBart Van Assche sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6055*44704f69SBart Van Assche _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6056*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6057*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6058*44704f69SBart Van Assche runpath_var='LD_RUN_PATH' 6059*44704f69SBart Van Assche 6060*44704f69SBart Van Assche if test yes = "$GCC"; then 6061*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6062*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6063*44704f69SBart Van Assche else 6064*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6065*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6066*44704f69SBart Van Assche fi 6067*44704f69SBart Van Assche ;; 6068*44704f69SBart Van Assche 6069*44704f69SBart Van Assche sysv5* | sco3.2v5* | sco5v6*) 6070*44704f69SBart Van Assche # Note: We CANNOT use -z defs as we might desire, because we do not 6071*44704f69SBart Van Assche # link with -lc, and that would cause any symbols used from libc to 6072*44704f69SBart Van Assche # always be unresolved, which means just about no library would 6073*44704f69SBart Van Assche # ever link correctly. If we're not using GNU ld we use -z text 6074*44704f69SBart Van Assche # though, which does catch some bad symbols but isn't as heavy-handed 6075*44704f69SBart Van Assche # as -z defs. 6076*44704f69SBart Van Assche _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6077*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6078*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6079*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6080*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6081*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6082*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=yes 6083*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6084*44704f69SBart Van Assche runpath_var='LD_RUN_PATH' 6085*44704f69SBart Van Assche 6086*44704f69SBart Van Assche if test yes = "$GCC"; then 6087*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6088*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6089*44704f69SBart Van Assche else 6090*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6091*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6092*44704f69SBart Van Assche fi 6093*44704f69SBart Van Assche ;; 6094*44704f69SBart Van Assche 6095*44704f69SBart Van Assche uts4*) 6096*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6097*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6098*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6099*44704f69SBart Van Assche ;; 6100*44704f69SBart Van Assche 6101*44704f69SBart Van Assche *) 6102*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6103*44704f69SBart Van Assche ;; 6104*44704f69SBart Van Assche esac 6105*44704f69SBart Van Assche 6106*44704f69SBart Van Assche if test sni = "$host_vendor"; then 6107*44704f69SBart Van Assche case $host in 6108*44704f69SBart Van Assche sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6109*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6110*44704f69SBart Van Assche ;; 6111*44704f69SBart Van Assche esac 6112*44704f69SBart Van Assche fi 6113*44704f69SBart Van Assche fi 6114*44704f69SBart Van Assche]) 6115*44704f69SBart Van AsscheAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6116*44704f69SBart Van Asschetest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6117*44704f69SBart Van Assche 6118*44704f69SBart Van Assche_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6119*44704f69SBart Van Assche 6120*44704f69SBart Van Assche_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6121*44704f69SBart Van Assche_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6122*44704f69SBart Van Assche_LT_DECL([], [extract_expsyms_cmds], [2], 6123*44704f69SBart Van Assche [The commands to extract the exported symbol list from a shared archive]) 6124*44704f69SBart Van Assche 6125*44704f69SBart Van Assche# 6126*44704f69SBart Van Assche# Do we need to explicitly link libc? 6127*44704f69SBart Van Assche# 6128*44704f69SBart Van Asschecase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6129*44704f69SBart Van Asschex|xyes) 6130*44704f69SBart Van Assche # Assume -lc should be added 6131*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6132*44704f69SBart Van Assche 6133*44704f69SBart Van Assche if test yes,yes = "$GCC,$enable_shared"; then 6134*44704f69SBart Van Assche case $_LT_TAGVAR(archive_cmds, $1) in 6135*44704f69SBart Van Assche *'~'*) 6136*44704f69SBart Van Assche # FIXME: we may have to deal with multi-command sequences. 6137*44704f69SBart Van Assche ;; 6138*44704f69SBart Van Assche '$CC '*) 6139*44704f69SBart Van Assche # Test whether the compiler implicitly links with -lc since on some 6140*44704f69SBart Van Assche # systems, -lgcc has to come before -lc. If gcc already passes -lc 6141*44704f69SBart Van Assche # to ld, don't add -lc before -lgcc. 6142*44704f69SBart Van Assche AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6143*44704f69SBart Van Assche [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6144*44704f69SBart Van Assche [$RM conftest* 6145*44704f69SBart Van Assche echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6146*44704f69SBart Van Assche 6147*44704f69SBart Van Assche if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6148*44704f69SBart Van Assche soname=conftest 6149*44704f69SBart Van Assche lib=conftest 6150*44704f69SBart Van Assche libobjs=conftest.$ac_objext 6151*44704f69SBart Van Assche deplibs= 6152*44704f69SBart Van Assche wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6153*44704f69SBart Van Assche pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6154*44704f69SBart Van Assche compiler_flags=-v 6155*44704f69SBart Van Assche linker_flags=-v 6156*44704f69SBart Van Assche verstring= 6157*44704f69SBart Van Assche output_objdir=. 6158*44704f69SBart Van Assche libname=conftest 6159*44704f69SBart Van Assche lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6160*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)= 6161*44704f69SBart Van Assche if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6162*44704f69SBart Van Assche then 6163*44704f69SBart Van Assche lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6164*44704f69SBart Van Assche else 6165*44704f69SBart Van Assche lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6166*44704f69SBart Van Assche fi 6167*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6168*44704f69SBart Van Assche else 6169*44704f69SBart Van Assche cat conftest.err 1>&5 6170*44704f69SBart Van Assche fi 6171*44704f69SBart Van Assche $RM conftest* 6172*44704f69SBart Van Assche ]) 6173*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6174*44704f69SBart Van Assche ;; 6175*44704f69SBart Van Assche esac 6176*44704f69SBart Van Assche fi 6177*44704f69SBart Van Assche ;; 6178*44704f69SBart Van Asscheesac 6179*44704f69SBart Van Assche 6180*44704f69SBart Van Assche_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6181*44704f69SBart Van Assche [Whether or not to add -lc for building shared libraries]) 6182*44704f69SBart Van Assche_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6183*44704f69SBart Van Assche [enable_shared_with_static_runtimes], [0], 6184*44704f69SBart Van Assche [Whether or not to disallow shared libs when runtime libs are static]) 6185*44704f69SBart Van Assche_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6186*44704f69SBart Van Assche [Compiler flag to allow reflexive dlopens]) 6187*44704f69SBart Van Assche_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6188*44704f69SBart Van Assche [Compiler flag to generate shared objects directly from archives]) 6189*44704f69SBart Van Assche_LT_TAGDECL([], [compiler_needs_object], [1], 6190*44704f69SBart Van Assche [Whether the compiler copes with passing no objects directly]) 6191*44704f69SBart Van Assche_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6192*44704f69SBart Van Assche [Create an old-style archive from a shared archive]) 6193*44704f69SBart Van Assche_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6194*44704f69SBart Van Assche [Create a temporary old-style archive to link instead of a shared archive]) 6195*44704f69SBart Van Assche_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6196*44704f69SBart Van Assche_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6197*44704f69SBart Van Assche_LT_TAGDECL([], [module_cmds], [2], 6198*44704f69SBart Van Assche [Commands used to build a loadable module if different from building 6199*44704f69SBart Van Assche a shared archive.]) 6200*44704f69SBart Van Assche_LT_TAGDECL([], [module_expsym_cmds], [2]) 6201*44704f69SBart Van Assche_LT_TAGDECL([], [with_gnu_ld], [1], 6202*44704f69SBart Van Assche [Whether we are building with GNU ld or not]) 6203*44704f69SBart Van Assche_LT_TAGDECL([], [allow_undefined_flag], [1], 6204*44704f69SBart Van Assche [Flag that allows shared libraries with undefined symbols to be built]) 6205*44704f69SBart Van Assche_LT_TAGDECL([], [no_undefined_flag], [1], 6206*44704f69SBart Van Assche [Flag that enforces no undefined symbols]) 6207*44704f69SBart Van Assche_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6208*44704f69SBart Van Assche [Flag to hardcode $libdir into a binary during linking. 6209*44704f69SBart Van Assche This must work even if $libdir does not exist]) 6210*44704f69SBart Van Assche_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6211*44704f69SBart Van Assche [Whether we need a single "-rpath" flag with a separated argument]) 6212*44704f69SBart Van Assche_LT_TAGDECL([], [hardcode_direct], [0], 6213*44704f69SBart Van Assche [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6214*44704f69SBart Van Assche DIR into the resulting binary]) 6215*44704f69SBart Van Assche_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6216*44704f69SBart Van Assche [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6217*44704f69SBart Van Assche DIR into the resulting binary and the resulting library dependency is 6218*44704f69SBart Van Assche "absolute", i.e impossible to change by setting $shlibpath_var if the 6219*44704f69SBart Van Assche library is relocated]) 6220*44704f69SBart Van Assche_LT_TAGDECL([], [hardcode_minus_L], [0], 6221*44704f69SBart Van Assche [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6222*44704f69SBart Van Assche into the resulting binary]) 6223*44704f69SBart Van Assche_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6224*44704f69SBart Van Assche [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6225*44704f69SBart Van Assche into the resulting binary]) 6226*44704f69SBart Van Assche_LT_TAGDECL([], [hardcode_automatic], [0], 6227*44704f69SBart Van Assche [Set to "yes" if building a shared library automatically hardcodes DIR 6228*44704f69SBart Van Assche into the library and all subsequent libraries and executables linked 6229*44704f69SBart Van Assche against it]) 6230*44704f69SBart Van Assche_LT_TAGDECL([], [inherit_rpath], [0], 6231*44704f69SBart Van Assche [Set to yes if linker adds runtime paths of dependent libraries 6232*44704f69SBart Van Assche to runtime path list]) 6233*44704f69SBart Van Assche_LT_TAGDECL([], [link_all_deplibs], [0], 6234*44704f69SBart Van Assche [Whether libtool must link a program against all its dependency libraries]) 6235*44704f69SBart Van Assche_LT_TAGDECL([], [always_export_symbols], [0], 6236*44704f69SBart Van Assche [Set to "yes" if exported symbols are required]) 6237*44704f69SBart Van Assche_LT_TAGDECL([], [export_symbols_cmds], [2], 6238*44704f69SBart Van Assche [The commands to list exported symbols]) 6239*44704f69SBart Van Assche_LT_TAGDECL([], [exclude_expsyms], [1], 6240*44704f69SBart Van Assche [Symbols that should not be listed in the preloaded symbols]) 6241*44704f69SBart Van Assche_LT_TAGDECL([], [include_expsyms], [1], 6242*44704f69SBart Van Assche [Symbols that must always be exported]) 6243*44704f69SBart Van Assche_LT_TAGDECL([], [prelink_cmds], [2], 6244*44704f69SBart Van Assche [Commands necessary for linking programs (against libraries) with templates]) 6245*44704f69SBart Van Assche_LT_TAGDECL([], [postlink_cmds], [2], 6246*44704f69SBart Van Assche [Commands necessary for finishing linking programs]) 6247*44704f69SBart Van Assche_LT_TAGDECL([], [file_list_spec], [1], 6248*44704f69SBart Van Assche [Specify filename containing input files]) 6249*44704f69SBart Van Asschednl FIXME: Not yet implemented 6250*44704f69SBart Van Asschednl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6251*44704f69SBart Van Asschednl [Compiler flag to generate thread safe objects]) 6252*44704f69SBart Van Assche])# _LT_LINKER_SHLIBS 6253*44704f69SBart Van Assche 6254*44704f69SBart Van Assche 6255*44704f69SBart Van Assche# _LT_LANG_C_CONFIG([TAG]) 6256*44704f69SBart Van Assche# ------------------------ 6257*44704f69SBart Van Assche# Ensure that the configuration variables for a C compiler are suitably 6258*44704f69SBart Van Assche# defined. These variables are subsequently used by _LT_CONFIG to write 6259*44704f69SBart Van Assche# the compiler configuration to 'libtool'. 6260*44704f69SBart Van Asschem4_defun([_LT_LANG_C_CONFIG], 6261*44704f69SBart Van Assche[m4_require([_LT_DECL_EGREP])dnl 6262*44704f69SBart Van Asschelt_save_CC=$CC 6263*44704f69SBart Van AsscheAC_LANG_PUSH(C) 6264*44704f69SBart Van Assche 6265*44704f69SBart Van Assche# Source file extension for C test sources. 6266*44704f69SBart Van Asscheac_ext=c 6267*44704f69SBart Van Assche 6268*44704f69SBart Van Assche# Object file extension for compiled C test sources. 6269*44704f69SBart Van Asscheobjext=o 6270*44704f69SBart Van Assche_LT_TAGVAR(objext, $1)=$objext 6271*44704f69SBart Van Assche 6272*44704f69SBart Van Assche# Code to be used in simple compile tests 6273*44704f69SBart Van Asschelt_simple_compile_test_code="int some_variable = 0;" 6274*44704f69SBart Van Assche 6275*44704f69SBart Van Assche# Code to be used in simple link tests 6276*44704f69SBart Van Asschelt_simple_link_test_code='int main(){return(0);}' 6277*44704f69SBart Van Assche 6278*44704f69SBart Van Assche_LT_TAG_COMPILER 6279*44704f69SBart Van Assche# Save the default compiler, since it gets overwritten when the other 6280*44704f69SBart Van Assche# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6281*44704f69SBart Van Asschecompiler_DEFAULT=$CC 6282*44704f69SBart Van Assche 6283*44704f69SBart Van Assche# save warnings/boilerplate of simple test code 6284*44704f69SBart Van Assche_LT_COMPILER_BOILERPLATE 6285*44704f69SBart Van Assche_LT_LINKER_BOILERPLATE 6286*44704f69SBart Van Assche 6287*44704f69SBart Van Asscheif test -n "$compiler"; then 6288*44704f69SBart Van Assche _LT_COMPILER_NO_RTTI($1) 6289*44704f69SBart Van Assche _LT_COMPILER_PIC($1) 6290*44704f69SBart Van Assche _LT_COMPILER_C_O($1) 6291*44704f69SBart Van Assche _LT_COMPILER_FILE_LOCKS($1) 6292*44704f69SBart Van Assche _LT_LINKER_SHLIBS($1) 6293*44704f69SBart Van Assche _LT_SYS_DYNAMIC_LINKER($1) 6294*44704f69SBart Van Assche _LT_LINKER_HARDCODE_LIBPATH($1) 6295*44704f69SBart Van Assche LT_SYS_DLOPEN_SELF 6296*44704f69SBart Van Assche _LT_CMD_STRIPLIB 6297*44704f69SBart Van Assche 6298*44704f69SBart Van Assche # Report what library types will actually be built 6299*44704f69SBart Van Assche AC_MSG_CHECKING([if libtool supports shared libraries]) 6300*44704f69SBart Van Assche AC_MSG_RESULT([$can_build_shared]) 6301*44704f69SBart Van Assche 6302*44704f69SBart Van Assche AC_MSG_CHECKING([whether to build shared libraries]) 6303*44704f69SBart Van Assche test no = "$can_build_shared" && enable_shared=no 6304*44704f69SBart Van Assche 6305*44704f69SBart Van Assche # On AIX, shared libraries and static libraries use the same namespace, and 6306*44704f69SBart Van Assche # are all built from PIC. 6307*44704f69SBart Van Assche case $host_os in 6308*44704f69SBart Van Assche aix3*) 6309*44704f69SBart Van Assche test yes = "$enable_shared" && enable_static=no 6310*44704f69SBart Van Assche if test -n "$RANLIB"; then 6311*44704f69SBart Van Assche archive_cmds="$archive_cmds~\$RANLIB \$lib" 6312*44704f69SBart Van Assche postinstall_cmds='$RANLIB $lib' 6313*44704f69SBart Van Assche fi 6314*44704f69SBart Van Assche ;; 6315*44704f69SBart Van Assche 6316*44704f69SBart Van Assche aix[[4-9]]*) 6317*44704f69SBart Van Assche if test ia64 != "$host_cpu"; then 6318*44704f69SBart Van Assche case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6319*44704f69SBart Van Assche yes,aix,yes) ;; # shared object as lib.so file only 6320*44704f69SBart Van Assche yes,svr4,*) ;; # shared object as lib.so archive member only 6321*44704f69SBart Van Assche yes,*) enable_static=no ;; # shared object in lib.a archive as well 6322*44704f69SBart Van Assche esac 6323*44704f69SBart Van Assche fi 6324*44704f69SBart Van Assche ;; 6325*44704f69SBart Van Assche esac 6326*44704f69SBart Van Assche AC_MSG_RESULT([$enable_shared]) 6327*44704f69SBart Van Assche 6328*44704f69SBart Van Assche AC_MSG_CHECKING([whether to build static libraries]) 6329*44704f69SBart Van Assche # Make sure either enable_shared or enable_static is yes. 6330*44704f69SBart Van Assche test yes = "$enable_shared" || enable_static=yes 6331*44704f69SBart Van Assche AC_MSG_RESULT([$enable_static]) 6332*44704f69SBart Van Assche 6333*44704f69SBart Van Assche _LT_CONFIG($1) 6334*44704f69SBart Van Asschefi 6335*44704f69SBart Van AsscheAC_LANG_POP 6336*44704f69SBart Van AsscheCC=$lt_save_CC 6337*44704f69SBart Van Assche])# _LT_LANG_C_CONFIG 6338*44704f69SBart Van Assche 6339*44704f69SBart Van Assche 6340*44704f69SBart Van Assche# _LT_LANG_CXX_CONFIG([TAG]) 6341*44704f69SBart Van Assche# -------------------------- 6342*44704f69SBart Van Assche# Ensure that the configuration variables for a C++ compiler are suitably 6343*44704f69SBart Van Assche# defined. These variables are subsequently used by _LT_CONFIG to write 6344*44704f69SBart Van Assche# the compiler configuration to 'libtool'. 6345*44704f69SBart Van Asschem4_defun([_LT_LANG_CXX_CONFIG], 6346*44704f69SBart Van Assche[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6347*44704f69SBart Van Asschem4_require([_LT_DECL_EGREP])dnl 6348*44704f69SBart Van Asschem4_require([_LT_PATH_MANIFEST_TOOL])dnl 6349*44704f69SBart Van Asscheif test -n "$CXX" && ( test no != "$CXX" && 6350*44704f69SBart Van Assche ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6351*44704f69SBart Van Assche (test g++ != "$CXX"))); then 6352*44704f69SBart Van Assche AC_PROG_CXXCPP 6353*44704f69SBart Van Asscheelse 6354*44704f69SBart Van Assche _lt_caught_CXX_error=yes 6355*44704f69SBart Van Asschefi 6356*44704f69SBart Van Assche 6357*44704f69SBart Van AsscheAC_LANG_PUSH(C++) 6358*44704f69SBart Van Assche_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6359*44704f69SBart Van Assche_LT_TAGVAR(allow_undefined_flag, $1)= 6360*44704f69SBart Van Assche_LT_TAGVAR(always_export_symbols, $1)=no 6361*44704f69SBart Van Assche_LT_TAGVAR(archive_expsym_cmds, $1)= 6362*44704f69SBart Van Assche_LT_TAGVAR(compiler_needs_object, $1)=no 6363*44704f69SBart Van Assche_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6364*44704f69SBart Van Assche_LT_TAGVAR(hardcode_direct, $1)=no 6365*44704f69SBart Van Assche_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6366*44704f69SBart Van Assche_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6367*44704f69SBart Van Assche_LT_TAGVAR(hardcode_libdir_separator, $1)= 6368*44704f69SBart Van Assche_LT_TAGVAR(hardcode_minus_L, $1)=no 6369*44704f69SBart Van Assche_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6370*44704f69SBart Van Assche_LT_TAGVAR(hardcode_automatic, $1)=no 6371*44704f69SBart Van Assche_LT_TAGVAR(inherit_rpath, $1)=no 6372*44704f69SBart Van Assche_LT_TAGVAR(module_cmds, $1)= 6373*44704f69SBart Van Assche_LT_TAGVAR(module_expsym_cmds, $1)= 6374*44704f69SBart Van Assche_LT_TAGVAR(link_all_deplibs, $1)=unknown 6375*44704f69SBart Van Assche_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6376*44704f69SBart Van Assche_LT_TAGVAR(reload_flag, $1)=$reload_flag 6377*44704f69SBart Van Assche_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6378*44704f69SBart Van Assche_LT_TAGVAR(no_undefined_flag, $1)= 6379*44704f69SBart Van Assche_LT_TAGVAR(whole_archive_flag_spec, $1)= 6380*44704f69SBart Van Assche_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6381*44704f69SBart Van Assche 6382*44704f69SBart Van Assche# Source file extension for C++ test sources. 6383*44704f69SBart Van Asscheac_ext=cpp 6384*44704f69SBart Van Assche 6385*44704f69SBart Van Assche# Object file extension for compiled C++ test sources. 6386*44704f69SBart Van Asscheobjext=o 6387*44704f69SBart Van Assche_LT_TAGVAR(objext, $1)=$objext 6388*44704f69SBart Van Assche 6389*44704f69SBart Van Assche# No sense in running all these tests if we already determined that 6390*44704f69SBart Van Assche# the CXX compiler isn't working. Some variables (like enable_shared) 6391*44704f69SBart Van Assche# are currently assumed to apply to all compilers on this platform, 6392*44704f69SBart Van Assche# and will be corrupted by setting them based on a non-working compiler. 6393*44704f69SBart Van Asscheif test yes != "$_lt_caught_CXX_error"; then 6394*44704f69SBart Van Assche # Code to be used in simple compile tests 6395*44704f69SBart Van Assche lt_simple_compile_test_code="int some_variable = 0;" 6396*44704f69SBart Van Assche 6397*44704f69SBart Van Assche # Code to be used in simple link tests 6398*44704f69SBart Van Assche lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6399*44704f69SBart Van Assche 6400*44704f69SBart Van Assche # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6401*44704f69SBart Van Assche _LT_TAG_COMPILER 6402*44704f69SBart Van Assche 6403*44704f69SBart Van Assche # save warnings/boilerplate of simple test code 6404*44704f69SBart Van Assche _LT_COMPILER_BOILERPLATE 6405*44704f69SBart Van Assche _LT_LINKER_BOILERPLATE 6406*44704f69SBart Van Assche 6407*44704f69SBart Van Assche # Allow CC to be a program name with arguments. 6408*44704f69SBart Van Assche lt_save_CC=$CC 6409*44704f69SBart Van Assche lt_save_CFLAGS=$CFLAGS 6410*44704f69SBart Van Assche lt_save_LD=$LD 6411*44704f69SBart Van Assche lt_save_GCC=$GCC 6412*44704f69SBart Van Assche GCC=$GXX 6413*44704f69SBart Van Assche lt_save_with_gnu_ld=$with_gnu_ld 6414*44704f69SBart Van Assche lt_save_path_LD=$lt_cv_path_LD 6415*44704f69SBart Van Assche if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6416*44704f69SBart Van Assche lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6417*44704f69SBart Van Assche else 6418*44704f69SBart Van Assche $as_unset lt_cv_prog_gnu_ld 6419*44704f69SBart Van Assche fi 6420*44704f69SBart Van Assche if test -n "${lt_cv_path_LDCXX+set}"; then 6421*44704f69SBart Van Assche lt_cv_path_LD=$lt_cv_path_LDCXX 6422*44704f69SBart Van Assche else 6423*44704f69SBart Van Assche $as_unset lt_cv_path_LD 6424*44704f69SBart Van Assche fi 6425*44704f69SBart Van Assche test -z "${LDCXX+set}" || LD=$LDCXX 6426*44704f69SBart Van Assche CC=${CXX-"c++"} 6427*44704f69SBart Van Assche CFLAGS=$CXXFLAGS 6428*44704f69SBart Van Assche compiler=$CC 6429*44704f69SBart Van Assche _LT_TAGVAR(compiler, $1)=$CC 6430*44704f69SBart Van Assche _LT_CC_BASENAME([$compiler]) 6431*44704f69SBart Van Assche 6432*44704f69SBart Van Assche if test -n "$compiler"; then 6433*44704f69SBart Van Assche # We don't want -fno-exception when compiling C++ code, so set the 6434*44704f69SBart Van Assche # no_builtin_flag separately 6435*44704f69SBart Van Assche if test yes = "$GXX"; then 6436*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6437*44704f69SBart Van Assche else 6438*44704f69SBart Van Assche _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6439*44704f69SBart Van Assche fi 6440*44704f69SBart Van Assche 6441*44704f69SBart Van Assche if test yes = "$GXX"; then 6442*44704f69SBart Van Assche # Set up default GNU C++ configuration 6443*44704f69SBart Van Assche 6444*44704f69SBart Van Assche LT_PATH_LD 6445*44704f69SBart Van Assche 6446*44704f69SBart Van Assche # Check if GNU C++ uses GNU ld as the underlying linker, since the 6447*44704f69SBart Van Assche # archiving commands below assume that GNU ld is being used. 6448*44704f69SBart Van Assche if test yes = "$with_gnu_ld"; then 6449*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6450*44704f69SBart Van Assche _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' 6451*44704f69SBart Van Assche 6452*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6453*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6454*44704f69SBart Van Assche 6455*44704f69SBart Van Assche # If archive_cmds runs LD, not CC, wlarc should be empty 6456*44704f69SBart Van Assche # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6457*44704f69SBart Van Assche # investigate it a little bit more. (MM) 6458*44704f69SBart Van Assche wlarc='$wl' 6459*44704f69SBart Van Assche 6460*44704f69SBart Van Assche # ancient GNU ld didn't support --whole-archive et. al. 6461*44704f69SBart Van Assche if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6462*44704f69SBart Van Assche $GREP 'no-whole-archive' > /dev/null; then 6463*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6464*44704f69SBart Van Assche else 6465*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)= 6466*44704f69SBart Van Assche fi 6467*44704f69SBart Van Assche else 6468*44704f69SBart Van Assche with_gnu_ld=no 6469*44704f69SBart Van Assche wlarc= 6470*44704f69SBart Van Assche 6471*44704f69SBart Van Assche # A generic and very simple default shared library creation 6472*44704f69SBart Van Assche # command for GNU C++ for the case where it uses the native 6473*44704f69SBart Van Assche # linker, instead of GNU ld. If possible, this setting should 6474*44704f69SBart Van Assche # overridden to take advantage of the native linker features on 6475*44704f69SBart Van Assche # the platform it is being used on. 6476*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6477*44704f69SBart Van Assche fi 6478*44704f69SBart Van Assche 6479*44704f69SBart Van Assche # Commands to make compiler produce verbose output that lists 6480*44704f69SBart Van Assche # what "hidden" libraries, object files and flags are used when 6481*44704f69SBart Van Assche # linking a shared library. 6482*44704f69SBart Van Assche output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' 6483*44704f69SBart Van Assche 6484*44704f69SBart Van Assche else 6485*44704f69SBart Van Assche GXX=no 6486*44704f69SBart Van Assche with_gnu_ld=no 6487*44704f69SBart Van Assche wlarc= 6488*44704f69SBart Van Assche fi 6489*44704f69SBart Van Assche 6490*44704f69SBart Van Assche # PORTME: fill in a description of your system's C++ link characteristics 6491*44704f69SBart Van Assche AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6492*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=yes 6493*44704f69SBart Van Assche case $host_os in 6494*44704f69SBart Van Assche aix3*) 6495*44704f69SBart Van Assche # FIXME: insert proper C++ library support 6496*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6497*44704f69SBart Van Assche ;; 6498*44704f69SBart Van Assche aix[[4-9]]*) 6499*44704f69SBart Van Assche if test ia64 = "$host_cpu"; then 6500*44704f69SBart Van Assche # On IA64, the linker does run time linking by default, so we don't 6501*44704f69SBart Van Assche # have to do anything special. 6502*44704f69SBart Van Assche aix_use_runtimelinking=no 6503*44704f69SBart Van Assche exp_sym_flag='-Bexport' 6504*44704f69SBart Van Assche no_entry_flag= 6505*44704f69SBart Van Assche else 6506*44704f69SBart Van Assche aix_use_runtimelinking=no 6507*44704f69SBart Van Assche 6508*44704f69SBart Van Assche # Test if we are trying to use run time linking or normal 6509*44704f69SBart Van Assche # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6510*44704f69SBart Van Assche # have runtime linking enabled, and use it for executables. 6511*44704f69SBart Van Assche # For shared libraries, we enable/disable runtime linking 6512*44704f69SBart Van Assche # depending on the kind of the shared library created - 6513*44704f69SBart Van Assche # when "with_aix_soname,aix_use_runtimelinking" is: 6514*44704f69SBart Van Assche # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6515*44704f69SBart Van Assche # "aix,yes" lib.so shared, rtl:yes, for executables 6516*44704f69SBart Van Assche # lib.a static archive 6517*44704f69SBart Van Assche # "both,no" lib.so.V(shr.o) shared, rtl:yes 6518*44704f69SBart Van Assche # lib.a(lib.so.V) shared, rtl:no, for executables 6519*44704f69SBart Van Assche # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6520*44704f69SBart Van Assche # lib.a(lib.so.V) shared, rtl:no 6521*44704f69SBart Van Assche # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6522*44704f69SBart Van Assche # lib.a static archive 6523*44704f69SBart Van Assche case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6524*44704f69SBart Van Assche for ld_flag in $LDFLAGS; do 6525*44704f69SBart Van Assche case $ld_flag in 6526*44704f69SBart Van Assche *-brtl*) 6527*44704f69SBart Van Assche aix_use_runtimelinking=yes 6528*44704f69SBart Van Assche break 6529*44704f69SBart Van Assche ;; 6530*44704f69SBart Van Assche esac 6531*44704f69SBart Van Assche done 6532*44704f69SBart Van Assche if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6533*44704f69SBart Van Assche # With aix-soname=svr4, we create the lib.so.V shared archives only, 6534*44704f69SBart Van Assche # so we don't have lib.a shared libs to link our executables. 6535*44704f69SBart Van Assche # We have to force runtime linking in this case. 6536*44704f69SBart Van Assche aix_use_runtimelinking=yes 6537*44704f69SBart Van Assche LDFLAGS="$LDFLAGS -Wl,-brtl" 6538*44704f69SBart Van Assche fi 6539*44704f69SBart Van Assche ;; 6540*44704f69SBart Van Assche esac 6541*44704f69SBart Van Assche 6542*44704f69SBart Van Assche exp_sym_flag='-bexport' 6543*44704f69SBart Van Assche no_entry_flag='-bnoentry' 6544*44704f69SBart Van Assche fi 6545*44704f69SBart Van Assche 6546*44704f69SBart Van Assche # When large executables or shared objects are built, AIX ld can 6547*44704f69SBart Van Assche # have problems creating the table of contents. If linking a library 6548*44704f69SBart Van Assche # or program results in "error TOC overflow" add -mminimal-toc to 6549*44704f69SBart Van Assche # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6550*44704f69SBart Van Assche # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6551*44704f69SBart Van Assche 6552*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='' 6553*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 6554*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6555*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6556*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=yes 6557*44704f69SBart Van Assche _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6558*44704f69SBart Van Assche case $with_aix_soname,$aix_use_runtimelinking in 6559*44704f69SBart Van Assche aix,*) ;; # no import file 6560*44704f69SBart Van Assche svr4,* | *,yes) # use import file 6561*44704f69SBart Van Assche # The Import File defines what to hardcode. 6562*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=no 6563*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6564*44704f69SBart Van Assche ;; 6565*44704f69SBart Van Assche esac 6566*44704f69SBart Van Assche 6567*44704f69SBart Van Assche if test yes = "$GXX"; then 6568*44704f69SBart Van Assche case $host_os in aix4.[[012]]|aix4.[[012]].*) 6569*44704f69SBart Van Assche # We only want to do this on AIX 4.2 and lower, the check 6570*44704f69SBart Van Assche # below for broken collect2 doesn't work under 4.3+ 6571*44704f69SBart Van Assche collect2name=`$CC -print-prog-name=collect2` 6572*44704f69SBart Van Assche if test -f "$collect2name" && 6573*44704f69SBart Van Assche strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6574*44704f69SBart Van Assche then 6575*44704f69SBart Van Assche # We have reworked collect2 6576*44704f69SBart Van Assche : 6577*44704f69SBart Van Assche else 6578*44704f69SBart Van Assche # We have old collect2 6579*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=unsupported 6580*44704f69SBart Van Assche # It fails to find uninstalled libraries when the uninstalled 6581*44704f69SBart Van Assche # path is not listed in the libpath. Setting hardcode_minus_L 6582*44704f69SBart Van Assche # to unsupported forces relinking 6583*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 6584*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6585*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)= 6586*44704f69SBart Van Assche fi 6587*44704f69SBart Van Assche esac 6588*44704f69SBart Van Assche shared_flag='-shared' 6589*44704f69SBart Van Assche if test yes = "$aix_use_runtimelinking"; then 6590*44704f69SBart Van Assche shared_flag=$shared_flag' $wl-G' 6591*44704f69SBart Van Assche fi 6592*44704f69SBart Van Assche # Need to ensure runtime linking is disabled for the traditional 6593*44704f69SBart Van Assche # shared library, or the linker may eventually find shared libraries 6594*44704f69SBart Van Assche # /with/ Import File - we do not want to mix them. 6595*44704f69SBart Van Assche shared_flag_aix='-shared' 6596*44704f69SBart Van Assche shared_flag_svr4='-shared $wl-G' 6597*44704f69SBart Van Assche else 6598*44704f69SBart Van Assche # not using gcc 6599*44704f69SBart Van Assche if test ia64 = "$host_cpu"; then 6600*44704f69SBart Van Assche # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6601*44704f69SBart Van Assche # chokes on -Wl,-G. The following line is correct: 6602*44704f69SBart Van Assche shared_flag='-G' 6603*44704f69SBart Van Assche else 6604*44704f69SBart Van Assche if test yes = "$aix_use_runtimelinking"; then 6605*44704f69SBart Van Assche shared_flag='$wl-G' 6606*44704f69SBart Van Assche else 6607*44704f69SBart Van Assche shared_flag='$wl-bM:SRE' 6608*44704f69SBart Van Assche fi 6609*44704f69SBart Van Assche shared_flag_aix='$wl-bM:SRE' 6610*44704f69SBart Van Assche shared_flag_svr4='$wl-G' 6611*44704f69SBart Van Assche fi 6612*44704f69SBart Van Assche fi 6613*44704f69SBart Van Assche 6614*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6615*44704f69SBart Van Assche # It seems that -bexpall does not export symbols beginning with 6616*44704f69SBart Van Assche # underscore (_), so it is better to generate a list of symbols to 6617*44704f69SBart Van Assche # export. 6618*44704f69SBart Van Assche _LT_TAGVAR(always_export_symbols, $1)=yes 6619*44704f69SBart Van Assche if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6620*44704f69SBart Van Assche # Warning - without using the other runtime loading flags (-brtl), 6621*44704f69SBart Van Assche # -berok will link without error, but may produce a broken library. 6622*44704f69SBart Van Assche # The "-G" linker flag allows undefined symbols. 6623*44704f69SBart Van Assche _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6624*44704f69SBart Van Assche # Determine the default libpath from the value encoded in an empty 6625*44704f69SBart Van Assche # executable. 6626*44704f69SBart Van Assche _LT_SYS_MODULE_PATH_AIX([$1]) 6627*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6628*44704f69SBart Van Assche 6629*44704f69SBart Van Assche _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 6630*44704f69SBart Van Assche else 6631*44704f69SBart Van Assche if test ia64 = "$host_cpu"; then 6632*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6633*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6634*44704f69SBart Van Assche _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" 6635*44704f69SBart Van Assche else 6636*44704f69SBart Van Assche # Determine the default libpath from the value encoded in an 6637*44704f69SBart Van Assche # empty executable. 6638*44704f69SBart Van Assche _LT_SYS_MODULE_PATH_AIX([$1]) 6639*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6640*44704f69SBart Van Assche # Warning - without using the other run time loading flags, 6641*44704f69SBart Van Assche # -berok will link without error, but may produce a broken library. 6642*44704f69SBart Van Assche _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6643*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6644*44704f69SBart Van Assche if test yes = "$with_gnu_ld"; then 6645*44704f69SBart Van Assche # We only use this code for GNU lds that support --whole-archive. 6646*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6647*44704f69SBart Van Assche else 6648*44704f69SBart Van Assche # Exported symbols can be pulled into shared objects from archives 6649*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6650*44704f69SBart Van Assche fi 6651*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6652*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6653*44704f69SBart Van Assche # -brtl affects multiple linker settings, -berok does not and is overridden later 6654*44704f69SBart Van Assche compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6655*44704f69SBart Van Assche if test svr4 != "$with_aix_soname"; then 6656*44704f69SBart Van Assche # This is similar to how AIX traditionally builds its shared 6657*44704f69SBart Van Assche # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6658*44704f69SBart Van Assche _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' 6659*44704f69SBart Van Assche fi 6660*44704f69SBart Van Assche if test aix != "$with_aix_soname"; then 6661*44704f69SBart Van Assche _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' 6662*44704f69SBart Van Assche else 6663*44704f69SBart Van Assche # used by -dlpreopen to get the symbols 6664*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6665*44704f69SBart Van Assche fi 6666*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6667*44704f69SBart Van Assche fi 6668*44704f69SBart Van Assche fi 6669*44704f69SBart Van Assche ;; 6670*44704f69SBart Van Assche 6671*44704f69SBart Van Assche beos*) 6672*44704f69SBart Van Assche if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6673*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6674*44704f69SBart Van Assche # Joseph Beckenbach <[email protected]> says some releases of gcc 6675*44704f69SBart Van Assche # support --undefined. This deserves some investigation. FIXME 6676*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6677*44704f69SBart Van Assche else 6678*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6679*44704f69SBart Van Assche fi 6680*44704f69SBart Van Assche ;; 6681*44704f69SBart Van Assche 6682*44704f69SBart Van Assche chorus*) 6683*44704f69SBart Van Assche case $cc_basename in 6684*44704f69SBart Van Assche *) 6685*44704f69SBart Van Assche # FIXME: insert proper C++ library support 6686*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6687*44704f69SBart Van Assche ;; 6688*44704f69SBart Van Assche esac 6689*44704f69SBart Van Assche ;; 6690*44704f69SBart Van Assche 6691*44704f69SBart Van Assche cygwin* | mingw* | pw32* | cegcc*) 6692*44704f69SBart Van Assche case $GXX,$cc_basename in 6693*44704f69SBart Van Assche ,cl* | no,cl* | ,icl* | no,icl*) 6694*44704f69SBart Van Assche # Native MSVC or ICC 6695*44704f69SBart Van Assche # hardcode_libdir_flag_spec is actually meaningless, as there is 6696*44704f69SBart Van Assche # no search path for DLLs. 6697*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6698*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6699*44704f69SBart Van Assche _LT_TAGVAR(always_export_symbols, $1)=yes 6700*44704f69SBart Van Assche _LT_TAGVAR(file_list_spec, $1)='@' 6701*44704f69SBart Van Assche # Tell ltmain to make .lib files, not .a files. 6702*44704f69SBart Van Assche libext=lib 6703*44704f69SBart Van Assche # Tell ltmain to make .dll files, not .so files. 6704*44704f69SBart Van Assche shrext_cmds=.dll 6705*44704f69SBart Van Assche # FIXME: Setting linknames here is a bad hack. 6706*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6707*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6708*44704f69SBart Van Assche cp "$export_symbols" "$output_objdir/$soname.def"; 6709*44704f69SBart Van Assche echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6710*44704f69SBart Van Assche else 6711*44704f69SBart Van Assche $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6712*44704f69SBart Van Assche fi~ 6713*44704f69SBart Van Assche $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6714*44704f69SBart Van Assche linknames=' 6715*44704f69SBart Van Assche # The linker will not automatically build a static lib if we build a DLL. 6716*44704f69SBart Van Assche # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6717*44704f69SBart Van Assche _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6718*44704f69SBart Van Assche # Don't use ranlib 6719*44704f69SBart Van Assche _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6720*44704f69SBart Van Assche _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6721*44704f69SBart Van Assche lt_tool_outputfile="@TOOL_OUTPUT@"~ 6722*44704f69SBart Van Assche case $lt_outputfile in 6723*44704f69SBart Van Assche *.exe|*.EXE) ;; 6724*44704f69SBart Van Assche *) 6725*44704f69SBart Van Assche lt_outputfile=$lt_outputfile.exe 6726*44704f69SBart Van Assche lt_tool_outputfile=$lt_tool_outputfile.exe 6727*44704f69SBart Van Assche ;; 6728*44704f69SBart Van Assche esac~ 6729*44704f69SBart Van Assche func_to_tool_file "$lt_outputfile"~ 6730*44704f69SBart Van Assche if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6731*44704f69SBart Van Assche $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6732*44704f69SBart Van Assche $RM "$lt_outputfile.manifest"; 6733*44704f69SBart Van Assche fi' 6734*44704f69SBart Van Assche ;; 6735*44704f69SBart Van Assche *) 6736*44704f69SBart Van Assche # g++ 6737*44704f69SBart Van Assche # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6738*44704f69SBart Van Assche # as there is no search path for DLLs. 6739*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6740*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6741*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6742*44704f69SBart Van Assche _LT_TAGVAR(always_export_symbols, $1)=no 6743*44704f69SBart Van Assche _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6744*44704f69SBart Van Assche 6745*44704f69SBart Van Assche if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6746*44704f69SBart Van Assche _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' 6747*44704f69SBart Van Assche # If the export-symbols file already is a .def file, use it as 6748*44704f69SBart Van Assche # is; otherwise, prepend EXPORTS... 6749*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6750*44704f69SBart Van Assche cp $export_symbols $output_objdir/$soname.def; 6751*44704f69SBart Van Assche else 6752*44704f69SBart Van Assche echo EXPORTS > $output_objdir/$soname.def; 6753*44704f69SBart Van Assche cat $export_symbols >> $output_objdir/$soname.def; 6754*44704f69SBart Van Assche fi~ 6755*44704f69SBart Van Assche $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' 6756*44704f69SBart Van Assche else 6757*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6758*44704f69SBart Van Assche fi 6759*44704f69SBart Van Assche ;; 6760*44704f69SBart Van Assche esac 6761*44704f69SBart Van Assche ;; 6762*44704f69SBart Van Assche darwin* | rhapsody*) 6763*44704f69SBart Van Assche _LT_DARWIN_LINKER_FEATURES($1) 6764*44704f69SBart Van Assche ;; 6765*44704f69SBart Van Assche 6766*44704f69SBart Van Assche os2*) 6767*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6768*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes 6769*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6770*44704f69SBart Van Assche shrext_cmds=.dll 6771*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6772*44704f69SBart Van Assche $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6773*44704f69SBart Van Assche $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6774*44704f69SBart Van Assche $ECHO EXPORTS >> $output_objdir/$libname.def~ 6775*44704f69SBart Van Assche emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6776*44704f69SBart Van Assche $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6777*44704f69SBart Van Assche emximp -o $lib $output_objdir/$libname.def' 6778*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6779*44704f69SBart Van Assche $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6780*44704f69SBart Van Assche $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6781*44704f69SBart Van Assche $ECHO EXPORTS >> $output_objdir/$libname.def~ 6782*44704f69SBart Van Assche prefix_cmds="$SED"~ 6783*44704f69SBart Van Assche if test EXPORTS = "`$SED 1q $export_symbols`"; then 6784*44704f69SBart Van Assche prefix_cmds="$prefix_cmds -e 1d"; 6785*44704f69SBart Van Assche fi~ 6786*44704f69SBart Van Assche prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6787*44704f69SBart Van Assche cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6788*44704f69SBart Van Assche $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6789*44704f69SBart Van Assche emximp -o $lib $output_objdir/$libname.def' 6790*44704f69SBart Van Assche _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6791*44704f69SBart Van Assche _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6792*44704f69SBart Van Assche _LT_TAGVAR(file_list_spec, $1)='@' 6793*44704f69SBart Van Assche ;; 6794*44704f69SBart Van Assche 6795*44704f69SBart Van Assche dgux*) 6796*44704f69SBart Van Assche case $cc_basename in 6797*44704f69SBart Van Assche ec++*) 6798*44704f69SBart Van Assche # FIXME: insert proper C++ library support 6799*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6800*44704f69SBart Van Assche ;; 6801*44704f69SBart Van Assche ghcx*) 6802*44704f69SBart Van Assche # Green Hills C++ Compiler 6803*44704f69SBart Van Assche # FIXME: insert proper C++ library support 6804*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6805*44704f69SBart Van Assche ;; 6806*44704f69SBart Van Assche *) 6807*44704f69SBart Van Assche # FIXME: insert proper C++ library support 6808*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6809*44704f69SBart Van Assche ;; 6810*44704f69SBart Van Assche esac 6811*44704f69SBart Van Assche ;; 6812*44704f69SBart Van Assche 6813*44704f69SBart Van Assche freebsd2.*) 6814*44704f69SBart Van Assche # C++ shared libraries reported to be fairly broken before 6815*44704f69SBart Van Assche # switch to ELF 6816*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6817*44704f69SBart Van Assche ;; 6818*44704f69SBart Van Assche 6819*44704f69SBart Van Assche freebsd-elf*) 6820*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6821*44704f69SBart Van Assche ;; 6822*44704f69SBart Van Assche 6823*44704f69SBart Van Assche freebsd* | dragonfly* | midnightbsd*) 6824*44704f69SBart Van Assche # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6825*44704f69SBart Van Assche # conventions 6826*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=yes 6827*44704f69SBart Van Assche ;; 6828*44704f69SBart Van Assche 6829*44704f69SBart Van Assche haiku*) 6830*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6831*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=yes 6832*44704f69SBart Van Assche ;; 6833*44704f69SBart Van Assche 6834*44704f69SBart Van Assche hpux9*) 6835*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6836*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6837*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6838*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 6839*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6840*44704f69SBart Van Assche # but as the default 6841*44704f69SBart Van Assche # location of the library. 6842*44704f69SBart Van Assche 6843*44704f69SBart Van Assche case $cc_basename in 6844*44704f69SBart Van Assche CC*) 6845*44704f69SBart Van Assche # FIXME: insert proper C++ library support 6846*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6847*44704f69SBart Van Assche ;; 6848*44704f69SBart Van Assche aCC*) 6849*44704f69SBart Van Assche _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' 6850*44704f69SBart Van Assche # Commands to make compiler produce verbose output that lists 6851*44704f69SBart Van Assche # what "hidden" libraries, object files and flags are used when 6852*44704f69SBart Van Assche # linking a shared library. 6853*44704f69SBart Van Assche # 6854*44704f69SBart Van Assche # There doesn't appear to be a way to prevent this compiler from 6855*44704f69SBart Van Assche # explicitly linking system object files so we need to strip them 6856*44704f69SBart Van Assche # from the output so that they don't get included in the library 6857*44704f69SBart Van Assche # dependencies. 6858*44704f69SBart Van Assche 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"' 6859*44704f69SBart Van Assche ;; 6860*44704f69SBart Van Assche *) 6861*44704f69SBart Van Assche if test yes = "$GXX"; then 6862*44704f69SBart Van Assche _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' 6863*44704f69SBart Van Assche else 6864*44704f69SBart Van Assche # FIXME: insert proper C++ library support 6865*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6866*44704f69SBart Van Assche fi 6867*44704f69SBart Van Assche ;; 6868*44704f69SBart Van Assche esac 6869*44704f69SBart Van Assche ;; 6870*44704f69SBart Van Assche 6871*44704f69SBart Van Assche hpux10*|hpux11*) 6872*44704f69SBart Van Assche if test no = "$with_gnu_ld"; then 6873*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6874*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6875*44704f69SBart Van Assche 6876*44704f69SBart Van Assche case $host_cpu in 6877*44704f69SBart Van Assche hppa*64*|ia64*) 6878*44704f69SBart Van Assche ;; 6879*44704f69SBart Van Assche *) 6880*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6881*44704f69SBart Van Assche ;; 6882*44704f69SBart Van Assche esac 6883*44704f69SBart Van Assche fi 6884*44704f69SBart Van Assche case $host_cpu in 6885*44704f69SBart Van Assche hppa*64*|ia64*) 6886*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=no 6887*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6888*44704f69SBart Van Assche ;; 6889*44704f69SBart Van Assche *) 6890*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 6891*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6892*44704f69SBart Van Assche _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6893*44704f69SBart Van Assche # but as the default 6894*44704f69SBart Van Assche # location of the library. 6895*44704f69SBart Van Assche ;; 6896*44704f69SBart Van Assche esac 6897*44704f69SBart Van Assche 6898*44704f69SBart Van Assche case $cc_basename in 6899*44704f69SBart Van Assche CC*) 6900*44704f69SBart Van Assche # FIXME: insert proper C++ library support 6901*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6902*44704f69SBart Van Assche ;; 6903*44704f69SBart Van Assche aCC*) 6904*44704f69SBart Van Assche case $host_cpu in 6905*44704f69SBart Van Assche hppa*64*) 6906*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6907*44704f69SBart Van Assche ;; 6908*44704f69SBart Van Assche ia64*) 6909*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6910*44704f69SBart Van Assche ;; 6911*44704f69SBart Van Assche *) 6912*44704f69SBart Van Assche _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' 6913*44704f69SBart Van Assche ;; 6914*44704f69SBart Van Assche esac 6915*44704f69SBart Van Assche # Commands to make compiler produce verbose output that lists 6916*44704f69SBart Van Assche # what "hidden" libraries, object files and flags are used when 6917*44704f69SBart Van Assche # linking a shared library. 6918*44704f69SBart Van Assche # 6919*44704f69SBart Van Assche # There doesn't appear to be a way to prevent this compiler from 6920*44704f69SBart Van Assche # explicitly linking system object files so we need to strip them 6921*44704f69SBart Van Assche # from the output so that they don't get included in the library 6922*44704f69SBart Van Assche # dependencies. 6923*44704f69SBart Van Assche 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"' 6924*44704f69SBart Van Assche ;; 6925*44704f69SBart Van Assche *) 6926*44704f69SBart Van Assche if test yes = "$GXX"; then 6927*44704f69SBart Van Assche if test no = "$with_gnu_ld"; then 6928*44704f69SBart Van Assche case $host_cpu in 6929*44704f69SBart Van Assche hppa*64*) 6930*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6931*44704f69SBart Van Assche ;; 6932*44704f69SBart Van Assche ia64*) 6933*44704f69SBart Van Assche _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' 6934*44704f69SBart Van Assche ;; 6935*44704f69SBart Van Assche *) 6936*44704f69SBart Van Assche _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' 6937*44704f69SBart Van Assche ;; 6938*44704f69SBart Van Assche esac 6939*44704f69SBart Van Assche fi 6940*44704f69SBart Van Assche else 6941*44704f69SBart Van Assche # FIXME: insert proper C++ library support 6942*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 6943*44704f69SBart Van Assche fi 6944*44704f69SBart Van Assche ;; 6945*44704f69SBart Van Assche esac 6946*44704f69SBart Van Assche ;; 6947*44704f69SBart Van Assche 6948*44704f69SBart Van Assche interix[[3-9]]*) 6949*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=no 6950*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6951*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6952*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6953*44704f69SBart Van Assche # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6954*44704f69SBart Van Assche # Instead, shared libraries are loaded at an image base (0x10000000 by 6955*44704f69SBart Van Assche # default) and relocated if they conflict, which is a slow very memory 6956*44704f69SBart Van Assche # consuming and fragmenting process. To avoid this, we pick a random, 6957*44704f69SBart Van Assche # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6958*44704f69SBart Van Assche # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6959*44704f69SBart Van Assche _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' 6960*44704f69SBart Van Assche _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' 6961*44704f69SBart Van Assche ;; 6962*44704f69SBart Van Assche irix5* | irix6*) 6963*44704f69SBart Van Assche case $cc_basename in 6964*44704f69SBart Van Assche CC*) 6965*44704f69SBart Van Assche # SGI C++ 6966*44704f69SBart Van Assche _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' 6967*44704f69SBart Van Assche 6968*44704f69SBart Van Assche # Archives containing C++ object files must be created using 6969*44704f69SBart Van Assche # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6970*44704f69SBart Van Assche # necessary to make sure instantiated templates are included 6971*44704f69SBart Van Assche # in the archive. 6972*44704f69SBart Van Assche _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6973*44704f69SBart Van Assche ;; 6974*44704f69SBart Van Assche *) 6975*44704f69SBart Van Assche if test yes = "$GXX"; then 6976*44704f69SBart Van Assche if test no = "$with_gnu_ld"; then 6977*44704f69SBart Van Assche _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' 6978*44704f69SBart Van Assche else 6979*44704f69SBart Van Assche _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' 6980*44704f69SBart Van Assche fi 6981*44704f69SBart Van Assche fi 6982*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=yes 6983*44704f69SBart Van Assche ;; 6984*44704f69SBart Van Assche esac 6985*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6986*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6987*44704f69SBart Van Assche _LT_TAGVAR(inherit_rpath, $1)=yes 6988*44704f69SBart Van Assche ;; 6989*44704f69SBart Van Assche 6990*44704f69SBart Van Assche linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6991*44704f69SBart Van Assche case $cc_basename in 6992*44704f69SBart Van Assche KCC*) 6993*44704f69SBart Van Assche # Kuck and Associates, Inc. (KAI) C++ Compiler 6994*44704f69SBart Van Assche 6995*44704f69SBart Van Assche # KCC will only create a shared library if the output file 6996*44704f69SBart Van Assche # ends with ".so" (or ".sl" for HP-UX), so rename the library 6997*44704f69SBart Van Assche # to its proper name (with version) after linking. 6998*44704f69SBart Van Assche _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' 6999*44704f69SBart Van Assche _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' 7000*44704f69SBart Van Assche # Commands to make compiler produce verbose output that lists 7001*44704f69SBart Van Assche # what "hidden" libraries, object files and flags are used when 7002*44704f69SBart Van Assche # linking a shared library. 7003*44704f69SBart Van Assche # 7004*44704f69SBart Van Assche # There doesn't appear to be a way to prevent this compiler from 7005*44704f69SBart Van Assche # explicitly linking system object files so we need to strip them 7006*44704f69SBart Van Assche # from the output so that they don't get included in the library 7007*44704f69SBart Van Assche # dependencies. 7008*44704f69SBart Van Assche 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"' 7009*44704f69SBart Van Assche 7010*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7011*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7012*44704f69SBart Van Assche 7013*44704f69SBart Van Assche # Archives containing C++ object files must be created using 7014*44704f69SBart Van Assche # "CC -Bstatic", where "CC" is the KAI C++ compiler. 7015*44704f69SBart Van Assche _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 7016*44704f69SBart Van Assche ;; 7017*44704f69SBart Van Assche icpc* | ecpc* ) 7018*44704f69SBart Van Assche # Intel C++ 7019*44704f69SBart Van Assche with_gnu_ld=yes 7020*44704f69SBart Van Assche # version 8.0 and above of icpc choke on multiply defined symbols 7021*44704f69SBart Van Assche # if we add $predep_objects and $postdep_objects, however 7.1 and 7022*44704f69SBart Van Assche # earlier do not add the objects themselves. 7023*44704f69SBart Van Assche case `$CC -V 2>&1` in 7024*44704f69SBart Van Assche *"Version 7."*) 7025*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7026*44704f69SBart Van Assche _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' 7027*44704f69SBart Van Assche ;; 7028*44704f69SBart Van Assche *) # Version 8.0 or newer 7029*44704f69SBart Van Assche tmp_idyn= 7030*44704f69SBart Van Assche case $host_cpu in 7031*44704f69SBart Van Assche ia64*) tmp_idyn=' -i_dynamic';; 7032*44704f69SBart Van Assche esac 7033*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7034*44704f69SBart Van Assche _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' 7035*44704f69SBart Van Assche ;; 7036*44704f69SBart Van Assche esac 7037*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7038*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7039*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7040*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7041*44704f69SBart Van Assche ;; 7042*44704f69SBart Van Assche pgCC* | pgcpp*) 7043*44704f69SBart Van Assche # Portland Group C++ compiler 7044*44704f69SBart Van Assche case `$CC -V` in 7045*44704f69SBart Van Assche *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7046*44704f69SBart Van Assche _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7047*44704f69SBart Van Assche rm -rf $tpldir~ 7048*44704f69SBart Van Assche $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7049*44704f69SBart Van Assche compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7050*44704f69SBart Van Assche _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7051*44704f69SBart Van Assche rm -rf $tpldir~ 7052*44704f69SBart Van Assche $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7053*44704f69SBart Van Assche $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7054*44704f69SBart Van Assche $RANLIB $oldlib' 7055*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7056*44704f69SBart Van Assche rm -rf $tpldir~ 7057*44704f69SBart Van Assche $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7058*44704f69SBart Van Assche $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7059*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7060*44704f69SBart Van Assche rm -rf $tpldir~ 7061*44704f69SBart Van Assche $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7062*44704f69SBart Van Assche $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' 7063*44704f69SBart Van Assche ;; 7064*44704f69SBart Van Assche *) # Version 6 and above use weak symbols 7065*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7066*44704f69SBart Van Assche _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' 7067*44704f69SBart Van Assche ;; 7068*44704f69SBart Van Assche esac 7069*44704f69SBart Van Assche 7070*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7071*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7072*44704f69SBart Van Assche _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' 7073*44704f69SBart Van Assche ;; 7074*44704f69SBart Van Assche cxx*) 7075*44704f69SBart Van Assche # Compaq C++ 7076*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7077*44704f69SBart Van Assche _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' 7078*44704f69SBart Van Assche 7079*44704f69SBart Van Assche runpath_var=LD_RUN_PATH 7080*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7081*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7082*44704f69SBart Van Assche 7083*44704f69SBart Van Assche # Commands to make compiler produce verbose output that lists 7084*44704f69SBart Van Assche # what "hidden" libraries, object files and flags are used when 7085*44704f69SBart Van Assche # linking a shared library. 7086*44704f69SBart Van Assche # 7087*44704f69SBart Van Assche # There doesn't appear to be a way to prevent this compiler from 7088*44704f69SBart Van Assche # explicitly linking system object files so we need to strip them 7089*44704f69SBart Van Assche # from the output so that they don't get included in the library 7090*44704f69SBart Van Assche # dependencies. 7091*44704f69SBart Van Assche 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' 7092*44704f69SBart Van Assche ;; 7093*44704f69SBart Van Assche xl* | mpixl* | bgxl*) 7094*44704f69SBart Van Assche # IBM XL 8.0 on PPC, with GNU ld 7095*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7096*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7097*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7098*44704f69SBart Van Assche if test yes = "$supports_anon_versioning"; then 7099*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7100*44704f69SBart Van Assche cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7101*44704f69SBart Van Assche echo "local: *; };" >> $output_objdir/$libname.ver~ 7102*44704f69SBart Van Assche $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7103*44704f69SBart Van Assche fi 7104*44704f69SBart Van Assche ;; 7105*44704f69SBart Van Assche *) 7106*44704f69SBart Van Assche case `$CC -V 2>&1 | $SED 5q` in 7107*44704f69SBart Van Assche *Sun\ C*) 7108*44704f69SBart Van Assche # Sun C++ 5.9 7109*44704f69SBart Van Assche _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7110*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7111*44704f69SBart Van Assche _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' 7112*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7113*44704f69SBart Van Assche _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' 7114*44704f69SBart Van Assche _LT_TAGVAR(compiler_needs_object, $1)=yes 7115*44704f69SBart Van Assche 7116*44704f69SBart Van Assche # Not sure whether something based on 7117*44704f69SBart Van Assche # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7118*44704f69SBart Van Assche # would be better. 7119*44704f69SBart Van Assche output_verbose_link_cmd='func_echo_all' 7120*44704f69SBart Van Assche 7121*44704f69SBart Van Assche # Archives containing C++ object files must be created using 7122*44704f69SBart Van Assche # "CC -xar", where "CC" is the Sun C++ compiler. This is 7123*44704f69SBart Van Assche # necessary to make sure instantiated templates are included 7124*44704f69SBart Van Assche # in the archive. 7125*44704f69SBart Van Assche _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7126*44704f69SBart Van Assche ;; 7127*44704f69SBart Van Assche esac 7128*44704f69SBart Van Assche ;; 7129*44704f69SBart Van Assche esac 7130*44704f69SBart Van Assche ;; 7131*44704f69SBart Van Assche 7132*44704f69SBart Van Assche lynxos*) 7133*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7134*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7135*44704f69SBart Van Assche ;; 7136*44704f69SBart Van Assche 7137*44704f69SBart Van Assche m88k*) 7138*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7139*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7140*44704f69SBart Van Assche ;; 7141*44704f69SBart Van Assche 7142*44704f69SBart Van Assche mvs*) 7143*44704f69SBart Van Assche case $cc_basename in 7144*44704f69SBart Van Assche cxx*) 7145*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7146*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7147*44704f69SBart Van Assche ;; 7148*44704f69SBart Van Assche *) 7149*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7150*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7151*44704f69SBart Van Assche ;; 7152*44704f69SBart Van Assche esac 7153*44704f69SBart Van Assche ;; 7154*44704f69SBart Van Assche 7155*44704f69SBart Van Assche netbsd*) 7156*44704f69SBart Van Assche if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7157*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7158*44704f69SBart Van Assche wlarc= 7159*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7160*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 7161*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7162*44704f69SBart Van Assche fi 7163*44704f69SBart Van Assche # Workaround some broken pre-1.5 toolchains 7164*44704f69SBart Van Assche output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7165*44704f69SBart Van Assche ;; 7166*44704f69SBart Van Assche 7167*44704f69SBart Van Assche *nto* | *qnx*) 7168*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=yes 7169*44704f69SBart Van Assche ;; 7170*44704f69SBart Van Assche 7171*44704f69SBart Van Assche openbsd* | bitrig*) 7172*44704f69SBart Van Assche if test -f /usr/libexec/ld.so; then 7173*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct, $1)=yes 7174*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7175*44704f69SBart Van Assche _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7176*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7177*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7178*44704f69SBart Van Assche if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7179*44704f69SBart Van Assche _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' 7180*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7181*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7182*44704f69SBart Van Assche fi 7183*44704f69SBart Van Assche output_verbose_link_cmd=func_echo_all 7184*44704f69SBart Van Assche else 7185*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7186*44704f69SBart Van Assche fi 7187*44704f69SBart Van Assche ;; 7188*44704f69SBart Van Assche 7189*44704f69SBart Van Assche osf3* | osf4* | osf5*) 7190*44704f69SBart Van Assche case $cc_basename in 7191*44704f69SBart Van Assche KCC*) 7192*44704f69SBart Van Assche # Kuck and Associates, Inc. (KAI) C++ Compiler 7193*44704f69SBart Van Assche 7194*44704f69SBart Van Assche # KCC will only create a shared library if the output file 7195*44704f69SBart Van Assche # ends with ".so" (or ".sl" for HP-UX), so rename the library 7196*44704f69SBart Van Assche # to its proper name (with version) after linking. 7197*44704f69SBart Van Assche _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' 7198*44704f69SBart Van Assche 7199*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7200*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7201*44704f69SBart Van Assche 7202*44704f69SBart Van Assche # Archives containing C++ object files must be created using 7203*44704f69SBart Van Assche # the KAI C++ compiler. 7204*44704f69SBart Van Assche case $host in 7205*44704f69SBart Van Assche osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7206*44704f69SBart Van Assche *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7207*44704f69SBart Van Assche esac 7208*44704f69SBart Van Assche ;; 7209*44704f69SBart Van Assche RCC*) 7210*44704f69SBart Van Assche # Rational C++ 2.4.1 7211*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7212*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7213*44704f69SBart Van Assche ;; 7214*44704f69SBart Van Assche cxx*) 7215*44704f69SBart Van Assche case $host in 7216*44704f69SBart Van Assche osf3*) 7217*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7218*44704f69SBart Van Assche _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' 7219*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7220*44704f69SBart Van Assche ;; 7221*44704f69SBart Van Assche *) 7222*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7223*44704f69SBart Van Assche _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' 7224*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7225*44704f69SBart Van Assche echo "-hidden">> $lib.exp~ 7226*44704f69SBart Van Assche $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~ 7227*44704f69SBart Van Assche $RM $lib.exp' 7228*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7229*44704f69SBart Van Assche ;; 7230*44704f69SBart Van Assche esac 7231*44704f69SBart Van Assche 7232*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7233*44704f69SBart Van Assche 7234*44704f69SBart Van Assche # Commands to make compiler produce verbose output that lists 7235*44704f69SBart Van Assche # what "hidden" libraries, object files and flags are used when 7236*44704f69SBart Van Assche # linking a shared library. 7237*44704f69SBart Van Assche # 7238*44704f69SBart Van Assche # There doesn't appear to be a way to prevent this compiler from 7239*44704f69SBart Van Assche # explicitly linking system object files so we need to strip them 7240*44704f69SBart Van Assche # from the output so that they don't get included in the library 7241*44704f69SBart Van Assche # dependencies. 7242*44704f69SBart Van Assche 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"' 7243*44704f69SBart Van Assche ;; 7244*44704f69SBart Van Assche *) 7245*44704f69SBart Van Assche if test yes,no = "$GXX,$with_gnu_ld"; then 7246*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7247*44704f69SBart Van Assche case $host in 7248*44704f69SBart Van Assche osf3*) 7249*44704f69SBart Van Assche _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' 7250*44704f69SBart Van Assche ;; 7251*44704f69SBart Van Assche *) 7252*44704f69SBart Van Assche _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' 7253*44704f69SBart Van Assche ;; 7254*44704f69SBart Van Assche esac 7255*44704f69SBart Van Assche 7256*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7257*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7258*44704f69SBart Van Assche 7259*44704f69SBart Van Assche # Commands to make compiler produce verbose output that lists 7260*44704f69SBart Van Assche # what "hidden" libraries, object files and flags are used when 7261*44704f69SBart Van Assche # linking a shared library. 7262*44704f69SBart Van Assche output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' 7263*44704f69SBart Van Assche 7264*44704f69SBart Van Assche else 7265*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7266*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7267*44704f69SBart Van Assche fi 7268*44704f69SBart Van Assche ;; 7269*44704f69SBart Van Assche esac 7270*44704f69SBart Van Assche ;; 7271*44704f69SBart Van Assche 7272*44704f69SBart Van Assche psos*) 7273*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7274*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7275*44704f69SBart Van Assche ;; 7276*44704f69SBart Van Assche 7277*44704f69SBart Van Assche sunos4*) 7278*44704f69SBart Van Assche case $cc_basename in 7279*44704f69SBart Van Assche CC*) 7280*44704f69SBart Van Assche # Sun C++ 4.x 7281*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7282*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7283*44704f69SBart Van Assche ;; 7284*44704f69SBart Van Assche lcc*) 7285*44704f69SBart Van Assche # Lucid 7286*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7287*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7288*44704f69SBart Van Assche ;; 7289*44704f69SBart Van Assche *) 7290*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7291*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7292*44704f69SBart Van Assche ;; 7293*44704f69SBart Van Assche esac 7294*44704f69SBart Van Assche ;; 7295*44704f69SBart Van Assche 7296*44704f69SBart Van Assche solaris*) 7297*44704f69SBart Van Assche case $cc_basename in 7298*44704f69SBart Van Assche CC* | sunCC*) 7299*44704f69SBart Van Assche # Sun C++ 4.2, 5.x and Centerline C++ 7300*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7301*44704f69SBart Van Assche _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7302*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7303*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7304*44704f69SBart Van Assche $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' 7305*44704f69SBart Van Assche 7306*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7307*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7308*44704f69SBart Van Assche case $host_os in 7309*44704f69SBart Van Assche solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7310*44704f69SBart Van Assche *) 7311*44704f69SBart Van Assche # The compiler driver will combine and reorder linker options, 7312*44704f69SBart Van Assche # but understands '-z linker_flag'. 7313*44704f69SBart Van Assche # Supported since Solaris 2.6 (maybe 2.5.1?) 7314*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7315*44704f69SBart Van Assche ;; 7316*44704f69SBart Van Assche esac 7317*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=yes 7318*44704f69SBart Van Assche 7319*44704f69SBart Van Assche output_verbose_link_cmd='func_echo_all' 7320*44704f69SBart Van Assche 7321*44704f69SBart Van Assche # Archives containing C++ object files must be created using 7322*44704f69SBart Van Assche # "CC -xar", where "CC" is the Sun C++ compiler. This is 7323*44704f69SBart Van Assche # necessary to make sure instantiated templates are included 7324*44704f69SBart Van Assche # in the archive. 7325*44704f69SBart Van Assche _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7326*44704f69SBart Van Assche ;; 7327*44704f69SBart Van Assche gcx*) 7328*44704f69SBart Van Assche # Green Hills C++ Compiler 7329*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7330*44704f69SBart Van Assche 7331*44704f69SBart Van Assche # The C++ compiler must be used to create the archive. 7332*44704f69SBart Van Assche _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7333*44704f69SBart Van Assche ;; 7334*44704f69SBart Van Assche *) 7335*44704f69SBart Van Assche # GNU C++ compiler with Solaris linker 7336*44704f69SBart Van Assche if test yes,no = "$GXX,$with_gnu_ld"; then 7337*44704f69SBart Van Assche _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7338*44704f69SBart Van Assche if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7339*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7340*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7341*44704f69SBart Van Assche $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' 7342*44704f69SBart Van Assche 7343*44704f69SBart Van Assche # Commands to make compiler produce verbose output that lists 7344*44704f69SBart Van Assche # what "hidden" libraries, object files and flags are used when 7345*44704f69SBart Van Assche # linking a shared library. 7346*44704f69SBart Van Assche output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' 7347*44704f69SBart Van Assche else 7348*44704f69SBart Van Assche # g++ 2.7 appears to require '-G' NOT '-shared' on this 7349*44704f69SBart Van Assche # platform. 7350*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7351*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7352*44704f69SBart Van Assche $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' 7353*44704f69SBart Van Assche 7354*44704f69SBart Van Assche # Commands to make compiler produce verbose output that lists 7355*44704f69SBart Van Assche # what "hidden" libraries, object files and flags are used when 7356*44704f69SBart Van Assche # linking a shared library. 7357*44704f69SBart Van Assche output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' 7358*44704f69SBart Van Assche fi 7359*44704f69SBart Van Assche 7360*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7361*44704f69SBart Van Assche case $host_os in 7362*44704f69SBart Van Assche solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7363*44704f69SBart Van Assche *) 7364*44704f69SBart Van Assche _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7365*44704f69SBart Van Assche ;; 7366*44704f69SBart Van Assche esac 7367*44704f69SBart Van Assche fi 7368*44704f69SBart Van Assche ;; 7369*44704f69SBart Van Assche esac 7370*44704f69SBart Van Assche ;; 7371*44704f69SBart Van Assche 7372*44704f69SBart Van Assche sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7373*44704f69SBart Van Assche _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7374*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7375*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7376*44704f69SBart Van Assche runpath_var='LD_RUN_PATH' 7377*44704f69SBart Van Assche 7378*44704f69SBart Van Assche case $cc_basename in 7379*44704f69SBart Van Assche CC*) 7380*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7381*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7382*44704f69SBart Van Assche ;; 7383*44704f69SBart Van Assche *) 7384*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7385*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7386*44704f69SBart Van Assche ;; 7387*44704f69SBart Van Assche esac 7388*44704f69SBart Van Assche ;; 7389*44704f69SBart Van Assche 7390*44704f69SBart Van Assche sysv5* | sco3.2v5* | sco5v6*) 7391*44704f69SBart Van Assche # Note: We CANNOT use -z defs as we might desire, because we do not 7392*44704f69SBart Van Assche # link with -lc, and that would cause any symbols used from libc to 7393*44704f69SBart Van Assche # always be unresolved, which means just about no library would 7394*44704f69SBart Van Assche # ever link correctly. If we're not using GNU ld we use -z text 7395*44704f69SBart Van Assche # though, which does catch some bad symbols but isn't as heavy-handed 7396*44704f69SBart Van Assche # as -z defs. 7397*44704f69SBart Van Assche _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7398*44704f69SBart Van Assche _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7399*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7400*44704f69SBart Van Assche _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7401*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7402*44704f69SBart Van Assche _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7403*44704f69SBart Van Assche _LT_TAGVAR(link_all_deplibs, $1)=yes 7404*44704f69SBart Van Assche _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7405*44704f69SBart Van Assche runpath_var='LD_RUN_PATH' 7406*44704f69SBart Van Assche 7407*44704f69SBart Van Assche case $cc_basename in 7408*44704f69SBart Van Assche CC*) 7409*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7410*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7411*44704f69SBart Van Assche _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7412*44704f69SBart Van Assche '"$_LT_TAGVAR(old_archive_cmds, $1)" 7413*44704f69SBart Van Assche _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7414*44704f69SBart Van Assche '"$_LT_TAGVAR(reload_cmds, $1)" 7415*44704f69SBart Van Assche ;; 7416*44704f69SBart Van Assche *) 7417*44704f69SBart Van Assche _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7418*44704f69SBart Van Assche _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7419*44704f69SBart Van Assche ;; 7420*44704f69SBart Van Assche esac 7421*44704f69SBart Van Assche ;; 7422*44704f69SBart Van Assche 7423*44704f69SBart Van Assche tandem*) 7424*44704f69SBart Van Assche case $cc_basename in 7425*44704f69SBart Van Assche NCC*) 7426*44704f69SBart Van Assche # NonStop-UX NCC 3.20 7427*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7428*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7429*44704f69SBart Van Assche ;; 7430*44704f69SBart Van Assche *) 7431*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7432*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7433*44704f69SBart Van Assche ;; 7434*44704f69SBart Van Assche esac 7435*44704f69SBart Van Assche ;; 7436*44704f69SBart Van Assche 7437*44704f69SBart Van Assche vxworks*) 7438*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7439*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7440*44704f69SBart Van Assche ;; 7441*44704f69SBart Van Assche 7442*44704f69SBart Van Assche *) 7443*44704f69SBart Van Assche # FIXME: insert proper C++ library support 7444*44704f69SBart Van Assche _LT_TAGVAR(ld_shlibs, $1)=no 7445*44704f69SBart Van Assche ;; 7446*44704f69SBart Van Assche esac 7447*44704f69SBart Van Assche 7448*44704f69SBart Van Assche AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7449*44704f69SBart Van Assche test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7450*44704f69SBart Van Assche 7451*44704f69SBart Van Assche _LT_TAGVAR(GCC, $1)=$GXX 7452*44704f69SBart Van Assche _LT_TAGVAR(LD, $1)=$LD 7453*44704f69SBart Van Assche 7454*44704f69SBart Van Assche ## CAVEAT EMPTOR: 7455*44704f69SBart Van Assche ## There is no encapsulation within the following macros, do not change 7456*44704f69SBart Van Assche ## the running order or otherwise move them around unless you know exactly 7457*44704f69SBart Van Assche ## what you are doing... 7458*44704f69SBart Van Assche _LT_SYS_HIDDEN_LIBDEPS($1) 7459*44704f69SBart Van Assche _LT_COMPILER_PIC($1) 7460*44704f69SBart Van Assche _LT_COMPILER_C_O($1) 7461*44704f69SBart Van Assche _LT_COMPILER_FILE_LOCKS($1) 7462*44704f69SBart Van Assche _LT_LINKER_SHLIBS($1) 7463*44704f69SBart Van Assche _LT_SYS_DYNAMIC_LINKER($1) 7464*44704f69SBart Van Assche _LT_LINKER_HARDCODE_LIBPATH($1) 7465*44704f69SBart Van Assche 7466*44704f69SBart Van Assche _LT_CONFIG($1) 7467*44704f69SBart Van Assche fi # test -n "$compiler" 7468*44704f69SBart Van Assche 7469*44704f69SBart Van Assche CC=$lt_save_CC 7470*44704f69SBart Van Assche CFLAGS=$lt_save_CFLAGS 7471*44704f69SBart Van Assche LDCXX=$LD 7472*44704f69SBart Van Assche LD=$lt_save_LD 7473*44704f69SBart Van Assche GCC=$lt_save_GCC 7474*44704f69SBart Van Assche with_gnu_ld=$lt_save_with_gnu_ld 7475*44704f69SBart Van Assche lt_cv_path_LDCXX=$lt_cv_path_LD 7476*44704f69SBart Van Assche lt_cv_path_LD=$lt_save_path_LD 7477*44704f69SBart Van Assche lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7478*44704f69SBart Van Assche lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7479*44704f69SBart Van Asschefi # test yes != "$_lt_caught_CXX_error" 7480*44704f69SBart Van Assche 7481*44704f69SBart Van AsscheAC_LANG_POP 7482*44704f69SBart Van Assche])# _LT_LANG_CXX_CONFIG 7483*44704f69SBart Van Assche 7484*44704f69SBart Van Assche 7485*44704f69SBart Van Assche# _LT_FUNC_STRIPNAME_CNF 7486*44704f69SBart Van Assche# ---------------------- 7487*44704f69SBart Van Assche# func_stripname_cnf prefix suffix name 7488*44704f69SBart Van Assche# strip PREFIX and SUFFIX off of NAME. 7489*44704f69SBart Van Assche# PREFIX and SUFFIX must not contain globbing or regex special 7490*44704f69SBart Van Assche# characters, hashes, percent signs, but SUFFIX may contain a leading 7491*44704f69SBart Van Assche# dot (in which case that matches only a dot). 7492*44704f69SBart Van Assche# 7493*44704f69SBart Van Assche# This function is identical to the (non-XSI) version of func_stripname, 7494*44704f69SBart Van Assche# except this one can be used by m4 code that may be executed by configure, 7495*44704f69SBart Van Assche# rather than the libtool script. 7496*44704f69SBart Van Asschem4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7497*44704f69SBart Van AsscheAC_REQUIRE([_LT_DECL_SED]) 7498*44704f69SBart Van AsscheAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7499*44704f69SBart Van Asschefunc_stripname_cnf () 7500*44704f69SBart Van Assche{ 7501*44704f69SBart Van Assche case @S|@2 in 7502*44704f69SBart Van Assche .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7503*44704f69SBart Van Assche *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7504*44704f69SBart Van Assche esac 7505*44704f69SBart Van Assche} # func_stripname_cnf 7506*44704f69SBart Van Assche])# _LT_FUNC_STRIPNAME_CNF 7507*44704f69SBart Van Assche 7508*44704f69SBart Van Assche 7509*44704f69SBart Van Assche# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7510*44704f69SBart Van Assche# --------------------------------- 7511*44704f69SBart Van Assche# Figure out "hidden" library dependencies from verbose 7512*44704f69SBart Van Assche# compiler output when linking a shared library. 7513*44704f69SBart Van Assche# Parse the compiler output and extract the necessary 7514*44704f69SBart Van Assche# objects, libraries and library flags. 7515*44704f69SBart Van Asschem4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7516*44704f69SBart Van Assche[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7517*44704f69SBart Van AsscheAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7518*44704f69SBart Van Assche# Dependencies to place before and after the object being linked: 7519*44704f69SBart Van Assche_LT_TAGVAR(predep_objects, $1)= 7520*44704f69SBart Van Assche_LT_TAGVAR(postdep_objects, $1)= 7521*44704f69SBart Van Assche_LT_TAGVAR(predeps, $1)= 7522*44704f69SBart Van Assche_LT_TAGVAR(postdeps, $1)= 7523*44704f69SBart Van Assche_LT_TAGVAR(compiler_lib_search_path, $1)= 7524*44704f69SBart Van Assche 7525*44704f69SBart Van Asschednl we can't use the lt_simple_compile_test_code here, 7526*44704f69SBart Van Asschednl because it contains code intended for an executable, 7527*44704f69SBart Van Asschednl not a library. It's possible we should let each 7528*44704f69SBart Van Asschednl tag define a new lt_????_link_test_code variable, 7529*44704f69SBart Van Asschednl but it's only used here... 7530*44704f69SBart Van Asschem4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7531*44704f69SBart Van Asscheint a; 7532*44704f69SBart Van Asschevoid foo (void) { a = 0; } 7533*44704f69SBart Van Assche_LT_EOF 7534*44704f69SBart Van Assche], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7535*44704f69SBart Van Asscheclass Foo 7536*44704f69SBart Van Assche{ 7537*44704f69SBart Van Asschepublic: 7538*44704f69SBart Van Assche Foo (void) { a = 0; } 7539*44704f69SBart Van Asscheprivate: 7540*44704f69SBart Van Assche int a; 7541*44704f69SBart Van Assche}; 7542*44704f69SBart Van Assche_LT_EOF 7543*44704f69SBart Van Assche], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7544*44704f69SBart Van Assche subroutine foo 7545*44704f69SBart Van Assche implicit none 7546*44704f69SBart Van Assche integer*4 a 7547*44704f69SBart Van Assche a=0 7548*44704f69SBart Van Assche return 7549*44704f69SBart Van Assche end 7550*44704f69SBart Van Assche_LT_EOF 7551*44704f69SBart Van Assche], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7552*44704f69SBart Van Assche subroutine foo 7553*44704f69SBart Van Assche implicit none 7554*44704f69SBart Van Assche integer a 7555*44704f69SBart Van Assche a=0 7556*44704f69SBart Van Assche return 7557*44704f69SBart Van Assche end 7558*44704f69SBart Van Assche_LT_EOF 7559*44704f69SBart Van Assche], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7560*44704f69SBart Van Asschepublic class foo { 7561*44704f69SBart Van Assche private int a; 7562*44704f69SBart Van Assche public void bar (void) { 7563*44704f69SBart Van Assche a = 0; 7564*44704f69SBart Van Assche } 7565*44704f69SBart Van Assche}; 7566*44704f69SBart Van Assche_LT_EOF 7567*44704f69SBart Van Assche], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7568*44704f69SBart Van Asschepackage foo 7569*44704f69SBart Van Asschefunc foo() { 7570*44704f69SBart Van Assche} 7571*44704f69SBart Van Assche_LT_EOF 7572*44704f69SBart Van Assche]) 7573*44704f69SBart Van Assche 7574*44704f69SBart Van Assche_lt_libdeps_save_CFLAGS=$CFLAGS 7575*44704f69SBart Van Asschecase "$CC $CFLAGS " in #( 7576*44704f69SBart Van Assche*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7577*44704f69SBart Van Assche*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7578*44704f69SBart Van Assche*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7579*44704f69SBart Van Asscheesac 7580*44704f69SBart Van Assche 7581*44704f69SBart Van Asschednl Parse the compiler output and extract the necessary 7582*44704f69SBart Van Asschednl objects, libraries and library flags. 7583*44704f69SBart Van Asscheif AC_TRY_EVAL(ac_compile); then 7584*44704f69SBart Van Assche # Parse the compiler output and extract the necessary 7585*44704f69SBart Van Assche # objects, libraries and library flags. 7586*44704f69SBart Van Assche 7587*44704f69SBart Van Assche # Sentinel used to keep track of whether or not we are before 7588*44704f69SBart Van Assche # the conftest object file. 7589*44704f69SBart Van Assche pre_test_object_deps_done=no 7590*44704f69SBart Van Assche 7591*44704f69SBart Van Assche for p in `eval "$output_verbose_link_cmd"`; do 7592*44704f69SBart Van Assche case $prev$p in 7593*44704f69SBart Van Assche 7594*44704f69SBart Van Assche -L* | -R* | -l*) 7595*44704f69SBart Van Assche # Some compilers place space between "-{L,R}" and the path. 7596*44704f69SBart Van Assche # Remove the space. 7597*44704f69SBart Van Assche if test x-L = "$p" || 7598*44704f69SBart Van Assche test x-R = "$p"; then 7599*44704f69SBart Van Assche prev=$p 7600*44704f69SBart Van Assche continue 7601*44704f69SBart Van Assche fi 7602*44704f69SBart Van Assche 7603*44704f69SBart Van Assche # Expand the sysroot to ease extracting the directories later. 7604*44704f69SBart Van Assche if test -z "$prev"; then 7605*44704f69SBart Van Assche case $p in 7606*44704f69SBart Van Assche -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7607*44704f69SBart Van Assche -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7608*44704f69SBart Van Assche -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7609*44704f69SBart Van Assche esac 7610*44704f69SBart Van Assche fi 7611*44704f69SBart Van Assche case $p in 7612*44704f69SBart Van Assche =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7613*44704f69SBart Van Assche esac 7614*44704f69SBart Van Assche if test no = "$pre_test_object_deps_done"; then 7615*44704f69SBart Van Assche case $prev in 7616*44704f69SBart Van Assche -L | -R) 7617*44704f69SBart Van Assche # Internal compiler library paths should come after those 7618*44704f69SBart Van Assche # provided the user. The postdeps already come after the 7619*44704f69SBart Van Assche # user supplied libs so there is no need to process them. 7620*44704f69SBart Van Assche if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7621*44704f69SBart Van Assche _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7622*44704f69SBart Van Assche else 7623*44704f69SBart Van Assche _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7624*44704f69SBart Van Assche fi 7625*44704f69SBart Van Assche ;; 7626*44704f69SBart Van Assche # The "-l" case would never come before the object being 7627*44704f69SBart Van Assche # linked, so don't bother handling this case. 7628*44704f69SBart Van Assche esac 7629*44704f69SBart Van Assche else 7630*44704f69SBart Van Assche if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7631*44704f69SBart Van Assche _LT_TAGVAR(postdeps, $1)=$prev$p 7632*44704f69SBart Van Assche else 7633*44704f69SBart Van Assche _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7634*44704f69SBart Van Assche fi 7635*44704f69SBart Van Assche fi 7636*44704f69SBart Van Assche prev= 7637*44704f69SBart Van Assche ;; 7638*44704f69SBart Van Assche 7639*44704f69SBart Van Assche *.lto.$objext) ;; # Ignore GCC LTO objects 7640*44704f69SBart Van Assche *.$objext) 7641*44704f69SBart Van Assche # This assumes that the test object file only shows up 7642*44704f69SBart Van Assche # once in the compiler output. 7643*44704f69SBart Van Assche if test "$p" = "conftest.$objext"; then 7644*44704f69SBart Van Assche pre_test_object_deps_done=yes 7645*44704f69SBart Van Assche continue 7646*44704f69SBart Van Assche fi 7647*44704f69SBart Van Assche 7648*44704f69SBart Van Assche if test no = "$pre_test_object_deps_done"; then 7649*44704f69SBart Van Assche if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7650*44704f69SBart Van Assche _LT_TAGVAR(predep_objects, $1)=$p 7651*44704f69SBart Van Assche else 7652*44704f69SBart Van Assche _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7653*44704f69SBart Van Assche fi 7654*44704f69SBart Van Assche else 7655*44704f69SBart Van Assche if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7656*44704f69SBart Van Assche _LT_TAGVAR(postdep_objects, $1)=$p 7657*44704f69SBart Van Assche else 7658*44704f69SBart Van Assche _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7659*44704f69SBart Van Assche fi 7660*44704f69SBart Van Assche fi 7661*44704f69SBart Van Assche ;; 7662*44704f69SBart Van Assche 7663*44704f69SBart Van Assche *) ;; # Ignore the rest. 7664*44704f69SBart Van Assche 7665*44704f69SBart Van Assche esac 7666*44704f69SBart Van Assche done 7667*44704f69SBart Van Assche 7668*44704f69SBart Van Assche # Clean up. 7669*44704f69SBart Van Assche rm -f a.out a.exe 7670*44704f69SBart Van Asscheelse 7671*44704f69SBart Van Assche echo "libtool.m4: error: problem compiling $1 test program" 7672*44704f69SBart Van Asschefi 7673*44704f69SBart Van Assche 7674*44704f69SBart Van Assche$RM -f confest.$objext 7675*44704f69SBart Van AsscheCFLAGS=$_lt_libdeps_save_CFLAGS 7676*44704f69SBart Van Assche 7677*44704f69SBart Van Assche# PORTME: override above test on systems where it is broken 7678*44704f69SBart Van Asschem4_if([$1], [CXX], 7679*44704f69SBart Van Assche[case $host_os in 7680*44704f69SBart Van Asscheinterix[[3-9]]*) 7681*44704f69SBart Van Assche # Interix 3.5 installs completely hosed .la files for C++, so rather than 7682*44704f69SBart Van Assche # hack all around it, let's just trust "g++" to DTRT. 7683*44704f69SBart Van Assche _LT_TAGVAR(predep_objects,$1)= 7684*44704f69SBart Van Assche _LT_TAGVAR(postdep_objects,$1)= 7685*44704f69SBart Van Assche _LT_TAGVAR(postdeps,$1)= 7686*44704f69SBart Van Assche ;; 7687*44704f69SBart Van Asscheesac 7688*44704f69SBart Van Assche]) 7689*44704f69SBart Van Assche 7690*44704f69SBart Van Asschecase " $_LT_TAGVAR(postdeps, $1) " in 7691*44704f69SBart Van Assche*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7692*44704f69SBart Van Asscheesac 7693*44704f69SBart Van Assche _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7694*44704f69SBart Van Asscheif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7695*44704f69SBart Van Assche _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7696*44704f69SBart Van Asschefi 7697*44704f69SBart Van Assche_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7698*44704f69SBart Van Assche [The directories searched by this compiler when creating a shared library]) 7699*44704f69SBart Van Assche_LT_TAGDECL([], [predep_objects], [1], 7700*44704f69SBart Van Assche [Dependencies to place before and after the objects being linked to 7701*44704f69SBart Van Assche create a shared library]) 7702*44704f69SBart Van Assche_LT_TAGDECL([], [postdep_objects], [1]) 7703*44704f69SBart Van Assche_LT_TAGDECL([], [predeps], [1]) 7704*44704f69SBart Van Assche_LT_TAGDECL([], [postdeps], [1]) 7705*44704f69SBart Van Assche_LT_TAGDECL([], [compiler_lib_search_path], [1], 7706*44704f69SBart Van Assche [The library search path used internally by the compiler when linking 7707*44704f69SBart Van Assche a shared library]) 7708*44704f69SBart Van Assche])# _LT_SYS_HIDDEN_LIBDEPS 7709*44704f69SBart Van Assche 7710*44704f69SBart Van Assche 7711*44704f69SBart Van Assche# _LT_LANG_F77_CONFIG([TAG]) 7712*44704f69SBart Van Assche# -------------------------- 7713*44704f69SBart Van Assche# Ensure that the configuration variables for a Fortran 77 compiler are 7714*44704f69SBart Van Assche# suitably defined. These variables are subsequently used by _LT_CONFIG 7715*44704f69SBart Van Assche# to write the compiler configuration to 'libtool'. 7716*44704f69SBart Van Asschem4_defun([_LT_LANG_F77_CONFIG], 7717*44704f69SBart Van Assche[AC_LANG_PUSH(Fortran 77) 7718*44704f69SBart Van Asscheif test -z "$F77" || test no = "$F77"; then 7719*44704f69SBart Van Assche _lt_disable_F77=yes 7720*44704f69SBart Van Asschefi 7721*44704f69SBart Van Assche 7722*44704f69SBart Van Assche_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7723*44704f69SBart Van Assche_LT_TAGVAR(allow_undefined_flag, $1)= 7724*44704f69SBart Van Assche_LT_TAGVAR(always_export_symbols, $1)=no 7725*44704f69SBart Van Assche_LT_TAGVAR(archive_expsym_cmds, $1)= 7726*44704f69SBart Van Assche_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7727*44704f69SBart Van Assche_LT_TAGVAR(hardcode_direct, $1)=no 7728*44704f69SBart Van Assche_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7729*44704f69SBart Van Assche_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7730*44704f69SBart Van Assche_LT_TAGVAR(hardcode_libdir_separator, $1)= 7731*44704f69SBart Van Assche_LT_TAGVAR(hardcode_minus_L, $1)=no 7732*44704f69SBart Van Assche_LT_TAGVAR(hardcode_automatic, $1)=no 7733*44704f69SBart Van Assche_LT_TAGVAR(inherit_rpath, $1)=no 7734*44704f69SBart Van Assche_LT_TAGVAR(module_cmds, $1)= 7735*44704f69SBart Van Assche_LT_TAGVAR(module_expsym_cmds, $1)= 7736*44704f69SBart Van Assche_LT_TAGVAR(link_all_deplibs, $1)=unknown 7737*44704f69SBart Van Assche_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7738*44704f69SBart Van Assche_LT_TAGVAR(reload_flag, $1)=$reload_flag 7739*44704f69SBart Van Assche_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7740*44704f69SBart Van Assche_LT_TAGVAR(no_undefined_flag, $1)= 7741*44704f69SBart Van Assche_LT_TAGVAR(whole_archive_flag_spec, $1)= 7742*44704f69SBart Van Assche_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7743*44704f69SBart Van Assche 7744*44704f69SBart Van Assche# Source file extension for f77 test sources. 7745*44704f69SBart Van Asscheac_ext=f 7746*44704f69SBart Van Assche 7747*44704f69SBart Van Assche# Object file extension for compiled f77 test sources. 7748*44704f69SBart Van Asscheobjext=o 7749*44704f69SBart Van Assche_LT_TAGVAR(objext, $1)=$objext 7750*44704f69SBart Van Assche 7751*44704f69SBart Van Assche# No sense in running all these tests if we already determined that 7752*44704f69SBart Van Assche# the F77 compiler isn't working. Some variables (like enable_shared) 7753*44704f69SBart Van Assche# are currently assumed to apply to all compilers on this platform, 7754*44704f69SBart Van Assche# and will be corrupted by setting them based on a non-working compiler. 7755*44704f69SBart Van Asscheif test yes != "$_lt_disable_F77"; then 7756*44704f69SBart Van Assche # Code to be used in simple compile tests 7757*44704f69SBart Van Assche lt_simple_compile_test_code="\ 7758*44704f69SBart Van Assche subroutine t 7759*44704f69SBart Van Assche return 7760*44704f69SBart Van Assche end 7761*44704f69SBart Van Assche" 7762*44704f69SBart Van Assche 7763*44704f69SBart Van Assche # Code to be used in simple link tests 7764*44704f69SBart Van Assche lt_simple_link_test_code="\ 7765*44704f69SBart Van Assche program t 7766*44704f69SBart Van Assche end 7767*44704f69SBart Van Assche" 7768*44704f69SBart Van Assche 7769*44704f69SBart Van Assche # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7770*44704f69SBart Van Assche _LT_TAG_COMPILER 7771*44704f69SBart Van Assche 7772*44704f69SBart Van Assche # save warnings/boilerplate of simple test code 7773*44704f69SBart Van Assche _LT_COMPILER_BOILERPLATE 7774*44704f69SBart Van Assche _LT_LINKER_BOILERPLATE 7775*44704f69SBart Van Assche 7776*44704f69SBart Van Assche # Allow CC to be a program name with arguments. 7777*44704f69SBart Van Assche lt_save_CC=$CC 7778*44704f69SBart Van Assche lt_save_GCC=$GCC 7779*44704f69SBart Van Assche lt_save_CFLAGS=$CFLAGS 7780*44704f69SBart Van Assche CC=${F77-"f77"} 7781*44704f69SBart Van Assche CFLAGS=$FFLAGS 7782*44704f69SBart Van Assche compiler=$CC 7783*44704f69SBart Van Assche _LT_TAGVAR(compiler, $1)=$CC 7784*44704f69SBart Van Assche _LT_CC_BASENAME([$compiler]) 7785*44704f69SBart Van Assche GCC=$G77 7786*44704f69SBart Van Assche if test -n "$compiler"; then 7787*44704f69SBart Van Assche AC_MSG_CHECKING([if libtool supports shared libraries]) 7788*44704f69SBart Van Assche AC_MSG_RESULT([$can_build_shared]) 7789*44704f69SBart Van Assche 7790*44704f69SBart Van Assche AC_MSG_CHECKING([whether to build shared libraries]) 7791*44704f69SBart Van Assche test no = "$can_build_shared" && enable_shared=no 7792*44704f69SBart Van Assche 7793*44704f69SBart Van Assche # On AIX, shared libraries and static libraries use the same namespace, and 7794*44704f69SBart Van Assche # are all built from PIC. 7795*44704f69SBart Van Assche case $host_os in 7796*44704f69SBart Van Assche aix3*) 7797*44704f69SBart Van Assche test yes = "$enable_shared" && enable_static=no 7798*44704f69SBart Van Assche if test -n "$RANLIB"; then 7799*44704f69SBart Van Assche archive_cmds="$archive_cmds~\$RANLIB \$lib" 7800*44704f69SBart Van Assche postinstall_cmds='$RANLIB $lib' 7801*44704f69SBart Van Assche fi 7802*44704f69SBart Van Assche ;; 7803*44704f69SBart Van Assche aix[[4-9]]*) 7804*44704f69SBart Van Assche if test ia64 != "$host_cpu"; then 7805*44704f69SBart Van Assche case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7806*44704f69SBart Van Assche yes,aix,yes) ;; # shared object as lib.so file only 7807*44704f69SBart Van Assche yes,svr4,*) ;; # shared object as lib.so archive member only 7808*44704f69SBart Van Assche yes,*) enable_static=no ;; # shared object in lib.a archive as well 7809*44704f69SBart Van Assche esac 7810*44704f69SBart Van Assche fi 7811*44704f69SBart Van Assche ;; 7812*44704f69SBart Van Assche esac 7813*44704f69SBart Van Assche AC_MSG_RESULT([$enable_shared]) 7814*44704f69SBart Van Assche 7815*44704f69SBart Van Assche AC_MSG_CHECKING([whether to build static libraries]) 7816*44704f69SBart Van Assche # Make sure either enable_shared or enable_static is yes. 7817*44704f69SBart Van Assche test yes = "$enable_shared" || enable_static=yes 7818*44704f69SBart Van Assche AC_MSG_RESULT([$enable_static]) 7819*44704f69SBart Van Assche 7820*44704f69SBart Van Assche _LT_TAGVAR(GCC, $1)=$G77 7821*44704f69SBart Van Assche _LT_TAGVAR(LD, $1)=$LD 7822*44704f69SBart Van Assche 7823*44704f69SBart Van Assche ## CAVEAT EMPTOR: 7824*44704f69SBart Van Assche ## There is no encapsulation within the following macros, do not change 7825*44704f69SBart Van Assche ## the running order or otherwise move them around unless you know exactly 7826*44704f69SBart Van Assche ## what you are doing... 7827*44704f69SBart Van Assche _LT_COMPILER_PIC($1) 7828*44704f69SBart Van Assche _LT_COMPILER_C_O($1) 7829*44704f69SBart Van Assche _LT_COMPILER_FILE_LOCKS($1) 7830*44704f69SBart Van Assche _LT_LINKER_SHLIBS($1) 7831*44704f69SBart Van Assche _LT_SYS_DYNAMIC_LINKER($1) 7832*44704f69SBart Van Assche _LT_LINKER_HARDCODE_LIBPATH($1) 7833*44704f69SBart Van Assche 7834*44704f69SBart Van Assche _LT_CONFIG($1) 7835*44704f69SBart Van Assche fi # test -n "$compiler" 7836*44704f69SBart Van Assche 7837*44704f69SBart Van Assche GCC=$lt_save_GCC 7838*44704f69SBart Van Assche CC=$lt_save_CC 7839*44704f69SBart Van Assche CFLAGS=$lt_save_CFLAGS 7840*44704f69SBart Van Asschefi # test yes != "$_lt_disable_F77" 7841*44704f69SBart Van Assche 7842*44704f69SBart Van AsscheAC_LANG_POP 7843*44704f69SBart Van Assche])# _LT_LANG_F77_CONFIG 7844*44704f69SBart Van Assche 7845*44704f69SBart Van Assche 7846*44704f69SBart Van Assche# _LT_LANG_FC_CONFIG([TAG]) 7847*44704f69SBart Van Assche# ------------------------- 7848*44704f69SBart Van Assche# Ensure that the configuration variables for a Fortran compiler are 7849*44704f69SBart Van Assche# suitably defined. These variables are subsequently used by _LT_CONFIG 7850*44704f69SBart Van Assche# to write the compiler configuration to 'libtool'. 7851*44704f69SBart Van Asschem4_defun([_LT_LANG_FC_CONFIG], 7852*44704f69SBart Van Assche[AC_LANG_PUSH(Fortran) 7853*44704f69SBart Van Assche 7854*44704f69SBart Van Asscheif test -z "$FC" || test no = "$FC"; then 7855*44704f69SBart Van Assche _lt_disable_FC=yes 7856*44704f69SBart Van Asschefi 7857*44704f69SBart Van Assche 7858*44704f69SBart Van Assche_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7859*44704f69SBart Van Assche_LT_TAGVAR(allow_undefined_flag, $1)= 7860*44704f69SBart Van Assche_LT_TAGVAR(always_export_symbols, $1)=no 7861*44704f69SBart Van Assche_LT_TAGVAR(archive_expsym_cmds, $1)= 7862*44704f69SBart Van Assche_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7863*44704f69SBart Van Assche_LT_TAGVAR(hardcode_direct, $1)=no 7864*44704f69SBart Van Assche_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7865*44704f69SBart Van Assche_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7866*44704f69SBart Van Assche_LT_TAGVAR(hardcode_libdir_separator, $1)= 7867*44704f69SBart Van Assche_LT_TAGVAR(hardcode_minus_L, $1)=no 7868*44704f69SBart Van Assche_LT_TAGVAR(hardcode_automatic, $1)=no 7869*44704f69SBart Van Assche_LT_TAGVAR(inherit_rpath, $1)=no 7870*44704f69SBart Van Assche_LT_TAGVAR(module_cmds, $1)= 7871*44704f69SBart Van Assche_LT_TAGVAR(module_expsym_cmds, $1)= 7872*44704f69SBart Van Assche_LT_TAGVAR(link_all_deplibs, $1)=unknown 7873*44704f69SBart Van Assche_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7874*44704f69SBart Van Assche_LT_TAGVAR(reload_flag, $1)=$reload_flag 7875*44704f69SBart Van Assche_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7876*44704f69SBart Van Assche_LT_TAGVAR(no_undefined_flag, $1)= 7877*44704f69SBart Van Assche_LT_TAGVAR(whole_archive_flag_spec, $1)= 7878*44704f69SBart Van Assche_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7879*44704f69SBart Van Assche 7880*44704f69SBart Van Assche# Source file extension for fc test sources. 7881*44704f69SBart Van Asscheac_ext=${ac_fc_srcext-f} 7882*44704f69SBart Van Assche 7883*44704f69SBart Van Assche# Object file extension for compiled fc test sources. 7884*44704f69SBart Van Asscheobjext=o 7885*44704f69SBart Van Assche_LT_TAGVAR(objext, $1)=$objext 7886*44704f69SBart Van Assche 7887*44704f69SBart Van Assche# No sense in running all these tests if we already determined that 7888*44704f69SBart Van Assche# the FC compiler isn't working. Some variables (like enable_shared) 7889*44704f69SBart Van Assche# are currently assumed to apply to all compilers on this platform, 7890*44704f69SBart Van Assche# and will be corrupted by setting them based on a non-working compiler. 7891*44704f69SBart Van Asscheif test yes != "$_lt_disable_FC"; then 7892*44704f69SBart Van Assche # Code to be used in simple compile tests 7893*44704f69SBart Van Assche lt_simple_compile_test_code="\ 7894*44704f69SBart Van Assche subroutine t 7895*44704f69SBart Van Assche return 7896*44704f69SBart Van Assche end 7897*44704f69SBart Van Assche" 7898*44704f69SBart Van Assche 7899*44704f69SBart Van Assche # Code to be used in simple link tests 7900*44704f69SBart Van Assche lt_simple_link_test_code="\ 7901*44704f69SBart Van Assche program t 7902*44704f69SBart Van Assche end 7903*44704f69SBart Van Assche" 7904*44704f69SBart Van Assche 7905*44704f69SBart Van Assche # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7906*44704f69SBart Van Assche _LT_TAG_COMPILER 7907*44704f69SBart Van Assche 7908*44704f69SBart Van Assche # save warnings/boilerplate of simple test code 7909*44704f69SBart Van Assche _LT_COMPILER_BOILERPLATE 7910*44704f69SBart Van Assche _LT_LINKER_BOILERPLATE 7911*44704f69SBart Van Assche 7912*44704f69SBart Van Assche # Allow CC to be a program name with arguments. 7913*44704f69SBart Van Assche lt_save_CC=$CC 7914*44704f69SBart Van Assche lt_save_GCC=$GCC 7915*44704f69SBart Van Assche lt_save_CFLAGS=$CFLAGS 7916*44704f69SBart Van Assche CC=${FC-"f95"} 7917*44704f69SBart Van Assche CFLAGS=$FCFLAGS 7918*44704f69SBart Van Assche compiler=$CC 7919*44704f69SBart Van Assche GCC=$ac_cv_fc_compiler_gnu 7920*44704f69SBart Van Assche 7921*44704f69SBart Van Assche _LT_TAGVAR(compiler, $1)=$CC 7922*44704f69SBart Van Assche _LT_CC_BASENAME([$compiler]) 7923*44704f69SBart Van Assche 7924*44704f69SBart Van Assche if test -n "$compiler"; then 7925*44704f69SBart Van Assche AC_MSG_CHECKING([if libtool supports shared libraries]) 7926*44704f69SBart Van Assche AC_MSG_RESULT([$can_build_shared]) 7927*44704f69SBart Van Assche 7928*44704f69SBart Van Assche AC_MSG_CHECKING([whether to build shared libraries]) 7929*44704f69SBart Van Assche test no = "$can_build_shared" && enable_shared=no 7930*44704f69SBart Van Assche 7931*44704f69SBart Van Assche # On AIX, shared libraries and static libraries use the same namespace, and 7932*44704f69SBart Van Assche # are all built from PIC. 7933*44704f69SBart Van Assche case $host_os in 7934*44704f69SBart Van Assche aix3*) 7935*44704f69SBart Van Assche test yes = "$enable_shared" && enable_static=no 7936*44704f69SBart Van Assche if test -n "$RANLIB"; then 7937*44704f69SBart Van Assche archive_cmds="$archive_cmds~\$RANLIB \$lib" 7938*44704f69SBart Van Assche postinstall_cmds='$RANLIB $lib' 7939*44704f69SBart Van Assche fi 7940*44704f69SBart Van Assche ;; 7941*44704f69SBart Van Assche aix[[4-9]]*) 7942*44704f69SBart Van Assche if test ia64 != "$host_cpu"; then 7943*44704f69SBart Van Assche case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7944*44704f69SBart Van Assche yes,aix,yes) ;; # shared object as lib.so file only 7945*44704f69SBart Van Assche yes,svr4,*) ;; # shared object as lib.so archive member only 7946*44704f69SBart Van Assche yes,*) enable_static=no ;; # shared object in lib.a archive as well 7947*44704f69SBart Van Assche esac 7948*44704f69SBart Van Assche fi 7949*44704f69SBart Van Assche ;; 7950*44704f69SBart Van Assche esac 7951*44704f69SBart Van Assche AC_MSG_RESULT([$enable_shared]) 7952*44704f69SBart Van Assche 7953*44704f69SBart Van Assche AC_MSG_CHECKING([whether to build static libraries]) 7954*44704f69SBart Van Assche # Make sure either enable_shared or enable_static is yes. 7955*44704f69SBart Van Assche test yes = "$enable_shared" || enable_static=yes 7956*44704f69SBart Van Assche AC_MSG_RESULT([$enable_static]) 7957*44704f69SBart Van Assche 7958*44704f69SBart Van Assche _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7959*44704f69SBart Van Assche _LT_TAGVAR(LD, $1)=$LD 7960*44704f69SBart Van Assche 7961*44704f69SBart Van Assche ## CAVEAT EMPTOR: 7962*44704f69SBart Van Assche ## There is no encapsulation within the following macros, do not change 7963*44704f69SBart Van Assche ## the running order or otherwise move them around unless you know exactly 7964*44704f69SBart Van Assche ## what you are doing... 7965*44704f69SBart Van Assche _LT_SYS_HIDDEN_LIBDEPS($1) 7966*44704f69SBart Van Assche _LT_COMPILER_PIC($1) 7967*44704f69SBart Van Assche _LT_COMPILER_C_O($1) 7968*44704f69SBart Van Assche _LT_COMPILER_FILE_LOCKS($1) 7969*44704f69SBart Van Assche _LT_LINKER_SHLIBS($1) 7970*44704f69SBart Van Assche _LT_SYS_DYNAMIC_LINKER($1) 7971*44704f69SBart Van Assche _LT_LINKER_HARDCODE_LIBPATH($1) 7972*44704f69SBart Van Assche 7973*44704f69SBart Van Assche _LT_CONFIG($1) 7974*44704f69SBart Van Assche fi # test -n "$compiler" 7975*44704f69SBart Van Assche 7976*44704f69SBart Van Assche GCC=$lt_save_GCC 7977*44704f69SBart Van Assche CC=$lt_save_CC 7978*44704f69SBart Van Assche CFLAGS=$lt_save_CFLAGS 7979*44704f69SBart Van Asschefi # test yes != "$_lt_disable_FC" 7980*44704f69SBart Van Assche 7981*44704f69SBart Van AsscheAC_LANG_POP 7982*44704f69SBart Van Assche])# _LT_LANG_FC_CONFIG 7983*44704f69SBart Van Assche 7984*44704f69SBart Van Assche 7985*44704f69SBart Van Assche# _LT_LANG_GCJ_CONFIG([TAG]) 7986*44704f69SBart Van Assche# -------------------------- 7987*44704f69SBart Van Assche# Ensure that the configuration variables for the GNU Java Compiler compiler 7988*44704f69SBart Van Assche# are suitably defined. These variables are subsequently used by _LT_CONFIG 7989*44704f69SBart Van Assche# to write the compiler configuration to 'libtool'. 7990*44704f69SBart Van Asschem4_defun([_LT_LANG_GCJ_CONFIG], 7991*44704f69SBart Van Assche[AC_REQUIRE([LT_PROG_GCJ])dnl 7992*44704f69SBart Van AsscheAC_LANG_SAVE 7993*44704f69SBart Van Assche 7994*44704f69SBart Van Assche# Source file extension for Java test sources. 7995*44704f69SBart Van Asscheac_ext=java 7996*44704f69SBart Van Assche 7997*44704f69SBart Van Assche# Object file extension for compiled Java test sources. 7998*44704f69SBart Van Asscheobjext=o 7999*44704f69SBart Van Assche_LT_TAGVAR(objext, $1)=$objext 8000*44704f69SBart Van Assche 8001*44704f69SBart Van Assche# Code to be used in simple compile tests 8002*44704f69SBart Van Asschelt_simple_compile_test_code="class foo {}" 8003*44704f69SBart Van Assche 8004*44704f69SBart Van Assche# Code to be used in simple link tests 8005*44704f69SBart Van Asschelt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 8006*44704f69SBart Van Assche 8007*44704f69SBart Van Assche# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8008*44704f69SBart Van Assche_LT_TAG_COMPILER 8009*44704f69SBart Van Assche 8010*44704f69SBart Van Assche# save warnings/boilerplate of simple test code 8011*44704f69SBart Van Assche_LT_COMPILER_BOILERPLATE 8012*44704f69SBart Van Assche_LT_LINKER_BOILERPLATE 8013*44704f69SBart Van Assche 8014*44704f69SBart Van Assche# Allow CC to be a program name with arguments. 8015*44704f69SBart Van Asschelt_save_CC=$CC 8016*44704f69SBart Van Asschelt_save_CFLAGS=$CFLAGS 8017*44704f69SBart Van Asschelt_save_GCC=$GCC 8018*44704f69SBart Van AsscheGCC=yes 8019*44704f69SBart Van AsscheCC=${GCJ-"gcj"} 8020*44704f69SBart Van AsscheCFLAGS=$GCJFLAGS 8021*44704f69SBart Van Asschecompiler=$CC 8022*44704f69SBart Van Assche_LT_TAGVAR(compiler, $1)=$CC 8023*44704f69SBart Van Assche_LT_TAGVAR(LD, $1)=$LD 8024*44704f69SBart Van Assche_LT_CC_BASENAME([$compiler]) 8025*44704f69SBart Van Assche 8026*44704f69SBart Van Assche# GCJ did not exist at the time GCC didn't implicitly link libc in. 8027*44704f69SBart Van Assche_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8028*44704f69SBart Van Assche 8029*44704f69SBart Van Assche_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8030*44704f69SBart Van Assche_LT_TAGVAR(reload_flag, $1)=$reload_flag 8031*44704f69SBart Van Assche_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8032*44704f69SBart Van Assche 8033*44704f69SBart Van Asscheif test -n "$compiler"; then 8034*44704f69SBart Van Assche _LT_COMPILER_NO_RTTI($1) 8035*44704f69SBart Van Assche _LT_COMPILER_PIC($1) 8036*44704f69SBart Van Assche _LT_COMPILER_C_O($1) 8037*44704f69SBart Van Assche _LT_COMPILER_FILE_LOCKS($1) 8038*44704f69SBart Van Assche _LT_LINKER_SHLIBS($1) 8039*44704f69SBart Van Assche _LT_LINKER_HARDCODE_LIBPATH($1) 8040*44704f69SBart Van Assche 8041*44704f69SBart Van Assche _LT_CONFIG($1) 8042*44704f69SBart Van Asschefi 8043*44704f69SBart Van Assche 8044*44704f69SBart Van AsscheAC_LANG_RESTORE 8045*44704f69SBart Van Assche 8046*44704f69SBart Van AsscheGCC=$lt_save_GCC 8047*44704f69SBart Van AsscheCC=$lt_save_CC 8048*44704f69SBart Van AsscheCFLAGS=$lt_save_CFLAGS 8049*44704f69SBart Van Assche])# _LT_LANG_GCJ_CONFIG 8050*44704f69SBart Van Assche 8051*44704f69SBart Van Assche 8052*44704f69SBart Van Assche# _LT_LANG_GO_CONFIG([TAG]) 8053*44704f69SBart Van Assche# -------------------------- 8054*44704f69SBart Van Assche# Ensure that the configuration variables for the GNU Go compiler 8055*44704f69SBart Van Assche# are suitably defined. These variables are subsequently used by _LT_CONFIG 8056*44704f69SBart Van Assche# to write the compiler configuration to 'libtool'. 8057*44704f69SBart Van Asschem4_defun([_LT_LANG_GO_CONFIG], 8058*44704f69SBart Van Assche[AC_REQUIRE([LT_PROG_GO])dnl 8059*44704f69SBart Van AsscheAC_LANG_SAVE 8060*44704f69SBart Van Assche 8061*44704f69SBart Van Assche# Source file extension for Go test sources. 8062*44704f69SBart Van Asscheac_ext=go 8063*44704f69SBart Van Assche 8064*44704f69SBart Van Assche# Object file extension for compiled Go test sources. 8065*44704f69SBart Van Asscheobjext=o 8066*44704f69SBart Van Assche_LT_TAGVAR(objext, $1)=$objext 8067*44704f69SBart Van Assche 8068*44704f69SBart Van Assche# Code to be used in simple compile tests 8069*44704f69SBart Van Asschelt_simple_compile_test_code="package main; func main() { }" 8070*44704f69SBart Van Assche 8071*44704f69SBart Van Assche# Code to be used in simple link tests 8072*44704f69SBart Van Asschelt_simple_link_test_code='package main; func main() { }' 8073*44704f69SBart Van Assche 8074*44704f69SBart Van Assche# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8075*44704f69SBart Van Assche_LT_TAG_COMPILER 8076*44704f69SBart Van Assche 8077*44704f69SBart Van Assche# save warnings/boilerplate of simple test code 8078*44704f69SBart Van Assche_LT_COMPILER_BOILERPLATE 8079*44704f69SBart Van Assche_LT_LINKER_BOILERPLATE 8080*44704f69SBart Van Assche 8081*44704f69SBart Van Assche# Allow CC to be a program name with arguments. 8082*44704f69SBart Van Asschelt_save_CC=$CC 8083*44704f69SBart Van Asschelt_save_CFLAGS=$CFLAGS 8084*44704f69SBart Van Asschelt_save_GCC=$GCC 8085*44704f69SBart Van AsscheGCC=yes 8086*44704f69SBart Van AsscheCC=${GOC-"gccgo"} 8087*44704f69SBart Van AsscheCFLAGS=$GOFLAGS 8088*44704f69SBart Van Asschecompiler=$CC 8089*44704f69SBart Van Assche_LT_TAGVAR(compiler, $1)=$CC 8090*44704f69SBart Van Assche_LT_TAGVAR(LD, $1)=$LD 8091*44704f69SBart Van Assche_LT_CC_BASENAME([$compiler]) 8092*44704f69SBart Van Assche 8093*44704f69SBart Van Assche# Go did not exist at the time GCC didn't implicitly link libc in. 8094*44704f69SBart Van Assche_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8095*44704f69SBart Van Assche 8096*44704f69SBart Van Assche_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8097*44704f69SBart Van Assche_LT_TAGVAR(reload_flag, $1)=$reload_flag 8098*44704f69SBart Van Assche_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8099*44704f69SBart Van Assche 8100*44704f69SBart Van Asscheif test -n "$compiler"; then 8101*44704f69SBart Van Assche _LT_COMPILER_NO_RTTI($1) 8102*44704f69SBart Van Assche _LT_COMPILER_PIC($1) 8103*44704f69SBart Van Assche _LT_COMPILER_C_O($1) 8104*44704f69SBart Van Assche _LT_COMPILER_FILE_LOCKS($1) 8105*44704f69SBart Van Assche _LT_LINKER_SHLIBS($1) 8106*44704f69SBart Van Assche _LT_LINKER_HARDCODE_LIBPATH($1) 8107*44704f69SBart Van Assche 8108*44704f69SBart Van Assche _LT_CONFIG($1) 8109*44704f69SBart Van Asschefi 8110*44704f69SBart Van Assche 8111*44704f69SBart Van AsscheAC_LANG_RESTORE 8112*44704f69SBart Van Assche 8113*44704f69SBart Van AsscheGCC=$lt_save_GCC 8114*44704f69SBart Van AsscheCC=$lt_save_CC 8115*44704f69SBart Van AsscheCFLAGS=$lt_save_CFLAGS 8116*44704f69SBart Van Assche])# _LT_LANG_GO_CONFIG 8117*44704f69SBart Van Assche 8118*44704f69SBart Van Assche 8119*44704f69SBart Van Assche# _LT_LANG_RC_CONFIG([TAG]) 8120*44704f69SBart Van Assche# ------------------------- 8121*44704f69SBart Van Assche# Ensure that the configuration variables for the Windows resource compiler 8122*44704f69SBart Van Assche# are suitably defined. These variables are subsequently used by _LT_CONFIG 8123*44704f69SBart Van Assche# to write the compiler configuration to 'libtool'. 8124*44704f69SBart Van Asschem4_defun([_LT_LANG_RC_CONFIG], 8125*44704f69SBart Van Assche[AC_REQUIRE([LT_PROG_RC])dnl 8126*44704f69SBart Van AsscheAC_LANG_SAVE 8127*44704f69SBart Van Assche 8128*44704f69SBart Van Assche# Source file extension for RC test sources. 8129*44704f69SBart Van Asscheac_ext=rc 8130*44704f69SBart Van Assche 8131*44704f69SBart Van Assche# Object file extension for compiled RC test sources. 8132*44704f69SBart Van Asscheobjext=o 8133*44704f69SBart Van Assche_LT_TAGVAR(objext, $1)=$objext 8134*44704f69SBart Van Assche 8135*44704f69SBart Van Assche# Code to be used in simple compile tests 8136*44704f69SBart Van Asschelt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8137*44704f69SBart Van Assche 8138*44704f69SBart Van Assche# Code to be used in simple link tests 8139*44704f69SBart Van Asschelt_simple_link_test_code=$lt_simple_compile_test_code 8140*44704f69SBart Van Assche 8141*44704f69SBart Van Assche# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8142*44704f69SBart Van Assche_LT_TAG_COMPILER 8143*44704f69SBart Van Assche 8144*44704f69SBart Van Assche# save warnings/boilerplate of simple test code 8145*44704f69SBart Van Assche_LT_COMPILER_BOILERPLATE 8146*44704f69SBart Van Assche_LT_LINKER_BOILERPLATE 8147*44704f69SBart Van Assche 8148*44704f69SBart Van Assche# Allow CC to be a program name with arguments. 8149*44704f69SBart Van Asschelt_save_CC=$CC 8150*44704f69SBart Van Asschelt_save_CFLAGS=$CFLAGS 8151*44704f69SBart Van Asschelt_save_GCC=$GCC 8152*44704f69SBart Van AsscheGCC= 8153*44704f69SBart Van AsscheCC=${RC-"windres"} 8154*44704f69SBart Van AsscheCFLAGS= 8155*44704f69SBart Van Asschecompiler=$CC 8156*44704f69SBart Van Assche_LT_TAGVAR(compiler, $1)=$CC 8157*44704f69SBart Van Assche_LT_CC_BASENAME([$compiler]) 8158*44704f69SBart Van Assche_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8159*44704f69SBart Van Assche 8160*44704f69SBart Van Asscheif test -n "$compiler"; then 8161*44704f69SBart Van Assche : 8162*44704f69SBart Van Assche _LT_CONFIG($1) 8163*44704f69SBart Van Asschefi 8164*44704f69SBart Van Assche 8165*44704f69SBart Van AsscheGCC=$lt_save_GCC 8166*44704f69SBart Van AsscheAC_LANG_RESTORE 8167*44704f69SBart Van AsscheCC=$lt_save_CC 8168*44704f69SBart Van AsscheCFLAGS=$lt_save_CFLAGS 8169*44704f69SBart Van Assche])# _LT_LANG_RC_CONFIG 8170*44704f69SBart Van Assche 8171*44704f69SBart Van Assche 8172*44704f69SBart Van Assche# LT_PROG_GCJ 8173*44704f69SBart Van Assche# ----------- 8174*44704f69SBart Van AsscheAC_DEFUN([LT_PROG_GCJ], 8175*44704f69SBart Van Assche[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8176*44704f69SBart Van Assche [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8177*44704f69SBart Van Assche [AC_CHECK_TOOL(GCJ, gcj,) 8178*44704f69SBart Van Assche test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8179*44704f69SBart Van Assche AC_SUBST(GCJFLAGS)])])[]dnl 8180*44704f69SBart Van Assche]) 8181*44704f69SBart Van Assche 8182*44704f69SBart Van Assche# Old name: 8183*44704f69SBart Van AsscheAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8184*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 8185*44704f69SBart Van Asschednl AC_DEFUN([LT_AC_PROG_GCJ], []) 8186*44704f69SBart Van Assche 8187*44704f69SBart Van Assche 8188*44704f69SBart Van Assche# LT_PROG_GO 8189*44704f69SBart Van Assche# ---------- 8190*44704f69SBart Van AsscheAC_DEFUN([LT_PROG_GO], 8191*44704f69SBart Van Assche[AC_CHECK_TOOL(GOC, gccgo,) 8192*44704f69SBart Van Assche]) 8193*44704f69SBart Van Assche 8194*44704f69SBart Van Assche 8195*44704f69SBart Van Assche# LT_PROG_RC 8196*44704f69SBart Van Assche# ---------- 8197*44704f69SBart Van AsscheAC_DEFUN([LT_PROG_RC], 8198*44704f69SBart Van Assche[AC_CHECK_TOOL(RC, windres,) 8199*44704f69SBart Van Assche]) 8200*44704f69SBart Van Assche 8201*44704f69SBart Van Assche# Old name: 8202*44704f69SBart Van AsscheAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8203*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 8204*44704f69SBart Van Asschednl AC_DEFUN([LT_AC_PROG_RC], []) 8205*44704f69SBart Van Assche 8206*44704f69SBart Van Assche 8207*44704f69SBart Van Assche# _LT_DECL_EGREP 8208*44704f69SBart Van Assche# -------------- 8209*44704f69SBart Van Assche# If we don't have a new enough Autoconf to choose the best grep 8210*44704f69SBart Van Assche# available, choose the one first in the user's PATH. 8211*44704f69SBart Van Asschem4_defun([_LT_DECL_EGREP], 8212*44704f69SBart Van Assche[AC_REQUIRE([AC_PROG_EGREP])dnl 8213*44704f69SBart Van AsscheAC_REQUIRE([AC_PROG_FGREP])dnl 8214*44704f69SBart Van Asschetest -z "$GREP" && GREP=grep 8215*44704f69SBart Van Assche_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8216*44704f69SBart Van Assche_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8217*44704f69SBart Van Assche_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8218*44704f69SBart Van Asschednl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8219*44704f69SBart Van AsscheAC_SUBST([GREP]) 8220*44704f69SBart Van Assche]) 8221*44704f69SBart Van Assche 8222*44704f69SBart Van Assche 8223*44704f69SBart Van Assche# _LT_DECL_OBJDUMP 8224*44704f69SBart Van Assche# -------------- 8225*44704f69SBart Van Assche# If we don't have a new enough Autoconf to choose the best objdump 8226*44704f69SBart Van Assche# available, choose the one first in the user's PATH. 8227*44704f69SBart Van Asschem4_defun([_LT_DECL_OBJDUMP], 8228*44704f69SBart Van Assche[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8229*44704f69SBart Van Asschetest -z "$OBJDUMP" && OBJDUMP=objdump 8230*44704f69SBart Van Assche_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8231*44704f69SBart Van AsscheAC_SUBST([OBJDUMP]) 8232*44704f69SBart Van Assche]) 8233*44704f69SBart Van Assche 8234*44704f69SBart Van Assche# _LT_DECL_DLLTOOL 8235*44704f69SBart Van Assche# ---------------- 8236*44704f69SBart Van Assche# Ensure DLLTOOL variable is set. 8237*44704f69SBart Van Asschem4_defun([_LT_DECL_DLLTOOL], 8238*44704f69SBart Van Assche[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8239*44704f69SBart Van Asschetest -z "$DLLTOOL" && DLLTOOL=dlltool 8240*44704f69SBart Van Assche_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8241*44704f69SBart Van AsscheAC_SUBST([DLLTOOL]) 8242*44704f69SBart Van Assche]) 8243*44704f69SBart Van Assche 8244*44704f69SBart Van Assche# _LT_DECL_FILECMD 8245*44704f69SBart Van Assche# ---------------- 8246*44704f69SBart Van Assche# Check for a file(cmd) program that can be used to detect file type and magic 8247*44704f69SBart Van Asschem4_defun([_LT_DECL_FILECMD], 8248*44704f69SBart Van Assche[AC_CHECK_TOOL([FILECMD], [file], [:]) 8249*44704f69SBart Van Assche_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 8250*44704f69SBart Van Assche])# _LD_DECL_FILECMD 8251*44704f69SBart Van Assche 8252*44704f69SBart Van Assche# _LT_DECL_SED 8253*44704f69SBart Van Assche# ------------ 8254*44704f69SBart Van Assche# Check for a fully-functional sed program, that truncates 8255*44704f69SBart Van Assche# as few characters as possible. Prefer GNU sed if found. 8256*44704f69SBart Van Asschem4_defun([_LT_DECL_SED], 8257*44704f69SBart Van Assche[AC_PROG_SED 8258*44704f69SBart Van Asschetest -z "$SED" && SED=sed 8259*44704f69SBart Van AsscheXsed="$SED -e 1s/^X//" 8260*44704f69SBart Van Assche_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8261*44704f69SBart Van Assche_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8262*44704f69SBart Van Assche [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8263*44704f69SBart Van Assche])# _LT_DECL_SED 8264*44704f69SBart Van Assche 8265*44704f69SBart Van Asschem4_ifndef([AC_PROG_SED], [ 8266*44704f69SBart Van Assche# NOTE: This macro has been submitted for inclusion into # 8267*44704f69SBart Van Assche# GNU Autoconf as AC_PROG_SED. When it is available in # 8268*44704f69SBart Van Assche# a released version of Autoconf we should remove this # 8269*44704f69SBart Van Assche# macro and use it instead. # 8270*44704f69SBart Van Assche 8271*44704f69SBart Van Asschem4_defun([AC_PROG_SED], 8272*44704f69SBart Van Assche[AC_MSG_CHECKING([for a sed that does not truncate output]) 8273*44704f69SBart Van AsscheAC_CACHE_VAL(lt_cv_path_SED, 8274*44704f69SBart Van Assche[# Loop through the user's path and test for sed and gsed. 8275*44704f69SBart Van Assche# Then use that list of sed's as ones to test for truncation. 8276*44704f69SBart Van Asscheas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8277*44704f69SBart Van Asschefor as_dir in $PATH 8278*44704f69SBart Van Asschedo 8279*44704f69SBart Van Assche IFS=$as_save_IFS 8280*44704f69SBart Van Assche test -z "$as_dir" && as_dir=. 8281*44704f69SBart Van Assche for lt_ac_prog in sed gsed; do 8282*44704f69SBart Van Assche for ac_exec_ext in '' $ac_executable_extensions; do 8283*44704f69SBart Van Assche if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8284*44704f69SBart Van Assche lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8285*44704f69SBart Van Assche fi 8286*44704f69SBart Van Assche done 8287*44704f69SBart Van Assche done 8288*44704f69SBart Van Asschedone 8289*44704f69SBart Van AsscheIFS=$as_save_IFS 8290*44704f69SBart Van Asschelt_ac_max=0 8291*44704f69SBart Van Asschelt_ac_count=0 8292*44704f69SBart Van Assche# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8293*44704f69SBart Van Assche# along with /bin/sed that truncates output. 8294*44704f69SBart Van Asschefor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8295*44704f69SBart Van Assche test ! -f "$lt_ac_sed" && continue 8296*44704f69SBart Van Assche cat /dev/null > conftest.in 8297*44704f69SBart Van Assche lt_ac_count=0 8298*44704f69SBart Van Assche echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8299*44704f69SBart Van Assche # Check for GNU sed and select it if it is found. 8300*44704f69SBart Van Assche if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8301*44704f69SBart Van Assche lt_cv_path_SED=$lt_ac_sed 8302*44704f69SBart Van Assche break 8303*44704f69SBart Van Assche fi 8304*44704f69SBart Van Assche while true; do 8305*44704f69SBart Van Assche cat conftest.in conftest.in >conftest.tmp 8306*44704f69SBart Van Assche mv conftest.tmp conftest.in 8307*44704f69SBart Van Assche cp conftest.in conftest.nl 8308*44704f69SBart Van Assche echo >>conftest.nl 8309*44704f69SBart Van Assche $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8310*44704f69SBart Van Assche cmp -s conftest.out conftest.nl || break 8311*44704f69SBart Van Assche # 10000 chars as input seems more than enough 8312*44704f69SBart Van Assche test 10 -lt "$lt_ac_count" && break 8313*44704f69SBart Van Assche lt_ac_count=`expr $lt_ac_count + 1` 8314*44704f69SBart Van Assche if test "$lt_ac_count" -gt "$lt_ac_max"; then 8315*44704f69SBart Van Assche lt_ac_max=$lt_ac_count 8316*44704f69SBart Van Assche lt_cv_path_SED=$lt_ac_sed 8317*44704f69SBart Van Assche fi 8318*44704f69SBart Van Assche done 8319*44704f69SBart Van Asschedone 8320*44704f69SBart Van Assche]) 8321*44704f69SBart Van AsscheSED=$lt_cv_path_SED 8322*44704f69SBart Van AsscheAC_SUBST([SED]) 8323*44704f69SBart Van AsscheAC_MSG_RESULT([$SED]) 8324*44704f69SBart Van Assche])#AC_PROG_SED 8325*44704f69SBart Van Assche])#m4_ifndef 8326*44704f69SBart Van Assche 8327*44704f69SBart Van Assche# Old name: 8328*44704f69SBart Van AsscheAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8329*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 8330*44704f69SBart Van Asschednl AC_DEFUN([LT_AC_PROG_SED], []) 8331*44704f69SBart Van Assche 8332*44704f69SBart Van Assche 8333*44704f69SBart Van Assche# _LT_CHECK_SHELL_FEATURES 8334*44704f69SBart Van Assche# ------------------------ 8335*44704f69SBart Van Assche# Find out whether the shell is Bourne or XSI compatible, 8336*44704f69SBart Van Assche# or has some other useful features. 8337*44704f69SBart Van Asschem4_defun([_LT_CHECK_SHELL_FEATURES], 8338*44704f69SBart Van Assche[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8339*44704f69SBart Van Assche lt_unset=unset 8340*44704f69SBart Van Asscheelse 8341*44704f69SBart Van Assche lt_unset=false 8342*44704f69SBart Van Asschefi 8343*44704f69SBart Van Assche_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8344*44704f69SBart Van Assche 8345*44704f69SBart Van Assche# test EBCDIC or ASCII 8346*44704f69SBart Van Asschecase `echo X|tr X '\101'` in 8347*44704f69SBart Van Assche A) # ASCII based system 8348*44704f69SBart Van Assche # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8349*44704f69SBart Van Assche lt_SP2NL='tr \040 \012' 8350*44704f69SBart Van Assche lt_NL2SP='tr \015\012 \040\040' 8351*44704f69SBart Van Assche ;; 8352*44704f69SBart Van Assche *) # EBCDIC based system 8353*44704f69SBart Van Assche lt_SP2NL='tr \100 \n' 8354*44704f69SBart Van Assche lt_NL2SP='tr \r\n \100\100' 8355*44704f69SBart Van Assche ;; 8356*44704f69SBart Van Asscheesac 8357*44704f69SBart Van Assche_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8358*44704f69SBart Van Assche_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8359*44704f69SBart Van Assche])# _LT_CHECK_SHELL_FEATURES 8360*44704f69SBart Van Assche 8361*44704f69SBart Van Assche 8362*44704f69SBart Van Assche# _LT_PATH_CONVERSION_FUNCTIONS 8363*44704f69SBart Van Assche# ----------------------------- 8364*44704f69SBart Van Assche# Determine what file name conversion functions should be used by 8365*44704f69SBart Van Assche# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8366*44704f69SBart Van Assche# for certain cross-compile configurations and native mingw. 8367*44704f69SBart Van Asschem4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8368*44704f69SBart Van Assche[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8369*44704f69SBart Van AsscheAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8370*44704f69SBart Van AsscheAC_MSG_CHECKING([how to convert $build file names to $host format]) 8371*44704f69SBart Van AsscheAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8372*44704f69SBart Van Assche[case $host in 8373*44704f69SBart Van Assche *-*-mingw* ) 8374*44704f69SBart Van Assche case $build in 8375*44704f69SBart Van Assche *-*-mingw* ) # actually msys 8376*44704f69SBart Van Assche lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8377*44704f69SBart Van Assche ;; 8378*44704f69SBart Van Assche *-*-cygwin* ) 8379*44704f69SBart Van Assche lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8380*44704f69SBart Van Assche ;; 8381*44704f69SBart Van Assche * ) # otherwise, assume *nix 8382*44704f69SBart Van Assche lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8383*44704f69SBart Van Assche ;; 8384*44704f69SBart Van Assche esac 8385*44704f69SBart Van Assche ;; 8386*44704f69SBart Van Assche *-*-cygwin* ) 8387*44704f69SBart Van Assche case $build in 8388*44704f69SBart Van Assche *-*-mingw* ) # actually msys 8389*44704f69SBart Van Assche lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8390*44704f69SBart Van Assche ;; 8391*44704f69SBart Van Assche *-*-cygwin* ) 8392*44704f69SBart Van Assche lt_cv_to_host_file_cmd=func_convert_file_noop 8393*44704f69SBart Van Assche ;; 8394*44704f69SBart Van Assche * ) # otherwise, assume *nix 8395*44704f69SBart Van Assche lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8396*44704f69SBart Van Assche ;; 8397*44704f69SBart Van Assche esac 8398*44704f69SBart Van Assche ;; 8399*44704f69SBart Van Assche * ) # unhandled hosts (and "normal" native builds) 8400*44704f69SBart Van Assche lt_cv_to_host_file_cmd=func_convert_file_noop 8401*44704f69SBart Van Assche ;; 8402*44704f69SBart Van Asscheesac 8403*44704f69SBart Van Assche]) 8404*44704f69SBart Van Asscheto_host_file_cmd=$lt_cv_to_host_file_cmd 8405*44704f69SBart Van AsscheAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8406*44704f69SBart Van Assche_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8407*44704f69SBart Van Assche [0], [convert $build file names to $host format])dnl 8408*44704f69SBart Van Assche 8409*44704f69SBart Van AsscheAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8410*44704f69SBart Van AsscheAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8411*44704f69SBart Van Assche[#assume ordinary cross tools, or native build. 8412*44704f69SBart Van Asschelt_cv_to_tool_file_cmd=func_convert_file_noop 8413*44704f69SBart Van Asschecase $host in 8414*44704f69SBart Van Assche *-*-mingw* ) 8415*44704f69SBart Van Assche case $build in 8416*44704f69SBart Van Assche *-*-mingw* ) # actually msys 8417*44704f69SBart Van Assche lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8418*44704f69SBart Van Assche ;; 8419*44704f69SBart Van Assche esac 8420*44704f69SBart Van Assche ;; 8421*44704f69SBart Van Asscheesac 8422*44704f69SBart Van Assche]) 8423*44704f69SBart Van Asscheto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8424*44704f69SBart Van AsscheAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8425*44704f69SBart Van Assche_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8426*44704f69SBart Van Assche [0], [convert $build files to toolchain format])dnl 8427*44704f69SBart Van Assche])# _LT_PATH_CONVERSION_FUNCTIONS 8428*44704f69SBart Van Assche 8429*44704f69SBart Van Assche# Helper functions for option handling. -*- Autoconf -*- 8430*44704f69SBart Van Assche# 8431*44704f69SBart Van Assche# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 8432*44704f69SBart Van Assche# Software Foundation, Inc. 8433*44704f69SBart Van Assche# Written by Gary V. Vaughan, 2004 8434*44704f69SBart Van Assche# 8435*44704f69SBart Van Assche# This file is free software; the Free Software Foundation gives 8436*44704f69SBart Van Assche# unlimited permission to copy and/or distribute it, with or without 8437*44704f69SBart Van Assche# modifications, as long as this notice is preserved. 8438*44704f69SBart Van Assche 8439*44704f69SBart Van Assche# serial 8 ltoptions.m4 8440*44704f69SBart Van Assche 8441*44704f69SBart Van Assche# This is to help aclocal find these macros, as it can't see m4_define. 8442*44704f69SBart Van AsscheAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8443*44704f69SBart Van Assche 8444*44704f69SBart Van Assche 8445*44704f69SBart Van Assche# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8446*44704f69SBart Van Assche# ------------------------------------------ 8447*44704f69SBart Van Asschem4_define([_LT_MANGLE_OPTION], 8448*44704f69SBart Van Assche[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8449*44704f69SBart Van Assche 8450*44704f69SBart Van Assche 8451*44704f69SBart Van Assche# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8452*44704f69SBart Van Assche# --------------------------------------- 8453*44704f69SBart Van Assche# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8454*44704f69SBart Van Assche# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8455*44704f69SBart Van Assche# saved as a flag. 8456*44704f69SBart Van Asschem4_define([_LT_SET_OPTION], 8457*44704f69SBart Van Assche[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8458*44704f69SBart Van Asschem4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8459*44704f69SBart Van Assche _LT_MANGLE_DEFUN([$1], [$2]), 8460*44704f69SBart Van Assche [m4_warning([Unknown $1 option '$2'])])[]dnl 8461*44704f69SBart Van Assche]) 8462*44704f69SBart Van Assche 8463*44704f69SBart Van Assche 8464*44704f69SBart Van Assche# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8465*44704f69SBart Van Assche# ------------------------------------------------------------ 8466*44704f69SBart Van Assche# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8467*44704f69SBart Van Asschem4_define([_LT_IF_OPTION], 8468*44704f69SBart Van Assche[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8469*44704f69SBart Van Assche 8470*44704f69SBart Van Assche 8471*44704f69SBart Van Assche# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8472*44704f69SBart Van Assche# ------------------------------------------------------- 8473*44704f69SBart Van Assche# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8474*44704f69SBart Van Assche# are set. 8475*44704f69SBart Van Asschem4_define([_LT_UNLESS_OPTIONS], 8476*44704f69SBart Van Assche[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8477*44704f69SBart Van Assche [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8478*44704f69SBart Van Assche [m4_define([$0_found])])])[]dnl 8479*44704f69SBart Van Asschem4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8480*44704f69SBart Van Assche])[]dnl 8481*44704f69SBart Van Assche]) 8482*44704f69SBart Van Assche 8483*44704f69SBart Van Assche 8484*44704f69SBart Van Assche# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8485*44704f69SBart Van Assche# ---------------------------------------- 8486*44704f69SBart Van Assche# OPTION-LIST is a space-separated list of Libtool options associated 8487*44704f69SBart Van Assche# with MACRO-NAME. If any OPTION has a matching handler declared with 8488*44704f69SBart Van Assche# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8489*44704f69SBart Van Assche# the unknown option and exit. 8490*44704f69SBart Van Asschem4_defun([_LT_SET_OPTIONS], 8491*44704f69SBart Van Assche[# Set options 8492*44704f69SBart Van Asschem4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8493*44704f69SBart Van Assche [_LT_SET_OPTION([$1], _LT_Option)]) 8494*44704f69SBart Van Assche 8495*44704f69SBart Van Asschem4_if([$1],[LT_INIT],[ 8496*44704f69SBart Van Assche dnl 8497*44704f69SBart Van Assche dnl Simply set some default values (i.e off) if boolean options were not 8498*44704f69SBart Van Assche dnl specified: 8499*44704f69SBart Van Assche _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8500*44704f69SBart Van Assche ]) 8501*44704f69SBart Van Assche _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8502*44704f69SBart Van Assche ]) 8503*44704f69SBart Van Assche dnl 8504*44704f69SBart Van Assche dnl If no reference was made to various pairs of opposing options, then 8505*44704f69SBart Van Assche dnl we run the default mode handler for the pair. For example, if neither 8506*44704f69SBart Van Assche dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8507*44704f69SBart Van Assche dnl archives by default: 8508*44704f69SBart Van Assche _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8509*44704f69SBart Van Assche _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8510*44704f69SBart Van Assche _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8511*44704f69SBart Van Assche _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8512*44704f69SBart Van Assche [_LT_ENABLE_FAST_INSTALL]) 8513*44704f69SBart Van Assche _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8514*44704f69SBart Van Assche [_LT_WITH_AIX_SONAME([aix])]) 8515*44704f69SBart Van Assche ]) 8516*44704f69SBart Van Assche])# _LT_SET_OPTIONS 8517*44704f69SBart Van Assche 8518*44704f69SBart Van Assche 8519*44704f69SBart Van Assche 8520*44704f69SBart Van Assche# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8521*44704f69SBart Van Assche# ----------------------------------------- 8522*44704f69SBart Van Asschem4_define([_LT_MANGLE_DEFUN], 8523*44704f69SBart Van Assche[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8524*44704f69SBart Van Assche 8525*44704f69SBart Van Assche 8526*44704f69SBart Van Assche# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8527*44704f69SBart Van Assche# ----------------------------------------------- 8528*44704f69SBart Van Asschem4_define([LT_OPTION_DEFINE], 8529*44704f69SBart Van Assche[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8530*44704f69SBart Van Assche])# LT_OPTION_DEFINE 8531*44704f69SBart Van Assche 8532*44704f69SBart Van Assche 8533*44704f69SBart Van Assche# dlopen 8534*44704f69SBart Van Assche# ------ 8535*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8536*44704f69SBart Van Assche]) 8537*44704f69SBart Van Assche 8538*44704f69SBart Van AsscheAU_DEFUN([AC_LIBTOOL_DLOPEN], 8539*44704f69SBart Van Assche[_LT_SET_OPTION([LT_INIT], [dlopen]) 8540*44704f69SBart Van AsscheAC_DIAGNOSE([obsolete], 8541*44704f69SBart Van Assche[$0: Remove this warning and the call to _LT_SET_OPTION when you 8542*44704f69SBart Van Asscheput the 'dlopen' option into LT_INIT's first parameter.]) 8543*44704f69SBart Van Assche]) 8544*44704f69SBart Van Assche 8545*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 8546*44704f69SBart Van Asschednl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8547*44704f69SBart Van Assche 8548*44704f69SBart Van Assche 8549*44704f69SBart Van Assche# win32-dll 8550*44704f69SBart Van Assche# --------- 8551*44704f69SBart Van Assche# Declare package support for building win32 dll's. 8552*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8553*44704f69SBart Van Assche[enable_win32_dll=yes 8554*44704f69SBart Van Assche 8555*44704f69SBart Van Asschecase $host in 8556*44704f69SBart Van Assche*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8557*44704f69SBart Van Assche AC_CHECK_TOOL(AS, as, false) 8558*44704f69SBart Van Assche AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8559*44704f69SBart Van Assche AC_CHECK_TOOL(OBJDUMP, objdump, false) 8560*44704f69SBart Van Assche ;; 8561*44704f69SBart Van Asscheesac 8562*44704f69SBart Van Assche 8563*44704f69SBart Van Asschetest -z "$AS" && AS=as 8564*44704f69SBart Van Assche_LT_DECL([], [AS], [1], [Assembler program])dnl 8565*44704f69SBart Van Assche 8566*44704f69SBart Van Asschetest -z "$DLLTOOL" && DLLTOOL=dlltool 8567*44704f69SBart Van Assche_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8568*44704f69SBart Van Assche 8569*44704f69SBart Van Asschetest -z "$OBJDUMP" && OBJDUMP=objdump 8570*44704f69SBart Van Assche_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8571*44704f69SBart Van Assche])# win32-dll 8572*44704f69SBart Van Assche 8573*44704f69SBart Van AsscheAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8574*44704f69SBart Van Assche[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8575*44704f69SBart Van Assche_LT_SET_OPTION([LT_INIT], [win32-dll]) 8576*44704f69SBart Van AsscheAC_DIAGNOSE([obsolete], 8577*44704f69SBart Van Assche[$0: Remove this warning and the call to _LT_SET_OPTION when you 8578*44704f69SBart Van Asscheput the 'win32-dll' option into LT_INIT's first parameter.]) 8579*44704f69SBart Van Assche]) 8580*44704f69SBart Van Assche 8581*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 8582*44704f69SBart Van Asschednl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8583*44704f69SBart Van Assche 8584*44704f69SBart Van Assche 8585*44704f69SBart Van Assche# _LT_ENABLE_SHARED([DEFAULT]) 8586*44704f69SBart Van Assche# ---------------------------- 8587*44704f69SBart Van Assche# implement the --enable-shared flag, and supports the 'shared' and 8588*44704f69SBart Van Assche# 'disable-shared' LT_INIT options. 8589*44704f69SBart Van Assche# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8590*44704f69SBart Van Asschem4_define([_LT_ENABLE_SHARED], 8591*44704f69SBart Van Assche[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8592*44704f69SBart Van AsscheAC_ARG_ENABLE([shared], 8593*44704f69SBart Van Assche [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8594*44704f69SBart Van Assche [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8595*44704f69SBart Van Assche [p=${PACKAGE-default} 8596*44704f69SBart Van Assche case $enableval in 8597*44704f69SBart Van Assche yes) enable_shared=yes ;; 8598*44704f69SBart Van Assche no) enable_shared=no ;; 8599*44704f69SBart Van Assche *) 8600*44704f69SBart Van Assche enable_shared=no 8601*44704f69SBart Van Assche # Look at the argument we got. We use all the common list separators. 8602*44704f69SBart Van Assche lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8603*44704f69SBart Van Assche for pkg in $enableval; do 8604*44704f69SBart Van Assche IFS=$lt_save_ifs 8605*44704f69SBart Van Assche if test "X$pkg" = "X$p"; then 8606*44704f69SBart Van Assche enable_shared=yes 8607*44704f69SBart Van Assche fi 8608*44704f69SBart Van Assche done 8609*44704f69SBart Van Assche IFS=$lt_save_ifs 8610*44704f69SBart Van Assche ;; 8611*44704f69SBart Van Assche esac], 8612*44704f69SBart Van Assche [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8613*44704f69SBart Van Assche 8614*44704f69SBart Van Assche _LT_DECL([build_libtool_libs], [enable_shared], [0], 8615*44704f69SBart Van Assche [Whether or not to build shared libraries]) 8616*44704f69SBart Van Assche])# _LT_ENABLE_SHARED 8617*44704f69SBart Van Assche 8618*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8619*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8620*44704f69SBart Van Assche 8621*44704f69SBart Van Assche# Old names: 8622*44704f69SBart Van AsscheAC_DEFUN([AC_ENABLE_SHARED], 8623*44704f69SBart Van Assche[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8624*44704f69SBart Van Assche]) 8625*44704f69SBart Van Assche 8626*44704f69SBart Van AsscheAC_DEFUN([AC_DISABLE_SHARED], 8627*44704f69SBart Van Assche[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8628*44704f69SBart Van Assche]) 8629*44704f69SBart Van Assche 8630*44704f69SBart Van AsscheAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8631*44704f69SBart Van AsscheAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8632*44704f69SBart Van Assche 8633*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 8634*44704f69SBart Van Asschednl AC_DEFUN([AM_ENABLE_SHARED], []) 8635*44704f69SBart Van Asschednl AC_DEFUN([AM_DISABLE_SHARED], []) 8636*44704f69SBart Van Assche 8637*44704f69SBart Van Assche 8638*44704f69SBart Van Assche 8639*44704f69SBart Van Assche# _LT_ENABLE_STATIC([DEFAULT]) 8640*44704f69SBart Van Assche# ---------------------------- 8641*44704f69SBart Van Assche# implement the --enable-static flag, and support the 'static' and 8642*44704f69SBart Van Assche# 'disable-static' LT_INIT options. 8643*44704f69SBart Van Assche# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8644*44704f69SBart Van Asschem4_define([_LT_ENABLE_STATIC], 8645*44704f69SBart Van Assche[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8646*44704f69SBart Van AsscheAC_ARG_ENABLE([static], 8647*44704f69SBart Van Assche [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8648*44704f69SBart Van Assche [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8649*44704f69SBart Van Assche [p=${PACKAGE-default} 8650*44704f69SBart Van Assche case $enableval in 8651*44704f69SBart Van Assche yes) enable_static=yes ;; 8652*44704f69SBart Van Assche no) enable_static=no ;; 8653*44704f69SBart Van Assche *) 8654*44704f69SBart Van Assche enable_static=no 8655*44704f69SBart Van Assche # Look at the argument we got. We use all the common list separators. 8656*44704f69SBart Van Assche lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8657*44704f69SBart Van Assche for pkg in $enableval; do 8658*44704f69SBart Van Assche IFS=$lt_save_ifs 8659*44704f69SBart Van Assche if test "X$pkg" = "X$p"; then 8660*44704f69SBart Van Assche enable_static=yes 8661*44704f69SBart Van Assche fi 8662*44704f69SBart Van Assche done 8663*44704f69SBart Van Assche IFS=$lt_save_ifs 8664*44704f69SBart Van Assche ;; 8665*44704f69SBart Van Assche esac], 8666*44704f69SBart Van Assche [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8667*44704f69SBart Van Assche 8668*44704f69SBart Van Assche _LT_DECL([build_old_libs], [enable_static], [0], 8669*44704f69SBart Van Assche [Whether or not to build static libraries]) 8670*44704f69SBart Van Assche])# _LT_ENABLE_STATIC 8671*44704f69SBart Van Assche 8672*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8673*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8674*44704f69SBart Van Assche 8675*44704f69SBart Van Assche# Old names: 8676*44704f69SBart Van AsscheAC_DEFUN([AC_ENABLE_STATIC], 8677*44704f69SBart Van Assche[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8678*44704f69SBart Van Assche]) 8679*44704f69SBart Van Assche 8680*44704f69SBart Van AsscheAC_DEFUN([AC_DISABLE_STATIC], 8681*44704f69SBart Van Assche[_LT_SET_OPTION([LT_INIT], [disable-static]) 8682*44704f69SBart Van Assche]) 8683*44704f69SBart Van Assche 8684*44704f69SBart Van AsscheAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8685*44704f69SBart Van AsscheAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8686*44704f69SBart Van Assche 8687*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 8688*44704f69SBart Van Asschednl AC_DEFUN([AM_ENABLE_STATIC], []) 8689*44704f69SBart Van Asschednl AC_DEFUN([AM_DISABLE_STATIC], []) 8690*44704f69SBart Van Assche 8691*44704f69SBart Van Assche 8692*44704f69SBart Van Assche 8693*44704f69SBart Van Assche# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8694*44704f69SBart Van Assche# ---------------------------------- 8695*44704f69SBart Van Assche# implement the --enable-fast-install flag, and support the 'fast-install' 8696*44704f69SBart Van Assche# and 'disable-fast-install' LT_INIT options. 8697*44704f69SBart Van Assche# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8698*44704f69SBart Van Asschem4_define([_LT_ENABLE_FAST_INSTALL], 8699*44704f69SBart Van Assche[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8700*44704f69SBart Van AsscheAC_ARG_ENABLE([fast-install], 8701*44704f69SBart Van Assche [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8702*44704f69SBart Van Assche [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8703*44704f69SBart Van Assche [p=${PACKAGE-default} 8704*44704f69SBart Van Assche case $enableval in 8705*44704f69SBart Van Assche yes) enable_fast_install=yes ;; 8706*44704f69SBart Van Assche no) enable_fast_install=no ;; 8707*44704f69SBart Van Assche *) 8708*44704f69SBart Van Assche enable_fast_install=no 8709*44704f69SBart Van Assche # Look at the argument we got. We use all the common list separators. 8710*44704f69SBart Van Assche lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8711*44704f69SBart Van Assche for pkg in $enableval; do 8712*44704f69SBart Van Assche IFS=$lt_save_ifs 8713*44704f69SBart Van Assche if test "X$pkg" = "X$p"; then 8714*44704f69SBart Van Assche enable_fast_install=yes 8715*44704f69SBart Van Assche fi 8716*44704f69SBart Van Assche done 8717*44704f69SBart Van Assche IFS=$lt_save_ifs 8718*44704f69SBart Van Assche ;; 8719*44704f69SBart Van Assche esac], 8720*44704f69SBart Van Assche [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8721*44704f69SBart Van Assche 8722*44704f69SBart Van Assche_LT_DECL([fast_install], [enable_fast_install], [0], 8723*44704f69SBart Van Assche [Whether or not to optimize for fast installation])dnl 8724*44704f69SBart Van Assche])# _LT_ENABLE_FAST_INSTALL 8725*44704f69SBart Van Assche 8726*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8727*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8728*44704f69SBart Van Assche 8729*44704f69SBart Van Assche# Old names: 8730*44704f69SBart Van AsscheAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8731*44704f69SBart Van Assche[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8732*44704f69SBart Van AsscheAC_DIAGNOSE([obsolete], 8733*44704f69SBart Van Assche[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8734*44704f69SBart Van Asschethe 'fast-install' option into LT_INIT's first parameter.]) 8735*44704f69SBart Van Assche]) 8736*44704f69SBart Van Assche 8737*44704f69SBart Van AsscheAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8738*44704f69SBart Van Assche[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8739*44704f69SBart Van AsscheAC_DIAGNOSE([obsolete], 8740*44704f69SBart Van Assche[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8741*44704f69SBart Van Asschethe 'disable-fast-install' option into LT_INIT's first parameter.]) 8742*44704f69SBart Van Assche]) 8743*44704f69SBart Van Assche 8744*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 8745*44704f69SBart Van Asschednl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8746*44704f69SBart Van Asschednl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8747*44704f69SBart Van Assche 8748*44704f69SBart Van Assche 8749*44704f69SBart Van Assche# _LT_WITH_AIX_SONAME([DEFAULT]) 8750*44704f69SBart Van Assche# ---------------------------------- 8751*44704f69SBart Van Assche# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8752*44704f69SBart Van Assche# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8753*44704f69SBart Van Assche# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8754*44704f69SBart Van Asschem4_define([_LT_WITH_AIX_SONAME], 8755*44704f69SBart Van Assche[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8756*44704f69SBart Van Asscheshared_archive_member_spec= 8757*44704f69SBart Van Asschecase $host,$enable_shared in 8758*44704f69SBart Van Asschepower*-*-aix[[5-9]]*,yes) 8759*44704f69SBart Van Assche AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8760*44704f69SBart Van Assche AC_ARG_WITH([aix-soname], 8761*44704f69SBart Van Assche [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8762*44704f69SBart Van Assche [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8763*44704f69SBart Van Assche [case $withval in 8764*44704f69SBart Van Assche aix|svr4|both) 8765*44704f69SBart Van Assche ;; 8766*44704f69SBart Van Assche *) 8767*44704f69SBart Van Assche AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8768*44704f69SBart Van Assche ;; 8769*44704f69SBart Van Assche esac 8770*44704f69SBart Van Assche lt_cv_with_aix_soname=$with_aix_soname], 8771*44704f69SBart Van Assche [AC_CACHE_VAL([lt_cv_with_aix_soname], 8772*44704f69SBart Van Assche [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8773*44704f69SBart Van Assche with_aix_soname=$lt_cv_with_aix_soname]) 8774*44704f69SBart Van Assche AC_MSG_RESULT([$with_aix_soname]) 8775*44704f69SBart Van Assche if test aix != "$with_aix_soname"; then 8776*44704f69SBart Van Assche # For the AIX way of multilib, we name the shared archive member 8777*44704f69SBart Van Assche # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8778*44704f69SBart Van Assche # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8779*44704f69SBart Van Assche # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8780*44704f69SBart Van Assche # the AIX toolchain works better with OBJECT_MODE set (default 32). 8781*44704f69SBart Van Assche if test 64 = "${OBJECT_MODE-32}"; then 8782*44704f69SBart Van Assche shared_archive_member_spec=shr_64 8783*44704f69SBart Van Assche else 8784*44704f69SBart Van Assche shared_archive_member_spec=shr 8785*44704f69SBart Van Assche fi 8786*44704f69SBart Van Assche fi 8787*44704f69SBart Van Assche ;; 8788*44704f69SBart Van Assche*) 8789*44704f69SBart Van Assche with_aix_soname=aix 8790*44704f69SBart Van Assche ;; 8791*44704f69SBart Van Asscheesac 8792*44704f69SBart Van Assche 8793*44704f69SBart Van Assche_LT_DECL([], [shared_archive_member_spec], [0], 8794*44704f69SBart Van Assche [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8795*44704f69SBart Van Assche])# _LT_WITH_AIX_SONAME 8796*44704f69SBart Van Assche 8797*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8798*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8799*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8800*44704f69SBart Van Assche 8801*44704f69SBart Van Assche 8802*44704f69SBart Van Assche# _LT_WITH_PIC([MODE]) 8803*44704f69SBart Van Assche# -------------------- 8804*44704f69SBart Van Assche# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8805*44704f69SBart Van Assche# LT_INIT options. 8806*44704f69SBart Van Assche# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8807*44704f69SBart Van Asschem4_define([_LT_WITH_PIC], 8808*44704f69SBart Van Assche[AC_ARG_WITH([pic], 8809*44704f69SBart Van Assche [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8810*44704f69SBart Van Assche [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8811*44704f69SBart Van Assche [lt_p=${PACKAGE-default} 8812*44704f69SBart Van Assche case $withval in 8813*44704f69SBart Van Assche yes|no) pic_mode=$withval ;; 8814*44704f69SBart Van Assche *) 8815*44704f69SBart Van Assche pic_mode=default 8816*44704f69SBart Van Assche # Look at the argument we got. We use all the common list separators. 8817*44704f69SBart Van Assche lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8818*44704f69SBart Van Assche for lt_pkg in $withval; do 8819*44704f69SBart Van Assche IFS=$lt_save_ifs 8820*44704f69SBart Van Assche if test "X$lt_pkg" = "X$lt_p"; then 8821*44704f69SBart Van Assche pic_mode=yes 8822*44704f69SBart Van Assche fi 8823*44704f69SBart Van Assche done 8824*44704f69SBart Van Assche IFS=$lt_save_ifs 8825*44704f69SBart Van Assche ;; 8826*44704f69SBart Van Assche esac], 8827*44704f69SBart Van Assche [pic_mode=m4_default([$1], [default])]) 8828*44704f69SBart Van Assche 8829*44704f69SBart Van Assche_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8830*44704f69SBart Van Assche])# _LT_WITH_PIC 8831*44704f69SBart Van Assche 8832*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8833*44704f69SBart Van AsscheLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8834*44704f69SBart Van Assche 8835*44704f69SBart Van Assche# Old name: 8836*44704f69SBart Van AsscheAU_DEFUN([AC_LIBTOOL_PICMODE], 8837*44704f69SBart Van Assche[_LT_SET_OPTION([LT_INIT], [pic-only]) 8838*44704f69SBart Van AsscheAC_DIAGNOSE([obsolete], 8839*44704f69SBart Van Assche[$0: Remove this warning and the call to _LT_SET_OPTION when you 8840*44704f69SBart Van Asscheput the 'pic-only' option into LT_INIT's first parameter.]) 8841*44704f69SBart Van Assche]) 8842*44704f69SBart Van Assche 8843*44704f69SBart Van Asschednl aclocal-1.4 backwards compatibility: 8844*44704f69SBart Van Asschednl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8845*44704f69SBart Van Assche 8846*44704f69SBart Van Assche 8847*44704f69SBart Van Asschem4_define([_LTDL_MODE], []) 8848*44704f69SBart Van AsscheLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8849*44704f69SBart Van Assche [m4_define([_LTDL_MODE], [nonrecursive])]) 8850*44704f69SBart Van AsscheLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8851*44704f69SBart Van Assche [m4_define([_LTDL_MODE], [recursive])]) 8852*44704f69SBart Van AsscheLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8853*44704f69SBart Van Assche [m4_define([_LTDL_MODE], [subproject])]) 8854*44704f69SBart Van Assche 8855*44704f69SBart Van Asschem4_define([_LTDL_TYPE], []) 8856*44704f69SBart Van AsscheLT_OPTION_DEFINE([LTDL_INIT], [installable], 8857*44704f69SBart Van Assche [m4_define([_LTDL_TYPE], [installable])]) 8858*44704f69SBart Van AsscheLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8859*44704f69SBart Van Assche [m4_define([_LTDL_TYPE], [convenience])]) 8860*44704f69SBart Van Assche 8861*44704f69SBart Van Assche# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8862*44704f69SBart Van Assche# 8863*44704f69SBart Van Assche# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 8864*44704f69SBart Van Assche# Foundation, Inc. 8865*44704f69SBart Van Assche# Written by Gary V. Vaughan, 2004 8866*44704f69SBart Van Assche# 8867*44704f69SBart Van Assche# This file is free software; the Free Software Foundation gives 8868*44704f69SBart Van Assche# unlimited permission to copy and/or distribute it, with or without 8869*44704f69SBart Van Assche# modifications, as long as this notice is preserved. 8870*44704f69SBart Van Assche 8871*44704f69SBart Van Assche# serial 6 ltsugar.m4 8872*44704f69SBart Van Assche 8873*44704f69SBart Van Assche# This is to help aclocal find these macros, as it can't see m4_define. 8874*44704f69SBart Van AsscheAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8875*44704f69SBart Van Assche 8876*44704f69SBart Van Assche 8877*44704f69SBart Van Assche# lt_join(SEP, ARG1, [ARG2...]) 8878*44704f69SBart Van Assche# ----------------------------- 8879*44704f69SBart Van Assche# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8880*44704f69SBart Van Assche# associated separator. 8881*44704f69SBart Van Assche# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8882*44704f69SBart Van Assche# versions in m4sugar had bugs. 8883*44704f69SBart Van Asschem4_define([lt_join], 8884*44704f69SBart Van Assche[m4_if([$#], [1], [], 8885*44704f69SBart Van Assche [$#], [2], [[$2]], 8886*44704f69SBart Van Assche [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8887*44704f69SBart Van Asschem4_define([_lt_join], 8888*44704f69SBart Van Assche[m4_if([$#$2], [2], [], 8889*44704f69SBart Van Assche [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8890*44704f69SBart Van Assche 8891*44704f69SBart Van Assche 8892*44704f69SBart Van Assche# lt_car(LIST) 8893*44704f69SBart Van Assche# lt_cdr(LIST) 8894*44704f69SBart Van Assche# ------------ 8895*44704f69SBart Van Assche# Manipulate m4 lists. 8896*44704f69SBart Van Assche# These macros are necessary as long as will still need to support 8897*44704f69SBart Van Assche# Autoconf-2.59, which quotes differently. 8898*44704f69SBart Van Asschem4_define([lt_car], [[$1]]) 8899*44704f69SBart Van Asschem4_define([lt_cdr], 8900*44704f69SBart Van Assche[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8901*44704f69SBart Van Assche [$#], 1, [], 8902*44704f69SBart Van Assche [m4_dquote(m4_shift($@))])]) 8903*44704f69SBart Van Asschem4_define([lt_unquote], $1) 8904*44704f69SBart Van Assche 8905*44704f69SBart Van Assche 8906*44704f69SBart Van Assche# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8907*44704f69SBart Van Assche# ------------------------------------------ 8908*44704f69SBart Van Assche# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8909*44704f69SBart Van Assche# Note that neither SEPARATOR nor STRING are expanded; they are appended 8910*44704f69SBart Van Assche# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8911*44704f69SBart Van Assche# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8912*44704f69SBart Van Assche# than defined and empty). 8913*44704f69SBart Van Assche# 8914*44704f69SBart Van Assche# This macro is needed until we can rely on Autoconf 2.62, since earlier 8915*44704f69SBart Van Assche# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8916*44704f69SBart Van Asschem4_define([lt_append], 8917*44704f69SBart Van Assche[m4_define([$1], 8918*44704f69SBart Van Assche m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8919*44704f69SBart Van Assche 8920*44704f69SBart Van Assche 8921*44704f69SBart Van Assche 8922*44704f69SBart Van Assche# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8923*44704f69SBart Van Assche# ---------------------------------------------------------- 8924*44704f69SBart Van Assche# Produce a SEP delimited list of all paired combinations of elements of 8925*44704f69SBart Van Assche# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8926*44704f69SBart Van Assche# has the form PREFIXmINFIXSUFFIXn. 8927*44704f69SBart Van Assche# Needed until we can rely on m4_combine added in Autoconf 2.62. 8928*44704f69SBart Van Asschem4_define([lt_combine], 8929*44704f69SBart Van Assche[m4_if(m4_eval([$# > 3]), [1], 8930*44704f69SBart Van Assche [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8931*44704f69SBart Van Assche[[m4_foreach([_Lt_prefix], [$2], 8932*44704f69SBart Van Assche [m4_foreach([_Lt_suffix], 8933*44704f69SBart Van Assche ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8934*44704f69SBart Van Assche [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8935*44704f69SBart Van Assche 8936*44704f69SBart Van Assche 8937*44704f69SBart Van Assche# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8938*44704f69SBart Van Assche# ----------------------------------------------------------------------- 8939*44704f69SBart Van Assche# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8940*44704f69SBart Van Assche# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8941*44704f69SBart Van Asschem4_define([lt_if_append_uniq], 8942*44704f69SBart Van Assche[m4_ifdef([$1], 8943*44704f69SBart Van Assche [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8944*44704f69SBart Van Assche [lt_append([$1], [$2], [$3])$4], 8945*44704f69SBart Van Assche [$5])], 8946*44704f69SBart Van Assche [lt_append([$1], [$2], [$3])$4])]) 8947*44704f69SBart Van Assche 8948*44704f69SBart Van Assche 8949*44704f69SBart Van Assche# lt_dict_add(DICT, KEY, VALUE) 8950*44704f69SBart Van Assche# ----------------------------- 8951*44704f69SBart Van Asschem4_define([lt_dict_add], 8952*44704f69SBart Van Assche[m4_define([$1($2)], [$3])]) 8953*44704f69SBart Van Assche 8954*44704f69SBart Van Assche 8955*44704f69SBart Van Assche# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8956*44704f69SBart Van Assche# -------------------------------------------- 8957*44704f69SBart Van Asschem4_define([lt_dict_add_subkey], 8958*44704f69SBart Van Assche[m4_define([$1($2:$3)], [$4])]) 8959*44704f69SBart Van Assche 8960*44704f69SBart Van Assche 8961*44704f69SBart Van Assche# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8962*44704f69SBart Van Assche# ---------------------------------- 8963*44704f69SBart Van Asschem4_define([lt_dict_fetch], 8964*44704f69SBart Van Assche[m4_ifval([$3], 8965*44704f69SBart Van Assche m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8966*44704f69SBart Van Assche m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8967*44704f69SBart Van Assche 8968*44704f69SBart Van Assche 8969*44704f69SBart Van Assche# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8970*44704f69SBart Van Assche# ----------------------------------------------------------------- 8971*44704f69SBart Van Asschem4_define([lt_if_dict_fetch], 8972*44704f69SBart Van Assche[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8973*44704f69SBart Van Assche [$5], 8974*44704f69SBart Van Assche [$6])]) 8975*44704f69SBart Van Assche 8976*44704f69SBart Van Assche 8977*44704f69SBart Van Assche# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8978*44704f69SBart Van Assche# -------------------------------------------------------------- 8979*44704f69SBart Van Asschem4_define([lt_dict_filter], 8980*44704f69SBart Van Assche[m4_if([$5], [], [], 8981*44704f69SBart Van Assche [lt_join(m4_quote(m4_default([$4], [[, ]])), 8982*44704f69SBart Van Assche lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8983*44704f69SBart Van Assche [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8984*44704f69SBart Van Assche]) 8985*44704f69SBart Van Assche 8986*44704f69SBart Van Assche# ltversion.m4 -- version numbers -*- Autoconf -*- 8987*44704f69SBart Van Assche# 8988*44704f69SBart Van Assche# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 8989*44704f69SBart Van Assche# Inc. 8990*44704f69SBart Van Assche# Written by Scott James Remnant, 2004 8991*44704f69SBart Van Assche# 8992*44704f69SBart Van Assche# This file is free software; the Free Software Foundation gives 8993*44704f69SBart Van Assche# unlimited permission to copy and/or distribute it, with or without 8994*44704f69SBart Van Assche# modifications, as long as this notice is preserved. 8995*44704f69SBart Van Assche 8996*44704f69SBart Van Assche# @configure_input@ 8997*44704f69SBart Van Assche 8998*44704f69SBart Van Assche# serial 4245 ltversion.m4 8999*44704f69SBart Van Assche# This file is part of GNU Libtool 9000*44704f69SBart Van Assche 9001*44704f69SBart Van Asschem4_define([LT_PACKAGE_VERSION], [2.4.7]) 9002*44704f69SBart Van Asschem4_define([LT_PACKAGE_REVISION], [2.4.7]) 9003*44704f69SBart Van Assche 9004*44704f69SBart Van AsscheAC_DEFUN([LTVERSION_VERSION], 9005*44704f69SBart Van Assche[macro_version='2.4.7' 9006*44704f69SBart Van Asschemacro_revision='2.4.7' 9007*44704f69SBart Van Assche_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 9008*44704f69SBart Van Assche_LT_DECL(, macro_revision, 0) 9009*44704f69SBart Van Assche]) 9010*44704f69SBart Van Assche 9011*44704f69SBart Van Assche# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 9012*44704f69SBart Van Assche# 9013*44704f69SBart Van Assche# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 9014*44704f69SBart Van Assche# Software Foundation, Inc. 9015*44704f69SBart Van Assche# Written by Scott James Remnant, 2004. 9016*44704f69SBart Van Assche# 9017*44704f69SBart Van Assche# This file is free software; the Free Software Foundation gives 9018*44704f69SBart Van Assche# unlimited permission to copy and/or distribute it, with or without 9019*44704f69SBart Van Assche# modifications, as long as this notice is preserved. 9020*44704f69SBart Van Assche 9021*44704f69SBart Van Assche# serial 5 lt~obsolete.m4 9022*44704f69SBart Van Assche 9023*44704f69SBart Van Assche# These exist entirely to fool aclocal when bootstrapping libtool. 9024*44704f69SBart Van Assche# 9025*44704f69SBart Van Assche# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 9026*44704f69SBart Van Assche# which have later been changed to m4_define as they aren't part of the 9027*44704f69SBart Van Assche# exported API, or moved to Autoconf or Automake where they belong. 9028*44704f69SBart Van Assche# 9029*44704f69SBart Van Assche# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 9030*44704f69SBart Van Assche# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 9031*44704f69SBart Van Assche# using a macro with the same name in our local m4/libtool.m4 it'll 9032*44704f69SBart Van Assche# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 9033*44704f69SBart Van Assche# and doesn't know about Autoconf macros at all.) 9034*44704f69SBart Van Assche# 9035*44704f69SBart Van Assche# So we provide this file, which has a silly filename so it's always 9036*44704f69SBart Van Assche# included after everything else. This provides aclocal with the 9037*44704f69SBart Van Assche# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 9038*44704f69SBart Van Assche# because those macros already exist, or will be overwritten later. 9039*44704f69SBart Van Assche# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9040*44704f69SBart Van Assche# 9041*44704f69SBart Van Assche# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9042*44704f69SBart Van Assche# Yes, that means every name once taken will need to remain here until 9043*44704f69SBart Van Assche# we give up compatibility with versions before 1.7, at which point 9044*44704f69SBart Van Assche# we need to keep only those names which we still refer to. 9045*44704f69SBart Van Assche 9046*44704f69SBart Van Assche# This is to help aclocal find these macros, as it can't see m4_define. 9047*44704f69SBart Van AsscheAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9048*44704f69SBart Van Assche 9049*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9050*44704f69SBart Van Asschem4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9051*44704f69SBart Van Asschem4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9052*44704f69SBart Van Asschem4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9053*44704f69SBart Van Asschem4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9054*44704f69SBart Van Asschem4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9055*44704f69SBart Van Asschem4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9056*44704f69SBart Van Asschem4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9057*44704f69SBart Van Asschem4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9058*44704f69SBart Van Asschem4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9059*44704f69SBart Van Asschem4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9060*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9061*44704f69SBart Van Asschem4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9062*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9063*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9064*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9065*44704f69SBart Van Asschem4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9066*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9067*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9068*44704f69SBart Van Asschem4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9069*44704f69SBart Van Asschem4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9070*44704f69SBart Van Asschem4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9071*44704f69SBart Van Asschem4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9072*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9073*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9074*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9075*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9076*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9077*44704f69SBart Van Asschem4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9078*44704f69SBart Van Asschem4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9079*44704f69SBart Van Asschem4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9080*44704f69SBart Van Asschem4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9081*44704f69SBart Van Asschem4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9082*44704f69SBart Van Asschem4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9083*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9084*44704f69SBart Van Asschem4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9085*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9086*44704f69SBart Van Asschem4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9087*44704f69SBart Van Asschem4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9088*44704f69SBart Van Asschem4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9089*44704f69SBart Van Asschem4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9090*44704f69SBart Van Asschem4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9091*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9092*44704f69SBart Van Asschem4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9093*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9094*44704f69SBart Van Asschem4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9095*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9096*44704f69SBart Van Asschem4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9097*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9098*44704f69SBart Van Asschem4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9099*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9100*44704f69SBart Van Asschem4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9101*44704f69SBart Van Asschem4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9102*44704f69SBart Van Asschem4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9103*44704f69SBart Van Asschem4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9104*44704f69SBart Van Asschem4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9105*44704f69SBart Van Asschem4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9106*44704f69SBart Van Asschem4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9107*44704f69SBart Van Asschem4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9108*44704f69SBart Van Asschem4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9109*44704f69SBart Van Asschem4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9110*44704f69SBart Van Assche 9111*44704f69SBart Van Assche# Copyright (C) 2002-2021 Free Software Foundation, Inc. 9112*44704f69SBart Van Assche# 9113*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9114*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9115*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9116*44704f69SBart Van Assche 9117*44704f69SBart Van Assche# AM_AUTOMAKE_VERSION(VERSION) 9118*44704f69SBart Van Assche# ---------------------------- 9119*44704f69SBart Van Assche# Automake X.Y traces this macro to ensure aclocal.m4 has been 9120*44704f69SBart Van Assche# generated from the m4 files accompanying Automake X.Y. 9121*44704f69SBart Van Assche# (This private macro should not be called outside this file.) 9122*44704f69SBart Van AsscheAC_DEFUN([AM_AUTOMAKE_VERSION], 9123*44704f69SBart Van Assche[am__api_version='1.16' 9124*44704f69SBart Van Asschednl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 9125*44704f69SBart Van Asschednl require some minimum version. Point them to the right macro. 9126*44704f69SBart Van Asschem4_if([$1], [1.16.5], [], 9127*44704f69SBart Van Assche [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 9128*44704f69SBart Van Assche]) 9129*44704f69SBart Van Assche 9130*44704f69SBart Van Assche# _AM_AUTOCONF_VERSION(VERSION) 9131*44704f69SBart Van Assche# ----------------------------- 9132*44704f69SBart Van Assche# aclocal traces this macro to find the Autoconf version. 9133*44704f69SBart Van Assche# This is a private macro too. Using m4_define simplifies 9134*44704f69SBart Van Assche# the logic in aclocal, which can simply ignore this definition. 9135*44704f69SBart Van Asschem4_define([_AM_AUTOCONF_VERSION], []) 9136*44704f69SBart Van Assche 9137*44704f69SBart Van Assche# AM_SET_CURRENT_AUTOMAKE_VERSION 9138*44704f69SBart Van Assche# ------------------------------- 9139*44704f69SBart Van Assche# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 9140*44704f69SBart Van Assche# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 9141*44704f69SBart Van AsscheAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 9142*44704f69SBart Van Assche[AM_AUTOMAKE_VERSION([1.16.5])dnl 9143*44704f69SBart Van Asschem4_ifndef([AC_AUTOCONF_VERSION], 9144*44704f69SBart Van Assche [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 9145*44704f69SBart Van Assche_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 9146*44704f69SBart Van Assche 9147*44704f69SBart Van Assche# Copyright (C) 2011-2021 Free Software Foundation, Inc. 9148*44704f69SBart Van Assche# 9149*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9150*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9151*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9152*44704f69SBart Van Assche 9153*44704f69SBart Van Assche# AM_PROG_AR([ACT-IF-FAIL]) 9154*44704f69SBart Van Assche# ------------------------- 9155*44704f69SBart Van Assche# Try to determine the archiver interface, and trigger the ar-lib wrapper 9156*44704f69SBart Van Assche# if it is needed. If the detection of archiver interface fails, run 9157*44704f69SBart Van Assche# ACT-IF-FAIL (default is to abort configure with a proper error message). 9158*44704f69SBart Van AsscheAC_DEFUN([AM_PROG_AR], 9159*44704f69SBart Van Assche[AC_BEFORE([$0], [LT_INIT])dnl 9160*44704f69SBart Van AsscheAC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl 9161*44704f69SBart Van AsscheAC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9162*44704f69SBart Van AsscheAC_REQUIRE_AUX_FILE([ar-lib])dnl 9163*44704f69SBart Van AsscheAC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) 9164*44704f69SBart Van Assche: ${AR=ar} 9165*44704f69SBart Van Assche 9166*44704f69SBart Van AsscheAC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], 9167*44704f69SBart Van Assche [AC_LANG_PUSH([C]) 9168*44704f69SBart Van Assche am_cv_ar_interface=ar 9169*44704f69SBart Van Assche AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], 9170*44704f69SBart Van Assche [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' 9171*44704f69SBart Van Assche AC_TRY_EVAL([am_ar_try]) 9172*44704f69SBart Van Assche if test "$ac_status" -eq 0; then 9173*44704f69SBart Van Assche am_cv_ar_interface=ar 9174*44704f69SBart Van Assche else 9175*44704f69SBart Van Assche am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' 9176*44704f69SBart Van Assche AC_TRY_EVAL([am_ar_try]) 9177*44704f69SBart Van Assche if test "$ac_status" -eq 0; then 9178*44704f69SBart Van Assche am_cv_ar_interface=lib 9179*44704f69SBart Van Assche else 9180*44704f69SBart Van Assche am_cv_ar_interface=unknown 9181*44704f69SBart Van Assche fi 9182*44704f69SBart Van Assche fi 9183*44704f69SBart Van Assche rm -f conftest.lib libconftest.a 9184*44704f69SBart Van Assche ]) 9185*44704f69SBart Van Assche AC_LANG_POP([C])]) 9186*44704f69SBart Van Assche 9187*44704f69SBart Van Asschecase $am_cv_ar_interface in 9188*44704f69SBart Van Asschear) 9189*44704f69SBart Van Assche ;; 9190*44704f69SBart Van Asschelib) 9191*44704f69SBart Van Assche # Microsoft lib, so override with the ar-lib wrapper script. 9192*44704f69SBart Van Assche # FIXME: It is wrong to rewrite AR. 9193*44704f69SBart Van Assche # But if we don't then we get into trouble of one sort or another. 9194*44704f69SBart Van Assche # A longer-term fix would be to have automake use am__AR in this case, 9195*44704f69SBart Van Assche # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something 9196*44704f69SBart Van Assche # similar. 9197*44704f69SBart Van Assche AR="$am_aux_dir/ar-lib $AR" 9198*44704f69SBart Van Assche ;; 9199*44704f69SBart Van Asscheunknown) 9200*44704f69SBart Van Assche m4_default([$1], 9201*44704f69SBart Van Assche [AC_MSG_ERROR([could not determine $AR interface])]) 9202*44704f69SBart Van Assche ;; 9203*44704f69SBart Van Asscheesac 9204*44704f69SBart Van AsscheAC_SUBST([AR])dnl 9205*44704f69SBart Van Assche]) 9206*44704f69SBart Van Assche 9207*44704f69SBart Van Assche# AM_AUX_DIR_EXPAND -*- Autoconf -*- 9208*44704f69SBart Van Assche 9209*44704f69SBart Van Assche# Copyright (C) 2001-2021 Free Software Foundation, Inc. 9210*44704f69SBart Van Assche# 9211*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9212*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9213*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9214*44704f69SBart Van Assche 9215*44704f69SBart Van Assche# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 9216*44704f69SBart Van Assche# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 9217*44704f69SBart Van Assche# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 9218*44704f69SBart Van Assche# 9219*44704f69SBart Van Assche# Of course, Automake must honor this variable whenever it calls a 9220*44704f69SBart Van Assche# tool from the auxiliary directory. The problem is that $srcdir (and 9221*44704f69SBart Van Assche# therefore $ac_aux_dir as well) can be either absolute or relative, 9222*44704f69SBart Van Assche# depending on how configure is run. This is pretty annoying, since 9223*44704f69SBart Van Assche# it makes $ac_aux_dir quite unusable in subdirectories: in the top 9224*44704f69SBart Van Assche# source directory, any form will work fine, but in subdirectories a 9225*44704f69SBart Van Assche# relative path needs to be adjusted first. 9226*44704f69SBart Van Assche# 9227*44704f69SBart Van Assche# $ac_aux_dir/missing 9228*44704f69SBart Van Assche# fails when called from a subdirectory if $ac_aux_dir is relative 9229*44704f69SBart Van Assche# $top_srcdir/$ac_aux_dir/missing 9230*44704f69SBart Van Assche# fails if $ac_aux_dir is absolute, 9231*44704f69SBart Van Assche# fails when called from a subdirectory in a VPATH build with 9232*44704f69SBart Van Assche# a relative $ac_aux_dir 9233*44704f69SBart Van Assche# 9234*44704f69SBart Van Assche# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 9235*44704f69SBart Van Assche# are both prefixed by $srcdir. In an in-source build this is usually 9236*44704f69SBart Van Assche# harmless because $srcdir is '.', but things will broke when you 9237*44704f69SBart Van Assche# start a VPATH build or use an absolute $srcdir. 9238*44704f69SBart Van Assche# 9239*44704f69SBart Van Assche# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9240*44704f69SBart Van Assche# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9241*44704f69SBart Van Assche# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9242*44704f69SBart Van Assche# and then we would define $MISSING as 9243*44704f69SBart Van Assche# MISSING="\${SHELL} $am_aux_dir/missing" 9244*44704f69SBart Van Assche# This will work as long as MISSING is not called from configure, because 9245*44704f69SBart Van Assche# unfortunately $(top_srcdir) has no meaning in configure. 9246*44704f69SBart Van Assche# However there are other variables, like CC, which are often used in 9247*44704f69SBart Van Assche# configure, and could therefore not use this "fixed" $ac_aux_dir. 9248*44704f69SBart Van Assche# 9249*44704f69SBart Van Assche# Another solution, used here, is to always expand $ac_aux_dir to an 9250*44704f69SBart Van Assche# absolute PATH. The drawback is that using absolute paths prevent a 9251*44704f69SBart Van Assche# configured tree to be moved without reconfiguration. 9252*44704f69SBart Van Assche 9253*44704f69SBart Van AsscheAC_DEFUN([AM_AUX_DIR_EXPAND], 9254*44704f69SBart Van Assche[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 9255*44704f69SBart Van Assche# Expand $ac_aux_dir to an absolute path. 9256*44704f69SBart Van Asscheam_aux_dir=`cd "$ac_aux_dir" && pwd` 9257*44704f69SBart Van Assche]) 9258*44704f69SBart Van Assche 9259*44704f69SBart Van Assche# AM_CONDITIONAL -*- Autoconf -*- 9260*44704f69SBart Van Assche 9261*44704f69SBart Van Assche# Copyright (C) 1997-2021 Free Software Foundation, Inc. 9262*44704f69SBart Van Assche# 9263*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9264*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9265*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9266*44704f69SBart Van Assche 9267*44704f69SBart Van Assche# AM_CONDITIONAL(NAME, SHELL-CONDITION) 9268*44704f69SBart Van Assche# ------------------------------------- 9269*44704f69SBart Van Assche# Define a conditional. 9270*44704f69SBart Van AsscheAC_DEFUN([AM_CONDITIONAL], 9271*44704f69SBart Van Assche[AC_PREREQ([2.52])dnl 9272*44704f69SBart Van Assche m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 9273*44704f69SBart Van Assche [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 9274*44704f69SBart Van AsscheAC_SUBST([$1_TRUE])dnl 9275*44704f69SBart Van AsscheAC_SUBST([$1_FALSE])dnl 9276*44704f69SBart Van Assche_AM_SUBST_NOTMAKE([$1_TRUE])dnl 9277*44704f69SBart Van Assche_AM_SUBST_NOTMAKE([$1_FALSE])dnl 9278*44704f69SBart Van Asschem4_define([_AM_COND_VALUE_$1], [$2])dnl 9279*44704f69SBart Van Asscheif $2; then 9280*44704f69SBart Van Assche $1_TRUE= 9281*44704f69SBart Van Assche $1_FALSE='#' 9282*44704f69SBart Van Asscheelse 9283*44704f69SBart Van Assche $1_TRUE='#' 9284*44704f69SBart Van Assche $1_FALSE= 9285*44704f69SBart Van Asschefi 9286*44704f69SBart Van AsscheAC_CONFIG_COMMANDS_PRE( 9287*44704f69SBart Van Assche[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 9288*44704f69SBart Van Assche AC_MSG_ERROR([[conditional "$1" was never defined. 9289*44704f69SBart Van AsscheUsually this means the macro was only invoked conditionally.]]) 9290*44704f69SBart Van Asschefi])]) 9291*44704f69SBart Van Assche 9292*44704f69SBart Van Assche# Copyright (C) 1999-2021 Free Software Foundation, Inc. 9293*44704f69SBart Van Assche# 9294*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9295*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9296*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9297*44704f69SBart Van Assche 9298*44704f69SBart Van Assche 9299*44704f69SBart Van Assche# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 9300*44704f69SBart Van Assche# written in clear, in which case automake, when reading aclocal.m4, 9301*44704f69SBart Van Assche# will think it sees a *use*, and therefore will trigger all it's 9302*44704f69SBart Van Assche# C support machinery. Also note that it means that autoscan, seeing 9303*44704f69SBart Van Assche# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 9304*44704f69SBart Van Assche 9305*44704f69SBart Van Assche 9306*44704f69SBart Van Assche# _AM_DEPENDENCIES(NAME) 9307*44704f69SBart Van Assche# ---------------------- 9308*44704f69SBart Van Assche# See how the compiler implements dependency checking. 9309*44704f69SBart Van Assche# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 9310*44704f69SBart Van Assche# We try a few techniques and use that to set a single cache variable. 9311*44704f69SBart Van Assche# 9312*44704f69SBart Van Assche# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 9313*44704f69SBart Van Assche# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 9314*44704f69SBart Van Assche# dependency, and given that the user is not expected to run this macro, 9315*44704f69SBart Van Assche# just rely on AC_PROG_CC. 9316*44704f69SBart Van AsscheAC_DEFUN([_AM_DEPENDENCIES], 9317*44704f69SBart Van Assche[AC_REQUIRE([AM_SET_DEPDIR])dnl 9318*44704f69SBart Van AsscheAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 9319*44704f69SBart Van AsscheAC_REQUIRE([AM_MAKE_INCLUDE])dnl 9320*44704f69SBart Van AsscheAC_REQUIRE([AM_DEP_TRACK])dnl 9321*44704f69SBart Van Assche 9322*44704f69SBart Van Asschem4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 9323*44704f69SBart Van Assche [$1], [CXX], [depcc="$CXX" am_compiler_list=], 9324*44704f69SBart Van Assche [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 9325*44704f69SBart Van Assche [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 9326*44704f69SBart Van Assche [$1], [UPC], [depcc="$UPC" am_compiler_list=], 9327*44704f69SBart Van Assche [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 9328*44704f69SBart Van Assche [depcc="$$1" am_compiler_list=]) 9329*44704f69SBart Van Assche 9330*44704f69SBart Van AsscheAC_CACHE_CHECK([dependency style of $depcc], 9331*44704f69SBart Van Assche [am_cv_$1_dependencies_compiler_type], 9332*44704f69SBart Van Assche[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 9333*44704f69SBart Van Assche # We make a subdir and do the tests there. Otherwise we can end up 9334*44704f69SBart Van Assche # making bogus files that we don't know about and never remove. For 9335*44704f69SBart Van Assche # instance it was reported that on HP-UX the gcc test will end up 9336*44704f69SBart Van Assche # making a dummy file named 'D' -- because '-MD' means "put the output 9337*44704f69SBart Van Assche # in D". 9338*44704f69SBart Van Assche rm -rf conftest.dir 9339*44704f69SBart Van Assche mkdir conftest.dir 9340*44704f69SBart Van Assche # Copy depcomp to subdir because otherwise we won't find it if we're 9341*44704f69SBart Van Assche # using a relative directory. 9342*44704f69SBart Van Assche cp "$am_depcomp" conftest.dir 9343*44704f69SBart Van Assche cd conftest.dir 9344*44704f69SBart Van Assche # We will build objects and dependencies in a subdirectory because 9345*44704f69SBart Van Assche # it helps to detect inapplicable dependency modes. For instance 9346*44704f69SBart Van Assche # both Tru64's cc and ICC support -MD to output dependencies as a 9347*44704f69SBart Van Assche # side effect of compilation, but ICC will put the dependencies in 9348*44704f69SBart Van Assche # the current directory while Tru64 will put them in the object 9349*44704f69SBart Van Assche # directory. 9350*44704f69SBart Van Assche mkdir sub 9351*44704f69SBart Van Assche 9352*44704f69SBart Van Assche am_cv_$1_dependencies_compiler_type=none 9353*44704f69SBart Van Assche if test "$am_compiler_list" = ""; then 9354*44704f69SBart Van Assche am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 9355*44704f69SBart Van Assche fi 9356*44704f69SBart Van Assche am__universal=false 9357*44704f69SBart Van Assche m4_case([$1], [CC], 9358*44704f69SBart Van Assche [case " $depcc " in #( 9359*44704f69SBart Van Assche *\ -arch\ *\ -arch\ *) am__universal=true ;; 9360*44704f69SBart Van Assche esac], 9361*44704f69SBart Van Assche [CXX], 9362*44704f69SBart Van Assche [case " $depcc " in #( 9363*44704f69SBart Van Assche *\ -arch\ *\ -arch\ *) am__universal=true ;; 9364*44704f69SBart Van Assche esac]) 9365*44704f69SBart Van Assche 9366*44704f69SBart Van Assche for depmode in $am_compiler_list; do 9367*44704f69SBart Van Assche # Setup a source with many dependencies, because some compilers 9368*44704f69SBart Van Assche # like to wrap large dependency lists on column 80 (with \), and 9369*44704f69SBart Van Assche # we should not choose a depcomp mode which is confused by this. 9370*44704f69SBart Van Assche # 9371*44704f69SBart Van Assche # We need to recreate these files for each test, as the compiler may 9372*44704f69SBart Van Assche # overwrite some of them when testing with obscure command lines. 9373*44704f69SBart Van Assche # This happens at least with the AIX C compiler. 9374*44704f69SBart Van Assche : > sub/conftest.c 9375*44704f69SBart Van Assche for i in 1 2 3 4 5 6; do 9376*44704f69SBart Van Assche echo '#include "conftst'$i'.h"' >> sub/conftest.c 9377*44704f69SBart Van Assche # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 9378*44704f69SBart Van Assche # Solaris 10 /bin/sh. 9379*44704f69SBart Van Assche echo '/* dummy */' > sub/conftst$i.h 9380*44704f69SBart Van Assche done 9381*44704f69SBart Van Assche echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 9382*44704f69SBart Van Assche 9383*44704f69SBart Van Assche # We check with '-c' and '-o' for the sake of the "dashmstdout" 9384*44704f69SBart Van Assche # mode. It turns out that the SunPro C++ compiler does not properly 9385*44704f69SBart Van Assche # handle '-M -o', and we need to detect this. Also, some Intel 9386*44704f69SBart Van Assche # versions had trouble with output in subdirs. 9387*44704f69SBart Van Assche am__obj=sub/conftest.${OBJEXT-o} 9388*44704f69SBart Van Assche am__minus_obj="-o $am__obj" 9389*44704f69SBart Van Assche case $depmode in 9390*44704f69SBart Van Assche gcc) 9391*44704f69SBart Van Assche # This depmode causes a compiler race in universal mode. 9392*44704f69SBart Van Assche test "$am__universal" = false || continue 9393*44704f69SBart Van Assche ;; 9394*44704f69SBart Van Assche nosideeffect) 9395*44704f69SBart Van Assche # After this tag, mechanisms are not by side-effect, so they'll 9396*44704f69SBart Van Assche # only be used when explicitly requested. 9397*44704f69SBart Van Assche if test "x$enable_dependency_tracking" = xyes; then 9398*44704f69SBart Van Assche continue 9399*44704f69SBart Van Assche else 9400*44704f69SBart Van Assche break 9401*44704f69SBart Van Assche fi 9402*44704f69SBart Van Assche ;; 9403*44704f69SBart Van Assche msvc7 | msvc7msys | msvisualcpp | msvcmsys) 9404*44704f69SBart Van Assche # This compiler won't grok '-c -o', but also, the minuso test has 9405*44704f69SBart Van Assche # not run yet. These depmodes are late enough in the game, and 9406*44704f69SBart Van Assche # so weak that their functioning should not be impacted. 9407*44704f69SBart Van Assche am__obj=conftest.${OBJEXT-o} 9408*44704f69SBart Van Assche am__minus_obj= 9409*44704f69SBart Van Assche ;; 9410*44704f69SBart Van Assche none) break ;; 9411*44704f69SBart Van Assche esac 9412*44704f69SBart Van Assche if depmode=$depmode \ 9413*44704f69SBart Van Assche source=sub/conftest.c object=$am__obj \ 9414*44704f69SBart Van Assche depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 9415*44704f69SBart Van Assche $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 9416*44704f69SBart Van Assche >/dev/null 2>conftest.err && 9417*44704f69SBart Van Assche grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 9418*44704f69SBart Van Assche grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 9419*44704f69SBart Van Assche grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 9420*44704f69SBart Van Assche ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 9421*44704f69SBart Van Assche # icc doesn't choke on unknown options, it will just issue warnings 9422*44704f69SBart Van Assche # or remarks (even with -Werror). So we grep stderr for any message 9423*44704f69SBart Van Assche # that says an option was ignored or not supported. 9424*44704f69SBart Van Assche # When given -MP, icc 7.0 and 7.1 complain thusly: 9425*44704f69SBart Van Assche # icc: Command line warning: ignoring option '-M'; no argument required 9426*44704f69SBart Van Assche # The diagnosis changed in icc 8.0: 9427*44704f69SBart Van Assche # icc: Command line remark: option '-MP' not supported 9428*44704f69SBart Van Assche if (grep 'ignoring option' conftest.err || 9429*44704f69SBart Van Assche grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 9430*44704f69SBart Van Assche am_cv_$1_dependencies_compiler_type=$depmode 9431*44704f69SBart Van Assche break 9432*44704f69SBart Van Assche fi 9433*44704f69SBart Van Assche fi 9434*44704f69SBart Van Assche done 9435*44704f69SBart Van Assche 9436*44704f69SBart Van Assche cd .. 9437*44704f69SBart Van Assche rm -rf conftest.dir 9438*44704f69SBart Van Asscheelse 9439*44704f69SBart Van Assche am_cv_$1_dependencies_compiler_type=none 9440*44704f69SBart Van Asschefi 9441*44704f69SBart Van Assche]) 9442*44704f69SBart Van AsscheAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 9443*44704f69SBart Van AsscheAM_CONDITIONAL([am__fastdep$1], [ 9444*44704f69SBart Van Assche test "x$enable_dependency_tracking" != xno \ 9445*44704f69SBart Van Assche && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 9446*44704f69SBart Van Assche]) 9447*44704f69SBart Van Assche 9448*44704f69SBart Van Assche 9449*44704f69SBart Van Assche# AM_SET_DEPDIR 9450*44704f69SBart Van Assche# ------------- 9451*44704f69SBart Van Assche# Choose a directory name for dependency files. 9452*44704f69SBart Van Assche# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 9453*44704f69SBart Van AsscheAC_DEFUN([AM_SET_DEPDIR], 9454*44704f69SBart Van Assche[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 9455*44704f69SBart Van AsscheAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 9456*44704f69SBart Van Assche]) 9457*44704f69SBart Van Assche 9458*44704f69SBart Van Assche 9459*44704f69SBart Van Assche# AM_DEP_TRACK 9460*44704f69SBart Van Assche# ------------ 9461*44704f69SBart Van AsscheAC_DEFUN([AM_DEP_TRACK], 9462*44704f69SBart Van Assche[AC_ARG_ENABLE([dependency-tracking], [dnl 9463*44704f69SBart Van AsscheAS_HELP_STRING( 9464*44704f69SBart Van Assche [--enable-dependency-tracking], 9465*44704f69SBart Van Assche [do not reject slow dependency extractors]) 9466*44704f69SBart Van AsscheAS_HELP_STRING( 9467*44704f69SBart Van Assche [--disable-dependency-tracking], 9468*44704f69SBart Van Assche [speeds up one-time build])]) 9469*44704f69SBart Van Asscheif test "x$enable_dependency_tracking" != xno; then 9470*44704f69SBart Van Assche am_depcomp="$ac_aux_dir/depcomp" 9471*44704f69SBart Van Assche AMDEPBACKSLASH='\' 9472*44704f69SBart Van Assche am__nodep='_no' 9473*44704f69SBart Van Asschefi 9474*44704f69SBart Van AsscheAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 9475*44704f69SBart Van AsscheAC_SUBST([AMDEPBACKSLASH])dnl 9476*44704f69SBart Van Assche_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 9477*44704f69SBart Van AsscheAC_SUBST([am__nodep])dnl 9478*44704f69SBart Van Assche_AM_SUBST_NOTMAKE([am__nodep])dnl 9479*44704f69SBart Van Assche]) 9480*44704f69SBart Van Assche 9481*44704f69SBart Van Assche# Generate code to set up dependency tracking. -*- Autoconf -*- 9482*44704f69SBart Van Assche 9483*44704f69SBart Van Assche# Copyright (C) 1999-2021 Free Software Foundation, Inc. 9484*44704f69SBart Van Assche# 9485*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9486*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9487*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9488*44704f69SBart Van Assche 9489*44704f69SBart Van Assche# _AM_OUTPUT_DEPENDENCY_COMMANDS 9490*44704f69SBart Van Assche# ------------------------------ 9491*44704f69SBart Van AsscheAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 9492*44704f69SBart Van Assche[{ 9493*44704f69SBart Van Assche # Older Autoconf quotes --file arguments for eval, but not when files 9494*44704f69SBart Van Assche # are listed without --file. Let's play safe and only enable the eval 9495*44704f69SBart Van Assche # if we detect the quoting. 9496*44704f69SBart Van Assche # TODO: see whether this extra hack can be removed once we start 9497*44704f69SBart Van Assche # requiring Autoconf 2.70 or later. 9498*44704f69SBart Van Assche AS_CASE([$CONFIG_FILES], 9499*44704f69SBart Van Assche [*\'*], [eval set x "$CONFIG_FILES"], 9500*44704f69SBart Van Assche [*], [set x $CONFIG_FILES]) 9501*44704f69SBart Van Assche shift 9502*44704f69SBart Van Assche # Used to flag and report bootstrapping failures. 9503*44704f69SBart Van Assche am_rc=0 9504*44704f69SBart Van Assche for am_mf 9505*44704f69SBart Van Assche do 9506*44704f69SBart Van Assche # Strip MF so we end up with the name of the file. 9507*44704f69SBart Van Assche am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 9508*44704f69SBart Van Assche # Check whether this is an Automake generated Makefile which includes 9509*44704f69SBart Van Assche # dependency-tracking related rules and includes. 9510*44704f69SBart Van Assche # Grep'ing the whole file directly is not great: AIX grep has a line 9511*44704f69SBart Van Assche # limit of 2048, but all sed's we know have understand at least 4000. 9512*44704f69SBart Van Assche sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 9513*44704f69SBart Van Assche || continue 9514*44704f69SBart Van Assche am_dirpart=`AS_DIRNAME(["$am_mf"])` 9515*44704f69SBart Van Assche am_filepart=`AS_BASENAME(["$am_mf"])` 9516*44704f69SBart Van Assche AM_RUN_LOG([cd "$am_dirpart" \ 9517*44704f69SBart Van Assche && sed -e '/# am--include-marker/d' "$am_filepart" \ 9518*44704f69SBart Van Assche | $MAKE -f - am--depfiles]) || am_rc=$? 9519*44704f69SBart Van Assche done 9520*44704f69SBart Van Assche if test $am_rc -ne 0; then 9521*44704f69SBart Van Assche AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 9522*44704f69SBart Van Assche for automatic dependency tracking. If GNU make was not used, consider 9523*44704f69SBart Van Assche re-running the configure script with MAKE="gmake" (or whatever is 9524*44704f69SBart Van Assche necessary). You can also try re-running configure with the 9525*44704f69SBart Van Assche '--disable-dependency-tracking' option to at least be able to build 9526*44704f69SBart Van Assche the package (albeit without support for automatic dependency tracking).]) 9527*44704f69SBart Van Assche fi 9528*44704f69SBart Van Assche AS_UNSET([am_dirpart]) 9529*44704f69SBart Van Assche AS_UNSET([am_filepart]) 9530*44704f69SBart Van Assche AS_UNSET([am_mf]) 9531*44704f69SBart Van Assche AS_UNSET([am_rc]) 9532*44704f69SBart Van Assche rm -f conftest-deps.mk 9533*44704f69SBart Van Assche} 9534*44704f69SBart Van Assche])# _AM_OUTPUT_DEPENDENCY_COMMANDS 9535*44704f69SBart Van Assche 9536*44704f69SBart Van Assche 9537*44704f69SBart Van Assche# AM_OUTPUT_DEPENDENCY_COMMANDS 9538*44704f69SBart Van Assche# ----------------------------- 9539*44704f69SBart Van Assche# This macro should only be invoked once -- use via AC_REQUIRE. 9540*44704f69SBart Van Assche# 9541*44704f69SBart Van Assche# This code is only required when automatic dependency tracking is enabled. 9542*44704f69SBart Van Assche# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 9543*44704f69SBart Van Assche# order to bootstrap the dependency handling code. 9544*44704f69SBart Van AsscheAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 9545*44704f69SBart Van Assche[AC_CONFIG_COMMANDS([depfiles], 9546*44704f69SBart Van Assche [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 9547*44704f69SBart Van Assche [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 9548*44704f69SBart Van Assche 9549*44704f69SBart Van Assche# Do all the work for Automake. -*- Autoconf -*- 9550*44704f69SBart Van Assche 9551*44704f69SBart Van Assche# Copyright (C) 1996-2021 Free Software Foundation, Inc. 9552*44704f69SBart Van Assche# 9553*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9554*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9555*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9556*44704f69SBart Van Assche 9557*44704f69SBart Van Assche# This macro actually does too much. Some checks are only needed if 9558*44704f69SBart Van Assche# your package does certain things. But this isn't really a big deal. 9559*44704f69SBart Van Assche 9560*44704f69SBart Van Asschednl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 9561*44704f69SBart Van Asschem4_define([AC_PROG_CC], 9562*44704f69SBart Van Asschem4_defn([AC_PROG_CC]) 9563*44704f69SBart Van Assche[_AM_PROG_CC_C_O 9564*44704f69SBart Van Assche]) 9565*44704f69SBart Van Assche 9566*44704f69SBart Van Assche# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 9567*44704f69SBart Van Assche# AM_INIT_AUTOMAKE([OPTIONS]) 9568*44704f69SBart Van Assche# ----------------------------------------------- 9569*44704f69SBart Van Assche# The call with PACKAGE and VERSION arguments is the old style 9570*44704f69SBart Van Assche# call (pre autoconf-2.50), which is being phased out. PACKAGE 9571*44704f69SBart Van Assche# and VERSION should now be passed to AC_INIT and removed from 9572*44704f69SBart Van Assche# the call to AM_INIT_AUTOMAKE. 9573*44704f69SBart Van Assche# We support both call styles for the transition. After 9574*44704f69SBart Van Assche# the next Automake release, Autoconf can make the AC_INIT 9575*44704f69SBart Van Assche# arguments mandatory, and then we can depend on a new Autoconf 9576*44704f69SBart Van Assche# release and drop the old call support. 9577*44704f69SBart Van AsscheAC_DEFUN([AM_INIT_AUTOMAKE], 9578*44704f69SBart Van Assche[AC_PREREQ([2.65])dnl 9579*44704f69SBart Van Asschem4_ifdef([_$0_ALREADY_INIT], 9580*44704f69SBart Van Assche [m4_fatal([$0 expanded multiple times 9581*44704f69SBart Van Assche]m4_defn([_$0_ALREADY_INIT]))], 9582*44704f69SBart Van Assche [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 9583*44704f69SBart Van Asschednl Autoconf wants to disallow AM_ names. We explicitly allow 9584*44704f69SBart Van Asschednl the ones we care about. 9585*44704f69SBart Van Asschem4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 9586*44704f69SBart Van AsscheAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 9587*44704f69SBart Van AsscheAC_REQUIRE([AC_PROG_INSTALL])dnl 9588*44704f69SBart Van Asscheif test "`cd $srcdir && pwd`" != "`pwd`"; then 9589*44704f69SBart Van Assche # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 9590*44704f69SBart Van Assche # is not polluted with repeated "-I." 9591*44704f69SBart Van Assche AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 9592*44704f69SBart Van Assche # test to see if srcdir already configured 9593*44704f69SBart Van Assche if test -f $srcdir/config.status; then 9594*44704f69SBart Van Assche AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 9595*44704f69SBart Van Assche fi 9596*44704f69SBart Van Asschefi 9597*44704f69SBart Van Assche 9598*44704f69SBart Van Assche# test whether we have cygpath 9599*44704f69SBart Van Asscheif test -z "$CYGPATH_W"; then 9600*44704f69SBart Van Assche if (cygpath --version) >/dev/null 2>/dev/null; then 9601*44704f69SBart Van Assche CYGPATH_W='cygpath -w' 9602*44704f69SBart Van Assche else 9603*44704f69SBart Van Assche CYGPATH_W=echo 9604*44704f69SBart Van Assche fi 9605*44704f69SBart Van Asschefi 9606*44704f69SBart Van AsscheAC_SUBST([CYGPATH_W]) 9607*44704f69SBart Van Assche 9608*44704f69SBart Van Assche# Define the identity of the package. 9609*44704f69SBart Van Asschednl Distinguish between old-style and new-style calls. 9610*44704f69SBart Van Asschem4_ifval([$2], 9611*44704f69SBart Van Assche[AC_DIAGNOSE([obsolete], 9612*44704f69SBart Van Assche [$0: two- and three-arguments forms are deprecated.]) 9613*44704f69SBart Van Asschem4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 9614*44704f69SBart Van Assche AC_SUBST([PACKAGE], [$1])dnl 9615*44704f69SBart Van Assche AC_SUBST([VERSION], [$2])], 9616*44704f69SBart Van Assche[_AM_SET_OPTIONS([$1])dnl 9617*44704f69SBart Van Asschednl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 9618*44704f69SBart Van Asschem4_if( 9619*44704f69SBart Van Assche m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 9620*44704f69SBart Van Assche [ok:ok],, 9621*44704f69SBart Van Assche [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 9622*44704f69SBart Van Assche AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 9623*44704f69SBart Van Assche AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 9624*44704f69SBart Van Assche 9625*44704f69SBart Van Assche_AM_IF_OPTION([no-define],, 9626*44704f69SBart Van Assche[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 9627*44704f69SBart Van Assche AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 9628*44704f69SBart Van Assche 9629*44704f69SBart Van Assche# Some tools Automake needs. 9630*44704f69SBart Van AsscheAC_REQUIRE([AM_SANITY_CHECK])dnl 9631*44704f69SBart Van AsscheAC_REQUIRE([AC_ARG_PROGRAM])dnl 9632*44704f69SBart Van AsscheAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 9633*44704f69SBart Van AsscheAM_MISSING_PROG([AUTOCONF], [autoconf]) 9634*44704f69SBart Van AsscheAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 9635*44704f69SBart Van AsscheAM_MISSING_PROG([AUTOHEADER], [autoheader]) 9636*44704f69SBart Van AsscheAM_MISSING_PROG([MAKEINFO], [makeinfo]) 9637*44704f69SBart Van AsscheAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9638*44704f69SBart Van AsscheAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 9639*44704f69SBart Van AsscheAC_REQUIRE([AC_PROG_MKDIR_P])dnl 9640*44704f69SBart Van Assche# For better backward compatibility. To be removed once Automake 1.9.x 9641*44704f69SBart Van Assche# dies out for good. For more background, see: 9642*44704f69SBart Van Assche# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 9643*44704f69SBart Van Assche# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 9644*44704f69SBart Van AsscheAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 9645*44704f69SBart Van Assche# We need awk for the "check" target (and possibly the TAP driver). The 9646*44704f69SBart Van Assche# system "awk" is bad on some platforms. 9647*44704f69SBart Van AsscheAC_REQUIRE([AC_PROG_AWK])dnl 9648*44704f69SBart Van AsscheAC_REQUIRE([AC_PROG_MAKE_SET])dnl 9649*44704f69SBart Van AsscheAC_REQUIRE([AM_SET_LEADING_DOT])dnl 9650*44704f69SBart Van Assche_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 9651*44704f69SBart Van Assche [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 9652*44704f69SBart Van Assche [_AM_PROG_TAR([v7])])]) 9653*44704f69SBart Van Assche_AM_IF_OPTION([no-dependencies],, 9654*44704f69SBart Van Assche[AC_PROVIDE_IFELSE([AC_PROG_CC], 9655*44704f69SBart Van Assche [_AM_DEPENDENCIES([CC])], 9656*44704f69SBart Van Assche [m4_define([AC_PROG_CC], 9657*44704f69SBart Van Assche m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 9658*44704f69SBart Van AsscheAC_PROVIDE_IFELSE([AC_PROG_CXX], 9659*44704f69SBart Van Assche [_AM_DEPENDENCIES([CXX])], 9660*44704f69SBart Van Assche [m4_define([AC_PROG_CXX], 9661*44704f69SBart Van Assche m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 9662*44704f69SBart Van AsscheAC_PROVIDE_IFELSE([AC_PROG_OBJC], 9663*44704f69SBart Van Assche [_AM_DEPENDENCIES([OBJC])], 9664*44704f69SBart Van Assche [m4_define([AC_PROG_OBJC], 9665*44704f69SBart Van Assche m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 9666*44704f69SBart Van AsscheAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 9667*44704f69SBart Van Assche [_AM_DEPENDENCIES([OBJCXX])], 9668*44704f69SBart Van Assche [m4_define([AC_PROG_OBJCXX], 9669*44704f69SBart Van Assche m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 9670*44704f69SBart Van Assche]) 9671*44704f69SBart Van Assche# Variables for tags utilities; see am/tags.am 9672*44704f69SBart Van Asscheif test -z "$CTAGS"; then 9673*44704f69SBart Van Assche CTAGS=ctags 9674*44704f69SBart Van Asschefi 9675*44704f69SBart Van AsscheAC_SUBST([CTAGS]) 9676*44704f69SBart Van Asscheif test -z "$ETAGS"; then 9677*44704f69SBart Van Assche ETAGS=etags 9678*44704f69SBart Van Asschefi 9679*44704f69SBart Van AsscheAC_SUBST([ETAGS]) 9680*44704f69SBart Van Asscheif test -z "$CSCOPE"; then 9681*44704f69SBart Van Assche CSCOPE=cscope 9682*44704f69SBart Van Asschefi 9683*44704f69SBart Van AsscheAC_SUBST([CSCOPE]) 9684*44704f69SBart Van Assche 9685*44704f69SBart Van AsscheAC_REQUIRE([AM_SILENT_RULES])dnl 9686*44704f69SBart Van Asschednl The testsuite driver may need to know about EXEEXT, so add the 9687*44704f69SBart Van Asschednl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 9688*44704f69SBart Van Asschednl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 9689*44704f69SBart Van AsscheAC_CONFIG_COMMANDS_PRE(dnl 9690*44704f69SBart Van Assche[m4_provide_if([_AM_COMPILER_EXEEXT], 9691*44704f69SBart Van Assche [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 9692*44704f69SBart Van Assche 9693*44704f69SBart Van Assche# POSIX will say in a future version that running "rm -f" with no argument 9694*44704f69SBart Van Assche# is OK; and we want to be able to make that assumption in our Makefile 9695*44704f69SBart Van Assche# recipes. So use an aggressive probe to check that the usage we want is 9696*44704f69SBart Van Assche# actually supported "in the wild" to an acceptable degree. 9697*44704f69SBart Van Assche# See automake bug#10828. 9698*44704f69SBart Van Assche# To make any issue more visible, cause the running configure to be aborted 9699*44704f69SBart Van Assche# by default if the 'rm' program in use doesn't match our expectations; the 9700*44704f69SBart Van Assche# user can still override this though. 9701*44704f69SBart Van Asscheif rm -f && rm -fr && rm -rf; then : OK; else 9702*44704f69SBart Van Assche cat >&2 <<'END' 9703*44704f69SBart Van AsscheOops! 9704*44704f69SBart Van Assche 9705*44704f69SBart Van AsscheYour 'rm' program seems unable to run without file operands specified 9706*44704f69SBart Van Asscheon the command line, even when the '-f' option is present. This is contrary 9707*44704f69SBart Van Asscheto the behaviour of most rm programs out there, and not conforming with 9708*44704f69SBart Van Asschethe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 9709*44704f69SBart Van Assche 9710*44704f69SBart Van AsschePlease tell [email protected] about your system, including the value 9711*44704f69SBart Van Asscheof your $PATH and any error possibly output before this message. This 9712*44704f69SBart Van Asschecan help us improve future automake versions. 9713*44704f69SBart Van Assche 9714*44704f69SBart Van AsscheEND 9715*44704f69SBart Van Assche if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 9716*44704f69SBart Van Assche echo 'Configuration will proceed anyway, since you have set the' >&2 9717*44704f69SBart Van Assche echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 9718*44704f69SBart Van Assche echo >&2 9719*44704f69SBart Van Assche else 9720*44704f69SBart Van Assche cat >&2 <<'END' 9721*44704f69SBart Van AsscheAborting the configuration process, to ensure you take notice of the issue. 9722*44704f69SBart Van Assche 9723*44704f69SBart Van AsscheYou can download and install GNU coreutils to get an 'rm' implementation 9724*44704f69SBart Van Asschethat behaves properly: <https://www.gnu.org/software/coreutils/>. 9725*44704f69SBart Van Assche 9726*44704f69SBart Van AsscheIf you want to complete the configuration process using your problematic 9727*44704f69SBart Van Assche'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 9728*44704f69SBart Van Asscheto "yes", and re-run configure. 9729*44704f69SBart Van Assche 9730*44704f69SBart Van AsscheEND 9731*44704f69SBart Van Assche AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 9732*44704f69SBart Van Assche fi 9733*44704f69SBart Van Asschefi 9734*44704f69SBart Van Asschednl The trailing newline in this macro's definition is deliberate, for 9735*44704f69SBart Van Asschednl backward compatibility and to allow trailing 'dnl'-style comments 9736*44704f69SBart Van Asschednl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 9737*44704f69SBart Van Assche]) 9738*44704f69SBart Van Assche 9739*44704f69SBart Van Asschednl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 9740*44704f69SBart Van Asschednl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 9741*44704f69SBart Van Asschednl mangled by Autoconf and run in a shell conditional statement. 9742*44704f69SBart Van Asschem4_define([_AC_COMPILER_EXEEXT], 9743*44704f69SBart Van Asschem4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 9744*44704f69SBart Van Assche 9745*44704f69SBart Van Assche# When config.status generates a header, we must update the stamp-h file. 9746*44704f69SBart Van Assche# This file resides in the same directory as the config header 9747*44704f69SBart Van Assche# that is generated. The stamp files are numbered to have different names. 9748*44704f69SBart Van Assche 9749*44704f69SBart Van Assche# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 9750*44704f69SBart Van Assche# loop where config.status creates the headers, so we can generate 9751*44704f69SBart Van Assche# our stamp files there. 9752*44704f69SBart Van AsscheAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 9753*44704f69SBart Van Assche[# Compute $1's index in $config_headers. 9754*44704f69SBart Van Assche_am_arg=$1 9755*44704f69SBart Van Assche_am_stamp_count=1 9756*44704f69SBart Van Asschefor _am_header in $config_headers :; do 9757*44704f69SBart Van Assche case $_am_header in 9758*44704f69SBart Van Assche $_am_arg | $_am_arg:* ) 9759*44704f69SBart Van Assche break ;; 9760*44704f69SBart Van Assche * ) 9761*44704f69SBart Van Assche _am_stamp_count=`expr $_am_stamp_count + 1` ;; 9762*44704f69SBart Van Assche esac 9763*44704f69SBart Van Asschedone 9764*44704f69SBart Van Asscheecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 9765*44704f69SBart Van Assche 9766*44704f69SBart Van Assche# Copyright (C) 2001-2021 Free Software Foundation, Inc. 9767*44704f69SBart Van Assche# 9768*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9769*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9770*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9771*44704f69SBart Van Assche 9772*44704f69SBart Van Assche# AM_PROG_INSTALL_SH 9773*44704f69SBart Van Assche# ------------------ 9774*44704f69SBart Van Assche# Define $install_sh. 9775*44704f69SBart Van AsscheAC_DEFUN([AM_PROG_INSTALL_SH], 9776*44704f69SBart Van Assche[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9777*44704f69SBart Van Asscheif test x"${install_sh+set}" != xset; then 9778*44704f69SBart Van Assche case $am_aux_dir in 9779*44704f69SBart Van Assche *\ * | *\ *) 9780*44704f69SBart Van Assche install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 9781*44704f69SBart Van Assche *) 9782*44704f69SBart Van Assche install_sh="\${SHELL} $am_aux_dir/install-sh" 9783*44704f69SBart Van Assche esac 9784*44704f69SBart Van Asschefi 9785*44704f69SBart Van AsscheAC_SUBST([install_sh])]) 9786*44704f69SBart Van Assche 9787*44704f69SBart Van Assche# Copyright (C) 2003-2021 Free Software Foundation, Inc. 9788*44704f69SBart Van Assche# 9789*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9790*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9791*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9792*44704f69SBart Van Assche 9793*44704f69SBart Van Assche# Check whether the underlying file-system supports filenames 9794*44704f69SBart Van Assche# with a leading dot. For instance MS-DOS doesn't. 9795*44704f69SBart Van AsscheAC_DEFUN([AM_SET_LEADING_DOT], 9796*44704f69SBart Van Assche[rm -rf .tst 2>/dev/null 9797*44704f69SBart Van Asschemkdir .tst 2>/dev/null 9798*44704f69SBart Van Asscheif test -d .tst; then 9799*44704f69SBart Van Assche am__leading_dot=. 9800*44704f69SBart Van Asscheelse 9801*44704f69SBart Van Assche am__leading_dot=_ 9802*44704f69SBart Van Asschefi 9803*44704f69SBart Van Asschermdir .tst 2>/dev/null 9804*44704f69SBart Van AsscheAC_SUBST([am__leading_dot])]) 9805*44704f69SBart Van Assche 9806*44704f69SBart Van Assche# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 9807*44704f69SBart Van Assche# From Jim Meyering 9808*44704f69SBart Van Assche 9809*44704f69SBart Van Assche# Copyright (C) 1996-2021 Free Software Foundation, Inc. 9810*44704f69SBart Van Assche# 9811*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9812*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9813*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9814*44704f69SBart Van Assche 9815*44704f69SBart Van Assche# AM_MAINTAINER_MODE([DEFAULT-MODE]) 9816*44704f69SBart Van Assche# ---------------------------------- 9817*44704f69SBart Van Assche# Control maintainer-specific portions of Makefiles. 9818*44704f69SBart Van Assche# Default is to disable them, unless 'enable' is passed literally. 9819*44704f69SBart Van Assche# For symmetry, 'disable' may be passed as well. Anyway, the user 9820*44704f69SBart Van Assche# can override the default with the --enable/--disable switch. 9821*44704f69SBart Van AsscheAC_DEFUN([AM_MAINTAINER_MODE], 9822*44704f69SBart Van Assche[m4_case(m4_default([$1], [disable]), 9823*44704f69SBart Van Assche [enable], [m4_define([am_maintainer_other], [disable])], 9824*44704f69SBart Van Assche [disable], [m4_define([am_maintainer_other], [enable])], 9825*44704f69SBart Van Assche [m4_define([am_maintainer_other], [enable]) 9826*44704f69SBart Van Assche m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 9827*44704f69SBart Van AsscheAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 9828*44704f69SBart Van Assche dnl maintainer-mode's default is 'disable' unless 'enable' is passed 9829*44704f69SBart Van Assche AC_ARG_ENABLE([maintainer-mode], 9830*44704f69SBart Van Assche [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 9831*44704f69SBart Van Assche am_maintainer_other[ make rules and dependencies not useful 9832*44704f69SBart Van Assche (and sometimes confusing) to the casual installer])], 9833*44704f69SBart Van Assche [USE_MAINTAINER_MODE=$enableval], 9834*44704f69SBart Van Assche [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 9835*44704f69SBart Van Assche AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 9836*44704f69SBart Van Assche AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 9837*44704f69SBart Van Assche MAINT=$MAINTAINER_MODE_TRUE 9838*44704f69SBart Van Assche AC_SUBST([MAINT])dnl 9839*44704f69SBart Van Assche] 9840*44704f69SBart Van Assche) 9841*44704f69SBart Van Assche 9842*44704f69SBart Van Assche# Check to see how 'make' treats includes. -*- Autoconf -*- 9843*44704f69SBart Van Assche 9844*44704f69SBart Van Assche# Copyright (C) 2001-2021 Free Software Foundation, Inc. 9845*44704f69SBart Van Assche# 9846*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9847*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9848*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9849*44704f69SBart Van Assche 9850*44704f69SBart Van Assche# AM_MAKE_INCLUDE() 9851*44704f69SBart Van Assche# ----------------- 9852*44704f69SBart Van Assche# Check whether make has an 'include' directive that can support all 9853*44704f69SBart Van Assche# the idioms we need for our automatic dependency tracking code. 9854*44704f69SBart Van AsscheAC_DEFUN([AM_MAKE_INCLUDE], 9855*44704f69SBart Van Assche[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 9856*44704f69SBart Van Asschecat > confinc.mk << 'END' 9857*44704f69SBart Van Asscheam__doit: 9858*44704f69SBart Van Assche @echo this is the am__doit target >confinc.out 9859*44704f69SBart Van Assche.PHONY: am__doit 9860*44704f69SBart Van AsscheEND 9861*44704f69SBart Van Asscheam__include="#" 9862*44704f69SBart Van Asscheam__quote= 9863*44704f69SBart Van Assche# BSD make does it like this. 9864*44704f69SBart Van Asscheecho '.include "confinc.mk" # ignored' > confmf.BSD 9865*44704f69SBart Van Assche# Other make implementations (GNU, Solaris 10, AIX) do it like this. 9866*44704f69SBart Van Asscheecho 'include confinc.mk # ignored' > confmf.GNU 9867*44704f69SBart Van Assche_am_result=no 9868*44704f69SBart Van Asschefor s in GNU BSD; do 9869*44704f69SBart Van Assche AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 9870*44704f69SBart Van Assche AS_CASE([$?:`cat confinc.out 2>/dev/null`], 9871*44704f69SBart Van Assche ['0:this is the am__doit target'], 9872*44704f69SBart Van Assche [AS_CASE([$s], 9873*44704f69SBart Van Assche [BSD], [am__include='.include' am__quote='"'], 9874*44704f69SBart Van Assche [am__include='include' am__quote=''])]) 9875*44704f69SBart Van Assche if test "$am__include" != "#"; then 9876*44704f69SBart Van Assche _am_result="yes ($s style)" 9877*44704f69SBart Van Assche break 9878*44704f69SBart Van Assche fi 9879*44704f69SBart Van Asschedone 9880*44704f69SBart Van Asscherm -f confinc.* confmf.* 9881*44704f69SBart Van AsscheAC_MSG_RESULT([${_am_result}]) 9882*44704f69SBart Van AsscheAC_SUBST([am__include])]) 9883*44704f69SBart Van AsscheAC_SUBST([am__quote])]) 9884*44704f69SBart Van Assche 9885*44704f69SBart Van Assche# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 9886*44704f69SBart Van Assche 9887*44704f69SBart Van Assche# Copyright (C) 1997-2021 Free Software Foundation, Inc. 9888*44704f69SBart Van Assche# 9889*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9890*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9891*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9892*44704f69SBart Van Assche 9893*44704f69SBart Van Assche# AM_MISSING_PROG(NAME, PROGRAM) 9894*44704f69SBart Van Assche# ------------------------------ 9895*44704f69SBart Van AsscheAC_DEFUN([AM_MISSING_PROG], 9896*44704f69SBart Van Assche[AC_REQUIRE([AM_MISSING_HAS_RUN]) 9897*44704f69SBart Van Assche$1=${$1-"${am_missing_run}$2"} 9898*44704f69SBart Van AsscheAC_SUBST($1)]) 9899*44704f69SBart Van Assche 9900*44704f69SBart Van Assche# AM_MISSING_HAS_RUN 9901*44704f69SBart Van Assche# ------------------ 9902*44704f69SBart Van Assche# Define MISSING if not defined so far and test if it is modern enough. 9903*44704f69SBart Van Assche# If it is, set am_missing_run to use it, otherwise, to nothing. 9904*44704f69SBart Van AsscheAC_DEFUN([AM_MISSING_HAS_RUN], 9905*44704f69SBart Van Assche[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9906*44704f69SBart Van AsscheAC_REQUIRE_AUX_FILE([missing])dnl 9907*44704f69SBart Van Asscheif test x"${MISSING+set}" != xset; then 9908*44704f69SBart Van Assche MISSING="\${SHELL} '$am_aux_dir/missing'" 9909*44704f69SBart Van Asschefi 9910*44704f69SBart Van Assche# Use eval to expand $SHELL 9911*44704f69SBart Van Asscheif eval "$MISSING --is-lightweight"; then 9912*44704f69SBart Van Assche am_missing_run="$MISSING " 9913*44704f69SBart Van Asscheelse 9914*44704f69SBart Van Assche am_missing_run= 9915*44704f69SBart Van Assche AC_MSG_WARN(['missing' script is too old or missing]) 9916*44704f69SBart Van Asschefi 9917*44704f69SBart Van Assche]) 9918*44704f69SBart Van Assche 9919*44704f69SBart Van Assche# -*- Autoconf -*- 9920*44704f69SBart Van Assche# Obsolete and "removed" macros, that must however still report explicit 9921*44704f69SBart Van Assche# error messages when used, to smooth transition. 9922*44704f69SBart Van Assche# 9923*44704f69SBart Van Assche# Copyright (C) 1996-2021 Free Software Foundation, Inc. 9924*44704f69SBart Van Assche# 9925*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9926*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9927*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9928*44704f69SBart Van Assche 9929*44704f69SBart Van AsscheAC_DEFUN([AM_CONFIG_HEADER], 9930*44704f69SBart Van Assche[AC_DIAGNOSE([obsolete], 9931*44704f69SBart Van Assche['$0': this macro is obsolete. 9932*44704f69SBart Van AsscheYou should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl 9933*44704f69SBart Van AsscheAC_CONFIG_HEADERS($@)]) 9934*44704f69SBart Van Assche 9935*44704f69SBart Van AsscheAC_DEFUN([AM_PROG_CC_STDC], 9936*44704f69SBart Van Assche[AC_PROG_CC 9937*44704f69SBart Van Asscheam_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc 9938*44704f69SBart Van AsscheAC_DIAGNOSE([obsolete], 9939*44704f69SBart Van Assche['$0': this macro is obsolete. 9940*44704f69SBart Van AsscheYou should simply use the 'AC][_PROG_CC' macro instead. 9941*44704f69SBart Van AsscheAlso, your code should no longer depend upon 'am_cv_prog_cc_stdc', 9942*44704f69SBart Van Asschebut upon 'ac_cv_prog_cc_stdc'.])]) 9943*44704f69SBart Van Assche 9944*44704f69SBart Van AsscheAC_DEFUN([AM_C_PROTOTYPES], 9945*44704f69SBart Van Assche [AC_FATAL([automatic de-ANSI-fication support has been removed])]) 9946*44704f69SBart Van AsscheAU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) 9947*44704f69SBart Van Assche 9948*44704f69SBart Van Assche# Helper functions for option handling. -*- Autoconf -*- 9949*44704f69SBart Van Assche 9950*44704f69SBart Van Assche# Copyright (C) 2001-2021 Free Software Foundation, Inc. 9951*44704f69SBart Van Assche# 9952*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9953*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9954*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9955*44704f69SBart Van Assche 9956*44704f69SBart Van Assche# _AM_MANGLE_OPTION(NAME) 9957*44704f69SBart Van Assche# ----------------------- 9958*44704f69SBart Van AsscheAC_DEFUN([_AM_MANGLE_OPTION], 9959*44704f69SBart Van Assche[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 9960*44704f69SBart Van Assche 9961*44704f69SBart Van Assche# _AM_SET_OPTION(NAME) 9962*44704f69SBart Van Assche# -------------------- 9963*44704f69SBart Van Assche# Set option NAME. Presently that only means defining a flag for this option. 9964*44704f69SBart Van AsscheAC_DEFUN([_AM_SET_OPTION], 9965*44704f69SBart Van Assche[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 9966*44704f69SBart Van Assche 9967*44704f69SBart Van Assche# _AM_SET_OPTIONS(OPTIONS) 9968*44704f69SBart Van Assche# ------------------------ 9969*44704f69SBart Van Assche# OPTIONS is a space-separated list of Automake options. 9970*44704f69SBart Van AsscheAC_DEFUN([_AM_SET_OPTIONS], 9971*44704f69SBart Van Assche[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 9972*44704f69SBart Van Assche 9973*44704f69SBart Van Assche# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 9974*44704f69SBart Van Assche# ------------------------------------------- 9975*44704f69SBart Van Assche# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9976*44704f69SBart Van AsscheAC_DEFUN([_AM_IF_OPTION], 9977*44704f69SBart Van Assche[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 9978*44704f69SBart Van Assche 9979*44704f69SBart Van Assche# Copyright (C) 1999-2021 Free Software Foundation, Inc. 9980*44704f69SBart Van Assche# 9981*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 9982*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 9983*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 9984*44704f69SBart Van Assche 9985*44704f69SBart Van Assche# _AM_PROG_CC_C_O 9986*44704f69SBart Van Assche# --------------- 9987*44704f69SBart Van Assche# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 9988*44704f69SBart Van Assche# to automatically call this. 9989*44704f69SBart Van AsscheAC_DEFUN([_AM_PROG_CC_C_O], 9990*44704f69SBart Van Assche[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9991*44704f69SBart Van AsscheAC_REQUIRE_AUX_FILE([compile])dnl 9992*44704f69SBart Van AsscheAC_LANG_PUSH([C])dnl 9993*44704f69SBart Van AsscheAC_CACHE_CHECK( 9994*44704f69SBart Van Assche [whether $CC understands -c and -o together], 9995*44704f69SBart Van Assche [am_cv_prog_cc_c_o], 9996*44704f69SBart Van Assche [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 9997*44704f69SBart Van Assche # Make sure it works both with $CC and with simple cc. 9998*44704f69SBart Van Assche # Following AC_PROG_CC_C_O, we do the test twice because some 9999*44704f69SBart Van Assche # compilers refuse to overwrite an existing .o file with -o, 10000*44704f69SBart Van Assche # though they will create one. 10001*44704f69SBart Van Assche am_cv_prog_cc_c_o=yes 10002*44704f69SBart Van Assche for am_i in 1 2; do 10003*44704f69SBart Van Assche if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 10004*44704f69SBart Van Assche && test -f conftest2.$ac_objext; then 10005*44704f69SBart Van Assche : OK 10006*44704f69SBart Van Assche else 10007*44704f69SBart Van Assche am_cv_prog_cc_c_o=no 10008*44704f69SBart Van Assche break 10009*44704f69SBart Van Assche fi 10010*44704f69SBart Van Assche done 10011*44704f69SBart Van Assche rm -f core conftest* 10012*44704f69SBart Van Assche unset am_i]) 10013*44704f69SBart Van Asscheif test "$am_cv_prog_cc_c_o" != yes; then 10014*44704f69SBart Van Assche # Losing compiler, so override with the script. 10015*44704f69SBart Van Assche # FIXME: It is wrong to rewrite CC. 10016*44704f69SBart Van Assche # But if we don't then we get into trouble of one sort or another. 10017*44704f69SBart Van Assche # A longer-term fix would be to have automake use am__CC in this case, 10018*44704f69SBart Van Assche # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 10019*44704f69SBart Van Assche CC="$am_aux_dir/compile $CC" 10020*44704f69SBart Van Asschefi 10021*44704f69SBart Van AsscheAC_LANG_POP([C])]) 10022*44704f69SBart Van Assche 10023*44704f69SBart Van Assche# For backward compatibility. 10024*44704f69SBart Van AsscheAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 10025*44704f69SBart Van Assche 10026*44704f69SBart Van Assche# Copyright (C) 2001-2021 Free Software Foundation, Inc. 10027*44704f69SBart Van Assche# 10028*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 10029*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 10030*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 10031*44704f69SBart Van Assche 10032*44704f69SBart Van Assche# AM_RUN_LOG(COMMAND) 10033*44704f69SBart Van Assche# ------------------- 10034*44704f69SBart Van Assche# Run COMMAND, save the exit status in ac_status, and log it. 10035*44704f69SBart Van Assche# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 10036*44704f69SBart Van AsscheAC_DEFUN([AM_RUN_LOG], 10037*44704f69SBart Van Assche[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 10038*44704f69SBart Van Assche ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 10039*44704f69SBart Van Assche ac_status=$? 10040*44704f69SBart Van Assche echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 10041*44704f69SBart Van Assche (exit $ac_status); }]) 10042*44704f69SBart Van Assche 10043*44704f69SBart Van Assche# Check to make sure that the build environment is sane. -*- Autoconf -*- 10044*44704f69SBart Van Assche 10045*44704f69SBart Van Assche# Copyright (C) 1996-2021 Free Software Foundation, Inc. 10046*44704f69SBart Van Assche# 10047*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 10048*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 10049*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 10050*44704f69SBart Van Assche 10051*44704f69SBart Van Assche# AM_SANITY_CHECK 10052*44704f69SBart Van Assche# --------------- 10053*44704f69SBart Van AsscheAC_DEFUN([AM_SANITY_CHECK], 10054*44704f69SBart Van Assche[AC_MSG_CHECKING([whether build environment is sane]) 10055*44704f69SBart Van Assche# Reject unsafe characters in $srcdir or the absolute working directory 10056*44704f69SBart Van Assche# name. Accept space and tab only in the latter. 10057*44704f69SBart Van Asscheam_lf=' 10058*44704f69SBart Van Assche' 10059*44704f69SBart Van Asschecase `pwd` in 10060*44704f69SBart Van Assche *[[\\\"\#\$\&\'\`$am_lf]]*) 10061*44704f69SBart Van Assche AC_MSG_ERROR([unsafe absolute working directory name]);; 10062*44704f69SBart Van Asscheesac 10063*44704f69SBart Van Asschecase $srcdir in 10064*44704f69SBart Van Assche *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 10065*44704f69SBart Van Assche AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 10066*44704f69SBart Van Asscheesac 10067*44704f69SBart Van Assche 10068*44704f69SBart Van Assche# Do 'set' in a subshell so we don't clobber the current shell's 10069*44704f69SBart Van Assche# arguments. Must try -L first in case configure is actually a 10070*44704f69SBart Van Assche# symlink; some systems play weird games with the mod time of symlinks 10071*44704f69SBart Van Assche# (eg FreeBSD returns the mod time of the symlink's containing 10072*44704f69SBart Van Assche# directory). 10073*44704f69SBart Van Asscheif ( 10074*44704f69SBart Van Assche am_has_slept=no 10075*44704f69SBart Van Assche for am_try in 1 2; do 10076*44704f69SBart Van Assche echo "timestamp, slept: $am_has_slept" > conftest.file 10077*44704f69SBart Van Assche set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 10078*44704f69SBart Van Assche if test "$[*]" = "X"; then 10079*44704f69SBart Van Assche # -L didn't work. 10080*44704f69SBart Van Assche set X `ls -t "$srcdir/configure" conftest.file` 10081*44704f69SBart Van Assche fi 10082*44704f69SBart Van Assche if test "$[*]" != "X $srcdir/configure conftest.file" \ 10083*44704f69SBart Van Assche && test "$[*]" != "X conftest.file $srcdir/configure"; then 10084*44704f69SBart Van Assche 10085*44704f69SBart Van Assche # If neither matched, then we have a broken ls. This can happen 10086*44704f69SBart Van Assche # if, for instance, CONFIG_SHELL is bash and it inherits a 10087*44704f69SBart Van Assche # broken ls alias from the environment. This has actually 10088*44704f69SBart Van Assche # happened. Such a system could not be considered "sane". 10089*44704f69SBart Van Assche AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 10090*44704f69SBart Van Assche alias in your environment]) 10091*44704f69SBart Van Assche fi 10092*44704f69SBart Van Assche if test "$[2]" = conftest.file || test $am_try -eq 2; then 10093*44704f69SBart Van Assche break 10094*44704f69SBart Van Assche fi 10095*44704f69SBart Van Assche # Just in case. 10096*44704f69SBart Van Assche sleep 1 10097*44704f69SBart Van Assche am_has_slept=yes 10098*44704f69SBart Van Assche done 10099*44704f69SBart Van Assche test "$[2]" = conftest.file 10100*44704f69SBart Van Assche ) 10101*44704f69SBart Van Asschethen 10102*44704f69SBart Van Assche # Ok. 10103*44704f69SBart Van Assche : 10104*44704f69SBart Van Asscheelse 10105*44704f69SBart Van Assche AC_MSG_ERROR([newly created file is older than distributed files! 10106*44704f69SBart Van AsscheCheck your system clock]) 10107*44704f69SBart Van Asschefi 10108*44704f69SBart Van AsscheAC_MSG_RESULT([yes]) 10109*44704f69SBart Van Assche# If we didn't sleep, we still need to ensure time stamps of config.status and 10110*44704f69SBart Van Assche# generated files are strictly newer. 10111*44704f69SBart Van Asscheam_sleep_pid= 10112*44704f69SBart Van Asscheif grep 'slept: no' conftest.file >/dev/null 2>&1; then 10113*44704f69SBart Van Assche ( sleep 1 ) & 10114*44704f69SBart Van Assche am_sleep_pid=$! 10115*44704f69SBart Van Asschefi 10116*44704f69SBart Van AsscheAC_CONFIG_COMMANDS_PRE( 10117*44704f69SBart Van Assche [AC_MSG_CHECKING([that generated files are newer than configure]) 10118*44704f69SBart Van Assche if test -n "$am_sleep_pid"; then 10119*44704f69SBart Van Assche # Hide warnings about reused PIDs. 10120*44704f69SBart Van Assche wait $am_sleep_pid 2>/dev/null 10121*44704f69SBart Van Assche fi 10122*44704f69SBart Van Assche AC_MSG_RESULT([done])]) 10123*44704f69SBart Van Asscherm -f conftest.file 10124*44704f69SBart Van Assche]) 10125*44704f69SBart Van Assche 10126*44704f69SBart Van Assche# Copyright (C) 2009-2021 Free Software Foundation, Inc. 10127*44704f69SBart Van Assche# 10128*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 10129*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 10130*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 10131*44704f69SBart Van Assche 10132*44704f69SBart Van Assche# AM_SILENT_RULES([DEFAULT]) 10133*44704f69SBart Van Assche# -------------------------- 10134*44704f69SBart Van Assche# Enable less verbose build rules; with the default set to DEFAULT 10135*44704f69SBart Van Assche# ("yes" being less verbose, "no" or empty being verbose). 10136*44704f69SBart Van AsscheAC_DEFUN([AM_SILENT_RULES], 10137*44704f69SBart Van Assche[AC_ARG_ENABLE([silent-rules], [dnl 10138*44704f69SBart Van AsscheAS_HELP_STRING( 10139*44704f69SBart Van Assche [--enable-silent-rules], 10140*44704f69SBart Van Assche [less verbose build output (undo: "make V=1")]) 10141*44704f69SBart Van AsscheAS_HELP_STRING( 10142*44704f69SBart Van Assche [--disable-silent-rules], 10143*44704f69SBart Van Assche [verbose build output (undo: "make V=0")])dnl 10144*44704f69SBart Van Assche]) 10145*44704f69SBart Van Asschecase $enable_silent_rules in @%:@ ((( 10146*44704f69SBart Van Assche yes) AM_DEFAULT_VERBOSITY=0;; 10147*44704f69SBart Van Assche no) AM_DEFAULT_VERBOSITY=1;; 10148*44704f69SBart Van Assche *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 10149*44704f69SBart Van Asscheesac 10150*44704f69SBart Van Asschednl 10151*44704f69SBart Van Asschednl A few 'make' implementations (e.g., NonStop OS and NextStep) 10152*44704f69SBart Van Asschednl do not support nested variable expansions. 10153*44704f69SBart Van Asschednl See automake bug#9928 and bug#10237. 10154*44704f69SBart Van Asscheam_make=${MAKE-make} 10155*44704f69SBart Van AsscheAC_CACHE_CHECK([whether $am_make supports nested variables], 10156*44704f69SBart Van Assche [am_cv_make_support_nested_variables], 10157*44704f69SBart Van Assche [if AS_ECHO([['TRUE=$(BAR$(V)) 10158*44704f69SBart Van AsscheBAR0=false 10159*44704f69SBart Van AsscheBAR1=true 10160*44704f69SBart Van AsscheV=1 10161*44704f69SBart Van Asscheam__doit: 10162*44704f69SBart Van Assche @$(TRUE) 10163*44704f69SBart Van Assche.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 10164*44704f69SBart Van Assche am_cv_make_support_nested_variables=yes 10165*44704f69SBart Van Asscheelse 10166*44704f69SBart Van Assche am_cv_make_support_nested_variables=no 10167*44704f69SBart Van Asschefi]) 10168*44704f69SBart Van Asscheif test $am_cv_make_support_nested_variables = yes; then 10169*44704f69SBart Van Assche dnl Using '$V' instead of '$(V)' breaks IRIX make. 10170*44704f69SBart Van Assche AM_V='$(V)' 10171*44704f69SBart Van Assche AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 10172*44704f69SBart Van Asscheelse 10173*44704f69SBart Van Assche AM_V=$AM_DEFAULT_VERBOSITY 10174*44704f69SBart Van Assche AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 10175*44704f69SBart Van Asschefi 10176*44704f69SBart Van AsscheAC_SUBST([AM_V])dnl 10177*44704f69SBart Van AsscheAM_SUBST_NOTMAKE([AM_V])dnl 10178*44704f69SBart Van AsscheAC_SUBST([AM_DEFAULT_V])dnl 10179*44704f69SBart Van AsscheAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 10180*44704f69SBart Van AsscheAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 10181*44704f69SBart Van AsscheAM_BACKSLASH='\' 10182*44704f69SBart Van AsscheAC_SUBST([AM_BACKSLASH])dnl 10183*44704f69SBart Van Assche_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 10184*44704f69SBart Van Assche]) 10185*44704f69SBart Van Assche 10186*44704f69SBart Van Assche# Copyright (C) 2001-2021 Free Software Foundation, Inc. 10187*44704f69SBart Van Assche# 10188*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 10189*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 10190*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 10191*44704f69SBart Van Assche 10192*44704f69SBart Van Assche# AM_PROG_INSTALL_STRIP 10193*44704f69SBart Van Assche# --------------------- 10194*44704f69SBart Van Assche# One issue with vendor 'install' (even GNU) is that you can't 10195*44704f69SBart Van Assche# specify the program used to strip binaries. This is especially 10196*44704f69SBart Van Assche# annoying in cross-compiling environments, where the build's strip 10197*44704f69SBart Van Assche# is unlikely to handle the host's binaries. 10198*44704f69SBart Van Assche# Fortunately install-sh will honor a STRIPPROG variable, so we 10199*44704f69SBart Van Assche# always use install-sh in "make install-strip", and initialize 10200*44704f69SBart Van Assche# STRIPPROG with the value of the STRIP variable (set by the user). 10201*44704f69SBart Van AsscheAC_DEFUN([AM_PROG_INSTALL_STRIP], 10202*44704f69SBart Van Assche[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 10203*44704f69SBart Van Assche# Installed binaries are usually stripped using 'strip' when the user 10204*44704f69SBart Van Assche# run "make install-strip". However 'strip' might not be the right 10205*44704f69SBart Van Assche# tool to use in cross-compilation environments, therefore Automake 10206*44704f69SBart Van Assche# will honor the 'STRIP' environment variable to overrule this program. 10207*44704f69SBart Van Asschednl Don't test for $cross_compiling = yes, because it might be 'maybe'. 10208*44704f69SBart Van Asscheif test "$cross_compiling" != no; then 10209*44704f69SBart Van Assche AC_CHECK_TOOL([STRIP], [strip], :) 10210*44704f69SBart Van Asschefi 10211*44704f69SBart Van AsscheINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 10212*44704f69SBart Van AsscheAC_SUBST([INSTALL_STRIP_PROGRAM])]) 10213*44704f69SBart Van Assche 10214*44704f69SBart Van Assche# Copyright (C) 2006-2021 Free Software Foundation, Inc. 10215*44704f69SBart Van Assche# 10216*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 10217*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 10218*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 10219*44704f69SBart Van Assche 10220*44704f69SBart Van Assche# _AM_SUBST_NOTMAKE(VARIABLE) 10221*44704f69SBart Van Assche# --------------------------- 10222*44704f69SBart Van Assche# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 10223*44704f69SBart Van Assche# This macro is traced by Automake. 10224*44704f69SBart Van AsscheAC_DEFUN([_AM_SUBST_NOTMAKE]) 10225*44704f69SBart Van Assche 10226*44704f69SBart Van Assche# AM_SUBST_NOTMAKE(VARIABLE) 10227*44704f69SBart Van Assche# -------------------------- 10228*44704f69SBart Van Assche# Public sister of _AM_SUBST_NOTMAKE. 10229*44704f69SBart Van AsscheAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10230*44704f69SBart Van Assche 10231*44704f69SBart Van Assche# Check how to create a tarball. -*- Autoconf -*- 10232*44704f69SBart Van Assche 10233*44704f69SBart Van Assche# Copyright (C) 2004-2021 Free Software Foundation, Inc. 10234*44704f69SBart Van Assche# 10235*44704f69SBart Van Assche# This file is free software; the Free Software Foundation 10236*44704f69SBart Van Assche# gives unlimited permission to copy and/or distribute it, 10237*44704f69SBart Van Assche# with or without modifications, as long as this notice is preserved. 10238*44704f69SBart Van Assche 10239*44704f69SBart Van Assche# _AM_PROG_TAR(FORMAT) 10240*44704f69SBart Van Assche# -------------------- 10241*44704f69SBart Van Assche# Check how to create a tarball in format FORMAT. 10242*44704f69SBart Van Assche# FORMAT should be one of 'v7', 'ustar', or 'pax'. 10243*44704f69SBart Van Assche# 10244*44704f69SBart Van Assche# Substitute a variable $(am__tar) that is a command 10245*44704f69SBart Van Assche# writing to stdout a FORMAT-tarball containing the directory 10246*44704f69SBart Van Assche# $tardir. 10247*44704f69SBart Van Assche# tardir=directory && $(am__tar) > result.tar 10248*44704f69SBart Van Assche# 10249*44704f69SBart Van Assche# Substitute a variable $(am__untar) that extract such 10250*44704f69SBart Van Assche# a tarball read from stdin. 10251*44704f69SBart Van Assche# $(am__untar) < result.tar 10252*44704f69SBart Van Assche# 10253*44704f69SBart Van AsscheAC_DEFUN([_AM_PROG_TAR], 10254*44704f69SBart Van Assche[# Always define AMTAR for backward compatibility. Yes, it's still used 10255*44704f69SBart Van Assche# in the wild :-( We should find a proper way to deprecate it ... 10256*44704f69SBart Van AsscheAC_SUBST([AMTAR], ['$${TAR-tar}']) 10257*44704f69SBart Van Assche 10258*44704f69SBart Van Assche# We'll loop over all known methods to create a tar archive until one works. 10259*44704f69SBart Van Assche_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 10260*44704f69SBart Van Assche 10261*44704f69SBart Van Asschem4_if([$1], [v7], 10262*44704f69SBart Van Assche [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 10263*44704f69SBart Van Assche 10264*44704f69SBart Van Assche [m4_case([$1], 10265*44704f69SBart Van Assche [ustar], 10266*44704f69SBart Van Assche [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 10267*44704f69SBart Van Assche # There is notably a 21 bits limit for the UID and the GID. In fact, 10268*44704f69SBart Van Assche # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 10269*44704f69SBart Van Assche # and bug#13588). 10270*44704f69SBart Van Assche am_max_uid=2097151 # 2^21 - 1 10271*44704f69SBart Van Assche am_max_gid=$am_max_uid 10272*44704f69SBart Van Assche # The $UID and $GID variables are not portable, so we need to resort 10273*44704f69SBart Van Assche # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 10274*44704f69SBart Van Assche # below are definitely unexpected, so allow the users to see them 10275*44704f69SBart Van Assche # (that is, avoid stderr redirection). 10276*44704f69SBart Van Assche am_uid=`id -u || echo unknown` 10277*44704f69SBart Van Assche am_gid=`id -g || echo unknown` 10278*44704f69SBart Van Assche AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 10279*44704f69SBart Van Assche if test $am_uid -le $am_max_uid; then 10280*44704f69SBart Van Assche AC_MSG_RESULT([yes]) 10281*44704f69SBart Van Assche else 10282*44704f69SBart Van Assche AC_MSG_RESULT([no]) 10283*44704f69SBart Van Assche _am_tools=none 10284*44704f69SBart Van Assche fi 10285*44704f69SBart Van Assche AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 10286*44704f69SBart Van Assche if test $am_gid -le $am_max_gid; then 10287*44704f69SBart Van Assche AC_MSG_RESULT([yes]) 10288*44704f69SBart Van Assche else 10289*44704f69SBart Van Assche AC_MSG_RESULT([no]) 10290*44704f69SBart Van Assche _am_tools=none 10291*44704f69SBart Van Assche fi], 10292*44704f69SBart Van Assche 10293*44704f69SBart Van Assche [pax], 10294*44704f69SBart Van Assche [], 10295*44704f69SBart Van Assche 10296*44704f69SBart Van Assche [m4_fatal([Unknown tar format])]) 10297*44704f69SBart Van Assche 10298*44704f69SBart Van Assche AC_MSG_CHECKING([how to create a $1 tar archive]) 10299*44704f69SBart Van Assche 10300*44704f69SBart Van Assche # Go ahead even if we have the value already cached. We do so because we 10301*44704f69SBart Van Assche # need to set the values for the 'am__tar' and 'am__untar' variables. 10302*44704f69SBart Van Assche _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10303*44704f69SBart Van Assche 10304*44704f69SBart Van Assche for _am_tool in $_am_tools; do 10305*44704f69SBart Van Assche case $_am_tool in 10306*44704f69SBart Van Assche gnutar) 10307*44704f69SBart Van Assche for _am_tar in tar gnutar gtar; do 10308*44704f69SBart Van Assche AM_RUN_LOG([$_am_tar --version]) && break 10309*44704f69SBart Van Assche done 10310*44704f69SBart Van Assche am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 10311*44704f69SBart Van Assche am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 10312*44704f69SBart Van Assche am__untar="$_am_tar -xf -" 10313*44704f69SBart Van Assche ;; 10314*44704f69SBart Van Assche plaintar) 10315*44704f69SBart Van Assche # Must skip GNU tar: if it does not support --format= it doesn't create 10316*44704f69SBart Van Assche # ustar tarball either. 10317*44704f69SBart Van Assche (tar --version) >/dev/null 2>&1 && continue 10318*44704f69SBart Van Assche am__tar='tar chf - "$$tardir"' 10319*44704f69SBart Van Assche am__tar_='tar chf - "$tardir"' 10320*44704f69SBart Van Assche am__untar='tar xf -' 10321*44704f69SBart Van Assche ;; 10322*44704f69SBart Van Assche pax) 10323*44704f69SBart Van Assche am__tar='pax -L -x $1 -w "$$tardir"' 10324*44704f69SBart Van Assche am__tar_='pax -L -x $1 -w "$tardir"' 10325*44704f69SBart Van Assche am__untar='pax -r' 10326*44704f69SBart Van Assche ;; 10327*44704f69SBart Van Assche cpio) 10328*44704f69SBart Van Assche am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 10329*44704f69SBart Van Assche am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 10330*44704f69SBart Van Assche am__untar='cpio -i -H $1 -d' 10331*44704f69SBart Van Assche ;; 10332*44704f69SBart Van Assche none) 10333*44704f69SBart Van Assche am__tar=false 10334*44704f69SBart Van Assche am__tar_=false 10335*44704f69SBart Van Assche am__untar=false 10336*44704f69SBart Van Assche ;; 10337*44704f69SBart Van Assche esac 10338*44704f69SBart Van Assche 10339*44704f69SBart Van Assche # If the value was cached, stop now. We just wanted to have am__tar 10340*44704f69SBart Van Assche # and am__untar set. 10341*44704f69SBart Van Assche test -n "${am_cv_prog_tar_$1}" && break 10342*44704f69SBart Van Assche 10343*44704f69SBart Van Assche # tar/untar a dummy directory, and stop if the command works. 10344*44704f69SBart Van Assche rm -rf conftest.dir 10345*44704f69SBart Van Assche mkdir conftest.dir 10346*44704f69SBart Van Assche echo GrepMe > conftest.dir/file 10347*44704f69SBart Van Assche AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10348*44704f69SBart Van Assche rm -rf conftest.dir 10349*44704f69SBart Van Assche if test -s conftest.tar; then 10350*44704f69SBart Van Assche AM_RUN_LOG([$am__untar <conftest.tar]) 10351*44704f69SBart Van Assche AM_RUN_LOG([cat conftest.dir/file]) 10352*44704f69SBart Van Assche grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10353*44704f69SBart Van Assche fi 10354*44704f69SBart Van Assche done 10355*44704f69SBart Van Assche rm -rf conftest.dir 10356*44704f69SBart Van Assche 10357*44704f69SBart Van Assche AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10358*44704f69SBart Van Assche AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10359*44704f69SBart Van Assche 10360*44704f69SBart Van AsscheAC_SUBST([am__tar]) 10361*44704f69SBart Van AsscheAC_SUBST([am__untar]) 10362*44704f69SBart Van Assche]) # _AM_PROG_TAR 10363*44704f69SBart Van Assche 10364