aclocal.m4 revision 243750
1243750Srwatson# generated automatically by aclocal 1.12.2 -*- Autoconf -*- 2156283Srwatson 3243750Srwatson# Copyright (C) 1996-2012 Free Software Foundation, Inc. 4243750Srwatson 5156283Srwatson# This file is free software; the Free Software Foundation 6156283Srwatson# gives unlimited permission to copy and/or distribute it, 7156283Srwatson# with or without modifications, as long as this notice is preserved. 8156283Srwatson 9156283Srwatson# This program is distributed in the hope that it will be useful, 10156283Srwatson# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11156283Srwatson# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12156283Srwatson# PARTICULAR PURPOSE. 13156283Srwatson 14191273Srwatsonm4_ifndef([AC_AUTOCONF_VERSION], 15191273Srwatson [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16243750Srwatsonm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 17243750Srwatson[m4_warning([this file was generated for autoconf 2.69. 18191273SrwatsonYou have another version of autoconf. It may work, but is not guaranteed to. 19191273SrwatsonIf you have problems, you may need to regenerate the build system entirely. 20243750SrwatsonTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 21173143Srwatson 22156283Srwatson# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23243750Srwatson# 24243750Srwatson# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 25243750Srwatson# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 26243750Srwatson# Foundation, Inc. 27243750Srwatson# Written by Gordon Matzigkeit, 1996 28243750Srwatson# 29243750Srwatson# This file is free software; the Free Software Foundation gives 30243750Srwatson# unlimited permission to copy and/or distribute it, with or without 31243750Srwatson# modifications, as long as this notice is preserved. 32156283Srwatson 33243750Srwatsonm4_define([_LT_COPYING], [dnl 34243750Srwatson# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 35243750Srwatson# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 36243750Srwatson# Foundation, Inc. 37243750Srwatson# Written by Gordon Matzigkeit, 1996 38243750Srwatson# 39243750Srwatson# This file is part of GNU Libtool. 40243750Srwatson# 41243750Srwatson# GNU Libtool is free software; you can redistribute it and/or 42243750Srwatson# modify it under the terms of the GNU General Public License as 43243750Srwatson# published by the Free Software Foundation; either version 2 of 44243750Srwatson# the License, or (at your option) any later version. 45243750Srwatson# 46243750Srwatson# As a special exception to the GNU General Public License, 47243750Srwatson# if you distribute this file as part of a program or library that 48243750Srwatson# is built using GNU Libtool, you may include this file under the 49243750Srwatson# same distribution terms that you use for the rest of that program. 50243750Srwatson# 51243750Srwatson# GNU Libtool is distributed in the hope that it will be useful, 52243750Srwatson# but WITHOUT ANY WARRANTY; without even the implied warranty of 53243750Srwatson# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 54243750Srwatson# GNU General Public License for more details. 55243750Srwatson# 56243750Srwatson# You should have received a copy of the GNU General Public License 57243750Srwatson# along with GNU Libtool; see the file COPYING. If not, a copy 58243750Srwatson# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 59243750Srwatson# obtained by writing to the Free Software Foundation, Inc., 60243750Srwatson# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 61243750Srwatson]) 62156283Srwatson 63243750Srwatson# serial 57 LT_INIT 64156283Srwatson 65156283Srwatson 66243750Srwatson# LT_PREREQ(VERSION) 67243750Srwatson# ------------------ 68243750Srwatson# Complain and exit if this libtool version is less that VERSION. 69243750Srwatsonm4_defun([LT_PREREQ], 70243750Srwatson[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 71243750Srwatson [m4_default([$3], 72243750Srwatson [m4_fatal([Libtool version $1 or higher is required], 73243750Srwatson 63)])], 74243750Srwatson [$2])]) 75156283Srwatson 76156283Srwatson 77243750Srwatson# _LT_CHECK_BUILDDIR 78243750Srwatson# ------------------ 79243750Srwatson# Complain if the absolute build directory name contains unusual characters 80243750Srwatsonm4_defun([_LT_CHECK_BUILDDIR], 81243750Srwatson[case `pwd` in 82243750Srwatson *\ * | *\ *) 83243750Srwatson AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 84243750Srwatsonesac 85243750Srwatson]) 86156283Srwatson 87156283Srwatson 88243750Srwatson# LT_INIT([OPTIONS]) 89243750Srwatson# ------------------ 90243750SrwatsonAC_DEFUN([LT_INIT], 91243750Srwatson[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 92243750SrwatsonAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 93243750SrwatsonAC_BEFORE([$0], [LT_LANG])dnl 94243750SrwatsonAC_BEFORE([$0], [LT_OUTPUT])dnl 95243750SrwatsonAC_BEFORE([$0], [LTDL_INIT])dnl 96243750Srwatsonm4_require([_LT_CHECK_BUILDDIR])dnl 97156283Srwatson 98243750Srwatsondnl Autoconf doesn't catch unexpanded LT_ macros by default: 99243750Srwatsonm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 100243750Srwatsonm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 101243750Srwatsondnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 102243750Srwatsondnl unless we require an AC_DEFUNed macro: 103243750SrwatsonAC_REQUIRE([LTOPTIONS_VERSION])dnl 104243750SrwatsonAC_REQUIRE([LTSUGAR_VERSION])dnl 105243750SrwatsonAC_REQUIRE([LTVERSION_VERSION])dnl 106243750SrwatsonAC_REQUIRE([LTOBSOLETE_VERSION])dnl 107243750Srwatsonm4_require([_LT_PROG_LTMAIN])dnl 108243750Srwatson 109243750Srwatson_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 110243750Srwatson 111243750Srwatsondnl Parse OPTIONS 112243750Srwatson_LT_SET_OPTIONS([$0], [$1]) 113243750Srwatson 114156283Srwatson# This can be used to rebuild libtool when needed 115243750SrwatsonLIBTOOL_DEPS="$ltmain" 116156283Srwatson 117156283Srwatson# Always use our own libtool. 118156283SrwatsonLIBTOOL='$(SHELL) $(top_builddir)/libtool' 119156283SrwatsonAC_SUBST(LIBTOOL)dnl 120156283Srwatson 121243750Srwatson_LT_SETUP 122156283Srwatson 123243750Srwatson# Only expand once: 124243750Srwatsonm4_define([LT_INIT]) 125243750Srwatson])# LT_INIT 126156283Srwatson 127243750Srwatson# Old names: 128243750SrwatsonAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 129243750SrwatsonAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 130243750Srwatsondnl aclocal-1.4 backwards compatibility: 131243750Srwatsondnl AC_DEFUN([AC_PROG_LIBTOOL], []) 132243750Srwatsondnl AC_DEFUN([AM_PROG_LIBTOOL], []) 133243750Srwatson 134243750Srwatson 135243750Srwatson# _LT_CC_BASENAME(CC) 136243750Srwatson# ------------------- 137243750Srwatson# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 138243750Srwatsonm4_defun([_LT_CC_BASENAME], 139243750Srwatson[for cc_temp in $1""; do 140243750Srwatson case $cc_temp in 141243750Srwatson compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 142243750Srwatson distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 143243750Srwatson \-*) ;; 144243750Srwatson *) break;; 145243750Srwatson esac 146243750Srwatsondone 147243750Srwatsoncc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 148243750Srwatson]) 149243750Srwatson 150243750Srwatson 151243750Srwatson# _LT_FILEUTILS_DEFAULTS 152243750Srwatson# ---------------------- 153243750Srwatson# It is okay to use these file commands and assume they have been set 154243750Srwatson# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 155243750Srwatsonm4_defun([_LT_FILEUTILS_DEFAULTS], 156243750Srwatson[: ${CP="cp -f"} 157243750Srwatson: ${MV="mv -f"} 158243750Srwatson: ${RM="rm -f"} 159243750Srwatson])# _LT_FILEUTILS_DEFAULTS 160243750Srwatson 161243750Srwatson 162243750Srwatson# _LT_SETUP 163243750Srwatson# --------- 164243750Srwatsonm4_defun([_LT_SETUP], 165243750Srwatson[AC_REQUIRE([AC_CANONICAL_HOST])dnl 166156283SrwatsonAC_REQUIRE([AC_CANONICAL_BUILD])dnl 167243750SrwatsonAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 168243750SrwatsonAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 169243750Srwatson 170243750Srwatson_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 171243750Srwatsondnl 172243750Srwatson_LT_DECL([], [host_alias], [0], [The host system])dnl 173243750Srwatson_LT_DECL([], [host], [0])dnl 174243750Srwatson_LT_DECL([], [host_os], [0])dnl 175243750Srwatsondnl 176243750Srwatson_LT_DECL([], [build_alias], [0], [The build system])dnl 177243750Srwatson_LT_DECL([], [build], [0])dnl 178243750Srwatson_LT_DECL([], [build_os], [0])dnl 179243750Srwatsondnl 180156283SrwatsonAC_REQUIRE([AC_PROG_CC])dnl 181243750SrwatsonAC_REQUIRE([LT_PATH_LD])dnl 182243750SrwatsonAC_REQUIRE([LT_PATH_NM])dnl 183243750Srwatsondnl 184156283SrwatsonAC_REQUIRE([AC_PROG_LN_S])dnl 185243750Srwatsontest -z "$LN_S" && LN_S="ln -s" 186243750Srwatson_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 187156283Srwatsondnl 188243750SrwatsonAC_REQUIRE([LT_CMD_MAX_LEN])dnl 189243750Srwatson_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 190243750Srwatson_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 191243750Srwatsondnl 192243750Srwatsonm4_require([_LT_FILEUTILS_DEFAULTS])dnl 193243750Srwatsonm4_require([_LT_CHECK_SHELL_FEATURES])dnl 194243750Srwatsonm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 195243750Srwatsonm4_require([_LT_CMD_RELOAD])dnl 196243750Srwatsonm4_require([_LT_CHECK_MAGIC_METHOD])dnl 197243750Srwatsonm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 198243750Srwatsonm4_require([_LT_CMD_OLD_ARCHIVE])dnl 199243750Srwatsonm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 200243750Srwatsonm4_require([_LT_WITH_SYSROOT])dnl 201156283Srwatson 202243750Srwatson_LT_CONFIG_LIBTOOL_INIT([ 203243750Srwatson# See if we are running on zsh, and set the options which allow our 204243750Srwatson# commands through without removal of \ escapes INIT. 205243750Srwatsonif test -n "\${ZSH_VERSION+set}" ; then 206243750Srwatson setopt NO_GLOB_SUBST 207243750Srwatsonfi 208243750Srwatson]) 209243750Srwatsonif test -n "${ZSH_VERSION+set}" ; then 210243750Srwatson setopt NO_GLOB_SUBST 211243750Srwatsonfi 212156283Srwatson 213243750Srwatson_LT_CHECK_OBJDIR 214243750Srwatson 215243750Srwatsonm4_require([_LT_TAG_COMPILER])dnl 216243750Srwatson 217156283Srwatsoncase $host_os in 218156283Srwatsonaix3*) 219156283Srwatson # AIX sometimes has problems with the GCC collect2 program. For some 220156283Srwatson # reason, if we set the COLLECT_NAMES environment variable, the problems 221156283Srwatson # vanish in a puff of smoke. 222156283Srwatson if test "X${COLLECT_NAMES+set}" != Xset; then 223156283Srwatson COLLECT_NAMES= 224156283Srwatson export COLLECT_NAMES 225156283Srwatson fi 226156283Srwatson ;; 227156283Srwatsonesac 228156283Srwatson 229156283Srwatson# Global variables: 230243750Srwatsonofile=libtool 231156283Srwatsoncan_build_shared=yes 232156283Srwatson 233156283Srwatson# All known linkers require a `.a' archive for static linking (except MSVC, 234156283Srwatson# which needs '.lib'). 235156283Srwatsonlibext=a 236243750Srwatson 237156283Srwatsonwith_gnu_ld="$lt_cv_prog_gnu_ld" 238156283Srwatson 239156283Srwatsonold_CC="$CC" 240156283Srwatsonold_CFLAGS="$CFLAGS" 241156283Srwatson 242156283Srwatson# Set sane defaults for various variables 243156283Srwatsontest -z "$CC" && CC=cc 244156283Srwatsontest -z "$LTCC" && LTCC=$CC 245173143Srwatsontest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 246156283Srwatsontest -z "$LD" && LD=ld 247156283Srwatsontest -z "$ac_objext" && ac_objext=o 248156283Srwatson 249156283Srwatson_LT_CC_BASENAME([$compiler]) 250156283Srwatson 251156283Srwatson# Only perform the check for file, if the check method requires it 252243750Srwatsontest -z "$MAGIC_CMD" && MAGIC_CMD=file 253156283Srwatsoncase $deplibs_check_method in 254156283Srwatsonfile_magic*) 255156283Srwatson if test "$file_magic_cmd" = '$MAGIC_CMD'; then 256243750Srwatson _LT_PATH_MAGIC 257156283Srwatson fi 258156283Srwatson ;; 259156283Srwatsonesac 260156283Srwatson 261243750Srwatson# Use C for the default configuration in the libtool script 262243750SrwatsonLT_SUPPORTED_TAG([CC]) 263243750Srwatson_LT_LANG_C_CONFIG 264243750Srwatson_LT_LANG_DEFAULT_CONFIG 265243750Srwatson_LT_CONFIG_COMMANDS 266243750Srwatson])# _LT_SETUP 267191273Srwatson 268156283Srwatson 269243750Srwatson# _LT_PREPARE_SED_QUOTE_VARS 270243750Srwatson# -------------------------- 271243750Srwatson# Define a few sed substitution that help us do robust quoting. 272243750Srwatsonm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 273243750Srwatson[# Backslashify metacharacters that are still active within 274243750Srwatson# double-quoted strings. 275243750Srwatsonsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 276156283Srwatson 277243750Srwatson# Same as above, but do not quote variable references. 278243750Srwatsondouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 279156283Srwatson 280243750Srwatson# Sed substitution to delay expansion of an escaped shell variable in a 281243750Srwatson# double_quote_subst'ed string. 282243750Srwatsondelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 283156283Srwatson 284243750Srwatson# Sed substitution to delay expansion of an escaped single quote. 285243750Srwatsondelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 286156283Srwatson 287243750Srwatson# Sed substitution to avoid accidental globbing in evaled expressions 288243750Srwatsonno_glob_subst='s/\*/\\\*/g' 289243750Srwatson]) 290243750Srwatson 291243750Srwatson# _LT_PROG_LTMAIN 292243750Srwatson# --------------- 293243750Srwatson# Note that this code is called both from `configure', and `config.status' 294243750Srwatson# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 295243750Srwatson# `config.status' has no value for ac_aux_dir unless we are using Automake, 296243750Srwatson# so we pass a copy along to make sure it has a sensible value anyway. 297243750Srwatsonm4_defun([_LT_PROG_LTMAIN], 298243750Srwatson[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 299243750Srwatson_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 300243750Srwatsonltmain="$ac_aux_dir/ltmain.sh" 301243750Srwatson])# _LT_PROG_LTMAIN 302243750Srwatson 303243750Srwatson 304243750Srwatson 305243750Srwatson# So that we can recreate a full libtool script including additional 306243750Srwatson# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 307243750Srwatson# in macros and then make a single call at the end using the `libtool' 308243750Srwatson# label. 309243750Srwatson 310243750Srwatson 311243750Srwatson# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 312243750Srwatson# ---------------------------------------- 313243750Srwatson# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 314243750Srwatsonm4_define([_LT_CONFIG_LIBTOOL_INIT], 315243750Srwatson[m4_ifval([$1], 316243750Srwatson [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 317243750Srwatson [$1 318243750Srwatson])])]) 319243750Srwatson 320243750Srwatson# Initialize. 321243750Srwatsonm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 322243750Srwatson 323243750Srwatson 324243750Srwatson# _LT_CONFIG_LIBTOOL([COMMANDS]) 325243750Srwatson# ------------------------------ 326243750Srwatson# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 327243750Srwatsonm4_define([_LT_CONFIG_LIBTOOL], 328243750Srwatson[m4_ifval([$1], 329243750Srwatson [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 330243750Srwatson [$1 331243750Srwatson])])]) 332243750Srwatson 333243750Srwatson# Initialize. 334243750Srwatsonm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 335243750Srwatson 336243750Srwatson 337243750Srwatson# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 338243750Srwatson# ----------------------------------------------------- 339243750Srwatsonm4_defun([_LT_CONFIG_SAVE_COMMANDS], 340243750Srwatson[_LT_CONFIG_LIBTOOL([$1]) 341243750Srwatson_LT_CONFIG_LIBTOOL_INIT([$2]) 342243750Srwatson]) 343243750Srwatson 344243750Srwatson 345243750Srwatson# _LT_FORMAT_COMMENT([COMMENT]) 346243750Srwatson# ----------------------------- 347243750Srwatson# Add leading comment marks to the start of each line, and a trailing 348243750Srwatson# full-stop to the whole comment if one is not present already. 349243750Srwatsonm4_define([_LT_FORMAT_COMMENT], 350243750Srwatson[m4_ifval([$1], [ 351243750Srwatsonm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 352243750Srwatson [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 353243750Srwatson)]) 354243750Srwatson 355243750Srwatson 356243750Srwatson 357243750Srwatson 358243750Srwatson 359243750Srwatson# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 360243750Srwatson# ------------------------------------------------------------------- 361243750Srwatson# CONFIGNAME is the name given to the value in the libtool script. 362243750Srwatson# VARNAME is the (base) name used in the configure script. 363243750Srwatson# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 364243750Srwatson# VARNAME. Any other value will be used directly. 365243750Srwatsonm4_define([_LT_DECL], 366243750Srwatson[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 367243750Srwatson [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 368243750Srwatson [m4_ifval([$1], [$1], [$2])]) 369243750Srwatson lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 370243750Srwatson m4_ifval([$4], 371243750Srwatson [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 372243750Srwatson lt_dict_add_subkey([lt_decl_dict], [$2], 373243750Srwatson [tagged?], [m4_ifval([$5], [yes], [no])])]) 374243750Srwatson]) 375243750Srwatson 376243750Srwatson 377243750Srwatson# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 378243750Srwatson# -------------------------------------------------------- 379243750Srwatsonm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 380243750Srwatson 381243750Srwatson 382243750Srwatson# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 383243750Srwatson# ------------------------------------------------ 384243750Srwatsonm4_define([lt_decl_tag_varnames], 385243750Srwatson[_lt_decl_filter([tagged?], [yes], $@)]) 386243750Srwatson 387243750Srwatson 388243750Srwatson# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 389243750Srwatson# --------------------------------------------------------- 390243750Srwatsonm4_define([_lt_decl_filter], 391243750Srwatson[m4_case([$#], 392243750Srwatson [0], [m4_fatal([$0: too few arguments: $#])], 393243750Srwatson [1], [m4_fatal([$0: too few arguments: $#: $1])], 394243750Srwatson [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 395243750Srwatson [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 396243750Srwatson [lt_dict_filter([lt_decl_dict], $@)])[]dnl 397243750Srwatson]) 398243750Srwatson 399243750Srwatson 400243750Srwatson# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 401243750Srwatson# -------------------------------------------------- 402243750Srwatsonm4_define([lt_decl_quote_varnames], 403243750Srwatson[_lt_decl_filter([value], [1], $@)]) 404243750Srwatson 405243750Srwatson 406243750Srwatson# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 407243750Srwatson# --------------------------------------------------- 408243750Srwatsonm4_define([lt_decl_dquote_varnames], 409243750Srwatson[_lt_decl_filter([value], [2], $@)]) 410243750Srwatson 411243750Srwatson 412243750Srwatson# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 413243750Srwatson# --------------------------------------------------- 414243750Srwatsonm4_define([lt_decl_varnames_tagged], 415243750Srwatson[m4_assert([$# <= 2])dnl 416243750Srwatson_$0(m4_quote(m4_default([$1], [[, ]])), 417243750Srwatson m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 418243750Srwatson m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 419243750Srwatsonm4_define([_lt_decl_varnames_tagged], 420243750Srwatson[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 421243750Srwatson 422243750Srwatson 423243750Srwatson# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 424243750Srwatson# ------------------------------------------------ 425243750Srwatsonm4_define([lt_decl_all_varnames], 426243750Srwatson[_$0(m4_quote(m4_default([$1], [[, ]])), 427243750Srwatson m4_if([$2], [], 428243750Srwatson m4_quote(lt_decl_varnames), 429243750Srwatson m4_quote(m4_shift($@))))[]dnl 430243750Srwatson]) 431243750Srwatsonm4_define([_lt_decl_all_varnames], 432243750Srwatson[lt_join($@, lt_decl_varnames_tagged([$1], 433243750Srwatson lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 434243750Srwatson]) 435243750Srwatson 436243750Srwatson 437243750Srwatson# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 438243750Srwatson# ------------------------------------ 439243750Srwatson# Quote a variable value, and forward it to `config.status' so that its 440243750Srwatson# declaration there will have the same value as in `configure'. VARNAME 441243750Srwatson# must have a single quote delimited value for this to work. 442243750Srwatsonm4_define([_LT_CONFIG_STATUS_DECLARE], 443243750Srwatson[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 444243750Srwatson 445243750Srwatson 446243750Srwatson# _LT_CONFIG_STATUS_DECLARATIONS 447243750Srwatson# ------------------------------ 448243750Srwatson# We delimit libtool config variables with single quotes, so when 449243750Srwatson# we write them to config.status, we have to be sure to quote all 450243750Srwatson# embedded single quotes properly. In configure, this macro expands 451243750Srwatson# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 452243750Srwatson# 453243750Srwatson# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 454243750Srwatsonm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 455243750Srwatson[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 456243750Srwatson [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 457243750Srwatson 458243750Srwatson 459243750Srwatson# _LT_LIBTOOL_TAGS 460243750Srwatson# ---------------- 461243750Srwatson# Output comment and list of tags supported by the script 462243750Srwatsonm4_defun([_LT_LIBTOOL_TAGS], 463243750Srwatson[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 464243750Srwatsonavailable_tags="_LT_TAGS"dnl 465243750Srwatson]) 466243750Srwatson 467243750Srwatson 468243750Srwatson# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 469243750Srwatson# ----------------------------------- 470243750Srwatson# Extract the dictionary values for VARNAME (optionally with TAG) and 471243750Srwatson# expand to a commented shell variable setting: 472243750Srwatson# 473243750Srwatson# # Some comment about what VAR is for. 474243750Srwatson# visible_name=$lt_internal_name 475243750Srwatsonm4_define([_LT_LIBTOOL_DECLARE], 476243750Srwatson[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 477243750Srwatson [description])))[]dnl 478243750Srwatsonm4_pushdef([_libtool_name], 479243750Srwatson m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 480243750Srwatsonm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 481243750Srwatson [0], [_libtool_name=[$]$1], 482243750Srwatson [1], [_libtool_name=$lt_[]$1], 483243750Srwatson [2], [_libtool_name=$lt_[]$1], 484243750Srwatson [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 485243750Srwatsonm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 486243750Srwatson]) 487243750Srwatson 488243750Srwatson 489243750Srwatson# _LT_LIBTOOL_CONFIG_VARS 490243750Srwatson# ----------------------- 491243750Srwatson# Produce commented declarations of non-tagged libtool config variables 492243750Srwatson# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 493243750Srwatson# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 494243750Srwatson# section) are produced by _LT_LIBTOOL_TAG_VARS. 495243750Srwatsonm4_defun([_LT_LIBTOOL_CONFIG_VARS], 496243750Srwatson[m4_foreach([_lt_var], 497243750Srwatson m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 498243750Srwatson [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 499243750Srwatson 500243750Srwatson 501243750Srwatson# _LT_LIBTOOL_TAG_VARS(TAG) 502243750Srwatson# ------------------------- 503243750Srwatsonm4_define([_LT_LIBTOOL_TAG_VARS], 504243750Srwatson[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 505243750Srwatson [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 506243750Srwatson 507243750Srwatson 508243750Srwatson# _LT_TAGVAR(VARNAME, [TAGNAME]) 509243750Srwatson# ------------------------------ 510243750Srwatsonm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 511243750Srwatson 512243750Srwatson 513243750Srwatson# _LT_CONFIG_COMMANDS 514156283Srwatson# ------------------- 515243750Srwatson# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 516243750Srwatson# variables for single and double quote escaping we saved from calls 517243750Srwatson# to _LT_DECL, we can put quote escaped variables declarations 518243750Srwatson# into `config.status', and then the shell code to quote escape them in 519243750Srwatson# for loops in `config.status'. Finally, any additional code accumulated 520243750Srwatson# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 521243750Srwatsonm4_defun([_LT_CONFIG_COMMANDS], 522243750Srwatson[AC_PROVIDE_IFELSE([LT_OUTPUT], 523243750Srwatson dnl If the libtool generation code has been placed in $CONFIG_LT, 524243750Srwatson dnl instead of duplicating it all over again into config.status, 525243750Srwatson dnl then we will have config.status run $CONFIG_LT later, so it 526243750Srwatson dnl needs to know what name is stored there: 527243750Srwatson [AC_CONFIG_COMMANDS([libtool], 528243750Srwatson [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 529243750Srwatson dnl If the libtool generation code is destined for config.status, 530243750Srwatson dnl expand the accumulated commands and init code now: 531243750Srwatson [AC_CONFIG_COMMANDS([libtool], 532243750Srwatson [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 533243750Srwatson])#_LT_CONFIG_COMMANDS 534243750Srwatson 535243750Srwatson 536243750Srwatson# Initialize. 537243750Srwatsonm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 538243750Srwatson[ 539243750Srwatson 540243750Srwatson# The HP-UX ksh and POSIX shell print the target directory to stdout 541243750Srwatson# if CDPATH is set. 542243750Srwatson(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 543243750Srwatson 544243750Srwatsonsed_quote_subst='$sed_quote_subst' 545243750Srwatsondouble_quote_subst='$double_quote_subst' 546243750Srwatsondelay_variable_subst='$delay_variable_subst' 547243750Srwatson_LT_CONFIG_STATUS_DECLARATIONS 548243750SrwatsonLTCC='$LTCC' 549243750SrwatsonLTCFLAGS='$LTCFLAGS' 550243750Srwatsoncompiler='$compiler_DEFAULT' 551243750Srwatson 552243750Srwatson# A function that is used when there is no print builtin or printf. 553243750Srwatsonfunc_fallback_echo () 554243750Srwatson{ 555243750Srwatson eval 'cat <<_LTECHO_EOF 556243750Srwatson\$[]1 557243750Srwatson_LTECHO_EOF' 558243750Srwatson} 559243750Srwatson 560243750Srwatson# Quote evaled strings. 561243750Srwatsonfor var in lt_decl_all_varnames([[ \ 562243750Srwatson]], lt_decl_quote_varnames); do 563243750Srwatson case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 564243750Srwatson *[[\\\\\\\`\\"\\\$]]*) 565243750Srwatson eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 566243750Srwatson ;; 567243750Srwatson *) 568243750Srwatson eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 569243750Srwatson ;; 570243750Srwatson esac 571243750Srwatsondone 572243750Srwatson 573243750Srwatson# Double-quote double-evaled strings. 574243750Srwatsonfor var in lt_decl_all_varnames([[ \ 575243750Srwatson]], lt_decl_dquote_varnames); do 576243750Srwatson case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 577243750Srwatson *[[\\\\\\\`\\"\\\$]]*) 578243750Srwatson eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 579243750Srwatson ;; 580243750Srwatson *) 581243750Srwatson eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 582243750Srwatson ;; 583243750Srwatson esac 584243750Srwatsondone 585243750Srwatson 586243750Srwatson_LT_OUTPUT_LIBTOOL_INIT 587243750Srwatson]) 588243750Srwatson 589243750Srwatson# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 590243750Srwatson# ------------------------------------ 591243750Srwatson# Generate a child script FILE with all initialization necessary to 592243750Srwatson# reuse the environment learned by the parent script, and make the 593243750Srwatson# file executable. If COMMENT is supplied, it is inserted after the 594243750Srwatson# `#!' sequence but before initialization text begins. After this 595243750Srwatson# macro, additional text can be appended to FILE to form the body of 596243750Srwatson# the child script. The macro ends with non-zero status if the 597243750Srwatson# file could not be fully written (such as if the disk is full). 598243750Srwatsonm4_ifdef([AS_INIT_GENERATED], 599243750Srwatson[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 600243750Srwatson[m4_defun([_LT_GENERATED_FILE_INIT], 601243750Srwatson[m4_require([AS_PREPARE])]dnl 602243750Srwatson[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 603243750Srwatson[lt_write_fail=0 604243750Srwatsoncat >$1 <<_ASEOF || lt_write_fail=1 605243750Srwatson#! $SHELL 606243750Srwatson# Generated by $as_me. 607243750Srwatson$2 608243750SrwatsonSHELL=\${CONFIG_SHELL-$SHELL} 609243750Srwatsonexport SHELL 610243750Srwatson_ASEOF 611243750Srwatsoncat >>$1 <<\_ASEOF || lt_write_fail=1 612243750SrwatsonAS_SHELL_SANITIZE 613243750Srwatson_AS_PREPARE 614243750Srwatsonexec AS_MESSAGE_FD>&1 615243750Srwatson_ASEOF 616243750Srwatsontest $lt_write_fail = 0 && chmod +x $1[]dnl 617243750Srwatsonm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 618243750Srwatson 619243750Srwatson# LT_OUTPUT 620243750Srwatson# --------- 621243750Srwatson# This macro allows early generation of the libtool script (before 622243750Srwatson# AC_OUTPUT is called), incase it is used in configure for compilation 623243750Srwatson# tests. 624243750SrwatsonAC_DEFUN([LT_OUTPUT], 625243750Srwatson[: ${CONFIG_LT=./config.lt} 626243750SrwatsonAC_MSG_NOTICE([creating $CONFIG_LT]) 627243750Srwatson_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 628243750Srwatson[# Run this file to recreate a libtool stub with the current configuration.]) 629243750Srwatson 630243750Srwatsoncat >>"$CONFIG_LT" <<\_LTEOF 631243750Srwatsonlt_cl_silent=false 632243750Srwatsonexec AS_MESSAGE_LOG_FD>>config.log 633243750Srwatson{ 634243750Srwatson echo 635243750Srwatson AS_BOX([Running $as_me.]) 636243750Srwatson} >&AS_MESSAGE_LOG_FD 637243750Srwatson 638243750Srwatsonlt_cl_help="\ 639243750Srwatson\`$as_me' creates a local libtool stub from the current configuration, 640243750Srwatsonfor use in further configure time tests before the real libtool is 641243750Srwatsongenerated. 642243750Srwatson 643243750SrwatsonUsage: $[0] [[OPTIONS]] 644243750Srwatson 645243750Srwatson -h, --help print this help, then exit 646243750Srwatson -V, --version print version number, then exit 647243750Srwatson -q, --quiet do not print progress messages 648243750Srwatson -d, --debug don't remove temporary files 649243750Srwatson 650243750SrwatsonReport bugs to <bug-libtool@gnu.org>." 651243750Srwatson 652243750Srwatsonlt_cl_version="\ 653243750Srwatsonm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 654243750Srwatsonm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 655243750Srwatsonconfigured by $[0], generated by m4_PACKAGE_STRING. 656243750Srwatson 657243750SrwatsonCopyright (C) 2011 Free Software Foundation, Inc. 658243750SrwatsonThis config.lt script is free software; the Free Software Foundation 659243750Srwatsongives unlimited permision to copy, distribute and modify it." 660243750Srwatson 661243750Srwatsonwhile test $[#] != 0 662243750Srwatsondo 663243750Srwatson case $[1] in 664243750Srwatson --version | --v* | -V ) 665243750Srwatson echo "$lt_cl_version"; exit 0 ;; 666243750Srwatson --help | --h* | -h ) 667243750Srwatson echo "$lt_cl_help"; exit 0 ;; 668243750Srwatson --debug | --d* | -d ) 669243750Srwatson debug=: ;; 670243750Srwatson --quiet | --q* | --silent | --s* | -q ) 671243750Srwatson lt_cl_silent=: ;; 672243750Srwatson 673243750Srwatson -*) AC_MSG_ERROR([unrecognized option: $[1] 674243750SrwatsonTry \`$[0] --help' for more information.]) ;; 675243750Srwatson 676243750Srwatson *) AC_MSG_ERROR([unrecognized argument: $[1] 677243750SrwatsonTry \`$[0] --help' for more information.]) ;; 678243750Srwatson esac 679243750Srwatson shift 680243750Srwatsondone 681243750Srwatson 682243750Srwatsonif $lt_cl_silent; then 683243750Srwatson exec AS_MESSAGE_FD>/dev/null 684243750Srwatsonfi 685243750Srwatson_LTEOF 686243750Srwatson 687243750Srwatsoncat >>"$CONFIG_LT" <<_LTEOF 688243750Srwatson_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 689243750Srwatson_LTEOF 690243750Srwatson 691243750Srwatsoncat >>"$CONFIG_LT" <<\_LTEOF 692243750SrwatsonAC_MSG_NOTICE([creating $ofile]) 693243750Srwatson_LT_OUTPUT_LIBTOOL_COMMANDS 694243750SrwatsonAS_EXIT(0) 695243750Srwatson_LTEOF 696243750Srwatsonchmod +x "$CONFIG_LT" 697243750Srwatson 698243750Srwatson# configure is writing to config.log, but config.lt does its own redirection, 699243750Srwatson# appending to config.log, which fails on DOS, as config.log is still kept 700243750Srwatson# open by configure. Here we exec the FD to /dev/null, effectively closing 701243750Srwatson# config.log, so it can be properly (re)opened and appended to by config.lt. 702243750Srwatsonlt_cl_success=: 703243750Srwatsontest "$silent" = yes && 704243750Srwatson lt_config_lt_args="$lt_config_lt_args --quiet" 705243750Srwatsonexec AS_MESSAGE_LOG_FD>/dev/null 706243750Srwatson$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 707243750Srwatsonexec AS_MESSAGE_LOG_FD>>config.log 708243750Srwatson$lt_cl_success || AS_EXIT(1) 709243750Srwatson])# LT_OUTPUT 710243750Srwatson 711243750Srwatson 712243750Srwatson# _LT_CONFIG(TAG) 713243750Srwatson# --------------- 714243750Srwatson# If TAG is the built-in tag, create an initial libtool script with a 715243750Srwatson# default configuration from the untagged config vars. Otherwise add code 716243750Srwatson# to config.status for appending the configuration named by TAG from the 717243750Srwatson# matching tagged config vars. 718243750Srwatsonm4_defun([_LT_CONFIG], 719243750Srwatson[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 720243750Srwatson_LT_CONFIG_SAVE_COMMANDS([ 721243750Srwatson m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 722243750Srwatson m4_if(_LT_TAG, [C], [ 723243750Srwatson # See if we are running on zsh, and set the options which allow our 724243750Srwatson # commands through without removal of \ escapes. 725243750Srwatson if test -n "${ZSH_VERSION+set}" ; then 726243750Srwatson setopt NO_GLOB_SUBST 727243750Srwatson fi 728243750Srwatson 729243750Srwatson cfgfile="${ofile}T" 730243750Srwatson trap "$RM \"$cfgfile\"; exit 1" 1 2 15 731243750Srwatson $RM "$cfgfile" 732243750Srwatson 733243750Srwatson cat <<_LT_EOF >> "$cfgfile" 734243750Srwatson#! $SHELL 735243750Srwatson 736243750Srwatson# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 737243750Srwatson# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 738243750Srwatson# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 739243750Srwatson# NOTE: Changes made to this file will be lost: look at ltmain.sh. 740243750Srwatson# 741243750Srwatson_LT_COPYING 742243750Srwatson_LT_LIBTOOL_TAGS 743243750Srwatson 744243750Srwatson# ### BEGIN LIBTOOL CONFIG 745243750Srwatson_LT_LIBTOOL_CONFIG_VARS 746243750Srwatson_LT_LIBTOOL_TAG_VARS 747243750Srwatson# ### END LIBTOOL CONFIG 748243750Srwatson 749243750Srwatson_LT_EOF 750243750Srwatson 751243750Srwatson case $host_os in 752243750Srwatson aix3*) 753243750Srwatson cat <<\_LT_EOF >> "$cfgfile" 754243750Srwatson# AIX sometimes has problems with the GCC collect2 program. For some 755243750Srwatson# reason, if we set the COLLECT_NAMES environment variable, the problems 756243750Srwatson# vanish in a puff of smoke. 757243750Srwatsonif test "X${COLLECT_NAMES+set}" != Xset; then 758243750Srwatson COLLECT_NAMES= 759243750Srwatson export COLLECT_NAMES 760243750Srwatsonfi 761243750Srwatson_LT_EOF 762243750Srwatson ;; 763243750Srwatson esac 764243750Srwatson 765243750Srwatson _LT_PROG_LTMAIN 766243750Srwatson 767243750Srwatson # We use sed instead of cat because bash on DJGPP gets confused if 768243750Srwatson # if finds mixed CR/LF and LF-only lines. Since sed operates in 769243750Srwatson # text mode, it properly converts lines to CR/LF. This bash problem 770243750Srwatson # is reportedly fixed, but why not run on old versions too? 771243750Srwatson sed '$q' "$ltmain" >> "$cfgfile" \ 772243750Srwatson || (rm -f "$cfgfile"; exit 1) 773243750Srwatson 774243750Srwatson _LT_PROG_REPLACE_SHELLFNS 775243750Srwatson 776243750Srwatson mv -f "$cfgfile" "$ofile" || 777243750Srwatson (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 778243750Srwatson chmod +x "$ofile" 779243750Srwatson], 780243750Srwatson[cat <<_LT_EOF >> "$ofile" 781243750Srwatson 782243750Srwatsondnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 783243750Srwatsondnl in a comment (ie after a #). 784243750Srwatson# ### BEGIN LIBTOOL TAG CONFIG: $1 785243750Srwatson_LT_LIBTOOL_TAG_VARS(_LT_TAG) 786243750Srwatson# ### END LIBTOOL TAG CONFIG: $1 787243750Srwatson_LT_EOF 788243750Srwatson])dnl /m4_if 789243750Srwatson], 790243750Srwatson[m4_if([$1], [], [ 791243750Srwatson PACKAGE='$PACKAGE' 792243750Srwatson VERSION='$VERSION' 793243750Srwatson TIMESTAMP='$TIMESTAMP' 794243750Srwatson RM='$RM' 795243750Srwatson ofile='$ofile'], []) 796243750Srwatson])dnl /_LT_CONFIG_SAVE_COMMANDS 797243750Srwatson])# _LT_CONFIG 798243750Srwatson 799243750Srwatson 800243750Srwatson# LT_SUPPORTED_TAG(TAG) 801243750Srwatson# --------------------- 802243750Srwatson# Trace this macro to discover what tags are supported by the libtool 803243750Srwatson# --tag option, using: 804243750Srwatson# autoconf --trace 'LT_SUPPORTED_TAG:$1' 805243750SrwatsonAC_DEFUN([LT_SUPPORTED_TAG], []) 806243750Srwatson 807243750Srwatson 808243750Srwatson# C support is built-in for now 809243750Srwatsonm4_define([_LT_LANG_C_enabled], []) 810243750Srwatsonm4_define([_LT_TAGS], []) 811243750Srwatson 812243750Srwatson 813243750Srwatson# LT_LANG(LANG) 814243750Srwatson# ------------- 815243750Srwatson# Enable libtool support for the given language if not already enabled. 816243750SrwatsonAC_DEFUN([LT_LANG], 817243750Srwatson[AC_BEFORE([$0], [LT_OUTPUT])dnl 818243750Srwatsonm4_case([$1], 819243750Srwatson [C], [_LT_LANG(C)], 820243750Srwatson [C++], [_LT_LANG(CXX)], 821243750Srwatson [Go], [_LT_LANG(GO)], 822243750Srwatson [Java], [_LT_LANG(GCJ)], 823243750Srwatson [Fortran 77], [_LT_LANG(F77)], 824243750Srwatson [Fortran], [_LT_LANG(FC)], 825243750Srwatson [Windows Resource], [_LT_LANG(RC)], 826243750Srwatson [m4_ifdef([_LT_LANG_]$1[_CONFIG], 827243750Srwatson [_LT_LANG($1)], 828243750Srwatson [m4_fatal([$0: unsupported language: "$1"])])])dnl 829243750Srwatson])# LT_LANG 830243750Srwatson 831243750Srwatson 832243750Srwatson# _LT_LANG(LANGNAME) 833243750Srwatson# ------------------ 834243750Srwatsonm4_defun([_LT_LANG], 835243750Srwatson[m4_ifdef([_LT_LANG_]$1[_enabled], [], 836243750Srwatson [LT_SUPPORTED_TAG([$1])dnl 837243750Srwatson m4_append([_LT_TAGS], [$1 ])dnl 838243750Srwatson m4_define([_LT_LANG_]$1[_enabled], [])dnl 839243750Srwatson _LT_LANG_$1_CONFIG($1)])dnl 840243750Srwatson])# _LT_LANG 841243750Srwatson 842243750Srwatson 843243750Srwatsonm4_ifndef([AC_PROG_GO], [ 844243750Srwatson# NOTE: This macro has been submitted for inclusion into # 845243750Srwatson# GNU Autoconf as AC_PROG_GO. When it is available in # 846243750Srwatson# a released version of Autoconf we should remove this # 847243750Srwatson# macro and use it instead. # 848243750Srwatsonm4_defun([AC_PROG_GO], 849243750Srwatson[AC_LANG_PUSH(Go)dnl 850243750SrwatsonAC_ARG_VAR([GOC], [Go compiler command])dnl 851243750SrwatsonAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 852243750Srwatson_AC_ARG_VAR_LDFLAGS()dnl 853243750SrwatsonAC_CHECK_TOOL(GOC, gccgo) 854243750Srwatsonif test -z "$GOC"; then 855243750Srwatson if test -n "$ac_tool_prefix"; then 856243750Srwatson AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 857243750Srwatson fi 858243750Srwatsonfi 859243750Srwatsonif test -z "$GOC"; then 860243750Srwatson AC_CHECK_PROG(GOC, gccgo, gccgo, false) 861243750Srwatsonfi 862243750Srwatson])#m4_defun 863243750Srwatson])#m4_ifndef 864243750Srwatson 865243750Srwatson 866243750Srwatson# _LT_LANG_DEFAULT_CONFIG 867243750Srwatson# ----------------------- 868243750Srwatsonm4_defun([_LT_LANG_DEFAULT_CONFIG], 869243750Srwatson[AC_PROVIDE_IFELSE([AC_PROG_CXX], 870243750Srwatson [LT_LANG(CXX)], 871243750Srwatson [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 872243750Srwatson 873243750SrwatsonAC_PROVIDE_IFELSE([AC_PROG_F77], 874243750Srwatson [LT_LANG(F77)], 875243750Srwatson [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 876243750Srwatson 877243750SrwatsonAC_PROVIDE_IFELSE([AC_PROG_FC], 878243750Srwatson [LT_LANG(FC)], 879243750Srwatson [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 880243750Srwatson 881243750Srwatsondnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 882243750Srwatsondnl pulling things in needlessly. 883243750SrwatsonAC_PROVIDE_IFELSE([AC_PROG_GCJ], 884243750Srwatson [LT_LANG(GCJ)], 885243750Srwatson [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 886243750Srwatson [LT_LANG(GCJ)], 887243750Srwatson [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 888243750Srwatson [LT_LANG(GCJ)], 889243750Srwatson [m4_ifdef([AC_PROG_GCJ], 890243750Srwatson [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 891243750Srwatson m4_ifdef([A][M_PROG_GCJ], 892243750Srwatson [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 893243750Srwatson m4_ifdef([LT_PROG_GCJ], 894243750Srwatson [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 895243750Srwatson 896243750SrwatsonAC_PROVIDE_IFELSE([AC_PROG_GO], 897243750Srwatson [LT_LANG(GO)], 898243750Srwatson [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 899243750Srwatson 900243750SrwatsonAC_PROVIDE_IFELSE([LT_PROG_RC], 901243750Srwatson [LT_LANG(RC)], 902243750Srwatson [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 903243750Srwatson])# _LT_LANG_DEFAULT_CONFIG 904243750Srwatson 905243750Srwatson# Obsolete macros: 906243750SrwatsonAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 907243750SrwatsonAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 908243750SrwatsonAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 909243750SrwatsonAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 910243750SrwatsonAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 911243750Srwatsondnl aclocal-1.4 backwards compatibility: 912243750Srwatsondnl AC_DEFUN([AC_LIBTOOL_CXX], []) 913243750Srwatsondnl AC_DEFUN([AC_LIBTOOL_F77], []) 914243750Srwatsondnl AC_DEFUN([AC_LIBTOOL_FC], []) 915243750Srwatsondnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 916243750Srwatsondnl AC_DEFUN([AC_LIBTOOL_RC], []) 917243750Srwatson 918243750Srwatson 919243750Srwatson# _LT_TAG_COMPILER 920243750Srwatson# ---------------- 921243750Srwatsonm4_defun([_LT_TAG_COMPILER], 922156283Srwatson[AC_REQUIRE([AC_PROG_CC])dnl 923156283Srwatson 924243750Srwatson_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 925243750Srwatson_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 926243750Srwatson_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 927243750Srwatson_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 928243750Srwatson 929156283Srwatson# If no C compiler was specified, use CC. 930156283SrwatsonLTCC=${LTCC-"$CC"} 931156283Srwatson 932173143Srwatson# If no C compiler flags were specified, use CFLAGS. 933173143SrwatsonLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 934173143Srwatson 935156283Srwatson# Allow CC to be a program name with arguments. 936156283Srwatsoncompiler=$CC 937243750Srwatson])# _LT_TAG_COMPILER 938156283Srwatson 939156283Srwatson 940156283Srwatson# _LT_COMPILER_BOILERPLATE 941156283Srwatson# ------------------------ 942156283Srwatson# Check for compiler boilerplate output or warnings with 943156283Srwatson# the simple compiler test code. 944243750Srwatsonm4_defun([_LT_COMPILER_BOILERPLATE], 945243750Srwatson[m4_require([_LT_DECL_SED])dnl 946173143Srwatsonac_outfile=conftest.$ac_objext 947173143Srwatsonecho "$lt_simple_compile_test_code" >conftest.$ac_ext 948173143Srwatsoneval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 949156283Srwatson_lt_compiler_boilerplate=`cat conftest.err` 950243750Srwatson$RM conftest* 951156283Srwatson])# _LT_COMPILER_BOILERPLATE 952156283Srwatson 953156283Srwatson 954156283Srwatson# _LT_LINKER_BOILERPLATE 955156283Srwatson# ---------------------- 956156283Srwatson# Check for linker boilerplate output or warnings with 957156283Srwatson# the simple link test code. 958243750Srwatsonm4_defun([_LT_LINKER_BOILERPLATE], 959243750Srwatson[m4_require([_LT_DECL_SED])dnl 960173143Srwatsonac_outfile=conftest.$ac_objext 961173143Srwatsonecho "$lt_simple_link_test_code" >conftest.$ac_ext 962173143Srwatsoneval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 963156283Srwatson_lt_linker_boilerplate=`cat conftest.err` 964243750Srwatson$RM -r conftest* 965156283Srwatson])# _LT_LINKER_BOILERPLATE 966156283Srwatson 967191273Srwatson# _LT_REQUIRED_DARWIN_CHECKS 968243750Srwatson# ------------------------- 969243750Srwatsonm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 970191273Srwatson case $host_os in 971191273Srwatson rhapsody* | darwin*) 972191273Srwatson AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 973191273Srwatson AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 974243750Srwatson AC_CHECK_TOOL([LIPO], [lipo], [:]) 975243750Srwatson AC_CHECK_TOOL([OTOOL], [otool], [:]) 976243750Srwatson AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 977243750Srwatson _LT_DECL([], [DSYMUTIL], [1], 978243750Srwatson [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 979243750Srwatson _LT_DECL([], [NMEDIT], [1], 980243750Srwatson [Tool to change global to local symbols on Mac OS X]) 981243750Srwatson _LT_DECL([], [LIPO], [1], 982243750Srwatson [Tool to manipulate fat objects and archives on Mac OS X]) 983243750Srwatson _LT_DECL([], [OTOOL], [1], 984243750Srwatson [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 985243750Srwatson _LT_DECL([], [OTOOL64], [1], 986243750Srwatson [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 987156283Srwatson 988191273Srwatson AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 989191273Srwatson [lt_cv_apple_cc_single_mod=no 990191273Srwatson if test -z "${LT_MULTI_MODULE}"; then 991243750Srwatson # By default we will add the -single_module flag. You can override 992243750Srwatson # by either setting the environment variable LT_MULTI_MODULE 993243750Srwatson # non-empty at configure time, or by adding -multi_module to the 994243750Srwatson # link flags. 995243750Srwatson rm -rf libconftest.dylib* 996243750Srwatson echo "int foo(void){return 1;}" > conftest.c 997243750Srwatson echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 998243750Srwatson-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 999243750Srwatson $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1000243750Srwatson -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1001243750Srwatson _lt_result=$? 1002243750Srwatson # If there is a non-empty error log, and "single_module" 1003243750Srwatson # appears in it, assume the flag caused a linker warning 1004243750Srwatson if test -s conftest.err && $GREP single_module conftest.err; then 1005243750Srwatson cat conftest.err >&AS_MESSAGE_LOG_FD 1006243750Srwatson # Otherwise, if the output was created with a 0 exit code from 1007243750Srwatson # the compiler, it worked. 1008243750Srwatson elif test -f libconftest.dylib && test $_lt_result -eq 0; then 1009243750Srwatson lt_cv_apple_cc_single_mod=yes 1010243750Srwatson else 1011243750Srwatson cat conftest.err >&AS_MESSAGE_LOG_FD 1012243750Srwatson fi 1013243750Srwatson rm -rf libconftest.dylib* 1014243750Srwatson rm -f conftest.* 1015191273Srwatson fi]) 1016243750Srwatson 1017191273Srwatson AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1018191273Srwatson [lt_cv_ld_exported_symbols_list], 1019191273Srwatson [lt_cv_ld_exported_symbols_list=no 1020191273Srwatson save_LDFLAGS=$LDFLAGS 1021191273Srwatson echo "_main" > conftest.sym 1022191273Srwatson LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1023191273Srwatson AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1024243750Srwatson [lt_cv_ld_exported_symbols_list=yes], 1025243750Srwatson [lt_cv_ld_exported_symbols_list=no]) 1026243750Srwatson LDFLAGS="$save_LDFLAGS" 1027191273Srwatson ]) 1028243750Srwatson 1029243750Srwatson AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1030243750Srwatson [lt_cv_ld_force_load=no 1031243750Srwatson cat > conftest.c << _LT_EOF 1032243750Srwatsonint forced_loaded() { return 2;} 1033243750Srwatson_LT_EOF 1034243750Srwatson echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1035243750Srwatson $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1036243750Srwatson echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1037243750Srwatson $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1038243750Srwatson echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1039243750Srwatson $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1040243750Srwatson cat > conftest.c << _LT_EOF 1041243750Srwatsonint main() { return 0;} 1042243750Srwatson_LT_EOF 1043243750Srwatson echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1044243750Srwatson $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1045243750Srwatson _lt_result=$? 1046243750Srwatson if test -s conftest.err && $GREP force_load conftest.err; then 1047243750Srwatson cat conftest.err >&AS_MESSAGE_LOG_FD 1048243750Srwatson elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1049243750Srwatson lt_cv_ld_force_load=yes 1050243750Srwatson else 1051243750Srwatson cat conftest.err >&AS_MESSAGE_LOG_FD 1052243750Srwatson fi 1053243750Srwatson rm -f conftest.err libconftest.a conftest conftest.c 1054243750Srwatson rm -rf conftest.dSYM 1055243750Srwatson ]) 1056191273Srwatson case $host_os in 1057243750Srwatson rhapsody* | darwin1.[[012]]) 1058191273Srwatson _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 1059191273Srwatson darwin1.*) 1060243750Srwatson _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1061243750Srwatson darwin*) # darwin 5.x on 1062191273Srwatson # if running on 10.5 or later, the deployment target defaults 1063191273Srwatson # to the OS version, if on x86, and 10.4, the deployment 1064191273Srwatson # target defaults to 10.4. Don't you love it? 1065191273Srwatson case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1066243750Srwatson 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1067243750Srwatson _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1068243750Srwatson 10.[[012]]*) 1069243750Srwatson _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1070243750Srwatson 10.*) 1071243750Srwatson _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1072191273Srwatson esac 1073191273Srwatson ;; 1074191273Srwatson esac 1075191273Srwatson if test "$lt_cv_apple_cc_single_mod" = "yes"; then 1076191273Srwatson _lt_dar_single_mod='$single_module' 1077191273Srwatson fi 1078191273Srwatson if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 1079191273Srwatson _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 1080191273Srwatson else 1081243750Srwatson _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 1082191273Srwatson fi 1083243750Srwatson if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1084243750Srwatson _lt_dsymutil='~$DSYMUTIL $lib || :' 1085191273Srwatson else 1086191273Srwatson _lt_dsymutil= 1087191273Srwatson fi 1088191273Srwatson ;; 1089191273Srwatson esac 1090191273Srwatson]) 1091191273Srwatson 1092243750Srwatson 1093243750Srwatson# _LT_DARWIN_LINKER_FEATURES([TAG]) 1094243750Srwatson# --------------------------------- 1095243750Srwatson# Checks for linker and compiler features on darwin 1096243750Srwatsonm4_defun([_LT_DARWIN_LINKER_FEATURES], 1097243750Srwatson[ 1098243750Srwatson m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1099243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1100243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=no 1101243750Srwatson _LT_TAGVAR(hardcode_automatic, $1)=yes 1102243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1103243750Srwatson if test "$lt_cv_ld_force_load" = "yes"; then 1104243750Srwatson _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\"`' 1105243750Srwatson m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1106243750Srwatson [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1107243750Srwatson else 1108243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1109243750Srwatson fi 1110243750Srwatson _LT_TAGVAR(link_all_deplibs, $1)=yes 1111243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1112243750Srwatson case $cc_basename in 1113243750Srwatson ifort*) _lt_dar_can_shared=yes ;; 1114243750Srwatson *) _lt_dar_can_shared=$GCC ;; 1115243750Srwatson esac 1116243750Srwatson if test "$_lt_dar_can_shared" = "yes"; then 1117243750Srwatson output_verbose_link_cmd=func_echo_all 1118243750Srwatson _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}" 1119243750Srwatson _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1120243750Srwatson _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}" 1121243750Srwatson _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}" 1122243750Srwatson m4_if([$1], [CXX], 1123243750Srwatson[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1124243750Srwatson _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}" 1125243750Srwatson _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}" 1126243750Srwatson fi 1127243750Srwatson],[]) 1128243750Srwatson else 1129243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 1130243750Srwatson fi 1131243750Srwatson]) 1132243750Srwatson 1133243750Srwatson# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1134243750Srwatson# ---------------------------------- 1135156283Srwatson# Links a minimal program and checks the executable 1136156283Srwatson# for the system default hardcoded library path. In most cases, 1137156283Srwatson# this is /usr/lib:/lib, but when the MPI compilers are used 1138156283Srwatson# the location of the communication and MPI libs are included too. 1139156283Srwatson# If we don't find anything, use the default library path according 1140156283Srwatson# to the aix ld manual. 1141243750Srwatson# Store the results from the different compilers for each TAGNAME. 1142243750Srwatson# Allow to override them for all tags through lt_cv_aix_libpath. 1143243750Srwatsonm4_defun([_LT_SYS_MODULE_PATH_AIX], 1144243750Srwatson[m4_require([_LT_DECL_SED])dnl 1145243750Srwatsonif test "${lt_cv_aix_libpath+set}" = set; then 1146243750Srwatson aix_libpath=$lt_cv_aix_libpath 1147243750Srwatsonelse 1148243750Srwatson AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1149243750Srwatson [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1150243750Srwatson lt_aix_libpath_sed='[ 1151243750Srwatson /Import File Strings/,/^$/ { 1152243750Srwatson /^0/ { 1153243750Srwatson s/^0 *\([^ ]*\) *$/\1/ 1154243750Srwatson p 1155243750Srwatson } 1156243750Srwatson }]' 1157243750Srwatson _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1158243750Srwatson # Check for a 64-bit object if we didn't find anything. 1159243750Srwatson if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1160243750Srwatson _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1161243750Srwatson fi],[]) 1162243750Srwatson if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1163243750Srwatson _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1164243750Srwatson fi 1165243750Srwatson ]) 1166243750Srwatson aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1167243750Srwatsonfi 1168243750Srwatson])# _LT_SYS_MODULE_PATH_AIX 1169156283Srwatson 1170156283Srwatson 1171243750Srwatson# _LT_SHELL_INIT(ARG) 1172243750Srwatson# ------------------- 1173243750Srwatsonm4_define([_LT_SHELL_INIT], 1174243750Srwatson[m4_divert_text([M4SH-INIT], [$1 1175243750Srwatson])])# _LT_SHELL_INIT 1176156283Srwatson 1177156283Srwatson 1178156283Srwatson 1179243750Srwatson# _LT_PROG_ECHO_BACKSLASH 1180243750Srwatson# ----------------------- 1181243750Srwatson# Find how we can fake an echo command that does not interpret backslash. 1182243750Srwatson# In particular, with Autoconf 2.60 or later we add some code to the start 1183243750Srwatson# of the generated configure script which will find a shell with a builtin 1184243750Srwatson# printf (which we can use as an echo command). 1185243750Srwatsonm4_defun([_LT_PROG_ECHO_BACKSLASH], 1186243750Srwatson[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1187243750SrwatsonECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1188243750SrwatsonECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1189156283Srwatson 1190243750SrwatsonAC_MSG_CHECKING([how to print strings]) 1191243750Srwatson# Test print first, because it will be a builtin if present. 1192243750Srwatsonif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1193243750Srwatson test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1194243750Srwatson ECHO='print -r --' 1195243750Srwatsonelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1196243750Srwatson ECHO='printf %s\n' 1197156283Srwatsonelse 1198243750Srwatson # Use this function as a fallback that always works. 1199243750Srwatson func_fallback_echo () 1200243750Srwatson { 1201243750Srwatson eval 'cat <<_LTECHO_EOF 1202243750Srwatson$[]1 1203243750Srwatson_LTECHO_EOF' 1204243750Srwatson } 1205243750Srwatson ECHO='func_fallback_echo' 1206156283Srwatsonfi 1207156283Srwatson 1208243750Srwatson# func_echo_all arg... 1209243750Srwatson# Invoke $ECHO with all args, space-separated. 1210243750Srwatsonfunc_echo_all () 1211243750Srwatson{ 1212243750Srwatson $ECHO "$*" 1213243750Srwatson} 1214156283Srwatson 1215243750Srwatsoncase "$ECHO" in 1216243750Srwatson printf*) AC_MSG_RESULT([printf]) ;; 1217243750Srwatson print*) AC_MSG_RESULT([print -r]) ;; 1218243750Srwatson *) AC_MSG_RESULT([cat]) ;; 1219243750Srwatsonesac 1220156283Srwatson 1221243750Srwatsonm4_ifdef([_AS_DETECT_SUGGESTED], 1222243750Srwatson[_AS_DETECT_SUGGESTED([ 1223243750Srwatson test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1224243750Srwatson ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1225243750Srwatson ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1226243750Srwatson ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1227243750Srwatson PATH=/empty FPATH=/empty; export PATH FPATH 1228243750Srwatson test "X`printf %s $ECHO`" = "X$ECHO" \ 1229243750Srwatson || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1230156283Srwatson 1231243750Srwatson_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1232243750Srwatson_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1233243750Srwatson])# _LT_PROG_ECHO_BACKSLASH 1234156283Srwatson 1235156283Srwatson 1236243750Srwatson# _LT_WITH_SYSROOT 1237243750Srwatson# ---------------- 1238243750SrwatsonAC_DEFUN([_LT_WITH_SYSROOT], 1239243750Srwatson[AC_MSG_CHECKING([for sysroot]) 1240243750SrwatsonAC_ARG_WITH([sysroot], 1241243750Srwatson[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1242243750Srwatson (or the compiler's sysroot if not specified).], 1243243750Srwatson[], [with_sysroot=no]) 1244156283Srwatson 1245243750Srwatsondnl lt_sysroot will always be passed unquoted. We quote it here 1246243750Srwatsondnl in case the user passed a directory name. 1247243750Srwatsonlt_sysroot= 1248243750Srwatsoncase ${with_sysroot} in #( 1249243750Srwatson yes) 1250243750Srwatson if test "$GCC" = yes; then 1251243750Srwatson lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1252243750Srwatson fi 1253243750Srwatson ;; #( 1254243750Srwatson /*) 1255243750Srwatson lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1256243750Srwatson ;; #( 1257243750Srwatson no|'') 1258243750Srwatson ;; #( 1259243750Srwatson *) 1260243750Srwatson AC_MSG_RESULT([${with_sysroot}]) 1261243750Srwatson AC_MSG_ERROR([The sysroot must be an absolute path.]) 1262243750Srwatson ;; 1263243750Srwatsonesac 1264156283Srwatson 1265243750Srwatson AC_MSG_RESULT([${lt_sysroot:-no}]) 1266243750Srwatson_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1267243750Srwatson[dependent libraries, and in which our libraries should be installed.])]) 1268156283Srwatson 1269243750Srwatson# _LT_ENABLE_LOCK 1270243750Srwatson# --------------- 1271243750Srwatsonm4_defun([_LT_ENABLE_LOCK], 1272156283Srwatson[AC_ARG_ENABLE([libtool-lock], 1273243750Srwatson [AS_HELP_STRING([--disable-libtool-lock], 1274243750Srwatson [avoid locking (might break parallel builds)])]) 1275156283Srwatsontest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1276156283Srwatson 1277156283Srwatson# Some flags need to be propagated to the compiler or linker for good 1278156283Srwatson# libtool support. 1279156283Srwatsoncase $host in 1280156283Srwatsonia64-*-hpux*) 1281156283Srwatson # Find out which ABI we are using. 1282156283Srwatson echo 'int i;' > conftest.$ac_ext 1283156283Srwatson if AC_TRY_EVAL(ac_compile); then 1284156283Srwatson case `/usr/bin/file conftest.$ac_objext` in 1285243750Srwatson *ELF-32*) 1286243750Srwatson HPUX_IA64_MODE="32" 1287243750Srwatson ;; 1288243750Srwatson *ELF-64*) 1289243750Srwatson HPUX_IA64_MODE="64" 1290243750Srwatson ;; 1291156283Srwatson esac 1292156283Srwatson fi 1293156283Srwatson rm -rf conftest* 1294156283Srwatson ;; 1295156283Srwatson*-*-irix6*) 1296156283Srwatson # Find out which ABI we are using. 1297243750Srwatson echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1298156283Srwatson if AC_TRY_EVAL(ac_compile); then 1299243750Srwatson if test "$lt_cv_prog_gnu_ld" = yes; then 1300243750Srwatson case `/usr/bin/file conftest.$ac_objext` in 1301243750Srwatson *32-bit*) 1302243750Srwatson LD="${LD-ld} -melf32bsmip" 1303243750Srwatson ;; 1304243750Srwatson *N32*) 1305243750Srwatson LD="${LD-ld} -melf32bmipn32" 1306243750Srwatson ;; 1307243750Srwatson *64-bit*) 1308243750Srwatson LD="${LD-ld} -melf64bmip" 1309243750Srwatson ;; 1310243750Srwatson esac 1311243750Srwatson else 1312243750Srwatson case `/usr/bin/file conftest.$ac_objext` in 1313243750Srwatson *32-bit*) 1314243750Srwatson LD="${LD-ld} -32" 1315243750Srwatson ;; 1316243750Srwatson *N32*) 1317243750Srwatson LD="${LD-ld} -n32" 1318243750Srwatson ;; 1319243750Srwatson *64-bit*) 1320243750Srwatson LD="${LD-ld} -64" 1321243750Srwatson ;; 1322243750Srwatson esac 1323243750Srwatson fi 1324156283Srwatson fi 1325156283Srwatson rm -rf conftest* 1326156283Srwatson ;; 1327156283Srwatson 1328173143Srwatsonx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1329243750Srwatsons390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1330156283Srwatson # Find out which ABI we are using. 1331156283Srwatson echo 'int i;' > conftest.$ac_ext 1332156283Srwatson if AC_TRY_EVAL(ac_compile); then 1333156283Srwatson case `/usr/bin/file conftest.o` in 1334243750Srwatson *32-bit*) 1335243750Srwatson case $host in 1336243750Srwatson x86_64-*kfreebsd*-gnu) 1337243750Srwatson LD="${LD-ld} -m elf_i386_fbsd" 1338243750Srwatson ;; 1339243750Srwatson x86_64-*linux*) 1340243750Srwatson LD="${LD-ld} -m elf_i386" 1341243750Srwatson ;; 1342243750Srwatson ppc64-*linux*|powerpc64-*linux*) 1343243750Srwatson LD="${LD-ld} -m elf32ppclinux" 1344243750Srwatson ;; 1345243750Srwatson s390x-*linux*) 1346243750Srwatson LD="${LD-ld} -m elf_s390" 1347243750Srwatson ;; 1348243750Srwatson sparc64-*linux*) 1349243750Srwatson LD="${LD-ld} -m elf32_sparc" 1350243750Srwatson ;; 1351243750Srwatson esac 1352243750Srwatson ;; 1353243750Srwatson *64-bit*) 1354243750Srwatson case $host in 1355243750Srwatson x86_64-*kfreebsd*-gnu) 1356243750Srwatson LD="${LD-ld} -m elf_x86_64_fbsd" 1357243750Srwatson ;; 1358243750Srwatson x86_64-*linux*) 1359243750Srwatson LD="${LD-ld} -m elf_x86_64" 1360243750Srwatson ;; 1361243750Srwatson ppc*-*linux*|powerpc*-*linux*) 1362243750Srwatson LD="${LD-ld} -m elf64ppc" 1363243750Srwatson ;; 1364243750Srwatson s390*-*linux*|s390*-*tpf*) 1365243750Srwatson LD="${LD-ld} -m elf64_s390" 1366243750Srwatson ;; 1367243750Srwatson sparc*-*linux*) 1368243750Srwatson LD="${LD-ld} -m elf64_sparc" 1369243750Srwatson ;; 1370243750Srwatson esac 1371243750Srwatson ;; 1372156283Srwatson esac 1373156283Srwatson fi 1374156283Srwatson rm -rf conftest* 1375156283Srwatson ;; 1376156283Srwatson 1377156283Srwatson*-*-sco3.2v5*) 1378156283Srwatson # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1379156283Srwatson SAVE_CFLAGS="$CFLAGS" 1380156283Srwatson CFLAGS="$CFLAGS -belf" 1381156283Srwatson AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1382156283Srwatson [AC_LANG_PUSH(C) 1383243750Srwatson AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1384156283Srwatson AC_LANG_POP]) 1385156283Srwatson if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1386156283Srwatson # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1387156283Srwatson CFLAGS="$SAVE_CFLAGS" 1388156283Srwatson fi 1389156283Srwatson ;; 1390243750Srwatson*-*solaris*) 1391173143Srwatson # Find out which ABI we are using. 1392173143Srwatson echo 'int i;' > conftest.$ac_ext 1393173143Srwatson if AC_TRY_EVAL(ac_compile); then 1394173143Srwatson case `/usr/bin/file conftest.o` in 1395173143Srwatson *64-bit*) 1396173143Srwatson case $lt_cv_prog_gnu_ld in 1397243750Srwatson yes*) 1398243750Srwatson case $host in 1399243750Srwatson i?86-*-solaris*) 1400243750Srwatson LD="${LD-ld} -m elf_x86_64" 1401243750Srwatson ;; 1402243750Srwatson sparc*-*-solaris*) 1403243750Srwatson LD="${LD-ld} -m elf64_sparc" 1404243750Srwatson ;; 1405243750Srwatson esac 1406243750Srwatson # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1407243750Srwatson if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1408243750Srwatson LD="${LD-ld}_sol2" 1409243750Srwatson fi 1410243750Srwatson ;; 1411191273Srwatson *) 1412243750Srwatson if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1413191273Srwatson LD="${LD-ld} -64" 1414191273Srwatson fi 1415191273Srwatson ;; 1416173143Srwatson esac 1417173143Srwatson ;; 1418173143Srwatson esac 1419173143Srwatson fi 1420173143Srwatson rm -rf conftest* 1421173143Srwatson ;; 1422156283Srwatsonesac 1423156283Srwatson 1424156283Srwatsonneed_locks="$enable_libtool_lock" 1425243750Srwatson])# _LT_ENABLE_LOCK 1426156283Srwatson 1427156283Srwatson 1428243750Srwatson# _LT_PROG_AR 1429243750Srwatson# ----------- 1430243750Srwatsonm4_defun([_LT_PROG_AR], 1431243750Srwatson[AC_CHECK_TOOLS(AR, [ar], false) 1432243750Srwatson: ${AR=ar} 1433243750Srwatson: ${AR_FLAGS=cru} 1434243750Srwatson_LT_DECL([], [AR], [1], [The archiver]) 1435243750Srwatson_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1436156283Srwatson 1437243750SrwatsonAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1438243750Srwatson [lt_cv_ar_at_file=no 1439243750Srwatson AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1440243750Srwatson [echo conftest.$ac_objext > conftest.lst 1441243750Srwatson lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1442243750Srwatson AC_TRY_EVAL([lt_ar_try]) 1443243750Srwatson if test "$ac_status" -eq 0; then 1444243750Srwatson # Ensure the archiver fails upon bogus file names. 1445243750Srwatson rm -f conftest.$ac_objext libconftest.a 1446243750Srwatson AC_TRY_EVAL([lt_ar_try]) 1447243750Srwatson if test "$ac_status" -ne 0; then 1448243750Srwatson lt_cv_ar_at_file=@ 1449243750Srwatson fi 1450243750Srwatson fi 1451243750Srwatson rm -f conftest.* libconftest.a 1452243750Srwatson ]) 1453243750Srwatson ]) 1454243750Srwatson 1455243750Srwatsonif test "x$lt_cv_ar_at_file" = xno; then 1456243750Srwatson archiver_list_spec= 1457243750Srwatsonelse 1458243750Srwatson archiver_list_spec=$lt_cv_ar_at_file 1459243750Srwatsonfi 1460243750Srwatson_LT_DECL([], [archiver_list_spec], [1], 1461243750Srwatson [How to feed a file listing to the archiver]) 1462243750Srwatson])# _LT_PROG_AR 1463243750Srwatson 1464243750Srwatson 1465243750Srwatson# _LT_CMD_OLD_ARCHIVE 1466243750Srwatson# ------------------- 1467243750Srwatsonm4_defun([_LT_CMD_OLD_ARCHIVE], 1468243750Srwatson[_LT_PROG_AR 1469243750Srwatson 1470243750SrwatsonAC_CHECK_TOOL(STRIP, strip, :) 1471243750Srwatsontest -z "$STRIP" && STRIP=: 1472243750Srwatson_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1473243750Srwatson 1474243750SrwatsonAC_CHECK_TOOL(RANLIB, ranlib, :) 1475243750Srwatsontest -z "$RANLIB" && RANLIB=: 1476243750Srwatson_LT_DECL([], [RANLIB], [1], 1477243750Srwatson [Commands used to install an old-style archive]) 1478243750Srwatson 1479243750Srwatson# Determine commands to create old-style static archives. 1480243750Srwatsonold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1481243750Srwatsonold_postinstall_cmds='chmod 644 $oldlib' 1482243750Srwatsonold_postuninstall_cmds= 1483243750Srwatson 1484243750Srwatsonif test -n "$RANLIB"; then 1485243750Srwatson case $host_os in 1486243750Srwatson openbsd*) 1487243750Srwatson old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1488243750Srwatson ;; 1489243750Srwatson *) 1490243750Srwatson old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1491243750Srwatson ;; 1492243750Srwatson esac 1493243750Srwatson old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1494243750Srwatsonfi 1495243750Srwatson 1496243750Srwatsoncase $host_os in 1497243750Srwatson darwin*) 1498243750Srwatson lock_old_archive_extraction=yes ;; 1499243750Srwatson *) 1500243750Srwatson lock_old_archive_extraction=no ;; 1501243750Srwatsonesac 1502243750Srwatson_LT_DECL([], [old_postinstall_cmds], [2]) 1503243750Srwatson_LT_DECL([], [old_postuninstall_cmds], [2]) 1504243750Srwatson_LT_TAGDECL([], [old_archive_cmds], [2], 1505243750Srwatson [Commands used to build an old-style archive]) 1506243750Srwatson_LT_DECL([], [lock_old_archive_extraction], [0], 1507243750Srwatson [Whether to use a lock for old archive extraction]) 1508243750Srwatson])# _LT_CMD_OLD_ARCHIVE 1509243750Srwatson 1510243750Srwatson 1511243750Srwatson# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1512156283Srwatson# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1513156283Srwatson# ---------------------------------------------------------------- 1514156283Srwatson# Check whether the given compiler option works 1515243750SrwatsonAC_DEFUN([_LT_COMPILER_OPTION], 1516243750Srwatson[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1517243750Srwatsonm4_require([_LT_DECL_SED])dnl 1518156283SrwatsonAC_CACHE_CHECK([$1], [$2], 1519156283Srwatson [$2=no 1520243750Srwatson m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1521173143Srwatson echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1522156283Srwatson lt_compiler_flag="$3" 1523156283Srwatson # Insert the option either (1) after the last *FLAGS variable, or 1524156283Srwatson # (2) before a word containing "conftest.", or (3) at the end. 1525156283Srwatson # Note that $ac_compile itself does not contain backslashes and begins 1526156283Srwatson # with a dollar sign (not a hyphen), so the echo should work correctly. 1527156283Srwatson # The option is referenced via a variable to avoid confusing sed. 1528156283Srwatson lt_compile=`echo "$ac_compile" | $SED \ 1529156283Srwatson -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1530156283Srwatson -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1531156283Srwatson -e 's:$: $lt_compiler_flag:'` 1532243750Srwatson (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1533156283Srwatson (eval "$lt_compile" 2>conftest.err) 1534156283Srwatson ac_status=$? 1535156283Srwatson cat conftest.err >&AS_MESSAGE_LOG_FD 1536243750Srwatson echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1537156283Srwatson if (exit $ac_status) && test -s "$ac_outfile"; then 1538156283Srwatson # The compiler can only warn and ignore the option if not recognized 1539156283Srwatson # So say no if there are warnings other than the usual output. 1540243750Srwatson $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1541173143Srwatson $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1542173143Srwatson if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1543156283Srwatson $2=yes 1544156283Srwatson fi 1545156283Srwatson fi 1546243750Srwatson $RM conftest* 1547156283Srwatson]) 1548156283Srwatson 1549156283Srwatsonif test x"[$]$2" = xyes; then 1550243750Srwatson m4_if([$5], , :, [$5]) 1551156283Srwatsonelse 1552243750Srwatson m4_if([$6], , :, [$6]) 1553156283Srwatsonfi 1554243750Srwatson])# _LT_COMPILER_OPTION 1555156283Srwatson 1556243750Srwatson# Old name: 1557243750SrwatsonAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1558243750Srwatsondnl aclocal-1.4 backwards compatibility: 1559243750Srwatsondnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1560156283Srwatson 1561243750Srwatson 1562243750Srwatson# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1563243750Srwatson# [ACTION-SUCCESS], [ACTION-FAILURE]) 1564243750Srwatson# ---------------------------------------------------- 1565243750Srwatson# Check whether the given linker option works 1566243750SrwatsonAC_DEFUN([_LT_LINKER_OPTION], 1567243750Srwatson[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1568243750Srwatsonm4_require([_LT_DECL_SED])dnl 1569173143SrwatsonAC_CACHE_CHECK([$1], [$2], 1570156283Srwatson [$2=no 1571156283Srwatson save_LDFLAGS="$LDFLAGS" 1572156283Srwatson LDFLAGS="$LDFLAGS $3" 1573173143Srwatson echo "$lt_simple_link_test_code" > conftest.$ac_ext 1574156283Srwatson if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1575156283Srwatson # The linker can only warn and ignore the option if not recognized 1576156283Srwatson # So say no if there are warnings 1577156283Srwatson if test -s conftest.err; then 1578156283Srwatson # Append any errors to the config.log. 1579156283Srwatson cat conftest.err 1>&AS_MESSAGE_LOG_FD 1580243750Srwatson $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1581173143Srwatson $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1582156283Srwatson if diff conftest.exp conftest.er2 >/dev/null; then 1583156283Srwatson $2=yes 1584156283Srwatson fi 1585156283Srwatson else 1586156283Srwatson $2=yes 1587156283Srwatson fi 1588156283Srwatson fi 1589243750Srwatson $RM -r conftest* 1590156283Srwatson LDFLAGS="$save_LDFLAGS" 1591156283Srwatson]) 1592156283Srwatson 1593156283Srwatsonif test x"[$]$2" = xyes; then 1594243750Srwatson m4_if([$4], , :, [$4]) 1595156283Srwatsonelse 1596243750Srwatson m4_if([$5], , :, [$5]) 1597156283Srwatsonfi 1598243750Srwatson])# _LT_LINKER_OPTION 1599156283Srwatson 1600243750Srwatson# Old name: 1601243750SrwatsonAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1602243750Srwatsondnl aclocal-1.4 backwards compatibility: 1603243750Srwatsondnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1604156283Srwatson 1605243750Srwatson 1606243750Srwatson# LT_CMD_MAX_LEN 1607243750Srwatson#--------------- 1608243750SrwatsonAC_DEFUN([LT_CMD_MAX_LEN], 1609243750Srwatson[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1610243750Srwatson# find the maximum length of command line arguments 1611156283SrwatsonAC_MSG_CHECKING([the maximum length of command line arguments]) 1612156283SrwatsonAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1613156283Srwatson i=0 1614156283Srwatson teststring="ABCD" 1615156283Srwatson 1616156283Srwatson case $build_os in 1617156283Srwatson msdosdjgpp*) 1618156283Srwatson # On DJGPP, this test can blow up pretty badly due to problems in libc 1619156283Srwatson # (any single argument exceeding 2000 bytes causes a buffer overrun 1620156283Srwatson # during glob expansion). Even if it were fixed, the result of this 1621156283Srwatson # check would be larger than it should be. 1622156283Srwatson lt_cv_sys_max_cmd_len=12288; # 12K is about right 1623156283Srwatson ;; 1624156283Srwatson 1625156283Srwatson gnu*) 1626156283Srwatson # Under GNU Hurd, this test is not required because there is 1627156283Srwatson # no limit to the length of command line arguments. 1628156283Srwatson # Libtool will interpret -1 as no limit whatsoever 1629156283Srwatson lt_cv_sys_max_cmd_len=-1; 1630156283Srwatson ;; 1631156283Srwatson 1632243750Srwatson cygwin* | mingw* | cegcc*) 1633156283Srwatson # On Win9x/ME, this test blows up -- it succeeds, but takes 1634156283Srwatson # about 5 minutes as the teststring grows exponentially. 1635156283Srwatson # Worse, since 9x/ME are not pre-emptively multitasking, 1636156283Srwatson # you end up with a "frozen" computer, even though with patience 1637156283Srwatson # the test eventually succeeds (with a max line length of 256k). 1638156283Srwatson # Instead, let's just punt: use the minimum linelength reported by 1639156283Srwatson # all of the supported platforms: 8192 (on NT/2K/XP). 1640156283Srwatson lt_cv_sys_max_cmd_len=8192; 1641156283Srwatson ;; 1642156283Srwatson 1643243750Srwatson mint*) 1644243750Srwatson # On MiNT this can take a long time and run out of memory. 1645243750Srwatson lt_cv_sys_max_cmd_len=8192; 1646243750Srwatson ;; 1647243750Srwatson 1648156283Srwatson amigaos*) 1649156283Srwatson # On AmigaOS with pdksh, this test takes hours, literally. 1650156283Srwatson # So we just punt and use a minimum line length of 8192. 1651156283Srwatson lt_cv_sys_max_cmd_len=8192; 1652156283Srwatson ;; 1653156283Srwatson 1654156283Srwatson netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1655156283Srwatson # This has been around since 386BSD, at least. Likely further. 1656156283Srwatson if test -x /sbin/sysctl; then 1657156283Srwatson lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1658156283Srwatson elif test -x /usr/sbin/sysctl; then 1659156283Srwatson lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1660156283Srwatson else 1661156283Srwatson lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1662156283Srwatson fi 1663156283Srwatson # And add a safety zone 1664156283Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1665156283Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1666156283Srwatson ;; 1667173143Srwatson 1668173143Srwatson interix*) 1669173143Srwatson # We know the value 262144 and hardcode it with a safety zone (like BSD) 1670173143Srwatson lt_cv_sys_max_cmd_len=196608 1671173143Srwatson ;; 1672173143Srwatson 1673243750Srwatson os2*) 1674243750Srwatson # The test takes a long time on OS/2. 1675243750Srwatson lt_cv_sys_max_cmd_len=8192 1676243750Srwatson ;; 1677243750Srwatson 1678156283Srwatson osf*) 1679156283Srwatson # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1680156283Srwatson # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1681156283Srwatson # nice to cause kernel panics so lets avoid the loop below. 1682156283Srwatson # First set a reasonable default. 1683156283Srwatson lt_cv_sys_max_cmd_len=16384 1684156283Srwatson # 1685156283Srwatson if test -x /sbin/sysconfig; then 1686156283Srwatson case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1687156283Srwatson *1*) lt_cv_sys_max_cmd_len=-1 ;; 1688156283Srwatson esac 1689156283Srwatson fi 1690156283Srwatson ;; 1691173143Srwatson sco3.2v5*) 1692173143Srwatson lt_cv_sys_max_cmd_len=102400 1693173143Srwatson ;; 1694173143Srwatson sysv5* | sco5v6* | sysv4.2uw2*) 1695173143Srwatson kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1696173143Srwatson if test -n "$kargmax"; then 1697243750Srwatson lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1698173143Srwatson else 1699173143Srwatson lt_cv_sys_max_cmd_len=32768 1700173143Srwatson fi 1701173143Srwatson ;; 1702156283Srwatson *) 1703173143Srwatson lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1704173143Srwatson if test -n "$lt_cv_sys_max_cmd_len"; then 1705173143Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1706173143Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1707173143Srwatson else 1708243750Srwatson # Make teststring a little bigger before we do anything with it. 1709243750Srwatson # a 1K string should be a reasonable start. 1710243750Srwatson for i in 1 2 3 4 5 6 7 8 ; do 1711243750Srwatson teststring=$teststring$teststring 1712243750Srwatson done 1713173143Srwatson SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1714243750Srwatson # If test is not a shell built-in, we'll probably end up computing a 1715243750Srwatson # maximum length that is only half of the actual maximum length, but 1716243750Srwatson # we can't tell. 1717243750Srwatson while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1718243750Srwatson = "X$teststring$teststring"; } >/dev/null 2>&1 && 1719173143Srwatson test $i != 17 # 1/2 MB should be enough 1720173143Srwatson do 1721173143Srwatson i=`expr $i + 1` 1722173143Srwatson teststring=$teststring$teststring 1723173143Srwatson done 1724243750Srwatson # Only check the string length outside the loop. 1725243750Srwatson lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1726173143Srwatson teststring= 1727243750Srwatson # Add a significant safety factor because C++ compilers can tack on 1728243750Srwatson # massive amounts of additional arguments before passing them to the 1729243750Srwatson # linker. It appears as though 1/2 is a usable value. 1730173143Srwatson lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1731173143Srwatson fi 1732156283Srwatson ;; 1733156283Srwatson esac 1734156283Srwatson]) 1735156283Srwatsonif test -n $lt_cv_sys_max_cmd_len ; then 1736156283Srwatson AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1737156283Srwatsonelse 1738156283Srwatson AC_MSG_RESULT(none) 1739156283Srwatsonfi 1740243750Srwatsonmax_cmd_len=$lt_cv_sys_max_cmd_len 1741243750Srwatson_LT_DECL([], [max_cmd_len], [0], 1742243750Srwatson [What is the maximum length of a command?]) 1743243750Srwatson])# LT_CMD_MAX_LEN 1744156283Srwatson 1745243750Srwatson# Old name: 1746243750SrwatsonAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1747243750Srwatsondnl aclocal-1.4 backwards compatibility: 1748243750Srwatsondnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1749156283Srwatson 1750156283Srwatson 1751243750Srwatson# _LT_HEADER_DLFCN 1752243750Srwatson# ---------------- 1753243750Srwatsonm4_defun([_LT_HEADER_DLFCN], 1754243750Srwatson[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1755243750Srwatson])# _LT_HEADER_DLFCN 1756156283Srwatson 1757243750Srwatson 1758243750Srwatson# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1759243750Srwatson# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1760243750Srwatson# ---------------------------------------------------------------- 1761243750Srwatsonm4_defun([_LT_TRY_DLOPEN_SELF], 1762243750Srwatson[m4_require([_LT_HEADER_DLFCN])dnl 1763156283Srwatsonif test "$cross_compiling" = yes; then : 1764156283Srwatson [$4] 1765156283Srwatsonelse 1766156283Srwatson lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1767156283Srwatson lt_status=$lt_dlunknown 1768243750Srwatson cat > conftest.$ac_ext <<_LT_EOF 1769243750Srwatson[#line $LINENO "configure" 1770156283Srwatson#include "confdefs.h" 1771156283Srwatson 1772156283Srwatson#if HAVE_DLFCN_H 1773156283Srwatson#include <dlfcn.h> 1774156283Srwatson#endif 1775156283Srwatson 1776156283Srwatson#include <stdio.h> 1777156283Srwatson 1778156283Srwatson#ifdef RTLD_GLOBAL 1779156283Srwatson# define LT_DLGLOBAL RTLD_GLOBAL 1780156283Srwatson#else 1781156283Srwatson# ifdef DL_GLOBAL 1782156283Srwatson# define LT_DLGLOBAL DL_GLOBAL 1783156283Srwatson# else 1784156283Srwatson# define LT_DLGLOBAL 0 1785156283Srwatson# endif 1786156283Srwatson#endif 1787156283Srwatson 1788156283Srwatson/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1789156283Srwatson find out it does not work in some platform. */ 1790156283Srwatson#ifndef LT_DLLAZY_OR_NOW 1791156283Srwatson# ifdef RTLD_LAZY 1792156283Srwatson# define LT_DLLAZY_OR_NOW RTLD_LAZY 1793156283Srwatson# else 1794156283Srwatson# ifdef DL_LAZY 1795156283Srwatson# define LT_DLLAZY_OR_NOW DL_LAZY 1796156283Srwatson# else 1797156283Srwatson# ifdef RTLD_NOW 1798156283Srwatson# define LT_DLLAZY_OR_NOW RTLD_NOW 1799156283Srwatson# else 1800156283Srwatson# ifdef DL_NOW 1801156283Srwatson# define LT_DLLAZY_OR_NOW DL_NOW 1802156283Srwatson# else 1803156283Srwatson# define LT_DLLAZY_OR_NOW 0 1804156283Srwatson# endif 1805156283Srwatson# endif 1806156283Srwatson# endif 1807156283Srwatson# endif 1808156283Srwatson#endif 1809156283Srwatson 1810243750Srwatson/* When -fvisbility=hidden is used, assume the code has been annotated 1811243750Srwatson correspondingly for the symbols needed. */ 1812243750Srwatson#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1813243750Srwatsonint fnord () __attribute__((visibility("default"))); 1814156283Srwatson#endif 1815156283Srwatson 1816243750Srwatsonint fnord () { return 42; } 1817156283Srwatsonint main () 1818156283Srwatson{ 1819156283Srwatson void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1820156283Srwatson int status = $lt_dlunknown; 1821156283Srwatson 1822156283Srwatson if (self) 1823156283Srwatson { 1824156283Srwatson if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1825243750Srwatson else 1826243750Srwatson { 1827243750Srwatson if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1828243750Srwatson else puts (dlerror ()); 1829243750Srwatson } 1830156283Srwatson /* dlclose (self); */ 1831156283Srwatson } 1832173143Srwatson else 1833173143Srwatson puts (dlerror ()); 1834156283Srwatson 1835243750Srwatson return status; 1836156283Srwatson}] 1837243750Srwatson_LT_EOF 1838156283Srwatson if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1839156283Srwatson (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1840156283Srwatson lt_status=$? 1841156283Srwatson case x$lt_status in 1842156283Srwatson x$lt_dlno_uscore) $1 ;; 1843156283Srwatson x$lt_dlneed_uscore) $2 ;; 1844173143Srwatson x$lt_dlunknown|x*) $3 ;; 1845156283Srwatson esac 1846156283Srwatson else : 1847156283Srwatson # compilation failed 1848156283Srwatson $3 1849156283Srwatson fi 1850156283Srwatsonfi 1851156283Srwatsonrm -fr conftest* 1852243750Srwatson])# _LT_TRY_DLOPEN_SELF 1853156283Srwatson 1854156283Srwatson 1855243750Srwatson# LT_SYS_DLOPEN_SELF 1856243750Srwatson# ------------------ 1857243750SrwatsonAC_DEFUN([LT_SYS_DLOPEN_SELF], 1858243750Srwatson[m4_require([_LT_HEADER_DLFCN])dnl 1859156283Srwatsonif test "x$enable_dlopen" != xyes; then 1860156283Srwatson enable_dlopen=unknown 1861156283Srwatson enable_dlopen_self=unknown 1862156283Srwatson enable_dlopen_self_static=unknown 1863156283Srwatsonelse 1864156283Srwatson lt_cv_dlopen=no 1865156283Srwatson lt_cv_dlopen_libs= 1866156283Srwatson 1867156283Srwatson case $host_os in 1868156283Srwatson beos*) 1869156283Srwatson lt_cv_dlopen="load_add_on" 1870156283Srwatson lt_cv_dlopen_libs= 1871156283Srwatson lt_cv_dlopen_self=yes 1872156283Srwatson ;; 1873156283Srwatson 1874243750Srwatson mingw* | pw32* | cegcc*) 1875156283Srwatson lt_cv_dlopen="LoadLibrary" 1876156283Srwatson lt_cv_dlopen_libs= 1877243750Srwatson ;; 1878156283Srwatson 1879156283Srwatson cygwin*) 1880156283Srwatson lt_cv_dlopen="dlopen" 1881156283Srwatson lt_cv_dlopen_libs= 1882243750Srwatson ;; 1883156283Srwatson 1884156283Srwatson darwin*) 1885156283Srwatson # if libdl is installed we need to link against it 1886156283Srwatson AC_CHECK_LIB([dl], [dlopen], 1887156283Srwatson [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1888156283Srwatson lt_cv_dlopen="dyld" 1889156283Srwatson lt_cv_dlopen_libs= 1890156283Srwatson lt_cv_dlopen_self=yes 1891156283Srwatson ]) 1892243750Srwatson ;; 1893156283Srwatson 1894156283Srwatson *) 1895156283Srwatson AC_CHECK_FUNC([shl_load], 1896156283Srwatson [lt_cv_dlopen="shl_load"], 1897156283Srwatson [AC_CHECK_LIB([dld], [shl_load], 1898191273Srwatson [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1899156283Srwatson [AC_CHECK_FUNC([dlopen], 1900156283Srwatson [lt_cv_dlopen="dlopen"], 1901156283Srwatson [AC_CHECK_LIB([dl], [dlopen], 1902156283Srwatson [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1903156283Srwatson [AC_CHECK_LIB([svld], [dlopen], 1904156283Srwatson [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1905156283Srwatson [AC_CHECK_LIB([dld], [dld_link], 1906191273Srwatson [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1907156283Srwatson ]) 1908156283Srwatson ]) 1909156283Srwatson ]) 1910156283Srwatson ]) 1911156283Srwatson ]) 1912156283Srwatson ;; 1913156283Srwatson esac 1914156283Srwatson 1915156283Srwatson if test "x$lt_cv_dlopen" != xno; then 1916156283Srwatson enable_dlopen=yes 1917156283Srwatson else 1918156283Srwatson enable_dlopen=no 1919156283Srwatson fi 1920156283Srwatson 1921156283Srwatson case $lt_cv_dlopen in 1922156283Srwatson dlopen) 1923156283Srwatson save_CPPFLAGS="$CPPFLAGS" 1924156283Srwatson test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1925156283Srwatson 1926156283Srwatson save_LDFLAGS="$LDFLAGS" 1927173143Srwatson wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1928156283Srwatson 1929156283Srwatson save_LIBS="$LIBS" 1930156283Srwatson LIBS="$lt_cv_dlopen_libs $LIBS" 1931156283Srwatson 1932156283Srwatson AC_CACHE_CHECK([whether a program can dlopen itself], 1933156283Srwatson lt_cv_dlopen_self, [dnl 1934243750Srwatson _LT_TRY_DLOPEN_SELF( 1935156283Srwatson lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1936156283Srwatson lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1937156283Srwatson ]) 1938156283Srwatson 1939156283Srwatson if test "x$lt_cv_dlopen_self" = xyes; then 1940173143Srwatson wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1941156283Srwatson AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1942243750Srwatson lt_cv_dlopen_self_static, [dnl 1943243750Srwatson _LT_TRY_DLOPEN_SELF( 1944156283Srwatson lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1945156283Srwatson lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1946156283Srwatson ]) 1947156283Srwatson fi 1948156283Srwatson 1949156283Srwatson CPPFLAGS="$save_CPPFLAGS" 1950156283Srwatson LDFLAGS="$save_LDFLAGS" 1951156283Srwatson LIBS="$save_LIBS" 1952156283Srwatson ;; 1953156283Srwatson esac 1954156283Srwatson 1955156283Srwatson case $lt_cv_dlopen_self in 1956156283Srwatson yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1957156283Srwatson *) enable_dlopen_self=unknown ;; 1958156283Srwatson esac 1959156283Srwatson 1960156283Srwatson case $lt_cv_dlopen_self_static in 1961156283Srwatson yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1962156283Srwatson *) enable_dlopen_self_static=unknown ;; 1963156283Srwatson esac 1964156283Srwatsonfi 1965243750Srwatson_LT_DECL([dlopen_support], [enable_dlopen], [0], 1966243750Srwatson [Whether dlopen is supported]) 1967243750Srwatson_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1968243750Srwatson [Whether dlopen of programs is supported]) 1969243750Srwatson_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1970243750Srwatson [Whether dlopen of statically linked programs is supported]) 1971243750Srwatson])# LT_SYS_DLOPEN_SELF 1972156283Srwatson 1973243750Srwatson# Old name: 1974243750SrwatsonAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1975243750Srwatsondnl aclocal-1.4 backwards compatibility: 1976243750Srwatsondnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1977156283Srwatson 1978243750Srwatson 1979243750Srwatson# _LT_COMPILER_C_O([TAGNAME]) 1980243750Srwatson# --------------------------- 1981243750Srwatson# Check to see if options -c and -o are simultaneously supported by compiler. 1982243750Srwatson# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1983243750Srwatsonm4_defun([_LT_COMPILER_C_O], 1984243750Srwatson[m4_require([_LT_DECL_SED])dnl 1985243750Srwatsonm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1986243750Srwatsonm4_require([_LT_TAG_COMPILER])dnl 1987156283SrwatsonAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1988243750Srwatson [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1989243750Srwatson [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1990243750Srwatson $RM -r conftest 2>/dev/null 1991156283Srwatson mkdir conftest 1992156283Srwatson cd conftest 1993156283Srwatson mkdir out 1994173143Srwatson echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1995156283Srwatson 1996156283Srwatson lt_compiler_flag="-o out/conftest2.$ac_objext" 1997156283Srwatson # Insert the option either (1) after the last *FLAGS variable, or 1998156283Srwatson # (2) before a word containing "conftest.", or (3) at the end. 1999156283Srwatson # Note that $ac_compile itself does not contain backslashes and begins 2000156283Srwatson # with a dollar sign (not a hyphen), so the echo should work correctly. 2001156283Srwatson lt_compile=`echo "$ac_compile" | $SED \ 2002156283Srwatson -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2003156283Srwatson -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2004156283Srwatson -e 's:$: $lt_compiler_flag:'` 2005243750Srwatson (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2006156283Srwatson (eval "$lt_compile" 2>out/conftest.err) 2007156283Srwatson ac_status=$? 2008156283Srwatson cat out/conftest.err >&AS_MESSAGE_LOG_FD 2009243750Srwatson echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2010156283Srwatson if (exit $ac_status) && test -s out/conftest2.$ac_objext 2011156283Srwatson then 2012156283Srwatson # The compiler can only warn and ignore the option if not recognized 2013156283Srwatson # So say no if there are warnings 2014243750Srwatson $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2015173143Srwatson $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2016173143Srwatson if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2017243750Srwatson _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2018156283Srwatson fi 2019156283Srwatson fi 2020156283Srwatson chmod u+w . 2>&AS_MESSAGE_LOG_FD 2021243750Srwatson $RM conftest* 2022156283Srwatson # SGI C++ compiler will create directory out/ii_files/ for 2023156283Srwatson # template instantiation 2024243750Srwatson test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2025243750Srwatson $RM out/* && rmdir out 2026156283Srwatson cd .. 2027243750Srwatson $RM -r conftest 2028243750Srwatson $RM conftest* 2029156283Srwatson]) 2030243750Srwatson_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2031243750Srwatson [Does compiler simultaneously support -c and -o options?]) 2032243750Srwatson])# _LT_COMPILER_C_O 2033156283Srwatson 2034156283Srwatson 2035243750Srwatson# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2036243750Srwatson# ---------------------------------- 2037156283Srwatson# Check to see if we can do hard links to lock some files if needed 2038243750Srwatsonm4_defun([_LT_COMPILER_FILE_LOCKS], 2039243750Srwatson[m4_require([_LT_ENABLE_LOCK])dnl 2040243750Srwatsonm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2041243750Srwatson_LT_COMPILER_C_O([$1]) 2042156283Srwatson 2043156283Srwatsonhard_links="nottested" 2044243750Srwatsonif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 2045156283Srwatson # do not overwrite the value of need_locks provided by the user 2046156283Srwatson AC_MSG_CHECKING([if we can lock with hard links]) 2047156283Srwatson hard_links=yes 2048243750Srwatson $RM conftest* 2049156283Srwatson ln conftest.a conftest.b 2>/dev/null && hard_links=no 2050156283Srwatson touch conftest.a 2051156283Srwatson ln conftest.a conftest.b 2>&5 || hard_links=no 2052156283Srwatson ln conftest.a conftest.b 2>/dev/null && hard_links=no 2053156283Srwatson AC_MSG_RESULT([$hard_links]) 2054156283Srwatson if test "$hard_links" = no; then 2055156283Srwatson AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 2056156283Srwatson need_locks=warn 2057156283Srwatson fi 2058156283Srwatsonelse 2059156283Srwatson need_locks=no 2060156283Srwatsonfi 2061243750Srwatson_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2062243750Srwatson])# _LT_COMPILER_FILE_LOCKS 2063156283Srwatson 2064156283Srwatson 2065243750Srwatson# _LT_CHECK_OBJDIR 2066243750Srwatson# ---------------- 2067243750Srwatsonm4_defun([_LT_CHECK_OBJDIR], 2068156283Srwatson[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2069156283Srwatson[rm -f .libs 2>/dev/null 2070156283Srwatsonmkdir .libs 2>/dev/null 2071156283Srwatsonif test -d .libs; then 2072156283Srwatson lt_cv_objdir=.libs 2073156283Srwatsonelse 2074156283Srwatson # MS-DOS does not allow filenames that begin with a dot. 2075156283Srwatson lt_cv_objdir=_libs 2076156283Srwatsonfi 2077156283Srwatsonrmdir .libs 2>/dev/null]) 2078156283Srwatsonobjdir=$lt_cv_objdir 2079243750Srwatson_LT_DECL([], [objdir], [0], 2080243750Srwatson [The name of the directory that contains temporary libtool files])dnl 2081243750Srwatsonm4_pattern_allow([LT_OBJDIR])dnl 2082243750SrwatsonAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2083243750Srwatson [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2084243750Srwatson])# _LT_CHECK_OBJDIR 2085156283Srwatson 2086156283Srwatson 2087243750Srwatson# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2088243750Srwatson# -------------------------------------- 2089156283Srwatson# Check hardcoding attributes. 2090243750Srwatsonm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2091156283Srwatson[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2092243750Srwatson_LT_TAGVAR(hardcode_action, $1)= 2093243750Srwatsonif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2094243750Srwatson test -n "$_LT_TAGVAR(runpath_var, $1)" || 2095243750Srwatson test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2096156283Srwatson 2097243750Srwatson # We can hardcode non-existent directories. 2098243750Srwatson if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 2099156283Srwatson # If the only mechanism to avoid hardcoding is shlibpath_var, we 2100156283Srwatson # have to relink, otherwise we might link with an installed library 2101156283Srwatson # when we should be linking with a yet-to-be-installed one 2102243750Srwatson ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2103243750Srwatson test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 2104156283Srwatson # Linking always hardcodes the temporary library directory. 2105243750Srwatson _LT_TAGVAR(hardcode_action, $1)=relink 2106156283Srwatson else 2107156283Srwatson # We can link without hardcoding, and we can hardcode nonexisting dirs. 2108243750Srwatson _LT_TAGVAR(hardcode_action, $1)=immediate 2109156283Srwatson fi 2110156283Srwatsonelse 2111156283Srwatson # We cannot hardcode anything, or else we can only hardcode existing 2112156283Srwatson # directories. 2113243750Srwatson _LT_TAGVAR(hardcode_action, $1)=unsupported 2114156283Srwatsonfi 2115243750SrwatsonAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2116156283Srwatson 2117243750Srwatsonif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2118243750Srwatson test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2119156283Srwatson # Fast installation is not supported 2120156283Srwatson enable_fast_install=no 2121156283Srwatsonelif test "$shlibpath_overrides_runpath" = yes || 2122156283Srwatson test "$enable_shared" = no; then 2123156283Srwatson # Fast installation is not necessary 2124156283Srwatson enable_fast_install=needless 2125156283Srwatsonfi 2126243750Srwatson_LT_TAGDECL([], [hardcode_action], [0], 2127243750Srwatson [How to hardcode a shared library path into an executable]) 2128243750Srwatson])# _LT_LINKER_HARDCODE_LIBPATH 2129156283Srwatson 2130156283Srwatson 2131243750Srwatson# _LT_CMD_STRIPLIB 2132243750Srwatson# ---------------- 2133243750Srwatsonm4_defun([_LT_CMD_STRIPLIB], 2134243750Srwatson[m4_require([_LT_DECL_EGREP]) 2135243750Srwatsonstriplib= 2136156283Srwatsonold_striplib= 2137156283SrwatsonAC_MSG_CHECKING([whether stripping libraries is possible]) 2138243750Srwatsonif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2139156283Srwatson test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2140156283Srwatson test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2141156283Srwatson AC_MSG_RESULT([yes]) 2142156283Srwatsonelse 2143156283Srwatson# FIXME - insert some real tests, host_os isn't really good enough 2144156283Srwatson case $host_os in 2145243750Srwatson darwin*) 2146243750Srwatson if test -n "$STRIP" ; then 2147243750Srwatson striplib="$STRIP -x" 2148243750Srwatson old_striplib="$STRIP -S" 2149243750Srwatson AC_MSG_RESULT([yes]) 2150243750Srwatson else 2151243750Srwatson AC_MSG_RESULT([no]) 2152243750Srwatson fi 2153156283Srwatson ;; 2154243750Srwatson *) 2155243750Srwatson AC_MSG_RESULT([no]) 2156243750Srwatson ;; 2157156283Srwatson esac 2158156283Srwatsonfi 2159243750Srwatson_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2160243750Srwatson_LT_DECL([], [striplib], [1]) 2161243750Srwatson])# _LT_CMD_STRIPLIB 2162156283Srwatson 2163156283Srwatson 2164243750Srwatson# _LT_SYS_DYNAMIC_LINKER([TAG]) 2165156283Srwatson# ----------------------------- 2166156283Srwatson# PORTME Fill in your ld.so characteristics 2167243750Srwatsonm4_defun([_LT_SYS_DYNAMIC_LINKER], 2168243750Srwatson[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2169243750Srwatsonm4_require([_LT_DECL_EGREP])dnl 2170243750Srwatsonm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2171243750Srwatsonm4_require([_LT_DECL_OBJDUMP])dnl 2172243750Srwatsonm4_require([_LT_DECL_SED])dnl 2173243750Srwatsonm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2174173143SrwatsonAC_MSG_CHECKING([dynamic linker characteristics]) 2175243750Srwatsonm4_if([$1], 2176243750Srwatson [], [ 2177156283Srwatsonif test "$GCC" = yes; then 2178173143Srwatson case $host_os in 2179173143Srwatson darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2180173143Srwatson *) lt_awk_arg="/^libraries:/" ;; 2181173143Srwatson esac 2182243750Srwatson case $host_os in 2183243750Srwatson mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2184243750Srwatson *) lt_sed_strip_eq="s,=/,/,g" ;; 2185243750Srwatson esac 2186243750Srwatson lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2187243750Srwatson case $lt_search_path_spec in 2188243750Srwatson *\;*) 2189156283Srwatson # if the path contains ";" then we assume it to be the separator 2190156283Srwatson # otherwise default to the standard path separator (i.e. ":") - it is 2191156283Srwatson # assumed that no part of a normal pathname contains ";" but that should 2192156283Srwatson # okay in the real world where ";" in dirpaths is itself problematic. 2193243750Srwatson lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2194243750Srwatson ;; 2195243750Srwatson *) 2196243750Srwatson lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2197243750Srwatson ;; 2198243750Srwatson esac 2199173143Srwatson # Ok, now we have the path, separated by spaces, we can step through it 2200173143Srwatson # and add multilib dir if necessary. 2201173143Srwatson lt_tmp_lt_search_path_spec= 2202173143Srwatson lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2203173143Srwatson for lt_sys_path in $lt_search_path_spec; do 2204173143Srwatson if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2205173143Srwatson lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2206173143Srwatson else 2207173143Srwatson test -d "$lt_sys_path" && \ 2208173143Srwatson lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2209173143Srwatson fi 2210173143Srwatson done 2211243750Srwatson lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2212173143SrwatsonBEGIN {RS=" "; FS="/|\n";} { 2213173143Srwatson lt_foo=""; 2214173143Srwatson lt_count=0; 2215173143Srwatson for (lt_i = NF; lt_i > 0; lt_i--) { 2216173143Srwatson if ($lt_i != "" && $lt_i != ".") { 2217173143Srwatson if ($lt_i == "..") { 2218173143Srwatson lt_count++; 2219173143Srwatson } else { 2220173143Srwatson if (lt_count == 0) { 2221173143Srwatson lt_foo="/" $lt_i lt_foo; 2222173143Srwatson } else { 2223173143Srwatson lt_count--; 2224173143Srwatson } 2225173143Srwatson } 2226173143Srwatson } 2227173143Srwatson } 2228173143Srwatson if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2229173143Srwatson if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2230173143Srwatson}'` 2231243750Srwatson # AWK program above erroneously prepends '/' to C:/dos/paths 2232243750Srwatson # for these hosts. 2233243750Srwatson case $host_os in 2234243750Srwatson mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2235243750Srwatson $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2236243750Srwatson esac 2237243750Srwatson sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2238156283Srwatsonelse 2239156283Srwatson sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2240173143Srwatsonfi]) 2241243750Srwatsonlibrary_names_spec= 2242243750Srwatsonlibname_spec='lib$name' 2243243750Srwatsonsoname_spec= 2244243750Srwatsonshrext_cmds=".so" 2245243750Srwatsonpostinstall_cmds= 2246243750Srwatsonpostuninstall_cmds= 2247243750Srwatsonfinish_cmds= 2248243750Srwatsonfinish_eval= 2249243750Srwatsonshlibpath_var= 2250243750Srwatsonshlibpath_overrides_runpath=unknown 2251243750Srwatsonversion_type=none 2252243750Srwatsondynamic_linker="$host_os ld.so" 2253243750Srwatsonsys_lib_dlsearch_path_spec="/lib /usr/lib" 2254156283Srwatsonneed_lib_prefix=unknown 2255156283Srwatsonhardcode_into_libs=no 2256156283Srwatson 2257156283Srwatson# when you set need_version to no, make sure it does not cause -set_version 2258156283Srwatson# flags to be left without arguments 2259156283Srwatsonneed_version=unknown 2260156283Srwatson 2261156283Srwatsoncase $host_os in 2262156283Srwatsonaix3*) 2263243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2264156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2265156283Srwatson shlibpath_var=LIBPATH 2266156283Srwatson 2267156283Srwatson # AIX 3 has no versioning support, so we append a major version to the name. 2268156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2269156283Srwatson ;; 2270156283Srwatson 2271191273Srwatsonaix[[4-9]]*) 2272243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2273156283Srwatson need_lib_prefix=no 2274156283Srwatson need_version=no 2275156283Srwatson hardcode_into_libs=yes 2276156283Srwatson if test "$host_cpu" = ia64; then 2277156283Srwatson # AIX 5 supports IA64 2278156283Srwatson library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2279156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2280156283Srwatson else 2281156283Srwatson # With GCC up to 2.95.x, collect2 would create an import file 2282156283Srwatson # for dependence libraries. The import file would start with 2283156283Srwatson # the line `#! .'. This would cause the generated library to 2284156283Srwatson # depend on `.', always an invalid library. This was fixed in 2285156283Srwatson # development snapshots of GCC prior to 3.0. 2286156283Srwatson case $host_os in 2287156283Srwatson aix4 | aix4.[[01]] | aix4.[[01]].*) 2288156283Srwatson if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2289156283Srwatson echo ' yes ' 2290243750Srwatson echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2291156283Srwatson : 2292156283Srwatson else 2293156283Srwatson can_build_shared=no 2294156283Srwatson fi 2295156283Srwatson ;; 2296156283Srwatson esac 2297156283Srwatson # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2298156283Srwatson # soname into executable. Probably we can add versioning support to 2299156283Srwatson # collect2, so additional links can be useful in future. 2300156283Srwatson if test "$aix_use_runtimelinking" = yes; then 2301156283Srwatson # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2302156283Srwatson # instead of lib<name>.a to let people know that these are not 2303156283Srwatson # typical AIX shared libraries. 2304156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2305156283Srwatson else 2306156283Srwatson # We preserve .a as extension for shared libraries through AIX4.2 2307156283Srwatson # and later when we are not doing run time linking. 2308156283Srwatson library_names_spec='${libname}${release}.a $libname.a' 2309156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2310156283Srwatson fi 2311156283Srwatson shlibpath_var=LIBPATH 2312156283Srwatson fi 2313156283Srwatson ;; 2314156283Srwatson 2315156283Srwatsonamigaos*) 2316243750Srwatson case $host_cpu in 2317243750Srwatson powerpc) 2318243750Srwatson # Since July 2007 AmigaOS4 officially supports .so libraries. 2319243750Srwatson # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2320243750Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2321243750Srwatson ;; 2322243750Srwatson m68k) 2323243750Srwatson library_names_spec='$libname.ixlibrary $libname.a' 2324243750Srwatson # Create ${libname}_ixlibrary.a entries in /sys/libs. 2325243750Srwatson finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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' 2326243750Srwatson ;; 2327243750Srwatson esac 2328156283Srwatson ;; 2329156283Srwatson 2330156283Srwatsonbeos*) 2331156283Srwatson library_names_spec='${libname}${shared_ext}' 2332156283Srwatson dynamic_linker="$host_os ld.so" 2333156283Srwatson shlibpath_var=LIBRARY_PATH 2334156283Srwatson ;; 2335156283Srwatson 2336156283Srwatsonbsdi[[45]]*) 2337243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2338156283Srwatson need_version=no 2339156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2340156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2341156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2342156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2343156283Srwatson sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2344156283Srwatson sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2345156283Srwatson # the default ld.so.conf also contains /usr/contrib/lib and 2346156283Srwatson # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2347156283Srwatson # libtool to hard-code these into programs 2348156283Srwatson ;; 2349156283Srwatson 2350243750Srwatsoncygwin* | mingw* | pw32* | cegcc*) 2351156283Srwatson version_type=windows 2352156283Srwatson shrext_cmds=".dll" 2353156283Srwatson need_version=no 2354156283Srwatson need_lib_prefix=no 2355156283Srwatson 2356243750Srwatson case $GCC,$cc_basename in 2357243750Srwatson yes,*) 2358243750Srwatson # gcc 2359156283Srwatson library_names_spec='$libname.dll.a' 2360156283Srwatson # DLL is installed to $(libdir)/../bin by postinstall_cmds 2361156283Srwatson postinstall_cmds='base_file=`basename \${file}`~ 2362243750Srwatson dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2363156283Srwatson dldir=$destdir/`dirname \$dlpath`~ 2364156283Srwatson test -d \$dldir || mkdir -p \$dldir~ 2365156283Srwatson $install_prog $dir/$dlname \$dldir/$dlname~ 2366243750Srwatson chmod a+x \$dldir/$dlname~ 2367243750Srwatson if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2368243750Srwatson eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2369243750Srwatson fi' 2370156283Srwatson postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2371156283Srwatson dlpath=$dir/\$dldll~ 2372243750Srwatson $RM \$dlpath' 2373156283Srwatson shlibpath_overrides_runpath=yes 2374156283Srwatson 2375156283Srwatson case $host_os in 2376156283Srwatson cygwin*) 2377156283Srwatson # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2378156283Srwatson soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2379243750Srwatsonm4_if([$1], [],[ 2380243750Srwatson sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2381156283Srwatson ;; 2382243750Srwatson mingw* | cegcc*) 2383156283Srwatson # MinGW DLLs use traditional 'lib' prefix 2384156283Srwatson soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2385156283Srwatson ;; 2386156283Srwatson pw32*) 2387156283Srwatson # pw32 DLLs use 'pw' prefix rather than 'lib' 2388156283Srwatson library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2389156283Srwatson ;; 2390156283Srwatson esac 2391243750Srwatson dynamic_linker='Win32 ld.exe' 2392156283Srwatson ;; 2393156283Srwatson 2394243750Srwatson *,cl*) 2395243750Srwatson # Native MSVC 2396243750Srwatson libname_spec='$name' 2397243750Srwatson soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2398243750Srwatson library_names_spec='${libname}.dll.lib' 2399243750Srwatson 2400243750Srwatson case $build_os in 2401243750Srwatson mingw*) 2402243750Srwatson sys_lib_search_path_spec= 2403243750Srwatson lt_save_ifs=$IFS 2404243750Srwatson IFS=';' 2405243750Srwatson for lt_path in $LIB 2406243750Srwatson do 2407243750Srwatson IFS=$lt_save_ifs 2408243750Srwatson # Let DOS variable expansion print the short 8.3 style file name. 2409243750Srwatson lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2410243750Srwatson sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2411243750Srwatson done 2412243750Srwatson IFS=$lt_save_ifs 2413243750Srwatson # Convert to MSYS style. 2414243750Srwatson sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2415243750Srwatson ;; 2416243750Srwatson cygwin*) 2417243750Srwatson # Convert to unix form, then to dos form, then back to unix form 2418243750Srwatson # but this time dos style (no spaces!) so that the unix form looks 2419243750Srwatson # like /cygdrive/c/PROGRA~1:/cygdr... 2420243750Srwatson sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2421243750Srwatson sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2422243750Srwatson sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2423243750Srwatson ;; 2424243750Srwatson *) 2425243750Srwatson sys_lib_search_path_spec="$LIB" 2426243750Srwatson if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2427243750Srwatson # It is most probably a Windows format PATH. 2428243750Srwatson sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2429243750Srwatson else 2430243750Srwatson sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2431243750Srwatson fi 2432243750Srwatson # FIXME: find the short name or the path components, as spaces are 2433243750Srwatson # common. (e.g. "Program Files" -> "PROGRA~1") 2434243750Srwatson ;; 2435243750Srwatson esac 2436243750Srwatson 2437243750Srwatson # DLL is installed to $(libdir)/../bin by postinstall_cmds 2438243750Srwatson postinstall_cmds='base_file=`basename \${file}`~ 2439243750Srwatson dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2440243750Srwatson dldir=$destdir/`dirname \$dlpath`~ 2441243750Srwatson test -d \$dldir || mkdir -p \$dldir~ 2442243750Srwatson $install_prog $dir/$dlname \$dldir/$dlname' 2443243750Srwatson postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2444243750Srwatson dlpath=$dir/\$dldll~ 2445243750Srwatson $RM \$dlpath' 2446243750Srwatson shlibpath_overrides_runpath=yes 2447243750Srwatson dynamic_linker='Win32 link.exe' 2448243750Srwatson ;; 2449243750Srwatson 2450156283Srwatson *) 2451243750Srwatson # Assume MSVC wrapper 2452156283Srwatson library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2453243750Srwatson dynamic_linker='Win32 ld.exe' 2454156283Srwatson ;; 2455156283Srwatson esac 2456156283Srwatson # FIXME: first we should search . and the directory the executable is in 2457156283Srwatson shlibpath_var=PATH 2458156283Srwatson ;; 2459156283Srwatson 2460156283Srwatsondarwin* | rhapsody*) 2461156283Srwatson dynamic_linker="$host_os dyld" 2462156283Srwatson version_type=darwin 2463156283Srwatson need_lib_prefix=no 2464156283Srwatson need_version=no 2465243750Srwatson library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2466156283Srwatson soname_spec='${libname}${release}${major}$shared_ext' 2467156283Srwatson shlibpath_overrides_runpath=yes 2468156283Srwatson shlibpath_var=DYLD_LIBRARY_PATH 2469156283Srwatson shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2470243750Srwatsonm4_if([$1], [],[ 2471243750Srwatson sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2472156283Srwatson sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2473156283Srwatson ;; 2474156283Srwatson 2475156283Srwatsondgux*) 2476243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2477156283Srwatson need_lib_prefix=no 2478156283Srwatson need_version=no 2479156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2480156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2481156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2482156283Srwatson ;; 2483156283Srwatson 2484156283Srwatsonfreebsd* | dragonfly*) 2485156283Srwatson # DragonFly does not have aout. When/if they implement a new 2486156283Srwatson # versioning mechanism, adjust this. 2487156283Srwatson if test -x /usr/bin/objformat; then 2488156283Srwatson objformat=`/usr/bin/objformat` 2489156283Srwatson else 2490156283Srwatson case $host_os in 2491243750Srwatson freebsd[[23]].*) objformat=aout ;; 2492156283Srwatson *) objformat=elf ;; 2493156283Srwatson esac 2494156283Srwatson fi 2495156283Srwatson version_type=freebsd-$objformat 2496156283Srwatson case $version_type in 2497156283Srwatson freebsd-elf*) 2498156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2499156283Srwatson need_version=no 2500156283Srwatson need_lib_prefix=no 2501156283Srwatson ;; 2502156283Srwatson freebsd-*) 2503156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2504156283Srwatson need_version=yes 2505156283Srwatson ;; 2506156283Srwatson esac 2507156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2508156283Srwatson case $host_os in 2509243750Srwatson freebsd2.*) 2510156283Srwatson shlibpath_overrides_runpath=yes 2511156283Srwatson ;; 2512156283Srwatson freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2513156283Srwatson shlibpath_overrides_runpath=yes 2514156283Srwatson hardcode_into_libs=yes 2515156283Srwatson ;; 2516173143Srwatson freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2517173143Srwatson freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2518156283Srwatson shlibpath_overrides_runpath=no 2519156283Srwatson hardcode_into_libs=yes 2520156283Srwatson ;; 2521173143Srwatson *) # from 4.6 on, and DragonFly 2522173143Srwatson shlibpath_overrides_runpath=yes 2523173143Srwatson hardcode_into_libs=yes 2524173143Srwatson ;; 2525156283Srwatson esac 2526156283Srwatson ;; 2527156283Srwatson 2528156283Srwatsongnu*) 2529243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2530156283Srwatson need_lib_prefix=no 2531156283Srwatson need_version=no 2532156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2533156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2534156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2535243750Srwatson shlibpath_overrides_runpath=no 2536156283Srwatson hardcode_into_libs=yes 2537156283Srwatson ;; 2538156283Srwatson 2539243750Srwatsonhaiku*) 2540243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2541243750Srwatson need_lib_prefix=no 2542243750Srwatson need_version=no 2543243750Srwatson dynamic_linker="$host_os runtime_loader" 2544243750Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2545243750Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2546243750Srwatson shlibpath_var=LIBRARY_PATH 2547243750Srwatson shlibpath_overrides_runpath=yes 2548243750Srwatson sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2549243750Srwatson hardcode_into_libs=yes 2550243750Srwatson ;; 2551243750Srwatson 2552156283Srwatsonhpux9* | hpux10* | hpux11*) 2553156283Srwatson # Give a soname corresponding to the major version so that dld.sl refuses to 2554156283Srwatson # link against other versions. 2555156283Srwatson version_type=sunos 2556156283Srwatson need_lib_prefix=no 2557156283Srwatson need_version=no 2558156283Srwatson case $host_cpu in 2559156283Srwatson ia64*) 2560156283Srwatson shrext_cmds='.so' 2561156283Srwatson hardcode_into_libs=yes 2562156283Srwatson dynamic_linker="$host_os dld.so" 2563156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2564156283Srwatson shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2565156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2566156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2567156283Srwatson if test "X$HPUX_IA64_MODE" = X32; then 2568156283Srwatson sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2569156283Srwatson else 2570156283Srwatson sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2571156283Srwatson fi 2572156283Srwatson sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2573156283Srwatson ;; 2574243750Srwatson hppa*64*) 2575156283Srwatson shrext_cmds='.sl' 2576243750Srwatson hardcode_into_libs=yes 2577156283Srwatson dynamic_linker="$host_os dld.sl" 2578243750Srwatson shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2579243750Srwatson shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2580243750Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2581243750Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2582243750Srwatson sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2583243750Srwatson sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2584243750Srwatson ;; 2585243750Srwatson *) 2586243750Srwatson shrext_cmds='.sl' 2587243750Srwatson dynamic_linker="$host_os dld.sl" 2588156283Srwatson shlibpath_var=SHLIB_PATH 2589156283Srwatson shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2590156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2591156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2592156283Srwatson ;; 2593156283Srwatson esac 2594243750Srwatson # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2595156283Srwatson postinstall_cmds='chmod 555 $lib' 2596243750Srwatson # or fails outright, so override atomically: 2597243750Srwatson install_override_mode=555 2598156283Srwatson ;; 2599156283Srwatson 2600173143Srwatsoninterix[[3-9]]*) 2601243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2602173143Srwatson need_lib_prefix=no 2603173143Srwatson need_version=no 2604173143Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2605173143Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2606173143Srwatson dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2607173143Srwatson shlibpath_var=LD_LIBRARY_PATH 2608173143Srwatson shlibpath_overrides_runpath=no 2609173143Srwatson hardcode_into_libs=yes 2610173143Srwatson ;; 2611173143Srwatson 2612156283Srwatsonirix5* | irix6* | nonstopux*) 2613156283Srwatson case $host_os in 2614156283Srwatson nonstopux*) version_type=nonstopux ;; 2615156283Srwatson *) 2616156283Srwatson if test "$lt_cv_prog_gnu_ld" = yes; then 2617243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2618156283Srwatson else 2619156283Srwatson version_type=irix 2620156283Srwatson fi ;; 2621156283Srwatson esac 2622156283Srwatson need_lib_prefix=no 2623156283Srwatson need_version=no 2624156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2625156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2626156283Srwatson case $host_os in 2627156283Srwatson irix5* | nonstopux*) 2628156283Srwatson libsuff= shlibsuff= 2629156283Srwatson ;; 2630156283Srwatson *) 2631156283Srwatson case $LD in # libtool.m4 will add one of these switches to LD 2632156283Srwatson *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2633156283Srwatson libsuff= shlibsuff= libmagic=32-bit;; 2634156283Srwatson *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2635156283Srwatson libsuff=32 shlibsuff=N32 libmagic=N32;; 2636156283Srwatson *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2637156283Srwatson libsuff=64 shlibsuff=64 libmagic=64-bit;; 2638156283Srwatson *) libsuff= shlibsuff= libmagic=never-match;; 2639156283Srwatson esac 2640156283Srwatson ;; 2641156283Srwatson esac 2642156283Srwatson shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2643156283Srwatson shlibpath_overrides_runpath=no 2644156283Srwatson sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2645156283Srwatson sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2646156283Srwatson hardcode_into_libs=yes 2647156283Srwatson ;; 2648156283Srwatson 2649156283Srwatson# No shared lib support for Linux oldld, aout, or coff. 2650156283Srwatsonlinux*oldld* | linux*aout* | linux*coff*) 2651156283Srwatson dynamic_linker=no 2652156283Srwatson ;; 2653156283Srwatson 2654243750Srwatson# This must be glibc/ELF. 2655243750Srwatsonlinux* | k*bsd*-gnu | kopensolaris*-gnu) 2656243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2657156283Srwatson need_lib_prefix=no 2658156283Srwatson need_version=no 2659156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2660156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2661156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2662156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2663156283Srwatson shlibpath_overrides_runpath=no 2664243750Srwatson 2665243750Srwatson # Some binutils ld are patched to set DT_RUNPATH 2666243750Srwatson AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2667243750Srwatson [lt_cv_shlibpath_overrides_runpath=no 2668243750Srwatson save_LDFLAGS=$LDFLAGS 2669243750Srwatson save_libdir=$libdir 2670243750Srwatson eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2671243750Srwatson LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2672243750Srwatson AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2673243750Srwatson [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2674243750Srwatson [lt_cv_shlibpath_overrides_runpath=yes])]) 2675243750Srwatson LDFLAGS=$save_LDFLAGS 2676243750Srwatson libdir=$save_libdir 2677243750Srwatson ]) 2678243750Srwatson shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2679243750Srwatson 2680156283Srwatson # This implies no fast_install, which is unacceptable. 2681156283Srwatson # Some rework will be needed to allow for fast_install 2682156283Srwatson # before this can be enabled. 2683156283Srwatson hardcode_into_libs=yes 2684156283Srwatson 2685156283Srwatson # Append ld.so.conf contents to the search path 2686156283Srwatson if test -f /etc/ld.so.conf; then 2687243750Srwatson 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' ' '` 2688156283Srwatson sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2689156283Srwatson fi 2690156283Srwatson 2691156283Srwatson # We used to test for /lib/ld.so.1 and disable shared libraries on 2692156283Srwatson # powerpc, because MkLinux only supported shared libraries with the 2693156283Srwatson # GNU dynamic linker. Since this was broken with cross compilers, 2694156283Srwatson # most powerpc-linux boxes support dynamic linking these days and 2695156283Srwatson # people can always --disable-shared, the test was removed, and we 2696156283Srwatson # assume the GNU/Linux dynamic linker is in use. 2697156283Srwatson dynamic_linker='GNU/Linux ld.so' 2698156283Srwatson ;; 2699156283Srwatson 2700156283Srwatsonnetbsd*) 2701156283Srwatson version_type=sunos 2702156283Srwatson need_lib_prefix=no 2703156283Srwatson need_version=no 2704243750Srwatson if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2705156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2706156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2707156283Srwatson dynamic_linker='NetBSD (a.out) ld.so' 2708156283Srwatson else 2709156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2710156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2711156283Srwatson dynamic_linker='NetBSD ld.elf_so' 2712156283Srwatson fi 2713156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2714156283Srwatson shlibpath_overrides_runpath=yes 2715156283Srwatson hardcode_into_libs=yes 2716156283Srwatson ;; 2717156283Srwatson 2718156283Srwatsonnewsos6) 2719243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2720156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2721156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2722156283Srwatson shlibpath_overrides_runpath=yes 2723156283Srwatson ;; 2724156283Srwatson 2725243750Srwatson*nto* | *qnx*) 2726243750Srwatson version_type=qnx 2727156283Srwatson need_lib_prefix=no 2728156283Srwatson need_version=no 2729156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2730156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2731156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2732243750Srwatson shlibpath_overrides_runpath=no 2733243750Srwatson hardcode_into_libs=yes 2734243750Srwatson dynamic_linker='ldqnx.so' 2735156283Srwatson ;; 2736156283Srwatson 2737156283Srwatsonopenbsd*) 2738156283Srwatson version_type=sunos 2739173143Srwatson sys_lib_dlsearch_path_spec="/usr/lib" 2740156283Srwatson need_lib_prefix=no 2741156283Srwatson # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2742156283Srwatson case $host_os in 2743243750Srwatson openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2744243750Srwatson *) need_version=no ;; 2745156283Srwatson esac 2746156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2747156283Srwatson finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2748156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2749243750Srwatson if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2750156283Srwatson case $host_os in 2751156283Srwatson openbsd2.[[89]] | openbsd2.[[89]].*) 2752156283Srwatson shlibpath_overrides_runpath=no 2753156283Srwatson ;; 2754156283Srwatson *) 2755156283Srwatson shlibpath_overrides_runpath=yes 2756156283Srwatson ;; 2757156283Srwatson esac 2758156283Srwatson else 2759156283Srwatson shlibpath_overrides_runpath=yes 2760156283Srwatson fi 2761156283Srwatson ;; 2762156283Srwatson 2763156283Srwatsonos2*) 2764156283Srwatson libname_spec='$name' 2765156283Srwatson shrext_cmds=".dll" 2766156283Srwatson need_lib_prefix=no 2767156283Srwatson library_names_spec='$libname${shared_ext} $libname.a' 2768156283Srwatson dynamic_linker='OS/2 ld.exe' 2769156283Srwatson shlibpath_var=LIBPATH 2770156283Srwatson ;; 2771156283Srwatson 2772156283Srwatsonosf3* | osf4* | osf5*) 2773156283Srwatson version_type=osf 2774156283Srwatson need_lib_prefix=no 2775156283Srwatson need_version=no 2776156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2777156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2778156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2779156283Srwatson sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2780156283Srwatson sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2781156283Srwatson ;; 2782156283Srwatson 2783173143Srwatsonrdos*) 2784173143Srwatson dynamic_linker=no 2785156283Srwatson ;; 2786156283Srwatson 2787156283Srwatsonsolaris*) 2788243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2789156283Srwatson need_lib_prefix=no 2790156283Srwatson need_version=no 2791156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2792156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2793156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2794156283Srwatson shlibpath_overrides_runpath=yes 2795156283Srwatson hardcode_into_libs=yes 2796156283Srwatson # ldd complains unless libraries are executable 2797156283Srwatson postinstall_cmds='chmod +x $lib' 2798156283Srwatson ;; 2799156283Srwatson 2800156283Srwatsonsunos4*) 2801156283Srwatson version_type=sunos 2802156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2803156283Srwatson finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2804156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2805156283Srwatson shlibpath_overrides_runpath=yes 2806156283Srwatson if test "$with_gnu_ld" = yes; then 2807156283Srwatson need_lib_prefix=no 2808156283Srwatson fi 2809156283Srwatson need_version=yes 2810156283Srwatson ;; 2811156283Srwatson 2812173143Srwatsonsysv4 | sysv4.3*) 2813243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2814156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2815156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2816156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2817156283Srwatson case $host_vendor in 2818156283Srwatson sni) 2819156283Srwatson shlibpath_overrides_runpath=no 2820156283Srwatson need_lib_prefix=no 2821156283Srwatson runpath_var=LD_RUN_PATH 2822156283Srwatson ;; 2823156283Srwatson siemens) 2824156283Srwatson need_lib_prefix=no 2825156283Srwatson ;; 2826156283Srwatson motorola) 2827156283Srwatson need_lib_prefix=no 2828156283Srwatson need_version=no 2829156283Srwatson shlibpath_overrides_runpath=no 2830156283Srwatson sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2831156283Srwatson ;; 2832156283Srwatson esac 2833156283Srwatson ;; 2834156283Srwatson 2835156283Srwatsonsysv4*MP*) 2836156283Srwatson if test -d /usr/nec ;then 2837243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2838156283Srwatson library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2839156283Srwatson soname_spec='$libname${shared_ext}.$major' 2840156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2841156283Srwatson fi 2842156283Srwatson ;; 2843156283Srwatson 2844173143Srwatsonsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2845173143Srwatson version_type=freebsd-elf 2846173143Srwatson need_lib_prefix=no 2847173143Srwatson need_version=no 2848173143Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2849173143Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2850173143Srwatson shlibpath_var=LD_LIBRARY_PATH 2851243750Srwatson shlibpath_overrides_runpath=yes 2852173143Srwatson hardcode_into_libs=yes 2853173143Srwatson if test "$with_gnu_ld" = yes; then 2854173143Srwatson sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2855173143Srwatson else 2856173143Srwatson sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2857173143Srwatson case $host_os in 2858173143Srwatson sco3.2v5*) 2859173143Srwatson sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2860173143Srwatson ;; 2861173143Srwatson esac 2862173143Srwatson fi 2863173143Srwatson sys_lib_dlsearch_path_spec='/usr/lib' 2864173143Srwatson ;; 2865173143Srwatson 2866243750Srwatsontpf*) 2867243750Srwatson # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2868243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2869243750Srwatson need_lib_prefix=no 2870243750Srwatson need_version=no 2871243750Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2872243750Srwatson shlibpath_var=LD_LIBRARY_PATH 2873243750Srwatson shlibpath_overrides_runpath=no 2874243750Srwatson hardcode_into_libs=yes 2875243750Srwatson ;; 2876243750Srwatson 2877156283Srwatsonuts4*) 2878243750Srwatson version_type=linux # correct to gnu/linux during the next big refactor 2879156283Srwatson library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2880156283Srwatson soname_spec='${libname}${release}${shared_ext}$major' 2881156283Srwatson shlibpath_var=LD_LIBRARY_PATH 2882156283Srwatson ;; 2883156283Srwatson 2884156283Srwatson*) 2885156283Srwatson dynamic_linker=no 2886156283Srwatson ;; 2887156283Srwatsonesac 2888156283SrwatsonAC_MSG_RESULT([$dynamic_linker]) 2889156283Srwatsontest "$dynamic_linker" = no && can_build_shared=no 2890173143Srwatson 2891173143Srwatsonvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2892173143Srwatsonif test "$GCC" = yes; then 2893173143Srwatson variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2894173143Srwatsonfi 2895156283Srwatson 2896243750Srwatsonif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2897243750Srwatson sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2898156283Srwatsonfi 2899243750Srwatsonif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2900243750Srwatson sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2901243750Srwatsonfi 2902156283Srwatson 2903243750Srwatson_LT_DECL([], [variables_saved_for_relink], [1], 2904243750Srwatson [Variables whose values should be saved in libtool wrapper scripts and 2905243750Srwatson restored at link time]) 2906243750Srwatson_LT_DECL([], [need_lib_prefix], [0], 2907243750Srwatson [Do we need the "lib" prefix for modules?]) 2908243750Srwatson_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2909243750Srwatson_LT_DECL([], [version_type], [0], [Library versioning type]) 2910243750Srwatson_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2911243750Srwatson_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2912243750Srwatson_LT_DECL([], [shlibpath_overrides_runpath], [0], 2913243750Srwatson [Is shlibpath searched before the hard-coded library search path?]) 2914243750Srwatson_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2915243750Srwatson_LT_DECL([], [library_names_spec], [1], 2916243750Srwatson [[List of archive names. First name is the real one, the rest are links. 2917243750Srwatson The last name is the one that the linker finds with -lNAME]]) 2918243750Srwatson_LT_DECL([], [soname_spec], [1], 2919243750Srwatson [[The coded name of the library, if different from the real name]]) 2920243750Srwatson_LT_DECL([], [install_override_mode], [1], 2921243750Srwatson [Permission mode override for installation of shared libraries]) 2922243750Srwatson_LT_DECL([], [postinstall_cmds], [2], 2923243750Srwatson [Command to use after installation of a shared archive]) 2924243750Srwatson_LT_DECL([], [postuninstall_cmds], [2], 2925243750Srwatson [Command to use after uninstallation of a shared archive]) 2926243750Srwatson_LT_DECL([], [finish_cmds], [2], 2927243750Srwatson [Commands used to finish a libtool library installation in a directory]) 2928243750Srwatson_LT_DECL([], [finish_eval], [1], 2929243750Srwatson [[As "finish_cmds", except a single script fragment to be evaled but 2930243750Srwatson not shown]]) 2931243750Srwatson_LT_DECL([], [hardcode_into_libs], [0], 2932243750Srwatson [Whether we should hardcode library paths into libraries]) 2933243750Srwatson_LT_DECL([], [sys_lib_search_path_spec], [2], 2934243750Srwatson [Compile-time system search path for libraries]) 2935243750Srwatson_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2936243750Srwatson [Run-time system search path for libraries]) 2937243750Srwatson])# _LT_SYS_DYNAMIC_LINKER 2938156283Srwatson 2939156283Srwatson 2940243750Srwatson# _LT_PATH_TOOL_PREFIX(TOOL) 2941156283Srwatson# -------------------------- 2942173143Srwatson# find a file program which can recognize shared library 2943243750SrwatsonAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2944243750Srwatson[m4_require([_LT_DECL_EGREP])dnl 2945156283SrwatsonAC_MSG_CHECKING([for $1]) 2946156283SrwatsonAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2947156283Srwatson[case $MAGIC_CMD in 2948156283Srwatson[[\\/*] | ?:[\\/]*]) 2949156283Srwatson lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2950156283Srwatson ;; 2951156283Srwatson*) 2952156283Srwatson lt_save_MAGIC_CMD="$MAGIC_CMD" 2953156283Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2954156283Srwatsondnl $ac_dummy forces splitting on constant user-supplied paths. 2955156283Srwatsondnl POSIX.2 word splitting is done only on the output of word expansions, 2956156283Srwatsondnl not every word. This closes a longstanding sh security hole. 2957243750Srwatson ac_dummy="m4_if([$2], , $PATH, [$2])" 2958156283Srwatson for ac_dir in $ac_dummy; do 2959156283Srwatson IFS="$lt_save_ifs" 2960156283Srwatson test -z "$ac_dir" && ac_dir=. 2961156283Srwatson if test -f $ac_dir/$1; then 2962156283Srwatson lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2963156283Srwatson if test -n "$file_magic_test_file"; then 2964156283Srwatson case $deplibs_check_method in 2965156283Srwatson "file_magic "*) 2966156283Srwatson file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2967156283Srwatson MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2968156283Srwatson if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2969156283Srwatson $EGREP "$file_magic_regex" > /dev/null; then 2970156283Srwatson : 2971156283Srwatson else 2972243750Srwatson cat <<_LT_EOF 1>&2 2973156283Srwatson 2974156283Srwatson*** Warning: the command libtool uses to detect shared libraries, 2975156283Srwatson*** $file_magic_cmd, produces output that libtool cannot recognize. 2976156283Srwatson*** The result is that libtool may fail to recognize shared libraries 2977156283Srwatson*** as such. This will affect the creation of libtool libraries that 2978156283Srwatson*** depend on shared libraries, but programs linked with such libtool 2979156283Srwatson*** libraries will work regardless of this problem. Nevertheless, you 2980156283Srwatson*** may want to report the problem to your system manager and/or to 2981156283Srwatson*** bug-libtool@gnu.org 2982156283Srwatson 2983243750Srwatson_LT_EOF 2984156283Srwatson fi ;; 2985156283Srwatson esac 2986156283Srwatson fi 2987156283Srwatson break 2988156283Srwatson fi 2989156283Srwatson done 2990156283Srwatson IFS="$lt_save_ifs" 2991156283Srwatson MAGIC_CMD="$lt_save_MAGIC_CMD" 2992156283Srwatson ;; 2993156283Srwatsonesac]) 2994156283SrwatsonMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2995156283Srwatsonif test -n "$MAGIC_CMD"; then 2996156283Srwatson AC_MSG_RESULT($MAGIC_CMD) 2997156283Srwatsonelse 2998156283Srwatson AC_MSG_RESULT(no) 2999156283Srwatsonfi 3000243750Srwatson_LT_DECL([], [MAGIC_CMD], [0], 3001243750Srwatson [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3002243750Srwatson])# _LT_PATH_TOOL_PREFIX 3003156283Srwatson 3004243750Srwatson# Old name: 3005243750SrwatsonAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3006243750Srwatsondnl aclocal-1.4 backwards compatibility: 3007243750Srwatsondnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3008156283Srwatson 3009243750Srwatson 3010243750Srwatson# _LT_PATH_MAGIC 3011243750Srwatson# -------------- 3012173143Srwatson# find a file program which can recognize a shared library 3013243750Srwatsonm4_defun([_LT_PATH_MAGIC], 3014243750Srwatson[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3015156283Srwatsonif test -z "$lt_cv_path_MAGIC_CMD"; then 3016156283Srwatson if test -n "$ac_tool_prefix"; then 3017243750Srwatson _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3018156283Srwatson else 3019156283Srwatson MAGIC_CMD=: 3020156283Srwatson fi 3021156283Srwatsonfi 3022243750Srwatson])# _LT_PATH_MAGIC 3023156283Srwatson 3024156283Srwatson 3025243750Srwatson# LT_PATH_LD 3026156283Srwatson# ---------- 3027156283Srwatson# find the pathname to the GNU or non-GNU linker 3028243750SrwatsonAC_DEFUN([LT_PATH_LD], 3029243750Srwatson[AC_REQUIRE([AC_PROG_CC])dnl 3030243750SrwatsonAC_REQUIRE([AC_CANONICAL_HOST])dnl 3031243750SrwatsonAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3032243750Srwatsonm4_require([_LT_DECL_SED])dnl 3033243750Srwatsonm4_require([_LT_DECL_EGREP])dnl 3034243750Srwatsonm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3035243750Srwatson 3036243750SrwatsonAC_ARG_WITH([gnu-ld], 3037243750Srwatson [AS_HELP_STRING([--with-gnu-ld], 3038156283Srwatson [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3039156283Srwatson [test "$withval" = no || with_gnu_ld=yes], 3040243750Srwatson [with_gnu_ld=no])dnl 3041243750Srwatson 3042156283Srwatsonac_prog=ld 3043156283Srwatsonif test "$GCC" = yes; then 3044156283Srwatson # Check if gcc -print-prog-name=ld gives a path. 3045156283Srwatson AC_MSG_CHECKING([for ld used by $CC]) 3046156283Srwatson case $host in 3047156283Srwatson *-*-mingw*) 3048156283Srwatson # gcc leaves a trailing carriage return which upsets mingw 3049156283Srwatson ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3050156283Srwatson *) 3051156283Srwatson ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3052156283Srwatson esac 3053156283Srwatson case $ac_prog in 3054156283Srwatson # Accept absolute paths. 3055156283Srwatson [[\\/]]* | ?:[[\\/]]*) 3056156283Srwatson re_direlt='/[[^/]][[^/]]*/\.\./' 3057156283Srwatson # Canonicalize the pathname of ld 3058243750Srwatson ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3059243750Srwatson while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3060243750Srwatson ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3061156283Srwatson done 3062156283Srwatson test -z "$LD" && LD="$ac_prog" 3063156283Srwatson ;; 3064156283Srwatson "") 3065156283Srwatson # If it fails, then pretend we aren't using GCC. 3066156283Srwatson ac_prog=ld 3067156283Srwatson ;; 3068156283Srwatson *) 3069156283Srwatson # If it is relative, then search for the first ld in PATH. 3070156283Srwatson with_gnu_ld=unknown 3071156283Srwatson ;; 3072156283Srwatson esac 3073156283Srwatsonelif test "$with_gnu_ld" = yes; then 3074156283Srwatson AC_MSG_CHECKING([for GNU ld]) 3075156283Srwatsonelse 3076156283Srwatson AC_MSG_CHECKING([for non-GNU ld]) 3077156283Srwatsonfi 3078156283SrwatsonAC_CACHE_VAL(lt_cv_path_LD, 3079156283Srwatson[if test -z "$LD"; then 3080156283Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3081156283Srwatson for ac_dir in $PATH; do 3082156283Srwatson IFS="$lt_save_ifs" 3083156283Srwatson test -z "$ac_dir" && ac_dir=. 3084156283Srwatson if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3085156283Srwatson lt_cv_path_LD="$ac_dir/$ac_prog" 3086156283Srwatson # Check to see if the program is GNU ld. I'd rather use --version, 3087156283Srwatson # but apparently some variants of GNU ld only accept -v. 3088156283Srwatson # Break only if it was the GNU/non-GNU ld that we prefer. 3089156283Srwatson case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3090156283Srwatson *GNU* | *'with BFD'*) 3091156283Srwatson test "$with_gnu_ld" != no && break 3092156283Srwatson ;; 3093156283Srwatson *) 3094156283Srwatson test "$with_gnu_ld" != yes && break 3095156283Srwatson ;; 3096156283Srwatson esac 3097156283Srwatson fi 3098156283Srwatson done 3099156283Srwatson IFS="$lt_save_ifs" 3100156283Srwatsonelse 3101156283Srwatson lt_cv_path_LD="$LD" # Let the user override the test with a path. 3102156283Srwatsonfi]) 3103156283SrwatsonLD="$lt_cv_path_LD" 3104156283Srwatsonif test -n "$LD"; then 3105156283Srwatson AC_MSG_RESULT($LD) 3106156283Srwatsonelse 3107156283Srwatson AC_MSG_RESULT(no) 3108156283Srwatsonfi 3109156283Srwatsontest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3110243750Srwatson_LT_PATH_LD_GNU 3111243750SrwatsonAC_SUBST([LD]) 3112156283Srwatson 3113243750Srwatson_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3114243750Srwatson])# LT_PATH_LD 3115156283Srwatson 3116243750Srwatson# Old names: 3117243750SrwatsonAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3118243750SrwatsonAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3119243750Srwatsondnl aclocal-1.4 backwards compatibility: 3120243750Srwatsondnl AC_DEFUN([AM_PROG_LD], []) 3121243750Srwatsondnl AC_DEFUN([AC_PROG_LD], []) 3122243750Srwatson 3123243750Srwatson 3124243750Srwatson# _LT_PATH_LD_GNU 3125243750Srwatson#- -------------- 3126243750Srwatsonm4_defun([_LT_PATH_LD_GNU], 3127243750Srwatson[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3128156283Srwatson[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3129156283Srwatsoncase `$LD -v 2>&1 </dev/null` in 3130156283Srwatson*GNU* | *'with BFD'*) 3131156283Srwatson lt_cv_prog_gnu_ld=yes 3132156283Srwatson ;; 3133156283Srwatson*) 3134156283Srwatson lt_cv_prog_gnu_ld=no 3135156283Srwatson ;; 3136156283Srwatsonesac]) 3137156283Srwatsonwith_gnu_ld=$lt_cv_prog_gnu_ld 3138243750Srwatson])# _LT_PATH_LD_GNU 3139156283Srwatson 3140156283Srwatson 3141243750Srwatson# _LT_CMD_RELOAD 3142243750Srwatson# -------------- 3143156283Srwatson# find reload flag for linker 3144156283Srwatson# -- PORTME Some linkers may need a different reload flag. 3145243750Srwatsonm4_defun([_LT_CMD_RELOAD], 3146156283Srwatson[AC_CACHE_CHECK([for $LD option to reload object files], 3147156283Srwatson lt_cv_ld_reload_flag, 3148156283Srwatson [lt_cv_ld_reload_flag='-r']) 3149156283Srwatsonreload_flag=$lt_cv_ld_reload_flag 3150156283Srwatsoncase $reload_flag in 3151156283Srwatson"" | " "*) ;; 3152156283Srwatson*) reload_flag=" $reload_flag" ;; 3153156283Srwatsonesac 3154156283Srwatsonreload_cmds='$LD$reload_flag -o $output$reload_objs' 3155156283Srwatsoncase $host_os in 3156243750Srwatson cygwin* | mingw* | pw32* | cegcc*) 3157243750Srwatson if test "$GCC" != yes; then 3158243750Srwatson reload_cmds=false 3159243750Srwatson fi 3160243750Srwatson ;; 3161156283Srwatson darwin*) 3162156283Srwatson if test "$GCC" = yes; then 3163173143Srwatson reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3164156283Srwatson else 3165156283Srwatson reload_cmds='$LD$reload_flag -o $output$reload_objs' 3166156283Srwatson fi 3167156283Srwatson ;; 3168156283Srwatsonesac 3169243750Srwatson_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3170243750Srwatson_LT_TAGDECL([], [reload_cmds], [2])dnl 3171243750Srwatson])# _LT_CMD_RELOAD 3172156283Srwatson 3173156283Srwatson 3174243750Srwatson# _LT_CHECK_MAGIC_METHOD 3175243750Srwatson# ---------------------- 3176156283Srwatson# how to check for library dependencies 3177156283Srwatson# -- PORTME fill in with the dynamic library characteristics 3178243750Srwatsonm4_defun([_LT_CHECK_MAGIC_METHOD], 3179243750Srwatson[m4_require([_LT_DECL_EGREP]) 3180243750Srwatsonm4_require([_LT_DECL_OBJDUMP]) 3181243750SrwatsonAC_CACHE_CHECK([how to recognize dependent libraries], 3182156283Srwatsonlt_cv_deplibs_check_method, 3183156283Srwatson[lt_cv_file_magic_cmd='$MAGIC_CMD' 3184156283Srwatsonlt_cv_file_magic_test_file= 3185156283Srwatsonlt_cv_deplibs_check_method='unknown' 3186156283Srwatson# Need to set the preceding variable on all platforms that support 3187156283Srwatson# interlibrary dependencies. 3188156283Srwatson# 'none' -- dependencies not supported. 3189156283Srwatson# `unknown' -- same as none, but documents that we really don't know. 3190156283Srwatson# 'pass_all' -- all dependencies passed with no checks. 3191156283Srwatson# 'test_compile' -- check by making test program. 3192156283Srwatson# 'file_magic [[regex]]' -- check by looking for files in library path 3193156283Srwatson# which responds to the $file_magic_cmd with a given extended regex. 3194156283Srwatson# If you have `file' or equivalent on your system and you're not sure 3195156283Srwatson# whether `pass_all' will *always* work, you probably want this one. 3196156283Srwatson 3197156283Srwatsoncase $host_os in 3198191273Srwatsonaix[[4-9]]*) 3199156283Srwatson lt_cv_deplibs_check_method=pass_all 3200156283Srwatson ;; 3201156283Srwatson 3202156283Srwatsonbeos*) 3203156283Srwatson lt_cv_deplibs_check_method=pass_all 3204156283Srwatson ;; 3205156283Srwatson 3206156283Srwatsonbsdi[[45]]*) 3207156283Srwatson lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3208156283Srwatson lt_cv_file_magic_cmd='/usr/bin/file -L' 3209156283Srwatson lt_cv_file_magic_test_file=/shlib/libc.so 3210156283Srwatson ;; 3211156283Srwatson 3212156283Srwatsoncygwin*) 3213156283Srwatson # func_win32_libid is a shell function defined in ltmain.sh 3214156283Srwatson lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3215156283Srwatson lt_cv_file_magic_cmd='func_win32_libid' 3216156283Srwatson ;; 3217156283Srwatson 3218156283Srwatsonmingw* | pw32*) 3219156283Srwatson # Base MSYS/MinGW do not provide the 'file' command needed by 3220173143Srwatson # func_win32_libid shell function, so use a weaker test based on 'objdump', 3221173143Srwatson # unless we find 'file', for example because we are cross-compiling. 3222243750Srwatson # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3223243750Srwatson if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 3224173143Srwatson lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3225173143Srwatson lt_cv_file_magic_cmd='func_win32_libid' 3226173143Srwatson else 3227243750Srwatson # Keep this pattern in sync with the one in func_win32_libid. 3228243750Srwatson lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3229173143Srwatson lt_cv_file_magic_cmd='$OBJDUMP -f' 3230173143Srwatson fi 3231156283Srwatson ;; 3232156283Srwatson 3233243750Srwatsoncegcc*) 3234243750Srwatson # use the weaker test based on 'objdump'. See mingw*. 3235243750Srwatson lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3236243750Srwatson lt_cv_file_magic_cmd='$OBJDUMP -f' 3237243750Srwatson ;; 3238243750Srwatson 3239156283Srwatsondarwin* | rhapsody*) 3240156283Srwatson lt_cv_deplibs_check_method=pass_all 3241156283Srwatson ;; 3242156283Srwatson 3243173143Srwatsonfreebsd* | dragonfly*) 3244243750Srwatson if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3245156283Srwatson case $host_cpu in 3246156283Srwatson i*86 ) 3247156283Srwatson # Not sure whether the presence of OpenBSD here was a mistake. 3248156283Srwatson # Let's accept both of them until this is cleared up. 3249156283Srwatson lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3250156283Srwatson lt_cv_file_magic_cmd=/usr/bin/file 3251156283Srwatson lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3252156283Srwatson ;; 3253156283Srwatson esac 3254156283Srwatson else 3255156283Srwatson lt_cv_deplibs_check_method=pass_all 3256156283Srwatson fi 3257156283Srwatson ;; 3258156283Srwatson 3259156283Srwatsongnu*) 3260156283Srwatson lt_cv_deplibs_check_method=pass_all 3261156283Srwatson ;; 3262156283Srwatson 3263243750Srwatsonhaiku*) 3264243750Srwatson lt_cv_deplibs_check_method=pass_all 3265243750Srwatson ;; 3266243750Srwatson 3267156283Srwatsonhpux10.20* | hpux11*) 3268156283Srwatson lt_cv_file_magic_cmd=/usr/bin/file 3269156283Srwatson case $host_cpu in 3270156283Srwatson ia64*) 3271156283Srwatson lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3272156283Srwatson lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3273156283Srwatson ;; 3274156283Srwatson hppa*64*) 3275243750Srwatson [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]'] 3276156283Srwatson lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3277156283Srwatson ;; 3278156283Srwatson *) 3279243750Srwatson lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3280156283Srwatson lt_cv_file_magic_test_file=/usr/lib/libc.sl 3281156283Srwatson ;; 3282156283Srwatson esac 3283156283Srwatson ;; 3284156283Srwatson 3285173143Srwatsoninterix[[3-9]]*) 3286173143Srwatson # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3287173143Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3288173143Srwatson ;; 3289173143Srwatson 3290156283Srwatsonirix5* | irix6* | nonstopux*) 3291156283Srwatson case $LD in 3292156283Srwatson *-32|*"-32 ") libmagic=32-bit;; 3293156283Srwatson *-n32|*"-n32 ") libmagic=N32;; 3294156283Srwatson *-64|*"-64 ") libmagic=64-bit;; 3295156283Srwatson *) libmagic=never-match;; 3296156283Srwatson esac 3297156283Srwatson lt_cv_deplibs_check_method=pass_all 3298156283Srwatson ;; 3299156283Srwatson 3300243750Srwatson# This must be glibc/ELF. 3301243750Srwatsonlinux* | k*bsd*-gnu | kopensolaris*-gnu) 3302156283Srwatson lt_cv_deplibs_check_method=pass_all 3303156283Srwatson ;; 3304156283Srwatson 3305156283Srwatsonnetbsd*) 3306243750Srwatson if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3307156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3308156283Srwatson else 3309156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3310156283Srwatson fi 3311156283Srwatson ;; 3312156283Srwatson 3313156283Srwatsonnewos6*) 3314156283Srwatson lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3315156283Srwatson lt_cv_file_magic_cmd=/usr/bin/file 3316156283Srwatson lt_cv_file_magic_test_file=/usr/lib/libnls.so 3317156283Srwatson ;; 3318156283Srwatson 3319243750Srwatson*nto* | *qnx*) 3320243750Srwatson lt_cv_deplibs_check_method=pass_all 3321156283Srwatson ;; 3322156283Srwatson 3323156283Srwatsonopenbsd*) 3324243750Srwatson if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3325156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3326156283Srwatson else 3327156283Srwatson lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3328156283Srwatson fi 3329156283Srwatson ;; 3330156283Srwatson 3331156283Srwatsonosf3* | osf4* | osf5*) 3332156283Srwatson lt_cv_deplibs_check_method=pass_all 3333156283Srwatson ;; 3334156283Srwatson 3335173143Srwatsonrdos*) 3336156283Srwatson lt_cv_deplibs_check_method=pass_all 3337156283Srwatson ;; 3338156283Srwatson 3339156283Srwatsonsolaris*) 3340156283Srwatson lt_cv_deplibs_check_method=pass_all 3341156283Srwatson ;; 3342156283Srwatson 3343243750Srwatsonsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3344243750Srwatson lt_cv_deplibs_check_method=pass_all 3345243750Srwatson ;; 3346243750Srwatson 3347173143Srwatsonsysv4 | sysv4.3*) 3348156283Srwatson case $host_vendor in 3349156283Srwatson motorola) 3350156283Srwatson 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]]' 3351156283Srwatson lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3352156283Srwatson ;; 3353156283Srwatson ncr) 3354156283Srwatson lt_cv_deplibs_check_method=pass_all 3355156283Srwatson ;; 3356156283Srwatson sequent) 3357156283Srwatson lt_cv_file_magic_cmd='/bin/file' 3358156283Srwatson lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3359156283Srwatson ;; 3360156283Srwatson sni) 3361156283Srwatson lt_cv_file_magic_cmd='/bin/file' 3362156283Srwatson lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3363156283Srwatson lt_cv_file_magic_test_file=/lib/libc.so 3364156283Srwatson ;; 3365156283Srwatson siemens) 3366156283Srwatson lt_cv_deplibs_check_method=pass_all 3367156283Srwatson ;; 3368173143Srwatson pc) 3369173143Srwatson lt_cv_deplibs_check_method=pass_all 3370173143Srwatson ;; 3371156283Srwatson esac 3372156283Srwatson ;; 3373156283Srwatson 3374243750Srwatsontpf*) 3375156283Srwatson lt_cv_deplibs_check_method=pass_all 3376156283Srwatson ;; 3377156283Srwatsonesac 3378156283Srwatson]) 3379243750Srwatson 3380243750Srwatsonfile_magic_glob= 3381243750Srwatsonwant_nocaseglob=no 3382243750Srwatsonif test "$build" = "$host"; then 3383243750Srwatson case $host_os in 3384243750Srwatson mingw* | pw32*) 3385243750Srwatson if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3386243750Srwatson want_nocaseglob=yes 3387243750Srwatson else 3388243750Srwatson file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3389243750Srwatson fi 3390243750Srwatson ;; 3391243750Srwatson esac 3392243750Srwatsonfi 3393243750Srwatson 3394156283Srwatsonfile_magic_cmd=$lt_cv_file_magic_cmd 3395156283Srwatsondeplibs_check_method=$lt_cv_deplibs_check_method 3396156283Srwatsontest -z "$deplibs_check_method" && deplibs_check_method=unknown 3397156283Srwatson 3398243750Srwatson_LT_DECL([], [deplibs_check_method], [1], 3399243750Srwatson [Method to check whether dependent libraries are shared objects]) 3400243750Srwatson_LT_DECL([], [file_magic_cmd], [1], 3401243750Srwatson [Command to use when deplibs_check_method = "file_magic"]) 3402243750Srwatson_LT_DECL([], [file_magic_glob], [1], 3403243750Srwatson [How to find potential files when deplibs_check_method = "file_magic"]) 3404243750Srwatson_LT_DECL([], [want_nocaseglob], [1], 3405243750Srwatson [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3406243750Srwatson])# _LT_CHECK_MAGIC_METHOD 3407156283Srwatson 3408243750Srwatson 3409243750Srwatson# LT_PATH_NM 3410156283Srwatson# ---------- 3411243750Srwatson# find the pathname to a BSD- or MS-compatible name lister 3412243750SrwatsonAC_DEFUN([LT_PATH_NM], 3413243750Srwatson[AC_REQUIRE([AC_PROG_CC])dnl 3414243750SrwatsonAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3415156283Srwatson[if test -n "$NM"; then 3416156283Srwatson # Let the user override the test. 3417156283Srwatson lt_cv_path_NM="$NM" 3418156283Srwatsonelse 3419173143Srwatson lt_nm_to_check="${ac_tool_prefix}nm" 3420173143Srwatson if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3421173143Srwatson lt_nm_to_check="$lt_nm_to_check nm" 3422173143Srwatson fi 3423173143Srwatson for lt_tmp_nm in $lt_nm_to_check; do 3424173143Srwatson lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3425173143Srwatson for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3426173143Srwatson IFS="$lt_save_ifs" 3427173143Srwatson test -z "$ac_dir" && ac_dir=. 3428173143Srwatson tmp_nm="$ac_dir/$lt_tmp_nm" 3429173143Srwatson if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3430173143Srwatson # Check to see if the nm accepts a BSD-compat flag. 3431173143Srwatson # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3432173143Srwatson # nm: unknown option "B" ignored 3433173143Srwatson # Tru64's nm complains that /dev/null is an invalid object file 3434173143Srwatson case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3435173143Srwatson */dev/null* | *'Invalid file or object type'*) 3436173143Srwatson lt_cv_path_NM="$tmp_nm -B" 3437156283Srwatson break 3438156283Srwatson ;; 3439156283Srwatson *) 3440173143Srwatson case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3441173143Srwatson */dev/null*) 3442173143Srwatson lt_cv_path_NM="$tmp_nm -p" 3443173143Srwatson break 3444173143Srwatson ;; 3445173143Srwatson *) 3446173143Srwatson lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3447173143Srwatson continue # so that we can try to find one that supports BSD flags 3448173143Srwatson ;; 3449173143Srwatson esac 3450156283Srwatson ;; 3451156283Srwatson esac 3452173143Srwatson fi 3453173143Srwatson done 3454173143Srwatson IFS="$lt_save_ifs" 3455156283Srwatson done 3456243750Srwatson : ${lt_cv_path_NM=no} 3457156283Srwatsonfi]) 3458243750Srwatsonif test "$lt_cv_path_NM" != "no"; then 3459243750Srwatson NM="$lt_cv_path_NM" 3460243750Srwatsonelse 3461243750Srwatson # Didn't find any BSD compatible name lister, look for dumpbin. 3462243750Srwatson if test -n "$DUMPBIN"; then : 3463243750Srwatson # Let the user override the test. 3464156283Srwatson else 3465243750Srwatson AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3466243750Srwatson case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3467243750Srwatson *COFF*) 3468243750Srwatson DUMPBIN="$DUMPBIN -symbols" 3469243750Srwatson ;; 3470243750Srwatson *) 3471243750Srwatson DUMPBIN=: 3472243750Srwatson ;; 3473243750Srwatson esac 3474156283Srwatson fi 3475243750Srwatson AC_SUBST([DUMPBIN]) 3476243750Srwatson if test "$DUMPBIN" != ":"; then 3477243750Srwatson NM="$DUMPBIN" 3478156283Srwatson fi 3479156283Srwatsonfi 3480243750Srwatsontest -z "$NM" && NM=nm 3481243750SrwatsonAC_SUBST([NM]) 3482243750Srwatson_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3483156283Srwatson 3484243750SrwatsonAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3485243750Srwatson [lt_cv_nm_interface="BSD nm" 3486243750Srwatson echo "int some_variable = 0;" > conftest.$ac_ext 3487243750Srwatson (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3488243750Srwatson (eval "$ac_compile" 2>conftest.err) 3489243750Srwatson cat conftest.err >&AS_MESSAGE_LOG_FD 3490243750Srwatson (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3491243750Srwatson (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3492243750Srwatson cat conftest.err >&AS_MESSAGE_LOG_FD 3493243750Srwatson (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3494243750Srwatson cat conftest.out >&AS_MESSAGE_LOG_FD 3495243750Srwatson if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3496243750Srwatson lt_cv_nm_interface="MS dumpbin" 3497156283Srwatson fi 3498243750Srwatson rm -f conftest*]) 3499243750Srwatson])# LT_PATH_NM 3500156283Srwatson 3501243750Srwatson# Old names: 3502243750SrwatsonAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3503243750SrwatsonAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3504243750Srwatsondnl aclocal-1.4 backwards compatibility: 3505243750Srwatsondnl AC_DEFUN([AM_PROG_NM], []) 3506243750Srwatsondnl AC_DEFUN([AC_PROG_NM], []) 3507156283Srwatson 3508243750Srwatson# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3509243750Srwatson# -------------------------------- 3510243750Srwatson# how to determine the name of the shared library 3511243750Srwatson# associated with a specific link library. 3512243750Srwatson# -- PORTME fill in with the dynamic library characteristics 3513243750Srwatsonm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3514243750Srwatson[m4_require([_LT_DECL_EGREP]) 3515243750Srwatsonm4_require([_LT_DECL_OBJDUMP]) 3516243750Srwatsonm4_require([_LT_DECL_DLLTOOL]) 3517243750SrwatsonAC_CACHE_CHECK([how to associate runtime and link libraries], 3518243750Srwatsonlt_cv_sharedlib_from_linklib_cmd, 3519243750Srwatson[lt_cv_sharedlib_from_linklib_cmd='unknown' 3520156283Srwatson 3521156283Srwatsoncase $host_os in 3522243750Srwatsoncygwin* | mingw* | pw32* | cegcc*) 3523243750Srwatson # two different shell functions defined in ltmain.sh 3524243750Srwatson # decide which to use based on capabilities of $DLLTOOL 3525243750Srwatson case `$DLLTOOL --help 2>&1` in 3526243750Srwatson *--identify-strict*) 3527243750Srwatson lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3528156283Srwatson ;; 3529156283Srwatson *) 3530243750Srwatson lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3531156283Srwatson ;; 3532173143Srwatson esac 3533173143Srwatson ;; 3534243750Srwatson*) 3535243750Srwatson # fallback: assume linklib IS sharedlib 3536243750Srwatson lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3537173143Srwatson ;; 3538156283Srwatsonesac 3539156283Srwatson]) 3540243750Srwatsonsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3541243750Srwatsontest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3542156283Srwatson 3543243750Srwatson_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3544243750Srwatson [Command to associate shared and link libraries]) 3545243750Srwatson])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3546156283Srwatson 3547156283Srwatson 3548243750Srwatson# _LT_PATH_MANIFEST_TOOL 3549243750Srwatson# ---------------------- 3550243750Srwatson# locate the manifest tool 3551243750Srwatsonm4_defun([_LT_PATH_MANIFEST_TOOL], 3552243750Srwatson[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3553243750Srwatsontest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3554243750SrwatsonAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3555243750Srwatson [lt_cv_path_mainfest_tool=no 3556243750Srwatson echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3557243750Srwatson $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3558243750Srwatson cat conftest.err >&AS_MESSAGE_LOG_FD 3559243750Srwatson if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3560243750Srwatson lt_cv_path_mainfest_tool=yes 3561243750Srwatson fi 3562243750Srwatson rm -f conftest*]) 3563243750Srwatsonif test "x$lt_cv_path_mainfest_tool" != xyes; then 3564243750Srwatson MANIFEST_TOOL=: 3565243750Srwatsonfi 3566243750Srwatson_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3567243750Srwatson])# _LT_PATH_MANIFEST_TOOL 3568156283Srwatson 3569156283Srwatson 3570243750Srwatson# LT_LIB_M 3571243750Srwatson# -------- 3572243750Srwatson# check for math library 3573243750SrwatsonAC_DEFUN([LT_LIB_M], 3574243750Srwatson[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3575243750SrwatsonLIBM= 3576243750Srwatsoncase $host in 3577243750Srwatson*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3578243750Srwatson # These system don't have libm, or don't need it 3579156283Srwatson ;; 3580243750Srwatson*-ncr-sysv4.3*) 3581243750Srwatson AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3582243750Srwatson AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3583156283Srwatson ;; 3584243750Srwatson*) 3585243750Srwatson AC_CHECK_LIB(m, cos, LIBM="-lm") 3586243750Srwatson ;; 3587156283Srwatsonesac 3588243750SrwatsonAC_SUBST([LIBM]) 3589243750Srwatson])# LT_LIB_M 3590156283Srwatson 3591243750Srwatson# Old name: 3592243750SrwatsonAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3593243750Srwatsondnl aclocal-1.4 backwards compatibility: 3594243750Srwatsondnl AC_DEFUN([AC_CHECK_LIBM], []) 3595156283Srwatson 3596156283Srwatson 3597243750Srwatson# _LT_COMPILER_NO_RTTI([TAGNAME]) 3598243750Srwatson# ------------------------------- 3599243750Srwatsonm4_defun([_LT_COMPILER_NO_RTTI], 3600243750Srwatson[m4_require([_LT_TAG_COMPILER])dnl 3601156283Srwatson 3602243750Srwatson_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3603156283Srwatson 3604243750Srwatsonif test "$GCC" = yes; then 3605243750Srwatson case $cc_basename in 3606243750Srwatson nvcc*) 3607243750Srwatson _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3608243750Srwatson *) 3609243750Srwatson _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3610156283Srwatson esac 3611156283Srwatson 3612243750Srwatson _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3613156283Srwatson lt_cv_prog_compiler_rtti_exceptions, 3614156283Srwatson [-fno-rtti -fno-exceptions], [], 3615243750Srwatson [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3616156283Srwatsonfi 3617243750Srwatson_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3618243750Srwatson [Compiler flag to turn off builtin functions]) 3619243750Srwatson])# _LT_COMPILER_NO_RTTI 3620156283Srwatson 3621156283Srwatson 3622243750Srwatson# _LT_CMD_GLOBAL_SYMBOLS 3623243750Srwatson# ---------------------- 3624243750Srwatsonm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3625243750Srwatson[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3626243750SrwatsonAC_REQUIRE([AC_PROG_CC])dnl 3627243750SrwatsonAC_REQUIRE([AC_PROG_AWK])dnl 3628243750SrwatsonAC_REQUIRE([LT_PATH_NM])dnl 3629243750SrwatsonAC_REQUIRE([LT_PATH_LD])dnl 3630243750Srwatsonm4_require([_LT_DECL_SED])dnl 3631243750Srwatsonm4_require([_LT_DECL_EGREP])dnl 3632243750Srwatsonm4_require([_LT_TAG_COMPILER])dnl 3633243750Srwatson 3634156283Srwatson# Check for command to grab the raw symbol name followed by C symbol from nm. 3635156283SrwatsonAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3636156283SrwatsonAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3637156283Srwatson[ 3638156283Srwatson# These are sane defaults that work on at least a few old systems. 3639156283Srwatson# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3640156283Srwatson 3641156283Srwatson# Character class describing NM global symbol codes. 3642156283Srwatsonsymcode='[[BCDEGRST]]' 3643156283Srwatson 3644156283Srwatson# Regexp to match symbols that can be accessed directly from C. 3645156283Srwatsonsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3646156283Srwatson 3647156283Srwatson# Define system-specific variables. 3648156283Srwatsoncase $host_os in 3649156283Srwatsonaix*) 3650156283Srwatson symcode='[[BCDT]]' 3651156283Srwatson ;; 3652243750Srwatsoncygwin* | mingw* | pw32* | cegcc*) 3653156283Srwatson symcode='[[ABCDGISTW]]' 3654156283Srwatson ;; 3655243750Srwatsonhpux*) 3656156283Srwatson if test "$host_cpu" = ia64; then 3657156283Srwatson symcode='[[ABCDEGRST]]' 3658156283Srwatson fi 3659156283Srwatson ;; 3660156283Srwatsonirix* | nonstopux*) 3661156283Srwatson symcode='[[BCDEGRST]]' 3662156283Srwatson ;; 3663156283Srwatsonosf*) 3664156283Srwatson symcode='[[BCDEGQRST]]' 3665156283Srwatson ;; 3666173143Srwatsonsolaris*) 3667156283Srwatson symcode='[[BDRT]]' 3668156283Srwatson ;; 3669173143Srwatsonsco3.2v5*) 3670173143Srwatson symcode='[[DT]]' 3671173143Srwatson ;; 3672173143Srwatsonsysv4.2uw2*) 3673173143Srwatson symcode='[[DT]]' 3674173143Srwatson ;; 3675173143Srwatsonsysv5* | sco5v6* | unixware* | OpenUNIX*) 3676173143Srwatson symcode='[[ABDT]]' 3677173143Srwatson ;; 3678156283Srwatsonsysv4) 3679156283Srwatson symcode='[[DFNSTU]]' 3680156283Srwatson ;; 3681156283Srwatsonesac 3682156283Srwatson 3683243750Srwatson# If we're using GNU nm, then use its standard symbol codes. 3684243750Srwatsoncase `$NM -V 2>&1` in 3685243750Srwatson*GNU* | *'with BFD'*) 3686243750Srwatson symcode='[[ABCDGIRSTW]]' ;; 3687243750Srwatsonesac 3688243750Srwatson 3689243750Srwatson# Transform an extracted symbol line into a proper C declaration. 3690243750Srwatson# Some systems (esp. on ia64) link data and code symbols differently, 3691243750Srwatson# so use this general approach. 3692243750Srwatsonlt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3693243750Srwatson 3694243750Srwatson# Transform an extracted symbol line into symbol name and symbol address 3695243750Srwatsonlt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3696243750Srwatsonlt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 3697243750Srwatson 3698156283Srwatson# Handle CRLF in mingw tool chain 3699156283Srwatsonopt_cr= 3700156283Srwatsoncase $build_os in 3701156283Srwatsonmingw*) 3702243750Srwatson opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3703156283Srwatson ;; 3704156283Srwatsonesac 3705156283Srwatson 3706243750Srwatson# Try without a prefix underscore, then with it. 3707156283Srwatsonfor ac_symprfx in "" "_"; do 3708156283Srwatson 3709156283Srwatson # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3710156283Srwatson symxfrm="\\1 $ac_symprfx\\2 \\2" 3711156283Srwatson 3712156283Srwatson # Write the raw and C identifiers. 3713243750Srwatson if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3714243750Srwatson # Fake it for dumpbin and say T for any non-static function 3715243750Srwatson # and D for any global variable. 3716243750Srwatson # Also find C++ and __fastcall symbols from MSVC++, 3717243750Srwatson # which start with @ or ?. 3718243750Srwatson lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3719243750Srwatson" {last_section=section; section=\$ 3};"\ 3720243750Srwatson" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3721243750Srwatson" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3722243750Srwatson" \$ 0!~/External *\|/{next};"\ 3723243750Srwatson" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3724243750Srwatson" {if(hide[section]) next};"\ 3725243750Srwatson" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3726243750Srwatson" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3727243750Srwatson" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3728243750Srwatson" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3729243750Srwatson" ' prfx=^$ac_symprfx]" 3730243750Srwatson else 3731243750Srwatson lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3732243750Srwatson fi 3733243750Srwatson lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 3734156283Srwatson 3735156283Srwatson # Check to see that the pipe works correctly. 3736156283Srwatson pipe_works=no 3737156283Srwatson 3738156283Srwatson rm -f conftest* 3739243750Srwatson cat > conftest.$ac_ext <<_LT_EOF 3740156283Srwatson#ifdef __cplusplus 3741156283Srwatsonextern "C" { 3742156283Srwatson#endif 3743156283Srwatsonchar nm_test_var; 3744243750Srwatsonvoid nm_test_func(void); 3745243750Srwatsonvoid nm_test_func(void){} 3746156283Srwatson#ifdef __cplusplus 3747156283Srwatson} 3748156283Srwatson#endif 3749156283Srwatsonint main(){nm_test_var='a';nm_test_func();return(0);} 3750243750Srwatson_LT_EOF 3751156283Srwatson 3752156283Srwatson if AC_TRY_EVAL(ac_compile); then 3753156283Srwatson # Now try to grab the symbols. 3754156283Srwatson nlist=conftest.nm 3755243750Srwatson if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3756156283Srwatson # Try sorting and uniquifying the output. 3757156283Srwatson if sort "$nlist" | uniq > "$nlist"T; then 3758156283Srwatson mv -f "$nlist"T "$nlist" 3759156283Srwatson else 3760156283Srwatson rm -f "$nlist"T 3761156283Srwatson fi 3762156283Srwatson 3763156283Srwatson # Make sure that we snagged all the symbols we need. 3764243750Srwatson if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3765243750Srwatson if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3766243750Srwatson cat <<_LT_EOF > conftest.$ac_ext 3767243750Srwatson/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3768243750Srwatson#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3769243750Srwatson/* DATA imports from DLLs on WIN32 con't be const, because runtime 3770243750Srwatson relocations are performed -- see ld's documentation on pseudo-relocs. */ 3771243750Srwatson# define LT@&t@_DLSYM_CONST 3772243750Srwatson#elif defined(__osf__) 3773243750Srwatson/* This system does not cope well with relocations in const data. */ 3774243750Srwatson# define LT@&t@_DLSYM_CONST 3775243750Srwatson#else 3776243750Srwatson# define LT@&t@_DLSYM_CONST const 3777243750Srwatson#endif 3778243750Srwatson 3779156283Srwatson#ifdef __cplusplus 3780156283Srwatsonextern "C" { 3781156283Srwatson#endif 3782156283Srwatson 3783243750Srwatson_LT_EOF 3784156283Srwatson # Now generate the symbol file. 3785243750Srwatson eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3786156283Srwatson 3787243750Srwatson cat <<_LT_EOF >> conftest.$ac_ext 3788156283Srwatson 3789243750Srwatson/* The mapping between symbol names and symbols. */ 3790243750SrwatsonLT@&t@_DLSYM_CONST struct { 3791156283Srwatson const char *name; 3792243750Srwatson void *address; 3793156283Srwatson} 3794243750Srwatsonlt__PROGRAM__LTX_preloaded_symbols[[]] = 3795156283Srwatson{ 3796243750Srwatson { "@PROGRAM@", (void *) 0 }, 3797243750Srwatson_LT_EOF 3798243750Srwatson $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3799243750Srwatson cat <<\_LT_EOF >> conftest.$ac_ext 3800243750Srwatson {0, (void *) 0} 3801156283Srwatson}; 3802156283Srwatson 3803243750Srwatson/* This works around a problem in FreeBSD linker */ 3804243750Srwatson#ifdef FREEBSD_WORKAROUND 3805243750Srwatsonstatic const void *lt_preloaded_setup() { 3806243750Srwatson return lt__PROGRAM__LTX_preloaded_symbols; 3807243750Srwatson} 3808243750Srwatson#endif 3809243750Srwatson 3810156283Srwatson#ifdef __cplusplus 3811156283Srwatson} 3812156283Srwatson#endif 3813243750Srwatson_LT_EOF 3814156283Srwatson # Now try linking the two files. 3815156283Srwatson mv conftest.$ac_objext conftstm.$ac_objext 3816243750Srwatson lt_globsym_save_LIBS=$LIBS 3817243750Srwatson lt_globsym_save_CFLAGS=$CFLAGS 3818156283Srwatson LIBS="conftstm.$ac_objext" 3819243750Srwatson CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3820156283Srwatson if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3821156283Srwatson pipe_works=yes 3822156283Srwatson fi 3823243750Srwatson LIBS=$lt_globsym_save_LIBS 3824243750Srwatson CFLAGS=$lt_globsym_save_CFLAGS 3825156283Srwatson else 3826156283Srwatson echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3827156283Srwatson fi 3828156283Srwatson else 3829156283Srwatson echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3830156283Srwatson fi 3831156283Srwatson else 3832156283Srwatson echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3833156283Srwatson fi 3834156283Srwatson else 3835156283Srwatson echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3836156283Srwatson cat conftest.$ac_ext >&5 3837156283Srwatson fi 3838191273Srwatson rm -rf conftest* conftst* 3839156283Srwatson 3840156283Srwatson # Do not use the global_symbol_pipe unless it works. 3841156283Srwatson if test "$pipe_works" = yes; then 3842156283Srwatson break 3843156283Srwatson else 3844156283Srwatson lt_cv_sys_global_symbol_pipe= 3845156283Srwatson fi 3846156283Srwatsondone 3847156283Srwatson]) 3848156283Srwatsonif test -z "$lt_cv_sys_global_symbol_pipe"; then 3849156283Srwatson lt_cv_sys_global_symbol_to_cdecl= 3850156283Srwatsonfi 3851156283Srwatsonif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3852156283Srwatson AC_MSG_RESULT(failed) 3853156283Srwatsonelse 3854156283Srwatson AC_MSG_RESULT(ok) 3855156283Srwatsonfi 3856156283Srwatson 3857243750Srwatson# Response file support. 3858243750Srwatsonif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3859243750Srwatson nm_file_list_spec='@' 3860243750Srwatsonelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3861243750Srwatson nm_file_list_spec='@' 3862243750Srwatsonfi 3863156283Srwatson 3864243750Srwatson_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3865243750Srwatson [Take the output of nm and produce a listing of raw symbols and C names]) 3866243750Srwatson_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3867243750Srwatson [Transform the output of nm in a proper C declaration]) 3868243750Srwatson_LT_DECL([global_symbol_to_c_name_address], 3869243750Srwatson [lt_cv_sys_global_symbol_to_c_name_address], [1], 3870243750Srwatson [Transform the output of nm in a C name address pair]) 3871243750Srwatson_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3872243750Srwatson [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3873243750Srwatson [Transform the output of nm in a C name address pair when lib prefix is needed]) 3874243750Srwatson_LT_DECL([], [nm_file_list_spec], [1], 3875243750Srwatson [Specify filename containing input files for $NM]) 3876243750Srwatson]) # _LT_CMD_GLOBAL_SYMBOLS 3877156283Srwatson 3878243750Srwatson 3879243750Srwatson# _LT_COMPILER_PIC([TAGNAME]) 3880243750Srwatson# --------------------------- 3881243750Srwatsonm4_defun([_LT_COMPILER_PIC], 3882243750Srwatson[m4_require([_LT_TAG_COMPILER])dnl 3883243750Srwatson_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3884243750Srwatson_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3885243750Srwatson_LT_TAGVAR(lt_prog_compiler_static, $1)= 3886243750Srwatson 3887243750Srwatsonm4_if([$1], [CXX], [ 3888156283Srwatson # C++ specific cases for pic, static, wl, etc. 3889156283Srwatson if test "$GXX" = yes; then 3890243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3891243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3892156283Srwatson 3893156283Srwatson case $host_os in 3894156283Srwatson aix*) 3895156283Srwatson # All AIX code is PIC. 3896156283Srwatson if test "$host_cpu" = ia64; then 3897156283Srwatson # AIX 5 now supports IA64 processor 3898243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3899156283Srwatson fi 3900156283Srwatson ;; 3901243750Srwatson 3902156283Srwatson amigaos*) 3903243750Srwatson case $host_cpu in 3904243750Srwatson powerpc) 3905243750Srwatson # see comment about AmigaOS4 .so support 3906243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3907243750Srwatson ;; 3908243750Srwatson m68k) 3909243750Srwatson # FIXME: we need at least 68020 code to build shared libraries, but 3910243750Srwatson # adding the `-m68020' flag to GCC prevents building anything better, 3911243750Srwatson # like `-m68040'. 3912243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3913243750Srwatson ;; 3914243750Srwatson esac 3915156283Srwatson ;; 3916243750Srwatson 3917173143Srwatson beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3918156283Srwatson # PIC is the default for these OSes. 3919156283Srwatson ;; 3920243750Srwatson mingw* | cygwin* | os2* | pw32* | cegcc*) 3921156283Srwatson # This hack is so that the source file can tell whether it is being 3922156283Srwatson # built for inclusion in a dll (and should export symbols for example). 3923173143Srwatson # Although the cygwin gcc ignores -fPIC, still need this for old-style 3924173143Srwatson # (--disable-auto-import) libraries 3925191273Srwatson m4_if([$1], [GCJ], [], 3926243750Srwatson [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3927156283Srwatson ;; 3928156283Srwatson darwin* | rhapsody*) 3929156283Srwatson # PIC is the default on this platform 3930156283Srwatson # Common symbols not allowed in MH_DYLIB files 3931243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3932156283Srwatson ;; 3933156283Srwatson *djgpp*) 3934156283Srwatson # DJGPP does not support shared libraries at all 3935243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3936156283Srwatson ;; 3937243750Srwatson haiku*) 3938243750Srwatson # PIC is the default for Haiku. 3939243750Srwatson # The "-static" flag exists, but is broken. 3940243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)= 3941243750Srwatson ;; 3942173143Srwatson interix[[3-9]]*) 3943173143Srwatson # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3944173143Srwatson # Instead, we relocate shared libraries at runtime. 3945173143Srwatson ;; 3946156283Srwatson sysv4*MP*) 3947156283Srwatson if test -d /usr/nec; then 3948243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3949156283Srwatson fi 3950156283Srwatson ;; 3951156283Srwatson hpux*) 3952243750Srwatson # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3953243750Srwatson # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3954243750Srwatson # sets the default TLS model and affects inlining. 3955156283Srwatson case $host_cpu in 3956243750Srwatson hppa*64*) 3957156283Srwatson ;; 3958156283Srwatson *) 3959243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3960156283Srwatson ;; 3961156283Srwatson esac 3962156283Srwatson ;; 3963243750Srwatson *qnx* | *nto*) 3964243750Srwatson # QNX uses GNU C++, but need to define -shared option too, otherwise 3965243750Srwatson # it will coredump. 3966243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3967243750Srwatson ;; 3968156283Srwatson *) 3969243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3970156283Srwatson ;; 3971156283Srwatson esac 3972156283Srwatson else 3973156283Srwatson case $host_os in 3974191273Srwatson aix[[4-9]]*) 3975156283Srwatson # All AIX code is PIC. 3976156283Srwatson if test "$host_cpu" = ia64; then 3977156283Srwatson # AIX 5 now supports IA64 processor 3978243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3979156283Srwatson else 3980243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3981156283Srwatson fi 3982156283Srwatson ;; 3983156283Srwatson chorus*) 3984156283Srwatson case $cc_basename in 3985156283Srwatson cxch68*) 3986156283Srwatson # Green Hills C++ Compiler 3987243750Srwatson # _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" 3988156283Srwatson ;; 3989156283Srwatson esac 3990156283Srwatson ;; 3991243750Srwatson mingw* | cygwin* | os2* | pw32* | cegcc*) 3992243750Srwatson # This hack is so that the source file can tell whether it is being 3993243750Srwatson # built for inclusion in a dll (and should export symbols for example). 3994243750Srwatson m4_if([$1], [GCJ], [], 3995243750Srwatson [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3996243750Srwatson ;; 3997156283Srwatson dgux*) 3998156283Srwatson case $cc_basename in 3999156283Srwatson ec++*) 4000243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4001156283Srwatson ;; 4002156283Srwatson ghcx*) 4003156283Srwatson # Green Hills C++ Compiler 4004243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4005156283Srwatson ;; 4006156283Srwatson *) 4007156283Srwatson ;; 4008156283Srwatson esac 4009156283Srwatson ;; 4010173143Srwatson freebsd* | dragonfly*) 4011156283Srwatson # FreeBSD uses GNU C++ 4012156283Srwatson ;; 4013156283Srwatson hpux9* | hpux10* | hpux11*) 4014156283Srwatson case $cc_basename in 4015156283Srwatson CC*) 4016243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4017243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4018156283Srwatson if test "$host_cpu" != ia64; then 4019243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4020156283Srwatson fi 4021156283Srwatson ;; 4022156283Srwatson aCC*) 4023243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4024243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4025156283Srwatson case $host_cpu in 4026156283Srwatson hppa*64*|ia64*) 4027156283Srwatson # +Z the default 4028156283Srwatson ;; 4029156283Srwatson *) 4030243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4031156283Srwatson ;; 4032156283Srwatson esac 4033156283Srwatson ;; 4034156283Srwatson *) 4035156283Srwatson ;; 4036156283Srwatson esac 4037156283Srwatson ;; 4038173143Srwatson interix*) 4039173143Srwatson # This is c89, which is MS Visual C++ (no shared libs) 4040173143Srwatson # Anyone wants to do a port? 4041173143Srwatson ;; 4042156283Srwatson irix5* | irix6* | nonstopux*) 4043156283Srwatson case $cc_basename in 4044156283Srwatson CC*) 4045243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4046243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4047156283Srwatson # CC pic flag -KPIC is the default. 4048156283Srwatson ;; 4049156283Srwatson *) 4050156283Srwatson ;; 4051156283Srwatson esac 4052156283Srwatson ;; 4053243750Srwatson linux* | k*bsd*-gnu | kopensolaris*-gnu) 4054156283Srwatson case $cc_basename in 4055156283Srwatson KCC*) 4056156283Srwatson # KAI C++ Compiler 4057243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4058243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4059156283Srwatson ;; 4060243750Srwatson ecpc* ) 4061243750Srwatson # old Intel C++ for x86_64 which still supported -KPIC. 4062243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4063243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4064243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4065156283Srwatson ;; 4066243750Srwatson icpc* ) 4067243750Srwatson # Intel C++, used to be incompatible with GCC. 4068243750Srwatson # ICC 10 doesn't accept -KPIC any more. 4069243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4070243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4071243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4072243750Srwatson ;; 4073191273Srwatson pgCC* | pgcpp*) 4074243750Srwatson # Portland Group C++ compiler 4075243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4076243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4077243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4078156283Srwatson ;; 4079156283Srwatson cxx*) 4080156283Srwatson # Compaq C++ 4081156283Srwatson # Make sure the PIC flag is empty. It appears that all Alpha 4082156283Srwatson # Linux and Compaq Tru64 Unix objects are PIC. 4083243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4084243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4085156283Srwatson ;; 4086243750Srwatson xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4087243750Srwatson # IBM XL 8.0, 9.0 on PPC and BlueGene 4088243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4089243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4090243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4091243750Srwatson ;; 4092156283Srwatson *) 4093173143Srwatson case `$CC -V 2>&1 | sed 5q` in 4094173143Srwatson *Sun\ C*) 4095173143Srwatson # Sun C++ 5.9 4096243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4097243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4098243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4099173143Srwatson ;; 4100173143Srwatson esac 4101156283Srwatson ;; 4102156283Srwatson esac 4103156283Srwatson ;; 4104156283Srwatson lynxos*) 4105156283Srwatson ;; 4106156283Srwatson m88k*) 4107156283Srwatson ;; 4108156283Srwatson mvs*) 4109156283Srwatson case $cc_basename in 4110156283Srwatson cxx*) 4111243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4112156283Srwatson ;; 4113156283Srwatson *) 4114156283Srwatson ;; 4115156283Srwatson esac 4116156283Srwatson ;; 4117156283Srwatson netbsd*) 4118156283Srwatson ;; 4119243750Srwatson *qnx* | *nto*) 4120243750Srwatson # QNX uses GNU C++, but need to define -shared option too, otherwise 4121243750Srwatson # it will coredump. 4122243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4123243750Srwatson ;; 4124156283Srwatson osf3* | osf4* | osf5*) 4125156283Srwatson case $cc_basename in 4126156283Srwatson KCC*) 4127243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4128156283Srwatson ;; 4129156283Srwatson RCC*) 4130156283Srwatson # Rational C++ 2.4.1 4131243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4132156283Srwatson ;; 4133156283Srwatson cxx*) 4134156283Srwatson # Digital/Compaq C++ 4135243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4136156283Srwatson # Make sure the PIC flag is empty. It appears that all Alpha 4137156283Srwatson # Linux and Compaq Tru64 Unix objects are PIC. 4138243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4139243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4140156283Srwatson ;; 4141156283Srwatson *) 4142156283Srwatson ;; 4143156283Srwatson esac 4144156283Srwatson ;; 4145156283Srwatson psos*) 4146156283Srwatson ;; 4147156283Srwatson solaris*) 4148156283Srwatson case $cc_basename in 4149243750Srwatson CC* | sunCC*) 4150156283Srwatson # Sun C++ 4.2, 5.x and Centerline C++ 4151243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4152243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4153243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4154156283Srwatson ;; 4155156283Srwatson gcx*) 4156156283Srwatson # Green Hills C++ Compiler 4157243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4158156283Srwatson ;; 4159156283Srwatson *) 4160156283Srwatson ;; 4161156283Srwatson esac 4162156283Srwatson ;; 4163156283Srwatson sunos4*) 4164156283Srwatson case $cc_basename in 4165156283Srwatson CC*) 4166156283Srwatson # Sun C++ 4.x 4167243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4168243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4169156283Srwatson ;; 4170156283Srwatson lcc*) 4171156283Srwatson # Lucid 4172243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4173156283Srwatson ;; 4174156283Srwatson *) 4175156283Srwatson ;; 4176156283Srwatson esac 4177156283Srwatson ;; 4178243750Srwatson sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4179243750Srwatson case $cc_basename in 4180243750Srwatson CC*) 4181243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4182243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4183243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4184243750Srwatson ;; 4185243750Srwatson esac 4186243750Srwatson ;; 4187156283Srwatson tandem*) 4188156283Srwatson case $cc_basename in 4189156283Srwatson NCC*) 4190156283Srwatson # NonStop-UX NCC 3.20 4191243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4192156283Srwatson ;; 4193156283Srwatson *) 4194156283Srwatson ;; 4195156283Srwatson esac 4196156283Srwatson ;; 4197156283Srwatson vxworks*) 4198156283Srwatson ;; 4199156283Srwatson *) 4200243750Srwatson _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4201156283Srwatson ;; 4202156283Srwatson esac 4203156283Srwatson fi 4204156283Srwatson], 4205156283Srwatson[ 4206156283Srwatson if test "$GCC" = yes; then 4207243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4208243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4209156283Srwatson 4210156283Srwatson case $host_os in 4211156283Srwatson aix*) 4212156283Srwatson # All AIX code is PIC. 4213156283Srwatson if test "$host_cpu" = ia64; then 4214156283Srwatson # AIX 5 now supports IA64 processor 4215243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4216156283Srwatson fi 4217156283Srwatson ;; 4218156283Srwatson 4219156283Srwatson amigaos*) 4220243750Srwatson case $host_cpu in 4221243750Srwatson powerpc) 4222243750Srwatson # see comment about AmigaOS4 .so support 4223243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4224243750Srwatson ;; 4225243750Srwatson m68k) 4226243750Srwatson # FIXME: we need at least 68020 code to build shared libraries, but 4227243750Srwatson # adding the `-m68020' flag to GCC prevents building anything better, 4228243750Srwatson # like `-m68040'. 4229243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4230243750Srwatson ;; 4231243750Srwatson esac 4232156283Srwatson ;; 4233156283Srwatson 4234173143Srwatson beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4235156283Srwatson # PIC is the default for these OSes. 4236156283Srwatson ;; 4237156283Srwatson 4238243750Srwatson mingw* | cygwin* | pw32* | os2* | cegcc*) 4239156283Srwatson # This hack is so that the source file can tell whether it is being 4240156283Srwatson # built for inclusion in a dll (and should export symbols for example). 4241173143Srwatson # Although the cygwin gcc ignores -fPIC, still need this for old-style 4242173143Srwatson # (--disable-auto-import) libraries 4243191273Srwatson m4_if([$1], [GCJ], [], 4244243750Srwatson [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4245156283Srwatson ;; 4246156283Srwatson 4247156283Srwatson darwin* | rhapsody*) 4248156283Srwatson # PIC is the default on this platform 4249156283Srwatson # Common symbols not allowed in MH_DYLIB files 4250243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4251156283Srwatson ;; 4252156283Srwatson 4253243750Srwatson haiku*) 4254243750Srwatson # PIC is the default for Haiku. 4255243750Srwatson # The "-static" flag exists, but is broken. 4256243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)= 4257243750Srwatson ;; 4258243750Srwatson 4259243750Srwatson hpux*) 4260243750Srwatson # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4261243750Srwatson # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4262243750Srwatson # sets the default TLS model and affects inlining. 4263243750Srwatson case $host_cpu in 4264243750Srwatson hppa*64*) 4265243750Srwatson # +Z the default 4266243750Srwatson ;; 4267243750Srwatson *) 4268243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4269243750Srwatson ;; 4270243750Srwatson esac 4271243750Srwatson ;; 4272243750Srwatson 4273173143Srwatson interix[[3-9]]*) 4274173143Srwatson # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4275173143Srwatson # Instead, we relocate shared libraries at runtime. 4276173143Srwatson ;; 4277173143Srwatson 4278156283Srwatson msdosdjgpp*) 4279156283Srwatson # Just because we use GCC doesn't mean we suddenly get shared libraries 4280156283Srwatson # on systems that don't support them. 4281243750Srwatson _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4282156283Srwatson enable_shared=no 4283156283Srwatson ;; 4284156283Srwatson 4285243750Srwatson *nto* | *qnx*) 4286243750Srwatson # QNX uses GNU C++, but need to define -shared option too, otherwise 4287243750Srwatson # it will coredump. 4288243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4289243750Srwatson ;; 4290243750Srwatson 4291156283Srwatson sysv4*MP*) 4292156283Srwatson if test -d /usr/nec; then 4293243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4294156283Srwatson fi 4295156283Srwatson ;; 4296156283Srwatson 4297243750Srwatson *) 4298243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4299156283Srwatson ;; 4300243750Srwatson esac 4301156283Srwatson 4302243750Srwatson case $cc_basename in 4303243750Srwatson nvcc*) # Cuda Compiler Driver 2.2 4304243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4305243750Srwatson if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4306243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4307243750Srwatson fi 4308156283Srwatson ;; 4309156283Srwatson esac 4310156283Srwatson else 4311156283Srwatson # PORTME Check for flag to pass linker flags through the system compiler. 4312156283Srwatson case $host_os in 4313156283Srwatson aix*) 4314243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4315156283Srwatson if test "$host_cpu" = ia64; then 4316156283Srwatson # AIX 5 now supports IA64 processor 4317243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4318156283Srwatson else 4319243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4320156283Srwatson fi 4321156283Srwatson ;; 4322156283Srwatson 4323243750Srwatson mingw* | cygwin* | pw32* | os2* | cegcc*) 4324156283Srwatson # This hack is so that the source file can tell whether it is being 4325156283Srwatson # built for inclusion in a dll (and should export symbols for example). 4326191273Srwatson m4_if([$1], [GCJ], [], 4327243750Srwatson [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4328156283Srwatson ;; 4329156283Srwatson 4330156283Srwatson hpux9* | hpux10* | hpux11*) 4331243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4332156283Srwatson # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4333156283Srwatson # not for PA HP-UX. 4334156283Srwatson case $host_cpu in 4335156283Srwatson hppa*64*|ia64*) 4336156283Srwatson # +Z the default 4337156283Srwatson ;; 4338156283Srwatson *) 4339243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4340156283Srwatson ;; 4341156283Srwatson esac 4342156283Srwatson # Is there a better lt_prog_compiler_static that works with the bundled CC? 4343243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4344156283Srwatson ;; 4345156283Srwatson 4346156283Srwatson irix5* | irix6* | nonstopux*) 4347243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4348156283Srwatson # PIC (with -KPIC) is the default. 4349243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4350156283Srwatson ;; 4351156283Srwatson 4352243750Srwatson linux* | k*bsd*-gnu | kopensolaris*-gnu) 4353156283Srwatson case $cc_basename in 4354243750Srwatson # old Intel for x86_64 which still supported -KPIC. 4355243750Srwatson ecc*) 4356243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4357243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4358243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4359156283Srwatson ;; 4360243750Srwatson # icc used to be incompatible with GCC. 4361243750Srwatson # ICC 10 doesn't accept -KPIC any more. 4362243750Srwatson icc* | ifort*) 4363243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4364243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4365243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4366243750Srwatson ;; 4367243750Srwatson # Lahey Fortran 8.1. 4368243750Srwatson lf95*) 4369243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4370243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4371243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4372243750Srwatson ;; 4373243750Srwatson nagfor*) 4374243750Srwatson # NAG Fortran compiler 4375243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4376243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4377243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4378243750Srwatson ;; 4379243750Srwatson pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4380156283Srwatson # Portland Group compilers (*not* the Pentium gcc compiler, 4381156283Srwatson # which looks to be a dead project) 4382243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4383243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4384243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4385156283Srwatson ;; 4386156283Srwatson ccc*) 4387243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4388156283Srwatson # All Alpha code is PIC. 4389243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4390156283Srwatson ;; 4391243750Srwatson xl* | bgxl* | bgf* | mpixl*) 4392243750Srwatson # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4393243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4394243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4395243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4396243750Srwatson ;; 4397173143Srwatson *) 4398243750Srwatson case `$CC -V 2>&1 | sed 5q` in 4399243750Srwatson *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4400243750Srwatson # Sun Fortran 8.3 passes all unrecognized flags to the linker 4401243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4402243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4403243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4404243750Srwatson ;; 4405243750Srwatson *Sun\ F* | *Sun*Fortran*) 4406243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4407243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4409243750Srwatson ;; 4410173143Srwatson *Sun\ C*) 4411173143Srwatson # Sun C 5.9 4412243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4413243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4414243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4415173143Srwatson ;; 4416243750Srwatson *Intel*\ [[CF]]*Compiler*) 4417243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4418243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4419243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4420173143Srwatson ;; 4421243750Srwatson *Portland\ Group*) 4422243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4423243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4424243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4425243750Srwatson ;; 4426173143Srwatson esac 4427173143Srwatson ;; 4428156283Srwatson esac 4429156283Srwatson ;; 4430156283Srwatson 4431243750Srwatson newsos6) 4432243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4433243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4434243750Srwatson ;; 4435243750Srwatson 4436243750Srwatson *nto* | *qnx*) 4437243750Srwatson # QNX uses GNU C++, but need to define -shared option too, otherwise 4438243750Srwatson # it will coredump. 4439243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4440243750Srwatson ;; 4441243750Srwatson 4442156283Srwatson osf3* | osf4* | osf5*) 4443243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4444156283Srwatson # All OSF/1 code is PIC. 4445243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4446156283Srwatson ;; 4447156283Srwatson 4448173143Srwatson rdos*) 4449243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4450156283Srwatson ;; 4451156283Srwatson 4452156283Srwatson solaris*) 4453243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4454243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4455156283Srwatson case $cc_basename in 4456243750Srwatson f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4457243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4458156283Srwatson *) 4459243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4460156283Srwatson esac 4461156283Srwatson ;; 4462156283Srwatson 4463156283Srwatson sunos4*) 4464243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4465243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4466243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4467156283Srwatson ;; 4468156283Srwatson 4469173143Srwatson sysv4 | sysv4.2uw2* | sysv4.3*) 4470243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4471243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4472243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4473156283Srwatson ;; 4474156283Srwatson 4475156283Srwatson sysv4*MP*) 4476156283Srwatson if test -d /usr/nec ;then 4477243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4478243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4479156283Srwatson fi 4480156283Srwatson ;; 4481156283Srwatson 4482173143Srwatson sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4483243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4484243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4485243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4486173143Srwatson ;; 4487173143Srwatson 4488156283Srwatson unicos*) 4489243750Srwatson _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4490243750Srwatson _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4491156283Srwatson ;; 4492156283Srwatson 4493156283Srwatson uts4*) 4494243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4495243750Srwatson _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4496156283Srwatson ;; 4497156283Srwatson 4498156283Srwatson *) 4499243750Srwatson _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4500156283Srwatson ;; 4501156283Srwatson esac 4502156283Srwatson fi 4503156283Srwatson]) 4504156283Srwatsoncase $host_os in 4505156283Srwatson # For platforms which do not support PIC, -DPIC is meaningless: 4506156283Srwatson *djgpp*) 4507243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4508156283Srwatson ;; 4509156283Srwatson *) 4510243750Srwatson _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4511156283Srwatson ;; 4512156283Srwatsonesac 4513173143Srwatson 4514243750SrwatsonAC_CACHE_CHECK([for $compiler option to produce PIC], 4515243750Srwatson [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4516243750Srwatson [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4517243750Srwatson_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4518243750Srwatson 4519173143Srwatson# 4520243750Srwatson# Check to make sure the PIC flag actually works. 4521243750Srwatson# 4522243750Srwatsonif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4523243750Srwatson _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4524243750Srwatson [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4525243750Srwatson [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4526243750Srwatson [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4527243750Srwatson "" | " "*) ;; 4528243750Srwatson *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4529243750Srwatson esac], 4530243750Srwatson [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4531243750Srwatson _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4532243750Srwatsonfi 4533243750Srwatson_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4534243750Srwatson [Additional compiler flags for building library objects]) 4535243750Srwatson 4536243750Srwatson_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4537243750Srwatson [How to pass a linker flag through the compiler]) 4538243750Srwatson# 4539173143Srwatson# Check to make sure the static flag actually works. 4540173143Srwatson# 4541243750Srwatsonwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4542243750Srwatson_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4543243750Srwatson _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4544173143Srwatson $lt_tmp_static_flag, 4545173143Srwatson [], 4546243750Srwatson [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4547243750Srwatson_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4548243750Srwatson [Compiler flag to prevent dynamic linking]) 4549243750Srwatson])# _LT_COMPILER_PIC 4550156283Srwatson 4551156283Srwatson 4552243750Srwatson# _LT_LINKER_SHLIBS([TAGNAME]) 4553243750Srwatson# ---------------------------- 4554156283Srwatson# See if the linker supports building shared libraries. 4555243750Srwatsonm4_defun([_LT_LINKER_SHLIBS], 4556243750Srwatson[AC_REQUIRE([LT_PATH_LD])dnl 4557243750SrwatsonAC_REQUIRE([LT_PATH_NM])dnl 4558243750Srwatsonm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4559243750Srwatsonm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4560243750Srwatsonm4_require([_LT_DECL_EGREP])dnl 4561243750Srwatsonm4_require([_LT_DECL_SED])dnl 4562243750Srwatsonm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4563243750Srwatsonm4_require([_LT_TAG_COMPILER])dnl 4564173143SrwatsonAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4565243750Srwatsonm4_if([$1], [CXX], [ 4566243750Srwatson _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4567243750Srwatson _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4568156283Srwatson case $host_os in 4569191273Srwatson aix[[4-9]]*) 4570156283Srwatson # If we're using GNU nm, then we don't want the "-C" option. 4571156283Srwatson # -C means demangle to AIX nm, but means don't demangle with GNU nm 4572243750Srwatson # Also, AIX nm treats weak defined symbols like other global defined 4573243750Srwatson # symbols, whereas GNU nm marks them as "W". 4574243750Srwatson if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4575243750Srwatson _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4576156283Srwatson else 4577243750Srwatson _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4578156283Srwatson fi 4579156283Srwatson ;; 4580156283Srwatson pw32*) 4581243750Srwatson _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4582243750Srwatson ;; 4583243750Srwatson cygwin* | mingw* | cegcc*) 4584243750Srwatson case $cc_basename in 4585243750Srwatson cl*) 4586243750Srwatson _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4587243750Srwatson ;; 4588243750Srwatson *) 4589243750Srwatson _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' 4590243750Srwatson _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4591243750Srwatson ;; 4592243750Srwatson esac 4593243750Srwatson ;; 4594156283Srwatson *) 4595243750Srwatson _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4596243750Srwatson ;; 4597156283Srwatson esac 4598243750Srwatson], [ 4599156283Srwatson runpath_var= 4600243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)= 4601243750Srwatson _LT_TAGVAR(always_export_symbols, $1)=no 4602243750Srwatson _LT_TAGVAR(archive_cmds, $1)= 4603243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)= 4604243750Srwatson _LT_TAGVAR(compiler_needs_object, $1)=no 4605243750Srwatson _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4606243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4607243750Srwatson _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4608243750Srwatson _LT_TAGVAR(hardcode_automatic, $1)=no 4609243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=no 4610243750Srwatson _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4611243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4612243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)= 4613243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=no 4614243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4615243750Srwatson _LT_TAGVAR(inherit_rpath, $1)=no 4616243750Srwatson _LT_TAGVAR(link_all_deplibs, $1)=unknown 4617243750Srwatson _LT_TAGVAR(module_cmds, $1)= 4618243750Srwatson _LT_TAGVAR(module_expsym_cmds, $1)= 4619243750Srwatson _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4620243750Srwatson _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4621243750Srwatson _LT_TAGVAR(thread_safe_flag_spec, $1)= 4622243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)= 4623156283Srwatson # include_expsyms should be a list of space-separated symbols to be *always* 4624156283Srwatson # included in the symbol list 4625243750Srwatson _LT_TAGVAR(include_expsyms, $1)= 4626156283Srwatson # exclude_expsyms can be an extended regexp of symbols to exclude 4627156283Srwatson # it will be wrapped by ` (' and `)$', so one must not match beginning or 4628156283Srwatson # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4629156283Srwatson # as well as any symbol that contains `d'. 4630243750Srwatson _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4631156283Srwatson # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4632156283Srwatson # platforms (ab)use it in PIC code, but their linkers get confused if 4633156283Srwatson # the symbol is explicitly referenced. Since portable code cannot 4634156283Srwatson # rely on this symbol name, it's probably fine to never include it in 4635156283Srwatson # preloaded symbol tables. 4636191273Srwatson # Exclude shared library initialization/finalization symbols. 4637191273Srwatsondnl Note also adjust exclude_expsyms for C++ above. 4638156283Srwatson extract_expsyms_cmds= 4639243750Srwatson 4640156283Srwatson case $host_os in 4641243750Srwatson cygwin* | mingw* | pw32* | cegcc*) 4642156283Srwatson # FIXME: the MSVC++ port hasn't been tested in a loooong time 4643156283Srwatson # When not using gcc, we currently assume that we are using 4644156283Srwatson # Microsoft Visual C++. 4645156283Srwatson if test "$GCC" != yes; then 4646156283Srwatson with_gnu_ld=no 4647156283Srwatson fi 4648156283Srwatson ;; 4649173143Srwatson interix*) 4650173143Srwatson # we just hope/assume this is gcc and not c89 (= MSVC++) 4651173143Srwatson with_gnu_ld=yes 4652173143Srwatson ;; 4653156283Srwatson openbsd*) 4654156283Srwatson with_gnu_ld=no 4655156283Srwatson ;; 4656156283Srwatson esac 4657156283Srwatson 4658243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=yes 4659243750Srwatson 4660243750Srwatson # On some targets, GNU ld is compatible enough with the native linker 4661243750Srwatson # that we're better off using the native interface for both. 4662243750Srwatson lt_use_gnu_ld_interface=no 4663156283Srwatson if test "$with_gnu_ld" = yes; then 4664243750Srwatson case $host_os in 4665243750Srwatson aix*) 4666243750Srwatson # The AIX port of GNU ld has always aspired to compatibility 4667243750Srwatson # with the native linker. However, as the warning in the GNU ld 4668243750Srwatson # block says, versions before 2.19.5* couldn't really create working 4669243750Srwatson # shared libraries, regardless of the interface used. 4670243750Srwatson case `$LD -v 2>&1` in 4671243750Srwatson *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4672243750Srwatson *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4673243750Srwatson *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4674243750Srwatson *) 4675243750Srwatson lt_use_gnu_ld_interface=yes 4676243750Srwatson ;; 4677243750Srwatson esac 4678243750Srwatson ;; 4679243750Srwatson *) 4680243750Srwatson lt_use_gnu_ld_interface=yes 4681243750Srwatson ;; 4682243750Srwatson esac 4683243750Srwatson fi 4684243750Srwatson 4685243750Srwatson if test "$lt_use_gnu_ld_interface" = yes; then 4686156283Srwatson # If archive_cmds runs LD, not CC, wlarc should be empty 4687156283Srwatson wlarc='${wl}' 4688156283Srwatson 4689156283Srwatson # Set some defaults for GNU ld with shared library support. These 4690156283Srwatson # are reset later if shared libraries are not supported. Putting them 4691156283Srwatson # here allows them to be overridden if necessary. 4692156283Srwatson runpath_var=LD_RUN_PATH 4693243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4694243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4695156283Srwatson # ancient GNU ld didn't support --whole-archive et. al. 4696243750Srwatson if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4697243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4698243750Srwatson else 4699243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)= 4700156283Srwatson fi 4701156283Srwatson supports_anon_versioning=no 4702243750Srwatson case `$LD -v 2>&1` in 4703243750Srwatson *GNU\ gold*) supports_anon_versioning=yes ;; 4704156283Srwatson *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4705156283Srwatson *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4706156283Srwatson *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4707156283Srwatson *\ 2.11.*) ;; # other 2.11 versions 4708156283Srwatson *) supports_anon_versioning=yes ;; 4709156283Srwatson esac 4710156283Srwatson 4711156283Srwatson # See if GNU ld supports shared libraries. 4712156283Srwatson case $host_os in 4713191273Srwatson aix[[3-9]]*) 4714156283Srwatson # On AIX/PPC, the GNU linker is very broken 4715156283Srwatson if test "$host_cpu" != ia64; then 4716243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 4717243750Srwatson cat <<_LT_EOF 1>&2 4718156283Srwatson 4719243750Srwatson*** Warning: the GNU linker, at least up to release 2.19, is reported 4720156283Srwatson*** to be unable to reliably create shared libraries on AIX. 4721156283Srwatson*** Therefore, libtool is disabling shared libraries support. If you 4722243750Srwatson*** really care for shared libraries, you may want to install binutils 4723243750Srwatson*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4724243750Srwatson*** You will then need to restart the configuration process. 4725156283Srwatson 4726243750Srwatson_LT_EOF 4727156283Srwatson fi 4728156283Srwatson ;; 4729156283Srwatson 4730156283Srwatson amigaos*) 4731243750Srwatson case $host_cpu in 4732243750Srwatson powerpc) 4733243750Srwatson # see comment about AmigaOS4 .so support 4734243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4735243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='' 4736243750Srwatson ;; 4737243750Srwatson m68k) 4738243750Srwatson _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)' 4739243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4740243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes 4741243750Srwatson ;; 4742243750Srwatson esac 4743156283Srwatson ;; 4744156283Srwatson 4745156283Srwatson beos*) 4746243750Srwatson if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4747243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4748156283Srwatson # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4749156283Srwatson # support --undefined. This deserves some investigation. FIXME 4750243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4751156283Srwatson else 4752243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 4753156283Srwatson fi 4754156283Srwatson ;; 4755156283Srwatson 4756243750Srwatson cygwin* | mingw* | pw32* | cegcc*) 4757243750Srwatson # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4758156283Srwatson # as there is no search path for DLLs. 4759243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4760243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4761243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4762243750Srwatson _LT_TAGVAR(always_export_symbols, $1)=no 4763243750Srwatson _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4764243750Srwatson _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' 4765243750Srwatson _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4766156283Srwatson 4767243750Srwatson if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4768243750Srwatson _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' 4769156283Srwatson # If the export-symbols file already is a .def file (1st line 4770156283Srwatson # is EXPORTS), use it as is; otherwise, prepend... 4771243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4772156283Srwatson cp $export_symbols $output_objdir/$soname.def; 4773156283Srwatson else 4774156283Srwatson echo EXPORTS > $output_objdir/$soname.def; 4775156283Srwatson cat $export_symbols >> $output_objdir/$soname.def; 4776156283Srwatson fi~ 4777173143Srwatson $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4778156283Srwatson else 4779243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 4780156283Srwatson fi 4781156283Srwatson ;; 4782156283Srwatson 4783243750Srwatson haiku*) 4784243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4785243750Srwatson _LT_TAGVAR(link_all_deplibs, $1)=yes 4786243750Srwatson ;; 4787243750Srwatson 4788173143Srwatson interix[[3-9]]*) 4789243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=no 4790243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4791243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4792243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4793173143Srwatson # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4794173143Srwatson # Instead, shared libraries are loaded at an image base (0x10000000 by 4795173143Srwatson # default) and relocated if they conflict, which is a slow very memory 4796173143Srwatson # consuming and fragmenting process. To avoid this, we pick a random, 4797173143Srwatson # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4798173143Srwatson # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4799243750Srwatson _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' 4800243750Srwatson _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' 4801173143Srwatson ;; 4802173143Srwatson 4803243750Srwatson gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4804243750Srwatson tmp_diet=no 4805243750Srwatson if test "$host_os" = linux-dietlibc; then 4806243750Srwatson case $cc_basename in 4807243750Srwatson diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4808243750Srwatson esac 4809243750Srwatson fi 4810243750Srwatson if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4811243750Srwatson && test "$tmp_diet" = no 4812243750Srwatson then 4813243750Srwatson tmp_addflag=' $pic_flag' 4814243750Srwatson tmp_sharedflag='-shared' 4815156283Srwatson case $cc_basename,$host_cpu in 4816243750Srwatson pgcc*) # Portland Group C compiler 4817243750Srwatson _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' 4818156283Srwatson tmp_addflag=' $pic_flag' 4819156283Srwatson ;; 4820243750Srwatson pgf77* | pgf90* | pgf95* | pgfortran*) 4821243750Srwatson # Portland Group f77 and f90 compilers 4822243750Srwatson _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' 4823156283Srwatson tmp_addflag=' $pic_flag -Mnomain' ;; 4824243750Srwatson ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4825156283Srwatson tmp_addflag=' -i_dynamic' ;; 4826156283Srwatson efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4827156283Srwatson tmp_addflag=' -i_dynamic -nofor_main' ;; 4828156283Srwatson ifc* | ifort*) # Intel Fortran compiler 4829156283Srwatson tmp_addflag=' -nofor_main' ;; 4830243750Srwatson lf95*) # Lahey Fortran 8.1 4831243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)= 4832243750Srwatson tmp_sharedflag='--shared' ;; 4833243750Srwatson xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4834243750Srwatson tmp_sharedflag='-qmkshrobj' 4835243750Srwatson tmp_addflag= ;; 4836243750Srwatson nvcc*) # Cuda Compiler Driver 2.2 4837243750Srwatson _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' 4838243750Srwatson _LT_TAGVAR(compiler_needs_object, $1)=yes 4839243750Srwatson ;; 4840156283Srwatson esac 4841173143Srwatson case `$CC -V 2>&1 | sed 5q` in 4842173143Srwatson *Sun\ C*) # Sun C 5.9 4843243750Srwatson _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' 4844243750Srwatson _LT_TAGVAR(compiler_needs_object, $1)=yes 4845173143Srwatson tmp_sharedflag='-G' ;; 4846173143Srwatson *Sun\ F*) # Sun Fortran 8.3 4847173143Srwatson tmp_sharedflag='-G' ;; 4848173143Srwatson esac 4849243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4850156283Srwatson 4851243750Srwatson if test "x$supports_anon_versioning" = xyes; then 4852243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4853243750Srwatson cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4854243750Srwatson echo "local: *; };" >> $output_objdir/$libname.ver~ 4855243750Srwatson $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4856243750Srwatson fi 4857243750Srwatson 4858243750Srwatson case $cc_basename in 4859243750Srwatson xlf* | bgf* | bgxlf* | mpixlf*) 4860243750Srwatson # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4861243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4862243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4863243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4864243750Srwatson if test "x$supports_anon_versioning" = xyes; then 4865243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4866243750Srwatson cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4867243750Srwatson echo "local: *; };" >> $output_objdir/$libname.ver~ 4868243750Srwatson $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4869243750Srwatson fi 4870243750Srwatson ;; 4871243750Srwatson esac 4872156283Srwatson else 4873243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 4874156283Srwatson fi 4875156283Srwatson ;; 4876156283Srwatson 4877156283Srwatson netbsd*) 4878243750Srwatson if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4879243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4880156283Srwatson wlarc= 4881156283Srwatson else 4882243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4883243750Srwatson _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' 4884156283Srwatson fi 4885156283Srwatson ;; 4886156283Srwatson 4887173143Srwatson solaris*) 4888243750Srwatson if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4889243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 4890243750Srwatson cat <<_LT_EOF 1>&2 4891156283Srwatson 4892156283Srwatson*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4893156283Srwatson*** create shared libraries on Solaris systems. Therefore, libtool 4894156283Srwatson*** is disabling shared libraries support. We urge you to upgrade GNU 4895156283Srwatson*** binutils to release 2.9.1 or newer. Another option is to modify 4896156283Srwatson*** your PATH or compiler configuration so that the native linker is 4897156283Srwatson*** used, and then restart. 4898156283Srwatson 4899243750Srwatson_LT_EOF 4900243750Srwatson elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4901243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4902243750Srwatson _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' 4903156283Srwatson else 4904243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 4905156283Srwatson fi 4906156283Srwatson ;; 4907156283Srwatson 4908173143Srwatson sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4909173143Srwatson case `$LD -v 2>&1` in 4910173143Srwatson *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4911243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 4912173143Srwatson cat <<_LT_EOF 1>&2 4913173143Srwatson 4914173143Srwatson*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4915173143Srwatson*** reliably create shared libraries on SCO systems. Therefore, libtool 4916173143Srwatson*** is disabling shared libraries support. We urge you to upgrade GNU 4917173143Srwatson*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4918173143Srwatson*** your PATH or compiler configuration so that the native linker is 4919173143Srwatson*** used, and then restart. 4920173143Srwatson 4921173143Srwatson_LT_EOF 4922173143Srwatson ;; 4923173143Srwatson *) 4924243750Srwatson # For security reasons, it is highly recommended that you always 4925243750Srwatson # use absolute paths for naming shared libraries, and exclude the 4926243750Srwatson # DT_RUNPATH tag from executables and libraries. But doing so 4927243750Srwatson # requires that you compile everything twice, which is a pain. 4928243750Srwatson if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4929243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4930243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4931243750Srwatson _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' 4932173143Srwatson else 4933243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 4934173143Srwatson fi 4935173143Srwatson ;; 4936173143Srwatson esac 4937173143Srwatson ;; 4938173143Srwatson 4939156283Srwatson sunos4*) 4940243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4941156283Srwatson wlarc= 4942243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 4943243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4944156283Srwatson ;; 4945156283Srwatson 4946156283Srwatson *) 4947243750Srwatson if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4948243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4949243750Srwatson _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' 4950156283Srwatson else 4951243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 4952156283Srwatson fi 4953156283Srwatson ;; 4954156283Srwatson esac 4955156283Srwatson 4956243750Srwatson if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4957156283Srwatson runpath_var= 4958243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4959243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4960243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)= 4961156283Srwatson fi 4962156283Srwatson else 4963156283Srwatson # PORTME fill in a description of your system's linker (not GNU ld) 4964156283Srwatson case $host_os in 4965156283Srwatson aix3*) 4966243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4967243750Srwatson _LT_TAGVAR(always_export_symbols, $1)=yes 4968243750Srwatson _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' 4969156283Srwatson # Note: this linker hardcodes the directories in LIBPATH if there 4970156283Srwatson # are no directories specified by -L. 4971243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes 4972173143Srwatson if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4973156283Srwatson # Neither direct hardcoding nor static linking is supported with a 4974156283Srwatson # broken collect2. 4975243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=unsupported 4976156283Srwatson fi 4977156283Srwatson ;; 4978156283Srwatson 4979191273Srwatson aix[[4-9]]*) 4980156283Srwatson if test "$host_cpu" = ia64; then 4981156283Srwatson # On IA64, the linker does run time linking by default, so we don't 4982156283Srwatson # have to do anything special. 4983156283Srwatson aix_use_runtimelinking=no 4984156283Srwatson exp_sym_flag='-Bexport' 4985156283Srwatson no_entry_flag="" 4986156283Srwatson else 4987156283Srwatson # If we're using GNU nm, then we don't want the "-C" option. 4988156283Srwatson # -C means demangle to AIX nm, but means don't demangle with GNU nm 4989243750Srwatson # Also, AIX nm treats weak defined symbols like other global 4990243750Srwatson # defined symbols, whereas GNU nm marks them as "W". 4991243750Srwatson if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4992243750Srwatson _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4993156283Srwatson else 4994243750Srwatson _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4995156283Srwatson fi 4996156283Srwatson aix_use_runtimelinking=no 4997156283Srwatson 4998156283Srwatson # Test if we are trying to use run time linking or normal 4999156283Srwatson # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5000156283Srwatson # need to do runtime linking. 5001191273Srwatson case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5002156283Srwatson for ld_flag in $LDFLAGS; do 5003243750Srwatson if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5004243750Srwatson aix_use_runtimelinking=yes 5005243750Srwatson break 5006243750Srwatson fi 5007156283Srwatson done 5008173143Srwatson ;; 5009156283Srwatson esac 5010156283Srwatson 5011156283Srwatson exp_sym_flag='-bexport' 5012156283Srwatson no_entry_flag='-bnoentry' 5013156283Srwatson fi 5014156283Srwatson 5015156283Srwatson # When large executables or shared objects are built, AIX ld can 5016156283Srwatson # have problems creating the table of contents. If linking a library 5017156283Srwatson # or program results in "error TOC overflow" add -mminimal-toc to 5018156283Srwatson # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5019156283Srwatson # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5020156283Srwatson 5021243750Srwatson _LT_TAGVAR(archive_cmds, $1)='' 5022243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 5023243750Srwatson _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5024243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5025243750Srwatson _LT_TAGVAR(link_all_deplibs, $1)=yes 5026243750Srwatson _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5027156283Srwatson 5028156283Srwatson if test "$GCC" = yes; then 5029156283Srwatson case $host_os in aix4.[[012]]|aix4.[[012]].*) 5030156283Srwatson # We only want to do this on AIX 4.2 and lower, the check 5031156283Srwatson # below for broken collect2 doesn't work under 4.3+ 5032156283Srwatson collect2name=`${CC} -print-prog-name=collect2` 5033243750Srwatson if test -f "$collect2name" && 5034243750Srwatson strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5035156283Srwatson then 5036243750Srwatson # We have reworked collect2 5037243750Srwatson : 5038156283Srwatson else 5039243750Srwatson # We have old collect2 5040243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=unsupported 5041243750Srwatson # It fails to find uninstalled libraries when the uninstalled 5042243750Srwatson # path is not listed in the libpath. Setting hardcode_minus_L 5043243750Srwatson # to unsupported forces relinking 5044243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes 5045243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5046243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)= 5047156283Srwatson fi 5048173143Srwatson ;; 5049156283Srwatson esac 5050156283Srwatson shared_flag='-shared' 5051156283Srwatson if test "$aix_use_runtimelinking" = yes; then 5052156283Srwatson shared_flag="$shared_flag "'${wl}-G' 5053156283Srwatson fi 5054156283Srwatson else 5055156283Srwatson # not using gcc 5056156283Srwatson if test "$host_cpu" = ia64; then 5057243750Srwatson # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5058243750Srwatson # chokes on -Wl,-G. The following line is correct: 5059156283Srwatson shared_flag='-G' 5060156283Srwatson else 5061173143Srwatson if test "$aix_use_runtimelinking" = yes; then 5062156283Srwatson shared_flag='${wl}-G' 5063156283Srwatson else 5064156283Srwatson shared_flag='${wl}-bM:SRE' 5065173143Srwatson fi 5066156283Srwatson fi 5067156283Srwatson fi 5068156283Srwatson 5069243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5070156283Srwatson # It seems that -bexpall does not export symbols beginning with 5071156283Srwatson # underscore (_), so it is better to generate a list of symbols to export. 5072243750Srwatson _LT_TAGVAR(always_export_symbols, $1)=yes 5073156283Srwatson if test "$aix_use_runtimelinking" = yes; then 5074156283Srwatson # Warning - without using the other runtime loading flags (-brtl), 5075156283Srwatson # -berok will link without error, but may produce a broken library. 5076243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5077243750Srwatson # Determine the default libpath from the value encoded in an 5078243750Srwatson # empty executable. 5079243750Srwatson _LT_SYS_MODULE_PATH_AIX([$1]) 5080243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5081243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5082243750Srwatson else 5083156283Srwatson if test "$host_cpu" = ia64; then 5084243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5085243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5086243750Srwatson _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" 5087156283Srwatson else 5088243750Srwatson # Determine the default libpath from the value encoded in an 5089243750Srwatson # empty executable. 5090243750Srwatson _LT_SYS_MODULE_PATH_AIX([$1]) 5091243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5092156283Srwatson # Warning - without using the other run time loading flags, 5093156283Srwatson # -berok will link without error, but may produce a broken library. 5094243750Srwatson _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5095243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5096243750Srwatson if test "$with_gnu_ld" = yes; then 5097243750Srwatson # We only use this code for GNU lds that support --whole-archive. 5098243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5099243750Srwatson else 5100243750Srwatson # Exported symbols can be pulled into shared objects from archives 5101243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5102243750Srwatson fi 5103243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5104156283Srwatson # This is similar to how AIX traditionally builds its shared libraries. 5105243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 5106156283Srwatson fi 5107156283Srwatson fi 5108156283Srwatson ;; 5109156283Srwatson 5110156283Srwatson amigaos*) 5111243750Srwatson case $host_cpu in 5112243750Srwatson powerpc) 5113243750Srwatson # see comment about AmigaOS4 .so support 5114243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5115243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='' 5116243750Srwatson ;; 5117243750Srwatson m68k) 5118243750Srwatson _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)' 5119243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5120243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes 5121243750Srwatson ;; 5122243750Srwatson esac 5123156283Srwatson ;; 5124156283Srwatson 5125156283Srwatson bsdi[[45]]*) 5126243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5127156283Srwatson ;; 5128156283Srwatson 5129243750Srwatson cygwin* | mingw* | pw32* | cegcc*) 5130156283Srwatson # When not using gcc, we currently assume that we are using 5131156283Srwatson # Microsoft Visual C++. 5132156283Srwatson # hardcode_libdir_flag_spec is actually meaningless, as there is 5133156283Srwatson # no search path for DLLs. 5134243750Srwatson case $cc_basename in 5135243750Srwatson cl*) 5136243750Srwatson # Native MSVC 5137243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5138243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5139243750Srwatson _LT_TAGVAR(always_export_symbols, $1)=yes 5140243750Srwatson _LT_TAGVAR(file_list_spec, $1)='@' 5141243750Srwatson # Tell ltmain to make .lib files, not .a files. 5142243750Srwatson libext=lib 5143243750Srwatson # Tell ltmain to make .dll files, not .so files. 5144243750Srwatson shrext_cmds=".dll" 5145243750Srwatson # FIXME: Setting linknames here is a bad hack. 5146243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5147243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5148243750Srwatson sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5149243750Srwatson else 5150243750Srwatson sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5151243750Srwatson fi~ 5152243750Srwatson $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5153243750Srwatson linknames=' 5154243750Srwatson # The linker will not automatically build a static lib if we build a DLL. 5155243750Srwatson # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5156243750Srwatson _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5157243750Srwatson _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5158243750Srwatson _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' 5159243750Srwatson # Don't use ranlib 5160243750Srwatson _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5161243750Srwatson _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5162243750Srwatson lt_tool_outputfile="@TOOL_OUTPUT@"~ 5163243750Srwatson case $lt_outputfile in 5164243750Srwatson *.exe|*.EXE) ;; 5165243750Srwatson *) 5166243750Srwatson lt_outputfile="$lt_outputfile.exe" 5167243750Srwatson lt_tool_outputfile="$lt_tool_outputfile.exe" 5168243750Srwatson ;; 5169243750Srwatson esac~ 5170243750Srwatson if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5171243750Srwatson $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5172243750Srwatson $RM "$lt_outputfile.manifest"; 5173243750Srwatson fi' 5174243750Srwatson ;; 5175243750Srwatson *) 5176243750Srwatson # Assume MSVC wrapper 5177243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5178243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5179243750Srwatson # Tell ltmain to make .lib files, not .a files. 5180243750Srwatson libext=lib 5181243750Srwatson # Tell ltmain to make .dll files, not .so files. 5182243750Srwatson shrext_cmds=".dll" 5183243750Srwatson # FIXME: Setting linknames here is a bad hack. 5184243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5185243750Srwatson # The linker will automatically build a .lib file if we build a DLL. 5186243750Srwatson _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5187243750Srwatson # FIXME: Should let the user specify the lib program. 5188243750Srwatson _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5189243750Srwatson _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5190243750Srwatson ;; 5191243750Srwatson esac 5192156283Srwatson ;; 5193156283Srwatson 5194156283Srwatson darwin* | rhapsody*) 5195243750Srwatson _LT_DARWIN_LINKER_FEATURES($1) 5196156283Srwatson ;; 5197156283Srwatson 5198156283Srwatson dgux*) 5199243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5200243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5201243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5202156283Srwatson ;; 5203156283Srwatson 5204156283Srwatson # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5205156283Srwatson # support. Future versions do this automatically, but an explicit c++rt0.o 5206156283Srwatson # does not break anything, and helps significantly (at the cost of a little 5207156283Srwatson # extra space). 5208156283Srwatson freebsd2.2*) 5209243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5210243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5211243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 5212243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5213156283Srwatson ;; 5214156283Srwatson 5215156283Srwatson # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5216243750Srwatson freebsd2.*) 5217243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5218243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 5219243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes 5220243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5221156283Srwatson ;; 5222156283Srwatson 5223156283Srwatson # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5224173143Srwatson freebsd* | dragonfly*) 5225243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5226243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5227243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 5228243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5229156283Srwatson ;; 5230156283Srwatson 5231156283Srwatson hpux9*) 5232156283Srwatson if test "$GCC" = yes; then 5233243750Srwatson _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5234156283Srwatson else 5235243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5236156283Srwatson fi 5237243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5238243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5239243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 5240156283Srwatson 5241156283Srwatson # hardcode_minus_L: Not really in the search PATH, 5242156283Srwatson # but as the default location of the library. 5243243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes 5244243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5245156283Srwatson ;; 5246156283Srwatson 5247173143Srwatson hpux10*) 5248243750Srwatson if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5249243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5250173143Srwatson else 5251243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5252173143Srwatson fi 5253173143Srwatson if test "$with_gnu_ld" = no; then 5254243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5255243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5256243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 5257243750Srwatson _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5258243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5259173143Srwatson # hardcode_minus_L: Not really in the search PATH, 5260173143Srwatson # but as the default location of the library. 5261243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes 5262173143Srwatson fi 5263173143Srwatson ;; 5264173143Srwatson 5265173143Srwatson hpux11*) 5266243750Srwatson if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5267156283Srwatson case $host_cpu in 5268173143Srwatson hppa*64*) 5269243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5270156283Srwatson ;; 5271173143Srwatson ia64*) 5272243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5273173143Srwatson ;; 5274156283Srwatson *) 5275243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5276156283Srwatson ;; 5277156283Srwatson esac 5278156283Srwatson else 5279156283Srwatson case $host_cpu in 5280173143Srwatson hppa*64*) 5281243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5282156283Srwatson ;; 5283173143Srwatson ia64*) 5284243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5285173143Srwatson ;; 5286156283Srwatson *) 5287243750Srwatson m4_if($1, [], [ 5288243750Srwatson # Older versions of the 11.00 compiler do not understand -b yet 5289243750Srwatson # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5290243750Srwatson _LT_LINKER_OPTION([if $CC understands -b], 5291243750Srwatson _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5292243750Srwatson [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5293243750Srwatson [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5294243750Srwatson [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5295156283Srwatson ;; 5296156283Srwatson esac 5297156283Srwatson fi 5298156283Srwatson if test "$with_gnu_ld" = no; then 5299243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5300243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5301173143Srwatson 5302156283Srwatson case $host_cpu in 5303173143Srwatson hppa*64*|ia64*) 5304243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=no 5305243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5306156283Srwatson ;; 5307156283Srwatson *) 5308243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 5309243750Srwatson _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5310243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5311156283Srwatson 5312156283Srwatson # hardcode_minus_L: Not really in the search PATH, 5313156283Srwatson # but as the default location of the library. 5314243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes 5315156283Srwatson ;; 5316156283Srwatson esac 5317156283Srwatson fi 5318156283Srwatson ;; 5319156283Srwatson 5320156283Srwatson irix5* | irix6* | nonstopux*) 5321156283Srwatson if test "$GCC" = yes; then 5322243750Srwatson _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' 5323243750Srwatson # Try to use the -exported_symbol ld option, if it does not 5324243750Srwatson # work, assume that -exports_file does not work either and 5325243750Srwatson # implicitly export all symbols. 5326243750Srwatson # This should be the same for all languages, so no per-tag cache variable. 5327243750Srwatson AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5328243750Srwatson [lt_cv_irix_exported_symbol], 5329243750Srwatson [save_LDFLAGS="$LDFLAGS" 5330243750Srwatson LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5331243750Srwatson AC_LINK_IFELSE( 5332243750Srwatson [AC_LANG_SOURCE( 5333243750Srwatson [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5334243750Srwatson [C++], [[int foo (void) { return 0; }]], 5335243750Srwatson [Fortran 77], [[ 5336243750Srwatson subroutine foo 5337243750Srwatson end]], 5338243750Srwatson [Fortran], [[ 5339243750Srwatson subroutine foo 5340243750Srwatson end]])])], 5341243750Srwatson [lt_cv_irix_exported_symbol=yes], 5342243750Srwatson [lt_cv_irix_exported_symbol=no]) 5343243750Srwatson LDFLAGS="$save_LDFLAGS"]) 5344243750Srwatson if test "$lt_cv_irix_exported_symbol" = yes; then 5345243750Srwatson _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' 5346243750Srwatson fi 5347156283Srwatson else 5348243750Srwatson _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' 5349243750Srwatson _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' 5350156283Srwatson fi 5351243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5352243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5353243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5354243750Srwatson _LT_TAGVAR(inherit_rpath, $1)=yes 5355243750Srwatson _LT_TAGVAR(link_all_deplibs, $1)=yes 5356156283Srwatson ;; 5357156283Srwatson 5358156283Srwatson netbsd*) 5359243750Srwatson if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5360243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5361156283Srwatson else 5362243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5363156283Srwatson fi 5364243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5365243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 5366243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5367156283Srwatson ;; 5368156283Srwatson 5369156283Srwatson newsos6) 5370243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5371243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 5372243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5373243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5374243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5375156283Srwatson ;; 5376156283Srwatson 5377243750Srwatson *nto* | *qnx*) 5378243750Srwatson ;; 5379243750Srwatson 5380156283Srwatson openbsd*) 5381173143Srwatson if test -f /usr/libexec/ld.so; then 5382243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 5383243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5384243750Srwatson _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5385243750Srwatson if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5386243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5387243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5388243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5389243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5390173143Srwatson else 5391173143Srwatson case $host_os in 5392173143Srwatson openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5393243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5394243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5395173143Srwatson ;; 5396173143Srwatson *) 5397243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5398243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5399173143Srwatson ;; 5400173143Srwatson esac 5401243750Srwatson fi 5402156283Srwatson else 5403243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 5404156283Srwatson fi 5405156283Srwatson ;; 5406156283Srwatson 5407156283Srwatson os2*) 5408243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5409243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes 5410243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5411243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 5412243750Srwatson _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5413156283Srwatson ;; 5414156283Srwatson 5415156283Srwatson osf3*) 5416156283Srwatson if test "$GCC" = yes; then 5417243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5418243750Srwatson _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' 5419156283Srwatson else 5420243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5421243750Srwatson _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' 5422156283Srwatson fi 5423243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5424243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5425243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5426156283Srwatson ;; 5427156283Srwatson 5428156283Srwatson osf4* | osf5*) # as osf3* with the addition of -msym flag 5429156283Srwatson if test "$GCC" = yes; then 5430243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5431243750Srwatson _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' 5432243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5433156283Srwatson else 5434243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5435243750Srwatson _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' 5436243750Srwatson _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~ 5437243750Srwatson $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' 5438156283Srwatson 5439156283Srwatson # Both c and cxx compiler support -rpath directly 5440243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5441156283Srwatson fi 5442243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5443243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5444156283Srwatson ;; 5445156283Srwatson 5446156283Srwatson solaris*) 5447243750Srwatson _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5448156283Srwatson if test "$GCC" = yes; then 5449156283Srwatson wlarc='${wl}' 5450243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5451243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5452243750Srwatson $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' 5453156283Srwatson else 5454243750Srwatson case `$CC -V 2>&1` in 5455243750Srwatson *"Compilers 5.0"*) 5456243750Srwatson wlarc='' 5457243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5458243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5459243750Srwatson $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5460243750Srwatson ;; 5461243750Srwatson *) 5462243750Srwatson wlarc='${wl}' 5463243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5464243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5465243750Srwatson $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5466243750Srwatson ;; 5467243750Srwatson esac 5468156283Srwatson fi 5469243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5470243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5471156283Srwatson case $host_os in 5472156283Srwatson solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5473156283Srwatson *) 5474173143Srwatson # The compiler driver will combine and reorder linker options, 5475173143Srwatson # but understands `-z linker_flag'. GCC discards it without `$wl', 5476173143Srwatson # but is careful enough not to reorder. 5477243750Srwatson # Supported since Solaris 2.6 (maybe 2.5.1?) 5478173143Srwatson if test "$GCC" = yes; then 5479243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5480173143Srwatson else 5481243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5482173143Srwatson fi 5483173143Srwatson ;; 5484156283Srwatson esac 5485243750Srwatson _LT_TAGVAR(link_all_deplibs, $1)=yes 5486156283Srwatson ;; 5487156283Srwatson 5488156283Srwatson sunos4*) 5489156283Srwatson if test "x$host_vendor" = xsequent; then 5490156283Srwatson # Use $CC to link under sequent, because it throws in some extra .o 5491156283Srwatson # files that make .init and .fini sections work. 5492243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5493156283Srwatson else 5494243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5495156283Srwatson fi 5496243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5497243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 5498243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes 5499243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5500156283Srwatson ;; 5501156283Srwatson 5502156283Srwatson sysv4) 5503156283Srwatson case $host_vendor in 5504156283Srwatson sni) 5505243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5506243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5507156283Srwatson ;; 5508156283Srwatson siemens) 5509156283Srwatson ## LD is ld it makes a PLAMLIB 5510156283Srwatson ## CC just makes a GrossModule. 5511243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5512243750Srwatson _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5513243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=no 5514156283Srwatson ;; 5515156283Srwatson motorola) 5516243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5517243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5518156283Srwatson ;; 5519156283Srwatson esac 5520156283Srwatson runpath_var='LD_RUN_PATH' 5521243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5522156283Srwatson ;; 5523156283Srwatson 5524156283Srwatson sysv4.3*) 5525243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5526243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5527243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5528156283Srwatson ;; 5529156283Srwatson 5530156283Srwatson sysv4*MP*) 5531156283Srwatson if test -d /usr/nec; then 5532243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5533243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5534156283Srwatson runpath_var=LD_RUN_PATH 5535156283Srwatson hardcode_runpath_var=yes 5536243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=yes 5537156283Srwatson fi 5538156283Srwatson ;; 5539156283Srwatson 5540173143Srwatson sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5541243750Srwatson _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5542243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5543243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5544173143Srwatson runpath_var='LD_RUN_PATH' 5545156283Srwatson 5546156283Srwatson if test "$GCC" = yes; then 5547243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5548243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5549156283Srwatson else 5550243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5551243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5552156283Srwatson fi 5553156283Srwatson ;; 5554156283Srwatson 5555173143Srwatson sysv5* | sco3.2v5* | sco5v6*) 5556173143Srwatson # Note: We can NOT use -z defs as we might desire, because we do not 5557173143Srwatson # link with -lc, and that would cause any symbols used from libc to 5558173143Srwatson # always be unresolved, which means just about no library would 5559173143Srwatson # ever link correctly. If we're not using GNU ld we use -z text 5560173143Srwatson # though, which does catch some bad symbols but isn't as heavy-handed 5561173143Srwatson # as -z defs. 5562243750Srwatson _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5563243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5564243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5565243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5566243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5567243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5568243750Srwatson _LT_TAGVAR(link_all_deplibs, $1)=yes 5569243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5570156283Srwatson runpath_var='LD_RUN_PATH' 5571173143Srwatson 5572173143Srwatson if test "$GCC" = yes; then 5573243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5574243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5575173143Srwatson else 5576243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5577243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5578173143Srwatson fi 5579156283Srwatson ;; 5580156283Srwatson 5581156283Srwatson uts4*) 5582243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5583243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5584243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5585156283Srwatson ;; 5586156283Srwatson 5587156283Srwatson *) 5588243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 5589156283Srwatson ;; 5590156283Srwatson esac 5591243750Srwatson 5592243750Srwatson if test x$host_vendor = xsni; then 5593243750Srwatson case $host in 5594243750Srwatson sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5595243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5596243750Srwatson ;; 5597243750Srwatson esac 5598243750Srwatson fi 5599156283Srwatson fi 5600156283Srwatson]) 5601243750SrwatsonAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5602243750Srwatsontest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5603156283Srwatson 5604243750Srwatson_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5605243750Srwatson 5606243750Srwatson_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5607243750Srwatson_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5608243750Srwatson_LT_DECL([], [extract_expsyms_cmds], [2], 5609243750Srwatson [The commands to extract the exported symbol list from a shared archive]) 5610243750Srwatson 5611156283Srwatson# 5612156283Srwatson# Do we need to explicitly link libc? 5613156283Srwatson# 5614243750Srwatsoncase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5615156283Srwatsonx|xyes) 5616156283Srwatson # Assume -lc should be added 5617243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5618156283Srwatson 5619156283Srwatson if test "$enable_shared" = yes && test "$GCC" = yes; then 5620243750Srwatson case $_LT_TAGVAR(archive_cmds, $1) in 5621156283Srwatson *'~'*) 5622156283Srwatson # FIXME: we may have to deal with multi-command sequences. 5623156283Srwatson ;; 5624156283Srwatson '$CC '*) 5625156283Srwatson # Test whether the compiler implicitly links with -lc since on some 5626156283Srwatson # systems, -lgcc has to come before -lc. If gcc already passes -lc 5627156283Srwatson # to ld, don't add -lc before -lgcc. 5628243750Srwatson AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5629243750Srwatson [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5630243750Srwatson [$RM conftest* 5631243750Srwatson echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5632156283Srwatson 5633243750Srwatson if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5634243750Srwatson soname=conftest 5635243750Srwatson lib=conftest 5636243750Srwatson libobjs=conftest.$ac_objext 5637243750Srwatson deplibs= 5638243750Srwatson wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5639243750Srwatson pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5640243750Srwatson compiler_flags=-v 5641243750Srwatson linker_flags=-v 5642243750Srwatson verstring= 5643243750Srwatson output_objdir=. 5644243750Srwatson libname=conftest 5645243750Srwatson lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5646243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)= 5647243750Srwatson if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5648243750Srwatson then 5649243750Srwatson lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5650243750Srwatson else 5651243750Srwatson lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5652243750Srwatson fi 5653243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5654243750Srwatson else 5655243750Srwatson cat conftest.err 1>&5 5656243750Srwatson fi 5657243750Srwatson $RM conftest* 5658243750Srwatson ]) 5659243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5660243750Srwatson ;; 5661243750Srwatson esac 5662243750Srwatson fi 5663243750Srwatson ;; 5664243750Srwatsonesac 5665243750Srwatson 5666243750Srwatson_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5667243750Srwatson [Whether or not to add -lc for building shared libraries]) 5668243750Srwatson_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5669243750Srwatson [enable_shared_with_static_runtimes], [0], 5670243750Srwatson [Whether or not to disallow shared libs when runtime libs are static]) 5671243750Srwatson_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5672243750Srwatson [Compiler flag to allow reflexive dlopens]) 5673243750Srwatson_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5674243750Srwatson [Compiler flag to generate shared objects directly from archives]) 5675243750Srwatson_LT_TAGDECL([], [compiler_needs_object], [1], 5676243750Srwatson [Whether the compiler copes with passing no objects directly]) 5677243750Srwatson_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5678243750Srwatson [Create an old-style archive from a shared archive]) 5679243750Srwatson_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5680243750Srwatson [Create a temporary old-style archive to link instead of a shared archive]) 5681243750Srwatson_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5682243750Srwatson_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5683243750Srwatson_LT_TAGDECL([], [module_cmds], [2], 5684243750Srwatson [Commands used to build a loadable module if different from building 5685243750Srwatson a shared archive.]) 5686243750Srwatson_LT_TAGDECL([], [module_expsym_cmds], [2]) 5687243750Srwatson_LT_TAGDECL([], [with_gnu_ld], [1], 5688243750Srwatson [Whether we are building with GNU ld or not]) 5689243750Srwatson_LT_TAGDECL([], [allow_undefined_flag], [1], 5690243750Srwatson [Flag that allows shared libraries with undefined symbols to be built]) 5691243750Srwatson_LT_TAGDECL([], [no_undefined_flag], [1], 5692243750Srwatson [Flag that enforces no undefined symbols]) 5693243750Srwatson_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5694243750Srwatson [Flag to hardcode $libdir into a binary during linking. 5695243750Srwatson This must work even if $libdir does not exist]) 5696243750Srwatson_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5697243750Srwatson [Whether we need a single "-rpath" flag with a separated argument]) 5698243750Srwatson_LT_TAGDECL([], [hardcode_direct], [0], 5699243750Srwatson [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5700243750Srwatson DIR into the resulting binary]) 5701243750Srwatson_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5702243750Srwatson [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5703243750Srwatson DIR into the resulting binary and the resulting library dependency is 5704243750Srwatson "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5705243750Srwatson library is relocated]) 5706243750Srwatson_LT_TAGDECL([], [hardcode_minus_L], [0], 5707243750Srwatson [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5708243750Srwatson into the resulting binary]) 5709243750Srwatson_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5710243750Srwatson [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5711243750Srwatson into the resulting binary]) 5712243750Srwatson_LT_TAGDECL([], [hardcode_automatic], [0], 5713243750Srwatson [Set to "yes" if building a shared library automatically hardcodes DIR 5714243750Srwatson into the library and all subsequent libraries and executables linked 5715243750Srwatson against it]) 5716243750Srwatson_LT_TAGDECL([], [inherit_rpath], [0], 5717243750Srwatson [Set to yes if linker adds runtime paths of dependent libraries 5718243750Srwatson to runtime path list]) 5719243750Srwatson_LT_TAGDECL([], [link_all_deplibs], [0], 5720243750Srwatson [Whether libtool must link a program against all its dependency libraries]) 5721243750Srwatson_LT_TAGDECL([], [always_export_symbols], [0], 5722243750Srwatson [Set to "yes" if exported symbols are required]) 5723243750Srwatson_LT_TAGDECL([], [export_symbols_cmds], [2], 5724243750Srwatson [The commands to list exported symbols]) 5725243750Srwatson_LT_TAGDECL([], [exclude_expsyms], [1], 5726243750Srwatson [Symbols that should not be listed in the preloaded symbols]) 5727243750Srwatson_LT_TAGDECL([], [include_expsyms], [1], 5728243750Srwatson [Symbols that must always be exported]) 5729243750Srwatson_LT_TAGDECL([], [prelink_cmds], [2], 5730243750Srwatson [Commands necessary for linking programs (against libraries) with templates]) 5731243750Srwatson_LT_TAGDECL([], [postlink_cmds], [2], 5732243750Srwatson [Commands necessary for finishing linking programs]) 5733243750Srwatson_LT_TAGDECL([], [file_list_spec], [1], 5734243750Srwatson [Specify filename containing input files]) 5735243750Srwatsondnl FIXME: Not yet implemented 5736243750Srwatsondnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5737243750Srwatsondnl [Compiler flag to generate thread safe objects]) 5738243750Srwatson])# _LT_LINKER_SHLIBS 5739243750Srwatson 5740243750Srwatson 5741243750Srwatson# _LT_LANG_C_CONFIG([TAG]) 5742243750Srwatson# ------------------------ 5743243750Srwatson# Ensure that the configuration variables for a C compiler are suitably 5744243750Srwatson# defined. These variables are subsequently used by _LT_CONFIG to write 5745243750Srwatson# the compiler configuration to `libtool'. 5746243750Srwatsonm4_defun([_LT_LANG_C_CONFIG], 5747243750Srwatson[m4_require([_LT_DECL_EGREP])dnl 5748243750Srwatsonlt_save_CC="$CC" 5749243750SrwatsonAC_LANG_PUSH(C) 5750243750Srwatson 5751243750Srwatson# Source file extension for C test sources. 5752243750Srwatsonac_ext=c 5753243750Srwatson 5754243750Srwatson# Object file extension for compiled C test sources. 5755243750Srwatsonobjext=o 5756243750Srwatson_LT_TAGVAR(objext, $1)=$objext 5757243750Srwatson 5758243750Srwatson# Code to be used in simple compile tests 5759243750Srwatsonlt_simple_compile_test_code="int some_variable = 0;" 5760243750Srwatson 5761243750Srwatson# Code to be used in simple link tests 5762243750Srwatsonlt_simple_link_test_code='int main(){return(0);}' 5763243750Srwatson 5764243750Srwatson_LT_TAG_COMPILER 5765243750Srwatson# Save the default compiler, since it gets overwritten when the other 5766243750Srwatson# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5767243750Srwatsoncompiler_DEFAULT=$CC 5768243750Srwatson 5769243750Srwatson# save warnings/boilerplate of simple test code 5770243750Srwatson_LT_COMPILER_BOILERPLATE 5771243750Srwatson_LT_LINKER_BOILERPLATE 5772243750Srwatson 5773243750Srwatsonif test -n "$compiler"; then 5774243750Srwatson _LT_COMPILER_NO_RTTI($1) 5775243750Srwatson _LT_COMPILER_PIC($1) 5776243750Srwatson _LT_COMPILER_C_O($1) 5777243750Srwatson _LT_COMPILER_FILE_LOCKS($1) 5778243750Srwatson _LT_LINKER_SHLIBS($1) 5779243750Srwatson _LT_SYS_DYNAMIC_LINKER($1) 5780243750Srwatson _LT_LINKER_HARDCODE_LIBPATH($1) 5781243750Srwatson LT_SYS_DLOPEN_SELF 5782243750Srwatson _LT_CMD_STRIPLIB 5783243750Srwatson 5784243750Srwatson # Report which library types will actually be built 5785243750Srwatson AC_MSG_CHECKING([if libtool supports shared libraries]) 5786243750Srwatson AC_MSG_RESULT([$can_build_shared]) 5787243750Srwatson 5788243750Srwatson AC_MSG_CHECKING([whether to build shared libraries]) 5789243750Srwatson test "$can_build_shared" = "no" && enable_shared=no 5790243750Srwatson 5791243750Srwatson # On AIX, shared libraries and static libraries use the same namespace, and 5792243750Srwatson # are all built from PIC. 5793243750Srwatson case $host_os in 5794243750Srwatson aix3*) 5795243750Srwatson test "$enable_shared" = yes && enable_static=no 5796243750Srwatson if test -n "$RANLIB"; then 5797243750Srwatson archive_cmds="$archive_cmds~\$RANLIB \$lib" 5798243750Srwatson postinstall_cmds='$RANLIB $lib' 5799243750Srwatson fi 5800243750Srwatson ;; 5801243750Srwatson 5802243750Srwatson aix[[4-9]]*) 5803243750Srwatson if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5804243750Srwatson test "$enable_shared" = yes && enable_static=no 5805243750Srwatson fi 5806243750Srwatson ;; 5807243750Srwatson esac 5808243750Srwatson AC_MSG_RESULT([$enable_shared]) 5809243750Srwatson 5810243750Srwatson AC_MSG_CHECKING([whether to build static libraries]) 5811243750Srwatson # Make sure either enable_shared or enable_static is yes. 5812243750Srwatson test "$enable_shared" = yes || enable_static=yes 5813243750Srwatson AC_MSG_RESULT([$enable_static]) 5814243750Srwatson 5815243750Srwatson _LT_CONFIG($1) 5816243750Srwatsonfi 5817243750SrwatsonAC_LANG_POP 5818243750SrwatsonCC="$lt_save_CC" 5819243750Srwatson])# _LT_LANG_C_CONFIG 5820243750Srwatson 5821243750Srwatson 5822243750Srwatson# _LT_LANG_CXX_CONFIG([TAG]) 5823243750Srwatson# -------------------------- 5824243750Srwatson# Ensure that the configuration variables for a C++ compiler are suitably 5825243750Srwatson# defined. These variables are subsequently used by _LT_CONFIG to write 5826243750Srwatson# the compiler configuration to `libtool'. 5827243750Srwatsonm4_defun([_LT_LANG_CXX_CONFIG], 5828243750Srwatson[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5829243750Srwatsonm4_require([_LT_DECL_EGREP])dnl 5830243750Srwatsonm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5831243750Srwatsonif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5832243750Srwatson ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5833243750Srwatson (test "X$CXX" != "Xg++"))) ; then 5834243750Srwatson AC_PROG_CXXCPP 5835243750Srwatsonelse 5836243750Srwatson _lt_caught_CXX_error=yes 5837243750Srwatsonfi 5838243750Srwatson 5839243750SrwatsonAC_LANG_PUSH(C++) 5840243750Srwatson_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5841243750Srwatson_LT_TAGVAR(allow_undefined_flag, $1)= 5842243750Srwatson_LT_TAGVAR(always_export_symbols, $1)=no 5843243750Srwatson_LT_TAGVAR(archive_expsym_cmds, $1)= 5844243750Srwatson_LT_TAGVAR(compiler_needs_object, $1)=no 5845243750Srwatson_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5846243750Srwatson_LT_TAGVAR(hardcode_direct, $1)=no 5847243750Srwatson_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5848243750Srwatson_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5849243750Srwatson_LT_TAGVAR(hardcode_libdir_separator, $1)= 5850243750Srwatson_LT_TAGVAR(hardcode_minus_L, $1)=no 5851243750Srwatson_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5852243750Srwatson_LT_TAGVAR(hardcode_automatic, $1)=no 5853243750Srwatson_LT_TAGVAR(inherit_rpath, $1)=no 5854243750Srwatson_LT_TAGVAR(module_cmds, $1)= 5855243750Srwatson_LT_TAGVAR(module_expsym_cmds, $1)= 5856243750Srwatson_LT_TAGVAR(link_all_deplibs, $1)=unknown 5857243750Srwatson_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5858243750Srwatson_LT_TAGVAR(reload_flag, $1)=$reload_flag 5859243750Srwatson_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5860243750Srwatson_LT_TAGVAR(no_undefined_flag, $1)= 5861243750Srwatson_LT_TAGVAR(whole_archive_flag_spec, $1)= 5862243750Srwatson_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5863243750Srwatson 5864243750Srwatson# Source file extension for C++ test sources. 5865243750Srwatsonac_ext=cpp 5866243750Srwatson 5867243750Srwatson# Object file extension for compiled C++ test sources. 5868243750Srwatsonobjext=o 5869243750Srwatson_LT_TAGVAR(objext, $1)=$objext 5870243750Srwatson 5871243750Srwatson# No sense in running all these tests if we already determined that 5872243750Srwatson# the CXX compiler isn't working. Some variables (like enable_shared) 5873243750Srwatson# are currently assumed to apply to all compilers on this platform, 5874243750Srwatson# and will be corrupted by setting them based on a non-working compiler. 5875243750Srwatsonif test "$_lt_caught_CXX_error" != yes; then 5876243750Srwatson # Code to be used in simple compile tests 5877243750Srwatson lt_simple_compile_test_code="int some_variable = 0;" 5878243750Srwatson 5879243750Srwatson # Code to be used in simple link tests 5880243750Srwatson lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5881243750Srwatson 5882243750Srwatson # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5883243750Srwatson _LT_TAG_COMPILER 5884243750Srwatson 5885243750Srwatson # save warnings/boilerplate of simple test code 5886243750Srwatson _LT_COMPILER_BOILERPLATE 5887243750Srwatson _LT_LINKER_BOILERPLATE 5888243750Srwatson 5889243750Srwatson # Allow CC to be a program name with arguments. 5890243750Srwatson lt_save_CC=$CC 5891243750Srwatson lt_save_CFLAGS=$CFLAGS 5892243750Srwatson lt_save_LD=$LD 5893243750Srwatson lt_save_GCC=$GCC 5894243750Srwatson GCC=$GXX 5895243750Srwatson lt_save_with_gnu_ld=$with_gnu_ld 5896243750Srwatson lt_save_path_LD=$lt_cv_path_LD 5897243750Srwatson if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5898243750Srwatson lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5899243750Srwatson else 5900243750Srwatson $as_unset lt_cv_prog_gnu_ld 5901243750Srwatson fi 5902243750Srwatson if test -n "${lt_cv_path_LDCXX+set}"; then 5903243750Srwatson lt_cv_path_LD=$lt_cv_path_LDCXX 5904243750Srwatson else 5905243750Srwatson $as_unset lt_cv_path_LD 5906243750Srwatson fi 5907243750Srwatson test -z "${LDCXX+set}" || LD=$LDCXX 5908243750Srwatson CC=${CXX-"c++"} 5909243750Srwatson CFLAGS=$CXXFLAGS 5910243750Srwatson compiler=$CC 5911243750Srwatson _LT_TAGVAR(compiler, $1)=$CC 5912243750Srwatson _LT_CC_BASENAME([$compiler]) 5913243750Srwatson 5914243750Srwatson if test -n "$compiler"; then 5915243750Srwatson # We don't want -fno-exception when compiling C++ code, so set the 5916243750Srwatson # no_builtin_flag separately 5917243750Srwatson if test "$GXX" = yes; then 5918243750Srwatson _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5919243750Srwatson else 5920243750Srwatson _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5921243750Srwatson fi 5922243750Srwatson 5923243750Srwatson if test "$GXX" = yes; then 5924243750Srwatson # Set up default GNU C++ configuration 5925243750Srwatson 5926243750Srwatson LT_PATH_LD 5927243750Srwatson 5928243750Srwatson # Check if GNU C++ uses GNU ld as the underlying linker, since the 5929243750Srwatson # archiving commands below assume that GNU ld is being used. 5930243750Srwatson if test "$with_gnu_ld" = yes; then 5931243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5932243750Srwatson _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' 5933243750Srwatson 5934243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5935243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5936243750Srwatson 5937243750Srwatson # If archive_cmds runs LD, not CC, wlarc should be empty 5938243750Srwatson # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5939243750Srwatson # investigate it a little bit more. (MM) 5940243750Srwatson wlarc='${wl}' 5941243750Srwatson 5942243750Srwatson # ancient GNU ld didn't support --whole-archive et. al. 5943243750Srwatson if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5944243750Srwatson $GREP 'no-whole-archive' > /dev/null; then 5945243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5946156283Srwatson else 5947243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)= 5948156283Srwatson fi 5949156283Srwatson else 5950243750Srwatson with_gnu_ld=no 5951243750Srwatson wlarc= 5952243750Srwatson 5953243750Srwatson # A generic and very simple default shared library creation 5954243750Srwatson # command for GNU C++ for the case where it uses the native 5955243750Srwatson # linker, instead of GNU ld. If possible, this setting should 5956243750Srwatson # overridden to take advantage of the native linker features on 5957243750Srwatson # the platform it is being used on. 5958243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5959156283Srwatson fi 5960243750Srwatson 5961243750Srwatson # Commands to make compiler produce verbose output that lists 5962243750Srwatson # what "hidden" libraries, object files and flags are used when 5963243750Srwatson # linking a shared library. 5964243750Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5965243750Srwatson 5966243750Srwatson else 5967243750Srwatson GXX=no 5968243750Srwatson with_gnu_ld=no 5969243750Srwatson wlarc= 5970243750Srwatson fi 5971243750Srwatson 5972243750Srwatson # PORTME: fill in a description of your system's C++ link characteristics 5973243750Srwatson AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5974243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=yes 5975243750Srwatson case $host_os in 5976243750Srwatson aix3*) 5977243750Srwatson # FIXME: insert proper C++ library support 5978243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 5979243750Srwatson ;; 5980243750Srwatson aix[[4-9]]*) 5981243750Srwatson if test "$host_cpu" = ia64; then 5982243750Srwatson # On IA64, the linker does run time linking by default, so we don't 5983243750Srwatson # have to do anything special. 5984243750Srwatson aix_use_runtimelinking=no 5985243750Srwatson exp_sym_flag='-Bexport' 5986243750Srwatson no_entry_flag="" 5987243750Srwatson else 5988243750Srwatson aix_use_runtimelinking=no 5989243750Srwatson 5990243750Srwatson # Test if we are trying to use run time linking or normal 5991243750Srwatson # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5992243750Srwatson # need to do runtime linking. 5993243750Srwatson case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5994243750Srwatson for ld_flag in $LDFLAGS; do 5995243750Srwatson case $ld_flag in 5996243750Srwatson *-brtl*) 5997243750Srwatson aix_use_runtimelinking=yes 5998243750Srwatson break 5999243750Srwatson ;; 6000243750Srwatson esac 6001243750Srwatson done 6002243750Srwatson ;; 6003243750Srwatson esac 6004243750Srwatson 6005243750Srwatson exp_sym_flag='-bexport' 6006243750Srwatson no_entry_flag='-bnoentry' 6007243750Srwatson fi 6008243750Srwatson 6009243750Srwatson # When large executables or shared objects are built, AIX ld can 6010243750Srwatson # have problems creating the table of contents. If linking a library 6011243750Srwatson # or program results in "error TOC overflow" add -mminimal-toc to 6012243750Srwatson # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6013243750Srwatson # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6014243750Srwatson 6015243750Srwatson _LT_TAGVAR(archive_cmds, $1)='' 6016243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 6017243750Srwatson _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6018243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6019243750Srwatson _LT_TAGVAR(link_all_deplibs, $1)=yes 6020243750Srwatson _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6021243750Srwatson 6022243750Srwatson if test "$GXX" = yes; then 6023243750Srwatson case $host_os in aix4.[[012]]|aix4.[[012]].*) 6024243750Srwatson # We only want to do this on AIX 4.2 and lower, the check 6025243750Srwatson # below for broken collect2 doesn't work under 4.3+ 6026243750Srwatson collect2name=`${CC} -print-prog-name=collect2` 6027243750Srwatson if test -f "$collect2name" && 6028243750Srwatson strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6029243750Srwatson then 6030243750Srwatson # We have reworked collect2 6031243750Srwatson : 6032243750Srwatson else 6033243750Srwatson # We have old collect2 6034243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=unsupported 6035243750Srwatson # It fails to find uninstalled libraries when the uninstalled 6036243750Srwatson # path is not listed in the libpath. Setting hardcode_minus_L 6037243750Srwatson # to unsupported forces relinking 6038243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes 6039243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6040243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)= 6041243750Srwatson fi 6042243750Srwatson esac 6043243750Srwatson shared_flag='-shared' 6044243750Srwatson if test "$aix_use_runtimelinking" = yes; then 6045243750Srwatson shared_flag="$shared_flag "'${wl}-G' 6046243750Srwatson fi 6047243750Srwatson else 6048243750Srwatson # not using gcc 6049243750Srwatson if test "$host_cpu" = ia64; then 6050243750Srwatson # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6051243750Srwatson # chokes on -Wl,-G. The following line is correct: 6052243750Srwatson shared_flag='-G' 6053243750Srwatson else 6054243750Srwatson if test "$aix_use_runtimelinking" = yes; then 6055243750Srwatson shared_flag='${wl}-G' 6056243750Srwatson else 6057243750Srwatson shared_flag='${wl}-bM:SRE' 6058243750Srwatson fi 6059243750Srwatson fi 6060243750Srwatson fi 6061243750Srwatson 6062243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6063243750Srwatson # It seems that -bexpall does not export symbols beginning with 6064243750Srwatson # underscore (_), so it is better to generate a list of symbols to 6065243750Srwatson # export. 6066243750Srwatson _LT_TAGVAR(always_export_symbols, $1)=yes 6067243750Srwatson if test "$aix_use_runtimelinking" = yes; then 6068243750Srwatson # Warning - without using the other runtime loading flags (-brtl), 6069243750Srwatson # -berok will link without error, but may produce a broken library. 6070243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6071243750Srwatson # Determine the default libpath from the value encoded in an empty 6072243750Srwatson # executable. 6073243750Srwatson _LT_SYS_MODULE_PATH_AIX([$1]) 6074243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6075243750Srwatson 6076243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 6077243750Srwatson else 6078243750Srwatson if test "$host_cpu" = ia64; then 6079243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6080243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6081243750Srwatson _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" 6082243750Srwatson else 6083243750Srwatson # Determine the default libpath from the value encoded in an 6084243750Srwatson # empty executable. 6085243750Srwatson _LT_SYS_MODULE_PATH_AIX([$1]) 6086243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6087243750Srwatson # Warning - without using the other run time loading flags, 6088243750Srwatson # -berok will link without error, but may produce a broken library. 6089243750Srwatson _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6090243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6091243750Srwatson if test "$with_gnu_ld" = yes; then 6092243750Srwatson # We only use this code for GNU lds that support --whole-archive. 6093243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6094243750Srwatson else 6095243750Srwatson # Exported symbols can be pulled into shared objects from archives 6096243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6097243750Srwatson fi 6098243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6099243750Srwatson # This is similar to how AIX traditionally builds its shared 6100243750Srwatson # libraries. 6101243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 6102243750Srwatson fi 6103243750Srwatson fi 6104243750Srwatson ;; 6105243750Srwatson 6106243750Srwatson beos*) 6107243750Srwatson if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6108243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6109243750Srwatson # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6110243750Srwatson # support --undefined. This deserves some investigation. FIXME 6111243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6112243750Srwatson else 6113243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6114243750Srwatson fi 6115243750Srwatson ;; 6116243750Srwatson 6117243750Srwatson chorus*) 6118243750Srwatson case $cc_basename in 6119243750Srwatson *) 6120243750Srwatson # FIXME: insert proper C++ library support 6121243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6122243750Srwatson ;; 6123243750Srwatson esac 6124243750Srwatson ;; 6125243750Srwatson 6126243750Srwatson cygwin* | mingw* | pw32* | cegcc*) 6127243750Srwatson case $GXX,$cc_basename in 6128243750Srwatson ,cl* | no,cl*) 6129243750Srwatson # Native MSVC 6130243750Srwatson # hardcode_libdir_flag_spec is actually meaningless, as there is 6131243750Srwatson # no search path for DLLs. 6132243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6133243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6134243750Srwatson _LT_TAGVAR(always_export_symbols, $1)=yes 6135243750Srwatson _LT_TAGVAR(file_list_spec, $1)='@' 6136243750Srwatson # Tell ltmain to make .lib files, not .a files. 6137243750Srwatson libext=lib 6138243750Srwatson # Tell ltmain to make .dll files, not .so files. 6139243750Srwatson shrext_cmds=".dll" 6140243750Srwatson # FIXME: Setting linknames here is a bad hack. 6141243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6142243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6143243750Srwatson $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6144243750Srwatson else 6145243750Srwatson $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6146243750Srwatson fi~ 6147243750Srwatson $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6148243750Srwatson linknames=' 6149243750Srwatson # The linker will not automatically build a static lib if we build a DLL. 6150243750Srwatson # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6151243750Srwatson _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6152243750Srwatson # Don't use ranlib 6153243750Srwatson _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6154243750Srwatson _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6155243750Srwatson lt_tool_outputfile="@TOOL_OUTPUT@"~ 6156243750Srwatson case $lt_outputfile in 6157243750Srwatson *.exe|*.EXE) ;; 6158243750Srwatson *) 6159243750Srwatson lt_outputfile="$lt_outputfile.exe" 6160243750Srwatson lt_tool_outputfile="$lt_tool_outputfile.exe" 6161243750Srwatson ;; 6162243750Srwatson esac~ 6163243750Srwatson func_to_tool_file "$lt_outputfile"~ 6164243750Srwatson if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6165243750Srwatson $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6166243750Srwatson $RM "$lt_outputfile.manifest"; 6167243750Srwatson fi' 6168243750Srwatson ;; 6169243750Srwatson *) 6170243750Srwatson # g++ 6171243750Srwatson # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6172243750Srwatson # as there is no search path for DLLs. 6173243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6174243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6175243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6176243750Srwatson _LT_TAGVAR(always_export_symbols, $1)=no 6177243750Srwatson _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6178243750Srwatson 6179243750Srwatson if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6180243750Srwatson _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' 6181243750Srwatson # If the export-symbols file already is a .def file (1st line 6182243750Srwatson # is EXPORTS), use it as is; otherwise, prepend... 6183243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6184243750Srwatson cp $export_symbols $output_objdir/$soname.def; 6185243750Srwatson else 6186243750Srwatson echo EXPORTS > $output_objdir/$soname.def; 6187243750Srwatson cat $export_symbols >> $output_objdir/$soname.def; 6188243750Srwatson fi~ 6189243750Srwatson $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' 6190243750Srwatson else 6191243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6192243750Srwatson fi 6193243750Srwatson ;; 6194243750Srwatson esac 6195243750Srwatson ;; 6196243750Srwatson darwin* | rhapsody*) 6197243750Srwatson _LT_DARWIN_LINKER_FEATURES($1) 6198243750Srwatson ;; 6199243750Srwatson 6200243750Srwatson dgux*) 6201243750Srwatson case $cc_basename in 6202243750Srwatson ec++*) 6203243750Srwatson # FIXME: insert proper C++ library support 6204243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6205243750Srwatson ;; 6206243750Srwatson ghcx*) 6207243750Srwatson # Green Hills C++ Compiler 6208243750Srwatson # FIXME: insert proper C++ library support 6209243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6210243750Srwatson ;; 6211243750Srwatson *) 6212243750Srwatson # FIXME: insert proper C++ library support 6213243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6214243750Srwatson ;; 6215243750Srwatson esac 6216243750Srwatson ;; 6217243750Srwatson 6218243750Srwatson freebsd2.*) 6219243750Srwatson # C++ shared libraries reported to be fairly broken before 6220243750Srwatson # switch to ELF 6221243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6222243750Srwatson ;; 6223243750Srwatson 6224243750Srwatson freebsd-elf*) 6225243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6226243750Srwatson ;; 6227243750Srwatson 6228243750Srwatson freebsd* | dragonfly*) 6229243750Srwatson # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6230243750Srwatson # conventions 6231243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=yes 6232243750Srwatson ;; 6233243750Srwatson 6234243750Srwatson gnu*) 6235243750Srwatson ;; 6236243750Srwatson 6237243750Srwatson haiku*) 6238243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6239243750Srwatson _LT_TAGVAR(link_all_deplibs, $1)=yes 6240243750Srwatson ;; 6241243750Srwatson 6242243750Srwatson hpux9*) 6243243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6244243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6245243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6246243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 6247243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6248243750Srwatson # but as the default 6249243750Srwatson # location of the library. 6250243750Srwatson 6251243750Srwatson case $cc_basename in 6252243750Srwatson CC*) 6253243750Srwatson # FIXME: insert proper C++ library support 6254243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6255243750Srwatson ;; 6256243750Srwatson aCC*) 6257243750Srwatson _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6258243750Srwatson # Commands to make compiler produce verbose output that lists 6259243750Srwatson # what "hidden" libraries, object files and flags are used when 6260243750Srwatson # linking a shared library. 6261243750Srwatson # 6262243750Srwatson # There doesn't appear to be a way to prevent this compiler from 6263243750Srwatson # explicitly linking system object files so we need to strip them 6264243750Srwatson # from the output so that they don't get included in the library 6265243750Srwatson # dependencies. 6266243750Srwatson 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"' 6267243750Srwatson ;; 6268243750Srwatson *) 6269243750Srwatson if test "$GXX" = yes; then 6270243750Srwatson _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6271243750Srwatson else 6272243750Srwatson # FIXME: insert proper C++ library support 6273243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6274243750Srwatson fi 6275243750Srwatson ;; 6276243750Srwatson esac 6277243750Srwatson ;; 6278243750Srwatson 6279243750Srwatson hpux10*|hpux11*) 6280243750Srwatson if test $with_gnu_ld = no; then 6281243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6282243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6283243750Srwatson 6284243750Srwatson case $host_cpu in 6285243750Srwatson hppa*64*|ia64*) 6286243750Srwatson ;; 6287243750Srwatson *) 6288243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6289243750Srwatson ;; 6290243750Srwatson esac 6291243750Srwatson fi 6292243750Srwatson case $host_cpu in 6293243750Srwatson hppa*64*|ia64*) 6294243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=no 6295243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6296243750Srwatson ;; 6297243750Srwatson *) 6298243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 6299243750Srwatson _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6300243750Srwatson _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6301243750Srwatson # but as the default 6302243750Srwatson # location of the library. 6303243750Srwatson ;; 6304243750Srwatson esac 6305243750Srwatson 6306243750Srwatson case $cc_basename in 6307243750Srwatson CC*) 6308243750Srwatson # FIXME: insert proper C++ library support 6309243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6310243750Srwatson ;; 6311243750Srwatson aCC*) 6312243750Srwatson case $host_cpu in 6313243750Srwatson hppa*64*) 6314243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6315243750Srwatson ;; 6316243750Srwatson ia64*) 6317243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6318243750Srwatson ;; 6319243750Srwatson *) 6320243750Srwatson _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' 6321243750Srwatson ;; 6322243750Srwatson esac 6323243750Srwatson # Commands to make compiler produce verbose output that lists 6324243750Srwatson # what "hidden" libraries, object files and flags are used when 6325243750Srwatson # linking a shared library. 6326243750Srwatson # 6327243750Srwatson # There doesn't appear to be a way to prevent this compiler from 6328243750Srwatson # explicitly linking system object files so we need to strip them 6329243750Srwatson # from the output so that they don't get included in the library 6330243750Srwatson # dependencies. 6331243750Srwatson 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"' 6332243750Srwatson ;; 6333243750Srwatson *) 6334243750Srwatson if test "$GXX" = yes; then 6335243750Srwatson if test $with_gnu_ld = no; then 6336243750Srwatson case $host_cpu in 6337243750Srwatson hppa*64*) 6338243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6339243750Srwatson ;; 6340243750Srwatson ia64*) 6341243750Srwatson _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' 6342243750Srwatson ;; 6343243750Srwatson *) 6344243750Srwatson _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' 6345243750Srwatson ;; 6346243750Srwatson esac 6347243750Srwatson fi 6348243750Srwatson else 6349243750Srwatson # FIXME: insert proper C++ library support 6350243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6351243750Srwatson fi 6352243750Srwatson ;; 6353243750Srwatson esac 6354243750Srwatson ;; 6355243750Srwatson 6356243750Srwatson interix[[3-9]]*) 6357243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=no 6358243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6359243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6360243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6361243750Srwatson # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6362243750Srwatson # Instead, shared libraries are loaded at an image base (0x10000000 by 6363243750Srwatson # default) and relocated if they conflict, which is a slow very memory 6364243750Srwatson # consuming and fragmenting process. To avoid this, we pick a random, 6365243750Srwatson # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6366243750Srwatson # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6367243750Srwatson _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' 6368243750Srwatson _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' 6369243750Srwatson ;; 6370243750Srwatson irix5* | irix6*) 6371243750Srwatson case $cc_basename in 6372243750Srwatson CC*) 6373243750Srwatson # SGI C++ 6374243750Srwatson _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' 6375243750Srwatson 6376243750Srwatson # Archives containing C++ object files must be created using 6377243750Srwatson # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6378243750Srwatson # necessary to make sure instantiated templates are included 6379243750Srwatson # in the archive. 6380243750Srwatson _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6381243750Srwatson ;; 6382243750Srwatson *) 6383243750Srwatson if test "$GXX" = yes; then 6384243750Srwatson if test "$with_gnu_ld" = no; then 6385243750Srwatson _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' 6386243750Srwatson else 6387243750Srwatson _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' 6388243750Srwatson fi 6389243750Srwatson fi 6390243750Srwatson _LT_TAGVAR(link_all_deplibs, $1)=yes 6391243750Srwatson ;; 6392243750Srwatson esac 6393243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6394243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6395243750Srwatson _LT_TAGVAR(inherit_rpath, $1)=yes 6396243750Srwatson ;; 6397243750Srwatson 6398243750Srwatson linux* | k*bsd*-gnu | kopensolaris*-gnu) 6399243750Srwatson case $cc_basename in 6400243750Srwatson KCC*) 6401243750Srwatson # Kuck and Associates, Inc. (KAI) C++ Compiler 6402243750Srwatson 6403243750Srwatson # KCC will only create a shared library if the output file 6404243750Srwatson # ends with ".so" (or ".sl" for HP-UX), so rename the library 6405243750Srwatson # to its proper name (with version) after linking. 6406243750Srwatson _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' 6407243750Srwatson _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' 6408243750Srwatson # Commands to make compiler produce verbose output that lists 6409243750Srwatson # what "hidden" libraries, object files and flags are used when 6410243750Srwatson # linking a shared library. 6411243750Srwatson # 6412243750Srwatson # There doesn't appear to be a way to prevent this compiler from 6413243750Srwatson # explicitly linking system object files so we need to strip them 6414243750Srwatson # from the output so that they don't get included in the library 6415243750Srwatson # dependencies. 6416243750Srwatson 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"' 6417243750Srwatson 6418243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6419243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6420243750Srwatson 6421243750Srwatson # Archives containing C++ object files must be created using 6422243750Srwatson # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6423243750Srwatson _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6424243750Srwatson ;; 6425243750Srwatson icpc* | ecpc* ) 6426243750Srwatson # Intel C++ 6427243750Srwatson with_gnu_ld=yes 6428243750Srwatson # version 8.0 and above of icpc choke on multiply defined symbols 6429243750Srwatson # if we add $predep_objects and $postdep_objects, however 7.1 and 6430243750Srwatson # earlier do not add the objects themselves. 6431243750Srwatson case `$CC -V 2>&1` in 6432243750Srwatson *"Version 7."*) 6433243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6434243750Srwatson _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' 6435243750Srwatson ;; 6436243750Srwatson *) # Version 8.0 or newer 6437243750Srwatson tmp_idyn= 6438243750Srwatson case $host_cpu in 6439243750Srwatson ia64*) tmp_idyn=' -i_dynamic';; 6440243750Srwatson esac 6441243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6442243750Srwatson _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' 6443243750Srwatson ;; 6444243750Srwatson esac 6445243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6446243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6447243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6448243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6449243750Srwatson ;; 6450243750Srwatson pgCC* | pgcpp*) 6451243750Srwatson # Portland Group C++ compiler 6452243750Srwatson case `$CC -V` in 6453243750Srwatson *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6454243750Srwatson _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6455243750Srwatson rm -rf $tpldir~ 6456243750Srwatson $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6457243750Srwatson compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6458243750Srwatson _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6459243750Srwatson rm -rf $tpldir~ 6460243750Srwatson $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6461243750Srwatson $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6462243750Srwatson $RANLIB $oldlib' 6463243750Srwatson _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6464243750Srwatson rm -rf $tpldir~ 6465243750Srwatson $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6466243750Srwatson $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6467243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6468243750Srwatson rm -rf $tpldir~ 6469243750Srwatson $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6470243750Srwatson $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' 6471243750Srwatson ;; 6472243750Srwatson *) # Version 6 and above use weak symbols 6473243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6474243750Srwatson _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' 6475243750Srwatson ;; 6476243750Srwatson esac 6477243750Srwatson 6478243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6479243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6480243750Srwatson _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' 6481243750Srwatson ;; 6482243750Srwatson cxx*) 6483243750Srwatson # Compaq C++ 6484243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6485243750Srwatson _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' 6486243750Srwatson 6487243750Srwatson runpath_var=LD_RUN_PATH 6488243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6489243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6490243750Srwatson 6491243750Srwatson # Commands to make compiler produce verbose output that lists 6492243750Srwatson # what "hidden" libraries, object files and flags are used when 6493243750Srwatson # linking a shared library. 6494243750Srwatson # 6495243750Srwatson # There doesn't appear to be a way to prevent this compiler from 6496243750Srwatson # explicitly linking system object files so we need to strip them 6497243750Srwatson # from the output so that they don't get included in the library 6498243750Srwatson # dependencies. 6499243750Srwatson 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' 6500243750Srwatson ;; 6501243750Srwatson xl* | mpixl* | bgxl*) 6502243750Srwatson # IBM XL 8.0 on PPC, with GNU ld 6503243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6504243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6505243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6506243750Srwatson if test "x$supports_anon_versioning" = xyes; then 6507243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6508243750Srwatson cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6509243750Srwatson echo "local: *; };" >> $output_objdir/$libname.ver~ 6510243750Srwatson $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6511243750Srwatson fi 6512243750Srwatson ;; 6513243750Srwatson *) 6514243750Srwatson case `$CC -V 2>&1 | sed 5q` in 6515243750Srwatson *Sun\ C*) 6516243750Srwatson # Sun C++ 5.9 6517243750Srwatson _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6518243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6519243750Srwatson _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' 6520243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6521243750Srwatson _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' 6522243750Srwatson _LT_TAGVAR(compiler_needs_object, $1)=yes 6523243750Srwatson 6524243750Srwatson # Not sure whether something based on 6525243750Srwatson # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6526243750Srwatson # would be better. 6527243750Srwatson output_verbose_link_cmd='func_echo_all' 6528243750Srwatson 6529243750Srwatson # Archives containing C++ object files must be created using 6530243750Srwatson # "CC -xar", where "CC" is the Sun C++ compiler. This is 6531243750Srwatson # necessary to make sure instantiated templates are included 6532243750Srwatson # in the archive. 6533243750Srwatson _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6534243750Srwatson ;; 6535243750Srwatson esac 6536243750Srwatson ;; 6537243750Srwatson esac 6538243750Srwatson ;; 6539243750Srwatson 6540243750Srwatson lynxos*) 6541243750Srwatson # FIXME: insert proper C++ library support 6542243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6543243750Srwatson ;; 6544243750Srwatson 6545243750Srwatson m88k*) 6546243750Srwatson # FIXME: insert proper C++ library support 6547243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6548243750Srwatson ;; 6549243750Srwatson 6550243750Srwatson mvs*) 6551243750Srwatson case $cc_basename in 6552243750Srwatson cxx*) 6553243750Srwatson # FIXME: insert proper C++ library support 6554243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6555243750Srwatson ;; 6556243750Srwatson *) 6557243750Srwatson # FIXME: insert proper C++ library support 6558243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6559243750Srwatson ;; 6560243750Srwatson esac 6561243750Srwatson ;; 6562243750Srwatson 6563243750Srwatson netbsd*) 6564243750Srwatson if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6565243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6566243750Srwatson wlarc= 6567243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6568243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 6569243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6570243750Srwatson fi 6571243750Srwatson # Workaround some broken pre-1.5 toolchains 6572243750Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6573243750Srwatson ;; 6574243750Srwatson 6575243750Srwatson *nto* | *qnx*) 6576243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=yes 6577243750Srwatson ;; 6578243750Srwatson 6579243750Srwatson openbsd2*) 6580243750Srwatson # C++ shared libraries are fairly broken 6581243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6582243750Srwatson ;; 6583243750Srwatson 6584243750Srwatson openbsd*) 6585243750Srwatson if test -f /usr/libexec/ld.so; then 6586243750Srwatson _LT_TAGVAR(hardcode_direct, $1)=yes 6587243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6588243750Srwatson _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6589243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6590243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6591243750Srwatson if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6592243750Srwatson _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' 6593243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6594243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6595243750Srwatson fi 6596243750Srwatson output_verbose_link_cmd=func_echo_all 6597243750Srwatson else 6598243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6599243750Srwatson fi 6600243750Srwatson ;; 6601243750Srwatson 6602243750Srwatson osf3* | osf4* | osf5*) 6603243750Srwatson case $cc_basename in 6604243750Srwatson KCC*) 6605243750Srwatson # Kuck and Associates, Inc. (KAI) C++ Compiler 6606243750Srwatson 6607243750Srwatson # KCC will only create a shared library if the output file 6608243750Srwatson # ends with ".so" (or ".sl" for HP-UX), so rename the library 6609243750Srwatson # to its proper name (with version) after linking. 6610243750Srwatson _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' 6611243750Srwatson 6612243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6613243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6614243750Srwatson 6615243750Srwatson # Archives containing C++ object files must be created using 6616243750Srwatson # the KAI C++ compiler. 6617243750Srwatson case $host in 6618243750Srwatson osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6619243750Srwatson *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6620243750Srwatson esac 6621243750Srwatson ;; 6622243750Srwatson RCC*) 6623243750Srwatson # Rational C++ 2.4.1 6624243750Srwatson # FIXME: insert proper C++ library support 6625243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6626243750Srwatson ;; 6627243750Srwatson cxx*) 6628243750Srwatson case $host in 6629243750Srwatson osf3*) 6630243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6631243750Srwatson _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' 6632243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6633243750Srwatson ;; 6634243750Srwatson *) 6635243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6636243750Srwatson _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' 6637243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6638243750Srwatson echo "-hidden">> $lib.exp~ 6639243750Srwatson $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~ 6640243750Srwatson $RM $lib.exp' 6641243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6642243750Srwatson ;; 6643243750Srwatson esac 6644243750Srwatson 6645243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6646243750Srwatson 6647243750Srwatson # Commands to make compiler produce verbose output that lists 6648243750Srwatson # what "hidden" libraries, object files and flags are used when 6649243750Srwatson # linking a shared library. 6650243750Srwatson # 6651243750Srwatson # There doesn't appear to be a way to prevent this compiler from 6652243750Srwatson # explicitly linking system object files so we need to strip them 6653243750Srwatson # from the output so that they don't get included in the library 6654243750Srwatson # dependencies. 6655243750Srwatson 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"' 6656243750Srwatson ;; 6657243750Srwatson *) 6658243750Srwatson if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6659243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6660243750Srwatson case $host in 6661243750Srwatson osf3*) 6662243750Srwatson _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' 6663243750Srwatson ;; 6664243750Srwatson *) 6665243750Srwatson _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' 6666243750Srwatson ;; 6667243750Srwatson esac 6668243750Srwatson 6669243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6670243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6671243750Srwatson 6672243750Srwatson # Commands to make compiler produce verbose output that lists 6673243750Srwatson # what "hidden" libraries, object files and flags are used when 6674243750Srwatson # linking a shared library. 6675243750Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6676243750Srwatson 6677243750Srwatson else 6678243750Srwatson # FIXME: insert proper C++ library support 6679243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6680243750Srwatson fi 6681243750Srwatson ;; 6682243750Srwatson esac 6683243750Srwatson ;; 6684243750Srwatson 6685243750Srwatson psos*) 6686243750Srwatson # FIXME: insert proper C++ library support 6687243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6688243750Srwatson ;; 6689243750Srwatson 6690243750Srwatson sunos4*) 6691243750Srwatson case $cc_basename in 6692243750Srwatson CC*) 6693243750Srwatson # Sun C++ 4.x 6694243750Srwatson # FIXME: insert proper C++ library support 6695243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6696243750Srwatson ;; 6697243750Srwatson lcc*) 6698243750Srwatson # Lucid 6699243750Srwatson # FIXME: insert proper C++ library support 6700243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6701243750Srwatson ;; 6702243750Srwatson *) 6703243750Srwatson # FIXME: insert proper C++ library support 6704243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6705243750Srwatson ;; 6706243750Srwatson esac 6707243750Srwatson ;; 6708243750Srwatson 6709243750Srwatson solaris*) 6710243750Srwatson case $cc_basename in 6711243750Srwatson CC* | sunCC*) 6712243750Srwatson # Sun C++ 4.2, 5.x and Centerline C++ 6713243750Srwatson _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6714243750Srwatson _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6715243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6716243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6717243750Srwatson $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' 6718243750Srwatson 6719243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6720243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6721243750Srwatson case $host_os in 6722243750Srwatson solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6723243750Srwatson *) 6724243750Srwatson # The compiler driver will combine and reorder linker options, 6725243750Srwatson # but understands `-z linker_flag'. 6726243750Srwatson # Supported since Solaris 2.6 (maybe 2.5.1?) 6727243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6728243750Srwatson ;; 6729243750Srwatson esac 6730243750Srwatson _LT_TAGVAR(link_all_deplibs, $1)=yes 6731243750Srwatson 6732243750Srwatson output_verbose_link_cmd='func_echo_all' 6733243750Srwatson 6734243750Srwatson # Archives containing C++ object files must be created using 6735243750Srwatson # "CC -xar", where "CC" is the Sun C++ compiler. This is 6736243750Srwatson # necessary to make sure instantiated templates are included 6737243750Srwatson # in the archive. 6738243750Srwatson _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6739243750Srwatson ;; 6740243750Srwatson gcx*) 6741243750Srwatson # Green Hills C++ Compiler 6742243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6743243750Srwatson 6744243750Srwatson # The C++ compiler must be used to create the archive. 6745243750Srwatson _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6746243750Srwatson ;; 6747243750Srwatson *) 6748243750Srwatson # GNU C++ compiler with Solaris linker 6749243750Srwatson if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6750243750Srwatson _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6751243750Srwatson if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6752243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6753243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6754243750Srwatson $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6755243750Srwatson 6756243750Srwatson # Commands to make compiler produce verbose output that lists 6757243750Srwatson # what "hidden" libraries, object files and flags are used when 6758243750Srwatson # linking a shared library. 6759243750Srwatson output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6760243750Srwatson else 6761243750Srwatson # g++ 2.7 appears to require `-G' NOT `-shared' on this 6762243750Srwatson # platform. 6763243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6764243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6765243750Srwatson $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6766243750Srwatson 6767243750Srwatson # Commands to make compiler produce verbose output that lists 6768243750Srwatson # what "hidden" libraries, object files and flags are used when 6769243750Srwatson # linking a shared library. 6770243750Srwatson output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6771243750Srwatson fi 6772243750Srwatson 6773243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6774243750Srwatson case $host_os in 6775243750Srwatson solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6776243750Srwatson *) 6777243750Srwatson _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6778243750Srwatson ;; 6779243750Srwatson esac 6780243750Srwatson fi 6781243750Srwatson ;; 6782243750Srwatson esac 6783243750Srwatson ;; 6784243750Srwatson 6785243750Srwatson sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6786243750Srwatson _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6787243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6788243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6789243750Srwatson runpath_var='LD_RUN_PATH' 6790243750Srwatson 6791243750Srwatson case $cc_basename in 6792243750Srwatson CC*) 6793243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6794243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6795243750Srwatson ;; 6796243750Srwatson *) 6797243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6798243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6799243750Srwatson ;; 6800243750Srwatson esac 6801156283Srwatson ;; 6802243750Srwatson 6803243750Srwatson sysv5* | sco3.2v5* | sco5v6*) 6804243750Srwatson # Note: We can NOT use -z defs as we might desire, because we do not 6805243750Srwatson # link with -lc, and that would cause any symbols used from libc to 6806243750Srwatson # always be unresolved, which means just about no library would 6807243750Srwatson # ever link correctly. If we're not using GNU ld we use -z text 6808243750Srwatson # though, which does catch some bad symbols but isn't as heavy-handed 6809243750Srwatson # as -z defs. 6810243750Srwatson _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6811243750Srwatson _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6812243750Srwatson _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6813243750Srwatson _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6814243750Srwatson _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6815243750Srwatson _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6816243750Srwatson _LT_TAGVAR(link_all_deplibs, $1)=yes 6817243750Srwatson _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6818243750Srwatson runpath_var='LD_RUN_PATH' 6819243750Srwatson 6820243750Srwatson case $cc_basename in 6821243750Srwatson CC*) 6822243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6823243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6824243750Srwatson _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6825243750Srwatson '"$_LT_TAGVAR(old_archive_cmds, $1)" 6826243750Srwatson _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6827243750Srwatson '"$_LT_TAGVAR(reload_cmds, $1)" 6828243750Srwatson ;; 6829243750Srwatson *) 6830243750Srwatson _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6831243750Srwatson _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6832243750Srwatson ;; 6833243750Srwatson esac 6834243750Srwatson ;; 6835243750Srwatson 6836243750Srwatson tandem*) 6837243750Srwatson case $cc_basename in 6838243750Srwatson NCC*) 6839243750Srwatson # NonStop-UX NCC 3.20 6840243750Srwatson # FIXME: insert proper C++ library support 6841243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6842243750Srwatson ;; 6843243750Srwatson *) 6844243750Srwatson # FIXME: insert proper C++ library support 6845243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6846243750Srwatson ;; 6847243750Srwatson esac 6848243750Srwatson ;; 6849243750Srwatson 6850243750Srwatson vxworks*) 6851243750Srwatson # FIXME: insert proper C++ library support 6852243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6853243750Srwatson ;; 6854243750Srwatson 6855243750Srwatson *) 6856243750Srwatson # FIXME: insert proper C++ library support 6857243750Srwatson _LT_TAGVAR(ld_shlibs, $1)=no 6858243750Srwatson ;; 6859156283Srwatson esac 6860243750Srwatson 6861243750Srwatson AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6862243750Srwatson test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6863243750Srwatson 6864243750Srwatson _LT_TAGVAR(GCC, $1)="$GXX" 6865243750Srwatson _LT_TAGVAR(LD, $1)="$LD" 6866243750Srwatson 6867243750Srwatson ## CAVEAT EMPTOR: 6868243750Srwatson ## There is no encapsulation within the following macros, do not change 6869243750Srwatson ## the running order or otherwise move them around unless you know exactly 6870243750Srwatson ## what you are doing... 6871243750Srwatson _LT_SYS_HIDDEN_LIBDEPS($1) 6872243750Srwatson _LT_COMPILER_PIC($1) 6873243750Srwatson _LT_COMPILER_C_O($1) 6874243750Srwatson _LT_COMPILER_FILE_LOCKS($1) 6875243750Srwatson _LT_LINKER_SHLIBS($1) 6876243750Srwatson _LT_SYS_DYNAMIC_LINKER($1) 6877243750Srwatson _LT_LINKER_HARDCODE_LIBPATH($1) 6878243750Srwatson 6879243750Srwatson _LT_CONFIG($1) 6880243750Srwatson fi # test -n "$compiler" 6881243750Srwatson 6882243750Srwatson CC=$lt_save_CC 6883243750Srwatson CFLAGS=$lt_save_CFLAGS 6884243750Srwatson LDCXX=$LD 6885243750Srwatson LD=$lt_save_LD 6886243750Srwatson GCC=$lt_save_GCC 6887243750Srwatson with_gnu_ld=$lt_save_with_gnu_ld 6888243750Srwatson lt_cv_path_LDCXX=$lt_cv_path_LD 6889243750Srwatson lt_cv_path_LD=$lt_save_path_LD 6890243750Srwatson lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6891243750Srwatson lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6892243750Srwatsonfi # test "$_lt_caught_CXX_error" != yes 6893243750Srwatson 6894243750SrwatsonAC_LANG_POP 6895243750Srwatson])# _LT_LANG_CXX_CONFIG 6896243750Srwatson 6897243750Srwatson 6898243750Srwatson# _LT_FUNC_STRIPNAME_CNF 6899243750Srwatson# ---------------------- 6900243750Srwatson# func_stripname_cnf prefix suffix name 6901243750Srwatson# strip PREFIX and SUFFIX off of NAME. 6902243750Srwatson# PREFIX and SUFFIX must not contain globbing or regex special 6903243750Srwatson# characters, hashes, percent signs, but SUFFIX may contain a leading 6904243750Srwatson# dot (in which case that matches only a dot). 6905243750Srwatson# 6906243750Srwatson# This function is identical to the (non-XSI) version of func_stripname, 6907243750Srwatson# except this one can be used by m4 code that may be executed by configure, 6908243750Srwatson# rather than the libtool script. 6909243750Srwatsonm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6910243750SrwatsonAC_REQUIRE([_LT_DECL_SED]) 6911243750SrwatsonAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6912243750Srwatsonfunc_stripname_cnf () 6913243750Srwatson{ 6914243750Srwatson case ${2} in 6915243750Srwatson .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6916243750Srwatson *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6917243750Srwatson esac 6918243750Srwatson} # func_stripname_cnf 6919243750Srwatson])# _LT_FUNC_STRIPNAME_CNF 6920243750Srwatson 6921243750Srwatson# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6922243750Srwatson# --------------------------------- 6923243750Srwatson# Figure out "hidden" library dependencies from verbose 6924243750Srwatson# compiler output when linking a shared library. 6925243750Srwatson# Parse the compiler output and extract the necessary 6926243750Srwatson# objects, libraries and library flags. 6927243750Srwatsonm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6928243750Srwatson[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6929243750SrwatsonAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6930243750Srwatson# Dependencies to place before and after the object being linked: 6931243750Srwatson_LT_TAGVAR(predep_objects, $1)= 6932243750Srwatson_LT_TAGVAR(postdep_objects, $1)= 6933243750Srwatson_LT_TAGVAR(predeps, $1)= 6934243750Srwatson_LT_TAGVAR(postdeps, $1)= 6935243750Srwatson_LT_TAGVAR(compiler_lib_search_path, $1)= 6936243750Srwatson 6937243750Srwatsondnl we can't use the lt_simple_compile_test_code here, 6938243750Srwatsondnl because it contains code intended for an executable, 6939243750Srwatsondnl not a library. It's possible we should let each 6940243750Srwatsondnl tag define a new lt_????_link_test_code variable, 6941243750Srwatsondnl but it's only used here... 6942243750Srwatsonm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6943243750Srwatsonint a; 6944243750Srwatsonvoid foo (void) { a = 0; } 6945243750Srwatson_LT_EOF 6946243750Srwatson], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6947243750Srwatsonclass Foo 6948243750Srwatson{ 6949243750Srwatsonpublic: 6950243750Srwatson Foo (void) { a = 0; } 6951243750Srwatsonprivate: 6952243750Srwatson int a; 6953243750Srwatson}; 6954243750Srwatson_LT_EOF 6955243750Srwatson], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6956243750Srwatson subroutine foo 6957243750Srwatson implicit none 6958243750Srwatson integer*4 a 6959243750Srwatson a=0 6960243750Srwatson return 6961243750Srwatson end 6962243750Srwatson_LT_EOF 6963243750Srwatson], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6964243750Srwatson subroutine foo 6965243750Srwatson implicit none 6966243750Srwatson integer a 6967243750Srwatson a=0 6968243750Srwatson return 6969243750Srwatson end 6970243750Srwatson_LT_EOF 6971243750Srwatson], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6972243750Srwatsonpublic class foo { 6973243750Srwatson private int a; 6974243750Srwatson public void bar (void) { 6975243750Srwatson a = 0; 6976243750Srwatson } 6977243750Srwatson}; 6978243750Srwatson_LT_EOF 6979243750Srwatson], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6980243750Srwatsonpackage foo 6981243750Srwatsonfunc foo() { 6982243750Srwatson} 6983243750Srwatson_LT_EOF 6984243750Srwatson]) 6985243750Srwatson 6986243750Srwatson_lt_libdeps_save_CFLAGS=$CFLAGS 6987243750Srwatsoncase "$CC $CFLAGS " in #( 6988243750Srwatson*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6989243750Srwatson*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6990243750Srwatson*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 6991243750Srwatsonesac 6992243750Srwatson 6993243750Srwatsondnl Parse the compiler output and extract the necessary 6994243750Srwatsondnl objects, libraries and library flags. 6995243750Srwatsonif AC_TRY_EVAL(ac_compile); then 6996243750Srwatson # Parse the compiler output and extract the necessary 6997243750Srwatson # objects, libraries and library flags. 6998243750Srwatson 6999243750Srwatson # Sentinel used to keep track of whether or not we are before 7000243750Srwatson # the conftest object file. 7001243750Srwatson pre_test_object_deps_done=no 7002243750Srwatson 7003243750Srwatson for p in `eval "$output_verbose_link_cmd"`; do 7004243750Srwatson case ${prev}${p} in 7005243750Srwatson 7006243750Srwatson -L* | -R* | -l*) 7007243750Srwatson # Some compilers place space between "-{L,R}" and the path. 7008243750Srwatson # Remove the space. 7009243750Srwatson if test $p = "-L" || 7010243750Srwatson test $p = "-R"; then 7011243750Srwatson prev=$p 7012243750Srwatson continue 7013243750Srwatson fi 7014243750Srwatson 7015243750Srwatson # Expand the sysroot to ease extracting the directories later. 7016243750Srwatson if test -z "$prev"; then 7017243750Srwatson case $p in 7018243750Srwatson -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7019243750Srwatson -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7020243750Srwatson -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7021243750Srwatson esac 7022243750Srwatson fi 7023243750Srwatson case $p in 7024243750Srwatson =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7025243750Srwatson esac 7026243750Srwatson if test "$pre_test_object_deps_done" = no; then 7027243750Srwatson case ${prev} in 7028243750Srwatson -L | -R) 7029243750Srwatson # Internal compiler library paths should come after those 7030243750Srwatson # provided the user. The postdeps already come after the 7031243750Srwatson # user supplied libs so there is no need to process them. 7032243750Srwatson if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7033243750Srwatson _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 7034243750Srwatson else 7035243750Srwatson _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 7036243750Srwatson fi 7037243750Srwatson ;; 7038243750Srwatson # The "-l" case would never come before the object being 7039243750Srwatson # linked, so don't bother handling this case. 7040243750Srwatson esac 7041243750Srwatson else 7042243750Srwatson if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7043243750Srwatson _LT_TAGVAR(postdeps, $1)="${prev}${p}" 7044243750Srwatson else 7045243750Srwatson _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 7046243750Srwatson fi 7047243750Srwatson fi 7048243750Srwatson prev= 7049243750Srwatson ;; 7050243750Srwatson 7051243750Srwatson *.lto.$objext) ;; # Ignore GCC LTO objects 7052243750Srwatson *.$objext) 7053243750Srwatson # This assumes that the test object file only shows up 7054243750Srwatson # once in the compiler output. 7055243750Srwatson if test "$p" = "conftest.$objext"; then 7056243750Srwatson pre_test_object_deps_done=yes 7057243750Srwatson continue 7058243750Srwatson fi 7059243750Srwatson 7060243750Srwatson if test "$pre_test_object_deps_done" = no; then 7061243750Srwatson if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7062243750Srwatson _LT_TAGVAR(predep_objects, $1)="$p" 7063243750Srwatson else 7064243750Srwatson _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7065243750Srwatson fi 7066243750Srwatson else 7067243750Srwatson if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7068243750Srwatson _LT_TAGVAR(postdep_objects, $1)="$p" 7069243750Srwatson else 7070243750Srwatson _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7071243750Srwatson fi 7072243750Srwatson fi 7073243750Srwatson ;; 7074243750Srwatson 7075243750Srwatson *) ;; # Ignore the rest. 7076243750Srwatson 7077243750Srwatson esac 7078243750Srwatson done 7079243750Srwatson 7080243750Srwatson # Clean up. 7081243750Srwatson rm -f a.out a.exe 7082243750Srwatsonelse 7083243750Srwatson echo "libtool.m4: error: problem compiling $1 test program" 7084243750Srwatsonfi 7085243750Srwatson 7086243750Srwatson$RM -f confest.$objext 7087243750SrwatsonCFLAGS=$_lt_libdeps_save_CFLAGS 7088243750Srwatson 7089243750Srwatson# PORTME: override above test on systems where it is broken 7090243750Srwatsonm4_if([$1], [CXX], 7091243750Srwatson[case $host_os in 7092243750Srwatsoninterix[[3-9]]*) 7093243750Srwatson # Interix 3.5 installs completely hosed .la files for C++, so rather than 7094243750Srwatson # hack all around it, let's just trust "g++" to DTRT. 7095243750Srwatson _LT_TAGVAR(predep_objects,$1)= 7096243750Srwatson _LT_TAGVAR(postdep_objects,$1)= 7097243750Srwatson _LT_TAGVAR(postdeps,$1)= 7098156283Srwatson ;; 7099243750Srwatson 7100243750Srwatsonlinux*) 7101243750Srwatson case `$CC -V 2>&1 | sed 5q` in 7102243750Srwatson *Sun\ C*) 7103243750Srwatson # Sun C++ 5.9 7104243750Srwatson 7105243750Srwatson # The more standards-conforming stlport4 library is 7106243750Srwatson # incompatible with the Cstd library. Avoid specifying 7107243750Srwatson # it if it's in CXXFLAGS. Ignore libCrun as 7108243750Srwatson # -library=stlport4 depends on it. 7109243750Srwatson case " $CXX $CXXFLAGS " in 7110243750Srwatson *" -library=stlport4 "*) 7111243750Srwatson solaris_use_stlport4=yes 7112243750Srwatson ;; 7113243750Srwatson esac 7114243750Srwatson 7115243750Srwatson if test "$solaris_use_stlport4" != yes; then 7116243750Srwatson _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7117243750Srwatson fi 7118243750Srwatson ;; 7119243750Srwatson esac 7120243750Srwatson ;; 7121243750Srwatson 7122243750Srwatsonsolaris*) 7123243750Srwatson case $cc_basename in 7124243750Srwatson CC* | sunCC*) 7125243750Srwatson # The more standards-conforming stlport4 library is 7126243750Srwatson # incompatible with the Cstd library. Avoid specifying 7127243750Srwatson # it if it's in CXXFLAGS. Ignore libCrun as 7128243750Srwatson # -library=stlport4 depends on it. 7129243750Srwatson case " $CXX $CXXFLAGS " in 7130243750Srwatson *" -library=stlport4 "*) 7131243750Srwatson solaris_use_stlport4=yes 7132243750Srwatson ;; 7133243750Srwatson esac 7134243750Srwatson 7135243750Srwatson # Adding this requires a known-good setup of shared libraries for 7136243750Srwatson # Sun compiler versions before 5.6, else PIC objects from an old 7137243750Srwatson # archive will be linked into the output, leading to subtle bugs. 7138243750Srwatson if test "$solaris_use_stlport4" != yes; then 7139243750Srwatson _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7140243750Srwatson fi 7141243750Srwatson ;; 7142243750Srwatson esac 7143243750Srwatson ;; 7144156283Srwatsonesac 7145243750Srwatson]) 7146156283Srwatson 7147243750Srwatsoncase " $_LT_TAGVAR(postdeps, $1) " in 7148243750Srwatson*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7149243750Srwatsonesac 7150243750Srwatson _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7151243750Srwatsonif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7152243750Srwatson _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7153243750Srwatsonfi 7154243750Srwatson_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7155243750Srwatson [The directories searched by this compiler when creating a shared library]) 7156243750Srwatson_LT_TAGDECL([], [predep_objects], [1], 7157243750Srwatson [Dependencies to place before and after the objects being linked to 7158243750Srwatson create a shared library]) 7159243750Srwatson_LT_TAGDECL([], [postdep_objects], [1]) 7160243750Srwatson_LT_TAGDECL([], [predeps], [1]) 7161243750Srwatson_LT_TAGDECL([], [postdeps], [1]) 7162243750Srwatson_LT_TAGDECL([], [compiler_lib_search_path], [1], 7163243750Srwatson [The library search path used internally by the compiler when linking 7164243750Srwatson a shared library]) 7165243750Srwatson])# _LT_SYS_HIDDEN_LIBDEPS 7166156283Srwatson 7167156283Srwatson 7168243750Srwatson# _LT_LANG_F77_CONFIG([TAG]) 7169243750Srwatson# -------------------------- 7170243750Srwatson# Ensure that the configuration variables for a Fortran 77 compiler are 7171243750Srwatson# suitably defined. These variables are subsequently used by _LT_CONFIG 7172243750Srwatson# to write the compiler configuration to `libtool'. 7173243750Srwatsonm4_defun([_LT_LANG_F77_CONFIG], 7174243750Srwatson[AC_LANG_PUSH(Fortran 77) 7175243750Srwatsonif test -z "$F77" || test "X$F77" = "Xno"; then 7176243750Srwatson _lt_disable_F77=yes 7177243750Srwatsonfi 7178156283Srwatson 7179243750Srwatson_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7180243750Srwatson_LT_TAGVAR(allow_undefined_flag, $1)= 7181243750Srwatson_LT_TAGVAR(always_export_symbols, $1)=no 7182243750Srwatson_LT_TAGVAR(archive_expsym_cmds, $1)= 7183243750Srwatson_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7184243750Srwatson_LT_TAGVAR(hardcode_direct, $1)=no 7185243750Srwatson_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7186243750Srwatson_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7187243750Srwatson_LT_TAGVAR(hardcode_libdir_separator, $1)= 7188243750Srwatson_LT_TAGVAR(hardcode_minus_L, $1)=no 7189243750Srwatson_LT_TAGVAR(hardcode_automatic, $1)=no 7190243750Srwatson_LT_TAGVAR(inherit_rpath, $1)=no 7191243750Srwatson_LT_TAGVAR(module_cmds, $1)= 7192243750Srwatson_LT_TAGVAR(module_expsym_cmds, $1)= 7193243750Srwatson_LT_TAGVAR(link_all_deplibs, $1)=unknown 7194243750Srwatson_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7195243750Srwatson_LT_TAGVAR(reload_flag, $1)=$reload_flag 7196243750Srwatson_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7197243750Srwatson_LT_TAGVAR(no_undefined_flag, $1)= 7198243750Srwatson_LT_TAGVAR(whole_archive_flag_spec, $1)= 7199243750Srwatson_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7200156283Srwatson 7201243750Srwatson# Source file extension for f77 test sources. 7202243750Srwatsonac_ext=f 7203156283Srwatson 7204243750Srwatson# Object file extension for compiled f77 test sources. 7205243750Srwatsonobjext=o 7206243750Srwatson_LT_TAGVAR(objext, $1)=$objext 7207156283Srwatson 7208243750Srwatson# No sense in running all these tests if we already determined that 7209243750Srwatson# the F77 compiler isn't working. Some variables (like enable_shared) 7210243750Srwatson# are currently assumed to apply to all compilers on this platform, 7211243750Srwatson# and will be corrupted by setting them based on a non-working compiler. 7212243750Srwatsonif test "$_lt_disable_F77" != yes; then 7213243750Srwatson # Code to be used in simple compile tests 7214243750Srwatson lt_simple_compile_test_code="\ 7215243750Srwatson subroutine t 7216243750Srwatson return 7217243750Srwatson end 7218243750Srwatson" 7219156283Srwatson 7220243750Srwatson # Code to be used in simple link tests 7221243750Srwatson lt_simple_link_test_code="\ 7222243750Srwatson program t 7223243750Srwatson end 7224243750Srwatson" 7225243750Srwatson 7226243750Srwatson # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7227243750Srwatson _LT_TAG_COMPILER 7228243750Srwatson 7229243750Srwatson # save warnings/boilerplate of simple test code 7230243750Srwatson _LT_COMPILER_BOILERPLATE 7231243750Srwatson _LT_LINKER_BOILERPLATE 7232243750Srwatson 7233243750Srwatson # Allow CC to be a program name with arguments. 7234243750Srwatson lt_save_CC="$CC" 7235243750Srwatson lt_save_GCC=$GCC 7236243750Srwatson lt_save_CFLAGS=$CFLAGS 7237243750Srwatson CC=${F77-"f77"} 7238243750Srwatson CFLAGS=$FFLAGS 7239243750Srwatson compiler=$CC 7240243750Srwatson _LT_TAGVAR(compiler, $1)=$CC 7241243750Srwatson _LT_CC_BASENAME([$compiler]) 7242243750Srwatson GCC=$G77 7243243750Srwatson if test -n "$compiler"; then 7244243750Srwatson AC_MSG_CHECKING([if libtool supports shared libraries]) 7245243750Srwatson AC_MSG_RESULT([$can_build_shared]) 7246243750Srwatson 7247243750Srwatson AC_MSG_CHECKING([whether to build shared libraries]) 7248243750Srwatson test "$can_build_shared" = "no" && enable_shared=no 7249243750Srwatson 7250243750Srwatson # On AIX, shared libraries and static libraries use the same namespace, and 7251243750Srwatson # are all built from PIC. 7252243750Srwatson case $host_os in 7253243750Srwatson aix3*) 7254243750Srwatson test "$enable_shared" = yes && enable_static=no 7255243750Srwatson if test -n "$RANLIB"; then 7256243750Srwatson archive_cmds="$archive_cmds~\$RANLIB \$lib" 7257243750Srwatson postinstall_cmds='$RANLIB $lib' 7258243750Srwatson fi 7259243750Srwatson ;; 7260243750Srwatson aix[[4-9]]*) 7261243750Srwatson if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7262243750Srwatson test "$enable_shared" = yes && enable_static=no 7263243750Srwatson fi 7264243750Srwatson ;; 7265243750Srwatson esac 7266243750Srwatson AC_MSG_RESULT([$enable_shared]) 7267243750Srwatson 7268243750Srwatson AC_MSG_CHECKING([whether to build static libraries]) 7269243750Srwatson # Make sure either enable_shared or enable_static is yes. 7270243750Srwatson test "$enable_shared" = yes || enable_static=yes 7271243750Srwatson AC_MSG_RESULT([$enable_static]) 7272243750Srwatson 7273243750Srwatson _LT_TAGVAR(GCC, $1)="$G77" 7274243750Srwatson _LT_TAGVAR(LD, $1)="$LD" 7275243750Srwatson 7276243750Srwatson ## CAVEAT EMPTOR: 7277243750Srwatson ## There is no encapsulation within the following macros, do not change 7278243750Srwatson ## the running order or otherwise move them around unless you know exactly 7279243750Srwatson ## what you are doing... 7280243750Srwatson _LT_COMPILER_PIC($1) 7281243750Srwatson _LT_COMPILER_C_O($1) 7282243750Srwatson _LT_COMPILER_FILE_LOCKS($1) 7283243750Srwatson _LT_LINKER_SHLIBS($1) 7284243750Srwatson _LT_SYS_DYNAMIC_LINKER($1) 7285243750Srwatson _LT_LINKER_HARDCODE_LIBPATH($1) 7286243750Srwatson 7287243750Srwatson _LT_CONFIG($1) 7288243750Srwatson fi # test -n "$compiler" 7289243750Srwatson 7290243750Srwatson GCC=$lt_save_GCC 7291243750Srwatson CC="$lt_save_CC" 7292243750Srwatson CFLAGS="$lt_save_CFLAGS" 7293243750Srwatsonfi # test "$_lt_disable_F77" != yes 7294243750Srwatson 7295243750SrwatsonAC_LANG_POP 7296243750Srwatson])# _LT_LANG_F77_CONFIG 7297243750Srwatson 7298243750Srwatson 7299243750Srwatson# _LT_LANG_FC_CONFIG([TAG]) 7300243750Srwatson# ------------------------- 7301243750Srwatson# Ensure that the configuration variables for a Fortran compiler are 7302243750Srwatson# suitably defined. These variables are subsequently used by _LT_CONFIG 7303243750Srwatson# to write the compiler configuration to `libtool'. 7304243750Srwatsonm4_defun([_LT_LANG_FC_CONFIG], 7305243750Srwatson[AC_LANG_PUSH(Fortran) 7306243750Srwatson 7307243750Srwatsonif test -z "$FC" || test "X$FC" = "Xno"; then 7308243750Srwatson _lt_disable_FC=yes 7309243750Srwatsonfi 7310243750Srwatson 7311243750Srwatson_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7312243750Srwatson_LT_TAGVAR(allow_undefined_flag, $1)= 7313243750Srwatson_LT_TAGVAR(always_export_symbols, $1)=no 7314243750Srwatson_LT_TAGVAR(archive_expsym_cmds, $1)= 7315243750Srwatson_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7316243750Srwatson_LT_TAGVAR(hardcode_direct, $1)=no 7317243750Srwatson_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7318243750Srwatson_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7319243750Srwatson_LT_TAGVAR(hardcode_libdir_separator, $1)= 7320243750Srwatson_LT_TAGVAR(hardcode_minus_L, $1)=no 7321243750Srwatson_LT_TAGVAR(hardcode_automatic, $1)=no 7322243750Srwatson_LT_TAGVAR(inherit_rpath, $1)=no 7323243750Srwatson_LT_TAGVAR(module_cmds, $1)= 7324243750Srwatson_LT_TAGVAR(module_expsym_cmds, $1)= 7325243750Srwatson_LT_TAGVAR(link_all_deplibs, $1)=unknown 7326243750Srwatson_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7327243750Srwatson_LT_TAGVAR(reload_flag, $1)=$reload_flag 7328243750Srwatson_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7329243750Srwatson_LT_TAGVAR(no_undefined_flag, $1)= 7330243750Srwatson_LT_TAGVAR(whole_archive_flag_spec, $1)= 7331243750Srwatson_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7332243750Srwatson 7333243750Srwatson# Source file extension for fc test sources. 7334243750Srwatsonac_ext=${ac_fc_srcext-f} 7335243750Srwatson 7336243750Srwatson# Object file extension for compiled fc test sources. 7337243750Srwatsonobjext=o 7338243750Srwatson_LT_TAGVAR(objext, $1)=$objext 7339243750Srwatson 7340243750Srwatson# No sense in running all these tests if we already determined that 7341243750Srwatson# the FC compiler isn't working. Some variables (like enable_shared) 7342243750Srwatson# are currently assumed to apply to all compilers on this platform, 7343243750Srwatson# and will be corrupted by setting them based on a non-working compiler. 7344243750Srwatsonif test "$_lt_disable_FC" != yes; then 7345243750Srwatson # Code to be used in simple compile tests 7346243750Srwatson lt_simple_compile_test_code="\ 7347243750Srwatson subroutine t 7348243750Srwatson return 7349243750Srwatson end 7350243750Srwatson" 7351243750Srwatson 7352243750Srwatson # Code to be used in simple link tests 7353243750Srwatson lt_simple_link_test_code="\ 7354243750Srwatson program t 7355243750Srwatson end 7356243750Srwatson" 7357243750Srwatson 7358243750Srwatson # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7359243750Srwatson _LT_TAG_COMPILER 7360243750Srwatson 7361243750Srwatson # save warnings/boilerplate of simple test code 7362243750Srwatson _LT_COMPILER_BOILERPLATE 7363243750Srwatson _LT_LINKER_BOILERPLATE 7364243750Srwatson 7365243750Srwatson # Allow CC to be a program name with arguments. 7366243750Srwatson lt_save_CC="$CC" 7367243750Srwatson lt_save_GCC=$GCC 7368243750Srwatson lt_save_CFLAGS=$CFLAGS 7369243750Srwatson CC=${FC-"f95"} 7370243750Srwatson CFLAGS=$FCFLAGS 7371243750Srwatson compiler=$CC 7372243750Srwatson GCC=$ac_cv_fc_compiler_gnu 7373243750Srwatson 7374243750Srwatson _LT_TAGVAR(compiler, $1)=$CC 7375243750Srwatson _LT_CC_BASENAME([$compiler]) 7376243750Srwatson 7377243750Srwatson if test -n "$compiler"; then 7378243750Srwatson AC_MSG_CHECKING([if libtool supports shared libraries]) 7379243750Srwatson AC_MSG_RESULT([$can_build_shared]) 7380243750Srwatson 7381243750Srwatson AC_MSG_CHECKING([whether to build shared libraries]) 7382243750Srwatson test "$can_build_shared" = "no" && enable_shared=no 7383243750Srwatson 7384243750Srwatson # On AIX, shared libraries and static libraries use the same namespace, and 7385243750Srwatson # are all built from PIC. 7386243750Srwatson case $host_os in 7387243750Srwatson aix3*) 7388243750Srwatson test "$enable_shared" = yes && enable_static=no 7389243750Srwatson if test -n "$RANLIB"; then 7390243750Srwatson archive_cmds="$archive_cmds~\$RANLIB \$lib" 7391243750Srwatson postinstall_cmds='$RANLIB $lib' 7392243750Srwatson fi 7393243750Srwatson ;; 7394243750Srwatson aix[[4-9]]*) 7395243750Srwatson if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7396243750Srwatson test "$enable_shared" = yes && enable_static=no 7397243750Srwatson fi 7398243750Srwatson ;; 7399243750Srwatson esac 7400243750Srwatson AC_MSG_RESULT([$enable_shared]) 7401243750Srwatson 7402243750Srwatson AC_MSG_CHECKING([whether to build static libraries]) 7403243750Srwatson # Make sure either enable_shared or enable_static is yes. 7404243750Srwatson test "$enable_shared" = yes || enable_static=yes 7405243750Srwatson AC_MSG_RESULT([$enable_static]) 7406243750Srwatson 7407243750Srwatson _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7408243750Srwatson _LT_TAGVAR(LD, $1)="$LD" 7409243750Srwatson 7410243750Srwatson ## CAVEAT EMPTOR: 7411243750Srwatson ## There is no encapsulation within the following macros, do not change 7412243750Srwatson ## the running order or otherwise move them around unless you know exactly 7413243750Srwatson ## what you are doing... 7414243750Srwatson _LT_SYS_HIDDEN_LIBDEPS($1) 7415243750Srwatson _LT_COMPILER_PIC($1) 7416243750Srwatson _LT_COMPILER_C_O($1) 7417243750Srwatson _LT_COMPILER_FILE_LOCKS($1) 7418243750Srwatson _LT_LINKER_SHLIBS($1) 7419243750Srwatson _LT_SYS_DYNAMIC_LINKER($1) 7420243750Srwatson _LT_LINKER_HARDCODE_LIBPATH($1) 7421243750Srwatson 7422243750Srwatson _LT_CONFIG($1) 7423243750Srwatson fi # test -n "$compiler" 7424243750Srwatson 7425243750Srwatson GCC=$lt_save_GCC 7426243750Srwatson CC=$lt_save_CC 7427243750Srwatson CFLAGS=$lt_save_CFLAGS 7428243750Srwatsonfi # test "$_lt_disable_FC" != yes 7429243750Srwatson 7430243750SrwatsonAC_LANG_POP 7431243750Srwatson])# _LT_LANG_FC_CONFIG 7432243750Srwatson 7433243750Srwatson 7434243750Srwatson# _LT_LANG_GCJ_CONFIG([TAG]) 7435243750Srwatson# -------------------------- 7436243750Srwatson# Ensure that the configuration variables for the GNU Java Compiler compiler 7437243750Srwatson# are suitably defined. These variables are subsequently used by _LT_CONFIG 7438243750Srwatson# to write the compiler configuration to `libtool'. 7439243750Srwatsonm4_defun([_LT_LANG_GCJ_CONFIG], 7440243750Srwatson[AC_REQUIRE([LT_PROG_GCJ])dnl 7441243750SrwatsonAC_LANG_SAVE 7442243750Srwatson 7443243750Srwatson# Source file extension for Java test sources. 7444243750Srwatsonac_ext=java 7445243750Srwatson 7446243750Srwatson# Object file extension for compiled Java test sources. 7447243750Srwatsonobjext=o 7448243750Srwatson_LT_TAGVAR(objext, $1)=$objext 7449243750Srwatson 7450243750Srwatson# Code to be used in simple compile tests 7451243750Srwatsonlt_simple_compile_test_code="class foo {}" 7452243750Srwatson 7453243750Srwatson# Code to be used in simple link tests 7454243750Srwatsonlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7455243750Srwatson 7456243750Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7457243750Srwatson_LT_TAG_COMPILER 7458243750Srwatson 7459243750Srwatson# save warnings/boilerplate of simple test code 7460243750Srwatson_LT_COMPILER_BOILERPLATE 7461243750Srwatson_LT_LINKER_BOILERPLATE 7462243750Srwatson 7463243750Srwatson# Allow CC to be a program name with arguments. 7464243750Srwatsonlt_save_CC=$CC 7465243750Srwatsonlt_save_CFLAGS=$CFLAGS 7466243750Srwatsonlt_save_GCC=$GCC 7467243750SrwatsonGCC=yes 7468243750SrwatsonCC=${GCJ-"gcj"} 7469243750SrwatsonCFLAGS=$GCJFLAGS 7470243750Srwatsoncompiler=$CC 7471243750Srwatson_LT_TAGVAR(compiler, $1)=$CC 7472243750Srwatson_LT_TAGVAR(LD, $1)="$LD" 7473243750Srwatson_LT_CC_BASENAME([$compiler]) 7474243750Srwatson 7475243750Srwatson# GCJ did not exist at the time GCC didn't implicitly link libc in. 7476243750Srwatson_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7477243750Srwatson 7478243750Srwatson_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7479243750Srwatson_LT_TAGVAR(reload_flag, $1)=$reload_flag 7480243750Srwatson_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7481243750Srwatson 7482243750Srwatsonif test -n "$compiler"; then 7483243750Srwatson _LT_COMPILER_NO_RTTI($1) 7484243750Srwatson _LT_COMPILER_PIC($1) 7485243750Srwatson _LT_COMPILER_C_O($1) 7486243750Srwatson _LT_COMPILER_FILE_LOCKS($1) 7487243750Srwatson _LT_LINKER_SHLIBS($1) 7488243750Srwatson _LT_LINKER_HARDCODE_LIBPATH($1) 7489243750Srwatson 7490243750Srwatson _LT_CONFIG($1) 7491243750Srwatsonfi 7492243750Srwatson 7493243750SrwatsonAC_LANG_RESTORE 7494243750Srwatson 7495243750SrwatsonGCC=$lt_save_GCC 7496243750SrwatsonCC=$lt_save_CC 7497243750SrwatsonCFLAGS=$lt_save_CFLAGS 7498243750Srwatson])# _LT_LANG_GCJ_CONFIG 7499243750Srwatson 7500243750Srwatson 7501243750Srwatson# _LT_LANG_GO_CONFIG([TAG]) 7502243750Srwatson# -------------------------- 7503243750Srwatson# Ensure that the configuration variables for the GNU Go compiler 7504243750Srwatson# are suitably defined. These variables are subsequently used by _LT_CONFIG 7505243750Srwatson# to write the compiler configuration to `libtool'. 7506243750Srwatsonm4_defun([_LT_LANG_GO_CONFIG], 7507243750Srwatson[AC_REQUIRE([LT_PROG_GO])dnl 7508243750SrwatsonAC_LANG_SAVE 7509243750Srwatson 7510243750Srwatson# Source file extension for Go test sources. 7511243750Srwatsonac_ext=go 7512243750Srwatson 7513243750Srwatson# Object file extension for compiled Go test sources. 7514243750Srwatsonobjext=o 7515243750Srwatson_LT_TAGVAR(objext, $1)=$objext 7516243750Srwatson 7517243750Srwatson# Code to be used in simple compile tests 7518243750Srwatsonlt_simple_compile_test_code="package main; func main() { }" 7519243750Srwatson 7520243750Srwatson# Code to be used in simple link tests 7521243750Srwatsonlt_simple_link_test_code='package main; func main() { }' 7522243750Srwatson 7523243750Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7524243750Srwatson_LT_TAG_COMPILER 7525243750Srwatson 7526243750Srwatson# save warnings/boilerplate of simple test code 7527243750Srwatson_LT_COMPILER_BOILERPLATE 7528243750Srwatson_LT_LINKER_BOILERPLATE 7529243750Srwatson 7530243750Srwatson# Allow CC to be a program name with arguments. 7531243750Srwatsonlt_save_CC=$CC 7532243750Srwatsonlt_save_CFLAGS=$CFLAGS 7533243750Srwatsonlt_save_GCC=$GCC 7534243750SrwatsonGCC=yes 7535243750SrwatsonCC=${GOC-"gccgo"} 7536243750SrwatsonCFLAGS=$GOFLAGS 7537243750Srwatsoncompiler=$CC 7538243750Srwatson_LT_TAGVAR(compiler, $1)=$CC 7539243750Srwatson_LT_TAGVAR(LD, $1)="$LD" 7540243750Srwatson_LT_CC_BASENAME([$compiler]) 7541243750Srwatson 7542243750Srwatson# Go did not exist at the time GCC didn't implicitly link libc in. 7543243750Srwatson_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7544243750Srwatson 7545243750Srwatson_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7546243750Srwatson_LT_TAGVAR(reload_flag, $1)=$reload_flag 7547243750Srwatson_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7548243750Srwatson 7549243750Srwatsonif test -n "$compiler"; then 7550243750Srwatson _LT_COMPILER_NO_RTTI($1) 7551243750Srwatson _LT_COMPILER_PIC($1) 7552243750Srwatson _LT_COMPILER_C_O($1) 7553243750Srwatson _LT_COMPILER_FILE_LOCKS($1) 7554243750Srwatson _LT_LINKER_SHLIBS($1) 7555243750Srwatson _LT_LINKER_HARDCODE_LIBPATH($1) 7556243750Srwatson 7557243750Srwatson _LT_CONFIG($1) 7558243750Srwatsonfi 7559243750Srwatson 7560243750SrwatsonAC_LANG_RESTORE 7561243750Srwatson 7562243750SrwatsonGCC=$lt_save_GCC 7563243750SrwatsonCC=$lt_save_CC 7564243750SrwatsonCFLAGS=$lt_save_CFLAGS 7565243750Srwatson])# _LT_LANG_GO_CONFIG 7566243750Srwatson 7567243750Srwatson 7568243750Srwatson# _LT_LANG_RC_CONFIG([TAG]) 7569243750Srwatson# ------------------------- 7570243750Srwatson# Ensure that the configuration variables for the Windows resource compiler 7571243750Srwatson# are suitably defined. These variables are subsequently used by _LT_CONFIG 7572243750Srwatson# to write the compiler configuration to `libtool'. 7573243750Srwatsonm4_defun([_LT_LANG_RC_CONFIG], 7574243750Srwatson[AC_REQUIRE([LT_PROG_RC])dnl 7575243750SrwatsonAC_LANG_SAVE 7576243750Srwatson 7577243750Srwatson# Source file extension for RC test sources. 7578243750Srwatsonac_ext=rc 7579243750Srwatson 7580243750Srwatson# Object file extension for compiled RC test sources. 7581243750Srwatsonobjext=o 7582243750Srwatson_LT_TAGVAR(objext, $1)=$objext 7583243750Srwatson 7584243750Srwatson# Code to be used in simple compile tests 7585243750Srwatsonlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7586243750Srwatson 7587243750Srwatson# Code to be used in simple link tests 7588243750Srwatsonlt_simple_link_test_code="$lt_simple_compile_test_code" 7589243750Srwatson 7590243750Srwatson# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7591243750Srwatson_LT_TAG_COMPILER 7592243750Srwatson 7593243750Srwatson# save warnings/boilerplate of simple test code 7594243750Srwatson_LT_COMPILER_BOILERPLATE 7595243750Srwatson_LT_LINKER_BOILERPLATE 7596243750Srwatson 7597243750Srwatson# Allow CC to be a program name with arguments. 7598243750Srwatsonlt_save_CC="$CC" 7599243750Srwatsonlt_save_CFLAGS=$CFLAGS 7600243750Srwatsonlt_save_GCC=$GCC 7601243750SrwatsonGCC= 7602243750SrwatsonCC=${RC-"windres"} 7603243750SrwatsonCFLAGS= 7604243750Srwatsoncompiler=$CC 7605243750Srwatson_LT_TAGVAR(compiler, $1)=$CC 7606243750Srwatson_LT_CC_BASENAME([$compiler]) 7607243750Srwatson_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7608243750Srwatson 7609243750Srwatsonif test -n "$compiler"; then 7610243750Srwatson : 7611243750Srwatson _LT_CONFIG($1) 7612243750Srwatsonfi 7613243750Srwatson 7614243750SrwatsonGCC=$lt_save_GCC 7615243750SrwatsonAC_LANG_RESTORE 7616243750SrwatsonCC=$lt_save_CC 7617243750SrwatsonCFLAGS=$lt_save_CFLAGS 7618243750Srwatson])# _LT_LANG_RC_CONFIG 7619243750Srwatson 7620243750Srwatson 7621243750Srwatson# LT_PROG_GCJ 7622243750Srwatson# ----------- 7623243750SrwatsonAC_DEFUN([LT_PROG_GCJ], 7624243750Srwatson[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7625243750Srwatson [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7626243750Srwatson [AC_CHECK_TOOL(GCJ, gcj,) 7627243750Srwatson test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7628243750Srwatson AC_SUBST(GCJFLAGS)])])[]dnl 7629156283Srwatson]) 7630156283Srwatson 7631243750Srwatson# Old name: 7632243750SrwatsonAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7633243750Srwatsondnl aclocal-1.4 backwards compatibility: 7634243750Srwatsondnl AC_DEFUN([LT_AC_PROG_GCJ], []) 7635243750Srwatson 7636243750Srwatson 7637243750Srwatson# LT_PROG_GO 7638243750Srwatson# ---------- 7639243750SrwatsonAC_DEFUN([LT_PROG_GO], 7640243750Srwatson[AC_CHECK_TOOL(GOC, gccgo,) 7641156283Srwatson]) 7642156283Srwatson 7643173143Srwatson 7644243750Srwatson# LT_PROG_RC 7645243750Srwatson# ---------- 7646243750SrwatsonAC_DEFUN([LT_PROG_RC], 7647243750Srwatson[AC_CHECK_TOOL(RC, windres,) 7648243750Srwatson]) 7649173143Srwatson 7650243750Srwatson# Old name: 7651243750SrwatsonAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7652243750Srwatsondnl aclocal-1.4 backwards compatibility: 7653243750Srwatsondnl AC_DEFUN([LT_AC_PROG_RC], []) 7654243750Srwatson 7655243750Srwatson 7656243750Srwatson# _LT_DECL_EGREP 7657243750Srwatson# -------------- 7658243750Srwatson# If we don't have a new enough Autoconf to choose the best grep 7659243750Srwatson# available, choose the one first in the user's PATH. 7660243750Srwatsonm4_defun([_LT_DECL_EGREP], 7661243750Srwatson[AC_REQUIRE([AC_PROG_EGREP])dnl 7662243750SrwatsonAC_REQUIRE([AC_PROG_FGREP])dnl 7663243750Srwatsontest -z "$GREP" && GREP=grep 7664243750Srwatson_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7665243750Srwatson_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7666243750Srwatson_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7667243750Srwatsondnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7668243750SrwatsonAC_SUBST([GREP]) 7669243750Srwatson]) 7670243750Srwatson 7671243750Srwatson 7672243750Srwatson# _LT_DECL_OBJDUMP 7673243750Srwatson# -------------- 7674243750Srwatson# If we don't have a new enough Autoconf to choose the best objdump 7675243750Srwatson# available, choose the one first in the user's PATH. 7676243750Srwatsonm4_defun([_LT_DECL_OBJDUMP], 7677243750Srwatson[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7678243750Srwatsontest -z "$OBJDUMP" && OBJDUMP=objdump 7679243750Srwatson_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7680243750SrwatsonAC_SUBST([OBJDUMP]) 7681243750Srwatson]) 7682243750Srwatson 7683243750Srwatson# _LT_DECL_DLLTOOL 7684173143Srwatson# ---------------- 7685243750Srwatson# Ensure DLLTOOL variable is set. 7686243750Srwatsonm4_defun([_LT_DECL_DLLTOOL], 7687243750Srwatson[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7688243750Srwatsontest -z "$DLLTOOL" && DLLTOOL=dlltool 7689243750Srwatson_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7690243750SrwatsonAC_SUBST([DLLTOOL]) 7691243750Srwatson]) 7692173143Srwatson 7693243750Srwatson# _LT_DECL_SED 7694243750Srwatson# ------------ 7695243750Srwatson# Check for a fully-functional sed program, that truncates 7696243750Srwatson# as few characters as possible. Prefer GNU sed if found. 7697243750Srwatsonm4_defun([_LT_DECL_SED], 7698243750Srwatson[AC_PROG_SED 7699243750Srwatsontest -z "$SED" && SED=sed 7700243750SrwatsonXsed="$SED -e 1s/^X//" 7701243750Srwatson_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7702243750Srwatson_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7703243750Srwatson [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7704243750Srwatson])# _LT_DECL_SED 7705173143Srwatson 7706243750Srwatsonm4_ifndef([AC_PROG_SED], [ 7707156283Srwatson# NOTE: This macro has been submitted for inclusion into # 7708156283Srwatson# GNU Autoconf as AC_PROG_SED. When it is available in # 7709156283Srwatson# a released version of Autoconf we should remove this # 7710156283Srwatson# macro and use it instead. # 7711243750Srwatson 7712243750Srwatsonm4_defun([AC_PROG_SED], 7713156283Srwatson[AC_MSG_CHECKING([for a sed that does not truncate output]) 7714156283SrwatsonAC_CACHE_VAL(lt_cv_path_SED, 7715156283Srwatson[# Loop through the user's path and test for sed and gsed. 7716156283Srwatson# Then use that list of sed's as ones to test for truncation. 7717156283Srwatsonas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7718156283Srwatsonfor as_dir in $PATH 7719156283Srwatsondo 7720156283Srwatson IFS=$as_save_IFS 7721156283Srwatson test -z "$as_dir" && as_dir=. 7722156283Srwatson for lt_ac_prog in sed gsed; do 7723156283Srwatson for ac_exec_ext in '' $ac_executable_extensions; do 7724243750Srwatson if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7725156283Srwatson lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7726156283Srwatson fi 7727156283Srwatson done 7728156283Srwatson done 7729156283Srwatsondone 7730173143SrwatsonIFS=$as_save_IFS 7731156283Srwatsonlt_ac_max=0 7732156283Srwatsonlt_ac_count=0 7733156283Srwatson# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7734156283Srwatson# along with /bin/sed that truncates output. 7735156283Srwatsonfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7736156283Srwatson test ! -f $lt_ac_sed && continue 7737156283Srwatson cat /dev/null > conftest.in 7738156283Srwatson lt_ac_count=0 7739156283Srwatson echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7740156283Srwatson # Check for GNU sed and select it if it is found. 7741156283Srwatson if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7742156283Srwatson lt_cv_path_SED=$lt_ac_sed 7743156283Srwatson break 7744156283Srwatson fi 7745156283Srwatson while true; do 7746156283Srwatson cat conftest.in conftest.in >conftest.tmp 7747156283Srwatson mv conftest.tmp conftest.in 7748156283Srwatson cp conftest.in conftest.nl 7749156283Srwatson echo >>conftest.nl 7750156283Srwatson $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7751156283Srwatson cmp -s conftest.out conftest.nl || break 7752156283Srwatson # 10000 chars as input seems more than enough 7753156283Srwatson test $lt_ac_count -gt 10 && break 7754156283Srwatson lt_ac_count=`expr $lt_ac_count + 1` 7755156283Srwatson if test $lt_ac_count -gt $lt_ac_max; then 7756156283Srwatson lt_ac_max=$lt_ac_count 7757156283Srwatson lt_cv_path_SED=$lt_ac_sed 7758156283Srwatson fi 7759156283Srwatson done 7760156283Srwatsondone 7761156283Srwatson]) 7762156283SrwatsonSED=$lt_cv_path_SED 7763173143SrwatsonAC_SUBST([SED]) 7764156283SrwatsonAC_MSG_RESULT([$SED]) 7765243750Srwatson])#AC_PROG_SED 7766243750Srwatson])#m4_ifndef 7767243750Srwatson 7768243750Srwatson# Old name: 7769243750SrwatsonAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7770243750Srwatsondnl aclocal-1.4 backwards compatibility: 7771243750Srwatsondnl AC_DEFUN([LT_AC_PROG_SED], []) 7772243750Srwatson 7773243750Srwatson 7774243750Srwatson# _LT_CHECK_SHELL_FEATURES 7775243750Srwatson# ------------------------ 7776243750Srwatson# Find out whether the shell is Bourne or XSI compatible, 7777243750Srwatson# or has some other useful features. 7778243750Srwatsonm4_defun([_LT_CHECK_SHELL_FEATURES], 7779243750Srwatson[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7780243750Srwatson# Try some XSI features 7781243750Srwatsonxsi_shell=no 7782243750Srwatson( _lt_dummy="a/b/c" 7783243750Srwatson test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7784243750Srwatson = c,a/b,b/c, \ 7785243750Srwatson && eval 'test $(( 1 + 1 )) -eq 2 \ 7786243750Srwatson && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7787243750Srwatson && xsi_shell=yes 7788243750SrwatsonAC_MSG_RESULT([$xsi_shell]) 7789243750Srwatson_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7790243750Srwatson 7791243750SrwatsonAC_MSG_CHECKING([whether the shell understands "+="]) 7792243750Srwatsonlt_shell_append=no 7793243750Srwatson( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7794243750Srwatson >/dev/null 2>&1 \ 7795243750Srwatson && lt_shell_append=yes 7796243750SrwatsonAC_MSG_RESULT([$lt_shell_append]) 7797243750Srwatson_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7798243750Srwatson 7799243750Srwatsonif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7800243750Srwatson lt_unset=unset 7801243750Srwatsonelse 7802243750Srwatson lt_unset=false 7803243750Srwatsonfi 7804243750Srwatson_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7805243750Srwatson 7806243750Srwatson# test EBCDIC or ASCII 7807243750Srwatsoncase `echo X|tr X '\101'` in 7808243750Srwatson A) # ASCII based system 7809243750Srwatson # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7810243750Srwatson lt_SP2NL='tr \040 \012' 7811243750Srwatson lt_NL2SP='tr \015\012 \040\040' 7812243750Srwatson ;; 7813243750Srwatson *) # EBCDIC based system 7814243750Srwatson lt_SP2NL='tr \100 \n' 7815243750Srwatson lt_NL2SP='tr \r\n \100\100' 7816243750Srwatson ;; 7817243750Srwatsonesac 7818243750Srwatson_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7819243750Srwatson_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7820243750Srwatson])# _LT_CHECK_SHELL_FEATURES 7821243750Srwatson 7822243750Srwatson 7823243750Srwatson# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7824243750Srwatson# ------------------------------------------------------ 7825243750Srwatson# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7826243750Srwatson# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7827243750Srwatsonm4_defun([_LT_PROG_FUNCTION_REPLACE], 7828243750Srwatson[dnl { 7829243750Srwatsonsed -e '/^$1 ()$/,/^} # $1 /c\ 7830243750Srwatson$1 ()\ 7831243750Srwatson{\ 7832243750Srwatsonm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7833243750Srwatson} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7834243750Srwatson && mv -f "$cfgfile.tmp" "$cfgfile" \ 7835243750Srwatson || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7836243750Srwatsontest 0 -eq $? || _lt_function_replace_fail=: 7837156283Srwatson]) 7838156283Srwatson 7839243750Srwatson 7840243750Srwatson# _LT_PROG_REPLACE_SHELLFNS 7841243750Srwatson# ------------------------- 7842243750Srwatson# Replace existing portable implementations of several shell functions with 7843243750Srwatson# equivalent extended shell implementations where those features are available.. 7844243750Srwatsonm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7845243750Srwatson[if test x"$xsi_shell" = xyes; then 7846243750Srwatson _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7847243750Srwatson case ${1} in 7848243750Srwatson */*) func_dirname_result="${1%/*}${2}" ;; 7849243750Srwatson * ) func_dirname_result="${3}" ;; 7850243750Srwatson esac]) 7851243750Srwatson 7852243750Srwatson _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7853243750Srwatson func_basename_result="${1##*/}"]) 7854243750Srwatson 7855243750Srwatson _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7856243750Srwatson case ${1} in 7857243750Srwatson */*) func_dirname_result="${1%/*}${2}" ;; 7858243750Srwatson * ) func_dirname_result="${3}" ;; 7859243750Srwatson esac 7860243750Srwatson func_basename_result="${1##*/}"]) 7861243750Srwatson 7862243750Srwatson _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7863243750Srwatson # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7864243750Srwatson # positional parameters, so assign one to ordinary parameter first. 7865243750Srwatson func_stripname_result=${3} 7866243750Srwatson func_stripname_result=${func_stripname_result#"${1}"} 7867243750Srwatson func_stripname_result=${func_stripname_result%"${2}"}]) 7868243750Srwatson 7869243750Srwatson _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7870243750Srwatson func_split_long_opt_name=${1%%=*} 7871243750Srwatson func_split_long_opt_arg=${1#*=}]) 7872243750Srwatson 7873243750Srwatson _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7874243750Srwatson func_split_short_opt_arg=${1#??} 7875243750Srwatson func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7876243750Srwatson 7877243750Srwatson _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7878243750Srwatson case ${1} in 7879243750Srwatson *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7880243750Srwatson *) func_lo2o_result=${1} ;; 7881243750Srwatson esac]) 7882243750Srwatson 7883243750Srwatson _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7884243750Srwatson 7885243750Srwatson _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7886243750Srwatson 7887243750Srwatson _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7888243750Srwatsonfi 7889243750Srwatson 7890243750Srwatsonif test x"$lt_shell_append" = xyes; then 7891243750Srwatson _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7892243750Srwatson 7893243750Srwatson _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7894243750Srwatson func_quote_for_eval "${2}" 7895243750Srwatsondnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7896243750Srwatson eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7897243750Srwatson 7898243750Srwatson # Save a `func_append' function call where possible by direct use of '+=' 7899243750Srwatson sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7900243750Srwatson && mv -f "$cfgfile.tmp" "$cfgfile" \ 7901243750Srwatson || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7902243750Srwatson test 0 -eq $? || _lt_function_replace_fail=: 7903243750Srwatsonelse 7904243750Srwatson # Save a `func_append' function call even when '+=' is not available 7905243750Srwatson sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7906243750Srwatson && mv -f "$cfgfile.tmp" "$cfgfile" \ 7907243750Srwatson || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7908243750Srwatson test 0 -eq $? || _lt_function_replace_fail=: 7909243750Srwatsonfi 7910243750Srwatson 7911243750Srwatsonif test x"$_lt_function_replace_fail" = x":"; then 7912243750Srwatson AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7913243750Srwatsonfi 7914243750Srwatson]) 7915243750Srwatson 7916243750Srwatson# _LT_PATH_CONVERSION_FUNCTIONS 7917243750Srwatson# ----------------------------- 7918243750Srwatson# Determine which file name conversion functions should be used by 7919243750Srwatson# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7920243750Srwatson# for certain cross-compile configurations and native mingw. 7921243750Srwatsonm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7922243750Srwatson[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7923243750SrwatsonAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7924243750SrwatsonAC_MSG_CHECKING([how to convert $build file names to $host format]) 7925243750SrwatsonAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7926243750Srwatson[case $host in 7927243750Srwatson *-*-mingw* ) 7928243750Srwatson case $build in 7929243750Srwatson *-*-mingw* ) # actually msys 7930243750Srwatson lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7931243750Srwatson ;; 7932243750Srwatson *-*-cygwin* ) 7933243750Srwatson lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7934243750Srwatson ;; 7935243750Srwatson * ) # otherwise, assume *nix 7936243750Srwatson lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7937243750Srwatson ;; 7938243750Srwatson esac 7939243750Srwatson ;; 7940243750Srwatson *-*-cygwin* ) 7941243750Srwatson case $build in 7942243750Srwatson *-*-mingw* ) # actually msys 7943243750Srwatson lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7944243750Srwatson ;; 7945243750Srwatson *-*-cygwin* ) 7946243750Srwatson lt_cv_to_host_file_cmd=func_convert_file_noop 7947243750Srwatson ;; 7948243750Srwatson * ) # otherwise, assume *nix 7949243750Srwatson lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7950243750Srwatson ;; 7951243750Srwatson esac 7952243750Srwatson ;; 7953243750Srwatson * ) # unhandled hosts (and "normal" native builds) 7954243750Srwatson lt_cv_to_host_file_cmd=func_convert_file_noop 7955243750Srwatson ;; 7956243750Srwatsonesac 7957243750Srwatson]) 7958243750Srwatsonto_host_file_cmd=$lt_cv_to_host_file_cmd 7959243750SrwatsonAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7960243750Srwatson_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7961243750Srwatson [0], [convert $build file names to $host format])dnl 7962243750Srwatson 7963243750SrwatsonAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7964243750SrwatsonAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7965243750Srwatson[#assume ordinary cross tools, or native build. 7966243750Srwatsonlt_cv_to_tool_file_cmd=func_convert_file_noop 7967243750Srwatsoncase $host in 7968243750Srwatson *-*-mingw* ) 7969243750Srwatson case $build in 7970243750Srwatson *-*-mingw* ) # actually msys 7971243750Srwatson lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7972243750Srwatson ;; 7973243750Srwatson esac 7974243750Srwatson ;; 7975243750Srwatsonesac 7976243750Srwatson]) 7977243750Srwatsonto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7978243750SrwatsonAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7979243750Srwatson_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7980243750Srwatson [0], [convert $build files to toolchain format])dnl 7981243750Srwatson])# _LT_PATH_CONVERSION_FUNCTIONS 7982243750Srwatson 7983243750Srwatson# Helper functions for option handling. -*- Autoconf -*- 7984156283Srwatson# 7985243750Srwatson# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7986243750Srwatson# Inc. 7987243750Srwatson# Written by Gary V. Vaughan, 2004 7988243750Srwatson# 7989243750Srwatson# This file is free software; the Free Software Foundation gives 7990243750Srwatson# unlimited permission to copy and/or distribute it, with or without 7991243750Srwatson# modifications, as long as this notice is preserved. 7992243750Srwatson 7993243750Srwatson# serial 7 ltoptions.m4 7994243750Srwatson 7995243750Srwatson# This is to help aclocal find these macros, as it can't see m4_define. 7996243750SrwatsonAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7997243750Srwatson 7998243750Srwatson 7999243750Srwatson# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8000243750Srwatson# ------------------------------------------ 8001243750Srwatsonm4_define([_LT_MANGLE_OPTION], 8002243750Srwatson[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8003243750Srwatson 8004243750Srwatson 8005243750Srwatson# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8006243750Srwatson# --------------------------------------- 8007243750Srwatson# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8008243750Srwatson# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8009243750Srwatson# saved as a flag. 8010243750Srwatsonm4_define([_LT_SET_OPTION], 8011243750Srwatson[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8012243750Srwatsonm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8013243750Srwatson _LT_MANGLE_DEFUN([$1], [$2]), 8014243750Srwatson [m4_warning([Unknown $1 option `$2'])])[]dnl 8015243750Srwatson]) 8016243750Srwatson 8017243750Srwatson 8018243750Srwatson# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8019243750Srwatson# ------------------------------------------------------------ 8020243750Srwatson# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8021243750Srwatsonm4_define([_LT_IF_OPTION], 8022243750Srwatson[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8023243750Srwatson 8024243750Srwatson 8025243750Srwatson# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8026243750Srwatson# ------------------------------------------------------- 8027243750Srwatson# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8028243750Srwatson# are set. 8029243750Srwatsonm4_define([_LT_UNLESS_OPTIONS], 8030243750Srwatson[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8031243750Srwatson [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8032243750Srwatson [m4_define([$0_found])])])[]dnl 8033243750Srwatsonm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8034243750Srwatson])[]dnl 8035243750Srwatson]) 8036243750Srwatson 8037243750Srwatson 8038243750Srwatson# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8039243750Srwatson# ---------------------------------------- 8040243750Srwatson# OPTION-LIST is a space-separated list of Libtool options associated 8041243750Srwatson# with MACRO-NAME. If any OPTION has a matching handler declared with 8042243750Srwatson# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8043243750Srwatson# the unknown option and exit. 8044243750Srwatsonm4_defun([_LT_SET_OPTIONS], 8045243750Srwatson[# Set options 8046243750Srwatsonm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8047243750Srwatson [_LT_SET_OPTION([$1], _LT_Option)]) 8048243750Srwatson 8049243750Srwatsonm4_if([$1],[LT_INIT],[ 8050243750Srwatson dnl 8051243750Srwatson dnl Simply set some default values (i.e off) if boolean options were not 8052243750Srwatson dnl specified: 8053243750Srwatson _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8054243750Srwatson ]) 8055243750Srwatson _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8056243750Srwatson ]) 8057243750Srwatson dnl 8058243750Srwatson dnl If no reference was made to various pairs of opposing options, then 8059243750Srwatson dnl we run the default mode handler for the pair. For example, if neither 8060243750Srwatson dnl `shared' nor `disable-shared' was passed, we enable building of shared 8061243750Srwatson dnl archives by default: 8062243750Srwatson _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8063243750Srwatson _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8064243750Srwatson _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8065243750Srwatson _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8066243750Srwatson [_LT_ENABLE_FAST_INSTALL]) 8067243750Srwatson ]) 8068243750Srwatson])# _LT_SET_OPTIONS 8069243750Srwatson 8070243750Srwatson 8071243750Srwatson 8072243750Srwatson# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8073243750Srwatson# ----------------------------------------- 8074243750Srwatsonm4_define([_LT_MANGLE_DEFUN], 8075243750Srwatson[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8076243750Srwatson 8077243750Srwatson 8078243750Srwatson# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8079243750Srwatson# ----------------------------------------------- 8080243750Srwatsonm4_define([LT_OPTION_DEFINE], 8081243750Srwatson[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8082243750Srwatson])# LT_OPTION_DEFINE 8083243750Srwatson 8084243750Srwatson 8085243750Srwatson# dlopen 8086243750Srwatson# ------ 8087243750SrwatsonLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8088243750Srwatson]) 8089243750Srwatson 8090243750SrwatsonAU_DEFUN([AC_LIBTOOL_DLOPEN], 8091243750Srwatson[_LT_SET_OPTION([LT_INIT], [dlopen]) 8092243750SrwatsonAC_DIAGNOSE([obsolete], 8093243750Srwatson[$0: Remove this warning and the call to _LT_SET_OPTION when you 8094243750Srwatsonput the `dlopen' option into LT_INIT's first parameter.]) 8095243750Srwatson]) 8096243750Srwatson 8097243750Srwatsondnl aclocal-1.4 backwards compatibility: 8098243750Srwatsondnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8099243750Srwatson 8100243750Srwatson 8101243750Srwatson# win32-dll 8102243750Srwatson# --------- 8103243750Srwatson# Declare package support for building win32 dll's. 8104243750SrwatsonLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8105243750Srwatson[enable_win32_dll=yes 8106243750Srwatson 8107243750Srwatsoncase $host in 8108243750Srwatson*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8109243750Srwatson AC_CHECK_TOOL(AS, as, false) 8110243750Srwatson AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8111243750Srwatson AC_CHECK_TOOL(OBJDUMP, objdump, false) 8112243750Srwatson ;; 8113243750Srwatsonesac 8114243750Srwatson 8115243750Srwatsontest -z "$AS" && AS=as 8116243750Srwatson_LT_DECL([], [AS], [1], [Assembler program])dnl 8117243750Srwatson 8118243750Srwatsontest -z "$DLLTOOL" && DLLTOOL=dlltool 8119243750Srwatson_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8120243750Srwatson 8121243750Srwatsontest -z "$OBJDUMP" && OBJDUMP=objdump 8122243750Srwatson_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8123243750Srwatson])# win32-dll 8124243750Srwatson 8125243750SrwatsonAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8126243750Srwatson[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8127243750Srwatson_LT_SET_OPTION([LT_INIT], [win32-dll]) 8128243750SrwatsonAC_DIAGNOSE([obsolete], 8129243750Srwatson[$0: Remove this warning and the call to _LT_SET_OPTION when you 8130243750Srwatsonput the `win32-dll' option into LT_INIT's first parameter.]) 8131243750Srwatson]) 8132243750Srwatson 8133243750Srwatsondnl aclocal-1.4 backwards compatibility: 8134243750Srwatsondnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8135243750Srwatson 8136243750Srwatson 8137243750Srwatson# _LT_ENABLE_SHARED([DEFAULT]) 8138243750Srwatson# ---------------------------- 8139243750Srwatson# implement the --enable-shared flag, and supports the `shared' and 8140243750Srwatson# `disable-shared' LT_INIT options. 8141243750Srwatson# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8142243750Srwatsonm4_define([_LT_ENABLE_SHARED], 8143243750Srwatson[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8144243750SrwatsonAC_ARG_ENABLE([shared], 8145243750Srwatson [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8146243750Srwatson [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8147243750Srwatson [p=${PACKAGE-default} 8148243750Srwatson case $enableval in 8149243750Srwatson yes) enable_shared=yes ;; 8150243750Srwatson no) enable_shared=no ;; 8151243750Srwatson *) 8152243750Srwatson enable_shared=no 8153243750Srwatson # Look at the argument we got. We use all the common list separators. 8154243750Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8155243750Srwatson for pkg in $enableval; do 8156243750Srwatson IFS="$lt_save_ifs" 8157243750Srwatson if test "X$pkg" = "X$p"; then 8158243750Srwatson enable_shared=yes 8159243750Srwatson fi 8160243750Srwatson done 8161243750Srwatson IFS="$lt_save_ifs" 8162243750Srwatson ;; 8163243750Srwatson esac], 8164243750Srwatson [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8165243750Srwatson 8166243750Srwatson _LT_DECL([build_libtool_libs], [enable_shared], [0], 8167243750Srwatson [Whether or not to build shared libraries]) 8168243750Srwatson])# _LT_ENABLE_SHARED 8169243750Srwatson 8170243750SrwatsonLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8171243750SrwatsonLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8172243750Srwatson 8173243750Srwatson# Old names: 8174243750SrwatsonAC_DEFUN([AC_ENABLE_SHARED], 8175243750Srwatson[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8176243750Srwatson]) 8177243750Srwatson 8178243750SrwatsonAC_DEFUN([AC_DISABLE_SHARED], 8179243750Srwatson[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8180243750Srwatson]) 8181243750Srwatson 8182243750SrwatsonAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8183243750SrwatsonAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8184243750Srwatson 8185243750Srwatsondnl aclocal-1.4 backwards compatibility: 8186243750Srwatsondnl AC_DEFUN([AM_ENABLE_SHARED], []) 8187243750Srwatsondnl AC_DEFUN([AM_DISABLE_SHARED], []) 8188243750Srwatson 8189243750Srwatson 8190243750Srwatson 8191243750Srwatson# _LT_ENABLE_STATIC([DEFAULT]) 8192243750Srwatson# ---------------------------- 8193243750Srwatson# implement the --enable-static flag, and support the `static' and 8194243750Srwatson# `disable-static' LT_INIT options. 8195243750Srwatson# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8196243750Srwatsonm4_define([_LT_ENABLE_STATIC], 8197243750Srwatson[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8198243750SrwatsonAC_ARG_ENABLE([static], 8199243750Srwatson [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8200243750Srwatson [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8201243750Srwatson [p=${PACKAGE-default} 8202243750Srwatson case $enableval in 8203243750Srwatson yes) enable_static=yes ;; 8204243750Srwatson no) enable_static=no ;; 8205243750Srwatson *) 8206243750Srwatson enable_static=no 8207243750Srwatson # Look at the argument we got. We use all the common list separators. 8208243750Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8209243750Srwatson for pkg in $enableval; do 8210243750Srwatson IFS="$lt_save_ifs" 8211243750Srwatson if test "X$pkg" = "X$p"; then 8212243750Srwatson enable_static=yes 8213243750Srwatson fi 8214243750Srwatson done 8215243750Srwatson IFS="$lt_save_ifs" 8216243750Srwatson ;; 8217243750Srwatson esac], 8218243750Srwatson [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8219243750Srwatson 8220243750Srwatson _LT_DECL([build_old_libs], [enable_static], [0], 8221243750Srwatson [Whether or not to build static libraries]) 8222243750Srwatson])# _LT_ENABLE_STATIC 8223243750Srwatson 8224243750SrwatsonLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8225243750SrwatsonLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8226243750Srwatson 8227243750Srwatson# Old names: 8228243750SrwatsonAC_DEFUN([AC_ENABLE_STATIC], 8229243750Srwatson[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8230243750Srwatson]) 8231243750Srwatson 8232243750SrwatsonAC_DEFUN([AC_DISABLE_STATIC], 8233243750Srwatson[_LT_SET_OPTION([LT_INIT], [disable-static]) 8234243750Srwatson]) 8235243750Srwatson 8236243750SrwatsonAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8237243750SrwatsonAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8238243750Srwatson 8239243750Srwatsondnl aclocal-1.4 backwards compatibility: 8240243750Srwatsondnl AC_DEFUN([AM_ENABLE_STATIC], []) 8241243750Srwatsondnl AC_DEFUN([AM_DISABLE_STATIC], []) 8242243750Srwatson 8243243750Srwatson 8244243750Srwatson 8245243750Srwatson# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8246243750Srwatson# ---------------------------------- 8247243750Srwatson# implement the --enable-fast-install flag, and support the `fast-install' 8248243750Srwatson# and `disable-fast-install' LT_INIT options. 8249243750Srwatson# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8250243750Srwatsonm4_define([_LT_ENABLE_FAST_INSTALL], 8251243750Srwatson[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8252243750SrwatsonAC_ARG_ENABLE([fast-install], 8253243750Srwatson [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8254243750Srwatson [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8255243750Srwatson [p=${PACKAGE-default} 8256243750Srwatson case $enableval in 8257243750Srwatson yes) enable_fast_install=yes ;; 8258243750Srwatson no) enable_fast_install=no ;; 8259243750Srwatson *) 8260243750Srwatson enable_fast_install=no 8261243750Srwatson # Look at the argument we got. We use all the common list separators. 8262243750Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8263243750Srwatson for pkg in $enableval; do 8264243750Srwatson IFS="$lt_save_ifs" 8265243750Srwatson if test "X$pkg" = "X$p"; then 8266243750Srwatson enable_fast_install=yes 8267243750Srwatson fi 8268243750Srwatson done 8269243750Srwatson IFS="$lt_save_ifs" 8270243750Srwatson ;; 8271243750Srwatson esac], 8272243750Srwatson [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8273243750Srwatson 8274243750Srwatson_LT_DECL([fast_install], [enable_fast_install], [0], 8275243750Srwatson [Whether or not to optimize for fast installation])dnl 8276243750Srwatson])# _LT_ENABLE_FAST_INSTALL 8277243750Srwatson 8278243750SrwatsonLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8279243750SrwatsonLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8280243750Srwatson 8281243750Srwatson# Old names: 8282243750SrwatsonAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8283243750Srwatson[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8284243750SrwatsonAC_DIAGNOSE([obsolete], 8285243750Srwatson[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8286243750Srwatsonthe `fast-install' option into LT_INIT's first parameter.]) 8287243750Srwatson]) 8288243750Srwatson 8289243750SrwatsonAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8290243750Srwatson[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8291243750SrwatsonAC_DIAGNOSE([obsolete], 8292243750Srwatson[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8293243750Srwatsonthe `disable-fast-install' option into LT_INIT's first parameter.]) 8294243750Srwatson]) 8295243750Srwatson 8296243750Srwatsondnl aclocal-1.4 backwards compatibility: 8297243750Srwatsondnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8298243750Srwatsondnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8299243750Srwatson 8300243750Srwatson 8301243750Srwatson# _LT_WITH_PIC([MODE]) 8302243750Srwatson# -------------------- 8303243750Srwatson# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8304243750Srwatson# LT_INIT options. 8305243750Srwatson# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8306243750Srwatsonm4_define([_LT_WITH_PIC], 8307243750Srwatson[AC_ARG_WITH([pic], 8308243750Srwatson [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8309243750Srwatson [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8310243750Srwatson [lt_p=${PACKAGE-default} 8311243750Srwatson case $withval in 8312243750Srwatson yes|no) pic_mode=$withval ;; 8313243750Srwatson *) 8314243750Srwatson pic_mode=default 8315243750Srwatson # Look at the argument we got. We use all the common list separators. 8316243750Srwatson lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8317243750Srwatson for lt_pkg in $withval; do 8318243750Srwatson IFS="$lt_save_ifs" 8319243750Srwatson if test "X$lt_pkg" = "X$lt_p"; then 8320243750Srwatson pic_mode=yes 8321243750Srwatson fi 8322243750Srwatson done 8323243750Srwatson IFS="$lt_save_ifs" 8324243750Srwatson ;; 8325243750Srwatson esac], 8326243750Srwatson [pic_mode=default]) 8327243750Srwatson 8328243750Srwatsontest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8329243750Srwatson 8330243750Srwatson_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8331243750Srwatson])# _LT_WITH_PIC 8332243750Srwatson 8333243750SrwatsonLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8334243750SrwatsonLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8335243750Srwatson 8336243750Srwatson# Old name: 8337243750SrwatsonAU_DEFUN([AC_LIBTOOL_PICMODE], 8338243750Srwatson[_LT_SET_OPTION([LT_INIT], [pic-only]) 8339243750SrwatsonAC_DIAGNOSE([obsolete], 8340243750Srwatson[$0: Remove this warning and the call to _LT_SET_OPTION when you 8341243750Srwatsonput the `pic-only' option into LT_INIT's first parameter.]) 8342243750Srwatson]) 8343243750Srwatson 8344243750Srwatsondnl aclocal-1.4 backwards compatibility: 8345243750Srwatsondnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8346243750Srwatson 8347243750Srwatson 8348243750Srwatsonm4_define([_LTDL_MODE], []) 8349243750SrwatsonLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8350243750Srwatson [m4_define([_LTDL_MODE], [nonrecursive])]) 8351243750SrwatsonLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8352243750Srwatson [m4_define([_LTDL_MODE], [recursive])]) 8353243750SrwatsonLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8354243750Srwatson [m4_define([_LTDL_MODE], [subproject])]) 8355243750Srwatson 8356243750Srwatsonm4_define([_LTDL_TYPE], []) 8357243750SrwatsonLT_OPTION_DEFINE([LTDL_INIT], [installable], 8358243750Srwatson [m4_define([_LTDL_TYPE], [installable])]) 8359243750SrwatsonLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8360243750Srwatson [m4_define([_LTDL_TYPE], [convenience])]) 8361243750Srwatson 8362243750Srwatson# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8363243750Srwatson# 8364243750Srwatson# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8365243750Srwatson# Written by Gary V. Vaughan, 2004 8366243750Srwatson# 8367243750Srwatson# This file is free software; the Free Software Foundation gives 8368243750Srwatson# unlimited permission to copy and/or distribute it, with or without 8369243750Srwatson# modifications, as long as this notice is preserved. 8370243750Srwatson 8371243750Srwatson# serial 6 ltsugar.m4 8372243750Srwatson 8373243750Srwatson# This is to help aclocal find these macros, as it can't see m4_define. 8374243750SrwatsonAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8375243750Srwatson 8376243750Srwatson 8377243750Srwatson# lt_join(SEP, ARG1, [ARG2...]) 8378243750Srwatson# ----------------------------- 8379243750Srwatson# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8380243750Srwatson# associated separator. 8381243750Srwatson# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8382243750Srwatson# versions in m4sugar had bugs. 8383243750Srwatsonm4_define([lt_join], 8384243750Srwatson[m4_if([$#], [1], [], 8385243750Srwatson [$#], [2], [[$2]], 8386243750Srwatson [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8387243750Srwatsonm4_define([_lt_join], 8388243750Srwatson[m4_if([$#$2], [2], [], 8389243750Srwatson [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8390243750Srwatson 8391243750Srwatson 8392243750Srwatson# lt_car(LIST) 8393243750Srwatson# lt_cdr(LIST) 8394243750Srwatson# ------------ 8395243750Srwatson# Manipulate m4 lists. 8396243750Srwatson# These macros are necessary as long as will still need to support 8397243750Srwatson# Autoconf-2.59 which quotes differently. 8398243750Srwatsonm4_define([lt_car], [[$1]]) 8399243750Srwatsonm4_define([lt_cdr], 8400243750Srwatson[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8401243750Srwatson [$#], 1, [], 8402243750Srwatson [m4_dquote(m4_shift($@))])]) 8403243750Srwatsonm4_define([lt_unquote], $1) 8404243750Srwatson 8405243750Srwatson 8406243750Srwatson# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8407243750Srwatson# ------------------------------------------ 8408243750Srwatson# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8409243750Srwatson# Note that neither SEPARATOR nor STRING are expanded; they are appended 8410243750Srwatson# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8411243750Srwatson# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8412243750Srwatson# than defined and empty). 8413243750Srwatson# 8414243750Srwatson# This macro is needed until we can rely on Autoconf 2.62, since earlier 8415243750Srwatson# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8416243750Srwatsonm4_define([lt_append], 8417243750Srwatson[m4_define([$1], 8418243750Srwatson m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8419243750Srwatson 8420243750Srwatson 8421243750Srwatson 8422243750Srwatson# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8423243750Srwatson# ---------------------------------------------------------- 8424243750Srwatson# Produce a SEP delimited list of all paired combinations of elements of 8425243750Srwatson# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8426243750Srwatson# has the form PREFIXmINFIXSUFFIXn. 8427243750Srwatson# Needed until we can rely on m4_combine added in Autoconf 2.62. 8428243750Srwatsonm4_define([lt_combine], 8429243750Srwatson[m4_if(m4_eval([$# > 3]), [1], 8430243750Srwatson [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8431243750Srwatson[[m4_foreach([_Lt_prefix], [$2], 8432243750Srwatson [m4_foreach([_Lt_suffix], 8433243750Srwatson ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8434243750Srwatson [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8435243750Srwatson 8436243750Srwatson 8437243750Srwatson# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8438243750Srwatson# ----------------------------------------------------------------------- 8439243750Srwatson# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8440243750Srwatson# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8441243750Srwatsonm4_define([lt_if_append_uniq], 8442243750Srwatson[m4_ifdef([$1], 8443243750Srwatson [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8444243750Srwatson [lt_append([$1], [$2], [$3])$4], 8445243750Srwatson [$5])], 8446243750Srwatson [lt_append([$1], [$2], [$3])$4])]) 8447243750Srwatson 8448243750Srwatson 8449243750Srwatson# lt_dict_add(DICT, KEY, VALUE) 8450243750Srwatson# ----------------------------- 8451243750Srwatsonm4_define([lt_dict_add], 8452243750Srwatson[m4_define([$1($2)], [$3])]) 8453243750Srwatson 8454243750Srwatson 8455243750Srwatson# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8456243750Srwatson# -------------------------------------------- 8457243750Srwatsonm4_define([lt_dict_add_subkey], 8458243750Srwatson[m4_define([$1($2:$3)], [$4])]) 8459243750Srwatson 8460243750Srwatson 8461243750Srwatson# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8462243750Srwatson# ---------------------------------- 8463243750Srwatsonm4_define([lt_dict_fetch], 8464243750Srwatson[m4_ifval([$3], 8465243750Srwatson m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8466243750Srwatson m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8467243750Srwatson 8468243750Srwatson 8469243750Srwatson# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8470243750Srwatson# ----------------------------------------------------------------- 8471243750Srwatsonm4_define([lt_if_dict_fetch], 8472243750Srwatson[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8473243750Srwatson [$5], 8474243750Srwatson [$6])]) 8475243750Srwatson 8476243750Srwatson 8477243750Srwatson# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8478243750Srwatson# -------------------------------------------------------------- 8479243750Srwatsonm4_define([lt_dict_filter], 8480243750Srwatson[m4_if([$5], [], [], 8481243750Srwatson [lt_join(m4_quote(m4_default([$4], [[, ]])), 8482243750Srwatson lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8483243750Srwatson [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8484243750Srwatson]) 8485243750Srwatson 8486243750Srwatson# ltversion.m4 -- version numbers -*- Autoconf -*- 8487243750Srwatson# 8488243750Srwatson# Copyright (C) 2004 Free Software Foundation, Inc. 8489243750Srwatson# Written by Scott James Remnant, 2004 8490243750Srwatson# 8491243750Srwatson# This file is free software; the Free Software Foundation gives 8492243750Srwatson# unlimited permission to copy and/or distribute it, with or without 8493243750Srwatson# modifications, as long as this notice is preserved. 8494243750Srwatson 8495243750Srwatson# @configure_input@ 8496243750Srwatson 8497243750Srwatson# serial 3337 ltversion.m4 8498243750Srwatson# This file is part of GNU Libtool 8499243750Srwatson 8500243750Srwatsonm4_define([LT_PACKAGE_VERSION], [2.4.2]) 8501243750Srwatsonm4_define([LT_PACKAGE_REVISION], [1.3337]) 8502243750Srwatson 8503243750SrwatsonAC_DEFUN([LTVERSION_VERSION], 8504243750Srwatson[macro_version='2.4.2' 8505243750Srwatsonmacro_revision='1.3337' 8506243750Srwatson_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8507243750Srwatson_LT_DECL(, macro_revision, 0) 8508243750Srwatson]) 8509243750Srwatson 8510243750Srwatson# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8511243750Srwatson# 8512243750Srwatson# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8513243750Srwatson# Written by Scott James Remnant, 2004. 8514243750Srwatson# 8515243750Srwatson# This file is free software; the Free Software Foundation gives 8516243750Srwatson# unlimited permission to copy and/or distribute it, with or without 8517243750Srwatson# modifications, as long as this notice is preserved. 8518243750Srwatson 8519243750Srwatson# serial 5 lt~obsolete.m4 8520243750Srwatson 8521243750Srwatson# These exist entirely to fool aclocal when bootstrapping libtool. 8522243750Srwatson# 8523243750Srwatson# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8524243750Srwatson# which have later been changed to m4_define as they aren't part of the 8525243750Srwatson# exported API, or moved to Autoconf or Automake where they belong. 8526243750Srwatson# 8527243750Srwatson# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8528243750Srwatson# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8529243750Srwatson# using a macro with the same name in our local m4/libtool.m4 it'll 8530243750Srwatson# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8531243750Srwatson# and doesn't know about Autoconf macros at all.) 8532243750Srwatson# 8533243750Srwatson# So we provide this file, which has a silly filename so it's always 8534243750Srwatson# included after everything else. This provides aclocal with the 8535243750Srwatson# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8536243750Srwatson# because those macros already exist, or will be overwritten later. 8537243750Srwatson# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8538243750Srwatson# 8539243750Srwatson# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8540243750Srwatson# Yes, that means every name once taken will need to remain here until 8541243750Srwatson# we give up compatibility with versions before 1.7, at which point 8542243750Srwatson# we need to keep only those names which we still refer to. 8543243750Srwatson 8544243750Srwatson# This is to help aclocal find these macros, as it can't see m4_define. 8545243750SrwatsonAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8546243750Srwatson 8547243750Srwatsonm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8548243750Srwatsonm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8549243750Srwatsonm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8550243750Srwatsonm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8551243750Srwatsonm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8552243750Srwatsonm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8553243750Srwatsonm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8554243750Srwatsonm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8555243750Srwatsonm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8556243750Srwatsonm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8557243750Srwatsonm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8558243750Srwatsonm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8559243750Srwatsonm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8560243750Srwatsonm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8561243750Srwatsonm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8562243750Srwatsonm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8563243750Srwatsonm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8564243750Srwatsonm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8565243750Srwatsonm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8566243750Srwatsonm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8567243750Srwatsonm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8568243750Srwatsonm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8569243750Srwatsonm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8570243750Srwatsonm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8571243750Srwatsonm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8572243750Srwatsonm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8573243750Srwatsonm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8574243750Srwatsonm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8575243750Srwatsonm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8576243750Srwatsonm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8577243750Srwatsonm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8578243750Srwatsonm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8579243750Srwatsonm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8580243750Srwatsonm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8581243750Srwatsonm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8582243750Srwatsonm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8583243750Srwatsonm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8584243750Srwatsonm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8585243750Srwatsonm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8586243750Srwatsonm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8587243750Srwatsonm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8588243750Srwatsonm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8589243750Srwatsonm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8590243750Srwatsonm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8591243750Srwatsonm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8592243750Srwatsonm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8593243750Srwatsonm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8594243750Srwatsonm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8595243750Srwatsonm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8596243750Srwatsonm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8597243750Srwatsonm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8598243750Srwatsonm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8599243750Srwatsonm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8600243750Srwatsonm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8601243750Srwatsonm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8602243750Srwatsonm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8603243750Srwatsonm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8604243750Srwatsonm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8605243750Srwatsonm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8606243750Srwatsonm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8607243750Srwatsonm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8608243750Srwatson 8609243750Srwatson# Copyright (C) 2002-2012 Free Software Foundation, Inc. 8610243750Srwatson# 8611156283Srwatson# This file is free software; the Free Software Foundation 8612156283Srwatson# gives unlimited permission to copy and/or distribute it, 8613156283Srwatson# with or without modifications, as long as this notice is preserved. 8614156283Srwatson 8615243750Srwatson# serial 8 8616243750Srwatson 8617156283Srwatson# AM_AUTOMAKE_VERSION(VERSION) 8618156283Srwatson# ---------------------------- 8619156283Srwatson# Automake X.Y traces this macro to ensure aclocal.m4 has been 8620156283Srwatson# generated from the m4 files accompanying Automake X.Y. 8621173143Srwatson# (This private macro should not be called outside this file.) 8622173143SrwatsonAC_DEFUN([AM_AUTOMAKE_VERSION], 8623243750Srwatson[am__api_version='1.12' 8624173143Srwatsondnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 8625173143Srwatsondnl require some minimum version. Point them to the right macro. 8626243750Srwatsonm4_if([$1], [1.12.2], [], 8627173143Srwatson [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 8628173143Srwatson]) 8629156283Srwatson 8630173143Srwatson# _AM_AUTOCONF_VERSION(VERSION) 8631173143Srwatson# ----------------------------- 8632173143Srwatson# aclocal traces this macro to find the Autoconf version. 8633173143Srwatson# This is a private macro too. Using m4_define simplifies 8634173143Srwatson# the logic in aclocal, which can simply ignore this definition. 8635173143Srwatsonm4_define([_AM_AUTOCONF_VERSION], []) 8636173143Srwatson 8637156283Srwatson# AM_SET_CURRENT_AUTOMAKE_VERSION 8638156283Srwatson# ------------------------------- 8639173143Srwatson# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8640243750Srwatson# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 8641156283SrwatsonAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 8642243750Srwatson[AM_AUTOMAKE_VERSION([1.12.2])dnl 8643191273Srwatsonm4_ifndef([AC_AUTOCONF_VERSION], 8644191273Srwatson [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8645243750Srwatson_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 8646156283Srwatson 8647156283Srwatson# AM_AUX_DIR_EXPAND -*- Autoconf -*- 8648156283Srwatson 8649243750Srwatson# Copyright (C) 2001-2012 Free Software Foundation, Inc. 8650156283Srwatson# 8651156283Srwatson# This file is free software; the Free Software Foundation 8652156283Srwatson# gives unlimited permission to copy and/or distribute it, 8653156283Srwatson# with or without modifications, as long as this notice is preserved. 8654156283Srwatson 8655243750Srwatson# serial 2 8656243750Srwatson 8657156283Srwatson# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 8658243750Srwatson# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 8659243750Srwatson# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 8660156283Srwatson# 8661156283Srwatson# Of course, Automake must honor this variable whenever it calls a 8662156283Srwatson# tool from the auxiliary directory. The problem is that $srcdir (and 8663156283Srwatson# therefore $ac_aux_dir as well) can be either absolute or relative, 8664156283Srwatson# depending on how configure is run. This is pretty annoying, since 8665156283Srwatson# it makes $ac_aux_dir quite unusable in subdirectories: in the top 8666156283Srwatson# source directory, any form will work fine, but in subdirectories a 8667156283Srwatson# relative path needs to be adjusted first. 8668156283Srwatson# 8669156283Srwatson# $ac_aux_dir/missing 8670156283Srwatson# fails when called from a subdirectory if $ac_aux_dir is relative 8671156283Srwatson# $top_srcdir/$ac_aux_dir/missing 8672156283Srwatson# fails if $ac_aux_dir is absolute, 8673156283Srwatson# fails when called from a subdirectory in a VPATH build with 8674156283Srwatson# a relative $ac_aux_dir 8675156283Srwatson# 8676156283Srwatson# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8677156283Srwatson# are both prefixed by $srcdir. In an in-source build this is usually 8678243750Srwatson# harmless because $srcdir is '.', but things will broke when you 8679156283Srwatson# start a VPATH build or use an absolute $srcdir. 8680156283Srwatson# 8681156283Srwatson# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 8682156283Srwatson# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 8683156283Srwatson# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 8684156283Srwatson# and then we would define $MISSING as 8685156283Srwatson# MISSING="\${SHELL} $am_aux_dir/missing" 8686156283Srwatson# This will work as long as MISSING is not called from configure, because 8687156283Srwatson# unfortunately $(top_srcdir) has no meaning in configure. 8688156283Srwatson# However there are other variables, like CC, which are often used in 8689156283Srwatson# configure, and could therefore not use this "fixed" $ac_aux_dir. 8690156283Srwatson# 8691156283Srwatson# Another solution, used here, is to always expand $ac_aux_dir to an 8692156283Srwatson# absolute PATH. The drawback is that using absolute paths prevent a 8693156283Srwatson# configured tree to be moved without reconfiguration. 8694156283Srwatson 8695156283SrwatsonAC_DEFUN([AM_AUX_DIR_EXPAND], 8696156283Srwatson[dnl Rely on autoconf to set up CDPATH properly. 8697156283SrwatsonAC_PREREQ([2.50])dnl 8698156283Srwatson# expand $ac_aux_dir to an absolute path 8699156283Srwatsonam_aux_dir=`cd $ac_aux_dir && pwd` 8700156283Srwatson]) 8701156283Srwatson 8702156283Srwatson# AM_CONDITIONAL -*- Autoconf -*- 8703156283Srwatson 8704243750Srwatson# Copyright (C) 1997-2012 Free Software Foundation, Inc. 8705156283Srwatson# 8706156283Srwatson# This file is free software; the Free Software Foundation 8707156283Srwatson# gives unlimited permission to copy and/or distribute it, 8708156283Srwatson# with or without modifications, as long as this notice is preserved. 8709156283Srwatson 8710243750Srwatson# serial 10 8711156283Srwatson 8712156283Srwatson# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8713156283Srwatson# ------------------------------------- 8714156283Srwatson# Define a conditional. 8715156283SrwatsonAC_DEFUN([AM_CONDITIONAL], 8716243750Srwatson[AC_PREREQ([2.52])dnl 8717243750Srwatson m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8718243750Srwatson [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8719173143SrwatsonAC_SUBST([$1_TRUE])dnl 8720173143SrwatsonAC_SUBST([$1_FALSE])dnl 8721173143Srwatson_AM_SUBST_NOTMAKE([$1_TRUE])dnl 8722173143Srwatson_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8723243750Srwatsonm4_define([_AM_COND_VALUE_$1], [$2])dnl 8724156283Srwatsonif $2; then 8725156283Srwatson $1_TRUE= 8726156283Srwatson $1_FALSE='#' 8727156283Srwatsonelse 8728156283Srwatson $1_TRUE='#' 8729156283Srwatson $1_FALSE= 8730156283Srwatsonfi 8731156283SrwatsonAC_CONFIG_COMMANDS_PRE( 8732156283Srwatson[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8733156283Srwatson AC_MSG_ERROR([[conditional "$1" was never defined. 8734156283SrwatsonUsually this means the macro was only invoked conditionally.]]) 8735156283Srwatsonfi])]) 8736156283Srwatson 8737243750Srwatson# Copyright (C) 1999-2012 Free Software Foundation, Inc. 8738156283Srwatson# 8739156283Srwatson# This file is free software; the Free Software Foundation 8740156283Srwatson# gives unlimited permission to copy and/or distribute it, 8741156283Srwatson# with or without modifications, as long as this notice is preserved. 8742156283Srwatson 8743243750Srwatson# serial 17 8744156283Srwatson 8745243750Srwatson# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 8746156283Srwatson# written in clear, in which case automake, when reading aclocal.m4, 8747156283Srwatson# will think it sees a *use*, and therefore will trigger all it's 8748156283Srwatson# C support machinery. Also note that it means that autoscan, seeing 8749156283Srwatson# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 8750156283Srwatson 8751156283Srwatson 8752156283Srwatson# _AM_DEPENDENCIES(NAME) 8753156283Srwatson# ---------------------- 8754156283Srwatson# See how the compiler implements dependency checking. 8755243750Srwatson# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 8756156283Srwatson# We try a few techniques and use that to set a single cache variable. 8757156283Srwatson# 8758156283Srwatson# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 8759156283Srwatson# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 8760156283Srwatson# dependency, and given that the user is not expected to run this macro, 8761156283Srwatson# just rely on AC_PROG_CC. 8762156283SrwatsonAC_DEFUN([_AM_DEPENDENCIES], 8763156283Srwatson[AC_REQUIRE([AM_SET_DEPDIR])dnl 8764156283SrwatsonAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 8765156283SrwatsonAC_REQUIRE([AM_MAKE_INCLUDE])dnl 8766156283SrwatsonAC_REQUIRE([AM_DEP_TRACK])dnl 8767156283Srwatson 8768243750Srwatsonm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 8769243750Srwatson [$1], [CXX], [depcc="$CXX" am_compiler_list=], 8770243750Srwatson [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 8771243750Srwatson [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 8772243750Srwatson [$1], [UPC], [depcc="$UPC" am_compiler_list=], 8773243750Srwatson [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 8774243750Srwatson [depcc="$$1" am_compiler_list=]) 8775156283Srwatson 8776156283SrwatsonAC_CACHE_CHECK([dependency style of $depcc], 8777156283Srwatson [am_cv_$1_dependencies_compiler_type], 8778156283Srwatson[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 8779156283Srwatson # We make a subdir and do the tests there. Otherwise we can end up 8780156283Srwatson # making bogus files that we don't know about and never remove. For 8781156283Srwatson # instance it was reported that on HP-UX the gcc test will end up 8782243750Srwatson # making a dummy file named 'D' -- because '-MD' means "put the output 8783243750Srwatson # in D". 8784243750Srwatson rm -rf conftest.dir 8785156283Srwatson mkdir conftest.dir 8786156283Srwatson # Copy depcomp to subdir because otherwise we won't find it if we're 8787156283Srwatson # using a relative directory. 8788156283Srwatson cp "$am_depcomp" conftest.dir 8789156283Srwatson cd conftest.dir 8790156283Srwatson # We will build objects and dependencies in a subdirectory because 8791156283Srwatson # it helps to detect inapplicable dependency modes. For instance 8792156283Srwatson # both Tru64's cc and ICC support -MD to output dependencies as a 8793156283Srwatson # side effect of compilation, but ICC will put the dependencies in 8794156283Srwatson # the current directory while Tru64 will put them in the object 8795156283Srwatson # directory. 8796156283Srwatson mkdir sub 8797156283Srwatson 8798156283Srwatson am_cv_$1_dependencies_compiler_type=none 8799156283Srwatson if test "$am_compiler_list" = ""; then 8800156283Srwatson am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 8801156283Srwatson fi 8802243750Srwatson am__universal=false 8803243750Srwatson m4_case([$1], [CC], 8804243750Srwatson [case " $depcc " in #( 8805243750Srwatson *\ -arch\ *\ -arch\ *) am__universal=true ;; 8806243750Srwatson esac], 8807243750Srwatson [CXX], 8808243750Srwatson [case " $depcc " in #( 8809243750Srwatson *\ -arch\ *\ -arch\ *) am__universal=true ;; 8810243750Srwatson esac]) 8811243750Srwatson 8812156283Srwatson for depmode in $am_compiler_list; do 8813156283Srwatson # Setup a source with many dependencies, because some compilers 8814156283Srwatson # like to wrap large dependency lists on column 80 (with \), and 8815156283Srwatson # we should not choose a depcomp mode which is confused by this. 8816156283Srwatson # 8817156283Srwatson # We need to recreate these files for each test, as the compiler may 8818156283Srwatson # overwrite some of them when testing with obscure command lines. 8819156283Srwatson # This happens at least with the AIX C compiler. 8820156283Srwatson : > sub/conftest.c 8821156283Srwatson for i in 1 2 3 4 5 6; do 8822156283Srwatson echo '#include "conftst'$i'.h"' >> sub/conftest.c 8823243750Srwatson # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 8824243750Srwatson # Solaris 10 /bin/sh. 8825243750Srwatson echo '/* dummy */' > sub/conftst$i.h 8826156283Srwatson done 8827156283Srwatson echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 8828156283Srwatson 8829243750Srwatson # We check with '-c' and '-o' for the sake of the "dashmstdout" 8830243750Srwatson # mode. It turns out that the SunPro C++ compiler does not properly 8831243750Srwatson # handle '-M -o', and we need to detect this. Also, some Intel 8832243750Srwatson # versions had trouble with output in subdirs. 8833243750Srwatson am__obj=sub/conftest.${OBJEXT-o} 8834243750Srwatson am__minus_obj="-o $am__obj" 8835156283Srwatson case $depmode in 8836243750Srwatson gcc) 8837243750Srwatson # This depmode causes a compiler race in universal mode. 8838243750Srwatson test "$am__universal" = false || continue 8839243750Srwatson ;; 8840156283Srwatson nosideeffect) 8841243750Srwatson # After this tag, mechanisms are not by side-effect, so they'll 8842243750Srwatson # only be used when explicitly requested. 8843156283Srwatson if test "x$enable_dependency_tracking" = xyes; then 8844156283Srwatson continue 8845156283Srwatson else 8846156283Srwatson break 8847156283Srwatson fi 8848156283Srwatson ;; 8849243750Srwatson msvc7 | msvc7msys | msvisualcpp | msvcmsys) 8850243750Srwatson # This compiler won't grok '-c -o', but also, the minuso test has 8851243750Srwatson # not run yet. These depmodes are late enough in the game, and 8852243750Srwatson # so weak that their functioning should not be impacted. 8853243750Srwatson am__obj=conftest.${OBJEXT-o} 8854243750Srwatson am__minus_obj= 8855243750Srwatson ;; 8856156283Srwatson none) break ;; 8857156283Srwatson esac 8858156283Srwatson if depmode=$depmode \ 8859243750Srwatson source=sub/conftest.c object=$am__obj \ 8860156283Srwatson depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 8861243750Srwatson $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 8862156283Srwatson >/dev/null 2>conftest.err && 8863173143Srwatson grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 8864156283Srwatson grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 8865243750Srwatson grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 8866156283Srwatson ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 8867156283Srwatson # icc doesn't choke on unknown options, it will just issue warnings 8868156283Srwatson # or remarks (even with -Werror). So we grep stderr for any message 8869156283Srwatson # that says an option was ignored or not supported. 8870156283Srwatson # When given -MP, icc 7.0 and 7.1 complain thusly: 8871156283Srwatson # icc: Command line warning: ignoring option '-M'; no argument required 8872156283Srwatson # The diagnosis changed in icc 8.0: 8873156283Srwatson # icc: Command line remark: option '-MP' not supported 8874156283Srwatson if (grep 'ignoring option' conftest.err || 8875156283Srwatson grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 8876156283Srwatson am_cv_$1_dependencies_compiler_type=$depmode 8877156283Srwatson break 8878156283Srwatson fi 8879156283Srwatson fi 8880156283Srwatson done 8881156283Srwatson 8882156283Srwatson cd .. 8883156283Srwatson rm -rf conftest.dir 8884156283Srwatsonelse 8885156283Srwatson am_cv_$1_dependencies_compiler_type=none 8886156283Srwatsonfi 8887156283Srwatson]) 8888156283SrwatsonAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 8889156283SrwatsonAM_CONDITIONAL([am__fastdep$1], [ 8890156283Srwatson test "x$enable_dependency_tracking" != xno \ 8891156283Srwatson && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 8892156283Srwatson]) 8893156283Srwatson 8894156283Srwatson 8895156283Srwatson# AM_SET_DEPDIR 8896156283Srwatson# ------------- 8897156283Srwatson# Choose a directory name for dependency files. 8898243750Srwatson# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 8899156283SrwatsonAC_DEFUN([AM_SET_DEPDIR], 8900156283Srwatson[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 8901156283SrwatsonAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 8902156283Srwatson]) 8903156283Srwatson 8904156283Srwatson 8905156283Srwatson# AM_DEP_TRACK 8906156283Srwatson# ------------ 8907156283SrwatsonAC_DEFUN([AM_DEP_TRACK], 8908243750Srwatson[AC_ARG_ENABLE([dependency-tracking], [dnl 8909243750SrwatsonAS_HELP_STRING( 8910243750Srwatson [--enable-dependency-tracking], 8911243750Srwatson [do not reject slow dependency extractors]) 8912243750SrwatsonAS_HELP_STRING( 8913243750Srwatson [--disable-dependency-tracking], 8914243750Srwatson [speeds up one-time build])]) 8915156283Srwatsonif test "x$enable_dependency_tracking" != xno; then 8916156283Srwatson am_depcomp="$ac_aux_dir/depcomp" 8917156283Srwatson AMDEPBACKSLASH='\' 8918243750Srwatson am__nodep='_no' 8919156283Srwatsonfi 8920156283SrwatsonAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 8921173143SrwatsonAC_SUBST([AMDEPBACKSLASH])dnl 8922173143Srwatson_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 8923243750SrwatsonAC_SUBST([am__nodep])dnl 8924243750Srwatson_AM_SUBST_NOTMAKE([am__nodep])dnl 8925156283Srwatson]) 8926156283Srwatson 8927156283Srwatson# Generate code to set up dependency tracking. -*- Autoconf -*- 8928156283Srwatson 8929243750Srwatson# Copyright (C) 1999-2012 Free Software Foundation, Inc. 8930156283Srwatson# 8931156283Srwatson# This file is free software; the Free Software Foundation 8932156283Srwatson# gives unlimited permission to copy and/or distribute it, 8933156283Srwatson# with or without modifications, as long as this notice is preserved. 8934156283Srwatson 8935243750Srwatson# serial 6 8936156283Srwatson 8937156283Srwatson# _AM_OUTPUT_DEPENDENCY_COMMANDS 8938156283Srwatson# ------------------------------ 8939156283SrwatsonAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 8940243750Srwatson[{ 8941243750Srwatson # Autoconf 2.62 quotes --file arguments for eval, but not when files 8942243750Srwatson # are listed without --file. Let's play safe and only enable the eval 8943243750Srwatson # if we detect the quoting. 8944243750Srwatson case $CONFIG_FILES in 8945243750Srwatson *\'*) eval set x "$CONFIG_FILES" ;; 8946243750Srwatson *) set x $CONFIG_FILES ;; 8947243750Srwatson esac 8948243750Srwatson shift 8949243750Srwatson for mf 8950243750Srwatson do 8951243750Srwatson # Strip MF so we end up with the name of the file. 8952243750Srwatson mf=`echo "$mf" | sed -e 's/:.*$//'` 8953243750Srwatson # Check whether this is an Automake generated Makefile or not. 8954243750Srwatson # We used to match only the files named 'Makefile.in', but 8955243750Srwatson # some people rename them; so instead we look at the file content. 8956243750Srwatson # Grep'ing the first line is not enough: some people post-process 8957243750Srwatson # each Makefile.in and add a new line on top of each file to say so. 8958243750Srwatson # Grep'ing the whole file is not good either: AIX grep has a line 8959243750Srwatson # limit of 2048, but all sed's we know have understand at least 4000. 8960243750Srwatson if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 8961243750Srwatson dirpart=`AS_DIRNAME("$mf")` 8962243750Srwatson else 8963243750Srwatson continue 8964243750Srwatson fi 8965243750Srwatson # Extract the definition of DEPDIR, am__include, and am__quote 8966243750Srwatson # from the Makefile without running 'make'. 8967243750Srwatson DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 8968243750Srwatson test -z "$DEPDIR" && continue 8969243750Srwatson am__include=`sed -n 's/^am__include = //p' < "$mf"` 8970243750Srwatson test -z "am__include" && continue 8971243750Srwatson am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 8972243750Srwatson # Find all dependency output files, they are included files with 8973243750Srwatson # $(DEPDIR) in their names. We invoke sed twice because it is the 8974243750Srwatson # simplest approach to changing $(DEPDIR) to its actual value in the 8975243750Srwatson # expansion. 8976243750Srwatson for file in `sed -n " 8977243750Srwatson s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 8978243750Srwatson sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 8979243750Srwatson # Make sure the directory exists. 8980243750Srwatson test -f "$dirpart/$file" && continue 8981243750Srwatson fdir=`AS_DIRNAME(["$file"])` 8982243750Srwatson AS_MKDIR_P([$dirpart/$fdir]) 8983243750Srwatson # echo "creating $dirpart/$file" 8984243750Srwatson echo '# dummy' > "$dirpart/$file" 8985243750Srwatson done 8986156283Srwatson done 8987243750Srwatson} 8988156283Srwatson])# _AM_OUTPUT_DEPENDENCY_COMMANDS 8989156283Srwatson 8990156283Srwatson 8991156283Srwatson# AM_OUTPUT_DEPENDENCY_COMMANDS 8992156283Srwatson# ----------------------------- 8993156283Srwatson# This macro should only be invoked once -- use via AC_REQUIRE. 8994156283Srwatson# 8995156283Srwatson# This code is only required when automatic dependency tracking 8996243750Srwatson# is enabled. FIXME. This creates each '.P' file that we will 8997156283Srwatson# need in order to bootstrap the dependency handling code. 8998156283SrwatsonAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 8999156283Srwatson[AC_CONFIG_COMMANDS([depfiles], 9000156283Srwatson [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 9001156283Srwatson [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 9002156283Srwatson]) 9003156283Srwatson 9004156283Srwatson# Do all the work for Automake. -*- Autoconf -*- 9005156283Srwatson 9006243750Srwatson# Copyright (C) 1996-2012 Free Software Foundation, Inc. 9007156283Srwatson# 9008156283Srwatson# This file is free software; the Free Software Foundation 9009156283Srwatson# gives unlimited permission to copy and/or distribute it, 9010156283Srwatson# with or without modifications, as long as this notice is preserved. 9011156283Srwatson 9012243750Srwatson# serial 19 9013156283Srwatson 9014156283Srwatson# This macro actually does too much. Some checks are only needed if 9015156283Srwatson# your package does certain things. But this isn't really a big deal. 9016156283Srwatson 9017156283Srwatson# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 9018156283Srwatson# AM_INIT_AUTOMAKE([OPTIONS]) 9019156283Srwatson# ----------------------------------------------- 9020156283Srwatson# The call with PACKAGE and VERSION arguments is the old style 9021156283Srwatson# call (pre autoconf-2.50), which is being phased out. PACKAGE 9022156283Srwatson# and VERSION should now be passed to AC_INIT and removed from 9023156283Srwatson# the call to AM_INIT_AUTOMAKE. 9024156283Srwatson# We support both call styles for the transition. After 9025156283Srwatson# the next Automake release, Autoconf can make the AC_INIT 9026156283Srwatson# arguments mandatory, and then we can depend on a new Autoconf 9027156283Srwatson# release and drop the old call support. 9028156283SrwatsonAC_DEFUN([AM_INIT_AUTOMAKE], 9029243750Srwatson[AC_PREREQ([2.62])dnl 9030156283Srwatsondnl Autoconf wants to disallow AM_ names. We explicitly allow 9031156283Srwatsondnl the ones we care about. 9032156283Srwatsonm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 9033156283SrwatsonAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 9034156283SrwatsonAC_REQUIRE([AC_PROG_INSTALL])dnl 9035173143Srwatsonif test "`cd $srcdir && pwd`" != "`pwd`"; then 9036173143Srwatson # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 9037173143Srwatson # is not polluted with repeated "-I." 9038173143Srwatson AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 9039173143Srwatson # test to see if srcdir already configured 9040173143Srwatson if test -f $srcdir/config.status; then 9041173143Srwatson AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 9042173143Srwatson fi 9043156283Srwatsonfi 9044156283Srwatson 9045156283Srwatson# test whether we have cygpath 9046156283Srwatsonif test -z "$CYGPATH_W"; then 9047156283Srwatson if (cygpath --version) >/dev/null 2>/dev/null; then 9048156283Srwatson CYGPATH_W='cygpath -w' 9049156283Srwatson else 9050156283Srwatson CYGPATH_W=echo 9051156283Srwatson fi 9052156283Srwatsonfi 9053156283SrwatsonAC_SUBST([CYGPATH_W]) 9054156283Srwatson 9055156283Srwatson# Define the identity of the package. 9056156283Srwatsondnl Distinguish between old-style and new-style calls. 9057156283Srwatsonm4_ifval([$2], 9058243750Srwatson[AC_DIAGNOSE([obsolete], 9059243750Srwatson[$0: two- and three-arguments forms are deprecated. For more info, see: 9060243750Srwatsonhttp://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) 9061243750Srwatsonm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 9062156283Srwatson AC_SUBST([PACKAGE], [$1])dnl 9063156283Srwatson AC_SUBST([VERSION], [$2])], 9064156283Srwatson[_AM_SET_OPTIONS([$1])dnl 9065173143Srwatsondnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 9066243750Srwatsonm4_if( 9067243750Srwatson m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 9068243750Srwatson [ok:ok],, 9069173143Srwatson [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 9070156283Srwatson AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 9071156283Srwatson AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 9072156283Srwatson 9073156283Srwatson_AM_IF_OPTION([no-define],, 9074243750Srwatson[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 9075243750Srwatson AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 9076156283Srwatson 9077156283Srwatson# Some tools Automake needs. 9078156283SrwatsonAC_REQUIRE([AM_SANITY_CHECK])dnl 9079156283SrwatsonAC_REQUIRE([AC_ARG_PROGRAM])dnl 9080243750SrwatsonAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 9081243750SrwatsonAM_MISSING_PROG([AUTOCONF], [autoconf]) 9082243750SrwatsonAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 9083243750SrwatsonAM_MISSING_PROG([AUTOHEADER], [autoheader]) 9084243750SrwatsonAM_MISSING_PROG([MAKEINFO], [makeinfo]) 9085243750SrwatsonAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9086243750SrwatsonAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 9087243750SrwatsonAC_REQUIRE([AC_PROG_MKDIR_P])dnl 9088243750Srwatson# For better backward compatibility. To be removed once Automake 1.9.x 9089243750Srwatson# dies out for good. For more background, see: 9090243750Srwatson# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 9091243750Srwatson# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 9092243750SrwatsonAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 9093156283Srwatson# We need awk for the "check" target. The system "awk" is bad on 9094156283Srwatson# some platforms. 9095156283SrwatsonAC_REQUIRE([AC_PROG_AWK])dnl 9096156283SrwatsonAC_REQUIRE([AC_PROG_MAKE_SET])dnl 9097156283SrwatsonAC_REQUIRE([AM_SET_LEADING_DOT])dnl 9098156283Srwatson_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 9099243750Srwatson [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 9100243750Srwatson [_AM_PROG_TAR([v7])])]) 9101156283Srwatson_AM_IF_OPTION([no-dependencies],, 9102156283Srwatson[AC_PROVIDE_IFELSE([AC_PROG_CC], 9103243750Srwatson [_AM_DEPENDENCIES([CC])], 9104243750Srwatson [m4_define([AC_PROG_CC], 9105243750Srwatson m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 9106156283SrwatsonAC_PROVIDE_IFELSE([AC_PROG_CXX], 9107243750Srwatson [_AM_DEPENDENCIES([CXX])], 9108243750Srwatson [m4_define([AC_PROG_CXX], 9109243750Srwatson m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 9110173143SrwatsonAC_PROVIDE_IFELSE([AC_PROG_OBJC], 9111243750Srwatson [_AM_DEPENDENCIES([OBJC])], 9112243750Srwatson [m4_define([AC_PROG_OBJC], 9113243750Srwatson m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 9114243750Srwatsondnl Support for Objective C++ was only introduced in Autoconf 2.65, 9115243750Srwatsondnl but we still cater to Autoconf 2.62. 9116243750Srwatsonm4_ifdef([AC_PROG_OBJCXX], 9117243750Srwatson[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 9118243750Srwatson [_AM_DEPENDENCIES([OBJCXX])], 9119243750Srwatson [m4_define([AC_PROG_OBJCXX], 9120243750Srwatson m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl 9121156283Srwatson]) 9122243750Srwatson_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 9123243750Srwatsondnl The 'parallel-tests' driver may need to know about EXEEXT, so add the 9124243750Srwatsondnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 9125243750Srwatsondnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 9126243750SrwatsonAC_CONFIG_COMMANDS_PRE(dnl 9127243750Srwatson[m4_provide_if([_AM_COMPILER_EXEEXT], 9128243750Srwatson [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 9129156283Srwatson]) 9130156283Srwatson 9131243750Srwatsondnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 9132243750Srwatsondnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 9133243750Srwatsondnl mangled by Autoconf and run in a shell conditional statement. 9134243750Srwatsonm4_define([_AC_COMPILER_EXEEXT], 9135243750Srwatsonm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 9136156283Srwatson 9137243750Srwatson 9138156283Srwatson# When config.status generates a header, we must update the stamp-h file. 9139156283Srwatson# This file resides in the same directory as the config header 9140156283Srwatson# that is generated. The stamp files are numbered to have different names. 9141156283Srwatson 9142156283Srwatson# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 9143156283Srwatson# loop where config.status creates the headers, so we can generate 9144156283Srwatson# our stamp files there. 9145156283SrwatsonAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 9146156283Srwatson[# Compute $1's index in $config_headers. 9147191273Srwatson_am_arg=$1 9148156283Srwatson_am_stamp_count=1 9149156283Srwatsonfor _am_header in $config_headers :; do 9150156283Srwatson case $_am_header in 9151191273Srwatson $_am_arg | $_am_arg:* ) 9152156283Srwatson break ;; 9153156283Srwatson * ) 9154156283Srwatson _am_stamp_count=`expr $_am_stamp_count + 1` ;; 9155156283Srwatson esac 9156156283Srwatsondone 9157191273Srwatsonecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 9158156283Srwatson 9159243750Srwatson# Copyright (C) 2001-2012 Free Software Foundation, Inc. 9160156283Srwatson# 9161156283Srwatson# This file is free software; the Free Software Foundation 9162156283Srwatson# gives unlimited permission to copy and/or distribute it, 9163156283Srwatson# with or without modifications, as long as this notice is preserved. 9164156283Srwatson 9165243750Srwatson# serial 8 9166243750Srwatson 9167156283Srwatson# AM_PROG_INSTALL_SH 9168156283Srwatson# ------------------ 9169156283Srwatson# Define $install_sh. 9170156283SrwatsonAC_DEFUN([AM_PROG_INSTALL_SH], 9171156283Srwatson[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9172243750Srwatsonif test x"${install_sh}" != xset; then 9173243750Srwatson case $am_aux_dir in 9174243750Srwatson *\ * | *\ *) 9175243750Srwatson install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 9176243750Srwatson *) 9177243750Srwatson install_sh="\${SHELL} $am_aux_dir/install-sh" 9178243750Srwatson esac 9179243750Srwatsonfi 9180243750SrwatsonAC_SUBST([install_sh])]) 9181156283Srwatson 9182243750Srwatson# Copyright (C) 2003-2012 Free Software Foundation, Inc. 9183156283Srwatson# 9184156283Srwatson# This file is free software; the Free Software Foundation 9185156283Srwatson# gives unlimited permission to copy and/or distribute it, 9186156283Srwatson# with or without modifications, as long as this notice is preserved. 9187156283Srwatson 9188156283Srwatson# serial 2 9189156283Srwatson 9190156283Srwatson# Check whether the underlying file-system supports filenames 9191156283Srwatson# with a leading dot. For instance MS-DOS doesn't. 9192156283SrwatsonAC_DEFUN([AM_SET_LEADING_DOT], 9193156283Srwatson[rm -rf .tst 2>/dev/null 9194156283Srwatsonmkdir .tst 2>/dev/null 9195156283Srwatsonif test -d .tst; then 9196156283Srwatson am__leading_dot=. 9197156283Srwatsonelse 9198156283Srwatson am__leading_dot=_ 9199156283Srwatsonfi 9200156283Srwatsonrmdir .tst 2>/dev/null 9201156283SrwatsonAC_SUBST([am__leading_dot])]) 9202156283Srwatson 9203156283Srwatson# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 9204156283Srwatson# From Jim Meyering 9205156283Srwatson 9206243750Srwatson# Copyright (C) 1996-2012 Free Software Foundation, Inc. 9207156283Srwatson# 9208156283Srwatson# This file is free software; the Free Software Foundation 9209156283Srwatson# gives unlimited permission to copy and/or distribute it, 9210156283Srwatson# with or without modifications, as long as this notice is preserved. 9211156283Srwatson 9212243750Srwatson# serial 7 9213156283Srwatson 9214243750Srwatson# AM_MAINTAINER_MODE([DEFAULT-MODE]) 9215243750Srwatson# ---------------------------------- 9216243750Srwatson# Control maintainer-specific portions of Makefiles. 9217243750Srwatson# Default is to disable them, unless 'enable' is passed literally. 9218243750Srwatson# For symmetry, 'disable' may be passed as well. Anyway, the user 9219243750Srwatson# can override the default with the --enable/--disable switch. 9220156283SrwatsonAC_DEFUN([AM_MAINTAINER_MODE], 9221243750Srwatson[m4_case(m4_default([$1], [disable]), 9222243750Srwatson [enable], [m4_define([am_maintainer_other], [disable])], 9223243750Srwatson [disable], [m4_define([am_maintainer_other], [enable])], 9224243750Srwatson [m4_define([am_maintainer_other], [enable]) 9225243750Srwatson m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 9226243750SrwatsonAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 9227243750Srwatson dnl maintainer-mode's default is 'disable' unless 'enable' is passed 9228243750Srwatson AC_ARG_ENABLE([maintainer-mode], 9229243750Srwatson [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 9230243750Srwatson am_maintainer_other[ make rules and dependencies not useful 9231243750Srwatson (and sometimes confusing) to the casual installer])], 9232243750Srwatson [USE_MAINTAINER_MODE=$enableval], 9233243750Srwatson [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 9234156283Srwatson AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 9235243750Srwatson AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 9236156283Srwatson MAINT=$MAINTAINER_MODE_TRUE 9237243750Srwatson AC_SUBST([MAINT])dnl 9238156283Srwatson] 9239156283Srwatson) 9240156283Srwatson 9241156283SrwatsonAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 9242156283Srwatson 9243156283Srwatson# Check to see how 'make' treats includes. -*- Autoconf -*- 9244156283Srwatson 9245243750Srwatson# Copyright (C) 2001-2012 Free Software Foundation, Inc. 9246156283Srwatson# 9247156283Srwatson# This file is free software; the Free Software Foundation 9248156283Srwatson# gives unlimited permission to copy and/or distribute it, 9249156283Srwatson# with or without modifications, as long as this notice is preserved. 9250156283Srwatson 9251243750Srwatson# serial 5 9252156283Srwatson 9253156283Srwatson# AM_MAKE_INCLUDE() 9254156283Srwatson# ----------------- 9255156283Srwatson# Check to see how make treats includes. 9256156283SrwatsonAC_DEFUN([AM_MAKE_INCLUDE], 9257156283Srwatson[am_make=${MAKE-make} 9258156283Srwatsoncat > confinc << 'END' 9259156283Srwatsonam__doit: 9260243750Srwatson @echo this is the am__doit target 9261156283Srwatson.PHONY: am__doit 9262156283SrwatsonEND 9263156283Srwatson# If we don't find an include directive, just comment out the code. 9264156283SrwatsonAC_MSG_CHECKING([for style of include used by $am_make]) 9265156283Srwatsonam__include="#" 9266156283Srwatsonam__quote= 9267156283Srwatson_am_result=none 9268156283Srwatson# First try GNU make style include. 9269156283Srwatsonecho "include confinc" > confmf 9270243750Srwatson# Ignore all kinds of additional output from 'make'. 9271243750Srwatsoncase `$am_make -s -f confmf 2> /dev/null` in #( 9272243750Srwatson*the\ am__doit\ target*) 9273243750Srwatson am__include=include 9274243750Srwatson am__quote= 9275243750Srwatson _am_result=GNU 9276243750Srwatson ;; 9277243750Srwatsonesac 9278156283Srwatson# Now try BSD make style include. 9279156283Srwatsonif test "$am__include" = "#"; then 9280156283Srwatson echo '.include "confinc"' > confmf 9281243750Srwatson case `$am_make -s -f confmf 2> /dev/null` in #( 9282243750Srwatson *the\ am__doit\ target*) 9283243750Srwatson am__include=.include 9284243750Srwatson am__quote="\"" 9285243750Srwatson _am_result=BSD 9286243750Srwatson ;; 9287243750Srwatson esac 9288156283Srwatsonfi 9289156283SrwatsonAC_SUBST([am__include]) 9290156283SrwatsonAC_SUBST([am__quote]) 9291156283SrwatsonAC_MSG_RESULT([$_am_result]) 9292156283Srwatsonrm -f confinc confmf 9293156283Srwatson]) 9294156283Srwatson 9295156283Srwatson# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 9296156283Srwatson 9297243750Srwatson# Copyright (C) 1997-2012 Free Software Foundation, Inc. 9298156283Srwatson# 9299156283Srwatson# This file is free software; the Free Software Foundation 9300156283Srwatson# gives unlimited permission to copy and/or distribute it, 9301156283Srwatson# with or without modifications, as long as this notice is preserved. 9302156283Srwatson 9303243750Srwatson# serial 7 9304156283Srwatson 9305156283Srwatson# AM_MISSING_PROG(NAME, PROGRAM) 9306156283Srwatson# ------------------------------ 9307156283SrwatsonAC_DEFUN([AM_MISSING_PROG], 9308156283Srwatson[AC_REQUIRE([AM_MISSING_HAS_RUN]) 9309156283Srwatson$1=${$1-"${am_missing_run}$2"} 9310156283SrwatsonAC_SUBST($1)]) 9311156283Srwatson 9312156283Srwatson 9313156283Srwatson# AM_MISSING_HAS_RUN 9314156283Srwatson# ------------------ 9315156283Srwatson# Define MISSING if not defined so far and test if it supports --run. 9316156283Srwatson# If it does, set am_missing_run to use it, otherwise, to nothing. 9317156283SrwatsonAC_DEFUN([AM_MISSING_HAS_RUN], 9318156283Srwatson[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9319173143SrwatsonAC_REQUIRE_AUX_FILE([missing])dnl 9320243750Srwatsonif test x"${MISSING+set}" != xset; then 9321243750Srwatson case $am_aux_dir in 9322243750Srwatson *\ * | *\ *) 9323243750Srwatson MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 9324243750Srwatson *) 9325243750Srwatson MISSING="\${SHELL} $am_aux_dir/missing" ;; 9326243750Srwatson esac 9327243750Srwatsonfi 9328156283Srwatson# Use eval to expand $SHELL 9329156283Srwatsonif eval "$MISSING --run true"; then 9330156283Srwatson am_missing_run="$MISSING --run " 9331156283Srwatsonelse 9332156283Srwatson am_missing_run= 9333243750Srwatson AC_MSG_WARN(['missing' script is too old or missing]) 9334156283Srwatsonfi 9335156283Srwatson]) 9336156283Srwatson 9337156283Srwatson# Helper functions for option handling. -*- Autoconf -*- 9338156283Srwatson 9339243750Srwatson# Copyright (C) 2001-2012 Free Software Foundation, Inc. 9340156283Srwatson# 9341156283Srwatson# This file is free software; the Free Software Foundation 9342156283Srwatson# gives unlimited permission to copy and/or distribute it, 9343156283Srwatson# with or without modifications, as long as this notice is preserved. 9344156283Srwatson 9345243750Srwatson# serial 6 9346156283Srwatson 9347156283Srwatson# _AM_MANGLE_OPTION(NAME) 9348156283Srwatson# ----------------------- 9349156283SrwatsonAC_DEFUN([_AM_MANGLE_OPTION], 9350156283Srwatson[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 9351156283Srwatson 9352156283Srwatson# _AM_SET_OPTION(NAME) 9353243750Srwatson# -------------------- 9354156283Srwatson# Set option NAME. Presently that only means defining a flag for this option. 9355156283SrwatsonAC_DEFUN([_AM_SET_OPTION], 9356243750Srwatson[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 9357156283Srwatson 9358156283Srwatson# _AM_SET_OPTIONS(OPTIONS) 9359243750Srwatson# ------------------------ 9360156283Srwatson# OPTIONS is a space-separated list of Automake options. 9361156283SrwatsonAC_DEFUN([_AM_SET_OPTIONS], 9362243750Srwatson[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 9363156283Srwatson 9364156283Srwatson# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 9365156283Srwatson# ------------------------------------------- 9366156283Srwatson# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9367156283SrwatsonAC_DEFUN([_AM_IF_OPTION], 9368156283Srwatson[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 9369156283Srwatson 9370156283Srwatson# Check to make sure that the build environment is sane. -*- Autoconf -*- 9371156283Srwatson 9372243750Srwatson# Copyright (C) 1996-2012 Free Software Foundation, Inc. 9373156283Srwatson# 9374156283Srwatson# This file is free software; the Free Software Foundation 9375156283Srwatson# gives unlimited permission to copy and/or distribute it, 9376156283Srwatson# with or without modifications, as long as this notice is preserved. 9377156283Srwatson 9378243750Srwatson# serial 9 9379156283Srwatson 9380156283Srwatson# AM_SANITY_CHECK 9381156283Srwatson# --------------- 9382156283SrwatsonAC_DEFUN([AM_SANITY_CHECK], 9383156283Srwatson[AC_MSG_CHECKING([whether build environment is sane]) 9384243750Srwatson# Reject unsafe characters in $srcdir or the absolute working directory 9385243750Srwatson# name. Accept space and tab only in the latter. 9386243750Srwatsonam_lf=' 9387243750Srwatson' 9388243750Srwatsoncase `pwd` in 9389243750Srwatson *[[\\\"\#\$\&\'\`$am_lf]]*) 9390243750Srwatson AC_MSG_ERROR([unsafe absolute working directory name]);; 9391243750Srwatsonesac 9392243750Srwatsoncase $srcdir in 9393243750Srwatson *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 9394243750Srwatson AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 9395243750Srwatsonesac 9396243750Srwatson 9397243750Srwatson# Do 'set' in a subshell so we don't clobber the current shell's 9398156283Srwatson# arguments. Must try -L first in case configure is actually a 9399156283Srwatson# symlink; some systems play weird games with the mod time of symlinks 9400156283Srwatson# (eg FreeBSD returns the mod time of the symlink's containing 9401156283Srwatson# directory). 9402156283Srwatsonif ( 9403243750Srwatson am_has_slept=no 9404243750Srwatson for am_try in 1 2; do 9405243750Srwatson echo "timestamp, slept: $am_has_slept" > conftest.file 9406243750Srwatson set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 9407243750Srwatson if test "$[*]" = "X"; then 9408243750Srwatson # -L didn't work. 9409243750Srwatson set X `ls -t "$srcdir/configure" conftest.file` 9410243750Srwatson fi 9411243750Srwatson if test "$[*]" != "X $srcdir/configure conftest.file" \ 9412243750Srwatson && test "$[*]" != "X conftest.file $srcdir/configure"; then 9413156283Srwatson 9414243750Srwatson # If neither matched, then we have a broken ls. This can happen 9415243750Srwatson # if, for instance, CONFIG_SHELL is bash and it inherits a 9416243750Srwatson # broken ls alias from the environment. This has actually 9417243750Srwatson # happened. Such a system could not be considered "sane". 9418243750Srwatson AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 9419243750Srwatson alias in your environment]) 9420243750Srwatson fi 9421243750Srwatson if test "$[2]" = conftest.file || test $am_try -eq 2; then 9422243750Srwatson break 9423243750Srwatson fi 9424243750Srwatson # Just in case. 9425243750Srwatson sleep 1 9426243750Srwatson am_has_slept=yes 9427243750Srwatson done 9428156283Srwatson test "$[2]" = conftest.file 9429156283Srwatson ) 9430156283Srwatsonthen 9431156283Srwatson # Ok. 9432156283Srwatson : 9433156283Srwatsonelse 9434156283Srwatson AC_MSG_ERROR([newly created file is older than distributed files! 9435156283SrwatsonCheck your system clock]) 9436156283Srwatsonfi 9437243750SrwatsonAC_MSG_RESULT([yes]) 9438243750Srwatson# If we didn't sleep, we still need to ensure time stamps of config.status and 9439243750Srwatson# generated files are strictly newer. 9440243750Srwatsonam_sleep_pid= 9441243750Srwatsonif grep 'slept: no' conftest.file >/dev/null 2>&1; then 9442243750Srwatson ( sleep 1 ) & 9443243750Srwatson am_sleep_pid=$! 9444243750Srwatsonfi 9445243750SrwatsonAC_CONFIG_COMMANDS_PRE( 9446243750Srwatson [AC_MSG_CHECKING([that generated files are newer than configure]) 9447243750Srwatson if test -n "$am_sleep_pid"; then 9448243750Srwatson # Hide warnings about reused PIDs. 9449243750Srwatson wait $am_sleep_pid 2>/dev/null 9450243750Srwatson fi 9451243750Srwatson AC_MSG_RESULT([done])]) 9452243750Srwatsonrm -f conftest.file 9453243750Srwatson]) 9454156283Srwatson 9455243750Srwatson# Copyright (C) 2001-2012 Free Software Foundation, Inc. 9456156283Srwatson# 9457156283Srwatson# This file is free software; the Free Software Foundation 9458156283Srwatson# gives unlimited permission to copy and/or distribute it, 9459156283Srwatson# with or without modifications, as long as this notice is preserved. 9460156283Srwatson 9461243750Srwatson# serial 2 9462243750Srwatson 9463156283Srwatson# AM_PROG_INSTALL_STRIP 9464156283Srwatson# --------------------- 9465243750Srwatson# One issue with vendor 'install' (even GNU) is that you can't 9466156283Srwatson# specify the program used to strip binaries. This is especially 9467156283Srwatson# annoying in cross-compiling environments, where the build's strip 9468156283Srwatson# is unlikely to handle the host's binaries. 9469156283Srwatson# Fortunately install-sh will honor a STRIPPROG variable, so we 9470243750Srwatson# always use install-sh in "make install-strip", and initialize 9471156283Srwatson# STRIPPROG with the value of the STRIP variable (set by the user). 9472156283SrwatsonAC_DEFUN([AM_PROG_INSTALL_STRIP], 9473156283Srwatson[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9474243750Srwatson# Installed binaries are usually stripped using 'strip' when the user 9475243750Srwatson# run "make install-strip". However 'strip' might not be the right 9476156283Srwatson# tool to use in cross-compilation environments, therefore Automake 9477243750Srwatson# will honor the 'STRIP' environment variable to overrule this program. 9478243750Srwatsondnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 9479156283Srwatsonif test "$cross_compiling" != no; then 9480156283Srwatson AC_CHECK_TOOL([STRIP], [strip], :) 9481156283Srwatsonfi 9482173143SrwatsonINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9483156283SrwatsonAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9484156283Srwatson 9485243750Srwatson# Copyright (C) 2006-2012 Free Software Foundation, Inc. 9486173143Srwatson# 9487173143Srwatson# This file is free software; the Free Software Foundation 9488173143Srwatson# gives unlimited permission to copy and/or distribute it, 9489173143Srwatson# with or without modifications, as long as this notice is preserved. 9490173143Srwatson 9491243750Srwatson# serial 3 9492243750Srwatson 9493173143Srwatson# _AM_SUBST_NOTMAKE(VARIABLE) 9494173143Srwatson# --------------------------- 9495191273Srwatson# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9496173143Srwatson# This macro is traced by Automake. 9497173143SrwatsonAC_DEFUN([_AM_SUBST_NOTMAKE]) 9498173143Srwatson 9499243750Srwatson# AM_SUBST_NOTMAKE(VARIABLE) 9500243750Srwatson# -------------------------- 9501243750Srwatson# Public sister of _AM_SUBST_NOTMAKE. 9502243750SrwatsonAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9503243750Srwatson 9504156283Srwatson# Check how to create a tarball. -*- Autoconf -*- 9505156283Srwatson 9506243750Srwatson# Copyright (C) 2004-2012 Free Software Foundation, Inc. 9507156283Srwatson# 9508156283Srwatson# This file is free software; the Free Software Foundation 9509156283Srwatson# gives unlimited permission to copy and/or distribute it, 9510156283Srwatson# with or without modifications, as long as this notice is preserved. 9511156283Srwatson 9512243750Srwatson# serial 3 9513156283Srwatson 9514156283Srwatson# _AM_PROG_TAR(FORMAT) 9515156283Srwatson# -------------------- 9516156283Srwatson# Check how to create a tarball in format FORMAT. 9517243750Srwatson# FORMAT should be one of 'v7', 'ustar', or 'pax'. 9518156283Srwatson# 9519156283Srwatson# Substitute a variable $(am__tar) that is a command 9520156283Srwatson# writing to stdout a FORMAT-tarball containing the directory 9521156283Srwatson# $tardir. 9522156283Srwatson# tardir=directory && $(am__tar) > result.tar 9523156283Srwatson# 9524156283Srwatson# Substitute a variable $(am__untar) that extract such 9525156283Srwatson# a tarball read from stdin. 9526156283Srwatson# $(am__untar) < result.tar 9527156283SrwatsonAC_DEFUN([_AM_PROG_TAR], 9528243750Srwatson[# Always define AMTAR for backward compatibility. Yes, it's still used 9529243750Srwatson# in the wild :-( We should find a proper way to deprecate it ... 9530243750SrwatsonAC_SUBST([AMTAR], ['$${TAR-tar}']) 9531156283Srwatsonm4_if([$1], [v7], 9532243750Srwatson [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 9533156283Srwatson [m4_case([$1], [ustar],, [pax],, 9534156283Srwatson [m4_fatal([Unknown tar format])]) 9535156283SrwatsonAC_MSG_CHECKING([how to create a $1 tar archive]) 9536156283Srwatson# Loop over all known methods to create a tar archive until one works. 9537156283Srwatson_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9538156283Srwatson_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9539156283Srwatson# Do not fold the above two line into one, because Tru64 sh and 9540243750Srwatson# Solaris sh will not grok spaces in the rhs of '-'. 9541156283Srwatsonfor _am_tool in $_am_tools 9542156283Srwatsondo 9543156283Srwatson case $_am_tool in 9544156283Srwatson gnutar) 9545156283Srwatson for _am_tar in tar gnutar gtar; 9546156283Srwatson do 9547156283Srwatson AM_RUN_LOG([$_am_tar --version]) && break 9548156283Srwatson done 9549156283Srwatson am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9550156283Srwatson am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9551156283Srwatson am__untar="$_am_tar -xf -" 9552156283Srwatson ;; 9553156283Srwatson plaintar) 9554156283Srwatson # Must skip GNU tar: if it does not support --format= it doesn't create 9555156283Srwatson # ustar tarball either. 9556156283Srwatson (tar --version) >/dev/null 2>&1 && continue 9557156283Srwatson am__tar='tar chf - "$$tardir"' 9558156283Srwatson am__tar_='tar chf - "$tardir"' 9559156283Srwatson am__untar='tar xf -' 9560156283Srwatson ;; 9561156283Srwatson pax) 9562156283Srwatson am__tar='pax -L -x $1 -w "$$tardir"' 9563156283Srwatson am__tar_='pax -L -x $1 -w "$tardir"' 9564156283Srwatson am__untar='pax -r' 9565156283Srwatson ;; 9566156283Srwatson cpio) 9567156283Srwatson am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9568156283Srwatson am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9569156283Srwatson am__untar='cpio -i -H $1 -d' 9570156283Srwatson ;; 9571156283Srwatson none) 9572156283Srwatson am__tar=false 9573156283Srwatson am__tar_=false 9574156283Srwatson am__untar=false 9575156283Srwatson ;; 9576156283Srwatson esac 9577156283Srwatson 9578156283Srwatson # If the value was cached, stop now. We just wanted to have am__tar 9579156283Srwatson # and am__untar set. 9580156283Srwatson test -n "${am_cv_prog_tar_$1}" && break 9581156283Srwatson 9582156283Srwatson # tar/untar a dummy directory, and stop if the command works 9583156283Srwatson rm -rf conftest.dir 9584156283Srwatson mkdir conftest.dir 9585156283Srwatson echo GrepMe > conftest.dir/file 9586156283Srwatson AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 9587156283Srwatson rm -rf conftest.dir 9588156283Srwatson if test -s conftest.tar; then 9589156283Srwatson AM_RUN_LOG([$am__untar <conftest.tar]) 9590156283Srwatson grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 9591156283Srwatson fi 9592156283Srwatsondone 9593156283Srwatsonrm -rf conftest.dir 9594156283Srwatson 9595156283SrwatsonAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 9596156283SrwatsonAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 9597156283SrwatsonAC_SUBST([am__tar]) 9598156283SrwatsonAC_SUBST([am__untar]) 9599156283Srwatson]) # _AM_PROG_TAR 9600156283Srwatson 9601