aclocal.m4 revision 37eb1ca1
13e256790Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*- 2c43cc173Smrg 3c43cc173Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4c27c18e8Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5c43cc173Smrg# This file is free software; the Free Software Foundation 6c43cc173Smrg# gives unlimited permission to copy and/or distribute it, 7c43cc173Smrg# with or without modifications, as long as this notice is preserved. 8c43cc173Smrg 9c43cc173Smrg# This program is distributed in the hope that it will be useful, 10c43cc173Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11c43cc173Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12c43cc173Smrg# PARTICULAR PURPOSE. 13c43cc173Smrg 1421e67964Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1521e67964Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1637eb1ca1Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],, 1737eb1ca1Smrg[m4_warning([this file was generated for autoconf 2.66. 1821e67964SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1921e67964SmrgIf you have problems, you may need to regenerate the build system entirely. 2021e67964SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21c43cc173Smrg 2221e67964Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23c27c18e8Smrg# 24c27c18e8Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2537eb1ca1Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 2637eb1ca1Smrg# Inc. 27c27c18e8Smrg# Written by Gordon Matzigkeit, 1996 28c27c18e8Smrg# 29c27c18e8Smrg# This file is free software; the Free Software Foundation gives 30c27c18e8Smrg# unlimited permission to copy and/or distribute it, with or without 31c27c18e8Smrg# modifications, as long as this notice is preserved. 32c27c18e8Smrg 33c27c18e8Smrgm4_define([_LT_COPYING], [dnl 34c27c18e8Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 3537eb1ca1Smrg# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, 3637eb1ca1Smrg# Inc. 37c27c18e8Smrg# Written by Gordon Matzigkeit, 1996 38c27c18e8Smrg# 39c27c18e8Smrg# This file is part of GNU Libtool. 40c27c18e8Smrg# 41c27c18e8Smrg# GNU Libtool is free software; you can redistribute it and/or 42c27c18e8Smrg# modify it under the terms of the GNU General Public License as 43c27c18e8Smrg# published by the Free Software Foundation; either version 2 of 44c27c18e8Smrg# the License, or (at your option) any later version. 45c27c18e8Smrg# 46c27c18e8Smrg# As a special exception to the GNU General Public License, 47c27c18e8Smrg# if you distribute this file as part of a program or library that 48c27c18e8Smrg# is built using GNU Libtool, you may include this file under the 49c27c18e8Smrg# same distribution terms that you use for the rest of that program. 50c27c18e8Smrg# 51c27c18e8Smrg# GNU Libtool is distributed in the hope that it will be useful, 52c27c18e8Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 53c27c18e8Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 54c27c18e8Smrg# GNU General Public License for more details. 55c27c18e8Smrg# 56c27c18e8Smrg# You should have received a copy of the GNU General Public License 57c27c18e8Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 58c27c18e8Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 59c27c18e8Smrg# obtained by writing to the Free Software Foundation, Inc., 60c27c18e8Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 61c27c18e8Smrg]) 62c43cc173Smrg 6337eb1ca1Smrg# serial 57 LT_INIT 64c43cc173Smrg 65c43cc173Smrg 66c27c18e8Smrg# LT_PREREQ(VERSION) 67c27c18e8Smrg# ------------------ 68c27c18e8Smrg# Complain and exit if this libtool version is less that VERSION. 69c27c18e8Smrgm4_defun([LT_PREREQ], 70c27c18e8Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 71c27c18e8Smrg [m4_default([$3], 72c27c18e8Smrg [m4_fatal([Libtool version $1 or higher is required], 73c27c18e8Smrg 63)])], 74c27c18e8Smrg [$2])]) 75c43cc173Smrg 76c43cc173Smrg 77c27c18e8Smrg# _LT_CHECK_BUILDDIR 78c27c18e8Smrg# ------------------ 79c27c18e8Smrg# Complain if the absolute build directory name contains unusual characters 80c27c18e8Smrgm4_defun([_LT_CHECK_BUILDDIR], 81c27c18e8Smrg[case `pwd` in 82c27c18e8Smrg *\ * | *\ *) 83c27c18e8Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 84c27c18e8Smrgesac 85c27c18e8Smrg]) 86c27c18e8Smrg 87c27c18e8Smrg 88c27c18e8Smrg# LT_INIT([OPTIONS]) 89c27c18e8Smrg# ------------------ 90c27c18e8SmrgAC_DEFUN([LT_INIT], 91c27c18e8Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 9237eb1ca1SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 93c27c18e8SmrgAC_BEFORE([$0], [LT_LANG])dnl 94c27c18e8SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 95c27c18e8SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 96c27c18e8Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 97c27c18e8Smrg 98c27c18e8Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 99c27c18e8Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 100c27c18e8Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 101c27c18e8Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 102c27c18e8Smrgdnl unless we require an AC_DEFUNed macro: 103c27c18e8SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 104c27c18e8SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 105c27c18e8SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 106c27c18e8SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 107c27c18e8Smrgm4_require([_LT_PROG_LTMAIN])dnl 108c27c18e8Smrg 10937eb1ca1Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 11037eb1ca1Smrg 111c27c18e8Smrgdnl Parse OPTIONS 112c27c18e8Smrg_LT_SET_OPTIONS([$0], [$1]) 113c43cc173Smrg 11421e67964Smrg# This can be used to rebuild libtool when needed 115c27c18e8SmrgLIBTOOL_DEPS="$ltmain" 116c43cc173Smrg 11721e67964Smrg# Always use our own libtool. 11821e67964SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 11921e67964SmrgAC_SUBST(LIBTOOL)dnl 120c43cc173Smrg 121c27c18e8Smrg_LT_SETUP 122c43cc173Smrg 123c27c18e8Smrg# Only expand once: 124c27c18e8Smrgm4_define([LT_INIT]) 125c27c18e8Smrg])# LT_INIT 126c43cc173Smrg 127c27c18e8Smrg# Old names: 128c27c18e8SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 129c27c18e8SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 130c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 131c27c18e8Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 132c27c18e8Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 133c27c18e8Smrg 134c27c18e8Smrg 135c27c18e8Smrg# _LT_CC_BASENAME(CC) 136c27c18e8Smrg# ------------------- 137c27c18e8Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 138c27c18e8Smrgm4_defun([_LT_CC_BASENAME], 139c27c18e8Smrg[for cc_temp in $1""; do 140c27c18e8Smrg case $cc_temp in 141c27c18e8Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 142c27c18e8Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 143c27c18e8Smrg \-*) ;; 144c27c18e8Smrg *) break;; 145c27c18e8Smrg esac 146c27c18e8Smrgdone 14737eb1ca1Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 148c27c18e8Smrg]) 149c27c18e8Smrg 150c27c18e8Smrg 151c27c18e8Smrg# _LT_FILEUTILS_DEFAULTS 152c27c18e8Smrg# ---------------------- 153c27c18e8Smrg# It is okay to use these file commands and assume they have been set 154c27c18e8Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 155c27c18e8Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 156c27c18e8Smrg[: ${CP="cp -f"} 157c27c18e8Smrg: ${MV="mv -f"} 158c27c18e8Smrg: ${RM="rm -f"} 159c27c18e8Smrg])# _LT_FILEUTILS_DEFAULTS 160c27c18e8Smrg 161c27c18e8Smrg 162c27c18e8Smrg# _LT_SETUP 163c27c18e8Smrg# --------- 164c27c18e8Smrgm4_defun([_LT_SETUP], 165c27c18e8Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16621e67964SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 16737eb1ca1SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 16837eb1ca1SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 16937eb1ca1Smrg 170c27c18e8Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 171c27c18e8Smrg_LT_DECL([], [host], [0])dnl 172c27c18e8Smrg_LT_DECL([], [host_os], [0])dnl 173c27c18e8Smrgdnl 174c27c18e8Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 175c27c18e8Smrg_LT_DECL([], [build], [0])dnl 176c27c18e8Smrg_LT_DECL([], [build_os], [0])dnl 177c27c18e8Smrgdnl 17821e67964SmrgAC_REQUIRE([AC_PROG_CC])dnl 179c27c18e8SmrgAC_REQUIRE([LT_PATH_LD])dnl 180c27c18e8SmrgAC_REQUIRE([LT_PATH_NM])dnl 181c27c18e8Smrgdnl 18221e67964SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 183c27c18e8Smrgtest -z "$LN_S" && LN_S="ln -s" 184c27c18e8Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 185c27c18e8Smrgdnl 186c27c18e8SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 187c27c18e8Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 188c27c18e8Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 18921e67964Smrgdnl 190c27c18e8Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 191c27c18e8Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 192c27c18e8Smrgm4_require([_LT_CMD_RELOAD])dnl 193c27c18e8Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 194c27c18e8Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 195c27c18e8Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 196c27c18e8Smrg 197c27c18e8Smrg_LT_CONFIG_LIBTOOL_INIT([ 198c27c18e8Smrg# See if we are running on zsh, and set the options which allow our 199c27c18e8Smrg# commands through without removal of \ escapes INIT. 200c27c18e8Smrgif test -n "\${ZSH_VERSION+set}" ; then 201c27c18e8Smrg setopt NO_GLOB_SUBST 202c27c18e8Smrgfi 203c27c18e8Smrg]) 204c27c18e8Smrgif test -n "${ZSH_VERSION+set}" ; then 205c27c18e8Smrg setopt NO_GLOB_SUBST 206c27c18e8Smrgfi 207c27c18e8Smrg 208c27c18e8Smrg_LT_CHECK_OBJDIR 209c43cc173Smrg 210c27c18e8Smrgm4_require([_LT_TAG_COMPILER])dnl 211c43cc173Smrg 21221e67964Smrgcase $host_os in 21321e67964Smrgaix3*) 21421e67964Smrg # AIX sometimes has problems with the GCC collect2 program. For some 21521e67964Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 21621e67964Smrg # vanish in a puff of smoke. 21721e67964Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 21821e67964Smrg COLLECT_NAMES= 21921e67964Smrg export COLLECT_NAMES 22021e67964Smrg fi 22121e67964Smrg ;; 22221e67964Smrgesac 223c43cc173Smrg 22421e67964Smrg# Global variables: 225c27c18e8Smrgofile=libtool 22621e67964Smrgcan_build_shared=yes 227c43cc173Smrg 22821e67964Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 22921e67964Smrg# which needs '.lib'). 23021e67964Smrglibext=a 231c43cc173Smrg 232c27c18e8Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 233c43cc173Smrg 23421e67964Smrgold_CC="$CC" 23521e67964Smrgold_CFLAGS="$CFLAGS" 236c43cc173Smrg 23721e67964Smrg# Set sane defaults for various variables 23821e67964Smrgtest -z "$CC" && CC=cc 23921e67964Smrgtest -z "$LTCC" && LTCC=$CC 24021e67964Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 24121e67964Smrgtest -z "$LD" && LD=ld 24221e67964Smrgtest -z "$ac_objext" && ac_objext=o 243c43cc173Smrg 24421e67964Smrg_LT_CC_BASENAME([$compiler]) 245c43cc173Smrg 24621e67964Smrg# Only perform the check for file, if the check method requires it 247c27c18e8Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 24821e67964Smrgcase $deplibs_check_method in 24921e67964Smrgfile_magic*) 25021e67964Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 251c27c18e8Smrg _LT_PATH_MAGIC 25221e67964Smrg fi 25321e67964Smrg ;; 25421e67964Smrgesac 255c43cc173Smrg 256c27c18e8Smrg# Use C for the default configuration in the libtool script 257c27c18e8SmrgLT_SUPPORTED_TAG([CC]) 258c27c18e8Smrg_LT_LANG_C_CONFIG 259c27c18e8Smrg_LT_LANG_DEFAULT_CONFIG 260c27c18e8Smrg_LT_CONFIG_COMMANDS 261c27c18e8Smrg])# _LT_SETUP 262c43cc173Smrg 263c43cc173Smrg 26437eb1ca1Smrg# _LT_PREPARE_SED_QUOTE_VARS 26537eb1ca1Smrg# -------------------------- 26637eb1ca1Smrg# Define a few sed substitution that help us do robust quoting. 26737eb1ca1Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 26837eb1ca1Smrg[# Backslashify metacharacters that are still active within 26937eb1ca1Smrg# double-quoted strings. 27037eb1ca1Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 27137eb1ca1Smrg 27237eb1ca1Smrg# Same as above, but do not quote variable references. 27337eb1ca1Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 27437eb1ca1Smrg 27537eb1ca1Smrg# Sed substitution to delay expansion of an escaped shell variable in a 27637eb1ca1Smrg# double_quote_subst'ed string. 27737eb1ca1Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 27837eb1ca1Smrg 27937eb1ca1Smrg# Sed substitution to delay expansion of an escaped single quote. 28037eb1ca1Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 28137eb1ca1Smrg 28237eb1ca1Smrg# Sed substitution to avoid accidental globbing in evaled expressions 28337eb1ca1Smrgno_glob_subst='s/\*/\\\*/g' 28437eb1ca1Smrg]) 28537eb1ca1Smrg 286c27c18e8Smrg# _LT_PROG_LTMAIN 287c27c18e8Smrg# --------------- 288c27c18e8Smrg# Note that this code is called both from `configure', and `config.status' 289c27c18e8Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 290c27c18e8Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 291c27c18e8Smrg# so we pass a copy along to make sure it has a sensible value anyway. 292c27c18e8Smrgm4_defun([_LT_PROG_LTMAIN], 293c27c18e8Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 294c27c18e8Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 295c27c18e8Smrgltmain="$ac_aux_dir/ltmain.sh" 296c27c18e8Smrg])# _LT_PROG_LTMAIN 297c43cc173Smrg 298c43cc173Smrg 299c27c18e8Smrg 300c27c18e8Smrg# So that we can recreate a full libtool script including additional 301c27c18e8Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 302c27c18e8Smrg# in macros and then make a single call at the end using the `libtool' 303c27c18e8Smrg# label. 304c27c18e8Smrg 305c27c18e8Smrg 306c27c18e8Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 307c27c18e8Smrg# ---------------------------------------- 308c27c18e8Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 309c27c18e8Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 310c27c18e8Smrg[m4_ifval([$1], 311c27c18e8Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 312c27c18e8Smrg [$1 313c27c18e8Smrg])])]) 314c27c18e8Smrg 315c27c18e8Smrg# Initialize. 316c27c18e8Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 317c27c18e8Smrg 318c27c18e8Smrg 319c27c18e8Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 320c27c18e8Smrg# ------------------------------ 321c27c18e8Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 322c27c18e8Smrgm4_define([_LT_CONFIG_LIBTOOL], 323c27c18e8Smrg[m4_ifval([$1], 324c27c18e8Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 325c27c18e8Smrg [$1 326c27c18e8Smrg])])]) 327c27c18e8Smrg 328c27c18e8Smrg# Initialize. 329c27c18e8Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 330c27c18e8Smrg 331c27c18e8Smrg 332c27c18e8Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 333c27c18e8Smrg# ----------------------------------------------------- 334c27c18e8Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 335c27c18e8Smrg[_LT_CONFIG_LIBTOOL([$1]) 336c27c18e8Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 337c27c18e8Smrg]) 338c27c18e8Smrg 339c27c18e8Smrg 340c27c18e8Smrg# _LT_FORMAT_COMMENT([COMMENT]) 341c27c18e8Smrg# ----------------------------- 342c27c18e8Smrg# Add leading comment marks to the start of each line, and a trailing 343c27c18e8Smrg# full-stop to the whole comment if one is not present already. 344c27c18e8Smrgm4_define([_LT_FORMAT_COMMENT], 345c27c18e8Smrg[m4_ifval([$1], [ 346c27c18e8Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 347c27c18e8Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 348c27c18e8Smrg)]) 349c27c18e8Smrg 350c27c18e8Smrg 351c27c18e8Smrg 352c27c18e8Smrg 353c27c18e8Smrg 354c27c18e8Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 355c27c18e8Smrg# ------------------------------------------------------------------- 356c27c18e8Smrg# CONFIGNAME is the name given to the value in the libtool script. 357c27c18e8Smrg# VARNAME is the (base) name used in the configure script. 358c27c18e8Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 359c27c18e8Smrg# VARNAME. Any other value will be used directly. 360c27c18e8Smrgm4_define([_LT_DECL], 361c27c18e8Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 362c27c18e8Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 363c27c18e8Smrg [m4_ifval([$1], [$1], [$2])]) 364c27c18e8Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 365c27c18e8Smrg m4_ifval([$4], 366c27c18e8Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 367c27c18e8Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 368c27c18e8Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 369c27c18e8Smrg]) 370c27c18e8Smrg 371c27c18e8Smrg 372c27c18e8Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 373c27c18e8Smrg# -------------------------------------------------------- 374c27c18e8Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 375c27c18e8Smrg 376c27c18e8Smrg 377c27c18e8Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 378c27c18e8Smrg# ------------------------------------------------ 379c27c18e8Smrgm4_define([lt_decl_tag_varnames], 380c27c18e8Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 381c27c18e8Smrg 382c27c18e8Smrg 383c27c18e8Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 384c27c18e8Smrg# --------------------------------------------------------- 385c27c18e8Smrgm4_define([_lt_decl_filter], 386c27c18e8Smrg[m4_case([$#], 387c27c18e8Smrg [0], [m4_fatal([$0: too few arguments: $#])], 388c27c18e8Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 389c27c18e8Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 390c27c18e8Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 391c27c18e8Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 392c27c18e8Smrg]) 393c27c18e8Smrg 394c27c18e8Smrg 395c27c18e8Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 396c27c18e8Smrg# -------------------------------------------------- 397c27c18e8Smrgm4_define([lt_decl_quote_varnames], 398c27c18e8Smrg[_lt_decl_filter([value], [1], $@)]) 399c27c18e8Smrg 400c27c18e8Smrg 401c27c18e8Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 402c27c18e8Smrg# --------------------------------------------------- 403c27c18e8Smrgm4_define([lt_decl_dquote_varnames], 404c27c18e8Smrg[_lt_decl_filter([value], [2], $@)]) 405c27c18e8Smrg 406c27c18e8Smrg 407c27c18e8Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 408c27c18e8Smrg# --------------------------------------------------- 409c27c18e8Smrgm4_define([lt_decl_varnames_tagged], 410c27c18e8Smrg[m4_assert([$# <= 2])dnl 411c27c18e8Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 412c27c18e8Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 413c27c18e8Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 414c27c18e8Smrgm4_define([_lt_decl_varnames_tagged], 415c27c18e8Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 416c27c18e8Smrg 417c27c18e8Smrg 418c27c18e8Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 419c27c18e8Smrg# ------------------------------------------------ 420c27c18e8Smrgm4_define([lt_decl_all_varnames], 421c27c18e8Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 422c27c18e8Smrg m4_if([$2], [], 423c27c18e8Smrg m4_quote(lt_decl_varnames), 424c27c18e8Smrg m4_quote(m4_shift($@))))[]dnl 425c27c18e8Smrg]) 426c27c18e8Smrgm4_define([_lt_decl_all_varnames], 427c27c18e8Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 428c27c18e8Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 429c27c18e8Smrg]) 430c27c18e8Smrg 431c27c18e8Smrg 432c27c18e8Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 433c27c18e8Smrg# ------------------------------------ 434c27c18e8Smrg# Quote a variable value, and forward it to `config.status' so that its 435c27c18e8Smrg# declaration there will have the same value as in `configure'. VARNAME 436c27c18e8Smrg# must have a single quote delimited value for this to work. 437c27c18e8Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 43837eb1ca1Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 439c27c18e8Smrg 440c27c18e8Smrg 441c27c18e8Smrg# _LT_CONFIG_STATUS_DECLARATIONS 442c27c18e8Smrg# ------------------------------ 443c27c18e8Smrg# We delimit libtool config variables with single quotes, so when 444c27c18e8Smrg# we write them to config.status, we have to be sure to quote all 445c27c18e8Smrg# embedded single quotes properly. In configure, this macro expands 446c27c18e8Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 447c27c18e8Smrg# 44837eb1ca1Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 449c27c18e8Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 450c27c18e8Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 451c27c18e8Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 452c43cc173Smrg 453c43cc173Smrg 454c27c18e8Smrg# _LT_LIBTOOL_TAGS 455c27c18e8Smrg# ---------------- 456c27c18e8Smrg# Output comment and list of tags supported by the script 457c27c18e8Smrgm4_defun([_LT_LIBTOOL_TAGS], 458c27c18e8Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 459c27c18e8Smrgavailable_tags="_LT_TAGS"dnl 460c27c18e8Smrg]) 461c27c18e8Smrg 462c27c18e8Smrg 463c27c18e8Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 464c27c18e8Smrg# ----------------------------------- 465c27c18e8Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 466c27c18e8Smrg# expand to a commented shell variable setting: 467c27c18e8Smrg# 468c27c18e8Smrg# # Some comment about what VAR is for. 469c27c18e8Smrg# visible_name=$lt_internal_name 470c27c18e8Smrgm4_define([_LT_LIBTOOL_DECLARE], 471c27c18e8Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 472c27c18e8Smrg [description])))[]dnl 473c27c18e8Smrgm4_pushdef([_libtool_name], 474c27c18e8Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 475c27c18e8Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 476c27c18e8Smrg [0], [_libtool_name=[$]$1], 477c27c18e8Smrg [1], [_libtool_name=$lt_[]$1], 478c27c18e8Smrg [2], [_libtool_name=$lt_[]$1], 479c27c18e8Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 480c27c18e8Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 481c27c18e8Smrg]) 482c27c18e8Smrg 483c27c18e8Smrg 484c27c18e8Smrg# _LT_LIBTOOL_CONFIG_VARS 485c27c18e8Smrg# ----------------------- 486c27c18e8Smrg# Produce commented declarations of non-tagged libtool config variables 487c27c18e8Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 488c27c18e8Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 489c27c18e8Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 490c27c18e8Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 491c27c18e8Smrg[m4_foreach([_lt_var], 492c27c18e8Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 493c27c18e8Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 494c27c18e8Smrg 495c27c18e8Smrg 496c27c18e8Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 497c27c18e8Smrg# ------------------------- 498c27c18e8Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 499c27c18e8Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 500c27c18e8Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 501c27c18e8Smrg 502c27c18e8Smrg 503c27c18e8Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 504c27c18e8Smrg# ------------------------------ 505c27c18e8Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 506c27c18e8Smrg 507c27c18e8Smrg 508c27c18e8Smrg# _LT_CONFIG_COMMANDS 50921e67964Smrg# ------------------- 510c27c18e8Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 511c27c18e8Smrg# variables for single and double quote escaping we saved from calls 512c27c18e8Smrg# to _LT_DECL, we can put quote escaped variables declarations 513c27c18e8Smrg# into `config.status', and then the shell code to quote escape them in 514c27c18e8Smrg# for loops in `config.status'. Finally, any additional code accumulated 515c27c18e8Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 516c27c18e8Smrgm4_defun([_LT_CONFIG_COMMANDS], 517c27c18e8Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 518c27c18e8Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 519c27c18e8Smrg dnl instead of duplicating it all over again into config.status, 520c27c18e8Smrg dnl then we will have config.status run $CONFIG_LT later, so it 521c27c18e8Smrg dnl needs to know what name is stored there: 522c27c18e8Smrg [AC_CONFIG_COMMANDS([libtool], 523c27c18e8Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 524c27c18e8Smrg dnl If the libtool generation code is destined for config.status, 525c27c18e8Smrg dnl expand the accumulated commands and init code now: 526c27c18e8Smrg [AC_CONFIG_COMMANDS([libtool], 527c27c18e8Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 528c27c18e8Smrg])#_LT_CONFIG_COMMANDS 529c27c18e8Smrg 530c27c18e8Smrg 531c27c18e8Smrg# Initialize. 532c27c18e8Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 533c27c18e8Smrg[ 534c27c18e8Smrg 535c27c18e8Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 536c27c18e8Smrg# if CDPATH is set. 537c27c18e8Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 538c27c18e8Smrg 539c27c18e8Smrgsed_quote_subst='$sed_quote_subst' 540c27c18e8Smrgdouble_quote_subst='$double_quote_subst' 541c27c18e8Smrgdelay_variable_subst='$delay_variable_subst' 542c27c18e8Smrg_LT_CONFIG_STATUS_DECLARATIONS 543c27c18e8SmrgLTCC='$LTCC' 544c27c18e8SmrgLTCFLAGS='$LTCFLAGS' 545c27c18e8Smrgcompiler='$compiler_DEFAULT' 546c27c18e8Smrg 54737eb1ca1Smrg# A function that is used when there is no print builtin or printf. 54837eb1ca1Smrgfunc_fallback_echo () 54937eb1ca1Smrg{ 55037eb1ca1Smrg eval 'cat <<_LTECHO_EOF 55137eb1ca1Smrg\$[]1 55237eb1ca1Smrg_LTECHO_EOF' 55337eb1ca1Smrg} 55437eb1ca1Smrg 555c27c18e8Smrg# Quote evaled strings. 556c27c18e8Smrgfor var in lt_decl_all_varnames([[ \ 557c27c18e8Smrg]], lt_decl_quote_varnames); do 55837eb1ca1Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 559c27c18e8Smrg *[[\\\\\\\`\\"\\\$]]*) 56037eb1ca1Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 561c27c18e8Smrg ;; 562c27c18e8Smrg *) 563c27c18e8Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 564c27c18e8Smrg ;; 565c27c18e8Smrg esac 566c27c18e8Smrgdone 567c27c18e8Smrg 568c27c18e8Smrg# Double-quote double-evaled strings. 569c27c18e8Smrgfor var in lt_decl_all_varnames([[ \ 570c27c18e8Smrg]], lt_decl_dquote_varnames); do 57137eb1ca1Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 572c27c18e8Smrg *[[\\\\\\\`\\"\\\$]]*) 57337eb1ca1Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 574c27c18e8Smrg ;; 575c27c18e8Smrg *) 576c27c18e8Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 577c27c18e8Smrg ;; 578c27c18e8Smrg esac 579c27c18e8Smrgdone 580c27c18e8Smrg 581c27c18e8Smrg_LT_OUTPUT_LIBTOOL_INIT 582c27c18e8Smrg]) 583c27c18e8Smrg 58437eb1ca1Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 58537eb1ca1Smrg# ------------------------------------ 58637eb1ca1Smrg# Generate a child script FILE with all initialization necessary to 58737eb1ca1Smrg# reuse the environment learned by the parent script, and make the 58837eb1ca1Smrg# file executable. If COMMENT is supplied, it is inserted after the 58937eb1ca1Smrg# `#!' sequence but before initialization text begins. After this 59037eb1ca1Smrg# macro, additional text can be appended to FILE to form the body of 59137eb1ca1Smrg# the child script. The macro ends with non-zero status if the 59237eb1ca1Smrg# file could not be fully written (such as if the disk is full). 59337eb1ca1Smrgm4_ifdef([AS_INIT_GENERATED], 59437eb1ca1Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 59537eb1ca1Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 59637eb1ca1Smrg[m4_require([AS_PREPARE])]dnl 59737eb1ca1Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 59837eb1ca1Smrg[lt_write_fail=0 59937eb1ca1Smrgcat >$1 <<_ASEOF || lt_write_fail=1 60037eb1ca1Smrg#! $SHELL 60137eb1ca1Smrg# Generated by $as_me. 60237eb1ca1Smrg$2 60337eb1ca1SmrgSHELL=\${CONFIG_SHELL-$SHELL} 60437eb1ca1Smrgexport SHELL 60537eb1ca1Smrg_ASEOF 60637eb1ca1Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 60737eb1ca1SmrgAS_SHELL_SANITIZE 60837eb1ca1Smrg_AS_PREPARE 60937eb1ca1Smrgexec AS_MESSAGE_FD>&1 61037eb1ca1Smrg_ASEOF 61137eb1ca1Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 61237eb1ca1Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 613c27c18e8Smrg 614c27c18e8Smrg# LT_OUTPUT 615c27c18e8Smrg# --------- 616c27c18e8Smrg# This macro allows early generation of the libtool script (before 617c27c18e8Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 618c27c18e8Smrg# tests. 619c27c18e8SmrgAC_DEFUN([LT_OUTPUT], 620c27c18e8Smrg[: ${CONFIG_LT=./config.lt} 621c27c18e8SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 62237eb1ca1Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 62337eb1ca1Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 624c27c18e8Smrg 625c27c18e8Smrgcat >>"$CONFIG_LT" <<\_LTEOF 62637eb1ca1Smrglt_cl_silent=false 627c27c18e8Smrgexec AS_MESSAGE_LOG_FD>>config.log 628c27c18e8Smrg{ 629c27c18e8Smrg echo 630c27c18e8Smrg AS_BOX([Running $as_me.]) 631c27c18e8Smrg} >&AS_MESSAGE_LOG_FD 632c27c18e8Smrg 633c27c18e8Smrglt_cl_help="\ 634c27c18e8Smrg\`$as_me' creates a local libtool stub from the current configuration, 635c27c18e8Smrgfor use in further configure time tests before the real libtool is 636c27c18e8Smrggenerated. 637c27c18e8Smrg 638c27c18e8SmrgUsage: $[0] [[OPTIONS]] 639c27c18e8Smrg 640c27c18e8Smrg -h, --help print this help, then exit 641c27c18e8Smrg -V, --version print version number, then exit 642c27c18e8Smrg -q, --quiet do not print progress messages 643c27c18e8Smrg -d, --debug don't remove temporary files 644c27c18e8Smrg 645c27c18e8SmrgReport bugs to <bug-libtool@gnu.org>." 646c27c18e8Smrg 647c27c18e8Smrglt_cl_version="\ 648c27c18e8Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 649c27c18e8Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 650c27c18e8Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 651c27c18e8Smrg 65237eb1ca1SmrgCopyright (C) 2010 Free Software Foundation, Inc. 653c27c18e8SmrgThis config.lt script is free software; the Free Software Foundation 654c27c18e8Smrggives unlimited permision to copy, distribute and modify it." 655c27c18e8Smrg 656c27c18e8Smrgwhile test $[#] != 0 657c27c18e8Smrgdo 658c27c18e8Smrg case $[1] in 659c27c18e8Smrg --version | --v* | -V ) 660c27c18e8Smrg echo "$lt_cl_version"; exit 0 ;; 661c27c18e8Smrg --help | --h* | -h ) 662c27c18e8Smrg echo "$lt_cl_help"; exit 0 ;; 663c27c18e8Smrg --debug | --d* | -d ) 664c27c18e8Smrg debug=: ;; 665c27c18e8Smrg --quiet | --q* | --silent | --s* | -q ) 666c27c18e8Smrg lt_cl_silent=: ;; 667c27c18e8Smrg 668c27c18e8Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 669c27c18e8SmrgTry \`$[0] --help' for more information.]) ;; 670c27c18e8Smrg 671c27c18e8Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 672c27c18e8SmrgTry \`$[0] --help' for more information.]) ;; 673c27c18e8Smrg esac 674c27c18e8Smrg shift 675c27c18e8Smrgdone 676c27c18e8Smrg 677c27c18e8Smrgif $lt_cl_silent; then 678c27c18e8Smrg exec AS_MESSAGE_FD>/dev/null 679c27c18e8Smrgfi 680c27c18e8Smrg_LTEOF 681c27c18e8Smrg 682c27c18e8Smrgcat >>"$CONFIG_LT" <<_LTEOF 683c27c18e8Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 684c27c18e8Smrg_LTEOF 685c27c18e8Smrg 686c27c18e8Smrgcat >>"$CONFIG_LT" <<\_LTEOF 687c27c18e8SmrgAC_MSG_NOTICE([creating $ofile]) 688c27c18e8Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 689c27c18e8SmrgAS_EXIT(0) 690c27c18e8Smrg_LTEOF 691c27c18e8Smrgchmod +x "$CONFIG_LT" 692c27c18e8Smrg 693c27c18e8Smrg# configure is writing to config.log, but config.lt does its own redirection, 694c27c18e8Smrg# appending to config.log, which fails on DOS, as config.log is still kept 695c27c18e8Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 696c27c18e8Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 69737eb1ca1Smrglt_cl_success=: 69837eb1ca1Smrgtest "$silent" = yes && 69937eb1ca1Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 70037eb1ca1Smrgexec AS_MESSAGE_LOG_FD>/dev/null 70137eb1ca1Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 70237eb1ca1Smrgexec AS_MESSAGE_LOG_FD>>config.log 70337eb1ca1Smrg$lt_cl_success || AS_EXIT(1) 704c27c18e8Smrg])# LT_OUTPUT 705c27c18e8Smrg 706c27c18e8Smrg 707c27c18e8Smrg# _LT_CONFIG(TAG) 708c27c18e8Smrg# --------------- 709c27c18e8Smrg# If TAG is the built-in tag, create an initial libtool script with a 710c27c18e8Smrg# default configuration from the untagged config vars. Otherwise add code 711c27c18e8Smrg# to config.status for appending the configuration named by TAG from the 712c27c18e8Smrg# matching tagged config vars. 713c27c18e8Smrgm4_defun([_LT_CONFIG], 714c27c18e8Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 715c27c18e8Smrg_LT_CONFIG_SAVE_COMMANDS([ 716c27c18e8Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 717c27c18e8Smrg m4_if(_LT_TAG, [C], [ 718c27c18e8Smrg # See if we are running on zsh, and set the options which allow our 719c27c18e8Smrg # commands through without removal of \ escapes. 720c27c18e8Smrg if test -n "${ZSH_VERSION+set}" ; then 721c27c18e8Smrg setopt NO_GLOB_SUBST 722c27c18e8Smrg fi 723c27c18e8Smrg 724c27c18e8Smrg cfgfile="${ofile}T" 725c27c18e8Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 726c27c18e8Smrg $RM "$cfgfile" 727c27c18e8Smrg 728c27c18e8Smrg cat <<_LT_EOF >> "$cfgfile" 729c27c18e8Smrg#! $SHELL 730c27c18e8Smrg 731c27c18e8Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 732c27c18e8Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 733c27c18e8Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 734c27c18e8Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 735c27c18e8Smrg# 736c27c18e8Smrg_LT_COPYING 737c27c18e8Smrg_LT_LIBTOOL_TAGS 738c27c18e8Smrg 739c27c18e8Smrg# ### BEGIN LIBTOOL CONFIG 740c27c18e8Smrg_LT_LIBTOOL_CONFIG_VARS 741c27c18e8Smrg_LT_LIBTOOL_TAG_VARS 742c27c18e8Smrg# ### END LIBTOOL CONFIG 743c27c18e8Smrg 744c27c18e8Smrg_LT_EOF 745c27c18e8Smrg 746c27c18e8Smrg case $host_os in 747c27c18e8Smrg aix3*) 748c27c18e8Smrg cat <<\_LT_EOF >> "$cfgfile" 749c27c18e8Smrg# AIX sometimes has problems with the GCC collect2 program. For some 750c27c18e8Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 751c27c18e8Smrg# vanish in a puff of smoke. 752c27c18e8Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 753c27c18e8Smrg COLLECT_NAMES= 754c27c18e8Smrg export COLLECT_NAMES 755c27c18e8Smrgfi 756c27c18e8Smrg_LT_EOF 757c27c18e8Smrg ;; 758c27c18e8Smrg esac 759c27c18e8Smrg 760c27c18e8Smrg _LT_PROG_LTMAIN 761c27c18e8Smrg 762c27c18e8Smrg # We use sed instead of cat because bash on DJGPP gets confused if 763c27c18e8Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 764c27c18e8Smrg # text mode, it properly converts lines to CR/LF. This bash problem 765c27c18e8Smrg # is reportedly fixed, but why not run on old versions too? 766c27c18e8Smrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 767c27c18e8Smrg || (rm -f "$cfgfile"; exit 1) 768c27c18e8Smrg 769c27c18e8Smrg _LT_PROG_XSI_SHELLFNS 770c27c18e8Smrg 771c27c18e8Smrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 772c27c18e8Smrg || (rm -f "$cfgfile"; exit 1) 773c27c18e8Smrg 774c27c18e8Smrg mv -f "$cfgfile" "$ofile" || 775c27c18e8Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 776c27c18e8Smrg chmod +x "$ofile" 777c27c18e8Smrg], 778c27c18e8Smrg[cat <<_LT_EOF >> "$ofile" 779c27c18e8Smrg 780c27c18e8Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 781c27c18e8Smrgdnl in a comment (ie after a #). 782c27c18e8Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 783c27c18e8Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 784c27c18e8Smrg# ### END LIBTOOL TAG CONFIG: $1 785c27c18e8Smrg_LT_EOF 786c27c18e8Smrg])dnl /m4_if 787c27c18e8Smrg], 788c27c18e8Smrg[m4_if([$1], [], [ 789c27c18e8Smrg PACKAGE='$PACKAGE' 790c27c18e8Smrg VERSION='$VERSION' 791c27c18e8Smrg TIMESTAMP='$TIMESTAMP' 792c27c18e8Smrg RM='$RM' 793c27c18e8Smrg ofile='$ofile'], []) 794c27c18e8Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 795c27c18e8Smrg])# _LT_CONFIG 796c27c18e8Smrg 797c27c18e8Smrg 798c27c18e8Smrg# LT_SUPPORTED_TAG(TAG) 799c27c18e8Smrg# --------------------- 800c27c18e8Smrg# Trace this macro to discover what tags are supported by the libtool 801c27c18e8Smrg# --tag option, using: 802c27c18e8Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 803c27c18e8SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 804c27c18e8Smrg 805c27c18e8Smrg 806c27c18e8Smrg# C support is built-in for now 807c27c18e8Smrgm4_define([_LT_LANG_C_enabled], []) 808c27c18e8Smrgm4_define([_LT_TAGS], []) 809c27c18e8Smrg 810c27c18e8Smrg 811c27c18e8Smrg# LT_LANG(LANG) 812c27c18e8Smrg# ------------- 813c27c18e8Smrg# Enable libtool support for the given language if not already enabled. 814c27c18e8SmrgAC_DEFUN([LT_LANG], 815c27c18e8Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 816c27c18e8Smrgm4_case([$1], 817c27c18e8Smrg [C], [_LT_LANG(C)], 818c27c18e8Smrg [C++], [_LT_LANG(CXX)], 819c27c18e8Smrg [Java], [_LT_LANG(GCJ)], 820c27c18e8Smrg [Fortran 77], [_LT_LANG(F77)], 821c27c18e8Smrg [Fortran], [_LT_LANG(FC)], 822c27c18e8Smrg [Windows Resource], [_LT_LANG(RC)], 823c27c18e8Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 824c27c18e8Smrg [_LT_LANG($1)], 825c27c18e8Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 826c27c18e8Smrg])# LT_LANG 827c27c18e8Smrg 828c27c18e8Smrg 829c27c18e8Smrg# _LT_LANG(LANGNAME) 830c27c18e8Smrg# ------------------ 831c27c18e8Smrgm4_defun([_LT_LANG], 832c27c18e8Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 833c27c18e8Smrg [LT_SUPPORTED_TAG([$1])dnl 834c27c18e8Smrg m4_append([_LT_TAGS], [$1 ])dnl 835c27c18e8Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 836c27c18e8Smrg _LT_LANG_$1_CONFIG($1)])dnl 837c27c18e8Smrg])# _LT_LANG 838c27c18e8Smrg 839c27c18e8Smrg 840c27c18e8Smrg# _LT_LANG_DEFAULT_CONFIG 841c27c18e8Smrg# ----------------------- 842c27c18e8Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 843c27c18e8Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 844c27c18e8Smrg [LT_LANG(CXX)], 845c27c18e8Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 846c27c18e8Smrg 847c27c18e8SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 848c27c18e8Smrg [LT_LANG(F77)], 849c27c18e8Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 850c27c18e8Smrg 851c27c18e8SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 852c27c18e8Smrg [LT_LANG(FC)], 853c27c18e8Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 854c27c18e8Smrg 855c27c18e8Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 856c27c18e8Smrgdnl pulling things in needlessly. 857c27c18e8SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 858c27c18e8Smrg [LT_LANG(GCJ)], 859c27c18e8Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 860c27c18e8Smrg [LT_LANG(GCJ)], 861c27c18e8Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 862c27c18e8Smrg [LT_LANG(GCJ)], 863c27c18e8Smrg [m4_ifdef([AC_PROG_GCJ], 864c27c18e8Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 865c27c18e8Smrg m4_ifdef([A][M_PROG_GCJ], 866c27c18e8Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 867c27c18e8Smrg m4_ifdef([LT_PROG_GCJ], 868c27c18e8Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 869c27c18e8Smrg 870c27c18e8SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 871c27c18e8Smrg [LT_LANG(RC)], 872c27c18e8Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 873c27c18e8Smrg])# _LT_LANG_DEFAULT_CONFIG 874c27c18e8Smrg 875c27c18e8Smrg# Obsolete macros: 876c27c18e8SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 877c27c18e8SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 878c27c18e8SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 879c27c18e8SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 88037eb1ca1SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 881c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 882c27c18e8Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 883c27c18e8Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 884c27c18e8Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 885c27c18e8Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 88637eb1ca1Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 887c27c18e8Smrg 888c27c18e8Smrg 889c27c18e8Smrg# _LT_TAG_COMPILER 890c27c18e8Smrg# ---------------- 891c27c18e8Smrgm4_defun([_LT_TAG_COMPILER], 89221e67964Smrg[AC_REQUIRE([AC_PROG_CC])dnl 893c43cc173Smrg 894c27c18e8Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 895c27c18e8Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 896c27c18e8Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 897c27c18e8Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 898c27c18e8Smrg 89921e67964Smrg# If no C compiler was specified, use CC. 90021e67964SmrgLTCC=${LTCC-"$CC"} 901c43cc173Smrg 90221e67964Smrg# If no C compiler flags were specified, use CFLAGS. 90321e67964SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 904c43cc173Smrg 90521e67964Smrg# Allow CC to be a program name with arguments. 90621e67964Smrgcompiler=$CC 907c27c18e8Smrg])# _LT_TAG_COMPILER 908c43cc173Smrg 909c43cc173Smrg 91021e67964Smrg# _LT_COMPILER_BOILERPLATE 91121e67964Smrg# ------------------------ 91221e67964Smrg# Check for compiler boilerplate output or warnings with 91321e67964Smrg# the simple compiler test code. 914c27c18e8Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 915c27c18e8Smrg[m4_require([_LT_DECL_SED])dnl 91621e67964Smrgac_outfile=conftest.$ac_objext 91721e67964Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 91821e67964Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 91921e67964Smrg_lt_compiler_boilerplate=`cat conftest.err` 920c27c18e8Smrg$RM conftest* 92121e67964Smrg])# _LT_COMPILER_BOILERPLATE 922c43cc173Smrg 923c43cc173Smrg 92421e67964Smrg# _LT_LINKER_BOILERPLATE 92521e67964Smrg# ---------------------- 92621e67964Smrg# Check for linker boilerplate output or warnings with 92721e67964Smrg# the simple link test code. 928c27c18e8Smrgm4_defun([_LT_LINKER_BOILERPLATE], 929c27c18e8Smrg[m4_require([_LT_DECL_SED])dnl 93021e67964Smrgac_outfile=conftest.$ac_objext 93121e67964Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 93221e67964Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 93321e67964Smrg_lt_linker_boilerplate=`cat conftest.err` 934c27c18e8Smrg$RM -r conftest* 93521e67964Smrg])# _LT_LINKER_BOILERPLATE 936c43cc173Smrg 93721e67964Smrg# _LT_REQUIRED_DARWIN_CHECKS 938c27c18e8Smrg# ------------------------- 939c27c18e8Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 94021e67964Smrg case $host_os in 94121e67964Smrg rhapsody* | darwin*) 94221e67964Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 94321e67964Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 944c27c18e8Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 945c27c18e8Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 946c27c18e8Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 947c27c18e8Smrg _LT_DECL([], [DSYMUTIL], [1], 948c27c18e8Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 949c27c18e8Smrg _LT_DECL([], [NMEDIT], [1], 950c27c18e8Smrg [Tool to change global to local symbols on Mac OS X]) 951c27c18e8Smrg _LT_DECL([], [LIPO], [1], 952c27c18e8Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 953c27c18e8Smrg _LT_DECL([], [OTOOL], [1], 954c27c18e8Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 955c27c18e8Smrg _LT_DECL([], [OTOOL64], [1], 956c27c18e8Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 95721e67964Smrg 95821e67964Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 95921e67964Smrg [lt_cv_apple_cc_single_mod=no 96021e67964Smrg if test -z "${LT_MULTI_MODULE}"; then 961c27c18e8Smrg # By default we will add the -single_module flag. You can override 962c27c18e8Smrg # by either setting the environment variable LT_MULTI_MODULE 963c27c18e8Smrg # non-empty at configure time, or by adding -multi_module to the 964c27c18e8Smrg # link flags. 965c27c18e8Smrg rm -rf libconftest.dylib* 966c27c18e8Smrg echo "int foo(void){return 1;}" > conftest.c 967c27c18e8Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 968c27c18e8Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 969c27c18e8Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 970c27c18e8Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 971c27c18e8Smrg _lt_result=$? 972c27c18e8Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 973c27c18e8Smrg lt_cv_apple_cc_single_mod=yes 974c27c18e8Smrg else 975c27c18e8Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 976c27c18e8Smrg fi 977c27c18e8Smrg rm -rf libconftest.dylib* 978c27c18e8Smrg rm -f conftest.* 97921e67964Smrg fi]) 98021e67964Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 98121e67964Smrg [lt_cv_ld_exported_symbols_list], 98221e67964Smrg [lt_cv_ld_exported_symbols_list=no 98321e67964Smrg save_LDFLAGS=$LDFLAGS 98421e67964Smrg echo "_main" > conftest.sym 98521e67964Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 98621e67964Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 987c27c18e8Smrg [lt_cv_ld_exported_symbols_list=yes], 988c27c18e8Smrg [lt_cv_ld_exported_symbols_list=no]) 989c27c18e8Smrg LDFLAGS="$save_LDFLAGS" 99021e67964Smrg ]) 99137eb1ca1Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 99237eb1ca1Smrg [lt_cv_ld_force_load=no 99337eb1ca1Smrg cat > conftest.c << _LT_EOF 99437eb1ca1Smrgint forced_loaded() { return 2;} 99537eb1ca1Smrg_LT_EOF 99637eb1ca1Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 99737eb1ca1Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 99837eb1ca1Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 99937eb1ca1Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 100037eb1ca1Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 100137eb1ca1Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 100237eb1ca1Smrg cat > conftest.c << _LT_EOF 100337eb1ca1Smrgint main() { return 0;} 100437eb1ca1Smrg_LT_EOF 100537eb1ca1Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 100637eb1ca1Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 100737eb1ca1Smrg _lt_result=$? 100837eb1ca1Smrg if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then 100937eb1ca1Smrg lt_cv_ld_force_load=yes 101037eb1ca1Smrg else 101137eb1ca1Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 101237eb1ca1Smrg fi 101337eb1ca1Smrg rm -f conftest.err libconftest.a conftest conftest.c 101437eb1ca1Smrg rm -rf conftest.dSYM 101537eb1ca1Smrg ]) 101621e67964Smrg case $host_os in 1017c27c18e8Smrg rhapsody* | darwin1.[[012]]) 101821e67964Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 101921e67964Smrg darwin1.*) 1020c27c18e8Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1021c27c18e8Smrg darwin*) # darwin 5.x on 102221e67964Smrg # if running on 10.5 or later, the deployment target defaults 102321e67964Smrg # to the OS version, if on x86, and 10.4, the deployment 102421e67964Smrg # target defaults to 10.4. Don't you love it? 102521e67964Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1026c27c18e8Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1027c27c18e8Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1028c27c18e8Smrg 10.[[012]]*) 1029c27c18e8Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1030c27c18e8Smrg 10.*) 1031c27c18e8Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 103221e67964Smrg esac 103321e67964Smrg ;; 103421e67964Smrg esac 103521e67964Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 103621e67964Smrg _lt_dar_single_mod='$single_module' 103721e67964Smrg fi 103821e67964Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 103921e67964Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 104021e67964Smrg else 1041c27c18e8Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 104221e67964Smrg fi 104337eb1ca1Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1044c27c18e8Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 104521e67964Smrg else 104621e67964Smrg _lt_dsymutil= 104721e67964Smrg fi 104821e67964Smrg ;; 104921e67964Smrg esac 105021e67964Smrg]) 1051c43cc173Smrg 1052c27c18e8Smrg 1053c27c18e8Smrg# _LT_DARWIN_LINKER_FEATURES 1054c27c18e8Smrg# -------------------------- 1055c27c18e8Smrg# Checks for linker and compiler features on darwin 1056c27c18e8Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1057c27c18e8Smrg[ 1058c27c18e8Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1059c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1060c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1061c27c18e8Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1062c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 106337eb1ca1Smrg if test "$lt_cv_ld_force_load" = "yes"; then 106437eb1ca1Smrg _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\"`' 106537eb1ca1Smrg else 106637eb1ca1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 106737eb1ca1Smrg fi 1068c27c18e8Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1069c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1070c27c18e8Smrg case $cc_basename in 1071c27c18e8Smrg ifort*) _lt_dar_can_shared=yes ;; 1072c27c18e8Smrg *) _lt_dar_can_shared=$GCC ;; 1073c27c18e8Smrg esac 1074c27c18e8Smrg if test "$_lt_dar_can_shared" = "yes"; then 107537eb1ca1Smrg output_verbose_link_cmd=func_echo_all 1076c27c18e8Smrg _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}" 1077c27c18e8Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1078c27c18e8Smrg _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}" 1079c27c18e8Smrg _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}" 1080c27c18e8Smrg m4_if([$1], [CXX], 1081c27c18e8Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1082c27c18e8Smrg _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}" 1083c27c18e8Smrg _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}" 1084c27c18e8Smrg fi 1085c27c18e8Smrg],[]) 1086c27c18e8Smrg else 1087c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1088c27c18e8Smrg fi 1089c27c18e8Smrg]) 1090c27c18e8Smrg 1091c27c18e8Smrg# _LT_SYS_MODULE_PATH_AIX 1092c27c18e8Smrg# ----------------------- 109321e67964Smrg# Links a minimal program and checks the executable 109421e67964Smrg# for the system default hardcoded library path. In most cases, 109521e67964Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 109621e67964Smrg# the location of the communication and MPI libs are included too. 109721e67964Smrg# If we don't find anything, use the default library path according 109821e67964Smrg# to the aix ld manual. 1099c27c18e8Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1100c27c18e8Smrg[m4_require([_LT_DECL_SED])dnl 110121e67964SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 110221e67964Smrglt_aix_libpath_sed=' 110321e67964Smrg /Import File Strings/,/^$/ { 110421e67964Smrg /^0/ { 110521e67964Smrg s/^0 *\(.*\)$/\1/ 110621e67964Smrg p 110721e67964Smrg } 110821e67964Smrg }' 110921e67964Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 111021e67964Smrg# Check for a 64-bit object if we didn't find anything. 111121e67964Smrgif test -z "$aix_libpath"; then 111221e67964Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 111321e67964Smrgfi],[]) 111421e67964Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1115c27c18e8Smrg])# _LT_SYS_MODULE_PATH_AIX 1116c43cc173Smrg 1117c43cc173Smrg 1118c27c18e8Smrg# _LT_SHELL_INIT(ARG) 1119c27c18e8Smrg# ------------------- 1120c27c18e8Smrgm4_define([_LT_SHELL_INIT], 112137eb1ca1Smrg[m4_divert_text([M4SH-INIT], [$1 112237eb1ca1Smrg])])# _LT_SHELL_INIT 112337eb1ca1Smrg 1124c43cc173Smrg 1125c43cc173Smrg 1126c27c18e8Smrg# _LT_PROG_ECHO_BACKSLASH 1127c27c18e8Smrg# ----------------------- 112837eb1ca1Smrg# Find how we can fake an echo command that does not interpret backslash. 112937eb1ca1Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 113037eb1ca1Smrg# of the generated configure script which will find a shell with a builtin 113137eb1ca1Smrg# printf (which we can use as an echo command). 1132c27c18e8Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 113337eb1ca1Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 113437eb1ca1SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 113537eb1ca1SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 113637eb1ca1Smrg 113737eb1ca1SmrgAC_MSG_CHECKING([how to print strings]) 113837eb1ca1Smrg# Test print first, because it will be a builtin if present. 113937eb1ca1Smrgif test "X`print -r -- -n 2>/dev/null`" = X-n && \ 114037eb1ca1Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 114137eb1ca1Smrg ECHO='print -r --' 114237eb1ca1Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 114337eb1ca1Smrg ECHO='printf %s\n' 1144c43cc173Smrgelse 114537eb1ca1Smrg # Use this function as a fallback that always works. 114637eb1ca1Smrg func_fallback_echo () 114737eb1ca1Smrg { 114837eb1ca1Smrg eval 'cat <<_LTECHO_EOF 114937eb1ca1Smrg$[]1 115037eb1ca1Smrg_LTECHO_EOF' 115137eb1ca1Smrg } 115237eb1ca1Smrg ECHO='func_fallback_echo' 115321e67964Smrgfi 1154c43cc173Smrg 115537eb1ca1Smrg# func_echo_all arg... 115637eb1ca1Smrg# Invoke $ECHO with all args, space-separated. 115737eb1ca1Smrgfunc_echo_all () 115837eb1ca1Smrg{ 115937eb1ca1Smrg $ECHO "$*" 116037eb1ca1Smrg} 1161c43cc173Smrg 116237eb1ca1Smrgcase "$ECHO" in 116337eb1ca1Smrg printf*) AC_MSG_RESULT([printf]) ;; 116437eb1ca1Smrg print*) AC_MSG_RESULT([print -r]) ;; 116537eb1ca1Smrg *) AC_MSG_RESULT([cat]) ;; 116637eb1ca1Smrgesac 1167c43cc173Smrg 116837eb1ca1Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 116937eb1ca1Smrg[_AS_DETECT_SUGGESTED([ 117037eb1ca1Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 117137eb1ca1Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 117237eb1ca1Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 117337eb1ca1Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 117437eb1ca1Smrg PATH=/empty FPATH=/empty; export PATH FPATH 117537eb1ca1Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 117637eb1ca1Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1177c43cc173Smrg 1178c27c18e8Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 117937eb1ca1Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1180c27c18e8Smrg])# _LT_PROG_ECHO_BACKSLASH 1181c43cc173Smrg 1182c43cc173Smrg 1183c27c18e8Smrg# _LT_ENABLE_LOCK 1184c27c18e8Smrg# --------------- 1185c27c18e8Smrgm4_defun([_LT_ENABLE_LOCK], 118621e67964Smrg[AC_ARG_ENABLE([libtool-lock], 1187c27c18e8Smrg [AS_HELP_STRING([--disable-libtool-lock], 1188c27c18e8Smrg [avoid locking (might break parallel builds)])]) 118921e67964Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1190c43cc173Smrg 119121e67964Smrg# Some flags need to be propagated to the compiler or linker for good 119221e67964Smrg# libtool support. 119321e67964Smrgcase $host in 119421e67964Smrgia64-*-hpux*) 119521e67964Smrg # Find out which ABI we are using. 119621e67964Smrg echo 'int i;' > conftest.$ac_ext 119721e67964Smrg if AC_TRY_EVAL(ac_compile); then 119821e67964Smrg case `/usr/bin/file conftest.$ac_objext` in 1199c27c18e8Smrg *ELF-32*) 1200c27c18e8Smrg HPUX_IA64_MODE="32" 1201c27c18e8Smrg ;; 1202c27c18e8Smrg *ELF-64*) 1203c27c18e8Smrg HPUX_IA64_MODE="64" 1204c27c18e8Smrg ;; 120521e67964Smrg esac 120621e67964Smrg fi 120721e67964Smrg rm -rf conftest* 120821e67964Smrg ;; 120921e67964Smrg*-*-irix6*) 121021e67964Smrg # Find out which ABI we are using. 121137eb1ca1Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 121221e67964Smrg if AC_TRY_EVAL(ac_compile); then 1213c27c18e8Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1214c27c18e8Smrg case `/usr/bin/file conftest.$ac_objext` in 1215c27c18e8Smrg *32-bit*) 1216c27c18e8Smrg LD="${LD-ld} -melf32bsmip" 1217c27c18e8Smrg ;; 1218c27c18e8Smrg *N32*) 1219c27c18e8Smrg LD="${LD-ld} -melf32bmipn32" 1220c27c18e8Smrg ;; 1221c27c18e8Smrg *64-bit*) 1222c27c18e8Smrg LD="${LD-ld} -melf64bmip" 1223c27c18e8Smrg ;; 1224c27c18e8Smrg esac 1225c27c18e8Smrg else 1226c27c18e8Smrg case `/usr/bin/file conftest.$ac_objext` in 1227c27c18e8Smrg *32-bit*) 1228c27c18e8Smrg LD="${LD-ld} -32" 1229c27c18e8Smrg ;; 1230c27c18e8Smrg *N32*) 1231c27c18e8Smrg LD="${LD-ld} -n32" 1232c27c18e8Smrg ;; 1233c27c18e8Smrg *64-bit*) 1234c27c18e8Smrg LD="${LD-ld} -64" 1235c27c18e8Smrg ;; 1236c27c18e8Smrg esac 1237c27c18e8Smrg fi 123821e67964Smrg fi 123921e67964Smrg rm -rf conftest* 124021e67964Smrg ;; 1241c43cc173Smrg 124221e67964Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1243c27c18e8Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 124421e67964Smrg # Find out which ABI we are using. 124521e67964Smrg echo 'int i;' > conftest.$ac_ext 124621e67964Smrg if AC_TRY_EVAL(ac_compile); then 124721e67964Smrg case `/usr/bin/file conftest.o` in 1248c27c18e8Smrg *32-bit*) 1249c27c18e8Smrg case $host in 1250c27c18e8Smrg x86_64-*kfreebsd*-gnu) 1251c27c18e8Smrg LD="${LD-ld} -m elf_i386_fbsd" 1252c27c18e8Smrg ;; 1253c27c18e8Smrg x86_64-*linux*) 1254c27c18e8Smrg LD="${LD-ld} -m elf_i386" 1255c27c18e8Smrg ;; 1256c27c18e8Smrg ppc64-*linux*|powerpc64-*linux*) 1257c27c18e8Smrg LD="${LD-ld} -m elf32ppclinux" 1258c27c18e8Smrg ;; 1259c27c18e8Smrg s390x-*linux*) 1260c27c18e8Smrg LD="${LD-ld} -m elf_s390" 1261c27c18e8Smrg ;; 1262c27c18e8Smrg sparc64-*linux*) 1263c27c18e8Smrg LD="${LD-ld} -m elf32_sparc" 1264c27c18e8Smrg ;; 1265c27c18e8Smrg esac 1266c27c18e8Smrg ;; 1267c27c18e8Smrg *64-bit*) 1268c27c18e8Smrg case $host in 1269c27c18e8Smrg x86_64-*kfreebsd*-gnu) 1270c27c18e8Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1271c27c18e8Smrg ;; 1272c27c18e8Smrg x86_64-*linux*) 1273c27c18e8Smrg LD="${LD-ld} -m elf_x86_64" 1274c27c18e8Smrg ;; 1275c27c18e8Smrg ppc*-*linux*|powerpc*-*linux*) 1276c27c18e8Smrg LD="${LD-ld} -m elf64ppc" 1277c27c18e8Smrg ;; 1278c27c18e8Smrg s390*-*linux*|s390*-*tpf*) 1279c27c18e8Smrg LD="${LD-ld} -m elf64_s390" 1280c27c18e8Smrg ;; 1281c27c18e8Smrg sparc*-*linux*) 1282c27c18e8Smrg LD="${LD-ld} -m elf64_sparc" 1283c27c18e8Smrg ;; 1284c27c18e8Smrg esac 1285c27c18e8Smrg ;; 128621e67964Smrg esac 128721e67964Smrg fi 128821e67964Smrg rm -rf conftest* 128921e67964Smrg ;; 1290c43cc173Smrg 129121e67964Smrg*-*-sco3.2v5*) 129221e67964Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 129321e67964Smrg SAVE_CFLAGS="$CFLAGS" 129421e67964Smrg CFLAGS="$CFLAGS -belf" 129521e67964Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 129621e67964Smrg [AC_LANG_PUSH(C) 1297c27c18e8Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 129821e67964Smrg AC_LANG_POP]) 129921e67964Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 130021e67964Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 130121e67964Smrg CFLAGS="$SAVE_CFLAGS" 130221e67964Smrg fi 130321e67964Smrg ;; 130421e67964Smrgsparc*-*solaris*) 130521e67964Smrg # Find out which ABI we are using. 130621e67964Smrg echo 'int i;' > conftest.$ac_ext 130721e67964Smrg if AC_TRY_EVAL(ac_compile); then 130821e67964Smrg case `/usr/bin/file conftest.o` in 130921e67964Smrg *64-bit*) 131021e67964Smrg case $lt_cv_prog_gnu_ld in 131121e67964Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 131221e67964Smrg *) 1313c27c18e8Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 131421e67964Smrg LD="${LD-ld} -64" 131521e67964Smrg fi 131621e67964Smrg ;; 131721e67964Smrg esac 131821e67964Smrg ;; 131921e67964Smrg esac 132021e67964Smrg fi 132121e67964Smrg rm -rf conftest* 132221e67964Smrg ;; 132321e67964Smrgesac 1324c43cc173Smrg 132521e67964Smrgneed_locks="$enable_libtool_lock" 1326c27c18e8Smrg])# _LT_ENABLE_LOCK 1327c27c18e8Smrg 1328c27c18e8Smrg 1329c27c18e8Smrg# _LT_CMD_OLD_ARCHIVE 1330c27c18e8Smrg# ------------------- 1331c27c18e8Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1332c27c18e8Smrg[AC_CHECK_TOOL(AR, ar, false) 1333c27c18e8Smrgtest -z "$AR" && AR=ar 1334c27c18e8Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1335c27c18e8Smrg_LT_DECL([], [AR], [1], [The archiver]) 1336c27c18e8Smrg_LT_DECL([], [AR_FLAGS], [1]) 1337c27c18e8Smrg 1338c27c18e8SmrgAC_CHECK_TOOL(STRIP, strip, :) 1339c27c18e8Smrgtest -z "$STRIP" && STRIP=: 1340c27c18e8Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1341c27c18e8Smrg 1342c27c18e8SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1343c27c18e8Smrgtest -z "$RANLIB" && RANLIB=: 1344c27c18e8Smrg_LT_DECL([], [RANLIB], [1], 1345c27c18e8Smrg [Commands used to install an old-style archive]) 1346c27c18e8Smrg 1347c27c18e8Smrg# Determine commands to create old-style static archives. 1348c27c18e8Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1349c27c18e8Smrgold_postinstall_cmds='chmod 644 $oldlib' 1350c27c18e8Smrgold_postuninstall_cmds= 1351c43cc173Smrg 1352c27c18e8Smrgif test -n "$RANLIB"; then 1353c27c18e8Smrg case $host_os in 1354c27c18e8Smrg openbsd*) 1355c27c18e8Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1356c27c18e8Smrg ;; 1357c27c18e8Smrg *) 1358c27c18e8Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1359c27c18e8Smrg ;; 1360c27c18e8Smrg esac 1361c27c18e8Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1362c27c18e8Smrgfi 136337eb1ca1Smrg 136437eb1ca1Smrgcase $host_os in 136537eb1ca1Smrg darwin*) 136637eb1ca1Smrg lock_old_archive_extraction=yes ;; 136737eb1ca1Smrg *) 136837eb1ca1Smrg lock_old_archive_extraction=no ;; 136937eb1ca1Smrgesac 1370c27c18e8Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1371c27c18e8Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1372c27c18e8Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1373c27c18e8Smrg [Commands used to build an old-style archive]) 137437eb1ca1Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 137537eb1ca1Smrg [Whether to use a lock for old archive extraction]) 1376c27c18e8Smrg])# _LT_CMD_OLD_ARCHIVE 1377c43cc173Smrg 1378c43cc173Smrg 1379c27c18e8Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 138021e67964Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 138121e67964Smrg# ---------------------------------------------------------------- 138221e67964Smrg# Check whether the given compiler option works 1383c27c18e8SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1384c27c18e8Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1385c27c18e8Smrgm4_require([_LT_DECL_SED])dnl 138621e67964SmrgAC_CACHE_CHECK([$1], [$2], 138721e67964Smrg [$2=no 1388c27c18e8Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 138921e67964Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 139021e67964Smrg lt_compiler_flag="$3" 139121e67964Smrg # Insert the option either (1) after the last *FLAGS variable, or 139221e67964Smrg # (2) before a word containing "conftest.", or (3) at the end. 139321e67964Smrg # Note that $ac_compile itself does not contain backslashes and begins 139421e67964Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 139521e67964Smrg # The option is referenced via a variable to avoid confusing sed. 139621e67964Smrg lt_compile=`echo "$ac_compile" | $SED \ 139721e67964Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 139821e67964Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 139921e67964Smrg -e 's:$: $lt_compiler_flag:'` 140037eb1ca1Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 140121e67964Smrg (eval "$lt_compile" 2>conftest.err) 140221e67964Smrg ac_status=$? 140321e67964Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 140437eb1ca1Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 140521e67964Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 140621e67964Smrg # The compiler can only warn and ignore the option if not recognized 140721e67964Smrg # So say no if there are warnings other than the usual output. 140837eb1ca1Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 140921e67964Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 141021e67964Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 141121e67964Smrg $2=yes 141221e67964Smrg fi 141321e67964Smrg fi 1414c27c18e8Smrg $RM conftest* 141521e67964Smrg]) 1416c43cc173Smrg 141721e67964Smrgif test x"[$]$2" = xyes; then 1418c27c18e8Smrg m4_if([$5], , :, [$5]) 141921e67964Smrgelse 1420c27c18e8Smrg m4_if([$6], , :, [$6]) 142121e67964Smrgfi 1422c27c18e8Smrg])# _LT_COMPILER_OPTION 1423c43cc173Smrg 1424c27c18e8Smrg# Old name: 1425c27c18e8SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1426c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 1427c27c18e8Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1428c43cc173Smrg 1429c27c18e8Smrg 1430c27c18e8Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1431c27c18e8Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1432c27c18e8Smrg# ---------------------------------------------------- 1433c27c18e8Smrg# Check whether the given linker option works 1434c27c18e8SmrgAC_DEFUN([_LT_LINKER_OPTION], 1435c27c18e8Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1436c27c18e8Smrgm4_require([_LT_DECL_SED])dnl 143721e67964SmrgAC_CACHE_CHECK([$1], [$2], 143821e67964Smrg [$2=no 143921e67964Smrg save_LDFLAGS="$LDFLAGS" 144021e67964Smrg LDFLAGS="$LDFLAGS $3" 144121e67964Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 144221e67964Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 144321e67964Smrg # The linker can only warn and ignore the option if not recognized 144421e67964Smrg # So say no if there are warnings 144521e67964Smrg if test -s conftest.err; then 144621e67964Smrg # Append any errors to the config.log. 144721e67964Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 144837eb1ca1Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 144921e67964Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 145021e67964Smrg if diff conftest.exp conftest.er2 >/dev/null; then 145121e67964Smrg $2=yes 145221e67964Smrg fi 145321e67964Smrg else 145421e67964Smrg $2=yes 145521e67964Smrg fi 145621e67964Smrg fi 1457c27c18e8Smrg $RM -r conftest* 145821e67964Smrg LDFLAGS="$save_LDFLAGS" 145921e67964Smrg]) 1460c43cc173Smrg 146121e67964Smrgif test x"[$]$2" = xyes; then 1462c27c18e8Smrg m4_if([$4], , :, [$4]) 1463c43cc173Smrgelse 1464c27c18e8Smrg m4_if([$5], , :, [$5]) 1465c43cc173Smrgfi 1466c27c18e8Smrg])# _LT_LINKER_OPTION 1467c43cc173Smrg 1468c27c18e8Smrg# Old name: 1469c27c18e8SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1470c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 1471c27c18e8Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1472c43cc173Smrg 1473c27c18e8Smrg 1474c27c18e8Smrg# LT_CMD_MAX_LEN 1475c27c18e8Smrg#--------------- 1476c27c18e8SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1477c27c18e8Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1478c27c18e8Smrg# find the maximum length of command line arguments 147921e67964SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 148021e67964SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 148121e67964Smrg i=0 148221e67964Smrg teststring="ABCD" 1483c43cc173Smrg 148421e67964Smrg case $build_os in 148521e67964Smrg msdosdjgpp*) 148621e67964Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 148721e67964Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 148821e67964Smrg # during glob expansion). Even if it were fixed, the result of this 148921e67964Smrg # check would be larger than it should be. 149021e67964Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 149121e67964Smrg ;; 1492c43cc173Smrg 149321e67964Smrg gnu*) 149421e67964Smrg # Under GNU Hurd, this test is not required because there is 149521e67964Smrg # no limit to the length of command line arguments. 149621e67964Smrg # Libtool will interpret -1 as no limit whatsoever 149721e67964Smrg lt_cv_sys_max_cmd_len=-1; 149821e67964Smrg ;; 1499c43cc173Smrg 1500c27c18e8Smrg cygwin* | mingw* | cegcc*) 150121e67964Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 150221e67964Smrg # about 5 minutes as the teststring grows exponentially. 150321e67964Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 150421e67964Smrg # you end up with a "frozen" computer, even though with patience 150521e67964Smrg # the test eventually succeeds (with a max line length of 256k). 150621e67964Smrg # Instead, let's just punt: use the minimum linelength reported by 150721e67964Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 150821e67964Smrg lt_cv_sys_max_cmd_len=8192; 150921e67964Smrg ;; 1510c43cc173Smrg 151137eb1ca1Smrg mint*) 151237eb1ca1Smrg # On MiNT this can take a long time and run out of memory. 151337eb1ca1Smrg lt_cv_sys_max_cmd_len=8192; 151437eb1ca1Smrg ;; 151537eb1ca1Smrg 151621e67964Smrg amigaos*) 151721e67964Smrg # On AmigaOS with pdksh, this test takes hours, literally. 151821e67964Smrg # So we just punt and use a minimum line length of 8192. 151921e67964Smrg lt_cv_sys_max_cmd_len=8192; 152021e67964Smrg ;; 1521c43cc173Smrg 152221e67964Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 152321e67964Smrg # This has been around since 386BSD, at least. Likely further. 152421e67964Smrg if test -x /sbin/sysctl; then 152521e67964Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 152621e67964Smrg elif test -x /usr/sbin/sysctl; then 152721e67964Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 152821e67964Smrg else 152921e67964Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 153021e67964Smrg fi 153121e67964Smrg # And add a safety zone 153221e67964Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 153321e67964Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 153421e67964Smrg ;; 1535c43cc173Smrg 153621e67964Smrg interix*) 153721e67964Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 153821e67964Smrg lt_cv_sys_max_cmd_len=196608 153921e67964Smrg ;; 1540c43cc173Smrg 154121e67964Smrg osf*) 154221e67964Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 154321e67964Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 154421e67964Smrg # nice to cause kernel panics so lets avoid the loop below. 154521e67964Smrg # First set a reasonable default. 154621e67964Smrg lt_cv_sys_max_cmd_len=16384 154721e67964Smrg # 154821e67964Smrg if test -x /sbin/sysconfig; then 154921e67964Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 155021e67964Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 155121e67964Smrg esac 155221e67964Smrg fi 155321e67964Smrg ;; 155421e67964Smrg sco3.2v5*) 155521e67964Smrg lt_cv_sys_max_cmd_len=102400 155621e67964Smrg ;; 155721e67964Smrg sysv5* | sco5v6* | sysv4.2uw2*) 155821e67964Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 155921e67964Smrg if test -n "$kargmax"; then 1560c27c18e8Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 156121e67964Smrg else 156221e67964Smrg lt_cv_sys_max_cmd_len=32768 156321e67964Smrg fi 156421e67964Smrg ;; 156521e67964Smrg *) 156621e67964Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 156721e67964Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 156821e67964Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 156921e67964Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 157021e67964Smrg else 1571c27c18e8Smrg # Make teststring a little bigger before we do anything with it. 1572c27c18e8Smrg # a 1K string should be a reasonable start. 1573c27c18e8Smrg for i in 1 2 3 4 5 6 7 8 ; do 1574c27c18e8Smrg teststring=$teststring$teststring 1575c27c18e8Smrg done 157621e67964Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1577c27c18e8Smrg # If test is not a shell built-in, we'll probably end up computing a 1578c27c18e8Smrg # maximum length that is only half of the actual maximum length, but 1579c27c18e8Smrg # we can't tell. 158037eb1ca1Smrg while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ 158137eb1ca1Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 158221e67964Smrg test $i != 17 # 1/2 MB should be enough 158321e67964Smrg do 158421e67964Smrg i=`expr $i + 1` 158521e67964Smrg teststring=$teststring$teststring 158621e67964Smrg done 1587c27c18e8Smrg # Only check the string length outside the loop. 1588c27c18e8Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 158921e67964Smrg teststring= 1590c27c18e8Smrg # Add a significant safety factor because C++ compilers can tack on 1591c27c18e8Smrg # massive amounts of additional arguments before passing them to the 1592c27c18e8Smrg # linker. It appears as though 1/2 is a usable value. 159321e67964Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 159421e67964Smrg fi 159521e67964Smrg ;; 159621e67964Smrg esac 159721e67964Smrg]) 159821e67964Smrgif test -n $lt_cv_sys_max_cmd_len ; then 159921e67964Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 160021e67964Smrgelse 160121e67964Smrg AC_MSG_RESULT(none) 160221e67964Smrgfi 1603c27c18e8Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1604c27c18e8Smrg_LT_DECL([], [max_cmd_len], [0], 1605c27c18e8Smrg [What is the maximum length of a command?]) 1606c27c18e8Smrg])# LT_CMD_MAX_LEN 1607c43cc173Smrg 1608c27c18e8Smrg# Old name: 1609c27c18e8SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1610c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 1611c27c18e8Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1612c43cc173Smrg 1613c27c18e8Smrg 1614c27c18e8Smrg# _LT_HEADER_DLFCN 1615c27c18e8Smrg# ---------------- 1616c27c18e8Smrgm4_defun([_LT_HEADER_DLFCN], 1617c27c18e8Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1618c27c18e8Smrg])# _LT_HEADER_DLFCN 1619c43cc173Smrg 1620c43cc173Smrg 1621c27c18e8Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1622c27c18e8Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1623c27c18e8Smrg# ---------------------------------------------------------------- 1624c27c18e8Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1625c27c18e8Smrg[m4_require([_LT_HEADER_DLFCN])dnl 162621e67964Smrgif test "$cross_compiling" = yes; then : 162721e67964Smrg [$4] 162821e67964Smrgelse 162921e67964Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 163021e67964Smrg lt_status=$lt_dlunknown 1631c27c18e8Smrg cat > conftest.$ac_ext <<_LT_EOF 163237eb1ca1Smrg[#line $LINENO "configure" 163321e67964Smrg#include "confdefs.h" 1634c43cc173Smrg 163521e67964Smrg#if HAVE_DLFCN_H 163621e67964Smrg#include <dlfcn.h> 163721e67964Smrg#endif 1638c43cc173Smrg 163921e67964Smrg#include <stdio.h> 1640c43cc173Smrg 164121e67964Smrg#ifdef RTLD_GLOBAL 164221e67964Smrg# define LT_DLGLOBAL RTLD_GLOBAL 164321e67964Smrg#else 164421e67964Smrg# ifdef DL_GLOBAL 164521e67964Smrg# define LT_DLGLOBAL DL_GLOBAL 164621e67964Smrg# else 164721e67964Smrg# define LT_DLGLOBAL 0 164821e67964Smrg# endif 164921e67964Smrg#endif 1650c43cc173Smrg 165121e67964Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 165221e67964Smrg find out it does not work in some platform. */ 165321e67964Smrg#ifndef LT_DLLAZY_OR_NOW 165421e67964Smrg# ifdef RTLD_LAZY 165521e67964Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 165621e67964Smrg# else 165721e67964Smrg# ifdef DL_LAZY 165821e67964Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 165921e67964Smrg# else 166021e67964Smrg# ifdef RTLD_NOW 166121e67964Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 166221e67964Smrg# else 166321e67964Smrg# ifdef DL_NOW 166421e67964Smrg# define LT_DLLAZY_OR_NOW DL_NOW 166521e67964Smrg# else 166621e67964Smrg# define LT_DLLAZY_OR_NOW 0 166721e67964Smrg# endif 166821e67964Smrg# endif 166921e67964Smrg# endif 167021e67964Smrg# endif 167121e67964Smrg#endif 167221e67964Smrg 167337eb1ca1Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 167437eb1ca1Smrg correspondingly for the symbols needed. */ 167537eb1ca1Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 167637eb1ca1Smrgvoid fnord () __attribute__((visibility("default"))); 167737eb1ca1Smrg#endif 167837eb1ca1Smrg 167937eb1ca1Smrgvoid fnord () { int i=42; } 168021e67964Smrgint main () 168121e67964Smrg{ 168221e67964Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 168321e67964Smrg int status = $lt_dlunknown; 168421e67964Smrg 168521e67964Smrg if (self) 168621e67964Smrg { 168721e67964Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 168837eb1ca1Smrg else 168937eb1ca1Smrg { 169037eb1ca1Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 169137eb1ca1Smrg else puts (dlerror ()); 169237eb1ca1Smrg } 169321e67964Smrg /* dlclose (self); */ 169421e67964Smrg } 1695c43cc173Smrg else 169621e67964Smrg puts (dlerror ()); 169721e67964Smrg 1698c27c18e8Smrg return status; 169921e67964Smrg}] 1700c27c18e8Smrg_LT_EOF 170121e67964Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 170221e67964Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 170321e67964Smrg lt_status=$? 170421e67964Smrg case x$lt_status in 170521e67964Smrg x$lt_dlno_uscore) $1 ;; 170621e67964Smrg x$lt_dlneed_uscore) $2 ;; 170721e67964Smrg x$lt_dlunknown|x*) $3 ;; 170821e67964Smrg esac 170921e67964Smrg else : 171021e67964Smrg # compilation failed 171121e67964Smrg $3 1712c43cc173Smrg fi 1713c43cc173Smrgfi 171421e67964Smrgrm -fr conftest* 1715c27c18e8Smrg])# _LT_TRY_DLOPEN_SELF 1716c43cc173Smrg 1717c43cc173Smrg 1718c27c18e8Smrg# LT_SYS_DLOPEN_SELF 1719c27c18e8Smrg# ------------------ 1720c27c18e8SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1721c27c18e8Smrg[m4_require([_LT_HEADER_DLFCN])dnl 172221e67964Smrgif test "x$enable_dlopen" != xyes; then 172321e67964Smrg enable_dlopen=unknown 172421e67964Smrg enable_dlopen_self=unknown 172521e67964Smrg enable_dlopen_self_static=unknown 172621e67964Smrgelse 172721e67964Smrg lt_cv_dlopen=no 172821e67964Smrg lt_cv_dlopen_libs= 1729c43cc173Smrg 173021e67964Smrg case $host_os in 173121e67964Smrg beos*) 173221e67964Smrg lt_cv_dlopen="load_add_on" 173321e67964Smrg lt_cv_dlopen_libs= 173421e67964Smrg lt_cv_dlopen_self=yes 173521e67964Smrg ;; 1736c43cc173Smrg 1737c27c18e8Smrg mingw* | pw32* | cegcc*) 173821e67964Smrg lt_cv_dlopen="LoadLibrary" 173921e67964Smrg lt_cv_dlopen_libs= 1740c27c18e8Smrg ;; 1741c43cc173Smrg 174221e67964Smrg cygwin*) 174321e67964Smrg lt_cv_dlopen="dlopen" 174421e67964Smrg lt_cv_dlopen_libs= 1745c27c18e8Smrg ;; 1746c43cc173Smrg 174721e67964Smrg darwin*) 174821e67964Smrg # if libdl is installed we need to link against it 174921e67964Smrg AC_CHECK_LIB([dl], [dlopen], 175021e67964Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 175121e67964Smrg lt_cv_dlopen="dyld" 175221e67964Smrg lt_cv_dlopen_libs= 175321e67964Smrg lt_cv_dlopen_self=yes 175421e67964Smrg ]) 1755c27c18e8Smrg ;; 175621e67964Smrg 175721e67964Smrg *) 175821e67964Smrg AC_CHECK_FUNC([shl_load], 175921e67964Smrg [lt_cv_dlopen="shl_load"], 176021e67964Smrg [AC_CHECK_LIB([dld], [shl_load], 176121e67964Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 176221e67964Smrg [AC_CHECK_FUNC([dlopen], 176321e67964Smrg [lt_cv_dlopen="dlopen"], 176421e67964Smrg [AC_CHECK_LIB([dl], [dlopen], 176521e67964Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 176621e67964Smrg [AC_CHECK_LIB([svld], [dlopen], 176721e67964Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 176821e67964Smrg [AC_CHECK_LIB([dld], [dld_link], 176921e67964Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 177021e67964Smrg ]) 177121e67964Smrg ]) 177221e67964Smrg ]) 177321e67964Smrg ]) 177421e67964Smrg ]) 177521e67964Smrg ;; 1776c43cc173Smrg esac 1777c43cc173Smrg 177821e67964Smrg if test "x$lt_cv_dlopen" != xno; then 177921e67964Smrg enable_dlopen=yes 178021e67964Smrg else 178121e67964Smrg enable_dlopen=no 178221e67964Smrg fi 1783c43cc173Smrg 178421e67964Smrg case $lt_cv_dlopen in 178521e67964Smrg dlopen) 178621e67964Smrg save_CPPFLAGS="$CPPFLAGS" 178721e67964Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1788c43cc173Smrg 178921e67964Smrg save_LDFLAGS="$LDFLAGS" 179021e67964Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1791c43cc173Smrg 179221e67964Smrg save_LIBS="$LIBS" 179321e67964Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1794c43cc173Smrg 179521e67964Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 179621e67964Smrg lt_cv_dlopen_self, [dnl 1797c27c18e8Smrg _LT_TRY_DLOPEN_SELF( 179821e67964Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 179921e67964Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 180021e67964Smrg ]) 1801c43cc173Smrg 180221e67964Smrg if test "x$lt_cv_dlopen_self" = xyes; then 180321e67964Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 180421e67964Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1805c27c18e8Smrg lt_cv_dlopen_self_static, [dnl 1806c27c18e8Smrg _LT_TRY_DLOPEN_SELF( 180721e67964Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 180821e67964Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 180921e67964Smrg ]) 181021e67964Smrg fi 1811c43cc173Smrg 181221e67964Smrg CPPFLAGS="$save_CPPFLAGS" 181321e67964Smrg LDFLAGS="$save_LDFLAGS" 181421e67964Smrg LIBS="$save_LIBS" 181521e67964Smrg ;; 181621e67964Smrg esac 1817c43cc173Smrg 181821e67964Smrg case $lt_cv_dlopen_self in 181921e67964Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 182021e67964Smrg *) enable_dlopen_self=unknown ;; 182121e67964Smrg esac 1822c43cc173Smrg 182321e67964Smrg case $lt_cv_dlopen_self_static in 182421e67964Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 182521e67964Smrg *) enable_dlopen_self_static=unknown ;; 182621e67964Smrg esac 182721e67964Smrgfi 1828c27c18e8Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1829c27c18e8Smrg [Whether dlopen is supported]) 1830c27c18e8Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1831c27c18e8Smrg [Whether dlopen of programs is supported]) 1832c27c18e8Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1833c27c18e8Smrg [Whether dlopen of statically linked programs is supported]) 1834c27c18e8Smrg])# LT_SYS_DLOPEN_SELF 1835c43cc173Smrg 1836c27c18e8Smrg# Old name: 1837c27c18e8SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1838c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 1839c27c18e8Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1840c43cc173Smrg 1841c27c18e8Smrg 1842c27c18e8Smrg# _LT_COMPILER_C_O([TAGNAME]) 1843c27c18e8Smrg# --------------------------- 1844c27c18e8Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 1845c27c18e8Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1846c27c18e8Smrgm4_defun([_LT_COMPILER_C_O], 1847c27c18e8Smrg[m4_require([_LT_DECL_SED])dnl 1848c27c18e8Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1849c27c18e8Smrgm4_require([_LT_TAG_COMPILER])dnl 185021e67964SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1851c27c18e8Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1852c27c18e8Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1853c27c18e8Smrg $RM -r conftest 2>/dev/null 185421e67964Smrg mkdir conftest 185521e67964Smrg cd conftest 185621e67964Smrg mkdir out 185721e67964Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1858c43cc173Smrg 185921e67964Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 186021e67964Smrg # Insert the option either (1) after the last *FLAGS variable, or 186121e67964Smrg # (2) before a word containing "conftest.", or (3) at the end. 186221e67964Smrg # Note that $ac_compile itself does not contain backslashes and begins 186321e67964Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 186421e67964Smrg lt_compile=`echo "$ac_compile" | $SED \ 186521e67964Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 186621e67964Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 186721e67964Smrg -e 's:$: $lt_compiler_flag:'` 186837eb1ca1Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 186921e67964Smrg (eval "$lt_compile" 2>out/conftest.err) 187021e67964Smrg ac_status=$? 187121e67964Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 187237eb1ca1Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 187321e67964Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 187421e67964Smrg then 187521e67964Smrg # The compiler can only warn and ignore the option if not recognized 187621e67964Smrg # So say no if there are warnings 187737eb1ca1Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 187821e67964Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 187921e67964Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1880c27c18e8Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 188121e67964Smrg fi 188221e67964Smrg fi 188321e67964Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1884c27c18e8Smrg $RM conftest* 188521e67964Smrg # SGI C++ compiler will create directory out/ii_files/ for 188621e67964Smrg # template instantiation 1887c27c18e8Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1888c27c18e8Smrg $RM out/* && rmdir out 188921e67964Smrg cd .. 1890c27c18e8Smrg $RM -r conftest 1891c27c18e8Smrg $RM conftest* 189221e67964Smrg]) 1893c27c18e8Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1894c27c18e8Smrg [Does compiler simultaneously support -c and -o options?]) 1895c27c18e8Smrg])# _LT_COMPILER_C_O 1896c43cc173Smrg 1897c43cc173Smrg 1898c27c18e8Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1899c27c18e8Smrg# ---------------------------------- 190021e67964Smrg# Check to see if we can do hard links to lock some files if needed 1901c27c18e8Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1902c27c18e8Smrg[m4_require([_LT_ENABLE_LOCK])dnl 1903c27c18e8Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1904c27c18e8Smrg_LT_COMPILER_C_O([$1]) 1905c43cc173Smrg 190621e67964Smrghard_links="nottested" 1907c27c18e8Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 190821e67964Smrg # do not overwrite the value of need_locks provided by the user 190921e67964Smrg AC_MSG_CHECKING([if we can lock with hard links]) 191021e67964Smrg hard_links=yes 1911c27c18e8Smrg $RM conftest* 191221e67964Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 191321e67964Smrg touch conftest.a 191421e67964Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 191521e67964Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 191621e67964Smrg AC_MSG_RESULT([$hard_links]) 191721e67964Smrg if test "$hard_links" = no; then 191821e67964Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 191921e67964Smrg need_locks=warn 192021e67964Smrg fi 192121e67964Smrgelse 192221e67964Smrg need_locks=no 192321e67964Smrgfi 1924c27c18e8Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 1925c27c18e8Smrg])# _LT_COMPILER_FILE_LOCKS 1926c43cc173Smrg 1927c43cc173Smrg 1928c27c18e8Smrg# _LT_CHECK_OBJDIR 1929c27c18e8Smrg# ---------------- 1930c27c18e8Smrgm4_defun([_LT_CHECK_OBJDIR], 193121e67964Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 193221e67964Smrg[rm -f .libs 2>/dev/null 193321e67964Smrgmkdir .libs 2>/dev/null 193421e67964Smrgif test -d .libs; then 193521e67964Smrg lt_cv_objdir=.libs 193621e67964Smrgelse 193721e67964Smrg # MS-DOS does not allow filenames that begin with a dot. 193821e67964Smrg lt_cv_objdir=_libs 193921e67964Smrgfi 194021e67964Smrgrmdir .libs 2>/dev/null]) 194121e67964Smrgobjdir=$lt_cv_objdir 1942c27c18e8Smrg_LT_DECL([], [objdir], [0], 1943c27c18e8Smrg [The name of the directory that contains temporary libtool files])dnl 1944c27c18e8Smrgm4_pattern_allow([LT_OBJDIR])dnl 1945c27c18e8SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 1946c27c18e8Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 1947c27c18e8Smrg])# _LT_CHECK_OBJDIR 1948c43cc173Smrg 1949c43cc173Smrg 1950c27c18e8Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 1951c27c18e8Smrg# -------------------------------------- 195221e67964Smrg# Check hardcoding attributes. 1953c27c18e8Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 195421e67964Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1955c27c18e8Smrg_LT_TAGVAR(hardcode_action, $1)= 1956c27c18e8Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 1957c27c18e8Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 1958c27c18e8Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1959c43cc173Smrg 1960c27c18e8Smrg # We can hardcode non-existent directories. 1961c27c18e8Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 196221e67964Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 196321e67964Smrg # have to relink, otherwise we might link with an installed library 196421e67964Smrg # when we should be linking with a yet-to-be-installed one 1965c27c18e8Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1966c27c18e8Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 196721e67964Smrg # Linking always hardcodes the temporary library directory. 1968c27c18e8Smrg _LT_TAGVAR(hardcode_action, $1)=relink 196921e67964Smrg else 197021e67964Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1971c27c18e8Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 1972c43cc173Smrg fi 197321e67964Smrgelse 197421e67964Smrg # We cannot hardcode anything, or else we can only hardcode existing 197521e67964Smrg # directories. 1976c27c18e8Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 197721e67964Smrgfi 1978c27c18e8SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 1979c43cc173Smrg 1980c27c18e8Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 1981c27c18e8Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 198221e67964Smrg # Fast installation is not supported 198321e67964Smrg enable_fast_install=no 198421e67964Smrgelif test "$shlibpath_overrides_runpath" = yes || 198521e67964Smrg test "$enable_shared" = no; then 198621e67964Smrg # Fast installation is not necessary 198721e67964Smrg enable_fast_install=needless 198821e67964Smrgfi 1989c27c18e8Smrg_LT_TAGDECL([], [hardcode_action], [0], 1990c27c18e8Smrg [How to hardcode a shared library path into an executable]) 1991c27c18e8Smrg])# _LT_LINKER_HARDCODE_LIBPATH 1992c43cc173Smrg 1993c43cc173Smrg 1994c27c18e8Smrg# _LT_CMD_STRIPLIB 1995c27c18e8Smrg# ---------------- 1996c27c18e8Smrgm4_defun([_LT_CMD_STRIPLIB], 1997c27c18e8Smrg[m4_require([_LT_DECL_EGREP]) 1998c27c18e8Smrgstriplib= 199921e67964Smrgold_striplib= 200021e67964SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2001c27c18e8Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 200221e67964Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 200321e67964Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 200421e67964Smrg AC_MSG_RESULT([yes]) 200521e67964Smrgelse 200621e67964Smrg# FIXME - insert some real tests, host_os isn't really good enough 2007c43cc173Smrg case $host_os in 2008c27c18e8Smrg darwin*) 2009c27c18e8Smrg if test -n "$STRIP" ; then 2010c27c18e8Smrg striplib="$STRIP -x" 2011c27c18e8Smrg old_striplib="$STRIP -S" 2012c27c18e8Smrg AC_MSG_RESULT([yes]) 2013c27c18e8Smrg else 2014c27c18e8Smrg AC_MSG_RESULT([no]) 2015c27c18e8Smrg fi 2016c27c18e8Smrg ;; 2017c27c18e8Smrg *) 2018c27c18e8Smrg AC_MSG_RESULT([no]) 2019c43cc173Smrg ;; 2020c43cc173Smrg esac 2021c43cc173Smrgfi 2022c27c18e8Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2023c27c18e8Smrg_LT_DECL([], [striplib], [1]) 2024c27c18e8Smrg])# _LT_CMD_STRIPLIB 2025c43cc173Smrg 2026c43cc173Smrg 2027c27c18e8Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 202821e67964Smrg# ----------------------------- 202921e67964Smrg# PORTME Fill in your ld.so characteristics 2030c27c18e8Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2031c27c18e8Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2032c27c18e8Smrgm4_require([_LT_DECL_EGREP])dnl 2033c27c18e8Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2034c27c18e8Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2035c27c18e8Smrgm4_require([_LT_DECL_SED])dnl 203637eb1ca1Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 203721e67964SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2038c27c18e8Smrgm4_if([$1], 2039c27c18e8Smrg [], [ 204021e67964Smrgif test "$GCC" = yes; then 204121e67964Smrg case $host_os in 204221e67964Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 204321e67964Smrg *) lt_awk_arg="/^libraries:/" ;; 204421e67964Smrg esac 204537eb1ca1Smrg case $host_os in 204637eb1ca1Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 204737eb1ca1Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 204837eb1ca1Smrg esac 204937eb1ca1Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 205037eb1ca1Smrg case $lt_search_path_spec in 205137eb1ca1Smrg *\;*) 205221e67964Smrg # if the path contains ";" then we assume it to be the separator 205321e67964Smrg # otherwise default to the standard path separator (i.e. ":") - it is 205421e67964Smrg # assumed that no part of a normal pathname contains ";" but that should 205521e67964Smrg # okay in the real world where ";" in dirpaths is itself problematic. 205637eb1ca1Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 205737eb1ca1Smrg ;; 205837eb1ca1Smrg *) 205937eb1ca1Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 206037eb1ca1Smrg ;; 206137eb1ca1Smrg esac 206221e67964Smrg # Ok, now we have the path, separated by spaces, we can step through it 206321e67964Smrg # and add multilib dir if necessary. 206421e67964Smrg lt_tmp_lt_search_path_spec= 206521e67964Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 206621e67964Smrg for lt_sys_path in $lt_search_path_spec; do 206721e67964Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 206821e67964Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 206921e67964Smrg else 207021e67964Smrg test -d "$lt_sys_path" && \ 207121e67964Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 207221e67964Smrg fi 207321e67964Smrg done 207437eb1ca1Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 207521e67964SmrgBEGIN {RS=" "; FS="/|\n";} { 207621e67964Smrg lt_foo=""; 207721e67964Smrg lt_count=0; 207821e67964Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 207921e67964Smrg if ($lt_i != "" && $lt_i != ".") { 208021e67964Smrg if ($lt_i == "..") { 208121e67964Smrg lt_count++; 208221e67964Smrg } else { 208321e67964Smrg if (lt_count == 0) { 208421e67964Smrg lt_foo="/" $lt_i lt_foo; 208521e67964Smrg } else { 208621e67964Smrg lt_count--; 208721e67964Smrg } 208821e67964Smrg } 208921e67964Smrg } 209021e67964Smrg } 209121e67964Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 209221e67964Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 209321e67964Smrg}'` 209437eb1ca1Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 209537eb1ca1Smrg # for these hosts. 209637eb1ca1Smrg case $host_os in 209737eb1ca1Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 209837eb1ca1Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 209937eb1ca1Smrg esac 210037eb1ca1Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 210121e67964Smrgelse 210221e67964Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 210321e67964Smrgfi]) 2104c27c18e8Smrglibrary_names_spec= 2105c27c18e8Smrglibname_spec='lib$name' 2106c27c18e8Smrgsoname_spec= 2107c27c18e8Smrgshrext_cmds=".so" 2108c27c18e8Smrgpostinstall_cmds= 2109c27c18e8Smrgpostuninstall_cmds= 2110c27c18e8Smrgfinish_cmds= 2111c27c18e8Smrgfinish_eval= 2112c27c18e8Smrgshlibpath_var= 2113c27c18e8Smrgshlibpath_overrides_runpath=unknown 2114c27c18e8Smrgversion_type=none 2115c27c18e8Smrgdynamic_linker="$host_os ld.so" 2116c27c18e8Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 211721e67964Smrgneed_lib_prefix=unknown 211821e67964Smrghardcode_into_libs=no 2119c43cc173Smrg 212021e67964Smrg# when you set need_version to no, make sure it does not cause -set_version 212121e67964Smrg# flags to be left without arguments 212221e67964Smrgneed_version=unknown 2123c43cc173Smrg 212421e67964Smrgcase $host_os in 212521e67964Smrgaix3*) 212621e67964Smrg version_type=linux 212721e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 212821e67964Smrg shlibpath_var=LIBPATH 2129c43cc173Smrg 213021e67964Smrg # AIX 3 has no versioning support, so we append a major version to the name. 213121e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 213221e67964Smrg ;; 2133c43cc173Smrg 213421e67964Smrgaix[[4-9]]*) 213521e67964Smrg version_type=linux 213621e67964Smrg need_lib_prefix=no 213721e67964Smrg need_version=no 213821e67964Smrg hardcode_into_libs=yes 213921e67964Smrg if test "$host_cpu" = ia64; then 214021e67964Smrg # AIX 5 supports IA64 214121e67964Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 214221e67964Smrg shlibpath_var=LD_LIBRARY_PATH 214321e67964Smrg else 214421e67964Smrg # With GCC up to 2.95.x, collect2 would create an import file 214521e67964Smrg # for dependence libraries. The import file would start with 214621e67964Smrg # the line `#! .'. This would cause the generated library to 214721e67964Smrg # depend on `.', always an invalid library. This was fixed in 214821e67964Smrg # development snapshots of GCC prior to 3.0. 214921e67964Smrg case $host_os in 215021e67964Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 215121e67964Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 215221e67964Smrg echo ' yes ' 2153c27c18e8Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 215421e67964Smrg : 215521e67964Smrg else 215621e67964Smrg can_build_shared=no 215721e67964Smrg fi 215821e67964Smrg ;; 215921e67964Smrg esac 216021e67964Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 216121e67964Smrg # soname into executable. Probably we can add versioning support to 216221e67964Smrg # collect2, so additional links can be useful in future. 216321e67964Smrg if test "$aix_use_runtimelinking" = yes; then 216421e67964Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 216521e67964Smrg # instead of lib<name>.a to let people know that these are not 216621e67964Smrg # typical AIX shared libraries. 216721e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 216821e67964Smrg else 216921e67964Smrg # We preserve .a as extension for shared libraries through AIX4.2 217021e67964Smrg # and later when we are not doing run time linking. 217121e67964Smrg library_names_spec='${libname}${release}.a $libname.a' 217221e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 217321e67964Smrg fi 217421e67964Smrg shlibpath_var=LIBPATH 217521e67964Smrg fi 217621e67964Smrg ;; 2177c43cc173Smrg 217821e67964Smrgamigaos*) 2179c27c18e8Smrg case $host_cpu in 2180c27c18e8Smrg powerpc) 2181c27c18e8Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2182c27c18e8Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2183c27c18e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2184c27c18e8Smrg ;; 2185c27c18e8Smrg m68k) 2186c27c18e8Smrg library_names_spec='$libname.ixlibrary $libname.a' 2187c27c18e8Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 218837eb1ca1Smrg 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' 2189c27c18e8Smrg ;; 2190c27c18e8Smrg esac 219121e67964Smrg ;; 2192c43cc173Smrg 219321e67964Smrgbeos*) 219421e67964Smrg library_names_spec='${libname}${shared_ext}' 219521e67964Smrg dynamic_linker="$host_os ld.so" 219621e67964Smrg shlibpath_var=LIBRARY_PATH 219721e67964Smrg ;; 2198c43cc173Smrg 219921e67964Smrgbsdi[[45]]*) 220021e67964Smrg version_type=linux 220121e67964Smrg need_version=no 220221e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 220321e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 220421e67964Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 220521e67964Smrg shlibpath_var=LD_LIBRARY_PATH 220621e67964Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 220721e67964Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 220821e67964Smrg # the default ld.so.conf also contains /usr/contrib/lib and 220921e67964Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 221021e67964Smrg # libtool to hard-code these into programs 221121e67964Smrg ;; 2212c43cc173Smrg 2213c27c18e8Smrgcygwin* | mingw* | pw32* | cegcc*) 221421e67964Smrg version_type=windows 221521e67964Smrg shrext_cmds=".dll" 221621e67964Smrg need_version=no 221721e67964Smrg need_lib_prefix=no 2218c43cc173Smrg 221921e67964Smrg case $GCC,$host_os in 2220c27c18e8Smrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 222121e67964Smrg library_names_spec='$libname.dll.a' 222221e67964Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 222321e67964Smrg postinstall_cmds='base_file=`basename \${file}`~ 2224c27c18e8Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 222521e67964Smrg dldir=$destdir/`dirname \$dlpath`~ 222621e67964Smrg test -d \$dldir || mkdir -p \$dldir~ 222721e67964Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2228c27c18e8Smrg chmod a+x \$dldir/$dlname~ 2229c27c18e8Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2230c27c18e8Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2231c27c18e8Smrg fi' 223221e67964Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 223321e67964Smrg dlpath=$dir/\$dldll~ 2234c27c18e8Smrg $RM \$dlpath' 223521e67964Smrg shlibpath_overrides_runpath=yes 2236c43cc173Smrg 223721e67964Smrg case $host_os in 223821e67964Smrg cygwin*) 223921e67964Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 224021e67964Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 224137eb1ca1Smrgm4_if([$1], [],[ 224237eb1ca1Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 224321e67964Smrg ;; 2244c27c18e8Smrg mingw* | cegcc*) 224521e67964Smrg # MinGW DLLs use traditional 'lib' prefix 224621e67964Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 224721e67964Smrg ;; 224821e67964Smrg pw32*) 224921e67964Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 225021e67964Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 225121e67964Smrg ;; 225221e67964Smrg esac 225321e67964Smrg ;; 2254c43cc173Smrg 225521e67964Smrg *) 225621e67964Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 225721e67964Smrg ;; 225821e67964Smrg esac 225921e67964Smrg dynamic_linker='Win32 ld.exe' 226021e67964Smrg # FIXME: first we should search . and the directory the executable is in 226121e67964Smrg shlibpath_var=PATH 2262c43cc173Smrg ;; 2263c43cc173Smrg 226421e67964Smrgdarwin* | rhapsody*) 226521e67964Smrg dynamic_linker="$host_os dyld" 226621e67964Smrg version_type=darwin 226721e67964Smrg need_lib_prefix=no 226821e67964Smrg need_version=no 2269c27c18e8Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 227021e67964Smrg soname_spec='${libname}${release}${major}$shared_ext' 227121e67964Smrg shlibpath_overrides_runpath=yes 227221e67964Smrg shlibpath_var=DYLD_LIBRARY_PATH 227321e67964Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2274c27c18e8Smrgm4_if([$1], [],[ 2275c27c18e8Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 227621e67964Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 227721e67964Smrg ;; 2278c43cc173Smrg 227921e67964Smrgdgux*) 228021e67964Smrg version_type=linux 228121e67964Smrg need_lib_prefix=no 228221e67964Smrg need_version=no 228321e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 228421e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 228521e67964Smrg shlibpath_var=LD_LIBRARY_PATH 228621e67964Smrg ;; 2287c43cc173Smrg 228821e67964Smrgfreebsd1*) 228921e67964Smrg dynamic_linker=no 229021e67964Smrg ;; 2291c43cc173Smrg 229221e67964Smrgfreebsd* | dragonfly*) 229321e67964Smrg # DragonFly does not have aout. When/if they implement a new 229421e67964Smrg # versioning mechanism, adjust this. 229521e67964Smrg if test -x /usr/bin/objformat; then 229621e67964Smrg objformat=`/usr/bin/objformat` 229721e67964Smrg else 229821e67964Smrg case $host_os in 229921e67964Smrg freebsd[[123]]*) objformat=aout ;; 230021e67964Smrg *) objformat=elf ;; 230121e67964Smrg esac 230221e67964Smrg fi 230321e67964Smrg version_type=freebsd-$objformat 230421e67964Smrg case $version_type in 230521e67964Smrg freebsd-elf*) 230621e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 230721e67964Smrg need_version=no 230821e67964Smrg need_lib_prefix=no 230921e67964Smrg ;; 231021e67964Smrg freebsd-*) 231121e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 231221e67964Smrg need_version=yes 231321e67964Smrg ;; 231421e67964Smrg esac 231521e67964Smrg shlibpath_var=LD_LIBRARY_PATH 231621e67964Smrg case $host_os in 231721e67964Smrg freebsd2*) 231821e67964Smrg shlibpath_overrides_runpath=yes 231921e67964Smrg ;; 232021e67964Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 232121e67964Smrg shlibpath_overrides_runpath=yes 232221e67964Smrg hardcode_into_libs=yes 232321e67964Smrg ;; 232421e67964Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 232521e67964Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 232621e67964Smrg shlibpath_overrides_runpath=no 232721e67964Smrg hardcode_into_libs=yes 232821e67964Smrg ;; 232921e67964Smrg *) # from 4.6 on, and DragonFly 233021e67964Smrg shlibpath_overrides_runpath=yes 233121e67964Smrg hardcode_into_libs=yes 233221e67964Smrg ;; 233321e67964Smrg esac 233421e67964Smrg ;; 2335c43cc173Smrg 233621e67964Smrggnu*) 233721e67964Smrg version_type=linux 233821e67964Smrg need_lib_prefix=no 233921e67964Smrg need_version=no 234021e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 234121e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 234221e67964Smrg shlibpath_var=LD_LIBRARY_PATH 234321e67964Smrg hardcode_into_libs=yes 234421e67964Smrg ;; 234521e67964Smrg 234637eb1ca1Smrghaiku*) 234737eb1ca1Smrg version_type=linux 234837eb1ca1Smrg need_lib_prefix=no 234937eb1ca1Smrg need_version=no 235037eb1ca1Smrg dynamic_linker="$host_os runtime_loader" 235137eb1ca1Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 235237eb1ca1Smrg soname_spec='${libname}${release}${shared_ext}$major' 235337eb1ca1Smrg shlibpath_var=LIBRARY_PATH 235437eb1ca1Smrg shlibpath_overrides_runpath=yes 235537eb1ca1Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 235637eb1ca1Smrg hardcode_into_libs=yes 235737eb1ca1Smrg ;; 235837eb1ca1Smrg 235921e67964Smrghpux9* | hpux10* | hpux11*) 236021e67964Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 236121e67964Smrg # link against other versions. 236221e67964Smrg version_type=sunos 236321e67964Smrg need_lib_prefix=no 236421e67964Smrg need_version=no 236521e67964Smrg case $host_cpu in 236621e67964Smrg ia64*) 236721e67964Smrg shrext_cmds='.so' 236821e67964Smrg hardcode_into_libs=yes 236921e67964Smrg dynamic_linker="$host_os dld.so" 237021e67964Smrg shlibpath_var=LD_LIBRARY_PATH 237121e67964Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 237221e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 237321e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 237421e67964Smrg if test "X$HPUX_IA64_MODE" = X32; then 237521e67964Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2376c43cc173Smrg else 237721e67964Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 237821e67964Smrg fi 237921e67964Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 238021e67964Smrg ;; 2381c27c18e8Smrg hppa*64*) 2382c27c18e8Smrg shrext_cmds='.sl' 2383c27c18e8Smrg hardcode_into_libs=yes 2384c27c18e8Smrg dynamic_linker="$host_os dld.sl" 2385c27c18e8Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2386c27c18e8Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2387c27c18e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2388c27c18e8Smrg soname_spec='${libname}${release}${shared_ext}$major' 2389c27c18e8Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2390c27c18e8Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2391c27c18e8Smrg ;; 2392c27c18e8Smrg *) 239321e67964Smrg shrext_cmds='.sl' 239421e67964Smrg dynamic_linker="$host_os dld.sl" 239521e67964Smrg shlibpath_var=SHLIB_PATH 239621e67964Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 239721e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 239821e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 239921e67964Smrg ;; 240021e67964Smrg esac 240137eb1ca1Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 240221e67964Smrg postinstall_cmds='chmod 555 $lib' 240337eb1ca1Smrg # or fails outright, so override atomically: 240437eb1ca1Smrg install_override_mode=555 240521e67964Smrg ;; 2406c43cc173Smrg 240721e67964Smrginterix[[3-9]]*) 240821e67964Smrg version_type=linux 240921e67964Smrg need_lib_prefix=no 241021e67964Smrg need_version=no 241121e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 241221e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 241321e67964Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 241421e67964Smrg shlibpath_var=LD_LIBRARY_PATH 241521e67964Smrg shlibpath_overrides_runpath=no 241621e67964Smrg hardcode_into_libs=yes 241721e67964Smrg ;; 2418c43cc173Smrg 241921e67964Smrgirix5* | irix6* | nonstopux*) 242021e67964Smrg case $host_os in 242121e67964Smrg nonstopux*) version_type=nonstopux ;; 242221e67964Smrg *) 242321e67964Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 242421e67964Smrg version_type=linux 2425c43cc173Smrg else 242621e67964Smrg version_type=irix 242721e67964Smrg fi ;; 242821e67964Smrg esac 242921e67964Smrg need_lib_prefix=no 243021e67964Smrg need_version=no 243121e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 243221e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 243321e67964Smrg case $host_os in 243421e67964Smrg irix5* | nonstopux*) 243521e67964Smrg libsuff= shlibsuff= 243621e67964Smrg ;; 243721e67964Smrg *) 243821e67964Smrg case $LD in # libtool.m4 will add one of these switches to LD 243921e67964Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 244021e67964Smrg libsuff= shlibsuff= libmagic=32-bit;; 244121e67964Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 244221e67964Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 244321e67964Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 244421e67964Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 244521e67964Smrg *) libsuff= shlibsuff= libmagic=never-match;; 244621e67964Smrg esac 244721e67964Smrg ;; 244821e67964Smrg esac 244921e67964Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 245021e67964Smrg shlibpath_overrides_runpath=no 245121e67964Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 245221e67964Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 245321e67964Smrg hardcode_into_libs=yes 245421e67964Smrg ;; 2455c43cc173Smrg 245621e67964Smrg# No shared lib support for Linux oldld, aout, or coff. 245721e67964Smrglinux*oldld* | linux*aout* | linux*coff*) 245821e67964Smrg dynamic_linker=no 245921e67964Smrg ;; 2460c43cc173Smrg 246121e67964Smrg# This must be Linux ELF. 246237eb1ca1Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 246321e67964Smrg version_type=linux 246421e67964Smrg need_lib_prefix=no 246521e67964Smrg need_version=no 246621e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 246721e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 246821e67964Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 246921e67964Smrg shlibpath_var=LD_LIBRARY_PATH 247021e67964Smrg shlibpath_overrides_runpath=no 247137eb1ca1Smrg 2472c27c18e8Smrg # Some binutils ld are patched to set DT_RUNPATH 247337eb1ca1Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 247437eb1ca1Smrg [lt_cv_shlibpath_overrides_runpath=no 247537eb1ca1Smrg save_LDFLAGS=$LDFLAGS 247637eb1ca1Smrg save_libdir=$libdir 247737eb1ca1Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 247837eb1ca1Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 247937eb1ca1Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 248037eb1ca1Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 248137eb1ca1Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 248237eb1ca1Smrg LDFLAGS=$save_LDFLAGS 248337eb1ca1Smrg libdir=$save_libdir 248437eb1ca1Smrg ]) 248537eb1ca1Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2486c27c18e8Smrg 248721e67964Smrg # This implies no fast_install, which is unacceptable. 248821e67964Smrg # Some rework will be needed to allow for fast_install 248921e67964Smrg # before this can be enabled. 249021e67964Smrg hardcode_into_libs=yes 2491c27c18e8Smrg 2492c27c18e8Smrg # Add ABI-specific directories to the system library path. 2493c27c18e8Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2494c43cc173Smrg 249521e67964Smrg # Append ld.so.conf contents to the search path 249621e67964Smrg if test -f /etc/ld.so.conf; then 249737eb1ca1Smrg 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' ' '` 249821e67964Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 249937eb1ca1Smrg 250021e67964Smrg fi 2501c43cc173Smrg 250221e67964Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 250321e67964Smrg # powerpc, because MkLinux only supported shared libraries with the 250421e67964Smrg # GNU dynamic linker. Since this was broken with cross compilers, 250521e67964Smrg # most powerpc-linux boxes support dynamic linking these days and 250621e67964Smrg # people can always --disable-shared, the test was removed, and we 250721e67964Smrg # assume the GNU/Linux dynamic linker is in use. 250821e67964Smrg dynamic_linker='GNU/Linux ld.so' 250921e67964Smrg ;; 2510c43cc173Smrg 251121e67964Smrgnetbsd*) 251221e67964Smrg version_type=sunos 251321e67964Smrg need_lib_prefix=no 251421e67964Smrg need_version=no 2515c27c18e8Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 251621e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 251721e67964Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 251821e67964Smrg dynamic_linker='NetBSD (a.out) ld.so' 251921e67964Smrg else 252021e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 252121e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 252221e67964Smrg dynamic_linker='NetBSD ld.elf_so' 2523c43cc173Smrg fi 252421e67964Smrg shlibpath_var=LD_LIBRARY_PATH 252521e67964Smrg shlibpath_overrides_runpath=yes 252621e67964Smrg hardcode_into_libs=yes 2527c43cc173Smrg ;; 2528c43cc173Smrg 252921e67964Smrgnewsos6) 253021e67964Smrg version_type=linux 253121e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 253221e67964Smrg shlibpath_var=LD_LIBRARY_PATH 253321e67964Smrg shlibpath_overrides_runpath=yes 2534c43cc173Smrg ;; 2535c43cc173Smrg 2536c27c18e8Smrg*nto* | *qnx*) 2537c27c18e8Smrg version_type=qnx 253821e67964Smrg need_lib_prefix=no 253921e67964Smrg need_version=no 254021e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 254121e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 254221e67964Smrg shlibpath_var=LD_LIBRARY_PATH 2543c27c18e8Smrg shlibpath_overrides_runpath=no 2544c27c18e8Smrg hardcode_into_libs=yes 2545c27c18e8Smrg dynamic_linker='ldqnx.so' 2546c43cc173Smrg ;; 254721e67964Smrg 254821e67964Smrgopenbsd*) 254921e67964Smrg version_type=sunos 255021e67964Smrg sys_lib_dlsearch_path_spec="/usr/lib" 255121e67964Smrg need_lib_prefix=no 255221e67964Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 255321e67964Smrg case $host_os in 2554c27c18e8Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2555c27c18e8Smrg *) need_version=no ;; 255621e67964Smrg esac 255721e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 255821e67964Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 255921e67964Smrg shlibpath_var=LD_LIBRARY_PATH 2560c27c18e8Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 256121e67964Smrg case $host_os in 256221e67964Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 256321e67964Smrg shlibpath_overrides_runpath=no 256421e67964Smrg ;; 256521e67964Smrg *) 256621e67964Smrg shlibpath_overrides_runpath=yes 256721e67964Smrg ;; 2568c43cc173Smrg esac 256921e67964Smrg else 257021e67964Smrg shlibpath_overrides_runpath=yes 2571c43cc173Smrg fi 2572c43cc173Smrg ;; 2573c43cc173Smrg 257421e67964Smrgos2*) 257521e67964Smrg libname_spec='$name' 257621e67964Smrg shrext_cmds=".dll" 257721e67964Smrg need_lib_prefix=no 257821e67964Smrg library_names_spec='$libname${shared_ext} $libname.a' 257921e67964Smrg dynamic_linker='OS/2 ld.exe' 258021e67964Smrg shlibpath_var=LIBPATH 2581c43cc173Smrg ;; 2582c43cc173Smrg 258321e67964Smrgosf3* | osf4* | osf5*) 258421e67964Smrg version_type=osf 258521e67964Smrg need_lib_prefix=no 258621e67964Smrg need_version=no 258721e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 258821e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 258921e67964Smrg shlibpath_var=LD_LIBRARY_PATH 259021e67964Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 259121e67964Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 259221e67964Smrg ;; 2593c43cc173Smrg 259421e67964Smrgrdos*) 259521e67964Smrg dynamic_linker=no 259621e67964Smrg ;; 2597c43cc173Smrg 259821e67964Smrgsolaris*) 259921e67964Smrg version_type=linux 260021e67964Smrg need_lib_prefix=no 260121e67964Smrg need_version=no 260221e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 260321e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 260421e67964Smrg shlibpath_var=LD_LIBRARY_PATH 260521e67964Smrg shlibpath_overrides_runpath=yes 260621e67964Smrg hardcode_into_libs=yes 260721e67964Smrg # ldd complains unless libraries are executable 260821e67964Smrg postinstall_cmds='chmod +x $lib' 260921e67964Smrg ;; 2610c43cc173Smrg 261121e67964Smrgsunos4*) 261221e67964Smrg version_type=sunos 261321e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 261421e67964Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 261521e67964Smrg shlibpath_var=LD_LIBRARY_PATH 261621e67964Smrg shlibpath_overrides_runpath=yes 261721e67964Smrg if test "$with_gnu_ld" = yes; then 261821e67964Smrg need_lib_prefix=no 261921e67964Smrg fi 262021e67964Smrg need_version=yes 262121e67964Smrg ;; 2622c43cc173Smrg 262321e67964Smrgsysv4 | sysv4.3*) 262421e67964Smrg version_type=linux 262521e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 262621e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 262721e67964Smrg shlibpath_var=LD_LIBRARY_PATH 262821e67964Smrg case $host_vendor in 262921e67964Smrg sni) 263021e67964Smrg shlibpath_overrides_runpath=no 263121e67964Smrg need_lib_prefix=no 263221e67964Smrg runpath_var=LD_RUN_PATH 263321e67964Smrg ;; 263421e67964Smrg siemens) 263521e67964Smrg need_lib_prefix=no 263621e67964Smrg ;; 263721e67964Smrg motorola) 263821e67964Smrg need_lib_prefix=no 263921e67964Smrg need_version=no 264021e67964Smrg shlibpath_overrides_runpath=no 264121e67964Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 264221e67964Smrg ;; 264321e67964Smrg esac 264421e67964Smrg ;; 2645c43cc173Smrg 264621e67964Smrgsysv4*MP*) 264721e67964Smrg if test -d /usr/nec ;then 264821e67964Smrg version_type=linux 264921e67964Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 265021e67964Smrg soname_spec='$libname${shared_ext}.$major' 265121e67964Smrg shlibpath_var=LD_LIBRARY_PATH 265221e67964Smrg fi 265321e67964Smrg ;; 2654c43cc173Smrg 265521e67964Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 265621e67964Smrg version_type=freebsd-elf 265721e67964Smrg need_lib_prefix=no 265821e67964Smrg need_version=no 265921e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 266021e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 266121e67964Smrg shlibpath_var=LD_LIBRARY_PATH 2662c27c18e8Smrg shlibpath_overrides_runpath=yes 266321e67964Smrg hardcode_into_libs=yes 266421e67964Smrg if test "$with_gnu_ld" = yes; then 266521e67964Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 266621e67964Smrg else 266721e67964Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 266821e67964Smrg case $host_os in 266921e67964Smrg sco3.2v5*) 267021e67964Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 267121e67964Smrg ;; 267221e67964Smrg esac 267321e67964Smrg fi 267421e67964Smrg sys_lib_dlsearch_path_spec='/usr/lib' 267521e67964Smrg ;; 2676c43cc173Smrg 2677c27c18e8Smrgtpf*) 2678c27c18e8Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2679c27c18e8Smrg version_type=linux 2680c27c18e8Smrg need_lib_prefix=no 2681c27c18e8Smrg need_version=no 2682c27c18e8Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2683c27c18e8Smrg shlibpath_var=LD_LIBRARY_PATH 2684c27c18e8Smrg shlibpath_overrides_runpath=no 2685c27c18e8Smrg hardcode_into_libs=yes 2686c27c18e8Smrg ;; 2687c27c18e8Smrg 268821e67964Smrguts4*) 268921e67964Smrg version_type=linux 269021e67964Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 269121e67964Smrg soname_spec='${libname}${release}${shared_ext}$major' 269221e67964Smrg shlibpath_var=LD_LIBRARY_PATH 269321e67964Smrg ;; 2694c43cc173Smrg 269521e67964Smrg*) 269621e67964Smrg dynamic_linker=no 269721e67964Smrg ;; 269821e67964Smrgesac 269921e67964SmrgAC_MSG_RESULT([$dynamic_linker]) 270021e67964Smrgtest "$dynamic_linker" = no && can_build_shared=no 2701c43cc173Smrg 270221e67964Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 270321e67964Smrgif test "$GCC" = yes; then 270421e67964Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 270521e67964Smrgfi 2706c43cc173Smrg 2707c27c18e8Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2708c27c18e8Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2709c27c18e8Smrgfi 2710c27c18e8Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2711c27c18e8Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2712c27c18e8Smrgfi 2713c43cc173Smrg 2714c27c18e8Smrg_LT_DECL([], [variables_saved_for_relink], [1], 2715c27c18e8Smrg [Variables whose values should be saved in libtool wrapper scripts and 2716c27c18e8Smrg restored at link time]) 2717c27c18e8Smrg_LT_DECL([], [need_lib_prefix], [0], 2718c27c18e8Smrg [Do we need the "lib" prefix for modules?]) 2719c27c18e8Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2720c27c18e8Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2721c27c18e8Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2722c27c18e8Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2723c27c18e8Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2724c27c18e8Smrg [Is shlibpath searched before the hard-coded library search path?]) 2725c27c18e8Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2726c27c18e8Smrg_LT_DECL([], [library_names_spec], [1], 2727c27c18e8Smrg [[List of archive names. First name is the real one, the rest are links. 2728c27c18e8Smrg The last name is the one that the linker finds with -lNAME]]) 2729c27c18e8Smrg_LT_DECL([], [soname_spec], [1], 2730c27c18e8Smrg [[The coded name of the library, if different from the real name]]) 273137eb1ca1Smrg_LT_DECL([], [install_override_mode], [1], 273237eb1ca1Smrg [Permission mode override for installation of shared libraries]) 2733c27c18e8Smrg_LT_DECL([], [postinstall_cmds], [2], 2734c27c18e8Smrg [Command to use after installation of a shared archive]) 2735c27c18e8Smrg_LT_DECL([], [postuninstall_cmds], [2], 2736c27c18e8Smrg [Command to use after uninstallation of a shared archive]) 2737c27c18e8Smrg_LT_DECL([], [finish_cmds], [2], 2738c27c18e8Smrg [Commands used to finish a libtool library installation in a directory]) 2739c27c18e8Smrg_LT_DECL([], [finish_eval], [1], 2740c27c18e8Smrg [[As "finish_cmds", except a single script fragment to be evaled but 2741c27c18e8Smrg not shown]]) 2742c27c18e8Smrg_LT_DECL([], [hardcode_into_libs], [0], 2743c27c18e8Smrg [Whether we should hardcode library paths into libraries]) 2744c27c18e8Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2745c27c18e8Smrg [Compile-time system search path for libraries]) 2746c27c18e8Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2747c27c18e8Smrg [Run-time system search path for libraries]) 2748c27c18e8Smrg])# _LT_SYS_DYNAMIC_LINKER 2749c27c18e8Smrg 2750c27c18e8Smrg 2751c27c18e8Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 275221e67964Smrg# -------------------------- 275321e67964Smrg# find a file program which can recognize shared library 2754c27c18e8SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2755c27c18e8Smrg[m4_require([_LT_DECL_EGREP])dnl 275621e67964SmrgAC_MSG_CHECKING([for $1]) 275721e67964SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 275821e67964Smrg[case $MAGIC_CMD in 275921e67964Smrg[[\\/*] | ?:[\\/]*]) 276021e67964Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 276121e67964Smrg ;; 276221e67964Smrg*) 276321e67964Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 276421e67964Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 276521e67964Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 276621e67964Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 276721e67964Smrgdnl not every word. This closes a longstanding sh security hole. 2768c27c18e8Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 276921e67964Smrg for ac_dir in $ac_dummy; do 277021e67964Smrg IFS="$lt_save_ifs" 277121e67964Smrg test -z "$ac_dir" && ac_dir=. 277221e67964Smrg if test -f $ac_dir/$1; then 277321e67964Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 277421e67964Smrg if test -n "$file_magic_test_file"; then 277521e67964Smrg case $deplibs_check_method in 277621e67964Smrg "file_magic "*) 277721e67964Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 277821e67964Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 277921e67964Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 278021e67964Smrg $EGREP "$file_magic_regex" > /dev/null; then 278121e67964Smrg : 278221e67964Smrg else 2783c27c18e8Smrg cat <<_LT_EOF 1>&2 2784c43cc173Smrg 278521e67964Smrg*** Warning: the command libtool uses to detect shared libraries, 278621e67964Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 278721e67964Smrg*** The result is that libtool may fail to recognize shared libraries 278821e67964Smrg*** as such. This will affect the creation of libtool libraries that 278921e67964Smrg*** depend on shared libraries, but programs linked with such libtool 279021e67964Smrg*** libraries will work regardless of this problem. Nevertheless, you 279121e67964Smrg*** may want to report the problem to your system manager and/or to 279221e67964Smrg*** bug-libtool@gnu.org 2793c43cc173Smrg 2794c27c18e8Smrg_LT_EOF 279521e67964Smrg fi ;; 279621e67964Smrg esac 279721e67964Smrg fi 279821e67964Smrg break 279921e67964Smrg fi 280021e67964Smrg done 280121e67964Smrg IFS="$lt_save_ifs" 280221e67964Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 280321e67964Smrg ;; 280421e67964Smrgesac]) 280521e67964SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 280621e67964Smrgif test -n "$MAGIC_CMD"; then 280721e67964Smrg AC_MSG_RESULT($MAGIC_CMD) 2808c43cc173Smrgelse 280921e67964Smrg AC_MSG_RESULT(no) 2810c43cc173Smrgfi 2811c27c18e8Smrg_LT_DECL([], [MAGIC_CMD], [0], 2812c27c18e8Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2813c27c18e8Smrg])# _LT_PATH_TOOL_PREFIX 2814c43cc173Smrg 2815c27c18e8Smrg# Old name: 2816c27c18e8SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2817c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 2818c27c18e8Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2819c43cc173Smrg 2820c27c18e8Smrg 2821c27c18e8Smrg# _LT_PATH_MAGIC 2822c27c18e8Smrg# -------------- 282321e67964Smrg# find a file program which can recognize a shared library 2824c27c18e8Smrgm4_defun([_LT_PATH_MAGIC], 2825c27c18e8Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 282621e67964Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 282721e67964Smrg if test -n "$ac_tool_prefix"; then 2828c27c18e8Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2829c43cc173Smrg else 283021e67964Smrg MAGIC_CMD=: 2831c43cc173Smrg fi 2832c43cc173Smrgfi 2833c27c18e8Smrg])# _LT_PATH_MAGIC 2834c43cc173Smrg 2835c43cc173Smrg 2836c27c18e8Smrg# LT_PATH_LD 283721e67964Smrg# ---------- 283821e67964Smrg# find the pathname to the GNU or non-GNU linker 2839c27c18e8SmrgAC_DEFUN([LT_PATH_LD], 2840c27c18e8Smrg[AC_REQUIRE([AC_PROG_CC])dnl 284121e67964SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 284221e67964SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2843c27c18e8Smrgm4_require([_LT_DECL_SED])dnl 2844c27c18e8Smrgm4_require([_LT_DECL_EGREP])dnl 284537eb1ca1Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 2846c27c18e8Smrg 2847c27c18e8SmrgAC_ARG_WITH([gnu-ld], 2848c27c18e8Smrg [AS_HELP_STRING([--with-gnu-ld], 2849c27c18e8Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2850c27c18e8Smrg [test "$withval" = no || with_gnu_ld=yes], 2851c27c18e8Smrg [with_gnu_ld=no])dnl 2852c27c18e8Smrg 285321e67964Smrgac_prog=ld 285421e67964Smrgif test "$GCC" = yes; then 285521e67964Smrg # Check if gcc -print-prog-name=ld gives a path. 285621e67964Smrg AC_MSG_CHECKING([for ld used by $CC]) 285721e67964Smrg case $host in 285821e67964Smrg *-*-mingw*) 285921e67964Smrg # gcc leaves a trailing carriage return which upsets mingw 286021e67964Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 286121e67964Smrg *) 286221e67964Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 286321e67964Smrg esac 286421e67964Smrg case $ac_prog in 286521e67964Smrg # Accept absolute paths. 286621e67964Smrg [[\\/]]* | ?:[[\\/]]*) 286721e67964Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 286821e67964Smrg # Canonicalize the pathname of ld 2869c27c18e8Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 2870c27c18e8Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 2871c27c18e8Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 287221e67964Smrg done 287321e67964Smrg test -z "$LD" && LD="$ac_prog" 287421e67964Smrg ;; 287521e67964Smrg "") 287621e67964Smrg # If it fails, then pretend we aren't using GCC. 287721e67964Smrg ac_prog=ld 287821e67964Smrg ;; 287921e67964Smrg *) 288021e67964Smrg # If it is relative, then search for the first ld in PATH. 288121e67964Smrg with_gnu_ld=unknown 2882c43cc173Smrg ;; 2883c43cc173Smrg esac 288421e67964Smrgelif test "$with_gnu_ld" = yes; then 288521e67964Smrg AC_MSG_CHECKING([for GNU ld]) 288621e67964Smrgelse 288721e67964Smrg AC_MSG_CHECKING([for non-GNU ld]) 2888c43cc173Smrgfi 288921e67964SmrgAC_CACHE_VAL(lt_cv_path_LD, 289021e67964Smrg[if test -z "$LD"; then 289121e67964Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 289221e67964Smrg for ac_dir in $PATH; do 289321e67964Smrg IFS="$lt_save_ifs" 289421e67964Smrg test -z "$ac_dir" && ac_dir=. 289521e67964Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 289621e67964Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 289721e67964Smrg # Check to see if the program is GNU ld. I'd rather use --version, 289821e67964Smrg # but apparently some variants of GNU ld only accept -v. 289921e67964Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 290021e67964Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 290121e67964Smrg *GNU* | *'with BFD'*) 290221e67964Smrg test "$with_gnu_ld" != no && break 290321e67964Smrg ;; 290421e67964Smrg *) 290521e67964Smrg test "$with_gnu_ld" != yes && break 290621e67964Smrg ;; 290721e67964Smrg esac 290821e67964Smrg fi 290921e67964Smrg done 291021e67964Smrg IFS="$lt_save_ifs" 2911c43cc173Smrgelse 291221e67964Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 291321e67964Smrgfi]) 291421e67964SmrgLD="$lt_cv_path_LD" 291521e67964Smrgif test -n "$LD"; then 291621e67964Smrg AC_MSG_RESULT($LD) 291721e67964Smrgelse 291821e67964Smrg AC_MSG_RESULT(no) 2919c43cc173Smrgfi 292021e67964Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2921c27c18e8Smrg_LT_PATH_LD_GNU 2922c27c18e8SmrgAC_SUBST([LD]) 2923c43cc173Smrg 2924c27c18e8Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 2925c27c18e8Smrg])# LT_PATH_LD 2926c43cc173Smrg 2927c27c18e8Smrg# Old names: 2928c27c18e8SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 2929c27c18e8SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 2930c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 2931c27c18e8Smrgdnl AC_DEFUN([AM_PROG_LD], []) 2932c27c18e8Smrgdnl AC_DEFUN([AC_PROG_LD], []) 2933c27c18e8Smrg 2934c27c18e8Smrg 2935c27c18e8Smrg# _LT_PATH_LD_GNU 2936c27c18e8Smrg#- -------------- 2937c27c18e8Smrgm4_defun([_LT_PATH_LD_GNU], 2938c27c18e8Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 293921e67964Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 294021e67964Smrgcase `$LD -v 2>&1 </dev/null` in 294121e67964Smrg*GNU* | *'with BFD'*) 294221e67964Smrg lt_cv_prog_gnu_ld=yes 294321e67964Smrg ;; 294421e67964Smrg*) 294521e67964Smrg lt_cv_prog_gnu_ld=no 2946c43cc173Smrg ;; 294721e67964Smrgesac]) 294821e67964Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2949c27c18e8Smrg])# _LT_PATH_LD_GNU 2950c43cc173Smrg 295121e67964Smrg 2952c27c18e8Smrg# _LT_CMD_RELOAD 2953c27c18e8Smrg# -------------- 295421e67964Smrg# find reload flag for linker 295521e67964Smrg# -- PORTME Some linkers may need a different reload flag. 2956c27c18e8Smrgm4_defun([_LT_CMD_RELOAD], 295721e67964Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 295821e67964Smrg lt_cv_ld_reload_flag, 295921e67964Smrg [lt_cv_ld_reload_flag='-r']) 296021e67964Smrgreload_flag=$lt_cv_ld_reload_flag 296121e67964Smrgcase $reload_flag in 296221e67964Smrg"" | " "*) ;; 296321e67964Smrg*) reload_flag=" $reload_flag" ;; 296421e67964Smrgesac 296521e67964Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 296621e67964Smrgcase $host_os in 296721e67964Smrg darwin*) 296821e67964Smrg if test "$GCC" = yes; then 296921e67964Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2970c43cc173Smrg else 297121e67964Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2972c43cc173Smrg fi 297321e67964Smrg ;; 297421e67964Smrgesac 297537eb1ca1Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 297637eb1ca1Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 2977c27c18e8Smrg])# _LT_CMD_RELOAD 2978c43cc173Smrg 297921e67964Smrg 2980c27c18e8Smrg# _LT_CHECK_MAGIC_METHOD 2981c27c18e8Smrg# ---------------------- 298221e67964Smrg# how to check for library dependencies 298321e67964Smrg# -- PORTME fill in with the dynamic library characteristics 2984c27c18e8Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 2985c27c18e8Smrg[m4_require([_LT_DECL_EGREP]) 2986c27c18e8Smrgm4_require([_LT_DECL_OBJDUMP]) 2987c27c18e8SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 298821e67964Smrglt_cv_deplibs_check_method, 298921e67964Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 299021e67964Smrglt_cv_file_magic_test_file= 299121e67964Smrglt_cv_deplibs_check_method='unknown' 299221e67964Smrg# Need to set the preceding variable on all platforms that support 299321e67964Smrg# interlibrary dependencies. 299421e67964Smrg# 'none' -- dependencies not supported. 299521e67964Smrg# `unknown' -- same as none, but documents that we really don't know. 299621e67964Smrg# 'pass_all' -- all dependencies passed with no checks. 299721e67964Smrg# 'test_compile' -- check by making test program. 299821e67964Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 299921e67964Smrg# which responds to the $file_magic_cmd with a given extended regex. 300021e67964Smrg# If you have `file' or equivalent on your system and you're not sure 300121e67964Smrg# whether `pass_all' will *always* work, you probably want this one. 300221e67964Smrg 300321e67964Smrgcase $host_os in 300421e67964Smrgaix[[4-9]]*) 300521e67964Smrg lt_cv_deplibs_check_method=pass_all 3006c43cc173Smrg ;; 3007c43cc173Smrg 3008c43cc173Smrgbeos*) 300921e67964Smrg lt_cv_deplibs_check_method=pass_all 3010c43cc173Smrg ;; 3011c43cc173Smrg 3012c43cc173Smrgbsdi[[45]]*) 301321e67964Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 301421e67964Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 301521e67964Smrg lt_cv_file_magic_test_file=/shlib/libc.so 3016c43cc173Smrg ;; 3017c43cc173Smrg 301821e67964Smrgcygwin*) 301921e67964Smrg # func_win32_libid is a shell function defined in ltmain.sh 302021e67964Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 302121e67964Smrg lt_cv_file_magic_cmd='func_win32_libid' 302221e67964Smrg ;; 3023c43cc173Smrg 302421e67964Smrgmingw* | pw32*) 302521e67964Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 302621e67964Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 302721e67964Smrg # unless we find 'file', for example because we are cross-compiling. 302837eb1ca1Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 302937eb1ca1Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 303021e67964Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 303121e67964Smrg lt_cv_file_magic_cmd='func_win32_libid' 303221e67964Smrg else 303337eb1ca1Smrg # Keep this pattern in sync with the one in func_win32_libid. 303437eb1ca1Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 303521e67964Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 303621e67964Smrg fi 303721e67964Smrg ;; 3038c43cc173Smrg 303937eb1ca1Smrgcegcc*) 3040c27c18e8Smrg # use the weaker test based on 'objdump'. See mingw*. 3041c27c18e8Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3042c27c18e8Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3043c27c18e8Smrg ;; 3044c27c18e8Smrg 304521e67964Smrgdarwin* | rhapsody*) 304621e67964Smrg lt_cv_deplibs_check_method=pass_all 304721e67964Smrg ;; 304821e67964Smrg 304921e67964Smrgfreebsd* | dragonfly*) 3050c27c18e8Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 305121e67964Smrg case $host_cpu in 305221e67964Smrg i*86 ) 305321e67964Smrg # Not sure whether the presence of OpenBSD here was a mistake. 305421e67964Smrg # Let's accept both of them until this is cleared up. 305521e67964Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 305621e67964Smrg lt_cv_file_magic_cmd=/usr/bin/file 305721e67964Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3058c43cc173Smrg ;; 3059c43cc173Smrg esac 306021e67964Smrg else 306121e67964Smrg lt_cv_deplibs_check_method=pass_all 306221e67964Smrg fi 306321e67964Smrg ;; 306421e67964Smrg 306521e67964Smrggnu*) 306621e67964Smrg lt_cv_deplibs_check_method=pass_all 306721e67964Smrg ;; 3068c43cc173Smrg 306937eb1ca1Smrghaiku*) 307037eb1ca1Smrg lt_cv_deplibs_check_method=pass_all 307137eb1ca1Smrg ;; 307237eb1ca1Smrg 307321e67964Smrghpux10.20* | hpux11*) 307421e67964Smrg lt_cv_file_magic_cmd=/usr/bin/file 307521e67964Smrg case $host_cpu in 307621e67964Smrg ia64*) 307721e67964Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 307821e67964Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 307921e67964Smrg ;; 308021e67964Smrg hppa*64*) 308137eb1ca1Smrg [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]'] 308221e67964Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 308321e67964Smrg ;; 3084c43cc173Smrg *) 308537eb1ca1Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 308621e67964Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3087c43cc173Smrg ;; 3088c43cc173Smrg esac 3089c43cc173Smrg ;; 3090c43cc173Smrg 309121e67964Smrginterix[[3-9]]*) 309221e67964Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 309321e67964Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3094c43cc173Smrg ;; 3095c43cc173Smrg 309621e67964Smrgirix5* | irix6* | nonstopux*) 309721e67964Smrg case $LD in 309821e67964Smrg *-32|*"-32 ") libmagic=32-bit;; 309921e67964Smrg *-n32|*"-n32 ") libmagic=N32;; 310021e67964Smrg *-64|*"-64 ") libmagic=64-bit;; 310121e67964Smrg *) libmagic=never-match;; 310221e67964Smrg esac 310321e67964Smrg lt_cv_deplibs_check_method=pass_all 3104c43cc173Smrg ;; 3105c43cc173Smrg 310621e67964Smrg# This must be Linux ELF. 310737eb1ca1Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 310821e67964Smrg lt_cv_deplibs_check_method=pass_all 3109c43cc173Smrg ;; 3110c43cc173Smrg 311121e67964Smrgnetbsd*) 3112c27c18e8Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 311321e67964Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 311421e67964Smrg else 311521e67964Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 311621e67964Smrg fi 3117c43cc173Smrg ;; 3118c43cc173Smrg 311921e67964Smrgnewos6*) 312021e67964Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 312121e67964Smrg lt_cv_file_magic_cmd=/usr/bin/file 312221e67964Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 312321e67964Smrg ;; 312421e67964Smrg 3125c27c18e8Smrg*nto* | *qnx*) 3126c27c18e8Smrg lt_cv_deplibs_check_method=pass_all 312721e67964Smrg ;; 312821e67964Smrg 312921e67964Smrgopenbsd*) 3130c27c18e8Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 313121e67964Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3132c43cc173Smrg else 313321e67964Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3134c43cc173Smrg fi 313521e67964Smrg ;; 313621e67964Smrg 313721e67964Smrgosf3* | osf4* | osf5*) 313821e67964Smrg lt_cv_deplibs_check_method=pass_all 313921e67964Smrg ;; 314021e67964Smrg 314121e67964Smrgrdos*) 314221e67964Smrg lt_cv_deplibs_check_method=pass_all 314321e67964Smrg ;; 314421e67964Smrg 314521e67964Smrgsolaris*) 314621e67964Smrg lt_cv_deplibs_check_method=pass_all 314721e67964Smrg ;; 314821e67964Smrg 3149c27c18e8Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3150c27c18e8Smrg lt_cv_deplibs_check_method=pass_all 3151c27c18e8Smrg ;; 3152c27c18e8Smrg 315321e67964Smrgsysv4 | sysv4.3*) 315421e67964Smrg case $host_vendor in 315521e67964Smrg motorola) 315621e67964Smrg 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]]' 315721e67964Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3158c43cc173Smrg ;; 315921e67964Smrg ncr) 316021e67964Smrg lt_cv_deplibs_check_method=pass_all 3161c43cc173Smrg ;; 316221e67964Smrg sequent) 316321e67964Smrg lt_cv_file_magic_cmd='/bin/file' 316421e67964Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3165c43cc173Smrg ;; 316621e67964Smrg sni) 316721e67964Smrg lt_cv_file_magic_cmd='/bin/file' 316821e67964Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 316921e67964Smrg lt_cv_file_magic_test_file=/lib/libc.so 317021e67964Smrg ;; 317121e67964Smrg siemens) 317221e67964Smrg lt_cv_deplibs_check_method=pass_all 317321e67964Smrg ;; 317421e67964Smrg pc) 317521e67964Smrg lt_cv_deplibs_check_method=pass_all 3176c43cc173Smrg ;; 3177c43cc173Smrg esac 3178c43cc173Smrg ;; 3179c43cc173Smrg 3180c27c18e8Smrgtpf*) 318121e67964Smrg lt_cv_deplibs_check_method=pass_all 3182c43cc173Smrg ;; 318321e67964Smrgesac 318421e67964Smrg]) 318521e67964Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 318621e67964Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 318721e67964Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3188c43cc173Smrg 3189c27c18e8Smrg_LT_DECL([], [deplibs_check_method], [1], 3190c27c18e8Smrg [Method to check whether dependent libraries are shared objects]) 3191c27c18e8Smrg_LT_DECL([], [file_magic_cmd], [1], 3192c27c18e8Smrg [Command to use when deplibs_check_method == "file_magic"]) 3193c27c18e8Smrg])# _LT_CHECK_MAGIC_METHOD 3194c43cc173Smrg 3195c27c18e8Smrg 3196c27c18e8Smrg# LT_PATH_NM 319721e67964Smrg# ---------- 3198c27c18e8Smrg# find the pathname to a BSD- or MS-compatible name lister 3199c27c18e8SmrgAC_DEFUN([LT_PATH_NM], 3200c27c18e8Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3201c27c18e8SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 320221e67964Smrg[if test -n "$NM"; then 320321e67964Smrg # Let the user override the test. 320421e67964Smrg lt_cv_path_NM="$NM" 320521e67964Smrgelse 320621e67964Smrg lt_nm_to_check="${ac_tool_prefix}nm" 320721e67964Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 320821e67964Smrg lt_nm_to_check="$lt_nm_to_check nm" 3209c43cc173Smrg fi 321021e67964Smrg for lt_tmp_nm in $lt_nm_to_check; do 321121e67964Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 321221e67964Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 321321e67964Smrg IFS="$lt_save_ifs" 321421e67964Smrg test -z "$ac_dir" && ac_dir=. 321521e67964Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 321621e67964Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 321721e67964Smrg # Check to see if the nm accepts a BSD-compat flag. 321821e67964Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 321921e67964Smrg # nm: unknown option "B" ignored 322021e67964Smrg # Tru64's nm complains that /dev/null is an invalid object file 322121e67964Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 322221e67964Smrg */dev/null* | *'Invalid file or object type'*) 322321e67964Smrg lt_cv_path_NM="$tmp_nm -B" 322421e67964Smrg break 322521e67964Smrg ;; 322621e67964Smrg *) 322721e67964Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 322821e67964Smrg */dev/null*) 322921e67964Smrg lt_cv_path_NM="$tmp_nm -p" 323021e67964Smrg break 323121e67964Smrg ;; 323221e67964Smrg *) 323321e67964Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 323421e67964Smrg continue # so that we can try to find one that supports BSD flags 323521e67964Smrg ;; 323621e67964Smrg esac 323721e67964Smrg ;; 323821e67964Smrg esac 323921e67964Smrg fi 324021e67964Smrg done 324121e67964Smrg IFS="$lt_save_ifs" 324221e67964Smrg done 3243c27c18e8Smrg : ${lt_cv_path_NM=no} 324421e67964Smrgfi]) 3245c27c18e8Smrgif test "$lt_cv_path_NM" != "no"; then 3246c27c18e8Smrg NM="$lt_cv_path_NM" 3247c27c18e8Smrgelse 3248c27c18e8Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 324937eb1ca1Smrg if test -n "$DUMPBIN"; then : 325037eb1ca1Smrg # Let the user override the test. 325137eb1ca1Smrg else 325237eb1ca1Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 325337eb1ca1Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 325437eb1ca1Smrg *COFF*) 325537eb1ca1Smrg DUMPBIN="$DUMPBIN -symbols" 325637eb1ca1Smrg ;; 325737eb1ca1Smrg *) 325837eb1ca1Smrg DUMPBIN=: 325937eb1ca1Smrg ;; 326037eb1ca1Smrg esac 326137eb1ca1Smrg fi 3262c27c18e8Smrg AC_SUBST([DUMPBIN]) 3263c27c18e8Smrg if test "$DUMPBIN" != ":"; then 3264c27c18e8Smrg NM="$DUMPBIN" 3265c27c18e8Smrg fi 3266c27c18e8Smrgfi 3267c27c18e8Smrgtest -z "$NM" && NM=nm 3268c27c18e8SmrgAC_SUBST([NM]) 3269c27c18e8Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3270c27c18e8Smrg 3271c27c18e8SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3272c27c18e8Smrg [lt_cv_nm_interface="BSD nm" 3273c27c18e8Smrg echo "int some_variable = 0;" > conftest.$ac_ext 327437eb1ca1Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3275c27c18e8Smrg (eval "$ac_compile" 2>conftest.err) 3276c27c18e8Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 327737eb1ca1Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3278c27c18e8Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3279c27c18e8Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 328037eb1ca1Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3281c27c18e8Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3282c27c18e8Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3283c27c18e8Smrg lt_cv_nm_interface="MS dumpbin" 3284c27c18e8Smrg fi 3285c27c18e8Smrg rm -f conftest*]) 3286c27c18e8Smrg])# LT_PATH_NM 3287c43cc173Smrg 3288c27c18e8Smrg# Old names: 3289c27c18e8SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3290c27c18e8SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3291c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 3292c27c18e8Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3293c27c18e8Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3294c43cc173Smrg 3295c27c18e8Smrg 3296c27c18e8Smrg# LT_LIB_M 3297c27c18e8Smrg# -------- 329821e67964Smrg# check for math library 3299c27c18e8SmrgAC_DEFUN([LT_LIB_M], 330021e67964Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 330121e67964SmrgLIBM= 330221e67964Smrgcase $host in 330337eb1ca1Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 330421e67964Smrg # These system don't have libm, or don't need it 3305c43cc173Smrg ;; 330621e67964Smrg*-ncr-sysv4.3*) 330721e67964Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 330821e67964Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3309c43cc173Smrg ;; 331021e67964Smrg*) 331121e67964Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3312c43cc173Smrg ;; 331321e67964Smrgesac 3314c27c18e8SmrgAC_SUBST([LIBM]) 3315c27c18e8Smrg])# LT_LIB_M 3316c43cc173Smrg 3317c27c18e8Smrg# Old name: 3318c27c18e8SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3319c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 3320c27c18e8Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3321c43cc173Smrg 332221e67964Smrg 3323c27c18e8Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3324c27c18e8Smrg# ------------------------------- 3325c27c18e8Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3326c27c18e8Smrg[m4_require([_LT_TAG_COMPILER])dnl 332721e67964Smrg 3328c27c18e8Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3329c43cc173Smrg 3330c27c18e8Smrgif test "$GCC" = yes; then 333137eb1ca1Smrg case $cc_basename in 333237eb1ca1Smrg nvcc*) 333337eb1ca1Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 333437eb1ca1Smrg *) 333537eb1ca1Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 333637eb1ca1Smrg esac 3337c43cc173Smrg 3338c27c18e8Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3339c27c18e8Smrg lt_cv_prog_compiler_rtti_exceptions, 3340c27c18e8Smrg [-fno-rtti -fno-exceptions], [], 3341c27c18e8Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3342c27c18e8Smrgfi 3343c27c18e8Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3344c27c18e8Smrg [Compiler flag to turn off builtin functions]) 3345c27c18e8Smrg])# _LT_COMPILER_NO_RTTI 3346c43cc173Smrg 3347c43cc173Smrg 3348c27c18e8Smrg# _LT_CMD_GLOBAL_SYMBOLS 3349c27c18e8Smrg# ---------------------- 3350c27c18e8Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3351c27c18e8Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3352c27c18e8SmrgAC_REQUIRE([AC_PROG_CC])dnl 335337eb1ca1SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3354c27c18e8SmrgAC_REQUIRE([LT_PATH_NM])dnl 3355c27c18e8SmrgAC_REQUIRE([LT_PATH_LD])dnl 3356c27c18e8Smrgm4_require([_LT_DECL_SED])dnl 3357c27c18e8Smrgm4_require([_LT_DECL_EGREP])dnl 3358c27c18e8Smrgm4_require([_LT_TAG_COMPILER])dnl 3359c43cc173Smrg 3360c27c18e8Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3361c27c18e8SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3362c27c18e8SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 336321e67964Smrg[ 3364c27c18e8Smrg# These are sane defaults that work on at least a few old systems. 3365c27c18e8Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3366c43cc173Smrg 3367c27c18e8Smrg# Character class describing NM global symbol codes. 3368c27c18e8Smrgsymcode='[[BCDEGRST]]' 3369c43cc173Smrg 3370c27c18e8Smrg# Regexp to match symbols that can be accessed directly from C. 3371c27c18e8Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3372c43cc173Smrg 3373c27c18e8Smrg# Define system-specific variables. 3374c27c18e8Smrgcase $host_os in 3375c27c18e8Smrgaix*) 3376c27c18e8Smrg symcode='[[BCDT]]' 3377c27c18e8Smrg ;; 3378c27c18e8Smrgcygwin* | mingw* | pw32* | cegcc*) 3379c27c18e8Smrg symcode='[[ABCDGISTW]]' 3380c27c18e8Smrg ;; 3381c27c18e8Smrghpux*) 3382c27c18e8Smrg if test "$host_cpu" = ia64; then 3383c27c18e8Smrg symcode='[[ABCDEGRST]]' 3384c27c18e8Smrg fi 3385c27c18e8Smrg ;; 3386c27c18e8Smrgirix* | nonstopux*) 3387c27c18e8Smrg symcode='[[BCDEGRST]]' 3388c27c18e8Smrg ;; 3389c27c18e8Smrgosf*) 3390c27c18e8Smrg symcode='[[BCDEGQRST]]' 3391c27c18e8Smrg ;; 3392c27c18e8Smrgsolaris*) 3393c27c18e8Smrg symcode='[[BDRT]]' 3394c27c18e8Smrg ;; 3395c27c18e8Smrgsco3.2v5*) 3396c27c18e8Smrg symcode='[[DT]]' 3397c27c18e8Smrg ;; 3398c27c18e8Smrgsysv4.2uw2*) 3399c27c18e8Smrg symcode='[[DT]]' 3400c27c18e8Smrg ;; 3401c27c18e8Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3402c27c18e8Smrg symcode='[[ABDT]]' 3403c27c18e8Smrg ;; 3404c27c18e8Smrgsysv4) 3405c27c18e8Smrg symcode='[[DFNSTU]]' 3406c27c18e8Smrg ;; 3407c27c18e8Smrgesac 3408c43cc173Smrg 3409c27c18e8Smrg# If we're using GNU nm, then use its standard symbol codes. 3410c27c18e8Smrgcase `$NM -V 2>&1` in 3411c27c18e8Smrg*GNU* | *'with BFD'*) 3412c27c18e8Smrg symcode='[[ABCDGIRSTW]]' ;; 3413c27c18e8Smrgesac 3414c43cc173Smrg 3415c27c18e8Smrg# Transform an extracted symbol line into a proper C declaration. 3416c27c18e8Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3417c27c18e8Smrg# so use this general approach. 3418c27c18e8Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3419c43cc173Smrg 3420c27c18e8Smrg# Transform an extracted symbol line into symbol name and symbol address 3421c27c18e8Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3422c27c18e8Smrglt_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'" 3423c43cc173Smrg 3424c27c18e8Smrg# Handle CRLF in mingw tool chain 3425c27c18e8Smrgopt_cr= 3426c27c18e8Smrgcase $build_os in 3427c27c18e8Smrgmingw*) 3428c27c18e8Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3429c27c18e8Smrg ;; 3430c27c18e8Smrgesac 3431c43cc173Smrg 3432c27c18e8Smrg# Try without a prefix underscore, then with it. 3433c27c18e8Smrgfor ac_symprfx in "" "_"; do 3434c43cc173Smrg 3435c27c18e8Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3436c27c18e8Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3437c43cc173Smrg 3438c27c18e8Smrg # Write the raw and C identifiers. 3439c27c18e8Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3440c27c18e8Smrg # Fake it for dumpbin and say T for any non-static function 3441c27c18e8Smrg # and D for any global variable. 3442c27c18e8Smrg # Also find C++ and __fastcall symbols from MSVC++, 3443c27c18e8Smrg # which start with @ or ?. 3444c27c18e8Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3445c27c18e8Smrg" {last_section=section; section=\$ 3};"\ 3446c27c18e8Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3447c27c18e8Smrg" \$ 0!~/External *\|/{next};"\ 3448c27c18e8Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3449c27c18e8Smrg" {if(hide[section]) next};"\ 3450c27c18e8Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3451c27c18e8Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3452c27c18e8Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3453c27c18e8Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3454c27c18e8Smrg" ' prfx=^$ac_symprfx]" 3455c27c18e8Smrg else 3456c27c18e8Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 345721e67964Smrg fi 3458c43cc173Smrg 3459c27c18e8Smrg # Check to see that the pipe works correctly. 3460c27c18e8Smrg pipe_works=no 3461c43cc173Smrg 3462c27c18e8Smrg rm -f conftest* 3463c27c18e8Smrg cat > conftest.$ac_ext <<_LT_EOF 3464c27c18e8Smrg#ifdef __cplusplus 3465c27c18e8Smrgextern "C" { 3466c27c18e8Smrg#endif 3467c27c18e8Smrgchar nm_test_var; 3468c27c18e8Smrgvoid nm_test_func(void); 3469c27c18e8Smrgvoid nm_test_func(void){} 3470c27c18e8Smrg#ifdef __cplusplus 3471c27c18e8Smrg} 3472c27c18e8Smrg#endif 3473c27c18e8Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 3474c27c18e8Smrg_LT_EOF 3475c43cc173Smrg 3476c27c18e8Smrg if AC_TRY_EVAL(ac_compile); then 3477c27c18e8Smrg # Now try to grab the symbols. 3478c27c18e8Smrg nlist=conftest.nm 347937eb1ca1Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3480c27c18e8Smrg # Try sorting and uniquifying the output. 3481c27c18e8Smrg if sort "$nlist" | uniq > "$nlist"T; then 3482c27c18e8Smrg mv -f "$nlist"T "$nlist" 3483c27c18e8Smrg else 3484c27c18e8Smrg rm -f "$nlist"T 3485c27c18e8Smrg fi 3486c43cc173Smrg 3487c27c18e8Smrg # Make sure that we snagged all the symbols we need. 3488c27c18e8Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3489c27c18e8Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3490c27c18e8Smrg cat <<_LT_EOF > conftest.$ac_ext 3491c27c18e8Smrg#ifdef __cplusplus 3492c27c18e8Smrgextern "C" { 3493c27c18e8Smrg#endif 3494c43cc173Smrg 3495c27c18e8Smrg_LT_EOF 3496c27c18e8Smrg # Now generate the symbol file. 3497c27c18e8Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3498c43cc173Smrg 3499c27c18e8Smrg cat <<_LT_EOF >> conftest.$ac_ext 3500c43cc173Smrg 3501c27c18e8Smrg/* The mapping between symbol names and symbols. */ 3502c27c18e8Smrgconst struct { 3503c27c18e8Smrg const char *name; 3504c27c18e8Smrg void *address; 3505c27c18e8Smrg} 3506c27c18e8Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3507c27c18e8Smrg{ 3508c27c18e8Smrg { "@PROGRAM@", (void *) 0 }, 3509c27c18e8Smrg_LT_EOF 3510c27c18e8Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3511c27c18e8Smrg cat <<\_LT_EOF >> conftest.$ac_ext 3512c27c18e8Smrg {0, (void *) 0} 3513c27c18e8Smrg}; 3514c43cc173Smrg 3515c27c18e8Smrg/* This works around a problem in FreeBSD linker */ 3516c27c18e8Smrg#ifdef FREEBSD_WORKAROUND 3517c27c18e8Smrgstatic const void *lt_preloaded_setup() { 3518c27c18e8Smrg return lt__PROGRAM__LTX_preloaded_symbols; 3519c27c18e8Smrg} 3520c27c18e8Smrg#endif 3521c43cc173Smrg 3522c27c18e8Smrg#ifdef __cplusplus 3523c27c18e8Smrg} 3524c27c18e8Smrg#endif 3525c27c18e8Smrg_LT_EOF 3526c27c18e8Smrg # Now try linking the two files. 3527c27c18e8Smrg mv conftest.$ac_objext conftstm.$ac_objext 3528c27c18e8Smrg lt_save_LIBS="$LIBS" 3529c27c18e8Smrg lt_save_CFLAGS="$CFLAGS" 3530c27c18e8Smrg LIBS="conftstm.$ac_objext" 3531c27c18e8Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3532c27c18e8Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3533c27c18e8Smrg pipe_works=yes 3534c27c18e8Smrg fi 3535c27c18e8Smrg LIBS="$lt_save_LIBS" 3536c27c18e8Smrg CFLAGS="$lt_save_CFLAGS" 3537c27c18e8Smrg else 3538c27c18e8Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3539c27c18e8Smrg fi 3540c27c18e8Smrg else 3541c27c18e8Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3542c27c18e8Smrg fi 354321e67964Smrg else 3544c27c18e8Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3545c43cc173Smrg fi 3546c43cc173Smrg else 3547c27c18e8Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3548c27c18e8Smrg cat conftest.$ac_ext >&5 3549c43cc173Smrg fi 3550c27c18e8Smrg rm -rf conftest* conftst* 3551c43cc173Smrg 3552c27c18e8Smrg # Do not use the global_symbol_pipe unless it works. 3553c27c18e8Smrg if test "$pipe_works" = yes; then 3554c27c18e8Smrg break 3555c27c18e8Smrg else 3556c27c18e8Smrg lt_cv_sys_global_symbol_pipe= 3557c27c18e8Smrg fi 3558c27c18e8Smrgdone 3559c27c18e8Smrg]) 3560c27c18e8Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3561c27c18e8Smrg lt_cv_sys_global_symbol_to_cdecl= 3562c27c18e8Smrgfi 3563c27c18e8Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3564c27c18e8Smrg AC_MSG_RESULT(failed) 3565c43cc173Smrgelse 3566c27c18e8Smrg AC_MSG_RESULT(ok) 3567c43cc173Smrgfi 3568c43cc173Smrg 3569c27c18e8Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3570c27c18e8Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 3571c27c18e8Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3572c27c18e8Smrg [Transform the output of nm in a proper C declaration]) 3573c27c18e8Smrg_LT_DECL([global_symbol_to_c_name_address], 3574c27c18e8Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3575c27c18e8Smrg [Transform the output of nm in a C name address pair]) 3576c27c18e8Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3577c27c18e8Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3578c27c18e8Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3579c27c18e8Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 3580c43cc173Smrg 3581c43cc173Smrg 3582c27c18e8Smrg# _LT_COMPILER_PIC([TAGNAME]) 3583c27c18e8Smrg# --------------------------- 3584c27c18e8Smrgm4_defun([_LT_COMPILER_PIC], 3585c27c18e8Smrg[m4_require([_LT_TAG_COMPILER])dnl 3586c27c18e8Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3587c27c18e8Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3588c27c18e8Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3589c43cc173Smrg 3590c27c18e8SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 3591c27c18e8Smrgm4_if([$1], [CXX], [ 3592c27c18e8Smrg # C++ specific cases for pic, static, wl, etc. 3593c27c18e8Smrg if test "$GXX" = yes; then 3594c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3595c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3596c43cc173Smrg 3597c27c18e8Smrg case $host_os in 3598c27c18e8Smrg aix*) 3599c27c18e8Smrg # All AIX code is PIC. 360021e67964Smrg if test "$host_cpu" = ia64; then 3601c27c18e8Smrg # AIX 5 now supports IA64 processor 3602c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 360321e67964Smrg fi 360421e67964Smrg ;; 3605c43cc173Smrg 3606c27c18e8Smrg amigaos*) 360721e67964Smrg case $host_cpu in 3608c27c18e8Smrg powerpc) 3609c27c18e8Smrg # see comment about AmigaOS4 .so support 3610c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3611c27c18e8Smrg ;; 3612c27c18e8Smrg m68k) 3613c27c18e8Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3614c27c18e8Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3615c27c18e8Smrg # like `-m68040'. 3616c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 361721e67964Smrg ;; 361821e67964Smrg esac 361921e67964Smrg ;; 3620c43cc173Smrg 3621c27c18e8Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3622c27c18e8Smrg # PIC is the default for these OSes. 3623c27c18e8Smrg ;; 3624c27c18e8Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3625c27c18e8Smrg # This hack is so that the source file can tell whether it is being 3626c27c18e8Smrg # built for inclusion in a dll (and should export symbols for example). 3627c27c18e8Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3628c27c18e8Smrg # (--disable-auto-import) libraries 3629c27c18e8Smrg m4_if([$1], [GCJ], [], 3630c27c18e8Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3631c27c18e8Smrg ;; 3632c27c18e8Smrg darwin* | rhapsody*) 3633c27c18e8Smrg # PIC is the default on this platform 3634c27c18e8Smrg # Common symbols not allowed in MH_DYLIB files 3635c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3636c27c18e8Smrg ;; 3637c27c18e8Smrg *djgpp*) 3638c27c18e8Smrg # DJGPP does not support shared libraries at all 3639c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3640c27c18e8Smrg ;; 364137eb1ca1Smrg haiku*) 364237eb1ca1Smrg # PIC is the default for Haiku. 364337eb1ca1Smrg # The "-static" flag exists, but is broken. 364437eb1ca1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 364537eb1ca1Smrg ;; 3646c27c18e8Smrg interix[[3-9]]*) 3647c27c18e8Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3648c27c18e8Smrg # Instead, we relocate shared libraries at runtime. 3649c27c18e8Smrg ;; 3650c27c18e8Smrg sysv4*MP*) 3651c27c18e8Smrg if test -d /usr/nec; then 3652c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3653c27c18e8Smrg fi 3654c27c18e8Smrg ;; 3655c27c18e8Smrg hpux*) 3656c27c18e8Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3657c27c18e8Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3658c27c18e8Smrg # sets the default TLS model and affects inlining. 3659c27c18e8Smrg case $host_cpu in 3660c27c18e8Smrg hppa*64*) 366121e67964Smrg ;; 366221e67964Smrg *) 3663c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 366421e67964Smrg ;; 3665c27c18e8Smrg esac 3666c27c18e8Smrg ;; 3667c27c18e8Smrg *qnx* | *nto*) 3668c27c18e8Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3669c27c18e8Smrg # it will coredump. 3670c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3671c27c18e8Smrg ;; 3672c27c18e8Smrg *) 3673c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3674c27c18e8Smrg ;; 367521e67964Smrg esac 3676c27c18e8Smrg else 3677c27c18e8Smrg case $host_os in 3678c27c18e8Smrg aix[[4-9]]*) 3679c27c18e8Smrg # All AIX code is PIC. 3680c27c18e8Smrg if test "$host_cpu" = ia64; then 3681c27c18e8Smrg # AIX 5 now supports IA64 processor 3682c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3683c27c18e8Smrg else 3684c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3685c27c18e8Smrg fi 368621e67964Smrg ;; 3687c27c18e8Smrg chorus*) 3688c27c18e8Smrg case $cc_basename in 3689c27c18e8Smrg cxch68*) 3690c27c18e8Smrg # Green Hills C++ Compiler 3691c27c18e8Smrg # _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" 369221e67964Smrg ;; 369321e67964Smrg esac 369421e67964Smrg ;; 3695c27c18e8Smrg dgux*) 3696c27c18e8Smrg case $cc_basename in 3697c27c18e8Smrg ec++*) 3698c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3699c27c18e8Smrg ;; 3700c27c18e8Smrg ghcx*) 3701c27c18e8Smrg # Green Hills C++ Compiler 3702c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3703c27c18e8Smrg ;; 3704c27c18e8Smrg *) 3705c27c18e8Smrg ;; 370621e67964Smrg esac 370721e67964Smrg ;; 3708c27c18e8Smrg freebsd* | dragonfly*) 3709c27c18e8Smrg # FreeBSD uses GNU C++ 371021e67964Smrg ;; 3711c27c18e8Smrg hpux9* | hpux10* | hpux11*) 3712c27c18e8Smrg case $cc_basename in 3713c27c18e8Smrg CC*) 3714c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3715c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3716c27c18e8Smrg if test "$host_cpu" != ia64; then 3717c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3718c27c18e8Smrg fi 3719c27c18e8Smrg ;; 3720c27c18e8Smrg aCC*) 3721c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3722c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3723c27c18e8Smrg case $host_cpu in 3724c27c18e8Smrg hppa*64*|ia64*) 3725c27c18e8Smrg # +Z the default 3726c27c18e8Smrg ;; 3727c27c18e8Smrg *) 3728c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3729c27c18e8Smrg ;; 3730c27c18e8Smrg esac 3731c27c18e8Smrg ;; 3732c27c18e8Smrg *) 3733c27c18e8Smrg ;; 3734c27c18e8Smrg esac 373521e67964Smrg ;; 3736c27c18e8Smrg interix*) 3737c27c18e8Smrg # This is c89, which is MS Visual C++ (no shared libs) 3738c27c18e8Smrg # Anyone wants to do a port? 373921e67964Smrg ;; 3740c27c18e8Smrg irix5* | irix6* | nonstopux*) 3741c27c18e8Smrg case $cc_basename in 3742c27c18e8Smrg CC*) 3743c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3744c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3745c27c18e8Smrg # CC pic flag -KPIC is the default. 3746c27c18e8Smrg ;; 3747c27c18e8Smrg *) 3748c27c18e8Smrg ;; 3749c27c18e8Smrg esac 375021e67964Smrg ;; 375137eb1ca1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 3752c27c18e8Smrg case $cc_basename in 3753c27c18e8Smrg KCC*) 3754c27c18e8Smrg # KAI C++ Compiler 3755c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3756c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3757c27c18e8Smrg ;; 3758c27c18e8Smrg ecpc* ) 3759c27c18e8Smrg # old Intel C++ for x86_64 which still supported -KPIC. 3760c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3761c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3762c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3763c27c18e8Smrg ;; 3764c27c18e8Smrg icpc* ) 3765c27c18e8Smrg # Intel C++, used to be incompatible with GCC. 3766c27c18e8Smrg # ICC 10 doesn't accept -KPIC any more. 3767c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3768c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3769c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3770c27c18e8Smrg ;; 3771c27c18e8Smrg pgCC* | pgcpp*) 3772c27c18e8Smrg # Portland Group C++ compiler 3773c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3774c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 3775c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3776c27c18e8Smrg ;; 3777c27c18e8Smrg cxx*) 3778c27c18e8Smrg # Compaq C++ 3779c27c18e8Smrg # Make sure the PIC flag is empty. It appears that all Alpha 3780c27c18e8Smrg # Linux and Compaq Tru64 Unix objects are PIC. 3781c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3782c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3783c27c18e8Smrg ;; 378437eb1ca1Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 378537eb1ca1Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 3786c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3787c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 3788c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 3789c27c18e8Smrg ;; 3790c27c18e8Smrg *) 3791c27c18e8Smrg case `$CC -V 2>&1 | sed 5q` in 3792c27c18e8Smrg *Sun\ C*) 3793c27c18e8Smrg # Sun C++ 5.9 3794c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3795c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3796c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3797c27c18e8Smrg ;; 3798c27c18e8Smrg esac 3799c27c18e8Smrg ;; 3800c27c18e8Smrg esac 380121e67964Smrg ;; 3802c27c18e8Smrg lynxos*) 380321e67964Smrg ;; 3804c27c18e8Smrg m88k*) 380521e67964Smrg ;; 3806c27c18e8Smrg mvs*) 3807c27c18e8Smrg case $cc_basename in 3808c27c18e8Smrg cxx*) 3809c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 3810c27c18e8Smrg ;; 3811c27c18e8Smrg *) 3812c27c18e8Smrg ;; 3813c27c18e8Smrg esac 381421e67964Smrg ;; 3815c27c18e8Smrg netbsd*) 381621e67964Smrg ;; 3817c27c18e8Smrg *qnx* | *nto*) 3818c27c18e8Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3819c27c18e8Smrg # it will coredump. 3820c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3821c27c18e8Smrg ;; 3822c27c18e8Smrg osf3* | osf4* | osf5*) 3823c27c18e8Smrg case $cc_basename in 3824c27c18e8Smrg KCC*) 3825c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3826c27c18e8Smrg ;; 3827c27c18e8Smrg RCC*) 3828c27c18e8Smrg # Rational C++ 2.4.1 3829c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3830c27c18e8Smrg ;; 3831c27c18e8Smrg cxx*) 3832c27c18e8Smrg # Digital/Compaq C++ 3833c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3834c27c18e8Smrg # Make sure the PIC flag is empty. It appears that all Alpha 3835c27c18e8Smrg # Linux and Compaq Tru64 Unix objects are PIC. 3836c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3837c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3838c27c18e8Smrg ;; 3839c27c18e8Smrg *) 3840c27c18e8Smrg ;; 3841c27c18e8Smrg esac 384221e67964Smrg ;; 3843c27c18e8Smrg psos*) 384421e67964Smrg ;; 3845c27c18e8Smrg solaris*) 3846c27c18e8Smrg case $cc_basename in 384737eb1ca1Smrg CC* | sunCC*) 3848c27c18e8Smrg # Sun C++ 4.2, 5.x and Centerline C++ 3849c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3850c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3851c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3852c27c18e8Smrg ;; 3853c27c18e8Smrg gcx*) 3854c27c18e8Smrg # Green Hills C++ Compiler 3855c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 3856c27c18e8Smrg ;; 3857c27c18e8Smrg *) 3858c27c18e8Smrg ;; 3859c27c18e8Smrg esac 386021e67964Smrg ;; 3861c27c18e8Smrg sunos4*) 3862c27c18e8Smrg case $cc_basename in 3863c27c18e8Smrg CC*) 3864c27c18e8Smrg # Sun C++ 4.x 3865c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3866c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3867c27c18e8Smrg ;; 3868c27c18e8Smrg lcc*) 3869c27c18e8Smrg # Lucid 3870c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3871c27c18e8Smrg ;; 387221e67964Smrg *) 387321e67964Smrg ;; 387421e67964Smrg esac 387521e67964Smrg ;; 3876c27c18e8Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 3877c27c18e8Smrg case $cc_basename in 3878c27c18e8Smrg CC*) 3879c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3880c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3881c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3882c27c18e8Smrg ;; 3883c27c18e8Smrg esac 388421e67964Smrg ;; 3885c27c18e8Smrg tandem*) 3886c27c18e8Smrg case $cc_basename in 3887c27c18e8Smrg NCC*) 3888c27c18e8Smrg # NonStop-UX NCC 3.20 3889c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3890c27c18e8Smrg ;; 389121e67964Smrg *) 389221e67964Smrg ;; 3893c27c18e8Smrg esac 389421e67964Smrg ;; 3895c27c18e8Smrg vxworks*) 389621e67964Smrg ;; 389721e67964Smrg *) 3898c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 389921e67964Smrg ;; 390021e67964Smrg esac 3901c27c18e8Smrg fi 3902c27c18e8Smrg], 3903c27c18e8Smrg[ 3904c27c18e8Smrg if test "$GCC" = yes; then 3905c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3906c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3907c27c18e8Smrg 3908c27c18e8Smrg case $host_os in 3909c27c18e8Smrg aix*) 3910c27c18e8Smrg # All AIX code is PIC. 3911c27c18e8Smrg if test "$host_cpu" = ia64; then 3912c27c18e8Smrg # AIX 5 now supports IA64 processor 3913c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3914c27c18e8Smrg fi 3915c27c18e8Smrg ;; 3916c27c18e8Smrg 3917c27c18e8Smrg amigaos*) 3918c27c18e8Smrg case $host_cpu in 3919c27c18e8Smrg powerpc) 3920c27c18e8Smrg # see comment about AmigaOS4 .so support 3921c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3922c27c18e8Smrg ;; 3923c27c18e8Smrg m68k) 3924c27c18e8Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3925c27c18e8Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3926c27c18e8Smrg # like `-m68040'. 3927c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3928c27c18e8Smrg ;; 3929c27c18e8Smrg esac 3930c27c18e8Smrg ;; 3931c27c18e8Smrg 3932c27c18e8Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3933c27c18e8Smrg # PIC is the default for these OSes. 3934c27c18e8Smrg ;; 3935c27c18e8Smrg 3936c27c18e8Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3937c27c18e8Smrg # This hack is so that the source file can tell whether it is being 3938c27c18e8Smrg # built for inclusion in a dll (and should export symbols for example). 3939c27c18e8Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3940c27c18e8Smrg # (--disable-auto-import) libraries 3941c27c18e8Smrg m4_if([$1], [GCJ], [], 3942c27c18e8Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3943c27c18e8Smrg ;; 3944c27c18e8Smrg 3945c27c18e8Smrg darwin* | rhapsody*) 3946c27c18e8Smrg # PIC is the default on this platform 3947c27c18e8Smrg # Common symbols not allowed in MH_DYLIB files 3948c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3949c27c18e8Smrg ;; 3950c27c18e8Smrg 395137eb1ca1Smrg haiku*) 395237eb1ca1Smrg # PIC is the default for Haiku. 395337eb1ca1Smrg # The "-static" flag exists, but is broken. 395437eb1ca1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 395537eb1ca1Smrg ;; 395637eb1ca1Smrg 3957c27c18e8Smrg hpux*) 3958c27c18e8Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3959c27c18e8Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3960c27c18e8Smrg # sets the default TLS model and affects inlining. 3961c27c18e8Smrg case $host_cpu in 3962c27c18e8Smrg hppa*64*) 3963c27c18e8Smrg # +Z the default 396421e67964Smrg ;; 396521e67964Smrg *) 3966c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 396721e67964Smrg ;; 3968c27c18e8Smrg esac 3969c27c18e8Smrg ;; 3970c27c18e8Smrg 3971c27c18e8Smrg interix[[3-9]]*) 3972c27c18e8Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3973c27c18e8Smrg # Instead, we relocate shared libraries at runtime. 3974c27c18e8Smrg ;; 3975c27c18e8Smrg 3976c27c18e8Smrg msdosdjgpp*) 3977c27c18e8Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 3978c27c18e8Smrg # on systems that don't support them. 3979c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3980c27c18e8Smrg enable_shared=no 3981c27c18e8Smrg ;; 3982c27c18e8Smrg 3983c27c18e8Smrg *nto* | *qnx*) 3984c27c18e8Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3985c27c18e8Smrg # it will coredump. 3986c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3987c27c18e8Smrg ;; 3988c27c18e8Smrg 3989c27c18e8Smrg sysv4*MP*) 3990c27c18e8Smrg if test -d /usr/nec; then 3991c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3992c27c18e8Smrg fi 3993c27c18e8Smrg ;; 3994c27c18e8Smrg 3995c27c18e8Smrg *) 3996c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3997c27c18e8Smrg ;; 399821e67964Smrg esac 399937eb1ca1Smrg 400037eb1ca1Smrg case $cc_basename in 400137eb1ca1Smrg nvcc*) # Cuda Compiler Driver 2.2 400237eb1ca1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 400337eb1ca1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' 400437eb1ca1Smrg ;; 400537eb1ca1Smrg esac 4006c27c18e8Smrg else 4007c27c18e8Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4008c27c18e8Smrg case $host_os in 4009c27c18e8Smrg aix*) 4010c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4011c27c18e8Smrg if test "$host_cpu" = ia64; then 4012c27c18e8Smrg # AIX 5 now supports IA64 processor 4013c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4014c27c18e8Smrg else 4015c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4016c27c18e8Smrg fi 4017c27c18e8Smrg ;; 4018c27c18e8Smrg 4019c27c18e8Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4020c27c18e8Smrg # This hack is so that the source file can tell whether it is being 4021c27c18e8Smrg # built for inclusion in a dll (and should export symbols for example). 4022c27c18e8Smrg m4_if([$1], [GCJ], [], 4023c27c18e8Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4024c27c18e8Smrg ;; 4025c27c18e8Smrg 4026c27c18e8Smrg hpux9* | hpux10* | hpux11*) 4027c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4028c27c18e8Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4029c27c18e8Smrg # not for PA HP-UX. 4030c27c18e8Smrg case $host_cpu in 4031c27c18e8Smrg hppa*64*|ia64*) 4032c27c18e8Smrg # +Z the default 403321e67964Smrg ;; 403421e67964Smrg *) 4035c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 403621e67964Smrg ;; 4037c27c18e8Smrg esac 4038c27c18e8Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4039c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4040c27c18e8Smrg ;; 4041c43cc173Smrg 4042c27c18e8Smrg irix5* | irix6* | nonstopux*) 4043c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4044c27c18e8Smrg # PIC (with -KPIC) is the default. 4045c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4046c27c18e8Smrg ;; 4047c43cc173Smrg 404837eb1ca1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4049c27c18e8Smrg case $cc_basename in 4050c27c18e8Smrg # old Intel for x86_64 which still supported -KPIC. 4051c27c18e8Smrg ecc*) 4052c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4053c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4054c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4055c27c18e8Smrg ;; 4056c27c18e8Smrg # icc used to be incompatible with GCC. 4057c27c18e8Smrg # ICC 10 doesn't accept -KPIC any more. 4058c27c18e8Smrg icc* | ifort*) 4059c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4060c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4061c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4062c27c18e8Smrg ;; 4063c27c18e8Smrg # Lahey Fortran 8.1. 4064c27c18e8Smrg lf95*) 4065c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4066c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4067c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4068c27c18e8Smrg ;; 406937eb1ca1Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4070c27c18e8Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4071c27c18e8Smrg # which looks to be a dead project) 4072c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4073c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4074c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4075c27c18e8Smrg ;; 4076c27c18e8Smrg ccc*) 4077c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4078c27c18e8Smrg # All Alpha code is PIC. 4079c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4080c27c18e8Smrg ;; 408137eb1ca1Smrg xl* | bgxl* | bgf* | mpixl*) 408237eb1ca1Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4083c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4084c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4085c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4086c27c18e8Smrg ;; 4087c27c18e8Smrg *) 4088c27c18e8Smrg case `$CC -V 2>&1 | sed 5q` in 408937eb1ca1Smrg *Sun\ F* | *Sun*Fortran*) 409037eb1ca1Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4091c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4092c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 409337eb1ca1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4094c27c18e8Smrg ;; 409537eb1ca1Smrg *Sun\ C*) 409637eb1ca1Smrg # Sun C 5.9 4097c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4098c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 409937eb1ca1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4100c27c18e8Smrg ;; 4101c27c18e8Smrg esac 4102c27c18e8Smrg ;; 4103c27c18e8Smrg esac 4104c27c18e8Smrg ;; 4105c43cc173Smrg 4106c27c18e8Smrg newsos6) 4107c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4108c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4109c27c18e8Smrg ;; 4110c43cc173Smrg 4111c27c18e8Smrg *nto* | *qnx*) 4112c27c18e8Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4113c27c18e8Smrg # it will coredump. 4114c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4115c27c18e8Smrg ;; 4116c43cc173Smrg 4117c27c18e8Smrg osf3* | osf4* | osf5*) 4118c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4119c27c18e8Smrg # All OSF/1 code is PIC. 4120c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4121c27c18e8Smrg ;; 4122c43cc173Smrg 4123c27c18e8Smrg rdos*) 4124c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4125c27c18e8Smrg ;; 412621e67964Smrg 4127c27c18e8Smrg solaris*) 4128c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4129c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4130c27c18e8Smrg case $cc_basename in 413137eb1ca1Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4132c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4133c27c18e8Smrg *) 4134c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4135c27c18e8Smrg esac 4136c27c18e8Smrg ;; 413721e67964Smrg 4138c27c18e8Smrg sunos4*) 4139c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4140c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4141c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4142c27c18e8Smrg ;; 414321e67964Smrg 4144c27c18e8Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4145c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4146c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4147c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4148c27c18e8Smrg ;; 414921e67964Smrg 4150c27c18e8Smrg sysv4*MP*) 4151c27c18e8Smrg if test -d /usr/nec ;then 4152c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4153c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4154c27c18e8Smrg fi 4155c27c18e8Smrg ;; 415621e67964Smrg 4157c27c18e8Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4158c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4159c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4160c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4161c27c18e8Smrg ;; 416221e67964Smrg 4163c27c18e8Smrg unicos*) 4164c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4165c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4166c27c18e8Smrg ;; 4167c43cc173Smrg 4168c27c18e8Smrg uts4*) 4169c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4170c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4171c27c18e8Smrg ;; 4172c43cc173Smrg 4173c27c18e8Smrg *) 4174c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4175c27c18e8Smrg ;; 4176c27c18e8Smrg esac 4177c27c18e8Smrg fi 4178c27c18e8Smrg]) 4179c27c18e8Smrgcase $host_os in 4180c27c18e8Smrg # For platforms which do not support PIC, -DPIC is meaningless: 4181c27c18e8Smrg *djgpp*) 4182c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4183c27c18e8Smrg ;; 4184c27c18e8Smrg *) 4185c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4186c27c18e8Smrg ;; 4187c27c18e8Smrgesac 4188c27c18e8SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4189c27c18e8Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4190c27c18e8Smrg [How to pass a linker flag through the compiler]) 419121e67964Smrg 4192c27c18e8Smrg# 4193c27c18e8Smrg# Check to make sure the PIC flag actually works. 4194c27c18e8Smrg# 4195c27c18e8Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4196c27c18e8Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4197c27c18e8Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4198c27c18e8Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4199c27c18e8Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4200c27c18e8Smrg "" | " "*) ;; 4201c27c18e8Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4202c27c18e8Smrg esac], 4203c27c18e8Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4204c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4205c27c18e8Smrgfi 4206c27c18e8Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4207c27c18e8Smrg [Additional compiler flags for building library objects]) 420821e67964Smrg 4209c27c18e8Smrg# 4210c27c18e8Smrg# Check to make sure the static flag actually works. 4211c27c18e8Smrg# 4212c27c18e8Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4213c27c18e8Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4214c27c18e8Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4215c27c18e8Smrg $lt_tmp_static_flag, 4216c27c18e8Smrg [], 4217c27c18e8Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4218c27c18e8Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4219c27c18e8Smrg [Compiler flag to prevent dynamic linking]) 4220c27c18e8Smrg])# _LT_COMPILER_PIC 422121e67964Smrg 4222c27c18e8Smrg 4223c27c18e8Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4224c27c18e8Smrg# ---------------------------- 4225c27c18e8Smrg# See if the linker supports building shared libraries. 4226c27c18e8Smrgm4_defun([_LT_LINKER_SHLIBS], 4227c27c18e8Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4228c27c18e8SmrgAC_REQUIRE([LT_PATH_NM])dnl 4229c27c18e8Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4230c27c18e8Smrgm4_require([_LT_DECL_EGREP])dnl 4231c27c18e8Smrgm4_require([_LT_DECL_SED])dnl 4232c27c18e8Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4233c27c18e8Smrgm4_require([_LT_TAG_COMPILER])dnl 4234c27c18e8SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4235c27c18e8Smrgm4_if([$1], [CXX], [ 4236c27c18e8Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4237c27c18e8Smrg case $host_os in 4238c27c18e8Smrg aix[[4-9]]*) 4239c27c18e8Smrg # If we're using GNU nm, then we don't want the "-C" option. 4240c27c18e8Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 424137eb1ca1Smrg # Also, AIX nm treats weak defined symbols like other global defined 424237eb1ca1Smrg # symbols, whereas GNU nm marks them as "W". 4243c27c18e8Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 424437eb1ca1Smrg _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' 4245c27c18e8Smrg else 4246c27c18e8Smrg _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' 424721e67964Smrg fi 4248c43cc173Smrg ;; 4249c27c18e8Smrg pw32*) 4250c27c18e8Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 425121e67964Smrg ;; 4252c27c18e8Smrg cygwin* | mingw* | cegcc*) 4253c27c18e8Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4254c27c18e8Smrg ;; 4255c27c18e8Smrg *) 4256c27c18e8Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4257c27c18e8Smrg ;; 4258c27c18e8Smrg esac 4259c27c18e8Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4260c27c18e8Smrg], [ 4261c27c18e8Smrg runpath_var= 4262c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4263c27c18e8Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4264c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)= 4265c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4266c27c18e8Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4267c27c18e8Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4268c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4269c27c18e8Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4270c27c18e8Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4271c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4272c27c18e8Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4273c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4274c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4275c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4276c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4277c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4278c27c18e8Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4279c27c18e8Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4280c27c18e8Smrg _LT_TAGVAR(module_cmds, $1)= 4281c27c18e8Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4282c27c18e8Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4283c27c18e8Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4284c27c18e8Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4285c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4286c27c18e8Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4287c27c18e8Smrg # included in the symbol list 4288c27c18e8Smrg _LT_TAGVAR(include_expsyms, $1)= 4289c27c18e8Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4290c27c18e8Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4291c27c18e8Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4292c27c18e8Smrg # as well as any symbol that contains `d'. 4293c27c18e8Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4294c27c18e8Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4295c27c18e8Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 4296c27c18e8Smrg # the symbol is explicitly referenced. Since portable code cannot 4297c27c18e8Smrg # rely on this symbol name, it's probably fine to never include it in 4298c27c18e8Smrg # preloaded symbol tables. 4299c27c18e8Smrg # Exclude shared library initialization/finalization symbols. 4300c27c18e8Smrgdnl Note also adjust exclude_expsyms for C++ above. 4301c27c18e8Smrg extract_expsyms_cmds= 4302c43cc173Smrg 4303c27c18e8Smrg case $host_os in 4304c27c18e8Smrg cygwin* | mingw* | pw32* | cegcc*) 4305c27c18e8Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4306c27c18e8Smrg # When not using gcc, we currently assume that we are using 4307c27c18e8Smrg # Microsoft Visual C++. 4308c27c18e8Smrg if test "$GCC" != yes; then 4309c27c18e8Smrg with_gnu_ld=no 4310c43cc173Smrg fi 431121e67964Smrg ;; 4312c27c18e8Smrg interix*) 4313c27c18e8Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4314c27c18e8Smrg with_gnu_ld=yes 4315c27c18e8Smrg ;; 4316c27c18e8Smrg openbsd*) 4317c27c18e8Smrg with_gnu_ld=no 4318c27c18e8Smrg ;; 431921e67964Smrg esac 4320c43cc173Smrg 4321c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 432237eb1ca1Smrg 432337eb1ca1Smrg # On some targets, GNU ld is compatible enough with the native linker 432437eb1ca1Smrg # that we're better off using the native interface for both. 432537eb1ca1Smrg lt_use_gnu_ld_interface=no 4326c27c18e8Smrg if test "$with_gnu_ld" = yes; then 432737eb1ca1Smrg case $host_os in 432837eb1ca1Smrg aix*) 432937eb1ca1Smrg # The AIX port of GNU ld has always aspired to compatibility 433037eb1ca1Smrg # with the native linker. However, as the warning in the GNU ld 433137eb1ca1Smrg # block says, versions before 2.19.5* couldn't really create working 433237eb1ca1Smrg # shared libraries, regardless of the interface used. 433337eb1ca1Smrg case `$LD -v 2>&1` in 433437eb1ca1Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 433537eb1ca1Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 433637eb1ca1Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 433737eb1ca1Smrg *) 433837eb1ca1Smrg lt_use_gnu_ld_interface=yes 433937eb1ca1Smrg ;; 434037eb1ca1Smrg esac 434137eb1ca1Smrg ;; 434237eb1ca1Smrg *) 434337eb1ca1Smrg lt_use_gnu_ld_interface=yes 434437eb1ca1Smrg ;; 434537eb1ca1Smrg esac 434637eb1ca1Smrg fi 434737eb1ca1Smrg 434837eb1ca1Smrg if test "$lt_use_gnu_ld_interface" = yes; then 4349c27c18e8Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 4350c27c18e8Smrg wlarc='${wl}' 4351c43cc173Smrg 4352c27c18e8Smrg # Set some defaults for GNU ld with shared library support. These 4353c27c18e8Smrg # are reset later if shared libraries are not supported. Putting them 4354c27c18e8Smrg # here allows them to be overridden if necessary. 4355c27c18e8Smrg runpath_var=LD_RUN_PATH 4356c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4357c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4358c27c18e8Smrg # ancient GNU ld didn't support --whole-archive et. al. 4359c27c18e8Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4360c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4361c27c18e8Smrg else 4362c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4363c27c18e8Smrg fi 4364c27c18e8Smrg supports_anon_versioning=no 4365c27c18e8Smrg case `$LD -v 2>&1` in 436637eb1ca1Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 4367c27c18e8Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4368c27c18e8Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4369c27c18e8Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4370c27c18e8Smrg *\ 2.11.*) ;; # other 2.11 versions 4371c27c18e8Smrg *) supports_anon_versioning=yes ;; 4372c27c18e8Smrg esac 4373c43cc173Smrg 4374c27c18e8Smrg # See if GNU ld supports shared libraries. 4375c27c18e8Smrg case $host_os in 4376c27c18e8Smrg aix[[3-9]]*) 4377c27c18e8Smrg # On AIX/PPC, the GNU linker is very broken 4378c27c18e8Smrg if test "$host_cpu" != ia64; then 4379c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4380c27c18e8Smrg cat <<_LT_EOF 1>&2 4381c43cc173Smrg 438237eb1ca1Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 4383c27c18e8Smrg*** to be unable to reliably create shared libraries on AIX. 4384c27c18e8Smrg*** Therefore, libtool is disabling shared libraries support. If you 438537eb1ca1Smrg*** really care for shared libraries, you may want to install binutils 438637eb1ca1Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 438737eb1ca1Smrg*** You will then need to restart the configuration process. 4388c43cc173Smrg 4389c27c18e8Smrg_LT_EOF 4390c27c18e8Smrg fi 4391c27c18e8Smrg ;; 4392c43cc173Smrg 4393c27c18e8Smrg amigaos*) 4394c27c18e8Smrg case $host_cpu in 4395c27c18e8Smrg powerpc) 4396c27c18e8Smrg # see comment about AmigaOS4 .so support 4397c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4398c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4399c27c18e8Smrg ;; 4400c27c18e8Smrg m68k) 4401c27c18e8Smrg _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)' 4402c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4403c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4404c27c18e8Smrg ;; 4405c27c18e8Smrg esac 4406c27c18e8Smrg ;; 4407c43cc173Smrg 4408c27c18e8Smrg beos*) 4409c27c18e8Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4410c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4411c27c18e8Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4412c27c18e8Smrg # support --undefined. This deserves some investigation. FIXME 4413c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4414c27c18e8Smrg else 4415c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4416c27c18e8Smrg fi 4417c27c18e8Smrg ;; 441821e67964Smrg 4419c27c18e8Smrg cygwin* | mingw* | pw32* | cegcc*) 4420c27c18e8Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4421c27c18e8Smrg # as there is no search path for DLLs. 4422c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 442337eb1ca1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4424c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4425c27c18e8Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4426c27c18e8Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4427c27c18e8Smrg _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' 4428c27c18e8Smrg 4429c27c18e8Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4430c27c18e8Smrg _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' 4431c27c18e8Smrg # If the export-symbols file already is a .def file (1st line 4432c27c18e8Smrg # is EXPORTS), use it as is; otherwise, prepend... 4433c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4434c27c18e8Smrg cp $export_symbols $output_objdir/$soname.def; 4435c27c18e8Smrg else 4436c27c18e8Smrg echo EXPORTS > $output_objdir/$soname.def; 4437c27c18e8Smrg cat $export_symbols >> $output_objdir/$soname.def; 4438c27c18e8Smrg fi~ 4439c27c18e8Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4440c27c18e8Smrg else 4441c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4442c27c18e8Smrg fi 4443c27c18e8Smrg ;; 444421e67964Smrg 444537eb1ca1Smrg haiku*) 444637eb1ca1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 444737eb1ca1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 444837eb1ca1Smrg ;; 444937eb1ca1Smrg 4450c27c18e8Smrg interix[[3-9]]*) 4451c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4452c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4453c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4454c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4455c27c18e8Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4456c27c18e8Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4457c27c18e8Smrg # default) and relocated if they conflict, which is a slow very memory 4458c27c18e8Smrg # consuming and fragmenting process. To avoid this, we pick a random, 4459c27c18e8Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4460c27c18e8Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4461c27c18e8Smrg _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' 4462c27c18e8Smrg _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' 4463c27c18e8Smrg ;; 446421e67964Smrg 446537eb1ca1Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4466c27c18e8Smrg tmp_diet=no 4467c27c18e8Smrg if test "$host_os" = linux-dietlibc; then 4468c27c18e8Smrg case $cc_basename in 4469c27c18e8Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4470c27c18e8Smrg esac 4471c27c18e8Smrg fi 4472c27c18e8Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4473c27c18e8Smrg && test "$tmp_diet" = no 4474c27c18e8Smrg then 4475c27c18e8Smrg tmp_addflag= 4476c27c18e8Smrg tmp_sharedflag='-shared' 4477c27c18e8Smrg case $cc_basename,$host_cpu in 4478c27c18e8Smrg pgcc*) # Portland Group C compiler 447937eb1ca1Smrg _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' 4480c27c18e8Smrg tmp_addflag=' $pic_flag' 4481c27c18e8Smrg ;; 448237eb1ca1Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 448337eb1ca1Smrg # Portland Group f77 and f90 compilers 448437eb1ca1Smrg _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' 4485c27c18e8Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 4486c27c18e8Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4487c27c18e8Smrg tmp_addflag=' -i_dynamic' ;; 4488c27c18e8Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4489c27c18e8Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4490c27c18e8Smrg ifc* | ifort*) # Intel Fortran compiler 4491c27c18e8Smrg tmp_addflag=' -nofor_main' ;; 4492c27c18e8Smrg lf95*) # Lahey Fortran 8.1 4493c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4494c27c18e8Smrg tmp_sharedflag='--shared' ;; 449537eb1ca1Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4496c27c18e8Smrg tmp_sharedflag='-qmkshrobj' 4497c27c18e8Smrg tmp_addflag= ;; 449837eb1ca1Smrg nvcc*) # Cuda Compiler Driver 2.2 449937eb1ca1Smrg _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' 450037eb1ca1Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 450137eb1ca1Smrg ;; 4502c27c18e8Smrg esac 4503c27c18e8Smrg case `$CC -V 2>&1 | sed 5q` in 4504c27c18e8Smrg *Sun\ C*) # Sun C 5.9 450537eb1ca1Smrg _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' 4506c27c18e8Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4507c27c18e8Smrg tmp_sharedflag='-G' ;; 4508c27c18e8Smrg *Sun\ F*) # Sun Fortran 8.3 4509c27c18e8Smrg tmp_sharedflag='-G' ;; 4510c27c18e8Smrg esac 4511c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4512c43cc173Smrg 4513c27c18e8Smrg if test "x$supports_anon_versioning" = xyes; then 4514c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4515c27c18e8Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4516c27c18e8Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4517c27c18e8Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4518c27c18e8Smrg fi 4519c43cc173Smrg 4520c27c18e8Smrg case $cc_basename in 452137eb1ca1Smrg xlf* | bgf* | bgxlf* | mpixlf*) 4522c27c18e8Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4523c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4524c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4525c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 452637eb1ca1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4527c27c18e8Smrg if test "x$supports_anon_versioning" = xyes; then 4528c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4529c27c18e8Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4530c27c18e8Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 453137eb1ca1Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4532c27c18e8Smrg fi 4533c27c18e8Smrg ;; 4534c27c18e8Smrg esac 4535c27c18e8Smrg else 4536c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4537c27c18e8Smrg fi 4538c27c18e8Smrg ;; 4539c43cc173Smrg 4540c27c18e8Smrg netbsd*) 4541c27c18e8Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4542c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4543c27c18e8Smrg wlarc= 4544c27c18e8Smrg else 4545c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4546c27c18e8Smrg _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' 4547c27c18e8Smrg fi 4548c27c18e8Smrg ;; 4549c43cc173Smrg 4550c27c18e8Smrg solaris*) 4551c27c18e8Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4552c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4553c27c18e8Smrg cat <<_LT_EOF 1>&2 4554c43cc173Smrg 4555c27c18e8Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4556c27c18e8Smrg*** create shared libraries on Solaris systems. Therefore, libtool 4557c27c18e8Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4558c27c18e8Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 4559c27c18e8Smrg*** your PATH or compiler configuration so that the native linker is 4560c27c18e8Smrg*** used, and then restart. 4561c43cc173Smrg 4562c27c18e8Smrg_LT_EOF 4563c27c18e8Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4564c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4565c27c18e8Smrg _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' 4566c27c18e8Smrg else 4567c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4568c27c18e8Smrg fi 4569c27c18e8Smrg ;; 4570c43cc173Smrg 4571c27c18e8Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4572c27c18e8Smrg case `$LD -v 2>&1` in 4573c27c18e8Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4574c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4575c27c18e8Smrg cat <<_LT_EOF 1>&2 4576c43cc173Smrg 4577c27c18e8Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4578c27c18e8Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4579c27c18e8Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4580c27c18e8Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4581c27c18e8Smrg*** your PATH or compiler configuration so that the native linker is 4582c27c18e8Smrg*** used, and then restart. 4583c43cc173Smrg 4584c27c18e8Smrg_LT_EOF 4585c27c18e8Smrg ;; 4586c27c18e8Smrg *) 4587c27c18e8Smrg # For security reasons, it is highly recommended that you always 4588c27c18e8Smrg # use absolute paths for naming shared libraries, and exclude the 4589c27c18e8Smrg # DT_RUNPATH tag from executables and libraries. But doing so 4590c27c18e8Smrg # requires that you compile everything twice, which is a pain. 4591c27c18e8Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4592c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4593c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4594c27c18e8Smrg _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' 4595c27c18e8Smrg else 4596c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4597c27c18e8Smrg fi 4598c27c18e8Smrg ;; 4599c27c18e8Smrg esac 4600c27c18e8Smrg ;; 4601c43cc173Smrg 4602c27c18e8Smrg sunos4*) 4603c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4604c27c18e8Smrg wlarc= 4605c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4606c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4607c27c18e8Smrg ;; 4608c43cc173Smrg 4609c27c18e8Smrg *) 4610c27c18e8Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4611c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4612c27c18e8Smrg _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' 4613c27c18e8Smrg else 4614c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4615c27c18e8Smrg fi 4616c27c18e8Smrg ;; 4617c27c18e8Smrg esac 4618c43cc173Smrg 4619c27c18e8Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4620c27c18e8Smrg runpath_var= 4621c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4622c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4623c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4624c27c18e8Smrg fi 4625c27c18e8Smrg else 4626c27c18e8Smrg # PORTME fill in a description of your system's linker (not GNU ld) 4627c27c18e8Smrg case $host_os in 4628c27c18e8Smrg aix3*) 4629c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4630c27c18e8Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4631c27c18e8Smrg _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' 4632c27c18e8Smrg # Note: this linker hardcodes the directories in LIBPATH if there 4633c27c18e8Smrg # are no directories specified by -L. 4634c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4635c27c18e8Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4636c27c18e8Smrg # Neither direct hardcoding nor static linking is supported with a 4637c27c18e8Smrg # broken collect2. 4638c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4639c27c18e8Smrg fi 4640c27c18e8Smrg ;; 4641c43cc173Smrg 4642c27c18e8Smrg aix[[4-9]]*) 4643c27c18e8Smrg if test "$host_cpu" = ia64; then 4644c27c18e8Smrg # On IA64, the linker does run time linking by default, so we don't 4645c27c18e8Smrg # have to do anything special. 4646c27c18e8Smrg aix_use_runtimelinking=no 4647c27c18e8Smrg exp_sym_flag='-Bexport' 4648c27c18e8Smrg no_entry_flag="" 4649c27c18e8Smrg else 4650c27c18e8Smrg # If we're using GNU nm, then we don't want the "-C" option. 4651c27c18e8Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 465237eb1ca1Smrg # Also, AIX nm treats weak defined symbols like other global 465337eb1ca1Smrg # defined symbols, whereas GNU nm marks them as "W". 4654c27c18e8Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 465537eb1ca1Smrg _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' 4656c27c18e8Smrg else 4657c27c18e8Smrg _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' 4658c27c18e8Smrg fi 4659c27c18e8Smrg aix_use_runtimelinking=no 4660c43cc173Smrg 4661c27c18e8Smrg # Test if we are trying to use run time linking or normal 4662c27c18e8Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4663c27c18e8Smrg # need to do runtime linking. 4664c27c18e8Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4665c27c18e8Smrg for ld_flag in $LDFLAGS; do 4666c27c18e8Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4667c27c18e8Smrg aix_use_runtimelinking=yes 4668c27c18e8Smrg break 4669c27c18e8Smrg fi 4670c27c18e8Smrg done 4671c27c18e8Smrg ;; 4672c27c18e8Smrg esac 4673c43cc173Smrg 4674c27c18e8Smrg exp_sym_flag='-bexport' 4675c27c18e8Smrg no_entry_flag='-bnoentry' 4676c27c18e8Smrg fi 4677c27c18e8Smrg 4678c27c18e8Smrg # When large executables or shared objects are built, AIX ld can 4679c27c18e8Smrg # have problems creating the table of contents. If linking a library 4680c27c18e8Smrg # or program results in "error TOC overflow" add -mminimal-toc to 4681c27c18e8Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4682c27c18e8Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4683c43cc173Smrg 4684c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='' 4685c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4686c27c18e8Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4687c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4688c27c18e8Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4689c27c18e8Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4690c43cc173Smrg 4691c27c18e8Smrg if test "$GCC" = yes; then 4692c27c18e8Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4693c27c18e8Smrg # We only want to do this on AIX 4.2 and lower, the check 4694c27c18e8Smrg # below for broken collect2 doesn't work under 4.3+ 4695c27c18e8Smrg collect2name=`${CC} -print-prog-name=collect2` 4696c27c18e8Smrg if test -f "$collect2name" && 4697c27c18e8Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4698c27c18e8Smrg then 4699c27c18e8Smrg # We have reworked collect2 4700c27c18e8Smrg : 4701c27c18e8Smrg else 4702c27c18e8Smrg # We have old collect2 4703c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4704c27c18e8Smrg # It fails to find uninstalled libraries when the uninstalled 4705c27c18e8Smrg # path is not listed in the libpath. Setting hardcode_minus_L 4706c27c18e8Smrg # to unsupported forces relinking 4707c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4708c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4709c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4710c27c18e8Smrg fi 4711c27c18e8Smrg ;; 4712c27c18e8Smrg esac 4713c27c18e8Smrg shared_flag='-shared' 4714c27c18e8Smrg if test "$aix_use_runtimelinking" = yes; then 4715c27c18e8Smrg shared_flag="$shared_flag "'${wl}-G' 4716c27c18e8Smrg fi 4717c27c18e8Smrg else 4718c27c18e8Smrg # not using gcc 4719c27c18e8Smrg if test "$host_cpu" = ia64; then 4720c27c18e8Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4721c27c18e8Smrg # chokes on -Wl,-G. The following line is correct: 4722c27c18e8Smrg shared_flag='-G' 4723c27c18e8Smrg else 4724c27c18e8Smrg if test "$aix_use_runtimelinking" = yes; then 4725c27c18e8Smrg shared_flag='${wl}-G' 4726c27c18e8Smrg else 4727c27c18e8Smrg shared_flag='${wl}-bM:SRE' 4728c27c18e8Smrg fi 4729c27c18e8Smrg fi 4730c27c18e8Smrg fi 4731c43cc173Smrg 4732c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 4733c27c18e8Smrg # It seems that -bexpall does not export symbols beginning with 4734c27c18e8Smrg # underscore (_), so it is better to generate a list of symbols to export. 4735c27c18e8Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4736c27c18e8Smrg if test "$aix_use_runtimelinking" = yes; then 4737c27c18e8Smrg # Warning - without using the other runtime loading flags (-brtl), 4738c27c18e8Smrg # -berok will link without error, but may produce a broken library. 4739c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 4740c27c18e8Smrg # Determine the default libpath from the value encoded in an 4741c27c18e8Smrg # empty executable. 4742c27c18e8Smrg _LT_SYS_MODULE_PATH_AIX 4743c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 474437eb1ca1Smrg _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" 4745c27c18e8Smrg else 4746c27c18e8Smrg if test "$host_cpu" = ia64; then 4747c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4748c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4749c27c18e8Smrg _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" 4750c27c18e8Smrg else 4751c27c18e8Smrg # Determine the default libpath from the value encoded in an 4752c27c18e8Smrg # empty executable. 4753c27c18e8Smrg _LT_SYS_MODULE_PATH_AIX 4754c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4755c27c18e8Smrg # Warning - without using the other run time loading flags, 4756c27c18e8Smrg # -berok will link without error, but may produce a broken library. 4757c27c18e8Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 4758c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 475937eb1ca1Smrg if test "$with_gnu_ld" = yes; then 476037eb1ca1Smrg # We only use this code for GNU lds that support --whole-archive. 476137eb1ca1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 476237eb1ca1Smrg else 476337eb1ca1Smrg # Exported symbols can be pulled into shared objects from archives 476437eb1ca1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 476537eb1ca1Smrg fi 4766c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 4767c27c18e8Smrg # This is similar to how AIX traditionally builds its shared libraries. 4768c27c18e8Smrg _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' 4769c27c18e8Smrg fi 4770c27c18e8Smrg fi 4771c27c18e8Smrg ;; 4772c43cc173Smrg 4773c27c18e8Smrg amigaos*) 4774c27c18e8Smrg case $host_cpu in 4775c27c18e8Smrg powerpc) 4776c27c18e8Smrg # see comment about AmigaOS4 .so support 4777c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4778c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4779c27c18e8Smrg ;; 4780c27c18e8Smrg m68k) 4781c27c18e8Smrg _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)' 4782c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4783c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4784c27c18e8Smrg ;; 4785c27c18e8Smrg esac 4786c27c18e8Smrg ;; 4787c43cc173Smrg 4788c27c18e8Smrg bsdi[[45]]*) 4789c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 4790c27c18e8Smrg ;; 4791c43cc173Smrg 4792c27c18e8Smrg cygwin* | mingw* | pw32* | cegcc*) 4793c27c18e8Smrg # When not using gcc, we currently assume that we are using 4794c27c18e8Smrg # Microsoft Visual C++. 4795c27c18e8Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 4796c27c18e8Smrg # no search path for DLLs. 4797c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 4798c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4799c27c18e8Smrg # Tell ltmain to make .lib files, not .a files. 4800c27c18e8Smrg libext=lib 4801c27c18e8Smrg # Tell ltmain to make .dll files, not .so files. 4802c27c18e8Smrg shrext_cmds=".dll" 4803c27c18e8Smrg # FIXME: Setting linknames here is a bad hack. 480437eb1ca1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 4805c27c18e8Smrg # The linker will automatically build a .lib file if we build a DLL. 4806c27c18e8Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 4807c27c18e8Smrg # FIXME: Should let the user specify the lib program. 4808c27c18e8Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 4809c27c18e8Smrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 4810c27c18e8Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4811c27c18e8Smrg ;; 4812c43cc173Smrg 4813c27c18e8Smrg darwin* | rhapsody*) 4814c27c18e8Smrg _LT_DARWIN_LINKER_FEATURES($1) 4815c27c18e8Smrg ;; 4816c43cc173Smrg 4817c27c18e8Smrg dgux*) 4818c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4819c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4820c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4821c27c18e8Smrg ;; 4822c43cc173Smrg 4823c27c18e8Smrg freebsd1*) 4824c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4825c27c18e8Smrg ;; 4826c43cc173Smrg 4827c27c18e8Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 4828c27c18e8Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 4829c27c18e8Smrg # does not break anything, and helps significantly (at the cost of a little 4830c27c18e8Smrg # extra space). 4831c27c18e8Smrg freebsd2.2*) 4832c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 4833c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4834c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4835c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4836c27c18e8Smrg ;; 4837c43cc173Smrg 4838c27c18e8Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 4839c27c18e8Smrg freebsd2*) 4840c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4841c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4842c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4843c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4844c27c18e8Smrg ;; 4845c43cc173Smrg 4846c27c18e8Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 4847c27c18e8Smrg freebsd* | dragonfly*) 4848c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 4849c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4850c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4851c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4852c27c18e8Smrg ;; 4853c43cc173Smrg 4854c27c18e8Smrg hpux9*) 4855c27c18e8Smrg if test "$GCC" = yes; then 4856c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 4857c27c18e8Smrg else 4858c27c18e8Smrg _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' 4859c27c18e8Smrg fi 4860c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4861c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4862c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4863c43cc173Smrg 4864c27c18e8Smrg # hardcode_minus_L: Not really in the search PATH, 4865c27c18e8Smrg # but as the default location of the library. 4866c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4867c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4868c27c18e8Smrg ;; 4869c43cc173Smrg 4870c27c18e8Smrg hpux10*) 487137eb1ca1Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 4872c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4873c27c18e8Smrg else 4874c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 4875c27c18e8Smrg fi 4876c27c18e8Smrg if test "$with_gnu_ld" = no; then 4877c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4878c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4879c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4880c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4881c27c18e8Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4882c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4883c27c18e8Smrg # hardcode_minus_L: Not really in the search PATH, 4884c27c18e8Smrg # but as the default location of the library. 4885c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4886c27c18e8Smrg fi 4887c27c18e8Smrg ;; 4888c43cc173Smrg 4889c27c18e8Smrg hpux11*) 489037eb1ca1Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 4891c27c18e8Smrg case $host_cpu in 4892c27c18e8Smrg hppa*64*) 4893c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4894c27c18e8Smrg ;; 4895c27c18e8Smrg ia64*) 4896c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4897c27c18e8Smrg ;; 4898c27c18e8Smrg *) 4899c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4900c27c18e8Smrg ;; 4901c27c18e8Smrg esac 4902c27c18e8Smrg else 4903c27c18e8Smrg case $host_cpu in 4904c27c18e8Smrg hppa*64*) 4905c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4906c27c18e8Smrg ;; 4907c27c18e8Smrg ia64*) 4908c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4909c27c18e8Smrg ;; 4910c27c18e8Smrg *) 491137eb1ca1Smrg m4_if($1, [], [ 491237eb1ca1Smrg # Older versions of the 11.00 compiler do not understand -b yet 491337eb1ca1Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 491437eb1ca1Smrg _LT_LINKER_OPTION([if $CC understands -b], 491537eb1ca1Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 491637eb1ca1Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 491737eb1ca1Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 491837eb1ca1Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 4919c27c18e8Smrg ;; 4920c27c18e8Smrg esac 4921c27c18e8Smrg fi 4922c27c18e8Smrg if test "$with_gnu_ld" = no; then 4923c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4924c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4925c43cc173Smrg 4926c27c18e8Smrg case $host_cpu in 4927c27c18e8Smrg hppa*64*|ia64*) 4928c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4929c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4930c27c18e8Smrg ;; 4931c27c18e8Smrg *) 4932c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4933c27c18e8Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4934c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4935c27c18e8Smrg 4936c27c18e8Smrg # hardcode_minus_L: Not really in the search PATH, 4937c27c18e8Smrg # but as the default location of the library. 4938c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4939c27c18e8Smrg ;; 4940c27c18e8Smrg esac 4941c27c18e8Smrg fi 494221e67964Smrg ;; 4943c27c18e8Smrg 4944c27c18e8Smrg irix5* | irix6* | nonstopux*) 4945c27c18e8Smrg if test "$GCC" = yes; then 494637eb1ca1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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' 4947c27c18e8Smrg # Try to use the -exported_symbol ld option, if it does not 4948c27c18e8Smrg # work, assume that -exports_file does not work either and 4949c27c18e8Smrg # implicitly export all symbols. 4950c27c18e8Smrg save_LDFLAGS="$LDFLAGS" 4951c27c18e8Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 4952c27c18e8Smrg AC_LINK_IFELSE(int foo(void) {}, 495337eb1ca1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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' 4954c27c18e8Smrg ) 4955c27c18e8Smrg LDFLAGS="$save_LDFLAGS" 4956c27c18e8Smrg else 495737eb1ca1Smrg _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' 495837eb1ca1Smrg _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' 4959c27c18e8Smrg fi 4960c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4961c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4962c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4963c27c18e8Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 4964c27c18e8Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 496521e67964Smrg ;; 496621e67964Smrg 4967c27c18e8Smrg netbsd*) 4968c27c18e8Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4969c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 4970c27c18e8Smrg else 4971c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 4972c27c18e8Smrg fi 4973c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4974c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4975c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4976c27c18e8Smrg ;; 4977c43cc173Smrg 4978c27c18e8Smrg newsos6) 4979c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4980c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4981c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4982c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4983c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4984c27c18e8Smrg ;; 4985c43cc173Smrg 4986c27c18e8Smrg *nto* | *qnx*) 4987c27c18e8Smrg ;; 4988c43cc173Smrg 4989c27c18e8Smrg openbsd*) 4990c27c18e8Smrg if test -f /usr/libexec/ld.so; then 4991c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4992c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4993c27c18e8Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4994c27c18e8Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4995c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4996c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 4997c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4998c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4999c27c18e8Smrg else 5000c27c18e8Smrg case $host_os in 5001c27c18e8Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5002c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5003c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5004c27c18e8Smrg ;; 5005c27c18e8Smrg *) 5006c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5007c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5008c27c18e8Smrg ;; 5009c27c18e8Smrg esac 5010c27c18e8Smrg fi 5011c27c18e8Smrg else 5012c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5013c27c18e8Smrg fi 5014c27c18e8Smrg ;; 5015c43cc173Smrg 5016c27c18e8Smrg os2*) 5017c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5018c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5019c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 502037eb1ca1Smrg _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' 5021c27c18e8Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5022c27c18e8Smrg ;; 5023c43cc173Smrg 5024c27c18e8Smrg osf3*) 5025c27c18e8Smrg if test "$GCC" = yes; then 5026c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 502737eb1ca1Smrg _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' 5028c27c18e8Smrg else 5029c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 503037eb1ca1Smrg _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' 5031c27c18e8Smrg fi 5032c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5033c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5034c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5035c27c18e8Smrg ;; 5036c43cc173Smrg 5037c27c18e8Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5038c27c18e8Smrg if test "$GCC" = yes; then 5039c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 504037eb1ca1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_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' 5041c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5042c27c18e8Smrg else 5043c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 504437eb1ca1Smrg _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' 5045c27c18e8Smrg _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~ 504637eb1ca1Smrg $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' 5047c43cc173Smrg 5048c27c18e8Smrg # Both c and cxx compiler support -rpath directly 5049c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5050c27c18e8Smrg fi 5051c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5052c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5053c27c18e8Smrg ;; 5054c43cc173Smrg 5055c27c18e8Smrg solaris*) 5056c27c18e8Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5057c27c18e8Smrg if test "$GCC" = yes; then 5058c27c18e8Smrg wlarc='${wl}' 5059c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5060c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5061c27c18e8Smrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5062c27c18e8Smrg else 5063c27c18e8Smrg case `$CC -V 2>&1` in 5064c27c18e8Smrg *"Compilers 5.0"*) 5065c27c18e8Smrg wlarc='' 5066c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5067c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5068c27c18e8Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5069c27c18e8Smrg ;; 5070c27c18e8Smrg *) 5071c27c18e8Smrg wlarc='${wl}' 5072c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5073c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5074c27c18e8Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5075c27c18e8Smrg ;; 5076c27c18e8Smrg esac 5077c27c18e8Smrg fi 5078c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5079c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5080c27c18e8Smrg case $host_os in 5081c27c18e8Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5082c27c18e8Smrg *) 5083c27c18e8Smrg # The compiler driver will combine and reorder linker options, 5084c27c18e8Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 5085c27c18e8Smrg # but is careful enough not to reorder. 5086c27c18e8Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5087c27c18e8Smrg if test "$GCC" = yes; then 5088c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5089c27c18e8Smrg else 5090c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5091c27c18e8Smrg fi 5092c27c18e8Smrg ;; 5093c27c18e8Smrg esac 5094c27c18e8Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5095c27c18e8Smrg ;; 5096c43cc173Smrg 5097c27c18e8Smrg sunos4*) 5098c27c18e8Smrg if test "x$host_vendor" = xsequent; then 5099c27c18e8Smrg # Use $CC to link under sequent, because it throws in some extra .o 5100c27c18e8Smrg # files that make .init and .fini sections work. 5101c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5102c27c18e8Smrg else 5103c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5104c27c18e8Smrg fi 5105c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5106c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5107c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5108c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5109c27c18e8Smrg ;; 5110c43cc173Smrg 5111c27c18e8Smrg sysv4) 5112c27c18e8Smrg case $host_vendor in 5113c27c18e8Smrg sni) 5114c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5115c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5116c27c18e8Smrg ;; 5117c27c18e8Smrg siemens) 5118c27c18e8Smrg ## LD is ld it makes a PLAMLIB 5119c27c18e8Smrg ## CC just makes a GrossModule. 5120c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5121c27c18e8Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5122c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5123c27c18e8Smrg ;; 5124c27c18e8Smrg motorola) 5125c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5126c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5127c27c18e8Smrg ;; 5128c27c18e8Smrg esac 5129c27c18e8Smrg runpath_var='LD_RUN_PATH' 5130c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5131c27c18e8Smrg ;; 5132c43cc173Smrg 5133c27c18e8Smrg sysv4.3*) 5134c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5135c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5136c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5137c27c18e8Smrg ;; 5138c43cc173Smrg 5139c27c18e8Smrg sysv4*MP*) 5140c27c18e8Smrg if test -d /usr/nec; then 5141c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5142c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5143c27c18e8Smrg runpath_var=LD_RUN_PATH 5144c27c18e8Smrg hardcode_runpath_var=yes 5145c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5146c27c18e8Smrg fi 5147c27c18e8Smrg ;; 5148c43cc173Smrg 5149c27c18e8Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5150c27c18e8Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5151c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5152c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5153c27c18e8Smrg runpath_var='LD_RUN_PATH' 5154c43cc173Smrg 5155c27c18e8Smrg if test "$GCC" = yes; then 5156c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5157c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5158c27c18e8Smrg else 5159c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5160c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5161c27c18e8Smrg fi 5162c27c18e8Smrg ;; 5163c43cc173Smrg 5164c27c18e8Smrg sysv5* | sco3.2v5* | sco5v6*) 5165c27c18e8Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5166c27c18e8Smrg # link with -lc, and that would cause any symbols used from libc to 5167c27c18e8Smrg # always be unresolved, which means just about no library would 5168c27c18e8Smrg # ever link correctly. If we're not using GNU ld we use -z text 5169c27c18e8Smrg # though, which does catch some bad symbols but isn't as heavy-handed 5170c27c18e8Smrg # as -z defs. 5171c27c18e8Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5172c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5173c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5174c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5175c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5176c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5177c27c18e8Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5178c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5179c27c18e8Smrg runpath_var='LD_RUN_PATH' 5180c43cc173Smrg 5181c27c18e8Smrg if test "$GCC" = yes; then 5182c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5183c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5184c27c18e8Smrg else 5185c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5186c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5187c27c18e8Smrg fi 5188c27c18e8Smrg ;; 5189c43cc173Smrg 5190c27c18e8Smrg uts4*) 5191c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5192c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5193c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5194c27c18e8Smrg ;; 5195c43cc173Smrg 5196c27c18e8Smrg *) 5197c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5198c27c18e8Smrg ;; 5199c27c18e8Smrg esac 5200c43cc173Smrg 5201c27c18e8Smrg if test x$host_vendor = xsni; then 5202c27c18e8Smrg case $host in 5203c27c18e8Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5204c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5205c27c18e8Smrg ;; 5206c27c18e8Smrg esac 5207c27c18e8Smrg fi 5208c27c18e8Smrg fi 5209c27c18e8Smrg]) 5210c27c18e8SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5211c27c18e8Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5212c43cc173Smrg 5213c27c18e8Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5214c43cc173Smrg 5215c27c18e8Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5216c27c18e8Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5217c27c18e8Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 5218c27c18e8Smrg [The commands to extract the exported symbol list from a shared archive]) 5219c43cc173Smrg 5220c27c18e8Smrg# 5221c27c18e8Smrg# Do we need to explicitly link libc? 5222c27c18e8Smrg# 5223c27c18e8Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5224c27c18e8Smrgx|xyes) 5225c27c18e8Smrg # Assume -lc should be added 5226c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5227c43cc173Smrg 5228c27c18e8Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5229c27c18e8Smrg case $_LT_TAGVAR(archive_cmds, $1) in 5230c27c18e8Smrg *'~'*) 5231c27c18e8Smrg # FIXME: we may have to deal with multi-command sequences. 5232c27c18e8Smrg ;; 5233c27c18e8Smrg '$CC '*) 5234c27c18e8Smrg # Test whether the compiler implicitly links with -lc since on some 5235c27c18e8Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5236c27c18e8Smrg # to ld, don't add -lc before -lgcc. 523737eb1ca1Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 523837eb1ca1Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 523937eb1ca1Smrg [$RM conftest* 524037eb1ca1Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 524137eb1ca1Smrg 524237eb1ca1Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 524337eb1ca1Smrg soname=conftest 524437eb1ca1Smrg lib=conftest 524537eb1ca1Smrg libobjs=conftest.$ac_objext 524637eb1ca1Smrg deplibs= 524737eb1ca1Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 524837eb1ca1Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 524937eb1ca1Smrg compiler_flags=-v 525037eb1ca1Smrg linker_flags=-v 525137eb1ca1Smrg verstring= 525237eb1ca1Smrg output_objdir=. 525337eb1ca1Smrg libname=conftest 525437eb1ca1Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 525537eb1ca1Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 525637eb1ca1Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 525737eb1ca1Smrg then 525837eb1ca1Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 525937eb1ca1Smrg else 526037eb1ca1Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 526137eb1ca1Smrg fi 526237eb1ca1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 526337eb1ca1Smrg else 526437eb1ca1Smrg cat conftest.err 1>&5 526537eb1ca1Smrg fi 526637eb1ca1Smrg $RM conftest* 526737eb1ca1Smrg ]) 526837eb1ca1Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5269c27c18e8Smrg ;; 5270c27c18e8Smrg esac 5271c27c18e8Smrg fi 5272c27c18e8Smrg ;; 5273c27c18e8Smrgesac 5274c43cc173Smrg 5275c27c18e8Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5276c27c18e8Smrg [Whether or not to add -lc for building shared libraries]) 5277c27c18e8Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5278c27c18e8Smrg [enable_shared_with_static_runtimes], [0], 5279c27c18e8Smrg [Whether or not to disallow shared libs when runtime libs are static]) 5280c27c18e8Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5281c27c18e8Smrg [Compiler flag to allow reflexive dlopens]) 5282c27c18e8Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5283c27c18e8Smrg [Compiler flag to generate shared objects directly from archives]) 5284c27c18e8Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 5285c27c18e8Smrg [Whether the compiler copes with passing no objects directly]) 5286c27c18e8Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5287c27c18e8Smrg [Create an old-style archive from a shared archive]) 5288c27c18e8Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5289c27c18e8Smrg [Create a temporary old-style archive to link instead of a shared archive]) 5290c27c18e8Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5291c27c18e8Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5292c27c18e8Smrg_LT_TAGDECL([], [module_cmds], [2], 5293c27c18e8Smrg [Commands used to build a loadable module if different from building 5294c27c18e8Smrg a shared archive.]) 5295c27c18e8Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5296c27c18e8Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 5297c27c18e8Smrg [Whether we are building with GNU ld or not]) 5298c27c18e8Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5299c27c18e8Smrg [Flag that allows shared libraries with undefined symbols to be built]) 5300c27c18e8Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 5301c27c18e8Smrg [Flag that enforces no undefined symbols]) 5302c27c18e8Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5303c27c18e8Smrg [Flag to hardcode $libdir into a binary during linking. 5304c27c18e8Smrg This must work even if $libdir does not exist]) 5305c27c18e8Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5306c27c18e8Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 5307c27c18e8Smrg during linking. This must work even if $libdir does not exist]]) 5308c27c18e8Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5309c27c18e8Smrg [Whether we need a single "-rpath" flag with a separated argument]) 5310c27c18e8Smrg_LT_TAGDECL([], [hardcode_direct], [0], 5311c27c18e8Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5312c27c18e8Smrg DIR into the resulting binary]) 5313c27c18e8Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5314c27c18e8Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5315c27c18e8Smrg DIR into the resulting binary and the resulting library dependency is 5316c27c18e8Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5317c27c18e8Smrg library is relocated]) 5318c27c18e8Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5319c27c18e8Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5320c27c18e8Smrg into the resulting binary]) 5321c27c18e8Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5322c27c18e8Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5323c27c18e8Smrg into the resulting binary]) 5324c27c18e8Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 5325c27c18e8Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 5326c27c18e8Smrg into the library and all subsequent libraries and executables linked 5327c27c18e8Smrg against it]) 5328c27c18e8Smrg_LT_TAGDECL([], [inherit_rpath], [0], 5329c27c18e8Smrg [Set to yes if linker adds runtime paths of dependent libraries 5330c27c18e8Smrg to runtime path list]) 5331c27c18e8Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 5332c27c18e8Smrg [Whether libtool must link a program against all its dependency libraries]) 5333c27c18e8Smrg_LT_TAGDECL([], [fix_srcfile_path], [1], 5334c27c18e8Smrg [Fix the shell variable $srcfile for the compiler]) 5335c27c18e8Smrg_LT_TAGDECL([], [always_export_symbols], [0], 5336c27c18e8Smrg [Set to "yes" if exported symbols are required]) 5337c27c18e8Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5338c27c18e8Smrg [The commands to list exported symbols]) 5339c27c18e8Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 5340c27c18e8Smrg [Symbols that should not be listed in the preloaded symbols]) 5341c27c18e8Smrg_LT_TAGDECL([], [include_expsyms], [1], 5342c27c18e8Smrg [Symbols that must always be exported]) 5343c27c18e8Smrg_LT_TAGDECL([], [prelink_cmds], [2], 5344c27c18e8Smrg [Commands necessary for linking programs (against libraries) with templates]) 5345c27c18e8Smrg_LT_TAGDECL([], [file_list_spec], [1], 5346c27c18e8Smrg [Specify filename containing input files]) 5347c27c18e8Smrgdnl FIXME: Not yet implemented 5348c27c18e8Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5349c27c18e8Smrgdnl [Compiler flag to generate thread safe objects]) 5350c27c18e8Smrg])# _LT_LINKER_SHLIBS 5351c27c18e8Smrg 5352c27c18e8Smrg 5353c27c18e8Smrg# _LT_LANG_C_CONFIG([TAG]) 5354c27c18e8Smrg# ------------------------ 5355c27c18e8Smrg# Ensure that the configuration variables for a C compiler are suitably 5356c27c18e8Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5357c27c18e8Smrg# the compiler configuration to `libtool'. 5358c27c18e8Smrgm4_defun([_LT_LANG_C_CONFIG], 5359c27c18e8Smrg[m4_require([_LT_DECL_EGREP])dnl 5360c27c18e8Smrglt_save_CC="$CC" 5361c27c18e8SmrgAC_LANG_PUSH(C) 5362c43cc173Smrg 5363c27c18e8Smrg# Source file extension for C test sources. 5364c27c18e8Smrgac_ext=c 5365c43cc173Smrg 5366c27c18e8Smrg# Object file extension for compiled C test sources. 5367c27c18e8Smrgobjext=o 5368c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 5369c43cc173Smrg 5370c27c18e8Smrg# Code to be used in simple compile tests 5371c27c18e8Smrglt_simple_compile_test_code="int some_variable = 0;" 5372c43cc173Smrg 5373c27c18e8Smrg# Code to be used in simple link tests 5374c27c18e8Smrglt_simple_link_test_code='int main(){return(0);}' 5375c43cc173Smrg 5376c27c18e8Smrg_LT_TAG_COMPILER 5377c27c18e8Smrg# Save the default compiler, since it gets overwritten when the other 5378c27c18e8Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5379c27c18e8Smrgcompiler_DEFAULT=$CC 5380c43cc173Smrg 5381c27c18e8Smrg# save warnings/boilerplate of simple test code 5382c27c18e8Smrg_LT_COMPILER_BOILERPLATE 5383c27c18e8Smrg_LT_LINKER_BOILERPLATE 5384c43cc173Smrg 5385c27c18e8Smrgif test -n "$compiler"; then 5386c27c18e8Smrg _LT_COMPILER_NO_RTTI($1) 5387c27c18e8Smrg _LT_COMPILER_PIC($1) 5388c27c18e8Smrg _LT_COMPILER_C_O($1) 5389c27c18e8Smrg _LT_COMPILER_FILE_LOCKS($1) 5390c27c18e8Smrg _LT_LINKER_SHLIBS($1) 5391c27c18e8Smrg _LT_SYS_DYNAMIC_LINKER($1) 5392c27c18e8Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 5393c27c18e8Smrg LT_SYS_DLOPEN_SELF 5394c27c18e8Smrg _LT_CMD_STRIPLIB 5395c27c18e8Smrg 5396c27c18e8Smrg # Report which library types will actually be built 5397c27c18e8Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5398c27c18e8Smrg AC_MSG_RESULT([$can_build_shared]) 5399c27c18e8Smrg 5400c27c18e8Smrg AC_MSG_CHECKING([whether to build shared libraries]) 5401c27c18e8Smrg test "$can_build_shared" = "no" && enable_shared=no 5402c27c18e8Smrg 5403c27c18e8Smrg # On AIX, shared libraries and static libraries use the same namespace, and 5404c27c18e8Smrg # are all built from PIC. 5405c27c18e8Smrg case $host_os in 5406c27c18e8Smrg aix3*) 5407c27c18e8Smrg test "$enable_shared" = yes && enable_static=no 5408c27c18e8Smrg if test -n "$RANLIB"; then 5409c27c18e8Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5410c27c18e8Smrg postinstall_cmds='$RANLIB $lib' 5411c27c18e8Smrg fi 5412c27c18e8Smrg ;; 5413c43cc173Smrg 5414c27c18e8Smrg aix[[4-9]]*) 5415c27c18e8Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5416c27c18e8Smrg test "$enable_shared" = yes && enable_static=no 5417c27c18e8Smrg fi 5418c27c18e8Smrg ;; 5419c27c18e8Smrg esac 5420c27c18e8Smrg AC_MSG_RESULT([$enable_shared]) 5421c43cc173Smrg 5422c27c18e8Smrg AC_MSG_CHECKING([whether to build static libraries]) 5423c27c18e8Smrg # Make sure either enable_shared or enable_static is yes. 5424c27c18e8Smrg test "$enable_shared" = yes || enable_static=yes 5425c27c18e8Smrg AC_MSG_RESULT([$enable_static]) 5426c43cc173Smrg 5427c27c18e8Smrg _LT_CONFIG($1) 5428c27c18e8Smrgfi 5429c27c18e8SmrgAC_LANG_POP 5430c27c18e8SmrgCC="$lt_save_CC" 5431c27c18e8Smrg])# _LT_LANG_C_CONFIG 5432c43cc173Smrg 5433c43cc173Smrg 5434c27c18e8Smrg# _LT_LANG_CXX_CONFIG([TAG]) 5435c27c18e8Smrg# -------------------------- 5436c27c18e8Smrg# Ensure that the configuration variables for a C++ compiler are suitably 5437c27c18e8Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5438c27c18e8Smrg# the compiler configuration to `libtool'. 5439c27c18e8Smrgm4_defun([_LT_LANG_CXX_CONFIG], 544037eb1ca1Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5441c27c18e8Smrgm4_require([_LT_DECL_EGREP])dnl 544237eb1ca1Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 544337eb1ca1Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 544437eb1ca1Smrg (test "X$CXX" != "Xg++"))) ; then 544537eb1ca1Smrg AC_PROG_CXXCPP 544637eb1ca1Smrgelse 544737eb1ca1Smrg _lt_caught_CXX_error=yes 544837eb1ca1Smrgfi 5449c27c18e8Smrg 5450c27c18e8SmrgAC_LANG_PUSH(C++) 5451c27c18e8Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5452c27c18e8Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 5453c27c18e8Smrg_LT_TAGVAR(always_export_symbols, $1)=no 5454c27c18e8Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5455c27c18e8Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 5456c27c18e8Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5457c27c18e8Smrg_LT_TAGVAR(hardcode_direct, $1)=no 5458c27c18e8Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5459c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5460c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5461c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5462c27c18e8Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5463c27c18e8Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5464c27c18e8Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 5465c27c18e8Smrg_LT_TAGVAR(inherit_rpath, $1)=no 5466c27c18e8Smrg_LT_TAGVAR(module_cmds, $1)= 5467c27c18e8Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 5468c27c18e8Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5469c27c18e8Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 547037eb1ca1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 547137eb1ca1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5472c27c18e8Smrg_LT_TAGVAR(no_undefined_flag, $1)= 5473c27c18e8Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5474c27c18e8Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5475c43cc173Smrg 5476c27c18e8Smrg# Source file extension for C++ test sources. 5477c27c18e8Smrgac_ext=cpp 5478c43cc173Smrg 5479c27c18e8Smrg# Object file extension for compiled C++ test sources. 5480c27c18e8Smrgobjext=o 5481c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 5482c27c18e8Smrg 5483c27c18e8Smrg# No sense in running all these tests if we already determined that 5484c27c18e8Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 5485c27c18e8Smrg# are currently assumed to apply to all compilers on this platform, 5486c27c18e8Smrg# and will be corrupted by setting them based on a non-working compiler. 5487c27c18e8Smrgif test "$_lt_caught_CXX_error" != yes; then 5488c27c18e8Smrg # Code to be used in simple compile tests 5489c27c18e8Smrg lt_simple_compile_test_code="int some_variable = 0;" 5490c27c18e8Smrg 5491c27c18e8Smrg # Code to be used in simple link tests 5492c27c18e8Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5493c27c18e8Smrg 5494c27c18e8Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5495c27c18e8Smrg _LT_TAG_COMPILER 5496c27c18e8Smrg 5497c27c18e8Smrg # save warnings/boilerplate of simple test code 5498c27c18e8Smrg _LT_COMPILER_BOILERPLATE 5499c27c18e8Smrg _LT_LINKER_BOILERPLATE 5500c27c18e8Smrg 5501c27c18e8Smrg # Allow CC to be a program name with arguments. 5502c27c18e8Smrg lt_save_CC=$CC 5503c27c18e8Smrg lt_save_LD=$LD 5504c27c18e8Smrg lt_save_GCC=$GCC 5505c27c18e8Smrg GCC=$GXX 5506c27c18e8Smrg lt_save_with_gnu_ld=$with_gnu_ld 5507c27c18e8Smrg lt_save_path_LD=$lt_cv_path_LD 5508c27c18e8Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5509c27c18e8Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5510c27c18e8Smrg else 5511c27c18e8Smrg $as_unset lt_cv_prog_gnu_ld 5512c27c18e8Smrg fi 5513c27c18e8Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 5514c27c18e8Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 5515c27c18e8Smrg else 5516c27c18e8Smrg $as_unset lt_cv_path_LD 5517c27c18e8Smrg fi 5518c27c18e8Smrg test -z "${LDCXX+set}" || LD=$LDCXX 5519c27c18e8Smrg CC=${CXX-"c++"} 5520c27c18e8Smrg compiler=$CC 5521c27c18e8Smrg _LT_TAGVAR(compiler, $1)=$CC 5522c27c18e8Smrg _LT_CC_BASENAME([$compiler]) 5523c43cc173Smrg 5524c27c18e8Smrg if test -n "$compiler"; then 5525c27c18e8Smrg # We don't want -fno-exception when compiling C++ code, so set the 5526c27c18e8Smrg # no_builtin_flag separately 5527c27c18e8Smrg if test "$GXX" = yes; then 5528c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5529c27c18e8Smrg else 5530c27c18e8Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5531c27c18e8Smrg fi 5532c43cc173Smrg 5533c27c18e8Smrg if test "$GXX" = yes; then 5534c27c18e8Smrg # Set up default GNU C++ configuration 5535c43cc173Smrg 5536c27c18e8Smrg LT_PATH_LD 5537c43cc173Smrg 5538c27c18e8Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5539c27c18e8Smrg # archiving commands below assume that GNU ld is being used. 5540c27c18e8Smrg if test "$with_gnu_ld" = yes; then 5541c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5542c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5543c43cc173Smrg 5544c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5545c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5546c43cc173Smrg 5547c27c18e8Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5548c27c18e8Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5549c27c18e8Smrg # investigate it a little bit more. (MM) 5550c27c18e8Smrg wlarc='${wl}' 5551c43cc173Smrg 5552c27c18e8Smrg # ancient GNU ld didn't support --whole-archive et. al. 5553c27c18e8Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5554c27c18e8Smrg $GREP 'no-whole-archive' > /dev/null; then 5555c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5556c27c18e8Smrg else 5557c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5558c27c18e8Smrg fi 5559c27c18e8Smrg else 5560c27c18e8Smrg with_gnu_ld=no 5561c27c18e8Smrg wlarc= 5562c27c18e8Smrg 5563c27c18e8Smrg # A generic and very simple default shared library creation 5564c27c18e8Smrg # command for GNU C++ for the case where it uses the native 5565c27c18e8Smrg # linker, instead of GNU ld. If possible, this setting should 5566c27c18e8Smrg # overridden to take advantage of the native linker features on 5567c27c18e8Smrg # the platform it is being used on. 5568c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5569c27c18e8Smrg fi 5570c43cc173Smrg 5571c27c18e8Smrg # Commands to make compiler produce verbose output that lists 5572c27c18e8Smrg # what "hidden" libraries, object files and flags are used when 5573c27c18e8Smrg # linking a shared library. 557437eb1ca1Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 5575c43cc173Smrg 5576c27c18e8Smrg else 5577c27c18e8Smrg GXX=no 5578c27c18e8Smrg with_gnu_ld=no 5579c27c18e8Smrg wlarc= 5580c27c18e8Smrg fi 5581c43cc173Smrg 5582c27c18e8Smrg # PORTME: fill in a description of your system's C++ link characteristics 5583c27c18e8Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5584c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5585c27c18e8Smrg case $host_os in 5586c27c18e8Smrg aix3*) 5587c27c18e8Smrg # FIXME: insert proper C++ library support 5588c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5589c27c18e8Smrg ;; 5590c27c18e8Smrg aix[[4-9]]*) 5591c27c18e8Smrg if test "$host_cpu" = ia64; then 5592c27c18e8Smrg # On IA64, the linker does run time linking by default, so we don't 5593c27c18e8Smrg # have to do anything special. 5594c27c18e8Smrg aix_use_runtimelinking=no 5595c27c18e8Smrg exp_sym_flag='-Bexport' 5596c27c18e8Smrg no_entry_flag="" 5597c27c18e8Smrg else 5598c27c18e8Smrg aix_use_runtimelinking=no 5599c27c18e8Smrg 5600c27c18e8Smrg # Test if we are trying to use run time linking or normal 5601c27c18e8Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5602c27c18e8Smrg # need to do runtime linking. 5603c27c18e8Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5604c27c18e8Smrg for ld_flag in $LDFLAGS; do 5605c27c18e8Smrg case $ld_flag in 5606c27c18e8Smrg *-brtl*) 5607c27c18e8Smrg aix_use_runtimelinking=yes 5608c27c18e8Smrg break 5609c27c18e8Smrg ;; 5610c27c18e8Smrg esac 5611c27c18e8Smrg done 5612c27c18e8Smrg ;; 5613c27c18e8Smrg esac 5614c43cc173Smrg 5615c27c18e8Smrg exp_sym_flag='-bexport' 5616c27c18e8Smrg no_entry_flag='-bnoentry' 5617c27c18e8Smrg fi 5618c43cc173Smrg 5619c27c18e8Smrg # When large executables or shared objects are built, AIX ld can 5620c27c18e8Smrg # have problems creating the table of contents. If linking a library 5621c27c18e8Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5622c27c18e8Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5623c27c18e8Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5624c27c18e8Smrg 5625c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='' 5626c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5627c27c18e8Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5628c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5629c27c18e8Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5630c27c18e8Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5631c27c18e8Smrg 5632c27c18e8Smrg if test "$GXX" = yes; then 5633c27c18e8Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5634c27c18e8Smrg # We only want to do this on AIX 4.2 and lower, the check 5635c27c18e8Smrg # below for broken collect2 doesn't work under 4.3+ 5636c27c18e8Smrg collect2name=`${CC} -print-prog-name=collect2` 5637c27c18e8Smrg if test -f "$collect2name" && 5638c27c18e8Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5639c27c18e8Smrg then 5640c27c18e8Smrg # We have reworked collect2 5641c27c18e8Smrg : 5642c27c18e8Smrg else 5643c27c18e8Smrg # We have old collect2 5644c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5645c27c18e8Smrg # It fails to find uninstalled libraries when the uninstalled 5646c27c18e8Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5647c27c18e8Smrg # to unsupported forces relinking 5648c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5649c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5650c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5651c27c18e8Smrg fi 5652c27c18e8Smrg esac 5653c27c18e8Smrg shared_flag='-shared' 5654c27c18e8Smrg if test "$aix_use_runtimelinking" = yes; then 5655c27c18e8Smrg shared_flag="$shared_flag "'${wl}-G' 5656c27c18e8Smrg fi 5657c27c18e8Smrg else 5658c27c18e8Smrg # not using gcc 5659c27c18e8Smrg if test "$host_cpu" = ia64; then 5660c27c18e8Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5661c27c18e8Smrg # chokes on -Wl,-G. The following line is correct: 5662c27c18e8Smrg shared_flag='-G' 5663c27c18e8Smrg else 5664c27c18e8Smrg if test "$aix_use_runtimelinking" = yes; then 5665c27c18e8Smrg shared_flag='${wl}-G' 5666c27c18e8Smrg else 5667c27c18e8Smrg shared_flag='${wl}-bM:SRE' 5668c27c18e8Smrg fi 5669c27c18e8Smrg fi 5670c27c18e8Smrg fi 5671c43cc173Smrg 5672c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5673c27c18e8Smrg # It seems that -bexpall does not export symbols beginning with 5674c27c18e8Smrg # underscore (_), so it is better to generate a list of symbols to 5675c27c18e8Smrg # export. 5676c27c18e8Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5677c27c18e8Smrg if test "$aix_use_runtimelinking" = yes; then 5678c27c18e8Smrg # Warning - without using the other runtime loading flags (-brtl), 5679c27c18e8Smrg # -berok will link without error, but may produce a broken library. 5680c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5681c27c18e8Smrg # Determine the default libpath from the value encoded in an empty 5682c27c18e8Smrg # executable. 5683c27c18e8Smrg _LT_SYS_MODULE_PATH_AIX 5684c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5685c27c18e8Smrg 568637eb1ca1Smrg _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" 5687c27c18e8Smrg else 5688c27c18e8Smrg if test "$host_cpu" = ia64; then 5689c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5690c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5691c27c18e8Smrg _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" 5692c27c18e8Smrg else 5693c27c18e8Smrg # Determine the default libpath from the value encoded in an 5694c27c18e8Smrg # empty executable. 5695c27c18e8Smrg _LT_SYS_MODULE_PATH_AIX 5696c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5697c27c18e8Smrg # Warning - without using the other run time loading flags, 5698c27c18e8Smrg # -berok will link without error, but may produce a broken library. 5699c27c18e8Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5700c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 570137eb1ca1Smrg if test "$with_gnu_ld" = yes; then 570237eb1ca1Smrg # We only use this code for GNU lds that support --whole-archive. 570337eb1ca1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 570437eb1ca1Smrg else 570537eb1ca1Smrg # Exported symbols can be pulled into shared objects from archives 570637eb1ca1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 570737eb1ca1Smrg fi 5708c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5709c27c18e8Smrg # This is similar to how AIX traditionally builds its shared 5710c27c18e8Smrg # libraries. 5711c27c18e8Smrg _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' 5712c27c18e8Smrg fi 5713c27c18e8Smrg fi 5714c27c18e8Smrg ;; 5715c43cc173Smrg 5716c27c18e8Smrg beos*) 5717c27c18e8Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5718c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5719c27c18e8Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5720c27c18e8Smrg # support --undefined. This deserves some investigation. FIXME 5721c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5722c27c18e8Smrg else 5723c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5724c27c18e8Smrg fi 5725c27c18e8Smrg ;; 5726c43cc173Smrg 5727c27c18e8Smrg chorus*) 5728c27c18e8Smrg case $cc_basename in 5729c27c18e8Smrg *) 5730c27c18e8Smrg # FIXME: insert proper C++ library support 5731c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5732c27c18e8Smrg ;; 5733c27c18e8Smrg esac 5734c27c18e8Smrg ;; 5735c43cc173Smrg 5736c27c18e8Smrg cygwin* | mingw* | pw32* | cegcc*) 5737c27c18e8Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5738c27c18e8Smrg # as there is no search path for DLLs. 5739c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 574037eb1ca1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 5741c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5742c27c18e8Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5743c27c18e8Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5744c27c18e8Smrg 5745c27c18e8Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5746c27c18e8Smrg _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' 5747c27c18e8Smrg # If the export-symbols file already is a .def file (1st line 5748c27c18e8Smrg # is EXPORTS), use it as is; otherwise, prepend... 5749c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5750c27c18e8Smrg cp $export_symbols $output_objdir/$soname.def; 5751c27c18e8Smrg else 5752c27c18e8Smrg echo EXPORTS > $output_objdir/$soname.def; 5753c27c18e8Smrg cat $export_symbols >> $output_objdir/$soname.def; 5754c27c18e8Smrg fi~ 5755c27c18e8Smrg $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' 5756c27c18e8Smrg else 5757c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5758c27c18e8Smrg fi 5759c27c18e8Smrg ;; 5760c27c18e8Smrg darwin* | rhapsody*) 5761c27c18e8Smrg _LT_DARWIN_LINKER_FEATURES($1) 5762c27c18e8Smrg ;; 5763c43cc173Smrg 5764c27c18e8Smrg dgux*) 5765c27c18e8Smrg case $cc_basename in 5766c27c18e8Smrg ec++*) 5767c27c18e8Smrg # FIXME: insert proper C++ library support 5768c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5769c27c18e8Smrg ;; 5770c27c18e8Smrg ghcx*) 5771c27c18e8Smrg # Green Hills C++ Compiler 5772c27c18e8Smrg # FIXME: insert proper C++ library support 5773c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5774c27c18e8Smrg ;; 5775c27c18e8Smrg *) 5776c27c18e8Smrg # FIXME: insert proper C++ library support 5777c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5778c27c18e8Smrg ;; 5779c27c18e8Smrg esac 5780c27c18e8Smrg ;; 5781c27c18e8Smrg 5782c27c18e8Smrg freebsd[[12]]*) 5783c27c18e8Smrg # C++ shared libraries reported to be fairly broken before 5784c27c18e8Smrg # switch to ELF 5785c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5786c27c18e8Smrg ;; 5787c43cc173Smrg 5788c27c18e8Smrg freebsd-elf*) 5789c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5790c27c18e8Smrg ;; 5791c43cc173Smrg 5792c27c18e8Smrg freebsd* | dragonfly*) 5793c27c18e8Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 5794c27c18e8Smrg # conventions 5795c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5796c27c18e8Smrg ;; 5797c43cc173Smrg 5798c27c18e8Smrg gnu*) 5799c27c18e8Smrg ;; 5800c43cc173Smrg 580137eb1ca1Smrg haiku*) 580237eb1ca1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 580337eb1ca1Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 580437eb1ca1Smrg ;; 580537eb1ca1Smrg 5806c27c18e8Smrg hpux9*) 5807c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5808c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5809c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5810c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5811c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5812c27c18e8Smrg # but as the default 5813c27c18e8Smrg # location of the library. 5814c27c18e8Smrg 5815c27c18e8Smrg case $cc_basename in 5816c27c18e8Smrg CC*) 5817c27c18e8Smrg # FIXME: insert proper C++ library support 5818c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5819c27c18e8Smrg ;; 5820c27c18e8Smrg aCC*) 5821c27c18e8Smrg _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' 5822c27c18e8Smrg # Commands to make compiler produce verbose output that lists 5823c27c18e8Smrg # what "hidden" libraries, object files and flags are used when 5824c27c18e8Smrg # linking a shared library. 5825c27c18e8Smrg # 5826c27c18e8Smrg # There doesn't appear to be a way to prevent this compiler from 5827c27c18e8Smrg # explicitly linking system object files so we need to strip them 5828c27c18e8Smrg # from the output so that they don't get included in the library 5829c27c18e8Smrg # dependencies. 583037eb1ca1Smrg 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"' 5831c27c18e8Smrg ;; 5832c27c18e8Smrg *) 5833c27c18e8Smrg if test "$GXX" = yes; then 5834c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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' 5835c27c18e8Smrg else 5836c27c18e8Smrg # FIXME: insert proper C++ library support 5837c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5838c27c18e8Smrg fi 5839c27c18e8Smrg ;; 5840c27c18e8Smrg esac 5841c27c18e8Smrg ;; 5842c43cc173Smrg 5843c27c18e8Smrg hpux10*|hpux11*) 5844c27c18e8Smrg if test $with_gnu_ld = no; then 5845c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5846c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5847c27c18e8Smrg 5848c27c18e8Smrg case $host_cpu in 5849c27c18e8Smrg hppa*64*|ia64*) 5850c27c18e8Smrg ;; 5851c27c18e8Smrg *) 5852c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5853c27c18e8Smrg ;; 5854c27c18e8Smrg esac 5855c27c18e8Smrg fi 5856c27c18e8Smrg case $host_cpu in 5857c27c18e8Smrg hppa*64*|ia64*) 5858c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5859c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5860c27c18e8Smrg ;; 5861c27c18e8Smrg *) 5862c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5863c27c18e8Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5864c27c18e8Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5865c27c18e8Smrg # but as the default 5866c27c18e8Smrg # location of the library. 5867c27c18e8Smrg ;; 5868c27c18e8Smrg esac 5869c27c18e8Smrg 5870c27c18e8Smrg case $cc_basename in 5871c27c18e8Smrg CC*) 5872c27c18e8Smrg # FIXME: insert proper C++ library support 5873c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5874c27c18e8Smrg ;; 5875c27c18e8Smrg aCC*) 5876c27c18e8Smrg case $host_cpu in 5877c27c18e8Smrg hppa*64*) 5878c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5879c27c18e8Smrg ;; 5880c27c18e8Smrg ia64*) 5881c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5882c27c18e8Smrg ;; 5883c27c18e8Smrg *) 5884c27c18e8Smrg _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' 5885c27c18e8Smrg ;; 5886c27c18e8Smrg esac 5887c27c18e8Smrg # Commands to make compiler produce verbose output that lists 5888c27c18e8Smrg # what "hidden" libraries, object files and flags are used when 5889c27c18e8Smrg # linking a shared library. 5890c27c18e8Smrg # 5891c27c18e8Smrg # There doesn't appear to be a way to prevent this compiler from 5892c27c18e8Smrg # explicitly linking system object files so we need to strip them 5893c27c18e8Smrg # from the output so that they don't get included in the library 5894c27c18e8Smrg # dependencies. 589537eb1ca1Smrg 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"' 5896c27c18e8Smrg ;; 5897c27c18e8Smrg *) 5898c27c18e8Smrg if test "$GXX" = yes; then 5899c27c18e8Smrg if test $with_gnu_ld = no; then 5900c27c18e8Smrg case $host_cpu in 5901c27c18e8Smrg hppa*64*) 5902c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5903c27c18e8Smrg ;; 5904c27c18e8Smrg ia64*) 5905c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5906c27c18e8Smrg ;; 5907c27c18e8Smrg *) 5908c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5909c27c18e8Smrg ;; 5910c27c18e8Smrg esac 5911c27c18e8Smrg fi 5912c27c18e8Smrg else 5913c27c18e8Smrg # FIXME: insert proper C++ library support 5914c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5915c27c18e8Smrg fi 5916c27c18e8Smrg ;; 5917c27c18e8Smrg esac 5918c27c18e8Smrg ;; 5919c43cc173Smrg 5920c27c18e8Smrg interix[[3-9]]*) 5921c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5922c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5923c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5924c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5925c27c18e8Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5926c27c18e8Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5927c27c18e8Smrg # default) and relocated if they conflict, which is a slow very memory 5928c27c18e8Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5929c27c18e8Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5930c27c18e8Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5931c27c18e8Smrg _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' 5932c27c18e8Smrg _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' 5933c27c18e8Smrg ;; 5934c27c18e8Smrg irix5* | irix6*) 5935c27c18e8Smrg case $cc_basename in 5936c27c18e8Smrg CC*) 5937c27c18e8Smrg # SGI C++ 593837eb1ca1Smrg _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' 5939c27c18e8Smrg 5940c27c18e8Smrg # Archives containing C++ object files must be created using 5941c27c18e8Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 5942c27c18e8Smrg # necessary to make sure instantiated templates are included 5943c27c18e8Smrg # in the archive. 5944c27c18e8Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 5945c27c18e8Smrg ;; 5946c27c18e8Smrg *) 5947c27c18e8Smrg if test "$GXX" = yes; then 5948c27c18e8Smrg if test "$with_gnu_ld" = no; then 594937eb1ca1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 5950c27c18e8Smrg else 595137eb1ca1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 5952c27c18e8Smrg fi 5953c27c18e8Smrg fi 5954c27c18e8Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5955c27c18e8Smrg ;; 5956c27c18e8Smrg esac 5957c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5958c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5959c27c18e8Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5960c27c18e8Smrg ;; 5961c43cc173Smrg 596237eb1ca1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 5963c27c18e8Smrg case $cc_basename in 5964c27c18e8Smrg KCC*) 5965c27c18e8Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 5966c27c18e8Smrg 5967c27c18e8Smrg # KCC will only create a shared library if the output file 5968c27c18e8Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 5969c27c18e8Smrg # to its proper name (with version) after linking. 5970c27c18e8Smrg _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' 5971c27c18e8Smrg _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' 5972c27c18e8Smrg # Commands to make compiler produce verbose output that lists 5973c27c18e8Smrg # what "hidden" libraries, object files and flags are used when 5974c27c18e8Smrg # linking a shared library. 5975c27c18e8Smrg # 5976c27c18e8Smrg # There doesn't appear to be a way to prevent this compiler from 5977c27c18e8Smrg # explicitly linking system object files so we need to strip them 5978c27c18e8Smrg # from the output so that they don't get included in the library 5979c27c18e8Smrg # dependencies. 598037eb1ca1Smrg 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"' 5981c27c18e8Smrg 5982c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5983c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5984c27c18e8Smrg 5985c27c18e8Smrg # Archives containing C++ object files must be created using 5986c27c18e8Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5987c27c18e8Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5988c27c18e8Smrg ;; 5989c27c18e8Smrg icpc* | ecpc* ) 5990c27c18e8Smrg # Intel C++ 5991c27c18e8Smrg with_gnu_ld=yes 5992c27c18e8Smrg # version 8.0 and above of icpc choke on multiply defined symbols 5993c27c18e8Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 5994c27c18e8Smrg # earlier do not add the objects themselves. 5995c27c18e8Smrg case `$CC -V 2>&1` in 5996c27c18e8Smrg *"Version 7."*) 5997c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5998c27c18e8Smrg _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' 5999c27c18e8Smrg ;; 6000c27c18e8Smrg *) # Version 8.0 or newer 6001c27c18e8Smrg tmp_idyn= 6002c27c18e8Smrg case $host_cpu in 6003c27c18e8Smrg ia64*) tmp_idyn=' -i_dynamic';; 6004c27c18e8Smrg esac 6005c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6006c27c18e8Smrg _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' 6007c27c18e8Smrg ;; 6008c27c18e8Smrg esac 6009c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6010c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6011c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6012c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6013c27c18e8Smrg ;; 6014c27c18e8Smrg pgCC* | pgcpp*) 6015c27c18e8Smrg # Portland Group C++ compiler 6016c27c18e8Smrg case `$CC -V` in 601737eb1ca1Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6018c27c18e8Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6019c27c18e8Smrg rm -rf $tpldir~ 6020c27c18e8Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 602137eb1ca1Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6022c27c18e8Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6023c27c18e8Smrg rm -rf $tpldir~ 6024c27c18e8Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 602537eb1ca1Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6026c27c18e8Smrg $RANLIB $oldlib' 6027c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6028c27c18e8Smrg rm -rf $tpldir~ 6029c27c18e8Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 603037eb1ca1Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6031c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6032c27c18e8Smrg rm -rf $tpldir~ 6033c27c18e8Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 603437eb1ca1Smrg $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' 6035c27c18e8Smrg ;; 603637eb1ca1Smrg *) # Version 6 and above use weak symbols 6037c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6038c27c18e8Smrg _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' 6039c27c18e8Smrg ;; 6040c27c18e8Smrg esac 6041c43cc173Smrg 6042c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6043c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 604437eb1ca1Smrg _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' 6045c27c18e8Smrg ;; 6046c27c18e8Smrg cxx*) 6047c27c18e8Smrg # Compaq C++ 6048c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6049c27c18e8Smrg _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' 6050c43cc173Smrg 6051c27c18e8Smrg runpath_var=LD_RUN_PATH 6052c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6053c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 605421e67964Smrg 6055c27c18e8Smrg # Commands to make compiler produce verbose output that lists 6056c27c18e8Smrg # what "hidden" libraries, object files and flags are used when 6057c27c18e8Smrg # linking a shared library. 6058c27c18e8Smrg # 6059c27c18e8Smrg # There doesn't appear to be a way to prevent this compiler from 6060c27c18e8Smrg # explicitly linking system object files so we need to strip them 6061c27c18e8Smrg # from the output so that they don't get included in the library 6062c27c18e8Smrg # dependencies. 606337eb1ca1Smrg 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' 6064c27c18e8Smrg ;; 606537eb1ca1Smrg xl* | mpixl* | bgxl*) 6066c27c18e8Smrg # IBM XL 8.0 on PPC, with GNU ld 6067c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6068c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6069c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6070c27c18e8Smrg if test "x$supports_anon_versioning" = xyes; then 6071c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6072c27c18e8Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6073c27c18e8Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6074c27c18e8Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6075c27c18e8Smrg fi 6076c27c18e8Smrg ;; 6077c27c18e8Smrg *) 6078c27c18e8Smrg case `$CC -V 2>&1 | sed 5q` in 6079c27c18e8Smrg *Sun\ C*) 6080c27c18e8Smrg # Sun C++ 5.9 6081c27c18e8Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6082c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6083c27c18e8Smrg _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' 6084c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 608537eb1ca1Smrg _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' 6086c27c18e8Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6087c27c18e8Smrg 6088c27c18e8Smrg # Not sure whether something based on 6089c27c18e8Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6090c27c18e8Smrg # would be better. 609137eb1ca1Smrg output_verbose_link_cmd='func_echo_all' 6092c27c18e8Smrg 6093c27c18e8Smrg # Archives containing C++ object files must be created using 6094c27c18e8Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6095c27c18e8Smrg # necessary to make sure instantiated templates are included 6096c27c18e8Smrg # in the archive. 6097c27c18e8Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6098c27c18e8Smrg ;; 6099c27c18e8Smrg esac 6100c27c18e8Smrg ;; 6101c27c18e8Smrg esac 6102c27c18e8Smrg ;; 6103c43cc173Smrg 6104c27c18e8Smrg lynxos*) 6105c27c18e8Smrg # FIXME: insert proper C++ library support 6106c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6107c27c18e8Smrg ;; 6108c43cc173Smrg 6109c27c18e8Smrg m88k*) 6110c27c18e8Smrg # FIXME: insert proper C++ library support 6111c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6112c27c18e8Smrg ;; 6113c43cc173Smrg 6114c27c18e8Smrg mvs*) 6115c27c18e8Smrg case $cc_basename in 6116c27c18e8Smrg cxx*) 6117c27c18e8Smrg # FIXME: insert proper C++ library support 6118c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6119c27c18e8Smrg ;; 6120c27c18e8Smrg *) 6121c27c18e8Smrg # FIXME: insert proper C++ library support 6122c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6123c27c18e8Smrg ;; 6124c27c18e8Smrg esac 6125c27c18e8Smrg ;; 6126c43cc173Smrg 6127c27c18e8Smrg netbsd*) 6128c27c18e8Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6129c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6130c27c18e8Smrg wlarc= 6131c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6132c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6133c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6134c27c18e8Smrg fi 6135c27c18e8Smrg # Workaround some broken pre-1.5 toolchains 6136c27c18e8Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6137c27c18e8Smrg ;; 6138c43cc173Smrg 6139c27c18e8Smrg *nto* | *qnx*) 6140c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6141c27c18e8Smrg ;; 6142c43cc173Smrg 6143c27c18e8Smrg openbsd2*) 6144c27c18e8Smrg # C++ shared libraries are fairly broken 6145c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6146c27c18e8Smrg ;; 6147c43cc173Smrg 6148c27c18e8Smrg openbsd*) 6149c27c18e8Smrg if test -f /usr/libexec/ld.so; then 6150c27c18e8Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6151c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6152c27c18e8Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6153c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6154c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6155c27c18e8Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6156c27c18e8Smrg _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' 6157c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6158c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6159c27c18e8Smrg fi 616037eb1ca1Smrg output_verbose_link_cmd=func_echo_all 6161c27c18e8Smrg else 6162c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6163c27c18e8Smrg fi 6164c27c18e8Smrg ;; 6165c43cc173Smrg 6166c27c18e8Smrg osf3* | osf4* | osf5*) 6167c27c18e8Smrg case $cc_basename in 6168c27c18e8Smrg KCC*) 6169c27c18e8Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6170c27c18e8Smrg 6171c27c18e8Smrg # KCC will only create a shared library if the output file 6172c27c18e8Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6173c27c18e8Smrg # to its proper name (with version) after linking. 6174c27c18e8Smrg _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' 6175c27c18e8Smrg 6176c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6177c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6178c27c18e8Smrg 6179c27c18e8Smrg # Archives containing C++ object files must be created using 6180c27c18e8Smrg # the KAI C++ compiler. 6181c27c18e8Smrg case $host in 6182c27c18e8Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6183c27c18e8Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6184c27c18e8Smrg esac 6185c27c18e8Smrg ;; 6186c27c18e8Smrg RCC*) 6187c27c18e8Smrg # Rational C++ 2.4.1 6188c27c18e8Smrg # FIXME: insert proper C++ library support 6189c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6190c27c18e8Smrg ;; 6191c27c18e8Smrg cxx*) 6192c27c18e8Smrg case $host in 6193c27c18e8Smrg osf3*) 6194c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 619537eb1ca1Smrg _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' 6196c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6197c27c18e8Smrg ;; 6198c27c18e8Smrg *) 6199c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 620037eb1ca1Smrg _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' 6201c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6202c27c18e8Smrg echo "-hidden">> $lib.exp~ 620337eb1ca1Smrg $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~ 6204c27c18e8Smrg $RM $lib.exp' 6205c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6206c27c18e8Smrg ;; 6207c27c18e8Smrg esac 6208c43cc173Smrg 6209c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6210c43cc173Smrg 6211c27c18e8Smrg # Commands to make compiler produce verbose output that lists 6212c27c18e8Smrg # what "hidden" libraries, object files and flags are used when 6213c27c18e8Smrg # linking a shared library. 6214c27c18e8Smrg # 6215c27c18e8Smrg # There doesn't appear to be a way to prevent this compiler from 6216c27c18e8Smrg # explicitly linking system object files so we need to strip them 6217c27c18e8Smrg # from the output so that they don't get included in the library 6218c27c18e8Smrg # dependencies. 621937eb1ca1Smrg 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"' 6220c27c18e8Smrg ;; 6221c27c18e8Smrg *) 6222c27c18e8Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6223c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6224c27c18e8Smrg case $host in 6225c27c18e8Smrg osf3*) 622637eb1ca1Smrg _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' 6227c27c18e8Smrg ;; 6228c27c18e8Smrg *) 622937eb1ca1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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' 6230c27c18e8Smrg ;; 6231c27c18e8Smrg esac 6232c27c18e8Smrg 6233c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6234c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6235c27c18e8Smrg 6236c27c18e8Smrg # Commands to make compiler produce verbose output that lists 6237c27c18e8Smrg # what "hidden" libraries, object files and flags are used when 6238c27c18e8Smrg # linking a shared library. 623937eb1ca1Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6240c27c18e8Smrg 6241c27c18e8Smrg else 6242c27c18e8Smrg # FIXME: insert proper C++ library support 6243c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6244c27c18e8Smrg fi 6245c27c18e8Smrg ;; 6246c27c18e8Smrg esac 6247c27c18e8Smrg ;; 6248c43cc173Smrg 6249c27c18e8Smrg psos*) 6250c27c18e8Smrg # FIXME: insert proper C++ library support 6251c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6252c27c18e8Smrg ;; 6253c43cc173Smrg 6254c27c18e8Smrg sunos4*) 6255c27c18e8Smrg case $cc_basename in 6256c27c18e8Smrg CC*) 6257c27c18e8Smrg # Sun C++ 4.x 6258c27c18e8Smrg # FIXME: insert proper C++ library support 6259c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6260c27c18e8Smrg ;; 6261c27c18e8Smrg lcc*) 6262c27c18e8Smrg # Lucid 6263c27c18e8Smrg # FIXME: insert proper C++ library support 6264c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6265c27c18e8Smrg ;; 6266c27c18e8Smrg *) 6267c27c18e8Smrg # FIXME: insert proper C++ library support 6268c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6269c27c18e8Smrg ;; 6270c27c18e8Smrg esac 6271c27c18e8Smrg ;; 6272c43cc173Smrg 6273c27c18e8Smrg solaris*) 6274c27c18e8Smrg case $cc_basename in 627537eb1ca1Smrg CC* | sunCC*) 6276c27c18e8Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6277c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6278c27c18e8Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6279c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6280c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6281c27c18e8Smrg $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' 6282c27c18e8Smrg 6283c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6284c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6285c27c18e8Smrg case $host_os in 6286c27c18e8Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6287c27c18e8Smrg *) 6288c27c18e8Smrg # The compiler driver will combine and reorder linker options, 6289c27c18e8Smrg # but understands `-z linker_flag'. 6290c27c18e8Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6291c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6292c27c18e8Smrg ;; 6293c27c18e8Smrg esac 6294c27c18e8Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6295c43cc173Smrg 629637eb1ca1Smrg output_verbose_link_cmd='func_echo_all' 6297c43cc173Smrg 6298c27c18e8Smrg # Archives containing C++ object files must be created using 6299c27c18e8Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6300c27c18e8Smrg # necessary to make sure instantiated templates are included 6301c27c18e8Smrg # in the archive. 6302c27c18e8Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6303c27c18e8Smrg ;; 6304c27c18e8Smrg gcx*) 6305c27c18e8Smrg # Green Hills C++ Compiler 6306c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6307c43cc173Smrg 6308c27c18e8Smrg # The C++ compiler must be used to create the archive. 6309c27c18e8Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6310c27c18e8Smrg ;; 6311c27c18e8Smrg *) 6312c27c18e8Smrg # GNU C++ compiler with Solaris linker 6313c27c18e8Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6314c27c18e8Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6315c27c18e8Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6316c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6317c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6318c27c18e8Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6319c27c18e8Smrg 6320c27c18e8Smrg # Commands to make compiler produce verbose output that lists 6321c27c18e8Smrg # what "hidden" libraries, object files and flags are used when 6322c27c18e8Smrg # linking a shared library. 632337eb1ca1Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6324c27c18e8Smrg else 6325c27c18e8Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6326c27c18e8Smrg # platform. 6327c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6328c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6329c27c18e8Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6330c27c18e8Smrg 6331c27c18e8Smrg # Commands to make compiler produce verbose output that lists 6332c27c18e8Smrg # what "hidden" libraries, object files and flags are used when 6333c27c18e8Smrg # linking a shared library. 633437eb1ca1Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6335c27c18e8Smrg fi 6336c27c18e8Smrg 6337c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6338c27c18e8Smrg case $host_os in 6339c27c18e8Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6340c27c18e8Smrg *) 6341c27c18e8Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6342c27c18e8Smrg ;; 6343c27c18e8Smrg esac 6344c27c18e8Smrg fi 6345c27c18e8Smrg ;; 6346c27c18e8Smrg esac 6347c27c18e8Smrg ;; 6348c43cc173Smrg 6349c27c18e8Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6350c27c18e8Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6351c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6352c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6353c27c18e8Smrg runpath_var='LD_RUN_PATH' 6354c43cc173Smrg 6355c27c18e8Smrg case $cc_basename in 6356c27c18e8Smrg CC*) 6357c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6358c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6359c27c18e8Smrg ;; 6360c27c18e8Smrg *) 6361c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6362c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6363c27c18e8Smrg ;; 6364c27c18e8Smrg esac 6365c27c18e8Smrg ;; 6366c43cc173Smrg 6367c27c18e8Smrg sysv5* | sco3.2v5* | sco5v6*) 6368c27c18e8Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6369c27c18e8Smrg # link with -lc, and that would cause any symbols used from libc to 6370c27c18e8Smrg # always be unresolved, which means just about no library would 6371c27c18e8Smrg # ever link correctly. If we're not using GNU ld we use -z text 6372c27c18e8Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6373c27c18e8Smrg # as -z defs. 6374c27c18e8Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6375c27c18e8Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6376c27c18e8Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6377c27c18e8Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6378c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6379c27c18e8Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6380c27c18e8Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6381c27c18e8Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6382c27c18e8Smrg runpath_var='LD_RUN_PATH' 6383c43cc173Smrg 6384c27c18e8Smrg case $cc_basename in 6385c27c18e8Smrg CC*) 6386c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6387c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 638837eb1ca1Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 638937eb1ca1Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 639037eb1ca1Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 639137eb1ca1Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 6392c27c18e8Smrg ;; 6393c27c18e8Smrg *) 6394c27c18e8Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6395c27c18e8Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6396c27c18e8Smrg ;; 6397c27c18e8Smrg esac 6398c27c18e8Smrg ;; 6399c43cc173Smrg 6400c27c18e8Smrg tandem*) 6401c27c18e8Smrg case $cc_basename in 6402c27c18e8Smrg NCC*) 6403c27c18e8Smrg # NonStop-UX NCC 3.20 6404c27c18e8Smrg # FIXME: insert proper C++ library support 6405c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6406c27c18e8Smrg ;; 6407c27c18e8Smrg *) 6408c27c18e8Smrg # FIXME: insert proper C++ library support 6409c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6410c27c18e8Smrg ;; 6411c27c18e8Smrg esac 6412c27c18e8Smrg ;; 6413c43cc173Smrg 6414c27c18e8Smrg vxworks*) 6415c27c18e8Smrg # FIXME: insert proper C++ library support 6416c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6417c27c18e8Smrg ;; 6418c43cc173Smrg 6419c27c18e8Smrg *) 6420c27c18e8Smrg # FIXME: insert proper C++ library support 6421c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6422c27c18e8Smrg ;; 6423c27c18e8Smrg esac 6424c43cc173Smrg 6425c27c18e8Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6426c27c18e8Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6427c27c18e8Smrg 6428c27c18e8Smrg _LT_TAGVAR(GCC, $1)="$GXX" 6429c27c18e8Smrg _LT_TAGVAR(LD, $1)="$LD" 6430c27c18e8Smrg 6431c27c18e8Smrg ## CAVEAT EMPTOR: 6432c27c18e8Smrg ## There is no encapsulation within the following macros, do not change 6433c27c18e8Smrg ## the running order or otherwise move them around unless you know exactly 6434c27c18e8Smrg ## what you are doing... 6435c27c18e8Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6436c27c18e8Smrg _LT_COMPILER_PIC($1) 6437c27c18e8Smrg _LT_COMPILER_C_O($1) 6438c27c18e8Smrg _LT_COMPILER_FILE_LOCKS($1) 6439c27c18e8Smrg _LT_LINKER_SHLIBS($1) 6440c27c18e8Smrg _LT_SYS_DYNAMIC_LINKER($1) 6441c27c18e8Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6442c27c18e8Smrg 6443c27c18e8Smrg _LT_CONFIG($1) 6444c27c18e8Smrg fi # test -n "$compiler" 6445c27c18e8Smrg 6446c27c18e8Smrg CC=$lt_save_CC 6447c27c18e8Smrg LDCXX=$LD 6448c27c18e8Smrg LD=$lt_save_LD 6449c27c18e8Smrg GCC=$lt_save_GCC 6450c27c18e8Smrg with_gnu_ld=$lt_save_with_gnu_ld 6451c27c18e8Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 6452c27c18e8Smrg lt_cv_path_LD=$lt_save_path_LD 6453c27c18e8Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6454c27c18e8Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6455c27c18e8Smrgfi # test "$_lt_caught_CXX_error" != yes 6456c43cc173Smrg 6457c27c18e8SmrgAC_LANG_POP 6458c27c18e8Smrg])# _LT_LANG_CXX_CONFIG 6459c43cc173Smrg 6460c43cc173Smrg 6461c27c18e8Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6462c27c18e8Smrg# --------------------------------- 6463c27c18e8Smrg# Figure out "hidden" library dependencies from verbose 6464c27c18e8Smrg# compiler output when linking a shared library. 6465c27c18e8Smrg# Parse the compiler output and extract the necessary 6466c27c18e8Smrg# objects, libraries and library flags. 6467c27c18e8Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6468c27c18e8Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6469c27c18e8Smrg# Dependencies to place before and after the object being linked: 6470c27c18e8Smrg_LT_TAGVAR(predep_objects, $1)= 6471c27c18e8Smrg_LT_TAGVAR(postdep_objects, $1)= 6472c27c18e8Smrg_LT_TAGVAR(predeps, $1)= 6473c27c18e8Smrg_LT_TAGVAR(postdeps, $1)= 6474c27c18e8Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6475c43cc173Smrg 6476c27c18e8Smrgdnl we can't use the lt_simple_compile_test_code here, 6477c27c18e8Smrgdnl because it contains code intended for an executable, 6478c27c18e8Smrgdnl not a library. It's possible we should let each 6479c27c18e8Smrgdnl tag define a new lt_????_link_test_code variable, 6480c27c18e8Smrgdnl but it's only used here... 6481c27c18e8Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6482c27c18e8Smrgint a; 6483c27c18e8Smrgvoid foo (void) { a = 0; } 6484c27c18e8Smrg_LT_EOF 6485c27c18e8Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6486c27c18e8Smrgclass Foo 6487c27c18e8Smrg{ 6488c27c18e8Smrgpublic: 6489c27c18e8Smrg Foo (void) { a = 0; } 6490c27c18e8Smrgprivate: 6491c27c18e8Smrg int a; 6492c27c18e8Smrg}; 6493c27c18e8Smrg_LT_EOF 6494c27c18e8Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6495c27c18e8Smrg subroutine foo 6496c27c18e8Smrg implicit none 6497c27c18e8Smrg integer*4 a 6498c27c18e8Smrg a=0 6499c27c18e8Smrg return 6500c27c18e8Smrg end 6501c27c18e8Smrg_LT_EOF 6502c27c18e8Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6503c27c18e8Smrg subroutine foo 6504c27c18e8Smrg implicit none 6505c27c18e8Smrg integer a 6506c27c18e8Smrg a=0 6507c27c18e8Smrg return 6508c27c18e8Smrg end 6509c27c18e8Smrg_LT_EOF 6510c27c18e8Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6511c27c18e8Smrgpublic class foo { 6512c27c18e8Smrg private int a; 6513c27c18e8Smrg public void bar (void) { 6514c27c18e8Smrg a = 0; 6515c27c18e8Smrg } 6516c27c18e8Smrg}; 6517c27c18e8Smrg_LT_EOF 6518c27c18e8Smrg]) 6519c27c18e8Smrgdnl Parse the compiler output and extract the necessary 6520c27c18e8Smrgdnl objects, libraries and library flags. 6521c27c18e8Smrgif AC_TRY_EVAL(ac_compile); then 6522c27c18e8Smrg # Parse the compiler output and extract the necessary 6523c27c18e8Smrg # objects, libraries and library flags. 6524c43cc173Smrg 6525c27c18e8Smrg # Sentinel used to keep track of whether or not we are before 6526c27c18e8Smrg # the conftest object file. 6527c27c18e8Smrg pre_test_object_deps_done=no 6528c43cc173Smrg 6529c27c18e8Smrg for p in `eval "$output_verbose_link_cmd"`; do 6530c27c18e8Smrg case $p in 6531c43cc173Smrg 6532c27c18e8Smrg -L* | -R* | -l*) 6533c27c18e8Smrg # Some compilers place space between "-{L,R}" and the path. 6534c27c18e8Smrg # Remove the space. 6535c27c18e8Smrg if test $p = "-L" || 6536c27c18e8Smrg test $p = "-R"; then 6537c27c18e8Smrg prev=$p 6538c27c18e8Smrg continue 6539c27c18e8Smrg else 6540c27c18e8Smrg prev= 6541c27c18e8Smrg fi 6542c43cc173Smrg 6543c27c18e8Smrg if test "$pre_test_object_deps_done" = no; then 6544c27c18e8Smrg case $p in 6545c27c18e8Smrg -L* | -R*) 6546c27c18e8Smrg # Internal compiler library paths should come after those 6547c27c18e8Smrg # provided the user. The postdeps already come after the 6548c27c18e8Smrg # user supplied libs so there is no need to process them. 6549c27c18e8Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6550c27c18e8Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6551c27c18e8Smrg else 6552c27c18e8Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6553c27c18e8Smrg fi 6554c27c18e8Smrg ;; 6555c27c18e8Smrg # The "-l" case would never come before the object being 6556c27c18e8Smrg # linked, so don't bother handling this case. 6557c27c18e8Smrg esac 6558c27c18e8Smrg else 6559c27c18e8Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6560c27c18e8Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6561c27c18e8Smrg else 6562c27c18e8Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6563c27c18e8Smrg fi 6564c27c18e8Smrg fi 6565c27c18e8Smrg ;; 6566c43cc173Smrg 6567c27c18e8Smrg *.$objext) 6568c27c18e8Smrg # This assumes that the test object file only shows up 6569c27c18e8Smrg # once in the compiler output. 6570c27c18e8Smrg if test "$p" = "conftest.$objext"; then 6571c27c18e8Smrg pre_test_object_deps_done=yes 6572c27c18e8Smrg continue 6573c27c18e8Smrg fi 6574c43cc173Smrg 6575c27c18e8Smrg if test "$pre_test_object_deps_done" = no; then 6576c27c18e8Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6577c27c18e8Smrg _LT_TAGVAR(predep_objects, $1)="$p" 6578c27c18e8Smrg else 6579c27c18e8Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6580c27c18e8Smrg fi 6581c27c18e8Smrg else 6582c27c18e8Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6583c27c18e8Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 6584c27c18e8Smrg else 6585c27c18e8Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 6586c27c18e8Smrg fi 6587c27c18e8Smrg fi 6588c27c18e8Smrg ;; 6589c43cc173Smrg 6590c27c18e8Smrg *) ;; # Ignore the rest. 6591c43cc173Smrg 6592c27c18e8Smrg esac 6593c27c18e8Smrg done 6594c43cc173Smrg 6595c27c18e8Smrg # Clean up. 6596c27c18e8Smrg rm -f a.out a.exe 6597c43cc173Smrgelse 6598c27c18e8Smrg echo "libtool.m4: error: problem compiling $1 test program" 6599c43cc173Smrgfi 6600c43cc173Smrg 6601c27c18e8Smrg$RM -f confest.$objext 6602c43cc173Smrg 6603c27c18e8Smrg# PORTME: override above test on systems where it is broken 6604c27c18e8Smrgm4_if([$1], [CXX], 6605c27c18e8Smrg[case $host_os in 6606c27c18e8Smrginterix[[3-9]]*) 6607c27c18e8Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 6608c27c18e8Smrg # hack all around it, let's just trust "g++" to DTRT. 6609c27c18e8Smrg _LT_TAGVAR(predep_objects,$1)= 6610c27c18e8Smrg _LT_TAGVAR(postdep_objects,$1)= 6611c27c18e8Smrg _LT_TAGVAR(postdeps,$1)= 6612c27c18e8Smrg ;; 6613c43cc173Smrg 6614c27c18e8Smrglinux*) 6615c27c18e8Smrg case `$CC -V 2>&1 | sed 5q` in 6616c27c18e8Smrg *Sun\ C*) 6617c27c18e8Smrg # Sun C++ 5.9 6618c43cc173Smrg 6619c27c18e8Smrg # The more standards-conforming stlport4 library is 6620c27c18e8Smrg # incompatible with the Cstd library. Avoid specifying 6621c27c18e8Smrg # it if it's in CXXFLAGS. Ignore libCrun as 6622c27c18e8Smrg # -library=stlport4 depends on it. 6623c27c18e8Smrg case " $CXX $CXXFLAGS " in 6624c27c18e8Smrg *" -library=stlport4 "*) 6625c27c18e8Smrg solaris_use_stlport4=yes 6626c27c18e8Smrg ;; 6627c27c18e8Smrg esac 6628c43cc173Smrg 6629c27c18e8Smrg if test "$solaris_use_stlport4" != yes; then 6630c27c18e8Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6631c27c18e8Smrg fi 6632c27c18e8Smrg ;; 6633c27c18e8Smrg esac 6634c27c18e8Smrg ;; 6635c27c18e8Smrg 6636c27c18e8Smrgsolaris*) 6637c27c18e8Smrg case $cc_basename in 663837eb1ca1Smrg CC* | sunCC*) 6639c27c18e8Smrg # The more standards-conforming stlport4 library is 6640c27c18e8Smrg # incompatible with the Cstd library. Avoid specifying 6641c27c18e8Smrg # it if it's in CXXFLAGS. Ignore libCrun as 6642c27c18e8Smrg # -library=stlport4 depends on it. 6643c27c18e8Smrg case " $CXX $CXXFLAGS " in 6644c27c18e8Smrg *" -library=stlport4 "*) 6645c27c18e8Smrg solaris_use_stlport4=yes 6646c27c18e8Smrg ;; 6647c27c18e8Smrg esac 6648c43cc173Smrg 6649c27c18e8Smrg # Adding this requires a known-good setup of shared libraries for 6650c27c18e8Smrg # Sun compiler versions before 5.6, else PIC objects from an old 6651c27c18e8Smrg # archive will be linked into the output, leading to subtle bugs. 6652c27c18e8Smrg if test "$solaris_use_stlport4" != yes; then 6653c27c18e8Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6654c27c18e8Smrg fi 6655c27c18e8Smrg ;; 6656c27c18e8Smrg esac 6657c27c18e8Smrg ;; 6658c27c18e8Smrgesac 6659c27c18e8Smrg]) 6660c43cc173Smrg 6661c27c18e8Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 6662c27c18e8Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 6663c27c18e8Smrgesac 6664c27c18e8Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 6665c27c18e8Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 6666c27c18e8Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 6667c27c18e8Smrgfi 6668c27c18e8Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 6669c27c18e8Smrg [The directories searched by this compiler when creating a shared library]) 6670c27c18e8Smrg_LT_TAGDECL([], [predep_objects], [1], 6671c27c18e8Smrg [Dependencies to place before and after the objects being linked to 6672c27c18e8Smrg create a shared library]) 6673c27c18e8Smrg_LT_TAGDECL([], [postdep_objects], [1]) 6674c27c18e8Smrg_LT_TAGDECL([], [predeps], [1]) 6675c27c18e8Smrg_LT_TAGDECL([], [postdeps], [1]) 6676c27c18e8Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 6677c27c18e8Smrg [The library search path used internally by the compiler when linking 6678c27c18e8Smrg a shared library]) 6679c27c18e8Smrg])# _LT_SYS_HIDDEN_LIBDEPS 6680c27c18e8Smrg 6681c27c18e8Smrg 6682c27c18e8Smrg# _LT_LANG_F77_CONFIG([TAG]) 6683c27c18e8Smrg# -------------------------- 6684c27c18e8Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 6685c27c18e8Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6686c27c18e8Smrg# to write the compiler configuration to `libtool'. 6687c27c18e8Smrgm4_defun([_LT_LANG_F77_CONFIG], 668837eb1ca1Smrg[AC_LANG_PUSH(Fortran 77) 668937eb1ca1Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 669037eb1ca1Smrg _lt_disable_F77=yes 669137eb1ca1Smrgfi 6692c43cc173Smrg 6693c27c18e8Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6694c27c18e8Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6695c27c18e8Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6696c27c18e8Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6697c27c18e8Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6698c27c18e8Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6699c27c18e8Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6700c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6701c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6702c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6703c27c18e8Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6704c27c18e8Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6705c27c18e8Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6706c27c18e8Smrg_LT_TAGVAR(module_cmds, $1)= 6707c27c18e8Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6708c27c18e8Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6709c27c18e8Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 671037eb1ca1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 671137eb1ca1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6712c27c18e8Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6713c27c18e8Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6714c27c18e8Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6715c43cc173Smrg 6716c27c18e8Smrg# Source file extension for f77 test sources. 6717c27c18e8Smrgac_ext=f 6718c43cc173Smrg 6719c27c18e8Smrg# Object file extension for compiled f77 test sources. 6720c27c18e8Smrgobjext=o 6721c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 6722c27c18e8Smrg 6723c27c18e8Smrg# No sense in running all these tests if we already determined that 6724c27c18e8Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 6725c27c18e8Smrg# are currently assumed to apply to all compilers on this platform, 6726c27c18e8Smrg# and will be corrupted by setting them based on a non-working compiler. 6727c27c18e8Smrgif test "$_lt_disable_F77" != yes; then 6728c27c18e8Smrg # Code to be used in simple compile tests 6729c27c18e8Smrg lt_simple_compile_test_code="\ 6730c27c18e8Smrg subroutine t 6731c27c18e8Smrg return 6732c27c18e8Smrg end 6733c27c18e8Smrg" 6734c43cc173Smrg 6735c27c18e8Smrg # Code to be used in simple link tests 6736c27c18e8Smrg lt_simple_link_test_code="\ 6737c27c18e8Smrg program t 6738c27c18e8Smrg end 6739c27c18e8Smrg" 6740c43cc173Smrg 6741c27c18e8Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6742c27c18e8Smrg _LT_TAG_COMPILER 6743c43cc173Smrg 6744c27c18e8Smrg # save warnings/boilerplate of simple test code 6745c27c18e8Smrg _LT_COMPILER_BOILERPLATE 6746c27c18e8Smrg _LT_LINKER_BOILERPLATE 6747c43cc173Smrg 6748c27c18e8Smrg # Allow CC to be a program name with arguments. 6749c27c18e8Smrg lt_save_CC="$CC" 6750c27c18e8Smrg lt_save_GCC=$GCC 6751c27c18e8Smrg CC=${F77-"f77"} 6752c27c18e8Smrg compiler=$CC 6753c27c18e8Smrg _LT_TAGVAR(compiler, $1)=$CC 6754c27c18e8Smrg _LT_CC_BASENAME([$compiler]) 6755c27c18e8Smrg GCC=$G77 6756c27c18e8Smrg if test -n "$compiler"; then 6757c27c18e8Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6758c27c18e8Smrg AC_MSG_RESULT([$can_build_shared]) 6759c43cc173Smrg 6760c27c18e8Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6761c27c18e8Smrg test "$can_build_shared" = "no" && enable_shared=no 6762c43cc173Smrg 6763c27c18e8Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6764c27c18e8Smrg # are all built from PIC. 6765c27c18e8Smrg case $host_os in 6766c27c18e8Smrg aix3*) 6767c27c18e8Smrg test "$enable_shared" = yes && enable_static=no 6768c27c18e8Smrg if test -n "$RANLIB"; then 6769c27c18e8Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6770c27c18e8Smrg postinstall_cmds='$RANLIB $lib' 6771c27c18e8Smrg fi 6772c27c18e8Smrg ;; 6773c27c18e8Smrg aix[[4-9]]*) 6774c27c18e8Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6775c27c18e8Smrg test "$enable_shared" = yes && enable_static=no 6776c27c18e8Smrg fi 6777c27c18e8Smrg ;; 6778c27c18e8Smrg esac 6779c27c18e8Smrg AC_MSG_RESULT([$enable_shared]) 6780c27c18e8Smrg 6781c27c18e8Smrg AC_MSG_CHECKING([whether to build static libraries]) 6782c27c18e8Smrg # Make sure either enable_shared or enable_static is yes. 6783c27c18e8Smrg test "$enable_shared" = yes || enable_static=yes 6784c27c18e8Smrg AC_MSG_RESULT([$enable_static]) 6785c27c18e8Smrg 6786c27c18e8Smrg _LT_TAGVAR(GCC, $1)="$G77" 6787c27c18e8Smrg _LT_TAGVAR(LD, $1)="$LD" 6788c27c18e8Smrg 6789c27c18e8Smrg ## CAVEAT EMPTOR: 6790c27c18e8Smrg ## There is no encapsulation within the following macros, do not change 6791c27c18e8Smrg ## the running order or otherwise move them around unless you know exactly 6792c27c18e8Smrg ## what you are doing... 6793c27c18e8Smrg _LT_COMPILER_PIC($1) 6794c27c18e8Smrg _LT_COMPILER_C_O($1) 6795c27c18e8Smrg _LT_COMPILER_FILE_LOCKS($1) 6796c27c18e8Smrg _LT_LINKER_SHLIBS($1) 6797c27c18e8Smrg _LT_SYS_DYNAMIC_LINKER($1) 6798c27c18e8Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6799c27c18e8Smrg 6800c27c18e8Smrg _LT_CONFIG($1) 6801c27c18e8Smrg fi # test -n "$compiler" 6802c27c18e8Smrg 6803c27c18e8Smrg GCC=$lt_save_GCC 6804c27c18e8Smrg CC="$lt_save_CC" 6805c27c18e8Smrgfi # test "$_lt_disable_F77" != yes 6806c43cc173Smrg 6807c27c18e8SmrgAC_LANG_POP 6808c27c18e8Smrg])# _LT_LANG_F77_CONFIG 6809c43cc173Smrg 6810c43cc173Smrg 6811c27c18e8Smrg# _LT_LANG_FC_CONFIG([TAG]) 6812c27c18e8Smrg# ------------------------- 6813c27c18e8Smrg# Ensure that the configuration variables for a Fortran compiler are 6814c27c18e8Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6815c27c18e8Smrg# to write the compiler configuration to `libtool'. 6816c27c18e8Smrgm4_defun([_LT_LANG_FC_CONFIG], 681737eb1ca1Smrg[AC_LANG_PUSH(Fortran) 681837eb1ca1Smrg 681937eb1ca1Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 682037eb1ca1Smrg _lt_disable_FC=yes 682137eb1ca1Smrgfi 6822c27c18e8Smrg 6823c27c18e8Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6824c27c18e8Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6825c27c18e8Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6826c27c18e8Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6827c27c18e8Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6828c27c18e8Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6829c27c18e8Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6830c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6831c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6832c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6833c27c18e8Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6834c27c18e8Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6835c27c18e8Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6836c27c18e8Smrg_LT_TAGVAR(module_cmds, $1)= 6837c27c18e8Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6838c27c18e8Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6839c27c18e8Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 684037eb1ca1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 684137eb1ca1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6842c27c18e8Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6843c27c18e8Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6844c27c18e8Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6845c27c18e8Smrg 6846c27c18e8Smrg# Source file extension for fc test sources. 6847c27c18e8Smrgac_ext=${ac_fc_srcext-f} 6848c27c18e8Smrg 6849c27c18e8Smrg# Object file extension for compiled fc test sources. 6850c27c18e8Smrgobjext=o 6851c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 6852c27c18e8Smrg 6853c27c18e8Smrg# No sense in running all these tests if we already determined that 6854c27c18e8Smrg# the FC compiler isn't working. Some variables (like enable_shared) 6855c27c18e8Smrg# are currently assumed to apply to all compilers on this platform, 6856c27c18e8Smrg# and will be corrupted by setting them based on a non-working compiler. 6857c27c18e8Smrgif test "$_lt_disable_FC" != yes; then 6858c27c18e8Smrg # Code to be used in simple compile tests 6859c27c18e8Smrg lt_simple_compile_test_code="\ 6860c27c18e8Smrg subroutine t 6861c27c18e8Smrg return 6862c27c18e8Smrg end 6863c27c18e8Smrg" 6864c43cc173Smrg 6865c27c18e8Smrg # Code to be used in simple link tests 6866c27c18e8Smrg lt_simple_link_test_code="\ 6867c27c18e8Smrg program t 6868c27c18e8Smrg end 6869c27c18e8Smrg" 6870c43cc173Smrg 6871c27c18e8Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6872c27c18e8Smrg _LT_TAG_COMPILER 6873c43cc173Smrg 6874c27c18e8Smrg # save warnings/boilerplate of simple test code 6875c27c18e8Smrg _LT_COMPILER_BOILERPLATE 6876c27c18e8Smrg _LT_LINKER_BOILERPLATE 6877c43cc173Smrg 6878c27c18e8Smrg # Allow CC to be a program name with arguments. 6879c27c18e8Smrg lt_save_CC="$CC" 6880c27c18e8Smrg lt_save_GCC=$GCC 6881c27c18e8Smrg CC=${FC-"f95"} 6882c27c18e8Smrg compiler=$CC 6883c27c18e8Smrg GCC=$ac_cv_fc_compiler_gnu 6884c43cc173Smrg 6885c27c18e8Smrg _LT_TAGVAR(compiler, $1)=$CC 6886c27c18e8Smrg _LT_CC_BASENAME([$compiler]) 6887c27c18e8Smrg 6888c27c18e8Smrg if test -n "$compiler"; then 6889c27c18e8Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6890c27c18e8Smrg AC_MSG_RESULT([$can_build_shared]) 6891c27c18e8Smrg 6892c27c18e8Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6893c27c18e8Smrg test "$can_build_shared" = "no" && enable_shared=no 6894c27c18e8Smrg 6895c27c18e8Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6896c27c18e8Smrg # are all built from PIC. 6897c43cc173Smrg case $host_os in 6898c27c18e8Smrg aix3*) 6899c27c18e8Smrg test "$enable_shared" = yes && enable_static=no 6900c27c18e8Smrg if test -n "$RANLIB"; then 6901c27c18e8Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6902c27c18e8Smrg postinstall_cmds='$RANLIB $lib' 6903c27c18e8Smrg fi 6904c27c18e8Smrg ;; 690521e67964Smrg aix[[4-9]]*) 6906c27c18e8Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6907c27c18e8Smrg test "$enable_shared" = yes && enable_static=no 6908c43cc173Smrg fi 6909c27c18e8Smrg ;; 6910c43cc173Smrg esac 6911c27c18e8Smrg AC_MSG_RESULT([$enable_shared]) 6912c27c18e8Smrg 6913c27c18e8Smrg AC_MSG_CHECKING([whether to build static libraries]) 6914c27c18e8Smrg # Make sure either enable_shared or enable_static is yes. 6915c27c18e8Smrg test "$enable_shared" = yes || enable_static=yes 6916c27c18e8Smrg AC_MSG_RESULT([$enable_static]) 6917c27c18e8Smrg 6918c27c18e8Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 6919c27c18e8Smrg _LT_TAGVAR(LD, $1)="$LD" 6920c27c18e8Smrg 6921c27c18e8Smrg ## CAVEAT EMPTOR: 6922c27c18e8Smrg ## There is no encapsulation within the following macros, do not change 6923c27c18e8Smrg ## the running order or otherwise move them around unless you know exactly 6924c27c18e8Smrg ## what you are doing... 6925c27c18e8Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6926c27c18e8Smrg _LT_COMPILER_PIC($1) 6927c27c18e8Smrg _LT_COMPILER_C_O($1) 6928c27c18e8Smrg _LT_COMPILER_FILE_LOCKS($1) 6929c27c18e8Smrg _LT_LINKER_SHLIBS($1) 6930c27c18e8Smrg _LT_SYS_DYNAMIC_LINKER($1) 6931c27c18e8Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6932c27c18e8Smrg 6933c27c18e8Smrg _LT_CONFIG($1) 6934c27c18e8Smrg fi # test -n "$compiler" 6935c27c18e8Smrg 6936c27c18e8Smrg GCC=$lt_save_GCC 6937c27c18e8Smrg CC="$lt_save_CC" 6938c27c18e8Smrgfi # test "$_lt_disable_FC" != yes 693921e67964Smrg 6940c27c18e8SmrgAC_LANG_POP 6941c27c18e8Smrg])# _LT_LANG_FC_CONFIG 694221e67964Smrg 694321e67964Smrg 6944c27c18e8Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 6945c27c18e8Smrg# -------------------------- 6946c27c18e8Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 6947c27c18e8Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6948c27c18e8Smrg# to write the compiler configuration to `libtool'. 6949c27c18e8Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 6950c27c18e8Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 6951c27c18e8SmrgAC_LANG_SAVE 695221e67964Smrg 6953c27c18e8Smrg# Source file extension for Java test sources. 6954c27c18e8Smrgac_ext=java 6955c27c18e8Smrg 6956c27c18e8Smrg# Object file extension for compiled Java test sources. 6957c27c18e8Smrgobjext=o 6958c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 6959c27c18e8Smrg 6960c27c18e8Smrg# Code to be used in simple compile tests 6961c27c18e8Smrglt_simple_compile_test_code="class foo {}" 6962c27c18e8Smrg 6963c27c18e8Smrg# Code to be used in simple link tests 6964c27c18e8Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 6965c27c18e8Smrg 6966c27c18e8Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6967c27c18e8Smrg_LT_TAG_COMPILER 6968c27c18e8Smrg 6969c27c18e8Smrg# save warnings/boilerplate of simple test code 6970c27c18e8Smrg_LT_COMPILER_BOILERPLATE 6971c27c18e8Smrg_LT_LINKER_BOILERPLATE 6972c27c18e8Smrg 6973c27c18e8Smrg# Allow CC to be a program name with arguments. 6974c27c18e8Smrglt_save_CC="$CC" 6975c27c18e8Smrglt_save_GCC=$GCC 6976c27c18e8SmrgGCC=yes 6977c27c18e8SmrgCC=${GCJ-"gcj"} 6978c27c18e8Smrgcompiler=$CC 6979c27c18e8Smrg_LT_TAGVAR(compiler, $1)=$CC 6980c27c18e8Smrg_LT_TAGVAR(LD, $1)="$LD" 6981c27c18e8Smrg_LT_CC_BASENAME([$compiler]) 6982c27c18e8Smrg 6983c27c18e8Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 6984c27c18e8Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6985c27c18e8Smrg 6986c27c18e8Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 698737eb1ca1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 698837eb1ca1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6989c27c18e8Smrg 6990c27c18e8Smrgif test -n "$compiler"; then 6991c27c18e8Smrg _LT_COMPILER_NO_RTTI($1) 6992c27c18e8Smrg _LT_COMPILER_PIC($1) 6993c27c18e8Smrg _LT_COMPILER_C_O($1) 6994c27c18e8Smrg _LT_COMPILER_FILE_LOCKS($1) 6995c27c18e8Smrg _LT_LINKER_SHLIBS($1) 6996c27c18e8Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6997c27c18e8Smrg 6998c27c18e8Smrg _LT_CONFIG($1) 6999c27c18e8Smrgfi 7000c27c18e8Smrg 7001c27c18e8SmrgAC_LANG_RESTORE 7002c27c18e8Smrg 7003c27c18e8SmrgGCC=$lt_save_GCC 7004c27c18e8SmrgCC="$lt_save_CC" 7005c27c18e8Smrg])# _LT_LANG_GCJ_CONFIG 7006c27c18e8Smrg 7007c27c18e8Smrg 7008c27c18e8Smrg# _LT_LANG_RC_CONFIG([TAG]) 7009c27c18e8Smrg# ------------------------- 7010c27c18e8Smrg# Ensure that the configuration variables for the Windows resource compiler 7011c27c18e8Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7012c27c18e8Smrg# to write the compiler configuration to `libtool'. 7013c27c18e8Smrgm4_defun([_LT_LANG_RC_CONFIG], 7014c27c18e8Smrg[AC_REQUIRE([LT_PROG_RC])dnl 7015c27c18e8SmrgAC_LANG_SAVE 7016c27c18e8Smrg 7017c27c18e8Smrg# Source file extension for RC test sources. 7018c27c18e8Smrgac_ext=rc 701921e67964Smrg 7020c27c18e8Smrg# Object file extension for compiled RC test sources. 7021c27c18e8Smrgobjext=o 7022c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 702321e67964Smrg 7024c27c18e8Smrg# Code to be used in simple compile tests 7025c27c18e8Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 702621e67964Smrg 7027c27c18e8Smrg# Code to be used in simple link tests 7028c27c18e8Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 702921e67964Smrg 7030c27c18e8Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7031c27c18e8Smrg_LT_TAG_COMPILER 703221e67964Smrg 7033c27c18e8Smrg# save warnings/boilerplate of simple test code 7034c27c18e8Smrg_LT_COMPILER_BOILERPLATE 7035c27c18e8Smrg_LT_LINKER_BOILERPLATE 703621e67964Smrg 7037c27c18e8Smrg# Allow CC to be a program name with arguments. 7038c27c18e8Smrglt_save_CC="$CC" 7039c27c18e8Smrglt_save_GCC=$GCC 7040c27c18e8SmrgGCC= 7041c27c18e8SmrgCC=${RC-"windres"} 7042c27c18e8Smrgcompiler=$CC 7043c27c18e8Smrg_LT_TAGVAR(compiler, $1)=$CC 7044c27c18e8Smrg_LT_CC_BASENAME([$compiler]) 7045c27c18e8Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 704621e67964Smrg 7047c27c18e8Smrgif test -n "$compiler"; then 7048c27c18e8Smrg : 7049c27c18e8Smrg _LT_CONFIG($1) 7050c27c18e8Smrgfi 705121e67964Smrg 7052c27c18e8SmrgGCC=$lt_save_GCC 7053c27c18e8SmrgAC_LANG_RESTORE 7054c27c18e8SmrgCC="$lt_save_CC" 7055c27c18e8Smrg])# _LT_LANG_RC_CONFIG 705621e67964Smrg 705721e67964Smrg 7058c27c18e8Smrg# LT_PROG_GCJ 7059c27c18e8Smrg# ----------- 7060c27c18e8SmrgAC_DEFUN([LT_PROG_GCJ], 7061c27c18e8Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7062c27c18e8Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7063c27c18e8Smrg [AC_CHECK_TOOL(GCJ, gcj,) 7064c27c18e8Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7065c27c18e8Smrg AC_SUBST(GCJFLAGS)])])[]dnl 7066c27c18e8Smrg]) 706721e67964Smrg 7068c27c18e8Smrg# Old name: 7069c27c18e8SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7070c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 7071c27c18e8Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 707221e67964Smrg 707321e67964Smrg 7074c27c18e8Smrg# LT_PROG_RC 7075c27c18e8Smrg# ---------- 7076c27c18e8SmrgAC_DEFUN([LT_PROG_RC], 7077c27c18e8Smrg[AC_CHECK_TOOL(RC, windres,) 7078c27c18e8Smrg]) 707921e67964Smrg 7080c27c18e8Smrg# Old name: 7081c27c18e8SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7082c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 7083c27c18e8Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 708421e67964Smrg 708521e67964Smrg 7086c27c18e8Smrg# _LT_DECL_EGREP 7087c27c18e8Smrg# -------------- 7088c27c18e8Smrg# If we don't have a new enough Autoconf to choose the best grep 7089c27c18e8Smrg# available, choose the one first in the user's PATH. 7090c27c18e8Smrgm4_defun([_LT_DECL_EGREP], 7091c27c18e8Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7092c27c18e8SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7093c27c18e8Smrgtest -z "$GREP" && GREP=grep 7094c27c18e8Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7095c27c18e8Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7096c27c18e8Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7097c27c18e8Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7098c27c18e8SmrgAC_SUBST([GREP]) 7099c27c18e8Smrg]) 710021e67964Smrg 710121e67964Smrg 7102c27c18e8Smrg# _LT_DECL_OBJDUMP 7103c27c18e8Smrg# -------------- 7104c27c18e8Smrg# If we don't have a new enough Autoconf to choose the best objdump 7105c27c18e8Smrg# available, choose the one first in the user's PATH. 7106c27c18e8Smrgm4_defun([_LT_DECL_OBJDUMP], 7107c27c18e8Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7108c27c18e8Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7109c27c18e8Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7110c27c18e8SmrgAC_SUBST([OBJDUMP]) 7111c27c18e8Smrg]) 711221e67964Smrg 711321e67964Smrg 7114c27c18e8Smrg# _LT_DECL_SED 7115c27c18e8Smrg# ------------ 7116c27c18e8Smrg# Check for a fully-functional sed program, that truncates 7117c27c18e8Smrg# as few characters as possible. Prefer GNU sed if found. 7118c27c18e8Smrgm4_defun([_LT_DECL_SED], 7119c27c18e8Smrg[AC_PROG_SED 7120c27c18e8Smrgtest -z "$SED" && SED=sed 7121c27c18e8SmrgXsed="$SED -e 1s/^X//" 7122c27c18e8Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7123c27c18e8Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7124c27c18e8Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7125c27c18e8Smrg])# _LT_DECL_SED 712621e67964Smrg 7127c27c18e8Smrgm4_ifndef([AC_PROG_SED], [ 7128c27c18e8Smrg# NOTE: This macro has been submitted for inclusion into # 7129c27c18e8Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7130c27c18e8Smrg# a released version of Autoconf we should remove this # 7131c27c18e8Smrg# macro and use it instead. # 7132c27c18e8Smrg 7133c27c18e8Smrgm4_defun([AC_PROG_SED], 7134c27c18e8Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7135c27c18e8SmrgAC_CACHE_VAL(lt_cv_path_SED, 7136c27c18e8Smrg[# Loop through the user's path and test for sed and gsed. 7137c27c18e8Smrg# Then use that list of sed's as ones to test for truncation. 7138c27c18e8Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7139c27c18e8Smrgfor as_dir in $PATH 7140c27c18e8Smrgdo 7141c27c18e8Smrg IFS=$as_save_IFS 7142c27c18e8Smrg test -z "$as_dir" && as_dir=. 7143c27c18e8Smrg for lt_ac_prog in sed gsed; do 7144c27c18e8Smrg for ac_exec_ext in '' $ac_executable_extensions; do 7145c27c18e8Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7146c27c18e8Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7147c27c18e8Smrg fi 7148c27c18e8Smrg done 7149c27c18e8Smrg done 7150c27c18e8Smrgdone 7151c27c18e8SmrgIFS=$as_save_IFS 7152c27c18e8Smrglt_ac_max=0 7153c27c18e8Smrglt_ac_count=0 7154c27c18e8Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7155c27c18e8Smrg# along with /bin/sed that truncates output. 7156c27c18e8Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7157c27c18e8Smrg test ! -f $lt_ac_sed && continue 7158c27c18e8Smrg cat /dev/null > conftest.in 7159c27c18e8Smrg lt_ac_count=0 7160c27c18e8Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7161c27c18e8Smrg # Check for GNU sed and select it if it is found. 7162c27c18e8Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7163c27c18e8Smrg lt_cv_path_SED=$lt_ac_sed 7164c27c18e8Smrg break 716521e67964Smrg fi 7166c27c18e8Smrg while true; do 7167c27c18e8Smrg cat conftest.in conftest.in >conftest.tmp 7168c27c18e8Smrg mv conftest.tmp conftest.in 7169c27c18e8Smrg cp conftest.in conftest.nl 7170c27c18e8Smrg echo >>conftest.nl 7171c27c18e8Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7172c27c18e8Smrg cmp -s conftest.out conftest.nl || break 7173c27c18e8Smrg # 10000 chars as input seems more than enough 7174c27c18e8Smrg test $lt_ac_count -gt 10 && break 7175c27c18e8Smrg lt_ac_count=`expr $lt_ac_count + 1` 7176c27c18e8Smrg if test $lt_ac_count -gt $lt_ac_max; then 7177c27c18e8Smrg lt_ac_max=$lt_ac_count 7178c27c18e8Smrg lt_cv_path_SED=$lt_ac_sed 7179c27c18e8Smrg fi 7180c27c18e8Smrg done 7181c27c18e8Smrgdone 718221e67964Smrg]) 7183c27c18e8SmrgSED=$lt_cv_path_SED 7184c27c18e8SmrgAC_SUBST([SED]) 7185c27c18e8SmrgAC_MSG_RESULT([$SED]) 7186c27c18e8Smrg])#AC_PROG_SED 7187c27c18e8Smrg])#m4_ifndef 718821e67964Smrg 7189c27c18e8Smrg# Old name: 7190c27c18e8SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7191c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 7192c27c18e8Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7193c27c18e8Smrg 7194c27c18e8Smrg 7195c27c18e8Smrg# _LT_CHECK_SHELL_FEATURES 7196c27c18e8Smrg# ------------------------ 7197c27c18e8Smrg# Find out whether the shell is Bourne or XSI compatible, 7198c27c18e8Smrg# or has some other useful features. 7199c27c18e8Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7200c27c18e8Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7201c27c18e8Smrg# Try some XSI features 7202c27c18e8Smrgxsi_shell=no 7203c27c18e8Smrg( _lt_dummy="a/b/c" 7204c27c18e8Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 7205c27c18e8Smrg = c,a/b,, \ 7206c27c18e8Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7207c27c18e8Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7208c27c18e8Smrg && xsi_shell=yes 7209c27c18e8SmrgAC_MSG_RESULT([$xsi_shell]) 7210c27c18e8Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7211c27c18e8Smrg 7212c27c18e8SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7213c27c18e8Smrglt_shell_append=no 7214c27c18e8Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7215c27c18e8Smrg >/dev/null 2>&1 \ 7216c27c18e8Smrg && lt_shell_append=yes 7217c27c18e8SmrgAC_MSG_RESULT([$lt_shell_append]) 7218c27c18e8Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7219c27c18e8Smrg 7220c27c18e8Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7221c27c18e8Smrg lt_unset=unset 7222c27c18e8Smrgelse 7223c27c18e8Smrg lt_unset=false 722421e67964Smrgfi 7225c27c18e8Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7226c27c18e8Smrg 7227c27c18e8Smrg# test EBCDIC or ASCII 7228c27c18e8Smrgcase `echo X|tr X '\101'` in 7229c27c18e8Smrg A) # ASCII based system 7230c27c18e8Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7231c27c18e8Smrg lt_SP2NL='tr \040 \012' 7232c27c18e8Smrg lt_NL2SP='tr \015\012 \040\040' 7233c27c18e8Smrg ;; 7234c27c18e8Smrg *) # EBCDIC based system 7235c27c18e8Smrg lt_SP2NL='tr \100 \n' 7236c27c18e8Smrg lt_NL2SP='tr \r\n \100\100' 7237c27c18e8Smrg ;; 723821e67964Smrgesac 7239c27c18e8Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7240c27c18e8Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7241c27c18e8Smrg])# _LT_CHECK_SHELL_FEATURES 724221e67964Smrg 724321e67964Smrg 7244c27c18e8Smrg# _LT_PROG_XSI_SHELLFNS 7245c27c18e8Smrg# --------------------- 7246c27c18e8Smrg# Bourne and XSI compatible variants of some useful shell functions. 7247c27c18e8Smrgm4_defun([_LT_PROG_XSI_SHELLFNS], 7248c27c18e8Smrg[case $xsi_shell in 7249c27c18e8Smrg yes) 7250c27c18e8Smrg cat << \_LT_EOF >> "$cfgfile" 7251c27c18e8Smrg 7252c27c18e8Smrg# func_dirname file append nondir_replacement 7253c27c18e8Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7254c27c18e8Smrg# otherwise set result to NONDIR_REPLACEMENT. 7255c27c18e8Smrgfunc_dirname () 7256c27c18e8Smrg{ 7257c27c18e8Smrg case ${1} in 7258c27c18e8Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7259c27c18e8Smrg * ) func_dirname_result="${3}" ;; 7260c27c18e8Smrg esac 7261c27c18e8Smrg} 726221e67964Smrg 7263c27c18e8Smrg# func_basename file 7264c27c18e8Smrgfunc_basename () 7265c27c18e8Smrg{ 7266c27c18e8Smrg func_basename_result="${1##*/}" 7267c27c18e8Smrg} 7268c27c18e8Smrg 7269c27c18e8Smrg# func_dirname_and_basename file append nondir_replacement 7270c27c18e8Smrg# perform func_basename and func_dirname in a single function 7271c27c18e8Smrg# call: 7272c27c18e8Smrg# dirname: Compute the dirname of FILE. If nonempty, 7273c27c18e8Smrg# add APPEND to the result, otherwise set result 7274c27c18e8Smrg# to NONDIR_REPLACEMENT. 7275c27c18e8Smrg# value returned in "$func_dirname_result" 7276c27c18e8Smrg# basename: Compute filename of FILE. 7277c27c18e8Smrg# value retuned in "$func_basename_result" 7278c27c18e8Smrg# Implementation must be kept synchronized with func_dirname 7279c27c18e8Smrg# and func_basename. For efficiency, we do not delegate to 7280c27c18e8Smrg# those functions but instead duplicate the functionality here. 7281c27c18e8Smrgfunc_dirname_and_basename () 7282c27c18e8Smrg{ 7283c27c18e8Smrg case ${1} in 7284c27c18e8Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7285c27c18e8Smrg * ) func_dirname_result="${3}" ;; 7286c27c18e8Smrg esac 7287c27c18e8Smrg func_basename_result="${1##*/}" 7288c27c18e8Smrg} 7289c27c18e8Smrg 7290c27c18e8Smrg# func_stripname prefix suffix name 7291c27c18e8Smrg# strip PREFIX and SUFFIX off of NAME. 7292c27c18e8Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7293c27c18e8Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7294c27c18e8Smrg# dot (in which case that matches only a dot). 7295c27c18e8Smrgfunc_stripname () 7296c27c18e8Smrg{ 7297c27c18e8Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7298c27c18e8Smrg # positional parameters, so assign one to ordinary parameter first. 7299c27c18e8Smrg func_stripname_result=${3} 7300c27c18e8Smrg func_stripname_result=${func_stripname_result#"${1}"} 7301c27c18e8Smrg func_stripname_result=${func_stripname_result%"${2}"} 7302c27c18e8Smrg} 7303c27c18e8Smrg 7304c27c18e8Smrg# func_opt_split 7305c27c18e8Smrgfunc_opt_split () 7306c27c18e8Smrg{ 7307c27c18e8Smrg func_opt_split_opt=${1%%=*} 7308c27c18e8Smrg func_opt_split_arg=${1#*=} 7309c27c18e8Smrg} 7310c27c18e8Smrg 7311c27c18e8Smrg# func_lo2o object 7312c27c18e8Smrgfunc_lo2o () 7313c27c18e8Smrg{ 7314c27c18e8Smrg case ${1} in 7315c27c18e8Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7316c27c18e8Smrg *) func_lo2o_result=${1} ;; 731721e67964Smrg esac 7318c27c18e8Smrg} 7319c27c18e8Smrg 7320c27c18e8Smrg# func_xform libobj-or-source 7321c27c18e8Smrgfunc_xform () 7322c27c18e8Smrg{ 7323c27c18e8Smrg func_xform_result=${1%.*}.lo 7324c27c18e8Smrg} 7325c27c18e8Smrg 7326c27c18e8Smrg# func_arith arithmetic-term... 7327c27c18e8Smrgfunc_arith () 7328c27c18e8Smrg{ 7329c27c18e8Smrg func_arith_result=$(( $[*] )) 7330c27c18e8Smrg} 7331c27c18e8Smrg 7332c27c18e8Smrg# func_len string 7333c27c18e8Smrg# STRING may not start with a hyphen. 7334c27c18e8Smrgfunc_len () 7335c27c18e8Smrg{ 7336c27c18e8Smrg func_len_result=${#1} 7337c27c18e8Smrg} 7338c27c18e8Smrg 7339c27c18e8Smrg_LT_EOF 734021e67964Smrg ;; 7341c27c18e8Smrg *) # Bourne compatible functions. 7342c27c18e8Smrg cat << \_LT_EOF >> "$cfgfile" 7343c27c18e8Smrg 7344c27c18e8Smrg# func_dirname file append nondir_replacement 7345c27c18e8Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7346c27c18e8Smrg# otherwise set result to NONDIR_REPLACEMENT. 7347c27c18e8Smrgfunc_dirname () 7348c27c18e8Smrg{ 7349c27c18e8Smrg # Extract subdirectory from the argument. 735037eb1ca1Smrg func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` 7351c27c18e8Smrg if test "X$func_dirname_result" = "X${1}"; then 7352c27c18e8Smrg func_dirname_result="${3}" 7353c27c18e8Smrg else 7354c27c18e8Smrg func_dirname_result="$func_dirname_result${2}" 7355c27c18e8Smrg fi 7356c27c18e8Smrg} 7357c27c18e8Smrg 7358c27c18e8Smrg# func_basename file 7359c27c18e8Smrgfunc_basename () 7360c27c18e8Smrg{ 736137eb1ca1Smrg func_basename_result=`$ECHO "${1}" | $SED "$basename"` 7362c27c18e8Smrg} 7363c27c18e8Smrg 7364c27c18e8Smrgdnl func_dirname_and_basename 7365c27c18e8Smrgdnl A portable version of this function is already defined in general.m4sh 7366c27c18e8Smrgdnl so there is no need for it here. 7367c27c18e8Smrg 7368c27c18e8Smrg# func_stripname prefix suffix name 7369c27c18e8Smrg# strip PREFIX and SUFFIX off of NAME. 7370c27c18e8Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7371c27c18e8Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7372c27c18e8Smrg# dot (in which case that matches only a dot). 7373c27c18e8Smrg# func_strip_suffix prefix name 7374c27c18e8Smrgfunc_stripname () 7375c27c18e8Smrg{ 7376c27c18e8Smrg case ${2} in 737737eb1ca1Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 737837eb1ca1Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 737921e67964Smrg esac 7380c27c18e8Smrg} 738121e67964Smrg 7382c27c18e8Smrg# sed scripts: 7383c27c18e8Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 7384c27c18e8Smrgmy_sed_long_arg='1s/^-[[^=]]*=//' 738521e67964Smrg 7386c27c18e8Smrg# func_opt_split 7387c27c18e8Smrgfunc_opt_split () 7388c27c18e8Smrg{ 738937eb1ca1Smrg func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"` 739037eb1ca1Smrg func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"` 7391c27c18e8Smrg} 739221e67964Smrg 7393c27c18e8Smrg# func_lo2o object 7394c27c18e8Smrgfunc_lo2o () 7395c27c18e8Smrg{ 739637eb1ca1Smrg func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` 7397c27c18e8Smrg} 739821e67964Smrg 7399c27c18e8Smrg# func_xform libobj-or-source 7400c27c18e8Smrgfunc_xform () 7401c27c18e8Smrg{ 740237eb1ca1Smrg func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'` 7403c27c18e8Smrg} 740421e67964Smrg 7405c27c18e8Smrg# func_arith arithmetic-term... 7406c27c18e8Smrgfunc_arith () 7407c27c18e8Smrg{ 7408c27c18e8Smrg func_arith_result=`expr "$[@]"` 7409c27c18e8Smrg} 741021e67964Smrg 7411c27c18e8Smrg# func_len string 7412c27c18e8Smrg# STRING may not start with a hyphen. 7413c27c18e8Smrgfunc_len () 7414c27c18e8Smrg{ 7415c27c18e8Smrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 7416c27c18e8Smrg} 741721e67964Smrg 7418c27c18e8Smrg_LT_EOF 7419c27c18e8Smrgesac 742021e67964Smrg 7421c27c18e8Smrgcase $lt_shell_append in 7422c27c18e8Smrg yes) 7423c27c18e8Smrg cat << \_LT_EOF >> "$cfgfile" 742421e67964Smrg 7425c27c18e8Smrg# func_append var value 7426c27c18e8Smrg# Append VALUE to the end of shell variable VAR. 7427c27c18e8Smrgfunc_append () 7428c27c18e8Smrg{ 7429c27c18e8Smrg eval "$[1]+=\$[2]" 7430c27c18e8Smrg} 7431c27c18e8Smrg_LT_EOF 7432c27c18e8Smrg ;; 7433c27c18e8Smrg *) 7434c27c18e8Smrg cat << \_LT_EOF >> "$cfgfile" 743521e67964Smrg 7436c27c18e8Smrg# func_append var value 7437c27c18e8Smrg# Append VALUE to the end of shell variable VAR. 7438c27c18e8Smrgfunc_append () 7439c27c18e8Smrg{ 7440c27c18e8Smrg eval "$[1]=\$$[1]\$[2]" 7441c27c18e8Smrg} 744221e67964Smrg 7443c27c18e8Smrg_LT_EOF 7444c27c18e8Smrg ;; 7445c27c18e8Smrg esac 7446c27c18e8Smrg]) 744721e67964Smrg 7448c27c18e8Smrg# Helper functions for option handling. -*- Autoconf -*- 7449c27c18e8Smrg# 745037eb1ca1Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 745137eb1ca1Smrg# Inc. 7452c27c18e8Smrg# Written by Gary V. Vaughan, 2004 7453c27c18e8Smrg# 7454c27c18e8Smrg# This file is free software; the Free Software Foundation gives 7455c27c18e8Smrg# unlimited permission to copy and/or distribute it, with or without 7456c27c18e8Smrg# modifications, as long as this notice is preserved. 745721e67964Smrg 745837eb1ca1Smrg# serial 7 ltoptions.m4 745921e67964Smrg 7460c27c18e8Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7461c27c18e8SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 746221e67964Smrg 746321e67964Smrg 7464c27c18e8Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7465c27c18e8Smrg# ------------------------------------------ 7466c27c18e8Smrgm4_define([_LT_MANGLE_OPTION], 7467c27c18e8Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 746821e67964Smrg 746921e67964Smrg 7470c27c18e8Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7471c27c18e8Smrg# --------------------------------------- 7472c27c18e8Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7473c27c18e8Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7474c27c18e8Smrg# saved as a flag. 7475c27c18e8Smrgm4_define([_LT_SET_OPTION], 7476c27c18e8Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7477c27c18e8Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7478c27c18e8Smrg _LT_MANGLE_DEFUN([$1], [$2]), 7479c27c18e8Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7480c27c18e8Smrg]) 748121e67964Smrg 748221e67964Smrg 7483c27c18e8Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7484c27c18e8Smrg# ------------------------------------------------------------ 7485c27c18e8Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7486c27c18e8Smrgm4_define([_LT_IF_OPTION], 7487c27c18e8Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7488c27c18e8Smrg 7489c27c18e8Smrg 7490c27c18e8Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7491c27c18e8Smrg# ------------------------------------------------------- 7492c27c18e8Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7493c27c18e8Smrg# are set. 7494c27c18e8Smrgm4_define([_LT_UNLESS_OPTIONS], 7495c27c18e8Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7496c27c18e8Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7497c27c18e8Smrg [m4_define([$0_found])])])[]dnl 7498c27c18e8Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7499c27c18e8Smrg])[]dnl 7500c27c18e8Smrg]) 750121e67964Smrg 750221e67964Smrg 7503c27c18e8Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7504c27c18e8Smrg# ---------------------------------------- 7505c27c18e8Smrg# OPTION-LIST is a space-separated list of Libtool options associated 7506c27c18e8Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7507c27c18e8Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7508c27c18e8Smrg# the unknown option and exit. 7509c27c18e8Smrgm4_defun([_LT_SET_OPTIONS], 7510c27c18e8Smrg[# Set options 7511c27c18e8Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7512c27c18e8Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 7513c27c18e8Smrg 7514c27c18e8Smrgm4_if([$1],[LT_INIT],[ 7515c27c18e8Smrg dnl 7516c27c18e8Smrg dnl Simply set some default values (i.e off) if boolean options were not 7517c27c18e8Smrg dnl specified: 7518c27c18e8Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7519c27c18e8Smrg ]) 7520c27c18e8Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7521c27c18e8Smrg ]) 7522c27c18e8Smrg dnl 7523c27c18e8Smrg dnl If no reference was made to various pairs of opposing options, then 7524c27c18e8Smrg dnl we run the default mode handler for the pair. For example, if neither 7525c27c18e8Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7526c27c18e8Smrg dnl archives by default: 7527c27c18e8Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7528c27c18e8Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7529c27c18e8Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7530c27c18e8Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7531c27c18e8Smrg [_LT_ENABLE_FAST_INSTALL]) 7532c27c18e8Smrg ]) 7533c27c18e8Smrg])# _LT_SET_OPTIONS 753421e67964Smrg 753521e67964Smrg 753621e67964Smrg 7537c27c18e8Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7538c27c18e8Smrg# ----------------------------------------- 7539c27c18e8Smrgm4_define([_LT_MANGLE_DEFUN], 7540c27c18e8Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7541c27c18e8Smrg 7542c27c18e8Smrg 7543c27c18e8Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7544c27c18e8Smrg# ----------------------------------------------- 7545c27c18e8Smrgm4_define([LT_OPTION_DEFINE], 7546c27c18e8Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7547c27c18e8Smrg])# LT_OPTION_DEFINE 7548c27c18e8Smrg 754921e67964Smrg 7550c27c18e8Smrg# dlopen 7551c27c18e8Smrg# ------ 7552c27c18e8SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7553c27c18e8Smrg]) 755421e67964Smrg 7555c27c18e8SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7556c27c18e8Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7557c27c18e8SmrgAC_DIAGNOSE([obsolete], 7558c27c18e8Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7559c27c18e8Smrgput the `dlopen' option into LT_INIT's first parameter.]) 7560c27c18e8Smrg]) 756121e67964Smrg 7562c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 7563c27c18e8Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 756421e67964Smrg 756521e67964Smrg 7566c27c18e8Smrg# win32-dll 7567c27c18e8Smrg# --------- 7568c27c18e8Smrg# Declare package support for building win32 dll's. 7569c27c18e8SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7570c27c18e8Smrg[enable_win32_dll=yes 757121e67964Smrg 7572c27c18e8Smrgcase $host in 757337eb1ca1Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 7574c27c18e8Smrg AC_CHECK_TOOL(AS, as, false) 7575c27c18e8Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7576c27c18e8Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7577c27c18e8Smrg ;; 7578c27c18e8Smrgesac 757921e67964Smrg 7580c27c18e8Smrgtest -z "$AS" && AS=as 758137eb1ca1Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 758221e67964Smrg 7583c27c18e8Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 758437eb1ca1Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 758521e67964Smrg 7586c27c18e8Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 758737eb1ca1Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 7588c27c18e8Smrg])# win32-dll 758921e67964Smrg 7590c27c18e8SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7591c27c18e8Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7592c27c18e8Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7593c27c18e8SmrgAC_DIAGNOSE([obsolete], 7594c27c18e8Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7595c27c18e8Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 7596c27c18e8Smrg]) 759721e67964Smrg 7598c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 7599c27c18e8Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 760021e67964Smrg 7601c27c18e8Smrg 7602c27c18e8Smrg# _LT_ENABLE_SHARED([DEFAULT]) 7603c27c18e8Smrg# ---------------------------- 7604c27c18e8Smrg# implement the --enable-shared flag, and supports the `shared' and 7605c27c18e8Smrg# `disable-shared' LT_INIT options. 7606c27c18e8Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7607c27c18e8Smrgm4_define([_LT_ENABLE_SHARED], 7608c27c18e8Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 7609c27c18e8SmrgAC_ARG_ENABLE([shared], 7610c27c18e8Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 7611c27c18e8Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 7612c27c18e8Smrg [p=${PACKAGE-default} 7613c27c18e8Smrg case $enableval in 7614c27c18e8Smrg yes) enable_shared=yes ;; 7615c27c18e8Smrg no) enable_shared=no ;; 7616c27c18e8Smrg *) 7617c27c18e8Smrg enable_shared=no 7618c27c18e8Smrg # Look at the argument we got. We use all the common list separators. 7619c27c18e8Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7620c27c18e8Smrg for pkg in $enableval; do 7621c27c18e8Smrg IFS="$lt_save_ifs" 7622c27c18e8Smrg if test "X$pkg" = "X$p"; then 7623c27c18e8Smrg enable_shared=yes 7624c27c18e8Smrg fi 7625c27c18e8Smrg done 7626c27c18e8Smrg IFS="$lt_save_ifs" 762721e67964Smrg ;; 7628c27c18e8Smrg esac], 7629c27c18e8Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 763021e67964Smrg 7631c27c18e8Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 7632c27c18e8Smrg [Whether or not to build shared libraries]) 7633c27c18e8Smrg])# _LT_ENABLE_SHARED 763421e67964Smrg 7635c27c18e8SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 7636c27c18e8SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 763721e67964Smrg 7638c27c18e8Smrg# Old names: 7639c27c18e8SmrgAC_DEFUN([AC_ENABLE_SHARED], 7640c27c18e8Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 7641c27c18e8Smrg]) 7642c27c18e8Smrg 7643c27c18e8SmrgAC_DEFUN([AC_DISABLE_SHARED], 7644c27c18e8Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 7645c27c18e8Smrg]) 764621e67964Smrg 7647c27c18e8SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7648c27c18e8SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 764921e67964Smrg 7650c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 7651c27c18e8Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 7652c27c18e8Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 765321e67964Smrg 765421e67964Smrg 765521e67964Smrg 7656c27c18e8Smrg# _LT_ENABLE_STATIC([DEFAULT]) 7657c27c18e8Smrg# ---------------------------- 7658c27c18e8Smrg# implement the --enable-static flag, and support the `static' and 7659c27c18e8Smrg# `disable-static' LT_INIT options. 7660c27c18e8Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7661c27c18e8Smrgm4_define([_LT_ENABLE_STATIC], 7662c27c18e8Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 7663c27c18e8SmrgAC_ARG_ENABLE([static], 7664c27c18e8Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 7665c27c18e8Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 7666c27c18e8Smrg [p=${PACKAGE-default} 7667c27c18e8Smrg case $enableval in 7668c27c18e8Smrg yes) enable_static=yes ;; 7669c27c18e8Smrg no) enable_static=no ;; 7670c27c18e8Smrg *) 7671c27c18e8Smrg enable_static=no 7672c27c18e8Smrg # Look at the argument we got. We use all the common list separators. 7673c27c18e8Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7674c27c18e8Smrg for pkg in $enableval; do 7675c27c18e8Smrg IFS="$lt_save_ifs" 7676c27c18e8Smrg if test "X$pkg" = "X$p"; then 7677c27c18e8Smrg enable_static=yes 7678c27c18e8Smrg fi 7679c27c18e8Smrg done 7680c27c18e8Smrg IFS="$lt_save_ifs" 768121e67964Smrg ;; 7682c27c18e8Smrg esac], 7683c27c18e8Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 768421e67964Smrg 7685c27c18e8Smrg _LT_DECL([build_old_libs], [enable_static], [0], 7686c27c18e8Smrg [Whether or not to build static libraries]) 7687c27c18e8Smrg])# _LT_ENABLE_STATIC 768821e67964Smrg 7689c27c18e8SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 7690c27c18e8SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 769121e67964Smrg 7692c27c18e8Smrg# Old names: 7693c27c18e8SmrgAC_DEFUN([AC_ENABLE_STATIC], 7694c27c18e8Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 7695c27c18e8Smrg]) 769621e67964Smrg 7697c27c18e8SmrgAC_DEFUN([AC_DISABLE_STATIC], 7698c27c18e8Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 7699c27c18e8Smrg]) 770021e67964Smrg 7701c27c18e8SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7702c27c18e8SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 770321e67964Smrg 7704c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 7705c27c18e8Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 7706c27c18e8Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 770721e67964Smrg 770821e67964Smrg 770921e67964Smrg 7710c27c18e8Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 7711c27c18e8Smrg# ---------------------------------- 7712c27c18e8Smrg# implement the --enable-fast-install flag, and support the `fast-install' 7713c27c18e8Smrg# and `disable-fast-install' LT_INIT options. 7714c27c18e8Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7715c27c18e8Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 7716c27c18e8Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 7717c27c18e8SmrgAC_ARG_ENABLE([fast-install], 7718c27c18e8Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 7719c27c18e8Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 7720c27c18e8Smrg [p=${PACKAGE-default} 7721c27c18e8Smrg case $enableval in 7722c27c18e8Smrg yes) enable_fast_install=yes ;; 7723c27c18e8Smrg no) enable_fast_install=no ;; 7724c27c18e8Smrg *) 7725c27c18e8Smrg enable_fast_install=no 7726c27c18e8Smrg # Look at the argument we got. We use all the common list separators. 7727c27c18e8Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7728c27c18e8Smrg for pkg in $enableval; do 7729c27c18e8Smrg IFS="$lt_save_ifs" 7730c27c18e8Smrg if test "X$pkg" = "X$p"; then 7731c27c18e8Smrg enable_fast_install=yes 773221e67964Smrg fi 7733c27c18e8Smrg done 7734c27c18e8Smrg IFS="$lt_save_ifs" 773521e67964Smrg ;; 7736c27c18e8Smrg esac], 7737c27c18e8Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 773821e67964Smrg 7739c27c18e8Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 7740c27c18e8Smrg [Whether or not to optimize for fast installation])dnl 7741c27c18e8Smrg])# _LT_ENABLE_FAST_INSTALL 774221e67964Smrg 7743c27c18e8SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 7744c27c18e8SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 774521e67964Smrg 7746c27c18e8Smrg# Old names: 7747c27c18e8SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 7748c27c18e8Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 7749c27c18e8SmrgAC_DIAGNOSE([obsolete], 7750c27c18e8Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7751c27c18e8Smrgthe `fast-install' option into LT_INIT's first parameter.]) 7752c27c18e8Smrg]) 775321e67964Smrg 7754c27c18e8SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 7755c27c18e8Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 7756c27c18e8SmrgAC_DIAGNOSE([obsolete], 7757c27c18e8Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7758c27c18e8Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 7759c27c18e8Smrg]) 776021e67964Smrg 7761c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 7762c27c18e8Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 7763c27c18e8Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 776421e67964Smrg 776521e67964Smrg 7766c27c18e8Smrg# _LT_WITH_PIC([MODE]) 7767c27c18e8Smrg# -------------------- 7768c27c18e8Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 7769c27c18e8Smrg# LT_INIT options. 7770c27c18e8Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 7771c27c18e8Smrgm4_define([_LT_WITH_PIC], 7772c27c18e8Smrg[AC_ARG_WITH([pic], 7773c27c18e8Smrg [AS_HELP_STRING([--with-pic], 7774c27c18e8Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 7775c27c18e8Smrg [pic_mode="$withval"], 7776c27c18e8Smrg [pic_mode=default]) 777721e67964Smrg 7778c27c18e8Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 777921e67964Smrg 7780c27c18e8Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 7781c27c18e8Smrg])# _LT_WITH_PIC 778221e67964Smrg 7783c27c18e8SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 7784c27c18e8SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 7785c27c18e8Smrg 7786c27c18e8Smrg# Old name: 7787c27c18e8SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 7788c27c18e8Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 7789c27c18e8SmrgAC_DIAGNOSE([obsolete], 7790c27c18e8Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7791c27c18e8Smrgput the `pic-only' option into LT_INIT's first parameter.]) 779221e67964Smrg]) 779321e67964Smrg 7794c27c18e8Smrgdnl aclocal-1.4 backwards compatibility: 7795c27c18e8Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 779621e67964Smrg 779721e67964Smrg 7798c27c18e8Smrgm4_define([_LTDL_MODE], []) 7799c27c18e8SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 7800c27c18e8Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 7801c27c18e8SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 7802c27c18e8Smrg [m4_define([_LTDL_MODE], [recursive])]) 7803c27c18e8SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 7804c27c18e8Smrg [m4_define([_LTDL_MODE], [subproject])]) 780521e67964Smrg 7806c27c18e8Smrgm4_define([_LTDL_TYPE], []) 7807c27c18e8SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 7808c27c18e8Smrg [m4_define([_LTDL_TYPE], [installable])]) 7809c27c18e8SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 7810c27c18e8Smrg [m4_define([_LTDL_TYPE], [convenience])]) 781121e67964Smrg 7812c27c18e8Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 781321e67964Smrg# 7814c27c18e8Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7815c27c18e8Smrg# Written by Gary V. Vaughan, 2004 781621e67964Smrg# 7817c27c18e8Smrg# This file is free software; the Free Software Foundation gives 7818c27c18e8Smrg# unlimited permission to copy and/or distribute it, with or without 7819c27c18e8Smrg# modifications, as long as this notice is preserved. 7820c27c18e8Smrg 7821c27c18e8Smrg# serial 6 ltsugar.m4 7822c27c18e8Smrg 7823c27c18e8Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7824c27c18e8SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 7825c27c18e8Smrg 7826c27c18e8Smrg 7827c27c18e8Smrg# lt_join(SEP, ARG1, [ARG2...]) 7828c27c18e8Smrg# ----------------------------- 7829c27c18e8Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 7830c27c18e8Smrg# associated separator. 7831c27c18e8Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 7832c27c18e8Smrg# versions in m4sugar had bugs. 7833c27c18e8Smrgm4_define([lt_join], 7834c27c18e8Smrg[m4_if([$#], [1], [], 7835c27c18e8Smrg [$#], [2], [[$2]], 7836c27c18e8Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 7837c27c18e8Smrgm4_define([_lt_join], 7838c27c18e8Smrg[m4_if([$#$2], [2], [], 7839c27c18e8Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 7840c27c18e8Smrg 7841c27c18e8Smrg 7842c27c18e8Smrg# lt_car(LIST) 7843c27c18e8Smrg# lt_cdr(LIST) 7844c27c18e8Smrg# ------------ 7845c27c18e8Smrg# Manipulate m4 lists. 7846c27c18e8Smrg# These macros are necessary as long as will still need to support 7847c27c18e8Smrg# Autoconf-2.59 which quotes differently. 7848c27c18e8Smrgm4_define([lt_car], [[$1]]) 7849c27c18e8Smrgm4_define([lt_cdr], 7850c27c18e8Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 7851c27c18e8Smrg [$#], 1, [], 7852c27c18e8Smrg [m4_dquote(m4_shift($@))])]) 7853c27c18e8Smrgm4_define([lt_unquote], $1) 7854c27c18e8Smrg 7855c27c18e8Smrg 7856c27c18e8Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 7857c27c18e8Smrg# ------------------------------------------ 7858c27c18e8Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 7859c27c18e8Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 7860c27c18e8Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 7861c27c18e8Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 7862c27c18e8Smrg# than defined and empty). 786321e67964Smrg# 7864c27c18e8Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 7865c27c18e8Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 7866c27c18e8Smrgm4_define([lt_append], 7867c27c18e8Smrg[m4_define([$1], 7868c27c18e8Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 7869c27c18e8Smrg 7870c27c18e8Smrg 7871c27c18e8Smrg 7872c27c18e8Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 7873c27c18e8Smrg# ---------------------------------------------------------- 7874c27c18e8Smrg# Produce a SEP delimited list of all paired combinations of elements of 7875c27c18e8Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 7876c27c18e8Smrg# has the form PREFIXmINFIXSUFFIXn. 7877c27c18e8Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 7878c27c18e8Smrgm4_define([lt_combine], 7879c27c18e8Smrg[m4_if(m4_eval([$# > 3]), [1], 7880c27c18e8Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 7881c27c18e8Smrg[[m4_foreach([_Lt_prefix], [$2], 7882c27c18e8Smrg [m4_foreach([_Lt_suffix], 7883c27c18e8Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 7884c27c18e8Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 7885c27c18e8Smrg 7886c27c18e8Smrg 7887c27c18e8Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 7888c27c18e8Smrg# ----------------------------------------------------------------------- 7889c27c18e8Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 7890c27c18e8Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 7891c27c18e8Smrgm4_define([lt_if_append_uniq], 7892c27c18e8Smrg[m4_ifdef([$1], 7893c27c18e8Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 7894c27c18e8Smrg [lt_append([$1], [$2], [$3])$4], 7895c27c18e8Smrg [$5])], 7896c27c18e8Smrg [lt_append([$1], [$2], [$3])$4])]) 7897c27c18e8Smrg 7898c27c18e8Smrg 7899c27c18e8Smrg# lt_dict_add(DICT, KEY, VALUE) 7900c27c18e8Smrg# ----------------------------- 7901c27c18e8Smrgm4_define([lt_dict_add], 7902c27c18e8Smrg[m4_define([$1($2)], [$3])]) 790321e67964Smrg 790421e67964Smrg 7905c27c18e8Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 7906c27c18e8Smrg# -------------------------------------------- 7907c27c18e8Smrgm4_define([lt_dict_add_subkey], 7908c27c18e8Smrg[m4_define([$1($2:$3)], [$4])]) 7909c27c18e8Smrg 791021e67964Smrg 7911c27c18e8Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 7912c27c18e8Smrg# ---------------------------------- 7913c27c18e8Smrgm4_define([lt_dict_fetch], 7914c27c18e8Smrg[m4_ifval([$3], 7915c27c18e8Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 7916c27c18e8Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 791721e67964Smrg 791821e67964Smrg 7919c27c18e8Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 7920c27c18e8Smrg# ----------------------------------------------------------------- 7921c27c18e8Smrgm4_define([lt_if_dict_fetch], 7922c27c18e8Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 7923c27c18e8Smrg [$5], 7924c27c18e8Smrg [$6])]) 792521e67964Smrg 792621e67964Smrg 7927c27c18e8Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 7928c27c18e8Smrg# -------------------------------------------------------------- 7929c27c18e8Smrgm4_define([lt_dict_filter], 7930c27c18e8Smrg[m4_if([$5], [], [], 7931c27c18e8Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 7932c27c18e8Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 7933c27c18e8Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 793421e67964Smrg]) 793521e67964Smrg 7936c27c18e8Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 7937c27c18e8Smrg# 7938c27c18e8Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 7939c27c18e8Smrg# Written by Scott James Remnant, 2004 7940c27c18e8Smrg# 7941c27c18e8Smrg# This file is free software; the Free Software Foundation gives 7942c27c18e8Smrg# unlimited permission to copy and/or distribute it, with or without 7943c27c18e8Smrg# modifications, as long as this notice is preserved. 794421e67964Smrg 7945c27c18e8Smrg# Generated from ltversion.in. 794621e67964Smrg 794737eb1ca1Smrg# serial 3175 ltversion.m4 7948c27c18e8Smrg# This file is part of GNU Libtool 794921e67964Smrg 795037eb1ca1Smrgm4_define([LT_PACKAGE_VERSION], [2.2.10]) 795137eb1ca1Smrgm4_define([LT_PACKAGE_REVISION], [1.3175]) 795221e67964Smrg 7953c27c18e8SmrgAC_DEFUN([LTVERSION_VERSION], 795437eb1ca1Smrg[macro_version='2.2.10' 795537eb1ca1Smrgmacro_revision='1.3175' 7956c27c18e8Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 7957c27c18e8Smrg_LT_DECL(, macro_revision, 0) 795821e67964Smrg]) 7959c43cc173Smrg 7960c27c18e8Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 7961c27c18e8Smrg# 796237eb1ca1Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 7963c27c18e8Smrg# Written by Scott James Remnant, 2004. 7964c27c18e8Smrg# 7965c27c18e8Smrg# This file is free software; the Free Software Foundation gives 7966c27c18e8Smrg# unlimited permission to copy and/or distribute it, with or without 7967c27c18e8Smrg# modifications, as long as this notice is preserved. 7968c27c18e8Smrg 796937eb1ca1Smrg# serial 5 lt~obsolete.m4 7970c27c18e8Smrg 7971c27c18e8Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 7972c27c18e8Smrg# 7973c27c18e8Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 7974c27c18e8Smrg# which have later been changed to m4_define as they aren't part of the 7975c27c18e8Smrg# exported API, or moved to Autoconf or Automake where they belong. 7976c27c18e8Smrg# 7977c27c18e8Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 7978c27c18e8Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 7979c27c18e8Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 7980c27c18e8Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 7981c27c18e8Smrg# and doesn't know about Autoconf macros at all.) 7982c27c18e8Smrg# 7983c27c18e8Smrg# So we provide this file, which has a silly filename so it's always 7984c27c18e8Smrg# included after everything else. This provides aclocal with the 7985c27c18e8Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 7986c27c18e8Smrg# because those macros already exist, or will be overwritten later. 7987c27c18e8Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 7988c27c18e8Smrg# 7989c27c18e8Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 7990c27c18e8Smrg# Yes, that means every name once taken will need to remain here until 7991c27c18e8Smrg# we give up compatibility with versions before 1.7, at which point 7992c27c18e8Smrg# we need to keep only those names which we still refer to. 7993c27c18e8Smrg 7994c27c18e8Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7995c27c18e8SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 7996c27c18e8Smrg 7997c27c18e8Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 7998c27c18e8Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 7999c27c18e8Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8000c27c18e8Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8001c27c18e8Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8002c27c18e8Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8003c27c18e8Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8004c27c18e8Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8005c27c18e8Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8006c27c18e8Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8007c27c18e8Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8008c27c18e8Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8009c27c18e8Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8010c27c18e8Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8011c27c18e8Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8012c27c18e8Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8013c27c18e8Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8014c27c18e8Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8015c27c18e8Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8016c27c18e8Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8017c27c18e8Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8018c27c18e8Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8019c27c18e8Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8020c27c18e8Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8021c27c18e8Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8022c27c18e8Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8023c27c18e8Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8024c27c18e8Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8025c27c18e8Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8026c27c18e8Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8027c27c18e8Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8028c27c18e8Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8029c27c18e8Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8030c27c18e8Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8031c27c18e8Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8032c27c18e8Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8033c27c18e8Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8034c27c18e8Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8035c27c18e8Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8036c27c18e8Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8037c27c18e8Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8038c27c18e8Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8039c27c18e8Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8040c27c18e8Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8041c27c18e8Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8042c27c18e8Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8043c27c18e8Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8044c27c18e8Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8045c27c18e8Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8046c27c18e8Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8047c27c18e8Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8048c27c18e8Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8049c27c18e8Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8050c27c18e8Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 805137eb1ca1Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 805237eb1ca1Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 805337eb1ca1Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 805437eb1ca1Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 805537eb1ca1Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 805637eb1ca1Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 805737eb1ca1Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8058c27c18e8Smrg 805921e67964Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 806037eb1ca1Smrg# serial 1 (pkg-config-0.24) 806121e67964Smrg# 806221e67964Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 806321e67964Smrg# 806421e67964Smrg# This program is free software; you can redistribute it and/or modify 806521e67964Smrg# it under the terms of the GNU General Public License as published by 806621e67964Smrg# the Free Software Foundation; either version 2 of the License, or 806721e67964Smrg# (at your option) any later version. 806821e67964Smrg# 806921e67964Smrg# This program is distributed in the hope that it will be useful, but 807021e67964Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 807121e67964Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 807221e67964Smrg# General Public License for more details. 807321e67964Smrg# 807421e67964Smrg# You should have received a copy of the GNU General Public License 807521e67964Smrg# along with this program; if not, write to the Free Software 807621e67964Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 807721e67964Smrg# 807821e67964Smrg# As a special exception to the GNU General Public License, if you 807921e67964Smrg# distribute this file as part of a program that contains a 808021e67964Smrg# configuration script generated by Autoconf, you may include it under 808121e67964Smrg# the same distribution terms that you use for the rest of that program. 8082c43cc173Smrg 808321e67964Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 808421e67964Smrg# ---------------------------------- 808521e67964SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 808621e67964Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 808721e67964Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 808837eb1ca1SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 808937eb1ca1SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 809037eb1ca1SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 809137eb1ca1Smrg 809221e67964Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 809321e67964Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 809421e67964Smrgfi 809521e67964Smrgif test -n "$PKG_CONFIG"; then 809621e67964Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 809721e67964Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 809821e67964Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 809921e67964Smrg AC_MSG_RESULT([yes]) 810021e67964Smrg else 810121e67964Smrg AC_MSG_RESULT([no]) 810221e67964Smrg PKG_CONFIG="" 810321e67964Smrg fi 810421e67964Smrgfi[]dnl 810521e67964Smrg])# PKG_PROG_PKG_CONFIG 8106c43cc173Smrg 810721e67964Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 810821e67964Smrg# 810921e67964Smrg# Check to see whether a particular set of modules exists. Similar 811021e67964Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 811121e67964Smrg# 811237eb1ca1Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 811337eb1ca1Smrg# only at the first occurence in configure.ac, so if the first place 811437eb1ca1Smrg# it's called might be skipped (such as if it is within an "if", you 811537eb1ca1Smrg# have to call PKG_CHECK_EXISTS manually 811621e67964Smrg# -------------------------------------------------------------- 811721e67964SmrgAC_DEFUN([PKG_CHECK_EXISTS], 811821e67964Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 811921e67964Smrgif test -n "$PKG_CONFIG" && \ 812021e67964Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 812137eb1ca1Smrg m4_default([$2], [:]) 812221e67964Smrgm4_ifvaln([$3], [else 812321e67964Smrg $3])dnl 812421e67964Smrgfi]) 8125c43cc173Smrg 812621e67964Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 812721e67964Smrg# --------------------------------------------- 812821e67964Smrgm4_define([_PKG_CONFIG], 812921e67964Smrg[if test -n "$$1"; then 813021e67964Smrg pkg_cv_[]$1="$$1" 813121e67964Smrg elif test -n "$PKG_CONFIG"; then 813221e67964Smrg PKG_CHECK_EXISTS([$3], 813321e67964Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 813421e67964Smrg [pkg_failed=yes]) 813521e67964Smrg else 813621e67964Smrg pkg_failed=untried 813721e67964Smrgfi[]dnl 813821e67964Smrg])# _PKG_CONFIG 8139c43cc173Smrg 814021e67964Smrg# _PKG_SHORT_ERRORS_SUPPORTED 814121e67964Smrg# ----------------------------- 814221e67964SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 814321e67964Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 814421e67964Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 814521e67964Smrg _pkg_short_errors_supported=yes 814621e67964Smrgelse 814721e67964Smrg _pkg_short_errors_supported=no 814821e67964Smrgfi[]dnl 814921e67964Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 8150c43cc173Smrg 8151c43cc173Smrg 815221e67964Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 815321e67964Smrg# [ACTION-IF-NOT-FOUND]) 815421e67964Smrg# 815521e67964Smrg# 815621e67964Smrg# Note that if there is a possibility the first call to 815721e67964Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 815821e67964Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 815921e67964Smrg# 816021e67964Smrg# 816121e67964Smrg# -------------------------------------------------------------- 816221e67964SmrgAC_DEFUN([PKG_CHECK_MODULES], 816321e67964Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 816421e67964SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 816521e67964SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8166c43cc173Smrg 816721e67964Smrgpkg_failed=no 816821e67964SmrgAC_MSG_CHECKING([for $1]) 8169c43cc173Smrg 817021e67964Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 817121e67964Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8172c43cc173Smrg 817321e67964Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 817421e67964Smrgand $1[]_LIBS to avoid the need to call pkg-config. 817521e67964SmrgSee the pkg-config man page for more details.]) 8176c43cc173Smrg 817721e67964Smrgif test $pkg_failed = yes; then 817837eb1ca1Smrg AC_MSG_RESULT([no]) 817921e67964Smrg _PKG_SHORT_ERRORS_SUPPORTED 818021e67964Smrg if test $_pkg_short_errors_supported = yes; then 818121e67964Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 818221e67964Smrg else 818321e67964Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 818421e67964Smrg fi 818521e67964Smrg # Put the nasty error message in config.log where it belongs 818621e67964Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8187c43cc173Smrg 818837eb1ca1Smrg m4_default([$4], [AC_MSG_ERROR( 818921e67964Smrg[Package requirements ($2) were not met: 8190c43cc173Smrg 819121e67964Smrg$$1_PKG_ERRORS 8192c43cc173Smrg 819321e67964SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 819421e67964Smrginstalled software in a non-standard prefix. 8195c43cc173Smrg 819637eb1ca1Smrg_PKG_TEXT]) 819737eb1ca1Smrg ]) 819821e67964Smrgelif test $pkg_failed = untried; then 819937eb1ca1Smrg AC_MSG_RESULT([no]) 820037eb1ca1Smrg m4_default([$4], [AC_MSG_FAILURE( 820121e67964Smrg[The pkg-config script could not be found or is too old. Make sure it 820221e67964Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 820321e67964Smrgpath to pkg-config. 8204c43cc173Smrg 820521e67964Smrg_PKG_TEXT 8206c43cc173Smrg 820737eb1ca1SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 820837eb1ca1Smrg ]) 820921e67964Smrgelse 821021e67964Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 821121e67964Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 821221e67964Smrg AC_MSG_RESULT([yes]) 821337eb1ca1Smrg $3 821421e67964Smrgfi[]dnl 821521e67964Smrg])# PKG_CHECK_MODULES 8216c43cc173Smrg 821737eb1ca1Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 821837eb1ca1Smrgdnl 821937eb1ca1Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 822037eb1ca1Smrgdnl 822137eb1ca1Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 822237eb1ca1Smrgdnl copy of this software and associated documentation files (the "Software"), 822337eb1ca1Smrgdnl to deal in the Software without restriction, including without limitation 822437eb1ca1Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 822537eb1ca1Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 822637eb1ca1Smrgdnl Software is furnished to do so, subject to the following conditions: 822737eb1ca1Smrgdnl 822837eb1ca1Smrgdnl The above copyright notice and this permission notice (including the next 822937eb1ca1Smrgdnl paragraph) shall be included in all copies or substantial portions of the 823037eb1ca1Smrgdnl Software. 823137eb1ca1Smrgdnl 823237eb1ca1Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 823337eb1ca1Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 823437eb1ca1Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 823537eb1ca1Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 823637eb1ca1Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 823737eb1ca1Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 823837eb1ca1Smrgdnl DEALINGS IN THE SOFTWARE. 8239c43cc173Smrg 824037eb1ca1Smrg# XORG_MACROS_VERSION(required-version) 824137eb1ca1Smrg# ------------------------------------- 824237eb1ca1Smrg# Minimum version: 1.1.0 8243c43cc173Smrg# 824437eb1ca1Smrg# If you're using a macro added in Version 1.1 or newer, include this in 824537eb1ca1Smrg# your configure.ac with the minimum required version, such as: 824637eb1ca1Smrg# XORG_MACROS_VERSION(1.1) 824721e67964Smrg# 824837eb1ca1Smrg# To ensure that this macro is defined, also add: 824937eb1ca1Smrg# m4_ifndef([XORG_MACROS_VERSION], 825037eb1ca1Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 825121e67964Smrg# 825221e67964Smrg# 825337eb1ca1Smrg# See the "minimum version" comment for each macro you use to see what 825437eb1ca1Smrg# version you require. 825537eb1ca1Smrgm4_defun([XORG_MACROS_VERSION],[ 825637eb1ca1Smrgm4_define([vers_have], [1.10.0]) 825737eb1ca1Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 825837eb1ca1Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 825937eb1ca1Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 826037eb1ca1Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 826137eb1ca1Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 826237eb1ca1Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 826337eb1ca1Smrgm4_undefine([vers_have]) 826437eb1ca1Smrgm4_undefine([maj_have]) 826537eb1ca1Smrgm4_undefine([maj_needed]) 826637eb1ca1Smrg]) # XORG_MACROS_VERSION 8267c43cc173Smrg 826837eb1ca1Smrg# XORG_PROG_RAWCPP() 826937eb1ca1Smrg# ------------------ 827037eb1ca1Smrg# Minimum version: 1.0.0 827121e67964Smrg# 827237eb1ca1Smrg# Find cpp program and necessary flags for use in pre-processing text files 827337eb1ca1Smrg# such as man pages and config files 827437eb1ca1SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 827537eb1ca1SmrgAC_REQUIRE([AC_PROG_CPP]) 827637eb1ca1SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 827737eb1ca1Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8278c43cc173Smrg 827937eb1ca1Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 828037eb1ca1Smrg# which is not the best choice for supporting other OS'es, but covers most 828137eb1ca1Smrg# of the ones we need for now. 828237eb1ca1SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 828337eb1ca1SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 828437eb1ca1Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 828537eb1ca1Smrg AC_MSG_RESULT([no]) 828637eb1ca1Smrgelse 828737eb1ca1Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 828837eb1ca1Smrg RAWCPPFLAGS=-undef 828937eb1ca1Smrg AC_MSG_RESULT([yes]) 829037eb1ca1Smrg # under Cygwin unix is still defined even with -undef 829137eb1ca1Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 829237eb1ca1Smrg RAWCPPFLAGS="-undef -ansi" 829337eb1ca1Smrg AC_MSG_RESULT([yes, with -ansi]) 829437eb1ca1Smrg else 829537eb1ca1Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 829637eb1ca1Smrg fi 829737eb1ca1Smrgfi 829837eb1ca1Smrgrm -f conftest.$ac_ext 8299c43cc173Smrg 830037eb1ca1SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 830137eb1ca1SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 830237eb1ca1Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 830337eb1ca1Smrg AC_MSG_RESULT([no]) 830421e67964Smrgelse 830537eb1ca1Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 830637eb1ca1Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 830737eb1ca1Smrg AC_MSG_RESULT([yes]) 830837eb1ca1Smrg else 830937eb1ca1Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 831037eb1ca1Smrg fi 831121e67964Smrgfi 831237eb1ca1Smrgrm -f conftest.$ac_ext 831337eb1ca1SmrgAC_SUBST(RAWCPPFLAGS) 831437eb1ca1Smrg]) # XORG_PROG_RAWCPP 8315c43cc173Smrg 831637eb1ca1Smrg# XORG_MANPAGE_SECTIONS() 831737eb1ca1Smrg# ----------------------- 831837eb1ca1Smrg# Minimum version: 1.0.0 831921e67964Smrg# 832037eb1ca1Smrg# Determine which sections man pages go in for the different man page types 832137eb1ca1Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 832237eb1ca1Smrg# Not sure if there's any better way than just hardcoding by OS name. 832337eb1ca1Smrg# Override default settings by setting environment variables 832437eb1ca1Smrg# Added MAN_SUBSTS in version 1.8 832537eb1ca1Smrg# Added AC_PROG_SED in version 1.8 8326c43cc173Smrg 832737eb1ca1SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 832837eb1ca1SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 832937eb1ca1SmrgAC_REQUIRE([AC_PROG_SED]) 8330c43cc173Smrg 833137eb1ca1Smrgif test x$APP_MAN_SUFFIX = x ; then 833237eb1ca1Smrg APP_MAN_SUFFIX=1 833337eb1ca1Smrgfi 833437eb1ca1Smrgif test x$APP_MAN_DIR = x ; then 833537eb1ca1Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 833637eb1ca1Smrgfi 8337c43cc173Smrg 833837eb1ca1Smrgif test x$LIB_MAN_SUFFIX = x ; then 833937eb1ca1Smrg LIB_MAN_SUFFIX=3 834037eb1ca1Smrgfi 834137eb1ca1Smrgif test x$LIB_MAN_DIR = x ; then 834237eb1ca1Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 834337eb1ca1Smrgfi 8344c27c18e8Smrg 834537eb1ca1Smrgif test x$FILE_MAN_SUFFIX = x ; then 834637eb1ca1Smrg case $host_os in 834737eb1ca1Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 834837eb1ca1Smrg *) FILE_MAN_SUFFIX=5 ;; 834937eb1ca1Smrg esac 835037eb1ca1Smrgfi 835137eb1ca1Smrgif test x$FILE_MAN_DIR = x ; then 835237eb1ca1Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 835337eb1ca1Smrgfi 835421e67964Smrg 835537eb1ca1Smrgif test x$MISC_MAN_SUFFIX = x ; then 835637eb1ca1Smrg case $host_os in 835737eb1ca1Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 835837eb1ca1Smrg *) MISC_MAN_SUFFIX=7 ;; 835921e67964Smrg esac 836037eb1ca1Smrgfi 836137eb1ca1Smrgif test x$MISC_MAN_DIR = x ; then 836237eb1ca1Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 836337eb1ca1Smrgfi 836421e67964Smrg 836537eb1ca1Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 836637eb1ca1Smrg case $host_os in 836737eb1ca1Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 836837eb1ca1Smrg *) DRIVER_MAN_SUFFIX=4 ;; 836937eb1ca1Smrg esac 837037eb1ca1Smrgfi 837137eb1ca1Smrgif test x$DRIVER_MAN_DIR = x ; then 837237eb1ca1Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 837321e67964Smrgfi 837421e67964Smrg 837537eb1ca1Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 837637eb1ca1Smrg case $host_os in 837737eb1ca1Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 837837eb1ca1Smrg *) ADMIN_MAN_SUFFIX=8 ;; 837937eb1ca1Smrg esac 838037eb1ca1Smrgfi 838137eb1ca1Smrgif test x$ADMIN_MAN_DIR = x ; then 838237eb1ca1Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 838337eb1ca1Smrgfi 838421e67964Smrg 838521e67964Smrg 838637eb1ca1SmrgAC_SUBST([APP_MAN_SUFFIX]) 838737eb1ca1SmrgAC_SUBST([LIB_MAN_SUFFIX]) 838837eb1ca1SmrgAC_SUBST([FILE_MAN_SUFFIX]) 838937eb1ca1SmrgAC_SUBST([MISC_MAN_SUFFIX]) 839037eb1ca1SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 839137eb1ca1SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 839237eb1ca1SmrgAC_SUBST([APP_MAN_DIR]) 839337eb1ca1SmrgAC_SUBST([LIB_MAN_DIR]) 839437eb1ca1SmrgAC_SUBST([FILE_MAN_DIR]) 839537eb1ca1SmrgAC_SUBST([MISC_MAN_DIR]) 839637eb1ca1SmrgAC_SUBST([DRIVER_MAN_DIR]) 839737eb1ca1SmrgAC_SUBST([ADMIN_MAN_DIR]) 839821e67964Smrg 839937eb1ca1SmrgXORG_MAN_PAGE="X Version 11" 840037eb1ca1SmrgAC_SUBST([XORG_MAN_PAGE]) 840137eb1ca1SmrgMAN_SUBSTS="\ 840237eb1ca1Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 840337eb1ca1Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 840437eb1ca1Smrg -e 's|__xservername__|Xorg|g' \ 840537eb1ca1Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 840637eb1ca1Smrg -e 's|__projectroot__|\$(prefix)|g' \ 840737eb1ca1Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 840837eb1ca1Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 840937eb1ca1Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 841037eb1ca1Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 841137eb1ca1Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 841237eb1ca1Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 841337eb1ca1SmrgAC_SUBST([MAN_SUBSTS]) 841421e67964Smrg 841537eb1ca1Smrg]) # XORG_MANPAGE_SECTIONS 8416c43cc173Smrg 841737eb1ca1Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 841837eb1ca1Smrg# ------------------------ 841937eb1ca1Smrg# Minimum version: 1.7.0 842021e67964Smrg# 842137eb1ca1Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 842237eb1ca1Smrg# provided by xorg-sgml-doctools, if installed. 842337eb1ca1SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 842437eb1ca1SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 842537eb1ca1SmrgXORG_SGML_PATH= 842637eb1ca1SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 842737eb1ca1Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 842837eb1ca1Smrg [m4_ifval([$1],[:], 842937eb1ca1Smrg [if test x"$cross_compiling" != x"yes" ; then 843037eb1ca1Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 843137eb1ca1Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 843237eb1ca1Smrg fi]) 843337eb1ca1Smrg ]) 8434c43cc173Smrg 843537eb1ca1Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 843637eb1ca1Smrg# the path and the name of the doc stylesheet 843737eb1ca1Smrgif test "x$XORG_SGML_PATH" != "x" ; then 843837eb1ca1Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 843937eb1ca1Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 844037eb1ca1Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 844137eb1ca1Smrgelse 844237eb1ca1Smrg AC_MSG_RESULT([no]) 844337eb1ca1Smrgfi 8444c43cc173Smrg 844537eb1ca1SmrgAC_SUBST(XORG_SGML_PATH) 844637eb1ca1SmrgAC_SUBST(STYLESHEET_SRCDIR) 844737eb1ca1SmrgAC_SUBST(XSL_STYLESHEET) 844837eb1ca1SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 844937eb1ca1Smrg]) # XORG_CHECK_SGML_DOCTOOLS 8450c43cc173Smrg 845137eb1ca1Smrg# XORG_CHECK_LINUXDOC 845237eb1ca1Smrg# ------------------- 845337eb1ca1Smrg# Minimum version: 1.0.0 845421e67964Smrg# 845537eb1ca1Smrg# Defines the variable MAKE_TEXT if the necessary tools and 845637eb1ca1Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 845737eb1ca1Smrg# Whether or not the necessary tools and files are found can be checked 845837eb1ca1Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 845937eb1ca1SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 846037eb1ca1SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 846137eb1ca1SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 8462c43cc173Smrg 846337eb1ca1SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 8464c43cc173Smrg 846537eb1ca1SmrgAC_MSG_CHECKING([whether to build documentation]) 8466c43cc173Smrg 846737eb1ca1Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 846837eb1ca1Smrg BUILDDOC=yes 846937eb1ca1Smrgelse 847037eb1ca1Smrg BUILDDOC=no 847137eb1ca1Smrgfi 8472c43cc173Smrg 847337eb1ca1SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 8474c43cc173Smrg 847537eb1ca1SmrgAC_MSG_RESULT([$BUILDDOC]) 8476c43cc173Smrg 847737eb1ca1SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 847821e67964Smrg 847937eb1ca1Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 848037eb1ca1Smrg BUILDPDFDOC=yes 848137eb1ca1Smrgelse 848237eb1ca1Smrg BUILDPDFDOC=no 848321e67964Smrgfi 8484c43cc173Smrg 848537eb1ca1SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 8486c43cc173Smrg 848737eb1ca1SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 8488c43cc173Smrg 848937eb1ca1SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 849037eb1ca1SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 849137eb1ca1SmrgMAKE_PDF="$PS2PDF" 849237eb1ca1SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 8493c43cc173Smrg 849437eb1ca1SmrgAC_SUBST(MAKE_TEXT) 849537eb1ca1SmrgAC_SUBST(MAKE_PS) 849637eb1ca1SmrgAC_SUBST(MAKE_PDF) 849737eb1ca1SmrgAC_SUBST(MAKE_HTML) 849837eb1ca1Smrg]) # XORG_CHECK_LINUXDOC 8499c27c18e8Smrg 850037eb1ca1Smrg# XORG_CHECK_DOCBOOK 850137eb1ca1Smrg# ------------------- 850237eb1ca1Smrg# Minimum version: 1.0.0 850337eb1ca1Smrg# 850437eb1ca1Smrg# Checks for the ability to build output formats from SGML DocBook source. 850537eb1ca1Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 850637eb1ca1Smrg# indicates whether the necessary tools and files are found and, if set, 850737eb1ca1Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 850837eb1ca1SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 850937eb1ca1SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 8510c43cc173Smrg 851137eb1ca1SmrgBUILDTXTDOC=no 851237eb1ca1SmrgBUILDPDFDOC=no 851337eb1ca1SmrgBUILDPSDOC=no 851437eb1ca1SmrgBUILDHTMLDOC=no 8515c43cc173Smrg 851637eb1ca1SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 851737eb1ca1SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 851837eb1ca1SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 851937eb1ca1SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 8520c43cc173Smrg 852137eb1ca1SmrgAC_MSG_CHECKING([whether to build text documentation]) 852237eb1ca1Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 852337eb1ca1Smrg test x$BUILD_TXTDOC != xno; then 852437eb1ca1Smrg BUILDTXTDOC=yes 8525c27c18e8Smrgfi 852637eb1ca1SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 852737eb1ca1SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 8528c43cc173Smrg 852937eb1ca1SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 853037eb1ca1Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 853137eb1ca1Smrg test x$BUILD_PDFDOC != xno; then 853237eb1ca1Smrg BUILDPDFDOC=yes 853337eb1ca1Smrgfi 853437eb1ca1SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 853537eb1ca1SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 8536c43cc173Smrg 853737eb1ca1SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 853837eb1ca1Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 853937eb1ca1Smrg test x$BUILD_PSDOC != xno; then 854037eb1ca1Smrg BUILDPSDOC=yes 854137eb1ca1Smrgfi 854237eb1ca1SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 854337eb1ca1SmrgAC_MSG_RESULT([$BUILDPSDOC]) 8544c43cc173Smrg 854537eb1ca1SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 854637eb1ca1Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 854737eb1ca1Smrg test x$BUILD_HTMLDOC != xno; then 854837eb1ca1Smrg BUILDHTMLDOC=yes 854921e67964Smrgfi 855037eb1ca1SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 855137eb1ca1SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 8552c43cc173Smrg 855337eb1ca1SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 855437eb1ca1SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 855537eb1ca1SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 855637eb1ca1SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 8557c43cc173Smrg 855837eb1ca1SmrgAC_SUBST(MAKE_TEXT) 855937eb1ca1SmrgAC_SUBST(MAKE_PS) 856037eb1ca1SmrgAC_SUBST(MAKE_PDF) 856137eb1ca1SmrgAC_SUBST(MAKE_HTML) 856237eb1ca1Smrg]) # XORG_CHECK_DOCBOOK 8563c43cc173Smrg 856437eb1ca1Smrg# XORG_WITH_XMLTO([MIN-VERSION]) 856537eb1ca1Smrg# ---------------- 856637eb1ca1Smrg# Minimum version: 1.5.0 856737eb1ca1Smrg# 856837eb1ca1Smrg# Documentation tools are not always available on all platforms and sometimes 856937eb1ca1Smrg# not at the appropriate level. This macro enables a module to test for the 857037eb1ca1Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 857137eb1ca1Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 857237eb1ca1Smrg# as whether or not to use the xmlto package. 857337eb1ca1Smrg# 857437eb1ca1Smrg# Interface to module: 857537eb1ca1Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 857637eb1ca1Smrg# XMLTO: returns the path of the xmlto program found 857737eb1ca1Smrg# returns the path set by the user in the environment 857837eb1ca1Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 857937eb1ca1Smrg# 'no' user instructs the module not to use xmlto 858037eb1ca1Smrg# 858137eb1ca1Smrg# Added in version 1.10.0 858237eb1ca1Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 858337eb1ca1Smrg# xmlto for text output requires either lynx, links, or w3m browsers 858437eb1ca1Smrg# 858537eb1ca1Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 858637eb1ca1Smrg# 858737eb1ca1SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 858837eb1ca1SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 858937eb1ca1SmrgAC_ARG_WITH(xmlto, 859037eb1ca1Smrg AS_HELP_STRING([--with-xmlto], 859137eb1ca1Smrg [Use xmlto to regenerate documentation (default: yes, if installed)]), 859237eb1ca1Smrg [use_xmlto=$withval], [use_xmlto=auto]) 8593c43cc173Smrg 859437eb1ca1Smrgif test "x$use_xmlto" = x"auto"; then 859537eb1ca1Smrg AC_PATH_PROG([XMLTO], [xmlto]) 859637eb1ca1Smrg if test "x$XMLTO" = "x"; then 859737eb1ca1Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 859837eb1ca1Smrg have_xmlto=no 859937eb1ca1Smrg else 860037eb1ca1Smrg have_xmlto=yes 860137eb1ca1Smrg fi 860237eb1ca1Smrgelif test "x$use_xmlto" = x"yes" ; then 860337eb1ca1Smrg AC_PATH_PROG([XMLTO], [xmlto]) 860437eb1ca1Smrg if test "x$XMLTO" = "x"; then 860537eb1ca1Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 860637eb1ca1Smrg fi 860737eb1ca1Smrg have_xmlto=yes 860837eb1ca1Smrgelif test "x$use_xmlto" = x"no" ; then 860937eb1ca1Smrg if test "x$XMLTO" != "x"; then 861037eb1ca1Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 861137eb1ca1Smrg fi 861237eb1ca1Smrg have_xmlto=no 861337eb1ca1Smrgelse 861437eb1ca1Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 861537eb1ca1Smrgfi 8616c43cc173Smrg 861737eb1ca1Smrg# Test for a minimum version of xmlto, if provided. 861837eb1ca1Smrgm4_ifval([$1], 861937eb1ca1Smrg[if test "$have_xmlto" = yes; then 862037eb1ca1Smrg # scrape the xmlto version 862137eb1ca1Smrg AC_MSG_CHECKING([the xmlto version]) 862237eb1ca1Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 862337eb1ca1Smrg AC_MSG_RESULT([$xmlto_version]) 862437eb1ca1Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 862537eb1ca1Smrg [if test "x$use_xmlto" = xauto; then 862637eb1ca1Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 862737eb1ca1Smrg have_xmlto=no 862837eb1ca1Smrg else 862937eb1ca1Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 863037eb1ca1Smrg fi]) 863137eb1ca1Smrgfi]) 8632c43cc173Smrg 863337eb1ca1Smrg# Test for the ability of xmlto to generate a text target 863437eb1ca1Smrghave_xmlto_text=no 863537eb1ca1Smrgcat > conftest.xml << "EOF" 863637eb1ca1SmrgEOF 863737eb1ca1SmrgAS_IF([test "$have_xmlto" = yes], 863837eb1ca1Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 863937eb1ca1Smrg [have_xmlto_text=yes], 864037eb1ca1Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 864137eb1ca1Smrgrm -f conftest.xml 864237eb1ca1SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 864337eb1ca1SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 864437eb1ca1Smrg]) # XORG_WITH_XMLTO 8645c43cc173Smrg 864637eb1ca1Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION]) 864737eb1ca1Smrg# ---------------- 864837eb1ca1Smrg# Minimum version: 1.5.0 864921e67964Smrg# 865037eb1ca1Smrg# Documentation tools are not always available on all platforms and sometimes 865137eb1ca1Smrg# not at the appropriate level. This macro enables a module to test for the 865237eb1ca1Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 865337eb1ca1Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 865437eb1ca1Smrg# as whether or not to use the asciidoc package. 865537eb1ca1Smrg# 865637eb1ca1Smrg# Interface to module: 865737eb1ca1Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 865837eb1ca1Smrg# ASCIIDOC: returns the path of the asciidoc program found 865937eb1ca1Smrg# returns the path set by the user in the environment 866037eb1ca1Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 866137eb1ca1Smrg# 'no' user instructs the module not to use asciidoc 866237eb1ca1Smrg# 866337eb1ca1Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 866437eb1ca1Smrg# 866537eb1ca1SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 866637eb1ca1SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 866737eb1ca1SmrgAC_ARG_WITH(asciidoc, 866837eb1ca1Smrg AS_HELP_STRING([--with-asciidoc], 866937eb1ca1Smrg [Use asciidoc to regenerate documentation (default: yes, if installed)]), 867037eb1ca1Smrg [use_asciidoc=$withval], [use_asciidoc=auto]) 8671c43cc173Smrg 867237eb1ca1Smrgif test "x$use_asciidoc" = x"auto"; then 867337eb1ca1Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 867437eb1ca1Smrg if test "x$ASCIIDOC" = "x"; then 867537eb1ca1Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 867637eb1ca1Smrg have_asciidoc=no 867737eb1ca1Smrg else 867837eb1ca1Smrg have_asciidoc=yes 867937eb1ca1Smrg fi 868037eb1ca1Smrgelif test "x$use_asciidoc" = x"yes" ; then 868137eb1ca1Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 868237eb1ca1Smrg if test "x$ASCIIDOC" = "x"; then 868337eb1ca1Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 868437eb1ca1Smrg fi 868537eb1ca1Smrg have_asciidoc=yes 868637eb1ca1Smrgelif test "x$use_asciidoc" = x"no" ; then 868737eb1ca1Smrg if test "x$ASCIIDOC" != "x"; then 868837eb1ca1Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 868937eb1ca1Smrg fi 869037eb1ca1Smrg have_asciidoc=no 869137eb1ca1Smrgelse 869237eb1ca1Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 869337eb1ca1Smrgfi 869437eb1ca1Smrgm4_ifval([$1], 869537eb1ca1Smrg[if test "$have_asciidoc" = yes; then 869637eb1ca1Smrg # scrape the asciidoc version 869737eb1ca1Smrg AC_MSG_CHECKING([the asciidoc version]) 869837eb1ca1Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 869937eb1ca1Smrg AC_MSG_RESULT([$asciidoc_version]) 870037eb1ca1Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 870137eb1ca1Smrg [if test "x$use_asciidoc" = xauto; then 870237eb1ca1Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 870337eb1ca1Smrg have_asciidoc=no 870437eb1ca1Smrg else 870537eb1ca1Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 870637eb1ca1Smrg fi]) 870737eb1ca1Smrgfi]) 870837eb1ca1SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 870937eb1ca1Smrg]) # XORG_WITH_ASCIIDOC 8710c43cc173Smrg 871137eb1ca1Smrg# XORG_WITH_DOXYGEN([MIN-VERSION]) 871237eb1ca1Smrg# -------------------------------- 871337eb1ca1Smrg# Minimum version: 1.5.0 871421e67964Smrg# 871537eb1ca1Smrg# Documentation tools are not always available on all platforms and sometimes 871637eb1ca1Smrg# not at the appropriate level. This macro enables a module to test for the 871737eb1ca1Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 871837eb1ca1Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 871937eb1ca1Smrg# as whether or not to use the doxygen package. 872021e67964Smrg# 872137eb1ca1Smrg# Interface to module: 872237eb1ca1Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 872337eb1ca1Smrg# DOXYGEN: returns the path of the doxygen program found 872437eb1ca1Smrg# returns the path set by the user in the environment 872537eb1ca1Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 872637eb1ca1Smrg# 'no' user instructs the module not to use doxygen 872721e67964Smrg# 872837eb1ca1Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 872921e67964Smrg# 873037eb1ca1SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 873137eb1ca1SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 873237eb1ca1SmrgAC_ARG_WITH(doxygen, 873337eb1ca1Smrg AS_HELP_STRING([--with-doxygen], 873437eb1ca1Smrg [Use doxygen to regenerate documentation (default: yes, if installed)]), 873537eb1ca1Smrg [use_doxygen=$withval], [use_doxygen=auto]) 8736c27c18e8Smrg 873737eb1ca1Smrgif test "x$use_doxygen" = x"auto"; then 873837eb1ca1Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 873937eb1ca1Smrg if test "x$DOXYGEN" = "x"; then 874037eb1ca1Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 874137eb1ca1Smrg have_doxygen=no 874237eb1ca1Smrg else 874337eb1ca1Smrg have_doxygen=yes 874421e67964Smrg fi 874537eb1ca1Smrgelif test "x$use_doxygen" = x"yes" ; then 874637eb1ca1Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 874737eb1ca1Smrg if test "x$DOXYGEN" = "x"; then 874837eb1ca1Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 874921e67964Smrg fi 875037eb1ca1Smrg have_doxygen=yes 875137eb1ca1Smrgelif test "x$use_doxygen" = x"no" ; then 875237eb1ca1Smrg if test "x$DOXYGEN" != "x"; then 875337eb1ca1Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 875437eb1ca1Smrg fi 875537eb1ca1Smrg have_doxygen=no 875621e67964Smrgelse 875737eb1ca1Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 875821e67964Smrgfi 875937eb1ca1Smrgm4_ifval([$1], 876037eb1ca1Smrg[if test "$have_doxygen" = yes; then 876137eb1ca1Smrg # scrape the doxygen version 876237eb1ca1Smrg AC_MSG_CHECKING([the doxygen version]) 876337eb1ca1Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 876437eb1ca1Smrg AC_MSG_RESULT([$doxygen_version]) 876537eb1ca1Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 876637eb1ca1Smrg [if test "x$use_doxygen" = xauto; then 876737eb1ca1Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 876837eb1ca1Smrg have_doxygen=no 876937eb1ca1Smrg else 877037eb1ca1Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 877137eb1ca1Smrg fi]) 877237eb1ca1Smrgfi]) 877337eb1ca1SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 877437eb1ca1Smrg]) # XORG_WITH_DOXYGEN 8775c43cc173Smrg 877637eb1ca1Smrg# XORG_WITH_GROFF 877737eb1ca1Smrg# ---------------- 877837eb1ca1Smrg# Minimum version: 1.6.0 8779c27c18e8Smrg# 878037eb1ca1Smrg# Documentation tools are not always available on all platforms and sometimes 878137eb1ca1Smrg# not at the appropriate level. This macro enables a module to test for the 878237eb1ca1Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 878337eb1ca1Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 878437eb1ca1Smrg# as whether or not to use the groff package. 878521e67964Smrg# 878637eb1ca1Smrg# Interface to module: 878737eb1ca1Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 878837eb1ca1Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 878937eb1ca1Smrg# HAVE_GROFF_MS: the -ms macros package 879037eb1ca1Smrg# GROFF: returns the path of the groff program found 879137eb1ca1Smrg# returns the path set by the user in the environment 879237eb1ca1Smrg# --with-groff: 'yes' user instructs the module to use groff 879337eb1ca1Smrg# 'no' user instructs the module not to use groff 879421e67964Smrg# 879537eb1ca1Smrg# Added in version 1.9.0: 879637eb1ca1Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 879737eb1ca1Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 879837eb1ca1Smrg# psselect from the psutils package. 879937eb1ca1Smrg# the ghostcript package. Refer to the grohtml man pages 880037eb1ca1Smrg# 880137eb1ca1Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 880237eb1ca1Smrg# 880337eb1ca1Smrg# OS and distros often splits groff in a basic and full package, the former 880437eb1ca1Smrg# having the groff program and the later having devices, fonts and macros 880537eb1ca1Smrg# Checking for the groff executable is not enough. 880637eb1ca1Smrg# 880737eb1ca1Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 880837eb1ca1Smrg# unset HAVE_GROFF or GROFF env variables. 880937eb1ca1Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 881037eb1ca1Smrg# 881137eb1ca1SmrgAC_DEFUN([XORG_WITH_GROFF],[ 881237eb1ca1SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 881337eb1ca1SmrgAC_ARG_WITH(groff, 881437eb1ca1Smrg AS_HELP_STRING([--with-groff], 881537eb1ca1Smrg [Use groff to regenerate documentation (default: yes, if installed)]), 881637eb1ca1Smrg [use_groff=$withval], [use_groff=auto]) 8817c43cc173Smrg 881837eb1ca1Smrgif test "x$use_groff" = x"auto"; then 881937eb1ca1Smrg AC_PATH_PROG([GROFF], [groff]) 882037eb1ca1Smrg if test "x$GROFF" = "x"; then 882137eb1ca1Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 882237eb1ca1Smrg have_groff=no 882337eb1ca1Smrg else 882437eb1ca1Smrg have_groff=yes 882537eb1ca1Smrg fi 882637eb1ca1Smrgelif test "x$use_groff" = x"yes" ; then 882737eb1ca1Smrg AC_PATH_PROG([GROFF], [groff]) 882837eb1ca1Smrg if test "x$GROFF" = "x"; then 882937eb1ca1Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 883037eb1ca1Smrg fi 883137eb1ca1Smrg have_groff=yes 883237eb1ca1Smrgelif test "x$use_groff" = x"no" ; then 883337eb1ca1Smrg if test "x$GROFF" != "x"; then 883437eb1ca1Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 883537eb1ca1Smrg fi 883637eb1ca1Smrg have_groff=no 883737eb1ca1Smrgelse 883837eb1ca1Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 883937eb1ca1Smrgfi 8840c27c18e8Smrg 884137eb1ca1Smrg# We have groff, test for the presence of the macro packages 884237eb1ca1Smrgif test "x$have_groff" = x"yes"; then 884337eb1ca1Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 884437eb1ca1Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 884537eb1ca1Smrg groff_ms_works=yes 884637eb1ca1Smrg else 884737eb1ca1Smrg groff_ms_works=no 884837eb1ca1Smrg fi 884937eb1ca1Smrg AC_MSG_RESULT([$groff_ms_works]) 885037eb1ca1Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 885137eb1ca1Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 885237eb1ca1Smrg groff_mm_works=yes 885337eb1ca1Smrg else 885437eb1ca1Smrg groff_mm_works=no 885537eb1ca1Smrg fi 885637eb1ca1Smrg AC_MSG_RESULT([$groff_mm_works]) 885737eb1ca1Smrgfi 8858c43cc173Smrg 885937eb1ca1Smrg# We have groff, test for HTML dependencies, one command per package 886037eb1ca1Smrgif test "x$have_groff" = x"yes"; then 886137eb1ca1Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 886237eb1ca1Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 886337eb1ca1Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 886437eb1ca1Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 886537eb1ca1Smrg have_groff_html=yes 886637eb1ca1Smrg else 886737eb1ca1Smrg have_groff_html=no 886837eb1ca1Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 886937eb1ca1Smrg fi 887037eb1ca1Smrgfi 8871c27c18e8Smrg 887237eb1ca1Smrg# Set Automake conditionals for Makefiles 887337eb1ca1SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 887437eb1ca1SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 887537eb1ca1SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 887637eb1ca1SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 887737eb1ca1Smrg]) # XORG_WITH_GROFF 8878c43cc173Smrg 887937eb1ca1Smrg# XORG_WITH_FOP 888037eb1ca1Smrg# ---------------- 888137eb1ca1Smrg# Minimum version: 1.6.0 888221e67964Smrg# 888337eb1ca1Smrg# Documentation tools are not always available on all platforms and sometimes 888437eb1ca1Smrg# not at the appropriate level. This macro enables a module to test for the 888537eb1ca1Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 888637eb1ca1Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 888737eb1ca1Smrg# as whether or not to use the fop package. 888837eb1ca1Smrg# 888937eb1ca1Smrg# Interface to module: 889037eb1ca1Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 889137eb1ca1Smrg# FOP: returns the path of the fop program found 889237eb1ca1Smrg# returns the path set by the user in the environment 889337eb1ca1Smrg# --with-fop: 'yes' user instructs the module to use fop 889437eb1ca1Smrg# 'no' user instructs the module not to use fop 889537eb1ca1Smrg# 889637eb1ca1Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 889737eb1ca1Smrg# 889837eb1ca1SmrgAC_DEFUN([XORG_WITH_FOP],[ 889937eb1ca1SmrgAC_ARG_VAR([FOP], [Path to fop command]) 890037eb1ca1SmrgAC_ARG_WITH(fop, 890137eb1ca1Smrg AS_HELP_STRING([--with-fop], 890237eb1ca1Smrg [Use fop to regenerate documentation (default: yes, if installed)]), 890337eb1ca1Smrg [use_fop=$withval], [use_fop=auto]) 890421e67964Smrg 890537eb1ca1Smrgif test "x$use_fop" = x"auto"; then 890637eb1ca1Smrg AC_PATH_PROG([FOP], [fop]) 890737eb1ca1Smrg if test "x$FOP" = "x"; then 890837eb1ca1Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 890937eb1ca1Smrg have_fop=no 891037eb1ca1Smrg else 891137eb1ca1Smrg have_fop=yes 891237eb1ca1Smrg fi 891337eb1ca1Smrgelif test "x$use_fop" = x"yes" ; then 891437eb1ca1Smrg AC_PATH_PROG([FOP], [fop]) 891537eb1ca1Smrg if test "x$FOP" = "x"; then 891637eb1ca1Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 891737eb1ca1Smrg fi 891837eb1ca1Smrg have_fop=yes 891937eb1ca1Smrgelif test "x$use_fop" = x"no" ; then 892037eb1ca1Smrg if test "x$FOP" != "x"; then 892137eb1ca1Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 892237eb1ca1Smrg fi 892337eb1ca1Smrg have_fop=no 892437eb1ca1Smrgelse 892537eb1ca1Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 892637eb1ca1Smrgfi 892737eb1ca1SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 892837eb1ca1Smrg]) # XORG_WITH_FOP 8929c43cc173Smrg 893037eb1ca1Smrg# XORG_WITH_PS2PDF 893137eb1ca1Smrg# ---------------- 893237eb1ca1Smrg# Minimum version: 1.6.0 8933c43cc173Smrg# 893437eb1ca1Smrg# Documentation tools are not always available on all platforms and sometimes 893537eb1ca1Smrg# not at the appropriate level. This macro enables a module to test for the 893637eb1ca1Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 893737eb1ca1Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 893837eb1ca1Smrg# as whether or not to use the ps2pdf package. 8939c43cc173Smrg# 894037eb1ca1Smrg# Interface to module: 894137eb1ca1Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 894237eb1ca1Smrg# PS2PDF: returns the path of the ps2pdf program found 894337eb1ca1Smrg# returns the path set by the user in the environment 894437eb1ca1Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 894537eb1ca1Smrg# 'no' user instructs the module not to use ps2pdf 894637eb1ca1Smrg# 894737eb1ca1Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 894837eb1ca1Smrg# 894937eb1ca1SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 895037eb1ca1SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 895137eb1ca1SmrgAC_ARG_WITH(ps2pdf, 895237eb1ca1Smrg AS_HELP_STRING([--with-ps2pdf], 895337eb1ca1Smrg [Use ps2pdf to regenerate documentation (default: yes, if installed)]), 895437eb1ca1Smrg [use_ps2pdf=$withval], [use_ps2pdf=auto]) 8955c43cc173Smrg 895637eb1ca1Smrgif test "x$use_ps2pdf" = x"auto"; then 895737eb1ca1Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 895837eb1ca1Smrg if test "x$PS2PDF" = "x"; then 895937eb1ca1Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 896037eb1ca1Smrg have_ps2pdf=no 896137eb1ca1Smrg else 896237eb1ca1Smrg have_ps2pdf=yes 896337eb1ca1Smrg fi 896437eb1ca1Smrgelif test "x$use_ps2pdf" = x"yes" ; then 896537eb1ca1Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 896637eb1ca1Smrg if test "x$PS2PDF" = "x"; then 896737eb1ca1Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 896837eb1ca1Smrg fi 896937eb1ca1Smrg have_ps2pdf=yes 897037eb1ca1Smrgelif test "x$use_ps2pdf" = x"no" ; then 897137eb1ca1Smrg if test "x$PS2PDF" != "x"; then 897237eb1ca1Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 897337eb1ca1Smrg fi 897437eb1ca1Smrg have_ps2pdf=no 897537eb1ca1Smrgelse 897637eb1ca1Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 897737eb1ca1Smrgfi 897837eb1ca1SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 897937eb1ca1Smrg]) # XORG_WITH_PS2PDF 8980c43cc173Smrg 898137eb1ca1Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 898237eb1ca1Smrg# ---------------- 898337eb1ca1Smrg# Minimum version: 1.6.0 898437eb1ca1Smrg# 898537eb1ca1Smrg# Documentation tools are not always available on all platforms and sometimes 898637eb1ca1Smrg# not at the appropriate level. This macro enables a builder to skip all 898737eb1ca1Smrg# documentation targets except traditional man pages. 898837eb1ca1Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 898937eb1ca1Smrg# maximum flexibilty in controlling documentation building. 899037eb1ca1Smrg# Refer to: 899137eb1ca1Smrg# XORG_WITH_XMLTO --with-xmlto 899237eb1ca1Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 899337eb1ca1Smrg# XORG_WITH_DOXYGEN --with-doxygen 899437eb1ca1Smrg# XORG_WITH_FOP --with-fop 899537eb1ca1Smrg# XORG_WITH_GROFF --with-groff 899637eb1ca1Smrg# XORG_WITH_PS2PDF --with-ps2pdf 899737eb1ca1Smrg# 899837eb1ca1Smrg# Interface to module: 899937eb1ca1Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 900037eb1ca1Smrg# --enable-docs: 'yes' user instructs the module to generate docs 900137eb1ca1Smrg# 'no' user instructs the module not to generate docs 900237eb1ca1Smrg# parm1: specify the default value, yes or no. 900337eb1ca1Smrg# 900437eb1ca1SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 900537eb1ca1Smrgdefault=$1 900637eb1ca1Smrgif test "x$default" = x ; then 900737eb1ca1Smrg default="yes" 900837eb1ca1Smrgfi 900937eb1ca1SmrgAC_ARG_ENABLE(docs, 901037eb1ca1Smrg AS_HELP_STRING([--enable-docs], 901137eb1ca1Smrg [Enable building the documentation (default: yes)]), 901237eb1ca1Smrg [build_docs=$enableval], [build_docs=$default]) 901337eb1ca1SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 901437eb1ca1SmrgAC_MSG_CHECKING([whether to build documentation]) 901537eb1ca1SmrgAC_MSG_RESULT([$build_docs]) 901637eb1ca1Smrg]) # XORG_ENABLE_DOCS 901721e67964Smrg 901837eb1ca1Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 901937eb1ca1Smrg# ---------------- 902037eb1ca1Smrg# Minimum version: 1.6.0 9021c43cc173Smrg# 902237eb1ca1Smrg# This macro enables a builder to skip all developer documentation. 902337eb1ca1Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 902437eb1ca1Smrg# maximum flexibilty in controlling documentation building. 902537eb1ca1Smrg# Refer to: 902637eb1ca1Smrg# XORG_WITH_XMLTO --with-xmlto 902737eb1ca1Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 902837eb1ca1Smrg# XORG_WITH_DOXYGEN --with-doxygen 902937eb1ca1Smrg# XORG_WITH_FOP --with-fop 903037eb1ca1Smrg# XORG_WITH_GROFF --with-groff 903137eb1ca1Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9032c43cc173Smrg# 903337eb1ca1Smrg# Interface to module: 903437eb1ca1Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 903537eb1ca1Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 903637eb1ca1Smrg# 'no' user instructs the module not to generate developer docs 903737eb1ca1Smrg# parm1: specify the default value, yes or no. 9038c43cc173Smrg# 903937eb1ca1SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 904037eb1ca1Smrgdevel_default=$1 904137eb1ca1Smrgif test "x$devel_default" = x ; then 904237eb1ca1Smrg devel_default="yes" 904337eb1ca1Smrgfi 904437eb1ca1SmrgAC_ARG_ENABLE(devel-docs, 904537eb1ca1Smrg AS_HELP_STRING([--enable-devel-docs], 904637eb1ca1Smrg [Enable building the developer documentation (default: yes)]), 904737eb1ca1Smrg [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) 904837eb1ca1SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 904937eb1ca1SmrgAC_MSG_CHECKING([whether to build developer documentation]) 905037eb1ca1SmrgAC_MSG_RESULT([$build_devel_docs]) 905137eb1ca1Smrg]) # XORG_ENABLE_DEVEL_DOCS 905237eb1ca1Smrg 905337eb1ca1Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 905437eb1ca1Smrg# ---------------- 905537eb1ca1Smrg# Minimum version: 1.6.0 9056c43cc173Smrg# 905737eb1ca1Smrg# This macro enables a builder to skip all functional specification targets. 905837eb1ca1Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 905937eb1ca1Smrg# maximum flexibilty in controlling documentation building. 906037eb1ca1Smrg# Refer to: 906137eb1ca1Smrg# XORG_WITH_XMLTO --with-xmlto 906237eb1ca1Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 906337eb1ca1Smrg# XORG_WITH_DOXYGEN --with-doxygen 906437eb1ca1Smrg# XORG_WITH_FOP --with-fop 906537eb1ca1Smrg# XORG_WITH_GROFF --with-groff 906637eb1ca1Smrg# XORG_WITH_PS2PDF --with-ps2pdf 906737eb1ca1Smrg# 906837eb1ca1Smrg# Interface to module: 906937eb1ca1Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 907037eb1ca1Smrg# --enable-specs: 'yes' user instructs the module to generate specs 907137eb1ca1Smrg# 'no' user instructs the module not to generate specs 907237eb1ca1Smrg# parm1: specify the default value, yes or no. 907337eb1ca1Smrg# 907437eb1ca1SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 907537eb1ca1Smrgspec_default=$1 907637eb1ca1Smrgif test "x$spec_default" = x ; then 907737eb1ca1Smrg spec_default="yes" 907837eb1ca1Smrgfi 907937eb1ca1SmrgAC_ARG_ENABLE(specs, 908037eb1ca1Smrg AS_HELP_STRING([--enable-specs], 908137eb1ca1Smrg [Enable building the specs (default: yes)]), 908237eb1ca1Smrg [build_specs=$enableval], [build_specs=$spec_default]) 908337eb1ca1SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 908437eb1ca1SmrgAC_MSG_CHECKING([whether to build functional specifications]) 908537eb1ca1SmrgAC_MSG_RESULT([$build_specs]) 908637eb1ca1Smrg]) # XORG_ENABLE_SPECS 9087c43cc173Smrg 908837eb1ca1Smrg# XORG_CHECK_MALLOC_ZERO 908937eb1ca1Smrg# ---------------------- 909021e67964Smrg# Minimum version: 1.0.0 909121e67964Smrg# 909237eb1ca1Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 909337eb1ca1Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 909437eb1ca1Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 909537eb1ca1SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 909637eb1ca1SmrgAC_ARG_ENABLE(malloc0returnsnull, 909737eb1ca1Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 909837eb1ca1Smrg [malloc(0) returns NULL (default: auto)]), 909937eb1ca1Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 910037eb1ca1Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 9101c43cc173Smrg 910237eb1ca1SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 910337eb1ca1Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 910437eb1ca1Smrg AC_RUN_IFELSE([ 910537eb1ca1Smrgchar *malloc(); 910637eb1ca1Smrgchar *realloc(); 910737eb1ca1Smrgchar *calloc(); 910837eb1ca1Smrgmain() { 910937eb1ca1Smrg char *m0, *r0, *c0, *p; 911037eb1ca1Smrg m0 = malloc(0); 911137eb1ca1Smrg p = malloc(10); 911237eb1ca1Smrg r0 = realloc(p,0); 911337eb1ca1Smrg c0 = calloc(0); 911437eb1ca1Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 911537eb1ca1Smrg}], 911637eb1ca1Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 911737eb1ca1Smrg [MALLOC_ZERO_RETURNS_NULL=no], 911837eb1ca1Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 911921e67964Smrgfi 912037eb1ca1SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 9121c43cc173Smrg 912237eb1ca1Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 912337eb1ca1Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 912437eb1ca1Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 912537eb1ca1Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 912621e67964Smrgelse 912737eb1ca1Smrg MALLOC_ZERO_CFLAGS="" 912837eb1ca1Smrg XMALLOC_ZERO_CFLAGS="" 912937eb1ca1Smrg XTMALLOC_ZERO_CFLAGS="" 913021e67964Smrgfi 9131c43cc173Smrg 913237eb1ca1SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 913337eb1ca1SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 913437eb1ca1SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 913537eb1ca1Smrg]) # XORG_CHECK_MALLOC_ZERO 913637eb1ca1Smrg 913737eb1ca1Smrg# XORG_WITH_LINT() 913837eb1ca1Smrg# ---------------- 913937eb1ca1Smrg# Minimum version: 1.1.0 914021e67964Smrg# 914137eb1ca1Smrg# This macro enables the use of a tool that flags some suspicious and 914237eb1ca1Smrg# non-portable constructs (likely to be bugs) in C language source code. 914337eb1ca1Smrg# It will attempt to locate the tool and use appropriate options. 914437eb1ca1Smrg# There are various lint type tools on different platforms. 914537eb1ca1Smrg# 914637eb1ca1Smrg# Interface to module: 914737eb1ca1Smrg# LINT: returns the path to the tool found on the platform 914837eb1ca1Smrg# or the value set to LINT on the configure cmd line 914937eb1ca1Smrg# also an Automake conditional 915037eb1ca1Smrg# LINT_FLAGS: an Automake variable with appropriate flags 915137eb1ca1Smrg# 915237eb1ca1Smrg# --with-lint: 'yes' user instructs the module to use lint 915337eb1ca1Smrg# 'no' user instructs the module not to use lint (default) 915437eb1ca1Smrg# 915537eb1ca1Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 915637eb1ca1Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 915737eb1ca1Smrg# 915837eb1ca1SmrgAC_DEFUN([XORG_WITH_LINT],[ 9159c43cc173Smrg 916037eb1ca1SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 916137eb1ca1SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 916237eb1ca1SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 916337eb1ca1Smrg [Use a lint-style source code checker (default: disabled)])], 916437eb1ca1Smrg [use_lint=$withval], [use_lint=no]) 9165c43cc173Smrg 916637eb1ca1Smrg# Obtain platform specific info like program name and options 916737eb1ca1Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 916837eb1ca1Smrgcase $host_os in 916937eb1ca1Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 917037eb1ca1Smrg lint_name=splint 917137eb1ca1Smrg lint_options="-badflag" 917237eb1ca1Smrg ;; 917337eb1ca1Smrg *freebsd* | *netbsd*) 917437eb1ca1Smrg lint_name=lint 917537eb1ca1Smrg lint_options="-u -b" 917637eb1ca1Smrg ;; 917737eb1ca1Smrg *solaris*) 917837eb1ca1Smrg lint_name=lint 917937eb1ca1Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 918037eb1ca1Smrg ;; 918137eb1ca1Smrgesac 9182c43cc173Smrg 918337eb1ca1Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 918437eb1ca1Smrgif test "x$use_lint" = x"yes" ; then 918537eb1ca1Smrg AC_PATH_PROG([LINT], [$lint_name]) 918637eb1ca1Smrg if test "x$LINT" = "x"; then 918737eb1ca1Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 918837eb1ca1Smrg fi 918937eb1ca1Smrgelif test "x$use_lint" = x"no" ; then 919037eb1ca1Smrg if test "x$LINT" != "x"; then 919137eb1ca1Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 919237eb1ca1Smrg fi 919337eb1ca1Smrgelse 919437eb1ca1Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 919521e67964Smrgfi 9196c43cc173Smrg 919737eb1ca1Smrg# User supplied flags override default flags 919837eb1ca1Smrgif test "x$LINT_FLAGS" != "x"; then 919937eb1ca1Smrg lint_options=$LINT_FLAGS 920021e67964Smrgfi 9201c43cc173Smrg 920237eb1ca1SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 920337eb1ca1SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 9204c43cc173Smrg 920537eb1ca1Smrg]) # XORG_WITH_LINT 9206c43cc173Smrg 920737eb1ca1Smrg# XORG_LINT_LIBRARY(LIBNAME) 920837eb1ca1Smrg# -------------------------- 920937eb1ca1Smrg# Minimum version: 1.1.0 921037eb1ca1Smrg# 921137eb1ca1Smrg# Sets up flags for building lint libraries for checking programs that call 921237eb1ca1Smrg# functions in the library. 921337eb1ca1Smrg# 921437eb1ca1Smrg# Interface to module: 921537eb1ca1Smrg# LINTLIB - Automake variable with the name of lint library file to make 921637eb1ca1Smrg# MAKE_LINT_LIB - Automake conditional 921737eb1ca1Smrg# 921837eb1ca1Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 921937eb1ca1Smrg# - 'no' user instructs the module not to create a lint library (default) 9220c43cc173Smrg 922137eb1ca1SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 922237eb1ca1SmrgAC_REQUIRE([XORG_WITH_LINT]) 922337eb1ca1SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 922437eb1ca1Smrg [Create lint library (default: disabled)])], 922537eb1ca1Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 9226c43cc173Smrg 922737eb1ca1Smrgif test "x$make_lint_lib" = x"yes" ; then 922837eb1ca1Smrg LINTLIB=llib-l$1.ln 922937eb1ca1Smrg if test "x$LINT" = "x"; then 923037eb1ca1Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 923137eb1ca1Smrg fi 923237eb1ca1Smrgelif test "x$make_lint_lib" != x"no" ; then 923337eb1ca1Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 923437eb1ca1Smrgfi 92353e256790Smrg 923637eb1ca1SmrgAC_SUBST(LINTLIB) 923737eb1ca1SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 92383e256790Smrg 923937eb1ca1Smrg]) # XORG_LINT_LIBRARY 9240c43cc173Smrg 924137eb1ca1Smrg# XORG_CWARNFLAGS 924237eb1ca1Smrg# --------------- 924337eb1ca1Smrg# Minimum version: 1.2.0 92443e256790Smrg# 924537eb1ca1Smrg# Defines CWARNFLAGS to enable C compiler warnings. 9246c43cc173Smrg# 924737eb1ca1SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 924837eb1ca1SmrgAC_REQUIRE([AC_PROG_CC_C99]) 924937eb1ca1Smrgif test "x$GCC" = xyes ; then 925037eb1ca1Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 925137eb1ca1Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 925237eb1ca1Smrg-Wbad-function-cast -Wformat=2" 925337eb1ca1Smrg case `$CC -dumpversion` in 925437eb1ca1Smrg 3.4.* | 4.*) 925537eb1ca1Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 925637eb1ca1Smrg ;; 925737eb1ca1Smrg esac 925821e67964Smrgelse 925937eb1ca1Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 926037eb1ca1Smrg if test "x$SUNCC" = "xyes"; then 926137eb1ca1Smrg CWARNFLAGS="-v" 926237eb1ca1Smrg fi 926321e67964Smrgfi 926437eb1ca1SmrgAC_SUBST(CWARNFLAGS) 926537eb1ca1Smrg]) # XORG_CWARNFLAGS 9266c43cc173Smrg 926737eb1ca1Smrg# XORG_STRICT_OPTION 926837eb1ca1Smrg# ----------------------- 926937eb1ca1Smrg# Minimum version: 1.3.0 927037eb1ca1Smrg# 927137eb1ca1Smrg# Add configure option to enable strict compilation 927237eb1ca1SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 927337eb1ca1Smrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89 927437eb1ca1SmrgAC_REQUIRE([AC_PROG_CC_C99]) 927537eb1ca1SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 927621e67964Smrg 927737eb1ca1SmrgAC_ARG_ENABLE(strict-compilation, 927837eb1ca1Smrg AS_HELP_STRING([--enable-strict-compilation], 927937eb1ca1Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 928037eb1ca1Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 928137eb1ca1Smrgif test "x$STRICT_COMPILE" = "xyes"; then 928237eb1ca1Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 928337eb1ca1Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 928437eb1ca1Smrg if test "x$GCC" = xyes ; then 928537eb1ca1Smrg STRICT_CFLAGS="-pedantic -Werror" 928637eb1ca1Smrg elif test "x$SUNCC" = "xyes"; then 928737eb1ca1Smrg STRICT_CFLAGS="-errwarn" 928837eb1ca1Smrg elif test "x$INTELCC" = "xyes"; then 928937eb1ca1Smrg STRICT_CFLAGS="-Werror" 929037eb1ca1Smrg fi 9291c43cc173Smrgfi 929237eb1ca1SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 929337eb1ca1SmrgAC_SUBST([CWARNFLAGS]) 929437eb1ca1Smrg]) # XORG_STRICT_OPTION 9295c43cc173Smrg 929637eb1ca1Smrg# XORG_DEFAULT_OPTIONS 929737eb1ca1Smrg# -------------------- 929837eb1ca1Smrg# Minimum version: 1.3.0 929937eb1ca1Smrg# 930037eb1ca1Smrg# Defines default options for X.Org modules. 930137eb1ca1Smrg# 930237eb1ca1SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 930337eb1ca1SmrgAC_REQUIRE([AC_PROG_INSTALL]) 930437eb1ca1SmrgXORG_CWARNFLAGS 930537eb1ca1SmrgXORG_STRICT_OPTION 930637eb1ca1SmrgXORG_RELEASE_VERSION 930737eb1ca1SmrgXORG_CHANGELOG 930837eb1ca1SmrgXORG_INSTALL 930937eb1ca1SmrgXORG_MANPAGE_SECTIONS 931037eb1ca1Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 931137eb1ca1Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 931237eb1ca1Smrg]) # XORG_DEFAULT_OPTIONS 9313c43cc173Smrg 931437eb1ca1Smrg# XORG_INSTALL() 931537eb1ca1Smrg# ---------------- 931637eb1ca1Smrg# Minimum version: 1.4.0 931737eb1ca1Smrg# 931837eb1ca1Smrg# Defines the variable INSTALL_CMD as the command to copy 931937eb1ca1Smrg# INSTALL from $prefix/share/util-macros. 932037eb1ca1Smrg# 932137eb1ca1SmrgAC_DEFUN([XORG_INSTALL], [ 932237eb1ca1SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 932337eb1ca1Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 932437eb1ca1SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 932537eb1ca1Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 932637eb1ca1Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 932737eb1ca1Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 932837eb1ca1SmrgAC_SUBST([INSTALL_CMD]) 932937eb1ca1Smrg]) # XORG_INSTALL 933037eb1ca1Smrgdnl Copyright 2005 Red Hat, Inc 933137eb1ca1Smrgdnl 933237eb1ca1Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 933337eb1ca1Smrgdnl documentation for any purpose is hereby granted without fee, provided that 933437eb1ca1Smrgdnl the above copyright notice appear in all copies and that both that 933537eb1ca1Smrgdnl copyright notice and this permission notice appear in supporting 933637eb1ca1Smrgdnl documentation. 933737eb1ca1Smrgdnl 933837eb1ca1Smrgdnl The above copyright notice and this permission notice shall be included 933937eb1ca1Smrgdnl in all copies or substantial portions of the Software. 934037eb1ca1Smrgdnl 934137eb1ca1Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 934237eb1ca1Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 934337eb1ca1Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 934437eb1ca1Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 934537eb1ca1Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 934637eb1ca1Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 934737eb1ca1Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 934837eb1ca1Smrgdnl 934937eb1ca1Smrgdnl Except as contained in this notice, the name of the copyright holders shall 935037eb1ca1Smrgdnl not be used in advertising or otherwise to promote the sale, use or 935137eb1ca1Smrgdnl other dealings in this Software without prior written authorization 935237eb1ca1Smrgdnl from the copyright holders. 935337eb1ca1Smrgdnl 9354c43cc173Smrg 935537eb1ca1Smrg# XORG_RELEASE_VERSION 935637eb1ca1Smrg# -------------------- 935737eb1ca1Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 935837eb1ca1Smrg 935937eb1ca1SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 936037eb1ca1Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 936137eb1ca1Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 936237eb1ca1Smrg [Major version of this package]) 936337eb1ca1Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 936437eb1ca1Smrg if test "x$PVM" = "x"; then 936537eb1ca1Smrg PVM="0" 936637eb1ca1Smrg fi 936737eb1ca1Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 936837eb1ca1Smrg [$PVM], 936937eb1ca1Smrg [Minor version of this package]) 937037eb1ca1Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 937137eb1ca1Smrg if test "x$PVP" = "x"; then 937237eb1ca1Smrg PVP="0" 937337eb1ca1Smrg fi 937437eb1ca1Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 937537eb1ca1Smrg [$PVP], 937637eb1ca1Smrg [Patch version of this package]) 937737eb1ca1Smrg]) 9378c43cc173Smrg 937937eb1ca1Smrg# XORG_CHANGELOG() 938037eb1ca1Smrg# ---------------- 938137eb1ca1Smrg# Minimum version: 1.2.0 938237eb1ca1Smrg# 938337eb1ca1Smrg# Defines the variable CHANGELOG_CMD as the command to generate 938437eb1ca1Smrg# ChangeLog from git. 938537eb1ca1Smrg# 938637eb1ca1Smrg# 938737eb1ca1SmrgAC_DEFUN([XORG_CHANGELOG], [ 938837eb1ca1SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 938937eb1ca1Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 939037eb1ca1Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 939137eb1ca1Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 939237eb1ca1SmrgAC_SUBST([CHANGELOG_CMD]) 939337eb1ca1Smrg]) # XORG_CHANGELOG 939421e67964Smrg 939537eb1ca1Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 9396c43cc173Smrg# 939737eb1ca1Smrg# This file is free software; the Free Software Foundation 939837eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 939937eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 94003e256790Smrg 940137eb1ca1Smrg# AM_AUTOMAKE_VERSION(VERSION) 940237eb1ca1Smrg# ---------------------------- 940337eb1ca1Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 940437eb1ca1Smrg# generated from the m4 files accompanying Automake X.Y. 940537eb1ca1Smrg# (This private macro should not be called outside this file.) 940637eb1ca1SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 940737eb1ca1Smrg[am__api_version='1.11' 940837eb1ca1Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 940937eb1ca1Smrgdnl require some minimum version. Point them to the right macro. 941037eb1ca1Smrgm4_if([$1], [1.11.1], [], 941137eb1ca1Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 941237eb1ca1Smrg]) 9413c43cc173Smrg 941437eb1ca1Smrg# _AM_AUTOCONF_VERSION(VERSION) 941537eb1ca1Smrg# ----------------------------- 941637eb1ca1Smrg# aclocal traces this macro to find the Autoconf version. 941737eb1ca1Smrg# This is a private macro too. Using m4_define simplifies 941837eb1ca1Smrg# the logic in aclocal, which can simply ignore this definition. 941937eb1ca1Smrgm4_define([_AM_AUTOCONF_VERSION], []) 9420c43cc173Smrg 942137eb1ca1Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 942237eb1ca1Smrg# ------------------------------- 942337eb1ca1Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 942437eb1ca1Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 942537eb1ca1SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 942637eb1ca1Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl 942737eb1ca1Smrgm4_ifndef([AC_AUTOCONF_VERSION], 942837eb1ca1Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 942937eb1ca1Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 9430c43cc173Smrg 943137eb1ca1Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 9432c43cc173Smrg 943337eb1ca1Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 943437eb1ca1Smrg# 943537eb1ca1Smrg# This file is free software; the Free Software Foundation 943637eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 943737eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 943821e67964Smrg 943937eb1ca1Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 944037eb1ca1Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 944137eb1ca1Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 94423e256790Smrg# 944337eb1ca1Smrg# Of course, Automake must honor this variable whenever it calls a 944437eb1ca1Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 944537eb1ca1Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 944637eb1ca1Smrg# depending on how configure is run. This is pretty annoying, since 944737eb1ca1Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 944837eb1ca1Smrg# source directory, any form will work fine, but in subdirectories a 944937eb1ca1Smrg# relative path needs to be adjusted first. 94503e256790Smrg# 945137eb1ca1Smrg# $ac_aux_dir/missing 945237eb1ca1Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 945337eb1ca1Smrg# $top_srcdir/$ac_aux_dir/missing 945437eb1ca1Smrg# fails if $ac_aux_dir is absolute, 945537eb1ca1Smrg# fails when called from a subdirectory in a VPATH build with 945637eb1ca1Smrg# a relative $ac_aux_dir 94573e256790Smrg# 945837eb1ca1Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 945937eb1ca1Smrg# are both prefixed by $srcdir. In an in-source build this is usually 946037eb1ca1Smrg# harmless because $srcdir is `.', but things will broke when you 946137eb1ca1Smrg# start a VPATH build or use an absolute $srcdir. 94623e256790Smrg# 946337eb1ca1Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 946437eb1ca1Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 946537eb1ca1Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 946637eb1ca1Smrg# and then we would define $MISSING as 946737eb1ca1Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 946837eb1ca1Smrg# This will work as long as MISSING is not called from configure, because 946937eb1ca1Smrg# unfortunately $(top_srcdir) has no meaning in configure. 947037eb1ca1Smrg# However there are other variables, like CC, which are often used in 947137eb1ca1Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 94723e256790Smrg# 947337eb1ca1Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 947437eb1ca1Smrg# absolute PATH. The drawback is that using absolute paths prevent a 947537eb1ca1Smrg# configured tree to be moved without reconfiguration. 94763e256790Smrg 947737eb1ca1SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 947837eb1ca1Smrg[dnl Rely on autoconf to set up CDPATH properly. 947937eb1ca1SmrgAC_PREREQ([2.50])dnl 948037eb1ca1Smrg# expand $ac_aux_dir to an absolute path 948137eb1ca1Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 948237eb1ca1Smrg]) 94833e256790Smrg 948437eb1ca1Smrg# AM_CONDITIONAL -*- Autoconf -*- 94853e256790Smrg 948637eb1ca1Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 948737eb1ca1Smrg# Free Software Foundation, Inc. 94883e256790Smrg# 948937eb1ca1Smrg# This file is free software; the Free Software Foundation 949037eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 949137eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 94923e256790Smrg 949337eb1ca1Smrg# serial 9 949437eb1ca1Smrg 949537eb1ca1Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 949637eb1ca1Smrg# ------------------------------------- 949737eb1ca1Smrg# Define a conditional. 949837eb1ca1SmrgAC_DEFUN([AM_CONDITIONAL], 949937eb1ca1Smrg[AC_PREREQ(2.52)dnl 950037eb1ca1Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 950137eb1ca1Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 950237eb1ca1SmrgAC_SUBST([$1_TRUE])dnl 950337eb1ca1SmrgAC_SUBST([$1_FALSE])dnl 950437eb1ca1Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 950537eb1ca1Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 950637eb1ca1Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 950737eb1ca1Smrgif $2; then 950837eb1ca1Smrg $1_TRUE= 950937eb1ca1Smrg $1_FALSE='#' 95103e256790Smrgelse 951137eb1ca1Smrg $1_TRUE='#' 951237eb1ca1Smrg $1_FALSE= 95133e256790Smrgfi 951437eb1ca1SmrgAC_CONFIG_COMMANDS_PRE( 951537eb1ca1Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 951637eb1ca1Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 951737eb1ca1SmrgUsually this means the macro was only invoked conditionally.]]) 951837eb1ca1Smrgfi])]) 95193e256790Smrg 952037eb1ca1Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 952137eb1ca1Smrg# Free Software Foundation, Inc. 95223e256790Smrg# 952337eb1ca1Smrg# This file is free software; the Free Software Foundation 952437eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 952537eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 95263e256790Smrg 952737eb1ca1Smrg# serial 10 952837eb1ca1Smrg 952937eb1ca1Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 953037eb1ca1Smrg# written in clear, in which case automake, when reading aclocal.m4, 953137eb1ca1Smrg# will think it sees a *use*, and therefore will trigger all it's 953237eb1ca1Smrg# C support machinery. Also note that it means that autoscan, seeing 953337eb1ca1Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 953437eb1ca1Smrg 953537eb1ca1Smrg 953637eb1ca1Smrg# _AM_DEPENDENCIES(NAME) 953737eb1ca1Smrg# ---------------------- 953837eb1ca1Smrg# See how the compiler implements dependency checking. 953937eb1ca1Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 954037eb1ca1Smrg# We try a few techniques and use that to set a single cache variable. 954137eb1ca1Smrg# 954237eb1ca1Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 954337eb1ca1Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 954437eb1ca1Smrg# dependency, and given that the user is not expected to run this macro, 954537eb1ca1Smrg# just rely on AC_PROG_CC. 954637eb1ca1SmrgAC_DEFUN([_AM_DEPENDENCIES], 954737eb1ca1Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 954837eb1ca1SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 954937eb1ca1SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 955037eb1ca1SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 955137eb1ca1Smrg 955237eb1ca1Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 955337eb1ca1Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 955437eb1ca1Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 955537eb1ca1Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 955637eb1ca1Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 955737eb1ca1Smrg [depcc="$$1" am_compiler_list=]) 955837eb1ca1Smrg 955937eb1ca1SmrgAC_CACHE_CHECK([dependency style of $depcc], 956037eb1ca1Smrg [am_cv_$1_dependencies_compiler_type], 956137eb1ca1Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 956237eb1ca1Smrg # We make a subdir and do the tests there. Otherwise we can end up 956337eb1ca1Smrg # making bogus files that we don't know about and never remove. For 956437eb1ca1Smrg # instance it was reported that on HP-UX the gcc test will end up 956537eb1ca1Smrg # making a dummy file named `D' -- because `-MD' means `put the output 956637eb1ca1Smrg # in D'. 956737eb1ca1Smrg mkdir conftest.dir 956837eb1ca1Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 956937eb1ca1Smrg # using a relative directory. 957037eb1ca1Smrg cp "$am_depcomp" conftest.dir 957137eb1ca1Smrg cd conftest.dir 957237eb1ca1Smrg # We will build objects and dependencies in a subdirectory because 957337eb1ca1Smrg # it helps to detect inapplicable dependency modes. For instance 957437eb1ca1Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 957537eb1ca1Smrg # side effect of compilation, but ICC will put the dependencies in 957637eb1ca1Smrg # the current directory while Tru64 will put them in the object 957737eb1ca1Smrg # directory. 957837eb1ca1Smrg mkdir sub 957937eb1ca1Smrg 958037eb1ca1Smrg am_cv_$1_dependencies_compiler_type=none 958137eb1ca1Smrg if test "$am_compiler_list" = ""; then 958237eb1ca1Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 958337eb1ca1Smrg fi 958437eb1ca1Smrg am__universal=false 958537eb1ca1Smrg m4_case([$1], [CC], 958637eb1ca1Smrg [case " $depcc " in #( 958737eb1ca1Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 958837eb1ca1Smrg esac], 958937eb1ca1Smrg [CXX], 959037eb1ca1Smrg [case " $depcc " in #( 959137eb1ca1Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 959237eb1ca1Smrg esac]) 959337eb1ca1Smrg 959437eb1ca1Smrg for depmode in $am_compiler_list; do 959537eb1ca1Smrg # Setup a source with many dependencies, because some compilers 959637eb1ca1Smrg # like to wrap large dependency lists on column 80 (with \), and 959737eb1ca1Smrg # we should not choose a depcomp mode which is confused by this. 959837eb1ca1Smrg # 959937eb1ca1Smrg # We need to recreate these files for each test, as the compiler may 960037eb1ca1Smrg # overwrite some of them when testing with obscure command lines. 960137eb1ca1Smrg # This happens at least with the AIX C compiler. 960237eb1ca1Smrg : > sub/conftest.c 960337eb1ca1Smrg for i in 1 2 3 4 5 6; do 960437eb1ca1Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 960537eb1ca1Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 960637eb1ca1Smrg # Solaris 8's {/usr,}/bin/sh. 960737eb1ca1Smrg touch sub/conftst$i.h 960837eb1ca1Smrg done 960937eb1ca1Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 961037eb1ca1Smrg 961137eb1ca1Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 961237eb1ca1Smrg # mode. It turns out that the SunPro C++ compiler does not properly 961337eb1ca1Smrg # handle `-M -o', and we need to detect this. Also, some Intel 961437eb1ca1Smrg # versions had trouble with output in subdirs 961537eb1ca1Smrg am__obj=sub/conftest.${OBJEXT-o} 961637eb1ca1Smrg am__minus_obj="-o $am__obj" 961737eb1ca1Smrg case $depmode in 961837eb1ca1Smrg gcc) 961937eb1ca1Smrg # This depmode causes a compiler race in universal mode. 962037eb1ca1Smrg test "$am__universal" = false || continue 962137eb1ca1Smrg ;; 962237eb1ca1Smrg nosideeffect) 962337eb1ca1Smrg # after this tag, mechanisms are not by side-effect, so they'll 962437eb1ca1Smrg # only be used when explicitly requested 962537eb1ca1Smrg if test "x$enable_dependency_tracking" = xyes; then 962637eb1ca1Smrg continue 962737eb1ca1Smrg else 962837eb1ca1Smrg break 962937eb1ca1Smrg fi 963037eb1ca1Smrg ;; 963137eb1ca1Smrg msvisualcpp | msvcmsys) 963237eb1ca1Smrg # This compiler won't grok `-c -o', but also, the minuso test has 963337eb1ca1Smrg # not run yet. These depmodes are late enough in the game, and 963437eb1ca1Smrg # so weak that their functioning should not be impacted. 963537eb1ca1Smrg am__obj=conftest.${OBJEXT-o} 963637eb1ca1Smrg am__minus_obj= 963737eb1ca1Smrg ;; 963837eb1ca1Smrg none) break ;; 963937eb1ca1Smrg esac 964037eb1ca1Smrg if depmode=$depmode \ 964137eb1ca1Smrg source=sub/conftest.c object=$am__obj \ 964237eb1ca1Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 964337eb1ca1Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 964437eb1ca1Smrg >/dev/null 2>conftest.err && 964537eb1ca1Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 964637eb1ca1Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 964737eb1ca1Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 964837eb1ca1Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 964937eb1ca1Smrg # icc doesn't choke on unknown options, it will just issue warnings 965037eb1ca1Smrg # or remarks (even with -Werror). So we grep stderr for any message 965137eb1ca1Smrg # that says an option was ignored or not supported. 965237eb1ca1Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 965337eb1ca1Smrg # icc: Command line warning: ignoring option '-M'; no argument required 965437eb1ca1Smrg # The diagnosis changed in icc 8.0: 965537eb1ca1Smrg # icc: Command line remark: option '-MP' not supported 965637eb1ca1Smrg if (grep 'ignoring option' conftest.err || 965737eb1ca1Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 965837eb1ca1Smrg am_cv_$1_dependencies_compiler_type=$depmode 965937eb1ca1Smrg break 966037eb1ca1Smrg fi 966137eb1ca1Smrg fi 966237eb1ca1Smrg done 966337eb1ca1Smrg 966437eb1ca1Smrg cd .. 966537eb1ca1Smrg rm -rf conftest.dir 96663e256790Smrgelse 966737eb1ca1Smrg am_cv_$1_dependencies_compiler_type=none 96683e256790Smrgfi 966937eb1ca1Smrg]) 967037eb1ca1SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 967137eb1ca1SmrgAM_CONDITIONAL([am__fastdep$1], [ 967237eb1ca1Smrg test "x$enable_dependency_tracking" != xno \ 967337eb1ca1Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 967437eb1ca1Smrg]) 96753e256790Smrg 967637eb1ca1Smrg 967737eb1ca1Smrg# AM_SET_DEPDIR 967837eb1ca1Smrg# ------------- 967937eb1ca1Smrg# Choose a directory name for dependency files. 968037eb1ca1Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 968137eb1ca1SmrgAC_DEFUN([AM_SET_DEPDIR], 968237eb1ca1Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 968337eb1ca1SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 968437eb1ca1Smrg]) 968537eb1ca1Smrg 968637eb1ca1Smrg 968737eb1ca1Smrg# AM_DEP_TRACK 968837eb1ca1Smrg# ------------ 968937eb1ca1SmrgAC_DEFUN([AM_DEP_TRACK], 969037eb1ca1Smrg[AC_ARG_ENABLE(dependency-tracking, 969137eb1ca1Smrg[ --disable-dependency-tracking speeds up one-time build 969237eb1ca1Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 969337eb1ca1Smrgif test "x$enable_dependency_tracking" != xno; then 969437eb1ca1Smrg am_depcomp="$ac_aux_dir/depcomp" 969537eb1ca1Smrg AMDEPBACKSLASH='\' 969637eb1ca1Smrgfi 969737eb1ca1SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 969837eb1ca1SmrgAC_SUBST([AMDEPBACKSLASH])dnl 969937eb1ca1Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 970037eb1ca1Smrg]) 970137eb1ca1Smrg 970237eb1ca1Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 970337eb1ca1Smrg 970437eb1ca1Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 970537eb1ca1Smrg# Free Software Foundation, Inc. 97063e256790Smrg# 970737eb1ca1Smrg# This file is free software; the Free Software Foundation 970837eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 970937eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 971037eb1ca1Smrg 971137eb1ca1Smrg#serial 5 971237eb1ca1Smrg 971337eb1ca1Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 971437eb1ca1Smrg# ------------------------------ 971537eb1ca1SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 971637eb1ca1Smrg[{ 971737eb1ca1Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 971837eb1ca1Smrg # are listed without --file. Let's play safe and only enable the eval 971937eb1ca1Smrg # if we detect the quoting. 972037eb1ca1Smrg case $CONFIG_FILES in 972137eb1ca1Smrg *\'*) eval set x "$CONFIG_FILES" ;; 972237eb1ca1Smrg *) set x $CONFIG_FILES ;; 972337eb1ca1Smrg esac 972437eb1ca1Smrg shift 972537eb1ca1Smrg for mf 972637eb1ca1Smrg do 972737eb1ca1Smrg # Strip MF so we end up with the name of the file. 972837eb1ca1Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 972937eb1ca1Smrg # Check whether this is an Automake generated Makefile or not. 973037eb1ca1Smrg # We used to match only the files named `Makefile.in', but 973137eb1ca1Smrg # some people rename them; so instead we look at the file content. 973237eb1ca1Smrg # Grep'ing the first line is not enough: some people post-process 973337eb1ca1Smrg # each Makefile.in and add a new line on top of each file to say so. 973437eb1ca1Smrg # Grep'ing the whole file is not good either: AIX grep has a line 973537eb1ca1Smrg # limit of 2048, but all sed's we know have understand at least 4000. 973637eb1ca1Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 973737eb1ca1Smrg dirpart=`AS_DIRNAME("$mf")` 973837eb1ca1Smrg else 973937eb1ca1Smrg continue 974037eb1ca1Smrg fi 974137eb1ca1Smrg # Extract the definition of DEPDIR, am__include, and am__quote 974237eb1ca1Smrg # from the Makefile without running `make'. 974337eb1ca1Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 974437eb1ca1Smrg test -z "$DEPDIR" && continue 974537eb1ca1Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 974637eb1ca1Smrg test -z "am__include" && continue 974737eb1ca1Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 974837eb1ca1Smrg # When using ansi2knr, U may be empty or an underscore; expand it 974937eb1ca1Smrg U=`sed -n 's/^U = //p' < "$mf"` 975037eb1ca1Smrg # Find all dependency output files, they are included files with 975137eb1ca1Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 975237eb1ca1Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 975337eb1ca1Smrg # expansion. 975437eb1ca1Smrg for file in `sed -n " 975537eb1ca1Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 975637eb1ca1Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 975737eb1ca1Smrg # Make sure the directory exists. 975837eb1ca1Smrg test -f "$dirpart/$file" && continue 975937eb1ca1Smrg fdir=`AS_DIRNAME(["$file"])` 976037eb1ca1Smrg AS_MKDIR_P([$dirpart/$fdir]) 976137eb1ca1Smrg # echo "creating $dirpart/$file" 976237eb1ca1Smrg echo '# dummy' > "$dirpart/$file" 976337eb1ca1Smrg done 976437eb1ca1Smrg done 976537eb1ca1Smrg} 976637eb1ca1Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 976737eb1ca1Smrg 976837eb1ca1Smrg 976937eb1ca1Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 977037eb1ca1Smrg# ----------------------------- 977137eb1ca1Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 97723e256790Smrg# 977337eb1ca1Smrg# This code is only required when automatic dependency tracking 977437eb1ca1Smrg# is enabled. FIXME. This creates each `.P' file that we will 977537eb1ca1Smrg# need in order to bootstrap the dependency handling code. 977637eb1ca1SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 977737eb1ca1Smrg[AC_CONFIG_COMMANDS([depfiles], 977837eb1ca1Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 977937eb1ca1Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 978037eb1ca1Smrg]) 978137eb1ca1Smrg 978237eb1ca1Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 978337eb1ca1Smrg# Free Software Foundation, Inc. 97843e256790Smrg# 978537eb1ca1Smrg# This file is free software; the Free Software Foundation 978637eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 978737eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 978837eb1ca1Smrg 978937eb1ca1Smrg# serial 8 979037eb1ca1Smrg 979137eb1ca1Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 979237eb1ca1SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 979337eb1ca1Smrg 979437eb1ca1Smrg# Do all the work for Automake. -*- Autoconf -*- 979537eb1ca1Smrg 979637eb1ca1Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 979737eb1ca1Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 97983e256790Smrg# 979937eb1ca1Smrg# This file is free software; the Free Software Foundation 980037eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 980137eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 98023e256790Smrg 980337eb1ca1Smrg# serial 16 980437eb1ca1Smrg 980537eb1ca1Smrg# This macro actually does too much. Some checks are only needed if 980637eb1ca1Smrg# your package does certain things. But this isn't really a big deal. 980737eb1ca1Smrg 980837eb1ca1Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 980937eb1ca1Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 981037eb1ca1Smrg# ----------------------------------------------- 981137eb1ca1Smrg# The call with PACKAGE and VERSION arguments is the old style 981237eb1ca1Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 981337eb1ca1Smrg# and VERSION should now be passed to AC_INIT and removed from 981437eb1ca1Smrg# the call to AM_INIT_AUTOMAKE. 981537eb1ca1Smrg# We support both call styles for the transition. After 981637eb1ca1Smrg# the next Automake release, Autoconf can make the AC_INIT 981737eb1ca1Smrg# arguments mandatory, and then we can depend on a new Autoconf 981837eb1ca1Smrg# release and drop the old call support. 981937eb1ca1SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 982037eb1ca1Smrg[AC_PREREQ([2.62])dnl 982137eb1ca1Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 982237eb1ca1Smrgdnl the ones we care about. 982337eb1ca1Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 982437eb1ca1SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 982537eb1ca1SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 982637eb1ca1Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 982737eb1ca1Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 982837eb1ca1Smrg # is not polluted with repeated "-I." 982937eb1ca1Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 983037eb1ca1Smrg # test to see if srcdir already configured 983137eb1ca1Smrg if test -f $srcdir/config.status; then 983237eb1ca1Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 983337eb1ca1Smrg fi 98343e256790Smrgfi 98353e256790Smrg 983637eb1ca1Smrg# test whether we have cygpath 983737eb1ca1Smrgif test -z "$CYGPATH_W"; then 983837eb1ca1Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 983937eb1ca1Smrg CYGPATH_W='cygpath -w' 984037eb1ca1Smrg else 984137eb1ca1Smrg CYGPATH_W=echo 984237eb1ca1Smrg fi 98433e256790Smrgfi 984437eb1ca1SmrgAC_SUBST([CYGPATH_W]) 98453e256790Smrg 984637eb1ca1Smrg# Define the identity of the package. 984737eb1ca1Smrgdnl Distinguish between old-style and new-style calls. 984837eb1ca1Smrgm4_ifval([$2], 984937eb1ca1Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 985037eb1ca1Smrg AC_SUBST([PACKAGE], [$1])dnl 985137eb1ca1Smrg AC_SUBST([VERSION], [$2])], 985237eb1ca1Smrg[_AM_SET_OPTIONS([$1])dnl 985337eb1ca1Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 985437eb1ca1Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 985537eb1ca1Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 985637eb1ca1Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 985737eb1ca1Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 98583e256790Smrg 985937eb1ca1Smrg_AM_IF_OPTION([no-define],, 986037eb1ca1Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 986137eb1ca1Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 98623e256790Smrg 986337eb1ca1Smrg# Some tools Automake needs. 986437eb1ca1SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 986537eb1ca1SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 986637eb1ca1SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 986737eb1ca1SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 986837eb1ca1SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 986937eb1ca1SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 987037eb1ca1SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 987137eb1ca1SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 987237eb1ca1SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 987337eb1ca1SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 987437eb1ca1Smrg# We need awk for the "check" target. The system "awk" is bad on 987537eb1ca1Smrg# some platforms. 987637eb1ca1SmrgAC_REQUIRE([AC_PROG_AWK])dnl 987737eb1ca1SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 987837eb1ca1SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 987937eb1ca1Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 988037eb1ca1Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 988137eb1ca1Smrg [_AM_PROG_TAR([v7])])]) 988237eb1ca1Smrg_AM_IF_OPTION([no-dependencies],, 988337eb1ca1Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 988437eb1ca1Smrg [_AM_DEPENDENCIES(CC)], 988537eb1ca1Smrg [define([AC_PROG_CC], 988637eb1ca1Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 988737eb1ca1SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 988837eb1ca1Smrg [_AM_DEPENDENCIES(CXX)], 988937eb1ca1Smrg [define([AC_PROG_CXX], 989037eb1ca1Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 989137eb1ca1SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 989237eb1ca1Smrg [_AM_DEPENDENCIES(OBJC)], 989337eb1ca1Smrg [define([AC_PROG_OBJC], 989437eb1ca1Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 989537eb1ca1Smrg]) 989637eb1ca1Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 989737eb1ca1Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 989837eb1ca1Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 989937eb1ca1Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 990037eb1ca1SmrgAC_CONFIG_COMMANDS_PRE(dnl 990137eb1ca1Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 990237eb1ca1Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 990337eb1ca1Smrg]) 99043e256790Smrg 990537eb1ca1Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 990637eb1ca1Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 990737eb1ca1Smrgdnl mangled by Autoconf and run in a shell conditional statement. 990837eb1ca1Smrgm4_define([_AC_COMPILER_EXEEXT], 990937eb1ca1Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 99103e256790Smrg 99113e256790Smrg 991237eb1ca1Smrg# When config.status generates a header, we must update the stamp-h file. 991337eb1ca1Smrg# This file resides in the same directory as the config header 991437eb1ca1Smrg# that is generated. The stamp files are numbered to have different names. 99153e256790Smrg 991637eb1ca1Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 991737eb1ca1Smrg# loop where config.status creates the headers, so we can generate 991837eb1ca1Smrg# our stamp files there. 991937eb1ca1SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 992037eb1ca1Smrg[# Compute $1's index in $config_headers. 992137eb1ca1Smrg_am_arg=$1 992237eb1ca1Smrg_am_stamp_count=1 992337eb1ca1Smrgfor _am_header in $config_headers :; do 992437eb1ca1Smrg case $_am_header in 992537eb1ca1Smrg $_am_arg | $_am_arg:* ) 992637eb1ca1Smrg break ;; 992737eb1ca1Smrg * ) 992837eb1ca1Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 992937eb1ca1Smrg esac 993037eb1ca1Smrgdone 993137eb1ca1Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 993237eb1ca1Smrg 993337eb1ca1Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 99343e256790Smrg# 993537eb1ca1Smrg# This file is free software; the Free Software Foundation 993637eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 993737eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 993837eb1ca1Smrg 993937eb1ca1Smrg# AM_PROG_INSTALL_SH 994037eb1ca1Smrg# ------------------ 994137eb1ca1Smrg# Define $install_sh. 994237eb1ca1SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 994337eb1ca1Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 994437eb1ca1Smrgif test x"${install_sh}" != xset; then 994537eb1ca1Smrg case $am_aux_dir in 994637eb1ca1Smrg *\ * | *\ *) 994737eb1ca1Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 994837eb1ca1Smrg *) 994937eb1ca1Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 995037eb1ca1Smrg esac 99513e256790Smrgfi 995237eb1ca1SmrgAC_SUBST(install_sh)]) 99533e256790Smrg 995437eb1ca1Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 99553e256790Smrg# 995637eb1ca1Smrg# This file is free software; the Free Software Foundation 995737eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 995837eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 995937eb1ca1Smrg 996037eb1ca1Smrg# serial 2 996137eb1ca1Smrg 996237eb1ca1Smrg# Check whether the underlying file-system supports filenames 996337eb1ca1Smrg# with a leading dot. For instance MS-DOS doesn't. 996437eb1ca1SmrgAC_DEFUN([AM_SET_LEADING_DOT], 996537eb1ca1Smrg[rm -rf .tst 2>/dev/null 996637eb1ca1Smrgmkdir .tst 2>/dev/null 996737eb1ca1Smrgif test -d .tst; then 996837eb1ca1Smrg am__leading_dot=. 996937eb1ca1Smrgelse 997037eb1ca1Smrg am__leading_dot=_ 99713e256790Smrgfi 997237eb1ca1Smrgrmdir .tst 2>/dev/null 997337eb1ca1SmrgAC_SUBST([am__leading_dot])]) 99743e256790Smrg 997537eb1ca1Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 997637eb1ca1Smrg# From Jim Meyering 997737eb1ca1Smrg 997837eb1ca1Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 997937eb1ca1Smrg# Free Software Foundation, Inc. 99803e256790Smrg# 998137eb1ca1Smrg# This file is free software; the Free Software Foundation 998237eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 998337eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 998437eb1ca1Smrg 998537eb1ca1Smrg# serial 5 998637eb1ca1Smrg 998737eb1ca1Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 998837eb1ca1Smrg# ---------------------------------- 998937eb1ca1Smrg# Control maintainer-specific portions of Makefiles. 999037eb1ca1Smrg# Default is to disable them, unless `enable' is passed literally. 999137eb1ca1Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 999237eb1ca1Smrg# can override the default with the --enable/--disable switch. 999337eb1ca1SmrgAC_DEFUN([AM_MAINTAINER_MODE], 999437eb1ca1Smrg[m4_case(m4_default([$1], [disable]), 999537eb1ca1Smrg [enable], [m4_define([am_maintainer_other], [disable])], 999637eb1ca1Smrg [disable], [m4_define([am_maintainer_other], [enable])], 999737eb1ca1Smrg [m4_define([am_maintainer_other], [enable]) 999837eb1ca1Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 999937eb1ca1SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 1000037eb1ca1Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 1000137eb1ca1Smrg AC_ARG_ENABLE([maintainer-mode], 1000237eb1ca1Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 1000337eb1ca1Smrg (and sometimes confusing) to the casual installer], 1000437eb1ca1Smrg [USE_MAINTAINER_MODE=$enableval], 1000537eb1ca1Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 1000637eb1ca1Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 1000737eb1ca1Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 1000837eb1ca1Smrg MAINT=$MAINTAINER_MODE_TRUE 1000937eb1ca1Smrg AC_SUBST([MAINT])dnl 1001037eb1ca1Smrg] 1001137eb1ca1Smrg) 1001237eb1ca1Smrg 1001337eb1ca1SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 1001437eb1ca1Smrg 1001537eb1ca1Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 1001637eb1ca1Smrg 1001737eb1ca1Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 100183e256790Smrg# 1001937eb1ca1Smrg# This file is free software; the Free Software Foundation 1002037eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 1002137eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 1002237eb1ca1Smrg 1002337eb1ca1Smrg# serial 4 1002437eb1ca1Smrg 1002537eb1ca1Smrg# AM_MAKE_INCLUDE() 1002637eb1ca1Smrg# ----------------- 1002737eb1ca1Smrg# Check to see how make treats includes. 1002837eb1ca1SmrgAC_DEFUN([AM_MAKE_INCLUDE], 1002937eb1ca1Smrg[am_make=${MAKE-make} 1003037eb1ca1Smrgcat > confinc << 'END' 1003137eb1ca1Smrgam__doit: 1003237eb1ca1Smrg @echo this is the am__doit target 1003337eb1ca1Smrg.PHONY: am__doit 1003437eb1ca1SmrgEND 1003537eb1ca1Smrg# If we don't find an include directive, just comment out the code. 1003637eb1ca1SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 1003737eb1ca1Smrgam__include="#" 1003837eb1ca1Smrgam__quote= 1003937eb1ca1Smrg_am_result=none 1004037eb1ca1Smrg# First try GNU make style include. 1004137eb1ca1Smrgecho "include confinc" > confmf 1004237eb1ca1Smrg# Ignore all kinds of additional output from `make'. 1004337eb1ca1Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 1004437eb1ca1Smrg*the\ am__doit\ target*) 1004537eb1ca1Smrg am__include=include 1004637eb1ca1Smrg am__quote= 1004737eb1ca1Smrg _am_result=GNU 1004837eb1ca1Smrg ;; 1004937eb1ca1Smrgesac 1005037eb1ca1Smrg# Now try BSD make style include. 1005137eb1ca1Smrgif test "$am__include" = "#"; then 1005237eb1ca1Smrg echo '.include "confinc"' > confmf 1005337eb1ca1Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 1005437eb1ca1Smrg *the\ am__doit\ target*) 1005537eb1ca1Smrg am__include=.include 1005637eb1ca1Smrg am__quote="\"" 1005737eb1ca1Smrg _am_result=BSD 1005837eb1ca1Smrg ;; 1005937eb1ca1Smrg esac 100603e256790Smrgfi 1006137eb1ca1SmrgAC_SUBST([am__include]) 1006237eb1ca1SmrgAC_SUBST([am__quote]) 1006337eb1ca1SmrgAC_MSG_RESULT([$_am_result]) 1006437eb1ca1Smrgrm -f confinc confmf 1006537eb1ca1Smrg]) 100663e256790Smrg 1006737eb1ca1Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1006837eb1ca1Smrg 1006937eb1ca1Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 1007037eb1ca1Smrg# Free Software Foundation, Inc. 10071c43cc173Smrg# 1007237eb1ca1Smrg# This file is free software; the Free Software Foundation 1007337eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 1007437eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 10075c43cc173Smrg 1007637eb1ca1Smrg# serial 6 1007737eb1ca1Smrg 1007837eb1ca1Smrg# AM_MISSING_PROG(NAME, PROGRAM) 1007937eb1ca1Smrg# ------------------------------ 1008037eb1ca1SmrgAC_DEFUN([AM_MISSING_PROG], 1008137eb1ca1Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1008237eb1ca1Smrg$1=${$1-"${am_missing_run}$2"} 1008337eb1ca1SmrgAC_SUBST($1)]) 1008437eb1ca1Smrg 1008537eb1ca1Smrg 1008637eb1ca1Smrg# AM_MISSING_HAS_RUN 1008737eb1ca1Smrg# ------------------ 1008837eb1ca1Smrg# Define MISSING if not defined so far and test if it supports --run. 1008937eb1ca1Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 1009037eb1ca1SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 1009137eb1ca1Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1009237eb1ca1SmrgAC_REQUIRE_AUX_FILE([missing])dnl 1009337eb1ca1Smrgif test x"${MISSING+set}" != xset; then 1009437eb1ca1Smrg case $am_aux_dir in 1009537eb1ca1Smrg *\ * | *\ *) 1009637eb1ca1Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 1009737eb1ca1Smrg *) 1009837eb1ca1Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 1009937eb1ca1Smrg esac 1010021e67964Smrgfi 1010137eb1ca1Smrg# Use eval to expand $SHELL 1010237eb1ca1Smrgif eval "$MISSING --run true"; then 1010337eb1ca1Smrg am_missing_run="$MISSING --run " 1010421e67964Smrgelse 1010537eb1ca1Smrg am_missing_run= 1010637eb1ca1Smrg AC_MSG_WARN([`missing' script is too old or missing]) 1010721e67964Smrgfi 1010837eb1ca1Smrg]) 10109c43cc173Smrg 1011037eb1ca1Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 101113e256790Smrg# 1011237eb1ca1Smrg# This file is free software; the Free Software Foundation 1011337eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 1011437eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 1011537eb1ca1Smrg 1011637eb1ca1Smrg# AM_PROG_MKDIR_P 1011737eb1ca1Smrg# --------------- 1011837eb1ca1Smrg# Check for `mkdir -p'. 1011937eb1ca1SmrgAC_DEFUN([AM_PROG_MKDIR_P], 1012037eb1ca1Smrg[AC_PREREQ([2.60])dnl 1012137eb1ca1SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 1012237eb1ca1Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 1012337eb1ca1Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 1012437eb1ca1Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 1012537eb1ca1Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 1012637eb1ca1Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 1012737eb1ca1Smrgdnl adjustment using top_builddir (which is defined more often than 1012837eb1ca1Smrgdnl MKDIR_P). 1012937eb1ca1SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 1013037eb1ca1Smrgcase $mkdir_p in 1013137eb1ca1Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 1013237eb1ca1Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 1013337eb1ca1Smrgesac 1013437eb1ca1Smrg]) 1013537eb1ca1Smrg 1013637eb1ca1Smrg# Helper functions for option handling. -*- Autoconf -*- 1013737eb1ca1Smrg 1013837eb1ca1Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 101393e256790Smrg# 1014037eb1ca1Smrg# This file is free software; the Free Software Foundation 1014137eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 1014237eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 1014337eb1ca1Smrg 1014437eb1ca1Smrg# serial 4 1014537eb1ca1Smrg 1014637eb1ca1Smrg# _AM_MANGLE_OPTION(NAME) 1014737eb1ca1Smrg# ----------------------- 1014837eb1ca1SmrgAC_DEFUN([_AM_MANGLE_OPTION], 1014937eb1ca1Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1015037eb1ca1Smrg 1015137eb1ca1Smrg# _AM_SET_OPTION(NAME) 1015237eb1ca1Smrg# ------------------------------ 1015337eb1ca1Smrg# Set option NAME. Presently that only means defining a flag for this option. 1015437eb1ca1SmrgAC_DEFUN([_AM_SET_OPTION], 1015537eb1ca1Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1015637eb1ca1Smrg 1015737eb1ca1Smrg# _AM_SET_OPTIONS(OPTIONS) 1015837eb1ca1Smrg# ---------------------------------- 1015937eb1ca1Smrg# OPTIONS is a space-separated list of Automake options. 1016037eb1ca1SmrgAC_DEFUN([_AM_SET_OPTIONS], 1016137eb1ca1Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1016237eb1ca1Smrg 1016337eb1ca1Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1016437eb1ca1Smrg# ------------------------------------------- 1016537eb1ca1Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1016637eb1ca1SmrgAC_DEFUN([_AM_IF_OPTION], 1016737eb1ca1Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1016837eb1ca1Smrg 1016937eb1ca1Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1017037eb1ca1Smrg 1017137eb1ca1Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 1017237eb1ca1Smrg# Free Software Foundation, Inc. 1017321e67964Smrg# 1017437eb1ca1Smrg# This file is free software; the Free Software Foundation 1017537eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 1017637eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 10177c43cc173Smrg 1017837eb1ca1Smrg# serial 5 101793e256790Smrg 1018037eb1ca1Smrg# AM_SANITY_CHECK 1018137eb1ca1Smrg# --------------- 1018237eb1ca1SmrgAC_DEFUN([AM_SANITY_CHECK], 1018337eb1ca1Smrg[AC_MSG_CHECKING([whether build environment is sane]) 1018437eb1ca1Smrg# Just in case 1018537eb1ca1Smrgsleep 1 1018637eb1ca1Smrgecho timestamp > conftest.file 1018737eb1ca1Smrg# Reject unsafe characters in $srcdir or the absolute working directory 1018837eb1ca1Smrg# name. Accept space and tab only in the latter. 1018937eb1ca1Smrgam_lf=' 1019037eb1ca1Smrg' 1019137eb1ca1Smrgcase `pwd` in 1019237eb1ca1Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 1019337eb1ca1Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 1019437eb1ca1Smrgesac 1019537eb1ca1Smrgcase $srcdir in 1019637eb1ca1Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1019737eb1ca1Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 101983e256790Smrgesac 101993e256790Smrg 1020037eb1ca1Smrg# Do `set' in a subshell so we don't clobber the current shell's 1020137eb1ca1Smrg# arguments. Must try -L first in case configure is actually a 1020237eb1ca1Smrg# symlink; some systems play weird games with the mod time of symlinks 1020337eb1ca1Smrg# (eg FreeBSD returns the mod time of the symlink's containing 1020437eb1ca1Smrg# directory). 1020537eb1ca1Smrgif ( 1020637eb1ca1Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1020737eb1ca1Smrg if test "$[*]" = "X"; then 1020837eb1ca1Smrg # -L didn't work. 1020937eb1ca1Smrg set X `ls -t "$srcdir/configure" conftest.file` 102103e256790Smrg fi 1021137eb1ca1Smrg rm -f conftest.file 1021237eb1ca1Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1021337eb1ca1Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1021437eb1ca1Smrg 1021537eb1ca1Smrg # If neither matched, then we have a broken ls. This can happen 1021637eb1ca1Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1021737eb1ca1Smrg # broken ls alias from the environment. This has actually 1021837eb1ca1Smrg # happened. Such a system could not be considered "sane". 1021937eb1ca1Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1022037eb1ca1Smrgalias in your environment]) 102213e256790Smrg fi 102223e256790Smrg 1022337eb1ca1Smrg test "$[2]" = conftest.file 1022437eb1ca1Smrg ) 1022537eb1ca1Smrgthen 1022637eb1ca1Smrg # Ok. 1022737eb1ca1Smrg : 1022837eb1ca1Smrgelse 1022937eb1ca1Smrg AC_MSG_ERROR([newly created file is older than distributed files! 1023037eb1ca1SmrgCheck your system clock]) 10231c43cc173Smrgfi 1023237eb1ca1SmrgAC_MSG_RESULT(yes)]) 10233c43cc173Smrg 1023437eb1ca1Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 1023537eb1ca1Smrg# 1023637eb1ca1Smrg# This file is free software; the Free Software Foundation 1023737eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 1023837eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 10239c43cc173Smrg 1024037eb1ca1Smrg# serial 1 10241c43cc173Smrg 1024237eb1ca1Smrg# AM_SILENT_RULES([DEFAULT]) 1024321e67964Smrg# -------------------------- 1024437eb1ca1Smrg# Enable less verbose build rules; with the default set to DEFAULT 1024537eb1ca1Smrg# (`yes' being less verbose, `no' or empty being verbose). 1024637eb1ca1SmrgAC_DEFUN([AM_SILENT_RULES], 1024737eb1ca1Smrg[AC_ARG_ENABLE([silent-rules], 1024837eb1ca1Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 1024937eb1ca1Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 1025037eb1ca1Smrgcase $enable_silent_rules in 1025137eb1ca1Smrgyes) AM_DEFAULT_VERBOSITY=0;; 1025237eb1ca1Smrgno) AM_DEFAULT_VERBOSITY=1;; 1025337eb1ca1Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1025437eb1ca1Smrgesac 1025537eb1ca1SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1025637eb1ca1SmrgAM_BACKSLASH='\' 1025737eb1ca1SmrgAC_SUBST([AM_BACKSLASH])dnl 1025837eb1ca1Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1025937eb1ca1Smrg]) 10260c43cc173Smrg 1026137eb1ca1Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 1026237eb1ca1Smrg# 1026337eb1ca1Smrg# This file is free software; the Free Software Foundation 1026437eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 1026537eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 102663e256790Smrg 1026737eb1ca1Smrg# AM_PROG_INSTALL_STRIP 1026837eb1ca1Smrg# --------------------- 1026937eb1ca1Smrg# One issue with vendor `install' (even GNU) is that you can't 1027037eb1ca1Smrg# specify the program used to strip binaries. This is especially 1027137eb1ca1Smrg# annoying in cross-compiling environments, where the build's strip 1027237eb1ca1Smrg# is unlikely to handle the host's binaries. 1027337eb1ca1Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1027437eb1ca1Smrg# always use install-sh in `make install-strip', and initialize 1027537eb1ca1Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 1027637eb1ca1SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1027737eb1ca1Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1027837eb1ca1Smrg# Installed binaries are usually stripped using `strip' when the user 1027937eb1ca1Smrg# run `make install-strip'. However `strip' might not be the right 1028037eb1ca1Smrg# tool to use in cross-compilation environments, therefore Automake 1028137eb1ca1Smrg# will honor the `STRIP' environment variable to overrule this program. 1028237eb1ca1Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1028337eb1ca1Smrgif test "$cross_compiling" != no; then 1028437eb1ca1Smrg AC_CHECK_TOOL([STRIP], [strip], :) 1028521e67964Smrgfi 1028637eb1ca1SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1028737eb1ca1SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 102883e256790Smrg 1028937eb1ca1Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 1029037eb1ca1Smrg# 1029137eb1ca1Smrg# This file is free software; the Free Software Foundation 1029237eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 1029337eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 10294c43cc173Smrg 1029537eb1ca1Smrg# serial 2 10296c43cc173Smrg 1029737eb1ca1Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1029837eb1ca1Smrg# --------------------------- 1029937eb1ca1Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1030037eb1ca1Smrg# This macro is traced by Automake. 1030137eb1ca1SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 10302c27c18e8Smrg 1030337eb1ca1Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1030437eb1ca1Smrg# --------------------------- 1030537eb1ca1Smrg# Public sister of _AM_SUBST_NOTMAKE. 1030637eb1ca1SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1030737eb1ca1Smrg 1030837eb1ca1Smrg# Check how to create a tarball. -*- Autoconf -*- 1030937eb1ca1Smrg 1031037eb1ca1Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 10311c27c18e8Smrg# 1031237eb1ca1Smrg# This file is free software; the Free Software Foundation 1031337eb1ca1Smrg# gives unlimited permission to copy and/or distribute it, 1031437eb1ca1Smrg# with or without modifications, as long as this notice is preserved. 10315c27c18e8Smrg 1031637eb1ca1Smrg# serial 2 10317c27c18e8Smrg 1031837eb1ca1Smrg# _AM_PROG_TAR(FORMAT) 10319c27c18e8Smrg# -------------------- 1032037eb1ca1Smrg# Check how to create a tarball in format FORMAT. 1032137eb1ca1Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 10322c27c18e8Smrg# 1032337eb1ca1Smrg# Substitute a variable $(am__tar) that is a command 1032437eb1ca1Smrg# writing to stdout a FORMAT-tarball containing the directory 1032537eb1ca1Smrg# $tardir. 1032637eb1ca1Smrg# tardir=directory && $(am__tar) > result.tar 10327c27c18e8Smrg# 1032837eb1ca1Smrg# Substitute a variable $(am__untar) that extract such 1032937eb1ca1Smrg# a tarball read from stdin. 1033037eb1ca1Smrg# $(am__untar) < result.tar 1033137eb1ca1SmrgAC_DEFUN([_AM_PROG_TAR], 1033237eb1ca1Smrg[# Always define AMTAR for backward compatibility. 1033337eb1ca1SmrgAM_MISSING_PROG([AMTAR], [tar]) 1033437eb1ca1Smrgm4_if([$1], [v7], 1033537eb1ca1Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 1033637eb1ca1Smrg [m4_case([$1], [ustar],, [pax],, 1033737eb1ca1Smrg [m4_fatal([Unknown tar format])]) 1033837eb1ca1SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 1033937eb1ca1Smrg# Loop over all known methods to create a tar archive until one works. 1034037eb1ca1Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1034137eb1ca1Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1034237eb1ca1Smrg# Do not fold the above two line into one, because Tru64 sh and 1034337eb1ca1Smrg# Solaris sh will not grok spaces in the rhs of `-'. 1034437eb1ca1Smrgfor _am_tool in $_am_tools 1034537eb1ca1Smrgdo 1034637eb1ca1Smrg case $_am_tool in 1034737eb1ca1Smrg gnutar) 1034837eb1ca1Smrg for _am_tar in tar gnutar gtar; 1034937eb1ca1Smrg do 1035037eb1ca1Smrg AM_RUN_LOG([$_am_tar --version]) && break 1035137eb1ca1Smrg done 1035237eb1ca1Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1035337eb1ca1Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1035437eb1ca1Smrg am__untar="$_am_tar -xf -" 1035537eb1ca1Smrg ;; 1035637eb1ca1Smrg plaintar) 1035737eb1ca1Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1035837eb1ca1Smrg # ustar tarball either. 1035937eb1ca1Smrg (tar --version) >/dev/null 2>&1 && continue 1036037eb1ca1Smrg am__tar='tar chf - "$$tardir"' 1036137eb1ca1Smrg am__tar_='tar chf - "$tardir"' 1036237eb1ca1Smrg am__untar='tar xf -' 1036337eb1ca1Smrg ;; 1036437eb1ca1Smrg pax) 1036537eb1ca1Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1036637eb1ca1Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1036737eb1ca1Smrg am__untar='pax -r' 1036837eb1ca1Smrg ;; 1036937eb1ca1Smrg cpio) 1037037eb1ca1Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1037137eb1ca1Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1037237eb1ca1Smrg am__untar='cpio -i -H $1 -d' 1037337eb1ca1Smrg ;; 1037437eb1ca1Smrg none) 1037537eb1ca1Smrg am__tar=false 1037637eb1ca1Smrg am__tar_=false 1037737eb1ca1Smrg am__untar=false 1037837eb1ca1Smrg ;; 1037937eb1ca1Smrg esac 103803e256790Smrg 1038137eb1ca1Smrg # If the value was cached, stop now. We just wanted to have am__tar 1038237eb1ca1Smrg # and am__untar set. 1038337eb1ca1Smrg test -n "${am_cv_prog_tar_$1}" && break 10384c43cc173Smrg 1038537eb1ca1Smrg # tar/untar a dummy directory, and stop if the command works 1038637eb1ca1Smrg rm -rf conftest.dir 1038737eb1ca1Smrg mkdir conftest.dir 1038837eb1ca1Smrg echo GrepMe > conftest.dir/file 1038937eb1ca1Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1039037eb1ca1Smrg rm -rf conftest.dir 1039137eb1ca1Smrg if test -s conftest.tar; then 1039237eb1ca1Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1039337eb1ca1Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1039437eb1ca1Smrg fi 1039537eb1ca1Smrgdone 1039637eb1ca1Smrgrm -rf conftest.dir 1039721e67964Smrg 1039837eb1ca1SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1039937eb1ca1SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1040037eb1ca1SmrgAC_SUBST([am__tar]) 1040137eb1ca1SmrgAC_SUBST([am__untar]) 1040237eb1ca1Smrg]) # _AM_PROG_TAR 10403c43cc173Smrg 10404